feat: camera rotation

This commit is contained in:
cha0s 2021-03-15 05:15:29 -05:00
parent 8bb14b287f
commit dff0e02e46
2 changed files with 11 additions and 0 deletions

View File

@ -41,6 +41,14 @@ export default class Renderable extends decorate(Class) {
}
}
get pivot() {
return [this.internal.pivot.x, this.internal.pivot.y];
}
set pivot(pivot) {
[this.internal.pivot.x, this.internal.pivot.y] = pivot;
}
get position() {
return [this.internal.x, this.internal.y];
}

View File

@ -22,6 +22,9 @@ const decorate = compose(
default: [0, 0],
track: true,
}),
Property('rotation', {
default: 0,
}),
Vector.Mixin('scale', 'scaleX', 'scaleY', {
default: [1, 1],
track: true,