Class: MeshInstance

MeshInstance

MeshInstance allows bundling a Mesh with a Material for rendering, allowing both the geometry and materials to be shared regardless of the combination of both.


new MeshInstance(mesh, material)

Parameters:
Name Type Description
mesh Mesh

The Mesh providing the geometry for this instance.

material Material

The Material to use to render the given Mesh.

Properties:
Name Type Description
castShadows boolean

Defines whether or not this MeshInstance should cast shadows.

mesh

The Mesh providing the geometry for this instance.

material

The Material to use to render the given Mesh.

mesh Mesh

The Mesh providing the geometry for this instance.

material Material

The Material to use to render the given Mesh.

skeleton Skeleton

The Skeleton that deforms the vertex positions.

skeletonMatrices Array | Texture2D

The skeleton matrices of the current skeleton pose.

morphPose MorphPose

The MorphPose defining the weights for each morph target.

lodRangeStart number

The minimum distance to render this MeshInstance. Can be used with other MeshInstances to enable LOD support, or singly for pop-in or impostors.

lodRangeEnd number

The maximum distance to render this MeshInstance. Can be used with other MeshInstances to enable LOD support, or singly for pop-in or impostors.

Author:
  • derschmale <http://www.derschmale.com>