diff --git a/client/index.js b/client/index.js index c141961..0946691 100644 --- a/client/index.js +++ b/client/index.js @@ -3,14 +3,12 @@ import {EntityList} from '@avocado/entity'; import {ActionRegistry} from '@avocado/input'; import {Container, Renderer, ShapeView} from '@avocado/graphics'; import {shapeFromJSON} from '@avocado/physics'; -import {World} from '@avocado/physics/dummy'; import {StateSynchronizer} from '@avocado/state'; import {Animation} from '@avocado/timing'; const stage = new Container(); const entityList = new EntityList(); -entityList.world = new World(); const stateSynchronizer = new StateSynchronizer({ entityList, }); @@ -69,16 +67,16 @@ const messageHandle = setInterval(() => { } }, 1000 / 60); // Prediction. -let lastTime = performance.now(); -const predictionHandle = setInterval(() => { - const now = performance.now(); - const elapsed = (now - lastTime) / 1000; - lastTime = now; - if (hasSelfEntity()) { - selfEntity.inputState = actionState.toJS(); - } - entityList.tick(elapsed); -}, 1000 / 80); +// let lastTime = performance.now(); +// const predictionHandle = setInterval(() => { +// const now = performance.now(); +// const elapsed = (now - lastTime) / 1000; +// lastTime = now; +// if (hasSelfEntity()) { +// selfEntity.inputState = actionState.toJS(); +// } +// entityList.tick(elapsed); +// }, 1000 / 80); // State updates. let dirty = false; function onMessage({type, payload}) {