RenderMesh
ClassRepresents a mesh asset.
- Available on all platforms
Index
Properties
Methods
Example
//@input Component.RenderMeshVisual meshComponent
//@input Asset.RenderMesh mesh
script.meshComponent.mesh = script.mesh;
Extends
Properties
aabbMax
readonlyaabbMax:vec3
Returns the maximum value in each dimension of the axis-aligned bounding box containing this mesh.
aabbMin
readonlyaabbMin:vec3
Returns the minimum value in each dimension of the axis-aligned bounding box containing this mesh.
control
control:
RenderObjectProvider
The RenderObjectProvider for this RenderMesh, which can provide more controls depending on the mesh type. See also: FaceRenderObjectProvider
indexType
readonlyindexType:MeshIndexType
The index data type used by this mesh.
name
name:
string
The name of the Asset in Lens Studio.
Default Value
""
Inherited from
topology
readonlytopology:MeshTopology
The topology type used by this mesh.
uniqueIdentifier
readonlyuniqueIdentifier:string
Since
Lens Scripting Version 176
Inherited from
Methods
extractBoneInverseMatrices()
extractBoneInverseMatrices():
mat4[]
Get the bone inverse matrices on the mesh
Returns
mat4[]
Since
Lens Scripting Version 278
extractBoneNames()
extractBoneNames():
string[]
Get the bone names on the mesh.
Returns
string[]
Since
Lens Scripting Version 278
getIndexBuffer()
getIndexBuffer():
Uint16Array<ArrayBufferLike> |Uint32Array<ArrayBufferLike>
Returns a variant containing either a vector of 16-bit or 32-bit unsigned integers representing the indices of the mesh, or an empty state if no indices are present.
Returns
Uint16Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>
getTypeName()
staticgetTypeName():TypeName<RenderMesh>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<RenderMesh>
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
getVertexDataForAttribute()
getVertexDataForAttribute(
attributeName):Float32Array
Returns a typed array containing vertex data for the specified attribute. More efficient than extractVerticesForAttribute as it uses Float32Array instead of Number[].
Parameters
| Parameter | Type |
|---|---|
attributeName | string |
Returns
Float32Array
Since
Lens Scripting Version 336
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean