feat: numeric scale
This commit is contained in:
parent
a1873c5295
commit
38d76791f7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user