API

Interface BoxData

CreateBox — procedural box mesh matching Babylon.js MeshBuilder.CreateBox()

Generates a unit box (size=1, extends from -0.5 to 0.5) with:

  • 24 vertices (4 per face × 6 faces)
  • 36 indices (2 triangles per face × 6 faces)
  • Per-face normals (axis-aligned)

Face order matches Babylon exactly: +Z, -Z, +X, -X, +Y, -Y

interface BoxData {
    indexCount: number;
    indices: Uint32Array;
    normals: Float32Array;
    positions: Float32Array;
    uvs: Float32Array;
    vertexCount: number;
}
Index
indexCount: number
indices: Uint32Array
normals: Float32Array
positions: Float32Array
uvs: Float32Array
vertexCount: number