Represents a mesh asset. See also: RenderMeshVisual.

//@input Component.RenderMeshVisual meshComponent
//@input Asset.RenderMesh mesh
script.meshComponent.mesh = script.mesh;
interface RenderMesh {
    aabbMax: vec3;
    aabbMin: vec3;
    control: RenderObjectProvider;
    indexType: MeshIndexType;
    name: string;
    topology: MeshTopology;
    uniqueIdentifier: string;
    extractIndices(): number[];
    extractVerticesForAttribute(attributeName: string): number[];
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

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

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

    Returns number[]

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

    Parameters

    • attributeName: string

    Returns number[]

  • Returns the name of this object's type.

    Returns string

  • 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