Class Index | File Index

Classes


Class model

model
Defined in: model.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
model()
A 3D object as a collection of meshes and materials.
Field Summary
Field Attributes Field Name and Description
 
Number of sections that belong to the model.
Method Summary
Method Attributes Method Name and Description
 
Adds a new section index.
 
Removes all section objects.
 
Creates an entity that when 'draw' is called renders all meshes and materials given to the model.
 
Gets the material at the index given.
 
Gets the mesh at the index given.
 
setSectionMaterial(index, material)
Sets the material at the givne index
 
setSectionMesh(index, mesh)
Sets the mesh at the given index
Class Detail
model()
A 3D object as a collection of meshes and materials.
Field Detail
sectionCount
Number of sections that belong to the model.
Method Detail
addSection()
Adds a new section index.

clear()
Removes all section objects.

{entity} create()
Creates an entity that when 'draw' is called renders all meshes and materials given to the model.
Returns:
{entity}

{material} getSectionMaterial()
Gets the material at the index given.
Returns:
{material}

{mesh} getSectionMesh(index)
Gets the mesh at the index given.
Parameters:
{Number} index
Returns:
{mesh}

setSectionMaterial(index, material)
Sets the material at the givne index
Parameters:
{Number} index
{material} material
Material to set at that index.

setSectionMesh(index, mesh)
Sets the mesh at the given index
Parameters:
{Number} index
{mesh} mesh
Mesh to set at that index.

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Feb 03 2019 18:30:56 GMT-0500 (EST)