refactor: stage takes camera
This commit is contained in:
parent
74924f97ea
commit
bb9b033603
|
@ -81,9 +81,7 @@ room.on('entityAdded', (entity) => {
|
|||
entity.addTrait(type);
|
||||
}
|
||||
const {camera} = entity;
|
||||
camera.on('realPositionChanged', () => {
|
||||
roomView.position = Vector.scale(selfEntity.camera.realOffset, -1);
|
||||
});
|
||||
stage.camera = camera;
|
||||
// Avoid the initial 'lerp.
|
||||
camera.realPosition = camera.position;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user