Skip to content

Core

Every scene is built from these: placement, surfaces, lights, reflection probes, cameras, process modes and the scene-wide environment.

transform

Position, rotation (Euler degrees) and scale relative to the parent entity.

Field Type Description Values
position number[3] Position in meters relative to parent; +Y is up
rotation number[3] Euler angles in degrees [pitch(X), yaw(Y), roll(Z)]
scale number[3] Scale factor per axis
entity_update {"entity": "Crate", "components": {"transform": {}}}
self.transform.position          -- read or write any field

mesh

Renders a mesh with a simple physically based material.

Field Type Description Values
mesh string Primitive (cube, sphere, plane, cylinder, cone, quad, capsule, torus) or "asset:<path>" (.obj/.glb/.gltf)
color color Base color — hex string "#rrggbb[aa]" or [r,g,b(,a)] in 0..1
metallic number 0 = dielectric, 1 = metal 0 .. 1
roughness number 0 = mirror, 1 = matte 0.02 .. 1
emissive color Emitted light color; alpha is strength — hex string "#rrggbb[aa]" or [r,g,b(,a)] in 0..1
texture string Optional albedo texture path (png/jpg), relative to project
visible boolean Whether the mesh is drawn
billboard boolean Always face the camera (useful for 2D sprites)
material string Material asset path (*.mat.json); when set it overrides color/metallic/roughness/emissive/texture
unlit boolean Flat color/texture without lighting (2D, UI, stylized)
shading string pbr = physically based, toon = cel bands + crisp highlights, unlit = flat, water = animated waves (use on a large plane; color = deep water tint) pbr toon unlit water
normalMap string Normal map (png), project-relative; adds surface detail
ormMap string Occlusion/roughness/metallic map (R/G/B, glTF convention)
emissiveMap string Emission mask/color map, multiplied with emissive
normalStrength number Normal map strength 0 .. 4
tiling number Texture repeats (per meter when triplanar) 0.01 .. 1000
triplanar boolean Project textures in world space: no stretching on scaled shapes
clearcoat number Glossy lacquer layer on top (car paint, varnish) 0 .. 1
subsurface number Light bleeding through (skin, leaves, wax, snow) 0 .. 1
rim number Stylized rim light along silhouettes 0 .. 4
outline number Cartoon outline width in pixels (0 = none) 0 .. 12
outlineColor color Outline color — hex string "#rrggbb[aa]" or [r,g,b(,a)] in 0..1
doubleSided boolean Render both faces (leaves, cloth, cards)
castShadows boolean Cast sun shadows
alphaCutoff number Alpha-tested cutout: texture alpha below this is cut (foliage, fences, sails); 0 = off 0 .. 1
layers integer Render layers bitmask (bit 0 = layer 1 .. bit 19 = layer 20; default 1). A camera draws the mesh when its cullMask shares a bit; a light lights it when the light's cullMask does. Name layers in game.json and set them by name with render_layers
entity_update {"entity": "Crate", "components": {"mesh": {}}}
self.mesh.mesh          -- read or write any field

light

A light source. Directional lights use the entity rotation; point/spot use position.

