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

Method addToScene

src/three/objectsys.ts:101–108  ·  view source on GitHub ↗
(threeObject: any, entity: EntityID)

Source from the content-addressed store, hash-verified

99 };
100
101 protected addToScene(threeObject: any, entity: EntityID)
102 {
103 let o3d: Object3D = threeObject instanceof Object3D ? threeObject : (<any>threeObject).object3d;
104 assert(!o3d.userData.owningEntity, "ThreeObject is already added to scene");
105 o3d.matrixWorldAutoUpdate = false;
106 o3d.userData.owningEntity = entity;
107 this.scene.add(o3d);
108 }
109
110 protected removeFromScene(threeObject: any)
111 {

Callers 1

ThreeObjectSystemClass · 0.95

Calls 2

assertFunction · 0.85
addMethod · 0.80

Tested by

no test coverage detected