Model loading · interface

BlendMeshData

Explained in Importing models.

interface BlendMeshData
import type { BlendMeshData } from '@driftengine/assets';

Properties

NameTypeDescription
namereadonlystring
positionsreadonlyFloat32Array
faceOffsetsreadonlyInt32ArrayFace f owns corners faceOffsets[f] to faceOffsets[f + 1].
cornerVertsreadonlyInt32Array
cornerEdgesreadonlyInt32Array
edgeVertsreadonlyInt32Array
materialIndexreadonlyInt32Array | null
sharpFacereadonlyUint8Array | null
sharpEdgereadonlyUint8Array | null
uvsreadonlyreadonly { name: string; uv: Float32Array; }[]UV maps in the file's order, two floats per corner.
renderUvreadonlynumberWhich UV map renders when a texture names none: Blender's "active render" map.
colorsreadonlyreadonly BlendColorLayer[]
renderColorreadonlynumberThe colour attribute a material's unnamed Color Attribute node reads.
packedNormalsreadonlyInt16Array | nullCustom normals in Blender's packed form: two shorts per corner, relative to its fan.
freeNormalsreadonly{ domain: number; normals: Float32Array; } | nullCustom normals stored as plain vectors, 4.5 on, in the domain they were written to.
autoSmoothreadonlynumber | nullThe split angle a pre-4.1 file's auto smooth asked for, or null where it was off.
weightsreadonly{ offsets: Int32Array; groups: Int32Array; values: Float32Array; } | nullPer vertex, the groups it belongs to and how much: flattened (group, weight) pairs.
groupNamesreadonlyreadonly string[]