Field Type Description Values
kind string Light type directional point spot
color color Light color — hex string "#rrggbb[aa]" or [r,g,b(,a)] in 0..1
intensity number Brightness multiplier 0 .. 1000
range number Falloff distance in meters (point/spot) 0.01 .. 10000
spotAngle number Cone half-angle in degrees (spot) 1 .. 89
cullMask integer Render layers this light illuminates (bitmask, bit 0 = layer 1; default all 20). E.g. a rim light that only lights the hero: put the hero on layer 2 and set cullMask 2
specular number Specular highlight strength (0 = diffuse only) 0 .. 16
indirect number Contribution to world-space GI (reserved for GI probes / lightmaps) 0 .. 16
volumetric number Strength in volumetric light / god rays (environment godRays) 0 .. 16
temperature number Color temperature in Kelvin, multiplied with color (1900 candle, 2700 tungsten, 4000 fluorescent, 5500 noon, 6500 white, 9000 overcast sky); 0 = off 0 .. 40000
innerAngle number Spot: half-angle of the full-intensity inner cone in degrees (0 = automatic); smaller = softer edge 0 .. 89
negative boolean Subtract light instead of adding it (stylized darkening)
distanceFade boolean Fade the light out with distance from the camera (cheap crowds of small lights)
fadeBegin number Distance fade: meters from the camera where fading starts 0 .. 100000
fadeLength number Distance fade: meters over which the light fades out 0.01 .. 100000
attenuation string Falloff: smooth = soft artist-friendly curve that reaches 0 at range; inverse_square = physical 1/d^2 (brighter near the source, uses size), still windowed to range smooth inverse_square
size number Emitter radius in meters (inverse_square falloff peak) 0.001 .. 100
castShadows boolean Point/spot: occluders block the light (no light through walls). Rendered in the local shadow atlas, cached while nothing in range moves; see shadow_atlas_info
shadowBias number Shadow depth bias in meters: raise if lit surfaces show dark speckles (acne), lower if shadows detach from their casters (peter-panning) 0 .. 1
shadowNormalBias number Shadow offset along the surface normal in shadow-map texels (acne on surfaces at grazing angles) 0 .. 8
shadowResolution integer Shadow map slot hint in px (256 small, 1024 hero light, 2048 max); 0 = automatic from the light's size on screen
shadowMaxDistance number Camera distance (m) beyond which this light's shadow fades out (saves atlas space); 0 = no limit 0 .. 100000
shadowMode string Point light shadow projection: cube = 6 exact views; dual_paraboloid = 2 views, cheaper to update but approximate for large flat polygons cube dual_paraboloid
entity_update {"entity": "Crate", "components": {"light": {}}}
self.light.kind          -- read or write any field

reflection_probe

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"}.

Field Type Description Values
shape string Influence volume: box (rooms, corridors, streets) or sphere box sphere
size number[3] Box: influence extent in meters, centered on the entity (times its scale). Match the room
radius number Sphere: influence radius in meters (times the entity scale) 0.1 .. 10000
blendDistance number Meters inside the volume over which the probe fades into neighbors or the sky (0 = hard edge) 0 .. 1000
boxProjection boolean Parallax-correct reflections against the volume so they line up with its walls (rooms, corridors); off for open areas and distant scenery
projectionSize number[3] Box (m) that reflections are projected onto when it should differ from the influence volume: a street split into several probes projects each onto the whole street (its facades and far ends). [0, 0, 0] = the volume itself
projectionOffset number[3] Center of projectionSize's box relative to the entity (m, local axes)
intensity number Brightness of the probe's reflections and ambient light 0 .. 16
interior boolean Closed room: no sky light inside the volume. Reflections and ambient come only from the probe, and the capture lights its walls with ambientColor instead of the sky (the sky still shows through windows)
ambient string Diffuse ambient inside the volume: probe (from the capture, default), sky (the probe only adds reflections), color (ambientColor x ambientEnergy) probe sky color
ambientColor color Interior captures: the ambient light that replaces the sky's; ambient "color": the ambient inside — hex string "#rrggbb[aa]" or [r,g,b(,a)] in 0..1
ambientEnergy number Multiplies ambientColor 0 .. 100
update string When to capture: once (cached; re-captured when the probe changes or on probe_bake), on_change (whenever something in range moves or changes), realtime (every interval frames) once on_change realtime
interval integer realtime: frames between captures (1 = every frame, within the face budget)
resolution integer Cubemap face size in px: 64, 128, 256 (default) or 512; rounded to a power of two
cullMask integer Render layers the capture draws (bit i = layer i+1; 1048575 = all). Leave the player out of realtime probes
priority integer Where volumes overlap the higher priority wins (equal: the smaller volume)
captureOffset number[3] Capture point relative to the entity in meters (local axes); keep it inside the room, away from walls
maxDistance number Capture far plane in meters (0 = automatic from the volume) 0 .. 20000
entity_update {"entity": "Crate", "components": {"reflection_probe": {}}}
self.reflection_probe.shape          -- read or write any field

