Skip to content

PrimitiveFacts beta ​

Interface of @v12-engine/client/common

ts
export interface PrimitiveFacts

A primitive of a mesh: one draw, in one material

Members ​

attributes ​

ts
attributes: string[];

What each vertex carries: POSITION, NORMAL, TEXCOORD_0, JOINTS_0...

compressed ​

ts
compressed: boolean;

Squeezed in the file (Draco), unpacked on loading

drawnAs ​

ts
drawnAs: string;

The mesh Babylon makes of it, by name: what the stage outlines for it

index ​

ts
index: number;

Which it is of its mesh's

indexBytes ​

ts
indexBytes: number;

Bytes of its indices on the graphics card

indexed ​

ts
indexed: boolean;

Indexed (the vertices shared between triangles) or not

material ​

ts
material?: number;

The index of the file's material it is drawn with; none when it has none

max ​

ts
max?: [number, number, number];

The primitive's other corner of the box around it, in its own place

min ​

ts
min?: [number, number, number];

Its corners, in its own place: before the nodes above it move it

mode ​

ts
mode: 'triangles' | 'strip' | 'fan' | 'lines' | 'points';

How its vertices make shapes: triangles almost always; strips, fans, lines or points

targets ​

ts
targets: number;

Shapes it can be blended into (morph targets)

triangles ​

ts
triangles: number;

Triangles of the primitive

vertexBytes ​

ts
vertexBytes: number;

Bytes of its vertices and indices, as they go to the graphics card

vertices ​

ts
vertices: number;

Vertices of the primitive