cube

Function cube 

Source
pub fn cube() -> Mesh
Expand description

Returns a unit cube mesh centered at the origin with side length 2 (from -1 to +1).

Vertex layout (per-vertex, flat Vec<f32>): [x, y, z, nx, ny, nz, u, v] (8 floats per vertex).

The cube uses 24 unique vertices (4 per face) so each face has correct normals and texture coordinates. Indices are u16 for 36 elements (6 faces × 2 tris × 3).