feat: initialFollow

This commit is contained in:
cha0s 2022-05-01 10:17:05 -05:00
parent c5dbadb66e
commit e0df54248e

View File

@ -28,6 +28,11 @@ export default (flecks) => class Followed extends Trait {
};
}
initialFollow() {
this.updatePosition();
this.onRoomSizeChanged();
}
listeners() {
return {
@ -45,8 +50,17 @@ export default (flecks) => class Followed extends Trait {
this.$$camera = json.camera;
}
this.$$camera.viewSize = this.params.viewSize;
this.updatePosition();
this.onRoomSizeChanged();
this.initialFollow();
}
methods() {
return {
initialFollow: () => {
this.initialFollow();
},
};
}
onRoomSizeChanged() {