Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by ShawnSwander

So I'm using some art for character profile pictures that shows the character and different armors he/she can wear that just go over the character's image to give the effect of a character wearing armor,helmets,boots, etc.

There are 16 different characters of various heights and widths but all the sheets are 12x11 frames I could edit them all in Photoshop but that is a large project in itself. Is there are way to specify something like this.
    animSheet: new ig.AnimationSheet( 'path.png', width/12, height/11),

if so how do I get the image's height/width

1 decade ago by mouseonew

You could try something like this:

myImage: new ig.Image( 'path.png' );

init: function( x, y, settings ){

    this.animSheet = new ig.AnimationSheet( 'path.png', this.myImage.width/12, this.myImage.height/11  );

    this.parent( x, y, settings );

}
Page 1 of 1
« first « previous next › last »