Primitive Shapes
The engine can generate procedural meshes for common 3D shapes without requiring external model files. Each primitive is centered at the origin with exact user-specified dimensions. Position, rotation, and scale are handled by the Transform component.
Available Shapes
Box
A six-faced cuboid with per-face normals.
Sphere
A UV sphere with outward-pointing normals.
Plane
A flat quad on the XZ plane at Y=0, with normal pointing up.
Cylinder
A capped cylinder aligned along the Y axis.
Capsule
A cylinder with hemisphere caps. Total height = height + 2 * radius.
Convenience Overloads
Every shape has a short form that uses default color (grey 0.7) and default tessellation (32 segments, 16 rings):
Usage with ECS
Primitive meshes work exactly like glTF meshes. The returned mesh ID can be shared across multiple entities:
Unlike glTF meshes, procedural primitives are not auto-centered or auto-scaled. They are generated at the exact dimensions you specify, centered at the origin.