MeshInstanceUniform

View source

CPU-side payload for a single mesh-instance uniform block.

Constructor


Properties


staticreadonly MorphTargetWeightVectors : number

View source

Raw std140 payload size for one mesh-instance block.

Default: 4

staticreadonly MorphTargetCount : number

View source

Maximum number of morph targets supported by the packed UBO payload.

Default: ...

staticreadonly BlockSize : number

View source

Raw std140 payload size for one mesh-instance block.

Default: ...

transform : Affine3

View source

Current world transform for the instance.

skinIndex : number

View source

Bone texture row offset for the instance skin.

Default: 0

boneCount : number

View source

Number of bones available for the instance skin.

Default: 0

morphTargetCount : number

View source

Number of morph targets exposed by the mesh.

Default: 0

Methods


static from2D ( options: MeshInstance2DOptions ) : MeshInstanceUniform

View source

Creates a mesh-instance payload from a 2D affine transform.

The 2D transform occupies the XY plane and the object’s z-index becomes the promoted affine’s Z translation so the existing MeshInstanceBlock can be reused by the 2D pipeline.

Parameters

Name Description Default
options — —

getData ( data: DataView<ArrayBufferLike> ) : void

View source

Packs the current state into the supplied block slice.

Parameters

Name Description Default
data — —