fix: server-independent dirty checking
This commit is contained in:
parent
f87e9145c5
commit
bf05af3a0f
|
@ -45,6 +45,7 @@ stage.addChild(roomView);
|
|||
const worldTime = new WorldTime();
|
||||
let lastWorldTime = worldTime.humanReadable();
|
||||
// Synchronize state.
|
||||
let state = undefined;
|
||||
const stateSynchronizer = new StateSynchronizer({
|
||||
room,
|
||||
worldTime,
|
||||
|
@ -160,6 +161,8 @@ const predictionHandle = setInterval(() => {
|
|||
}
|
||||
// Tick synchronized.
|
||||
stateSynchronizer.tick(elapsed);
|
||||
dirty = dirty || stateSynchronizer.state !== state;
|
||||
state = stateSynchronizer.state;
|
||||
// Apply environmental lighting.
|
||||
stage.removeAllFilters();
|
||||
let intensity = 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user