camera

A camera. The first primary camera is used when the game runs.

Field Type Description Values
fov number Vertical field of view in degrees 5 .. 170
nearPlane number Near clip distance 0.001 .. 100
farPlane number Far clip distance 1 .. 100000
orthographic boolean Orthographic projection (2D games)
orthoSize number Half the visible height in orthographic mode 0.01 .. 10000
primary boolean Use this camera for gameplay
aperture number Depth of field f-stop: 1.4 very shallow .. 16 deep (0 = off) 0 .. 64
focusDistance number Focus distance in meters (0 = autofocus on the frame center) 0 .. 100000
motionBlur number Motion blur shutter (0.5 = film-like 180 degrees, 0 = off) 0 .. 1
tiltShift number Tilt-shift miniature look: blur above and below a sharp band across the middle of the frame (0 = off, 1 = strong) 0 .. 1
cullMask integer Render layers this camera draws (bitmask, bit 0 = layer 1; default all 20). E.g. hide first-person arms from a security camera, or editor-only helpers from the game camera
entity_update {"entity": "Crate", "components": {"camera": {}}}
self.camera.fov          -- read or write any field

process

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.

Field Type Description Values
mode string inherit (from the parent; root default pausable) | pausable (stops while the game is paused) | when_paused (runs only while paused: pause menu logic) | always (never stops: UI, music controllers) | disabled (never runs, still drawn) inherit pausable when_paused always disabled
priority integer Behavior run order: lower runs first (ties keep scene order). Not inherited
clock string inherit | game (dt follows time_scale: slow motion) | real (ignores time_scale: menus, HUD) inherit game real
interpolation string inherit | on (motion is smoothed between ticks on screen) | off (shown exactly at tick positions: snapping things, pixel-art) inherit on off
timeScale number This entity's own clock speed (multiplied with its parents' and the game time_scale): 0.2 slows one enemy or a boss arm, 0 freezes it (a per-entity hit-stop) 0 .. 10
entity_update {"entity": "Crate", "components": {"process": {}}}
self.process.mode          -- read or write any field

environment

Scene-wide sky, sun, ambient light, fog and exposure.

