The .drft container · interface

DrftAssembly

Explained in The .drft container.

interface DrftAssembly
import type { DrftAssembly } from '@driftengine/drft';

Properties

NameTypeDescription
attributesreadonlynumberWhich optional arrays the expanded mesh carries, as a MESH's attribute bits.
surfacesreadonlyFloat32ArraySURFACE_FLOATS a surface, laid out as SURFACE says.
piecesreadonlyUint32ArrayOne kit piece a copy, by mesh ordinal.
surfaceOfreadonlyUint32ArrayOne surface a copy.
transformsreadonlyFloat32ArrayCOPY_MATRIX_FLOATS a copy, taking the piece to where the copy stands.
uvreadonlyFloat32ArrayCOPY_UV_FLOATS a copy. A coordinate is multiplied by how far the copy stretches the piece's own direction for it — |stretch ⊙ t| for the unit tangent t, the bitangent for v — so a unit box copied at 13 × 4 m with stretches of size over tile repeats its texture in metres, face by face. (1, 1, 1) twice and no offset leave a piece's coordinates as they are.