diff --git a/client/index.js b/client/index.js index 8b0e73a..10fae85 100644 --- a/client/index.js +++ b/client/index.js @@ -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;