* Remove object from scene and entity object3D map.
(type)
| 154 | * Remove object from scene and entity object3D map. |
| 155 | */ |
| 156 | removeObject3D (type) { |
| 157 | var obj = this.getObject3D(type); |
| 158 | if (!obj) { |
| 159 | warn('Tried to remove `Object3D` of type:', type, 'which was not defined.'); |
| 160 | return; |
| 161 | } |
| 162 | this.object3D.remove(obj); |
| 163 | delete this.object3DMap[type]; |
| 164 | this.emit('object3dremove', {type: type}); |
| 165 | } |
| 166 | |
| 167 | /** |
| 168 | * Gets or creates an object3D of a given type. |
no test coverage detected