Class model
model
Defined in: model.js.
Constructor Attributes | Constructor Name and Description |
---|---|
model()
A 3D object as a collection of meshes and materials.
|
Field Attributes | Field Name and Description |
---|---|
Number of sections that belong to the model.
|
Method Attributes | Method Name and Description |
---|---|
Adds a new section index.
|
|
clear()
Removes all section objects.
|
|
create()
Creates an entity that when 'draw' is called renders all
meshes and materials given to the model.
|
|
Gets the material at the index given.
|
|
getSectionMesh(index)
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
|
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.