Documentation Index
Fetch the complete documentation index at: https://mintlify.com/danielitoCode/Spatial/llms.txt
Use this file to discover all available pages before exploring further.
Element is an @Immutable object that provides three 3D primitive composables for use inside a Scene content block. Each function registers a mesh in the scene graph for the current recomposition; no side-effects occur outside of an active Scene. The public surface is exported from the root com.elitec.spatial_compose package and delegates to the internal core.Element implementation, which maps each primitive to a PrimitiveShape enum value before submitting it to the renderer.
Import
Element.Cube
modifier.position before the transform chain is applied.
Element.Sphere
Modifier3D.size to control the diameter uniformly, or supply per-axis values to produce an ellipsoid.
Element.Plane
Modifier3D.size to control width and depth, and rotateX / rotateZ to tilt it.
Parameters
All three primitives share the same single parameter.3D transform chain controlling position, rotation, and size in world space. Defaults to
Modifier3D.Default, which places the element at the origin with no rotation and a uniform scale of 1 metre on each axis. Chain .size(), .position(), .rotateX/Y/Z(), and .scale() calls to position and orient the element.Full Example
Element.Cube, Element.Sphere, and Element.Plane are composable functions — they must be called inside a Scene content block (or another composable that itself runs inside a Scene). Calling them outside a Scene will throw a runtime error because no SceneContentScope is present.