Constructor
new ThreeJSObject(posopt, sizeopt, meshopt, zopt)
Create an engine object that drives a three.js mesh
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
pos | Vector2 | <optional> | World space position | |
size | Vector2 | <optional> | World space size | |
mesh | Object | <optional> | The three.js object3d to drive | |
z | number | <optional> | 0 | Mesh height above the 2D plane |
- Source
Extends
- EngineObject
Members
mesh
Properties| Type | Description |
|---|---|
| Object | The three.js object3d this object drives |
- Source
z
Properties| Type | Description |
|---|---|
| number | Mesh height above the 2D plane |
- Source
Methods
destroy(immediateopt)
Destroy this object and remove its mesh from the scene
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
immediate | boolean | <optional> |
- Source
render()
The mesh is this object's visual, the default 2D rendering is skipped
- Source
syncMesh()
Copy this object's transform to the mesh
- Source
update()
Update the object and sync the mesh to its transform
- Source