Parts and shapes
Each part needs an id, a geometry and a material. The id never changes. Optional fields: name, parent (another part's id), local position, rotation (XYZ radians), positive scale, solid, animation, light and effects. A child moves with its parent. Blank rejects a part that is its own ancestor, and any name that points to nothing.
Shapes
kind | Parameters |
|---|---|
box | size: [x, y, z], optional bevel |
cone | radius, optional top_radius, height, segments 3–32 |
ico_sphere | radius, subdivisions 1–3 |
torus | radius, tube, segments 3–64, sides 3–12 |
loft | segments 3–32 and 2–16 rings, each with center, radius, optional phase |
prism | 3–32 XY outline points, depth, optional bevel |
Boxes, cones, spheres, tori and prisms are centred on the part's origin. Loft rings use the centres you give them. All meshes are low-poly with flat shading.
Light and effects
light adds a point light: color as linear [r, g, b], intensity and range in metres. effects adds up to eight particle effects, such as floating sparks: {"id", "count", "seed", "size", "intensity", "color", "emitter": {"kind": "sphere", "radius", "thickness"}, "motion": {"orbit", "wander", "speed"}, "pulse": {"depth", "rate"}}.