1 decade ago by Jerczu
Is it possible to make entity animation scaled down but source image higher res for example I have anim where frame is 100x100 but I want it to be 50x50 on smaller screen like iPhone... How do I do that?
This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact
0.5
should work as long as all your graphics are cleanly divisible by 2.ig.system.context.scale( 0.5, 0.5 );
before drawing - but I think this will be quite slow on the iPhone. draw: function() { ig.system.context.save(); ig.system.context.scale( 0.5, 0.5 ); this.parent(); ig.system.context.restore(); }
Quote from dominic
Then use the Canvas API's scale method in your entity's drawing code:
##
draw: function() {
ig.system.context.save();
ig.system.context.scale( 0.5, 0.5 );
this.parent();
ig.system.context.restore();
}
##