Lens Scripting API
    Preparing search index...

    Class RenderMesh

    Represents a mesh asset.

    //@input Component.RenderMeshVisual meshComponent
    //@input Asset.RenderMesh mesh
    script.meshComponent.mesh = script.mesh;

    Hierarchy (View Summary)

    Index

    Properties

    aabbMax: vec3

    Returns the maximum value in each dimension of the axis-aligned bounding box containing this mesh.

    aabbMin: vec3

    Returns the minimum value in each dimension of the axis-aligned bounding box containing this mesh.

    The RenderObjectProvider for this RenderMesh, which can provide more controls depending on the mesh type. See also: FaceRenderObjectProvider

    indexType: MeshIndexType

    The index data type used by this mesh.

    name: string

    The name of the Asset in Lens Studio.

    topology: MeshTopology

    The topology type used by this mesh.

    uniqueIdentifier: string

    Methods

    • Get the bone inverse matrices on the mesh

      Returns mat4[]

    • Get the bone names on the mesh.

      Returns string[]

    • Returns a list of indices of each vertex in the RenderMesh.

      Returns number[]

    • Returns a list of values of each vertex in the RenderMesh for the specified attribute.

      Parameters

      • attributeName: string

      Returns number[]

    • 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 | Uint32Array

    • Returns the name of this object's type.

      Returns string

    • Returns a typed array containing vertex data for the specified attribute. More efficient than extractVerticesForAttribute as it uses Float32Array instead of Number[].

      Parameters

      • attributeName: string

      Returns Float32Array

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean