Class

Mesh

Mesh(geometryopt, materialopt, programopt)

A mesh

Constructor

new Mesh(geometryopt, materialopt, programopt)

Constructor
Parameters:
Name Type Attributes Description
geometry Geometry <optional>
A Geometry instance
material Material <optional>
A Material instance
program Program <optional>
A Program instance

View Source Objects/Mesh.js, line 13

Extends

Methods

draw(renderTarget)

Draw the element
Parameters:
Name Type Description
renderTarget RenderTarget Renderer who called this method
Overrides:

View Source Objects/Mesh.js, line 54

getMaterial() → {Material}

Returns a reference to the Material used by this mesh

View Source Objects/Mesh.js, line 117

A Material instance
Material

getProgram() → {Program}

Returns a reference to the program used by this mesh

View Source Objects/Mesh.js, line 126

A Program instance
Program

setGeometry(geometry) → {Mesh}

Set geometry
Parameters:
Name Type Description
geometry Geometry A Geometry instance

View Source Objects/Mesh.js, line 81

A reference to the instance
Mesh

setMaterial(material) → {Mesh}

Set material
Parameters:
Name Type Description
material Material A Material instance

View Source Objects/Mesh.js, line 94

A reference to the instance
Mesh

setProgram(program) → {Mesh}

Set program
Parameters:
Name Type Description
program Program A Program instance

View Source Objects/Mesh.js, line 106

A reference to the instance
Mesh

visit(renderTarget) → {boolean}

Visit the node and his children
Parameters:
Name Type Description
renderTarget RenderTarget Renderer who called this method
Inherited From:

View Source Objects/Drawable.js, line 23

True if visit was successful, otherwise false
boolean