add engine3d entities
create a material to add to visibile engine3d entities
add a box
| Parameter | Type | Description |
|---|---|---|
| canvas | String | Name of the canvas to add to |
| name | String | unique name of the box |
| x | Number | x position of the box |
| y | Number | y position of the box |
| z | Number | z position of the box |
| onComplete | Function | function to run after adding the canvas (takes the newly create canvas as a parameter) |
add a sphere
| Parameter | Type | Description |
|---|---|---|
| canvas | String | Name of the canvas to add to |
| name | String | unique name of the sphere |
| x | Number | x position of the sphere |
| y | Number | y position of the sphere |
| z | Number | z position of the sphere |
| indicies | Int | Number of indicies the sphere has |
| onComplete | Function | function to run after adding the sphere (takes the newly create sphere as a parameter) |
add a plane
| Parameter | Type | Description |
|---|---|---|
| canvas | String | Name of the canvas to add to |
| name | String | unique name of the plane |
| x | Number | x position of the plane |
| y | Number | y position of the plane |
| z | Number | z position of the plane |
| onComplete | Function | function to run after adding the plane (takes the newly create plane as a parameter) |
add a light
| Parameter | Type | Description |
|---|---|---|
| canvas | String | Name of the canvas to add to |
| name | String | unique name of the light |
| x | Number | x position of the light |
| y | Number | y position of the light |
| z | Number | z position of the light |
| onComplete | Function | function to run after adding the light (takes the newly create light as a parameter) |
add a mesh
| Parameter | Type | Description |
|---|---|---|
| canvas | String | Name of the canvas to add to |
| name | String | unique name of the mesh |
| x | Number | x position of the mesh |
| y | Number | y position of the mesh |
| z | Number | z position of the mesh |
| key | String | key of the loaded mesh asset |
| onComplete | Function | function to run after adding the mesh (takes the newly create mesh as a parameter) |