Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts • Server Entity Scripts • Assignment Client Scripts
TheModel
API provides the ability to manipulate meshes. You can get the meshes for an entity using
Entities.getMeshes, or create a new mesh using Model.newMesh.
See also, the Graphics API.
Deprecated: This API is deprecated. Use the Graphics API instead.
Methods
Name | Return Value | Summary |
---|---|---|
appendMeshes
|
MeshProxy |
Combines multiple meshes into one. |
getVertex
|
Vec3 | boolean |
Gets the position of a vertex in a mesh. |
getVertexCount
|
number | boolean |
Gets the number of vertices in a mesh. |
meshToOBJ
|
string |
Exports meshes to an OBJ format model. |
newMesh
|
MeshProxy |
Creates a new mesh. |
transformMesh
|
MeshProxy | boolean |
Transforms the vertices in a mesh. |
Method Details
(static) appendMeshes( meshes ) → {MeshProxy}
Returns: The combined mesh. |
||||||
---|---|---|---|---|---|---|
Combines multiple meshes into one. Parameters
|
(static) getVertex( mesh, index ) → {Vec3|boolean}
Returns: The local position of the vertex relative to the mesh, if valid. false if an error.
|
|||||||||
---|---|---|---|---|---|---|---|---|---|
Gets the position of a vertex in a mesh. Parameters
|
(static) getVertexCount( mesh ) → {number|boolean}
Returns: The number of vertices in the mesh, if valid. false if an error.
|
||||||
---|---|---|---|---|---|---|
Gets the number of vertices in a mesh. Parameters
|
(static) meshToOBJ( meshes ) → {string}
Returns: The OBJ format representation of the meshes. |
||||||
---|---|---|---|---|---|---|
Exports meshes to an OBJ format model. Parameters
|
(static) newMesh( vertices, normals, faces ) → {MeshProxy}
Returns: A new mesh. |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new mesh. Parameters
|
(static) transformMesh( transform, mesh ) → {MeshProxy|boolean}
Returns: The transformed mesh, if valid. false if an error.
|
|||||||||
---|---|---|---|---|---|---|---|---|---|
Transforms the vertices in a mesh. Parameters
|