Closed muoji closed 10 years ago
That will break tweening animations that use scale.
It'd be better to add a scaleX, scaleY properties, and a setter scale(x,y) that scales both identically or independelty.
If p.scale is defined, we have to fall back to that to avoid breaking every bodies code.
Had a look at the code. Not a trivial amount of work if we want to keep things backwards compatible.
I reckon it is better to bit the bullet now.
@muoji if you want this change to be applied, make a pull request with all necesary changes as @mpkorstanje said. Don't forget to add some test runs to prove your enhancement. Thanks.
Currently it is only possible to scale a sprite globally, but looking at the code shows it is easy to add an option to have different values for the scale on X and Y.
A basic way of implementing this would be to replace the line 363 of
quintus_sprites.js
by: