Components¶
Every component is a plain struct with a reflected field table. The same table drives JSON scene files, the JSON Schema agents read (component_schema), the editor's property grid and Wander access (self.light.intensity). There are 47 components plus the scene-wide environment.
Set them with entity_create / entity_update (component objects are merged field by field), from the editor's Details panel, or from Wander. Unknown fields fail with a did you mean …? hint.
| Component | Group | Description |
|---|---|---|
transform |
Core | Position, rotation (Euler degrees) and scale relative to the parent entity. |
mesh |
Core | Renders a mesh with a simple physically based material. |
light |
Core | A light source. Directional lights use the entity rotation; point/spot use position. |
reflection_probe |
Core | A captured cubemap of the scene around this point. Glossy floors, metal and glass inside its influence volume reflect the room or street around them (box-projected so reflections line up with walls) instead of the sky, and take their ambient light from it. Screen-space reflections still win where they find a hit; the probe fills what is off screen; the sky fills the rest. Put one per room or street section (probe_add sizes it to the room), set interior for closed rooms so no sky light leaks in, and check it with probe_info and viewport_capture {debug_view: "reflection_probes"}. |
camera |
Core | A camera. The first primary camera is used when the game runs. |
process |
Core | How this entity and its children run while the game is paused (pause_game) or slowed down (time_scale), the order their behaviors run in, and whether their motion is smoothed between 60 Hz ticks on fast displays. A pause menu canvas runs always (UI canvases do by default); enemies stay pausable. |
environment |
Core | Scene-wide sky, sun, ambient light, fog and exposure. |
terrain |
World and effects | Large heightfield terrain (islands, beaches, mountains, canyons, dunes) with erosion, up to 8 blended material layers and wet shorelines. Rendered with continuous LOD. Use terrain_create, terrain_sculpt, terrain_paint and terrain_layers; heights are relative to the entity. |
foliage |
World and effects | GPU-instanced scattering of grass, flowers, ferns, pebbles, shells, rocks and trees over a terrain (this entity or its parent) or over scene meshes inside area. Wind-animated, deterministic. Use foliage_add with presets. |
water |
World and effects | Water surface with a spectral (FFT) ocean simulation: wind waves, choppy crests, foam, refraction, depth color and reflections. Entity y = water level. Query wave heights with water_query / Wander water_height(). |
particles |
World and effects | Particle emitter: fire, smoke, embers, sparks, rain, snow, mist, magic. Simulated by the engine and drawn as soft HDR particles. Easiest start: fx_create with a preset, then tweak fields. |
fluid |
World and effects | Volumetric fluid simulation for fire, smoke, steam and explosions (GPU 3D solver, ray-marched): fuel burns into heat and soot, hot gas rises and swirls. The box sits on the entity (bottom center). Start with fx_create (volume_fire, volume_smoke, steam_vent, explosion_volume...). |
groom |
World and effects | Strand hair and fur grown on the entity's mesh (or target's), or loaded from a .hair/.groom.json/.skygroom file. Rendered as real strands (Marschner shading, deep opacity self-shadowing, multiple scattering) and simulated on the GPU (gravity, wind, collisions). Easiest start: groom_create with a preset (hair_straight, hair_wavy, hair_curly, hair_ponytail, hair_short, fur_short, fur_long), then tweak fields. |
sprite |
2D, text and UI | A textured quad on the entity's XY plane (2D characters, props, backgrounds, pixel art, 2.5D billboards). Painter's order: sortingLayer, then order, then depth. |
sprite_anim |
2D, text and UI | Flipbook animation for the entity's sprite. clips: {"run": {"frames": "4-11", "fps": 12, "loop": true, "events": {"3": "footstep"}}}. frames: index ranges ("0-3,6"), lists ([0, 1, 2] or ["run_0", ...]) or an atlas name pattern ("run_*"); a clip may switch sheets with "texture", "columns", "rows". Frame events reach the entity's behaviors as on anim "footstep"; non-looping clips send on anim "finished". |
sprite_trail |
2D, text and UI | Afterimages behind a moving sprite: dashes, lunges, fast slashes, a swooping boss. While the entity moves faster than minSpeed it records its pose and animation frame every interval seconds; the last count poses are drawn behind the sprite in color, fading out with age. Toggle emitting from Wander around a dash. |
tilemap |
2D, text and UI | A grid of tiles in layers. Cell (0, 0) is the top-left at the entity position; cells go right (+x) and down (-y) in world space. Tile ids: 0 = empty, n = the n-th tile of the tileset (1-based, left->right, top->bottom). Edit with tilemap_paint / tilemap_from_ascii; layer data is compact text ("rle:..." or "b64z:..."). |
light2d |
2D, text and UI | A 2D light: point, spot (cone along the entity's local +Y) or global (ambient for the whole 2D scene). With any 2D light in the scene, lit sprites are dark except where light falls; normal maps add relief. |
particles2d |
2D, text and UI | Pixel-art particles on the 2D plane: rain streaks, snow, falling leaves and petals, fireflies, chimney puffs, puddle ripples. Drawn as sprites (nearest sampling, texel snapping, sorting layers) from a sheet or as solid pixel rectangles; simulated deterministically on fixed ticks. wrap = true tiles the emission box endlessly so weather fills whatever the camera shows. Create tuned ones with particles2d_create. |
parallax |
2D, text and UI | Parallax scrolling for this entity and its children (2D, orthographic cameras): they move at factor of the camera's motion. 0 = fixed to the camera (sky), 0.1-0.6 = far layers, 1 = normal, > 1 = near foreground. |
camera2d |
2D, text and UI | 2D camera behavior (put it on the camera entity): orthographic, pixel-perfect integer scaling, texel snapping, smooth target following with a dead zone, and level bounds. |
text |
2D, text and UI | Text in the world (signs, labels, damage numbers, speech bubbles). SDF-rendered: crisp at any zoom. Supports rich text: <b> <i> <u> <s> <color=#f80> <size=150%> <font=serif> <br>. |
ui_canvas |
2D, text and UI | Root of a user interface. Children with a ui component are laid out in canvas pixels (origin top-left, y down). screen = overlay scaled from referenceResolution; world = a panel in the scene. Build whole UIs with ui_create; restyle with ui_style. |
ui |
2D, text and UI | A UI element under a ui_canvas. Rect: anchor preset + position (offset, y down) + size, or stretch with margin. A layout (row/column/grid) arranges children with gap/padding/align/justify; fit sizes to content. Look comes from the theme/style sheet by widget kind and style classes, plus styleOverrides. Activating a button/toggle/slider sends Wander on ui "<name>" (and on click to the element). |
dialogue |
2D, text and UI | Runs a .dialogue script (Yarn-style: nodes, Speaker: line #tags, -> choices, <<set>>, <<if>>, <<jump>>, custom <<commands>> sent to Wander as on dialogue "name") with a built-in, restylable dialogue box. Start it with Wander start_dialogue("Node"); lint with dialogue_check; simulate with dialogue_preview. |
body2d |
2D, text and UI | Simulated 2D rigid body (Box2D) on the XY plane: dynamic = moved by gravity, forces and collisions; kinematic = moved by its transform or velocity (moving platforms, doors) and pushes dynamic bodies; static = never moves. Shape it with a collider2d on the entity or its children. It writes position x/y and the Z rotation. |
collider2d |
2D, text and UI | 2D collision shape on the XY plane. Alone it is static geometry (ground, walls); with a body2d it shapes the body; on a child without its own body2d it adds a shape to the ancestor's body. sensor makes a zone that fires on trigger_enter / on trigger_exit. oneWay makes a platform you can jump through from below. shape tilemap builds merged collision from the entity's tilemap (solid layers, per-tile slopes and one-way tiles). |
character2d |
2D, text and UI | Kinematic platformer controller on the XY plane: a capsule that slides along walls, walks up and down slopes up to maxSlope, lands on one-way platforms, with its own gravity, coyote time and jump buffering. Drive it every tick from Wander: move2d(self, axis("move").x), if pressed("jump") then jump2d(self) end, grounded2d(self). Dynamic bodies are pushed by it; sensors detect it. |
joint2d |
2D, text and UI | Connects this entity's 2D body to another body (other) or to the world. revolute = hinge/pivot (wheels, doors, ragdoll limbs), prismatic = slider, distance = rod or spring, weld = glue (breakable with breakForce), wheel = car wheel with suspension along axis, target = pulls the body to a world point or the other entity (drag, grapple). |
physics2d_world |
2D, text and UI | Scene-wide 2D physics settings (put it on one entity; defaults apply without one): gravity, solver sub-steps, sleeping, the impact event threshold and debug drawing of shapes, contacts and joints. |
audio |
Audio | Plays a sound clip from this entity: music, ambience, sound effects. Spatial by default (louder when near, panned left/right). Plays only while the game runs. Generate clips with the audio_generate tool, then set clip. One-shots are easier from Wander: play_sound("audio/hit.wav"). |
listener |
Audio | The ears of the game. Optional: by default sound is heard from the active scene camera. Put this on another entity (the player character) to hear from there. |
body |
Physics and navigation | Simulated rigid body (Jolt). dynamic = moved by forces and collisions, kinematic = moved by its transform (platforms, doors) and pushes dynamic bodies, static = never moves. Needs no collider: the shape is fitted to the mesh. Child entities with a collider (and no body of their own) become parts of this body. |
collider |
Physics and navigation | Collision shape. Alone it makes static geometry (walls, floors); with a body it shapes the body. auto fits the mesh (box/sphere/capsule/cylinder for primitives, convex hull for dynamic models, triangle mesh for static models). mesh = exact triangles (static/kinematic only); convex = hull of the mesh; heightfield = terrain. isTrigger makes a sensor zone that fires on trigger_enter / on trigger_exit instead of blocking. |
character |
Physics and navigation | Capsule character controller: walks up slopes and stairs, slides along walls, rides moving platforms, pushes dynamic bodies and is detected by triggers. Drive it from Wander every tick: walk(self, dir), jump(self), grounded(self). Units are meters (not scaled by the transform). |
joint |
Physics and navigation | Connects this entity's body to another body (target) or to the world. fixed = welded; hinge = doors, wheels, levers (axis, limits in degrees, motor); ball = chains, ragdoll shoulders; slider = pistons, drawers (axis, limits in m); distance = rope/rod (limits = min/max length); spring = bouncy link (stiffness Hz, damping). Breaks above breakForce (fires on event "joint_broken" on this entity). |
vehicle |
Physics and navigation | Drivable wheeled vehicle (Jolt vehicle constraint): suspension, tire friction curves, engine torque curve, auto/manual gearbox, FWD/RWD/AWD limited-slip differentials, anti-roll bars, downforce and drag. Needs a dynamic body on the same entity (the chassis). Child entities named wheel* are the wheels (fitted automatically when wheels is empty) and spin/steer/bounce while playing. Drive it with the inputs (throttle, brake, steer, handbrake): control=player reads the drive input actions, or set them from Wander (vehicle_drive(self, ...)). Build one with vehicle_create, tune by numbers with vehicle_tune + vehicle_test_drive, watch it with vehicle_info. |
chase_camera |
Physics and navigation | Spring-arm chase camera: follows target from behind with look-ahead into corners, collision pull-in and a field of view that widens with speed. Put it on an entity with a camera (vehicle_create chase_camera=true sets it up). Moves every tick while playing. |
physics_world |
Physics and navigation | Scene-wide physics settings. One per scene (on any entity; the physics_settings tool manages it). |
navmesh |
Physics and navigation | Navigation-mesh bake settings and the saved bake (one per scene; nav_build creates it). Walkable surfaces come from static colliders and static meshes. |
nav_agent |
Physics and navigation | Path-finding agent on the navigation mesh with local avoidance (crowds). Wander: navigate(self, target), stop_navigation(self), arrived(self); fires on event "arrived". With a character component it walks the controller; otherwise it moves the transform. |
animator |
Animation | Skeletal animation for this entity's rigged meshes (and its children's): a state machine controller or one clip. Set parameters and triggers with animator_set or Wander set_param/trigger/play_animation. |
characterIk |
Animation | Automatic foot planting (stairs, slopes, rocks), pelvis adjustment, feet aligned to the slope and locked while in contact, hand targets (two-handed grips, ledges, rails) and turn in place for a humanoid character. Put it on the entity with the animator; bones come from the skeleton's humanoid map (character_inspect shows it). |
attach |
Animation | Keeps this entity on a bone of an animated character (weapon in a hand, hat on a head, lantern on a belt). |
ik |
Animation | Two-bone IK effector: the character's hand or foot (and elbow or knee) reaches this entity's position. |
sequencer |
Animation | Plays a cinematic sequence (.sequence.json): camera shots and cuts, keyed properties, events and animations. Build sequences with the sequence_ tools. |
persist |
Game flow | Saves this entity in save games (save_game in Wander, the save_game tool): its whole state or chosen fields, plus its Wander vars. Put it on the player, doors, collectibles, quest givers; leave scenery without it. Spawned entities (spawn() at run time) need spawned: true to be recreated on load. |
carry |
Game flow | Carries this entity and its children across runtime scene changes (change_scene in Wander, scene_change): a game manager, the player, background music. Its behaviors keep running with their state. If the next scene has an entity with the same carry key, that copy is dropped, so a manager can sit in every level. Not the same as persist, which marks what a save game restores (a player usually has both). |