add

add engine3d entities

virtuosity.engine3d.add

Objects

Methods


Objects

material

create a material to add to visibile engine3d entities

virtuosity.engine3d.add.material


Methods

box

add a box

virtuosity.engine3d.add.box(canvas, name, x, y, z, onComplete);


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)

sphere

add a sphere

virtuosity.engine3d.add.sphere(canvas, name, x, y, z, indicies, onComplete);


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)

plane

add a plane

virtuosity.engine3d.add.plane(canvas, name, x, y, z, onComplete);


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)

light

add a light

virtuosity.engine3d.add.light(canvas, name, x, y, z, onComplete);


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)

mesh

add a mesh

virtuosity.engine3d.add.mesh(canvas, name, x, y, z, key, onComplete);


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)