Skip to main content

Module mesh

Module mesh 

Source
Expand description

Mesh primitives and transforms — the geometry half of the engine dev-kit.

A Mesh is backend-neutral: vertices in local space plus edge and face index lists. The Renderer draws edges as lines, faces as filled polygons, and vertices as points, so the same mesh works on the CPU Canvas2D backend today and a WebGPU backend later. Primitive builders (cube, grid, uv_sphere, quad, line) replace the hand-rolled geometry that JS engines (three.js/Babylon) used to provide.

Structs§

Mesh
Backend-neutral geometry: local-space vertices plus edge and face index lists.
Transform
Position / Euler-rotation / scale transform. Rotation is applied X→Y→Z.