refactor: splitty

This commit is contained in:
cha0s 2019-04-10 19:27:54 -05:00
parent c0c027b669
commit dff3591906

View File

@ -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.