Skip to content

ModelAnatomy beta ​

Interface of @v12-engine/client/common

ts
export interface ModelAnatomy

What a model file is made of (modelAnatomy)

Members ​

animations ​

ts
animations: AnimationFacts[];

The animations of the file

file ​

ts
file: {
        bytes: number;
        version: string;
        generator?: string;
        extensionsUsed: string[];
        extensionsRequired: string[];
        clipsIn?: string[];
    };

The file itself: how big, which glTF, what made it, the extensions it uses and those it cannot be read without

materials ​

ts
materials: MaterialFacts[];

Its materials, textures, animations and skeletons, in the order of the file

skins ​

ts
skins: SkinFacts[];

The skeletons of the file

textures ​

ts
textures: TextureFacts[];

The textures of the file

totals ​

ts
totals: {
        nodes: number;
        meshes: number;
        primitives: number;
        vertices: number;
        triangles: number;
        materials: number;
        textures: number;
        bones: number;
        animations: number;
        morphTargets: number;
        vertexBytes: number;
        indexBytes: number;
        textureMemory: number;
    };

How much of each there is, all of it

tree ​

ts
tree: AnatomyNode[];

The scene of the file: its top nodes, each with what hangs from it

up ​

ts
up: 'y' | 'z';

Which way is up in the file, told from its shape: the skeleton's joints, or the bounds of what it draws, in the place its nodes put them (upAxisOf). z is a file made Z-up, that ModelDef.up: 'z' stands upright