material

create a material to add to visibile engine3d entities

virtuosity.engine3d.add.material

Classes

Methods


Classes

MaterialBasic

engine3d material that can be added to multiple meshes and dynamically changed



Parameter Type Description
canvas String Name of the canvas to add to
name String unique name of the material
onComplete Function function to run after adding the image (takes the newly create image as a parameter)

MaterialMetallic

engine3d material that can be added to multiple meshes and dynamically changed



Parameter Type Description
canvas String Name of the canvas to add to
name String unique name of the material
onComplete Function function to run after adding the image (takes the newly create image as a parameter)

MaterialGlossy

engine3d material that can be added to multiple meshes and dynamically changed



Parameter Type Description
canvas String Name of the canvas to add to
name String unique name of the material
onComplete Function function to run after adding the image (takes the newly create image as a parameter)

MaterialCanvas

engine3d material using a 2d canvas, that can be added to multiple meshes and dynamically changed



Parameter Type Description
canvas String Name of the canvas to add to
name String unique name of the material
targetCanvas DOM Canvas 2d canvas target to render from
onComplete Function function to run after adding the image (takes the newly create image as a parameter)


Methods

basic

add basic material

virtuosity.engine3d.add.material.basic(canvas, name, onComplete);


Parameter Type Description
canvas String Name of the canvas to add to
name String unique name of the material
onComplete Function function to run after adding the image (takes the newly create image as a parameter)

metalic

add metalic material

virtuosity.engine3d.add.material.metalic(canvas, name, onComplete);


Parameter Type Description
canvas String Name of the canvas to add to
name String unique name of the material
onComplete Function function to run after adding the image (takes the newly create image as a parameter)

glossy

add glossy material

virtuosity.engine3d.add.material.glossy(canvas, name, onComplete);


Parameter Type Description
canvas String Name of the canvas to add to
name String unique name of the material
onComplete Function function to run after adding the image (takes the newly create image as a parameter)