feat: numeric scale

This commit is contained in:
cha0s 2024-08-01 14:31:18 -05:00
parent a1873c5295
commit 38d76791f7

View File

@ -99,6 +99,13 @@ export default class Sprite extends Component {
get scale() {
return this.$$scale;
}
set scale(scale) {
if ('number' === typeof scale) {
scale = {x: scale, y: scale};
}
this.scaleX = scale.x;
this.scaleY = scale.y;
}
get scaleX() {
return this.$$scale.x;
}