MCPcopy Create free account
hub / github.com/b3nten/elysiatech / update

Method update

src/three/objectsys.ts:50–66  ·  view source on GitHub ↗
(delta: number)

Source from the content-addressed store, hash-verified

48 }
49
50 override update(delta: number)
51 {
52 Instrumentor.start("ThreeObjectSystem::update");
53 for (let [entity, transformComponent] of this.world.componentIterator(Transform))
54 {
55 const matrix = Transform.calculateWorldMatrix(this.world, entity);
56 for (const o3d of this.world.componentTagIterator(entity, threeObjectTag))
57 {
58 if (o3d instanceof Object3D)
59 {
60 o3d.matrixWorld.copy(matrix);
61 o3d.matrixWorld.decompose(o3d.position, o3d.quaternion, o3d.scale);
62 }
63 }
64 }
65 Instrumentor.end("ThreeObjectSystem::update");
66 }
67
68 protected onAddThreeObject = (world: World, entity: EntityID, threeObject: Component) =>
69 {

Callers

nothing calls this directly

Calls 5

startMethod · 0.80
calculateWorldMatrixMethod · 0.80
copyMethod · 0.80
endMethod · 0.80
componentIteratorMethod · 0.45

Tested by

no test coverage detected