Field Type Description Values
skyTop color Sky color at the zenith — hex string "#rrggbb[aa]" or [r,g,b(,a)] in 0..1
skyHorizon color Sky color at the horizon — hex string "#rrggbb[aa]" or [r,g,b(,a)] in 0..1
ground color Ambient bounce color from below — hex string "#rrggbb[aa]" or [r,g,b(,a)] in 0..1
ambient number Ambient light strength 0 .. 10
sunAzimuth number Sun compass direction in degrees (0 = +Z)
sunElevation number Sun height above horizon in degrees -90 .. 90
sunColor color Sun light color — hex string "#rrggbb[aa]" or [r,g,b(,a)] in 0..1
sunIntensity number Sun brightness 0 .. 100
fogColor color Distance fog color — hex string "#rrggbb[aa]" or [r,g,b(,a)] in 0..1
fogDensity number Exponential fog density (0 = off) 0 .. 1
exposure number Camera exposure multiplier 0.01 .. 20
autoExposure boolean Adapt exposure to scene brightness (eye adaptation)
exposureCompensation number Exposure compensation in EV stops -6 .. 6
adaptationSpeed number Auto exposure adaptation speed 0.05 .. 20
showGrid boolean Draw the editor ground grid
bloomIntensity number Glow around bright/emissive things (0 = off) 0 .. 5
bloomThreshold number Brightness where glow starts (lower = more glow) 0 .. 10
bloomClamp number Brightest (exposed) value that feeds the glow: 2-8 keeps sun glints, chrome and LED lights crisp instead of blown-out halos; 64 = effectively unlimited 0.1 .. 64
saturation number Color saturation (1 = neutral) 0 .. 2
contrast number Contrast (1 = neutral) 0.5 .. 2
vignette number Darken the image corners 0 .. 1
grain number Film grain 0 .. 1
chromaticAberration number Lens color fringing toward the frame edges 0 .. 1
look string Color grading look none warm cool teal_orange golden_hour bleach noir vivid moonlight vintage
lut string Optional .cube 3D LUT file (project-relative); when set it replaces the look (lookStrength blends it)
lookStrength number Strength of the look / LUT 0 .. 1
skyMode string gradient = two artist colors; atmosphere = physically inspired sky from the sun; hdri = a photographed .hdr panorama lights and backs the scene (set hdri) gradient atmosphere hdri
hdri string Equirectangular .hdr panorama, project-relative (skyMode hdri)
hdriRotation number Panorama rotation in degrees (line its sun up with sunAzimuth)
hdriIntensity number Panorama brightness 0 .. 20
clouds number Procedural cloud cover 0 .. 1
cloudMode string Clouds: volumetric (ray-marched, lit, shadows) or flat (cheap) volumetric flat
cloudHeight number Cloud layer base height in meters 100 .. 12000
cloudThickness number Cloud layer thickness in meters 100 .. 10000
cloudDensity number Cloud density: 0.3 wispy .. 2 stormy 0 .. 4
cloudScale number Cloud feature size (0.5 small puffs .. 3 huge banks) 0.1 .. 8
cloudSpeed number Cloud drift speed in m/s (along windDirection) 0 .. 100
stars number Stars in the night sky 0 .. 1
sunSize number Sun / moon disc size 0.1 .. 8
fogHeight number Fog pools near the ground as this grows (0 = uniform) 0 .. 2
reflections number Sky reflections / image-based lighting strength 0 .. 3
ao number Ambient occlusion (contact shadows in corners and creases) 0 .. 2
aoRadius number Ambient occlusion radius in meters 0.05 .. 5
gi number Screen-space global illumination: bounce and emissive light (0 = sky light only) 0 .. 1
giDistance number Global illumination ray length in meters 0.5 .. 50
ssr number Screen-space reflections on glossy surfaces (wet streets, floors, metal) 0 .. 1
taa boolean Temporal anti-aliasing (smooth edges, stable shimmer-free detail)
renderScale number Real-time internal resolution: 0.5-0.77 renders fewer pixels and MetalFX temporal upscaling reconstructs full resolution (faster); 1 = native. Stills and captures with samples > 1 render native. 0.33 .. 1
sharpen number Sharpening after temporal anti-aliasing 0 .. 1
shadowSoftness number Sun shadow penumbra size 0 .. 6
tonemap string HDR to display curve aces agx neutral filmic none
temperature number White balance: -1 cool .. +1 warm -1 .. 1
tint number White balance: -1 green .. +1 magenta -1 .. 1
shadowDistance number Sun shadow range in meters (0 = automatic) 0 .. 5000
godRays number Volumetric light: sun shafts through trees and windows, cones under lamps (0 = off, 1 = natural) 0 .. 8
haze number Air density for volumetric light, extinction per meter: 0.0003 clear landscape, 0.002 hazy valley, 0.01-0.03 misty alley or interior 0 .. 1
windSpeed number Wind (m/s) that carries smoke, rain, snow and particles 0 .. 60
windDirection number Direction the wind blows toward (degrees, 0 = +Z)
localShadowAtlas integer Point/spot shadow atlas size in px: 2048 (16 MB), 4096 (64 MB, default), 8192 (256 MB)
localShadowLights integer Most point/spot lights with shadows per frame (the most important on screen); the rest light without shadows. 0 = no local shadows
localShadowUpdates integer Point/spot shadow views re-rendered per frame when lights or casters move (cube light = 6, spot = 1); later updates wait a frame. Stills render all
probeBudget integer Reflection probes with a slot in the probe atlas (the most important in view first; the rest fall back to the sky). Max 32; 0 = probes off
probeUpdates integer Reflection probe cube faces captured per frame (a whole probe = 6); later captures wait a frame. Stills capture everything
environment_update {"preset": "sunset"}

Environment fields are scene settings, edited with environment_update (or keyed in sequences as environment.<field>).