feat: Renderable::scale

This commit is contained in:
cha0s 2019-03-25 18:55:06 -05:00
parent 3d670c6189
commit 58cebcd827

View File

@ -37,6 +37,21 @@ export class Renderable {
this.internal.rotation = rotation;
}
get scale() {
const scale = this.internal.scale || {x: 1, y: 1};
return [
scale.x,
scale.y,
];
}
set scale(scale) {
this.internal.scale = {
x: scale[0],
y: scale[1]
};
}
get visible() {
return this.internal.visible;
}