(delta: number)
| 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 | { |
nothing calls this directly
no test coverage detected