Types - Entity mesh
API reference for ./io/entityMesh on @huukhanhnguyen/types — the option and result records of @huukhanhnguyen/io's Entity mesh reader/writer.
See the Guide for the package's role.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
DefinitionLookup
type
type DefinitionLookup
// = Map<string, BlockDefinition> | ReadonlyMap<string, BlockDefinition>EntityInstanceTree
type
type EntityInstanceTree
// = {
roots: EntityTreeNode[];
/** Definition id → its content, built ONCE however many placements use it. */
prototypes: Map<string, EntityTreeNode[]>;
}EntityTreeNode
type
One node of the writer-facing tree. Either a MESH GROUP (meshes non-empty, grouped by sourceKey) or a BLOCK PLACEMENT (definition + transformation, whose content lives once in EntityInstanceTree.prototypes).
type EntityTreeNode
// = {
key: string;
material?: string;
layer?: string;
/** Id of the placed BlockDefinition — instancing formats reference it. */
definition?: string;
/** Column-major 4×4 placement transform (present with `definition`). */
transformation?: number[];
meshes: MeshEntity[];
children: EntityTreeNode[];
}GltfMeshInput
type
glTF primitive: the mesh, plus skinning, morph targets and vertex colors.
type GltfMeshInput
// = TriangleMesh & { normals: number[]; uvs: number[]; groups: MeshGroup[]; uvs2?: number[]; material?: string; skinIndices?: number[]; skinWeights?: number[]; skeleton?: string; colors?: number[]; morphs?: MeshEntity["geometry"]["morphs"]; /** `Track.key` reference for this mesh's `weights` channel — see * `Mesh.weightsTrack`. */ weightsTrack?: string; }IfcMesh
type
IFC element body: the mesh, plus the layer and pset an IfcProduct carries.
type IfcMesh
// = TriangleMesh & { material?: string; layer?: string; attributes?: Record<string, unknown>; }UsdMesh
type
USD walk mesh: the mesh, plus skinning, morphs, colors and the prim id.
type UsdMesh
// = TriangleMesh & { normals: number[]; uvs: number[]; groups: MeshGroup[]; uvs2?: number[]; colors?: number[]; material?: string; skinIndices?: number[]; skinWeights?: number[]; skeleton?: string; morphs?: { name?: string; offsets: number[]; }[]; weightsTrack?: string; id?: string; }