refactor: splitty
This commit is contained in:
parent
c0c027b669
commit
dff3591906
|
@ -80,9 +80,10 @@ room.on('entityAdded', (entity) => {
|
|||
}
|
||||
const {camera} = entity;
|
||||
camera.on('realPositionChanged', () => {
|
||||
roomView.position = Vector.round(
|
||||
const offset = Vector.round(
|
||||
Vector.sub(halfVisibleSize, camera.realPosition)
|
||||
);
|
||||
roomView.position = offset;
|
||||
dirty = true;
|
||||
});
|
||||
// Avoid the initial 'lerp.
|
||||
|
|
Loading…
Reference in New Issue
Block a user