Reference
Every component, asset type and script module in the engine.
- A component gives a node a capability:
sprite,body3d,bone2d. - An asset type is a resource a component names:
mesh,tileset. - A script module is a set of functions a script calls:
http,physics3d. - A value type is a value a script does maths with:
balaur::Vec2,balaur::Quat.
Components
2D
| component | properties | what it gives a node |
|---|---|---|
body2d | 17 | A 2D rigid body simulated by rapier in the xy plane. |
bone2d | 4 | Makes the node a 2D bone. |
boolean2d | 1 | Draws the node as its 2D children combined by op. |
camera2d | 15 | The orthographic camera a flat scene is drawn from. |
character2d | 12 | A 2D character controller. |
collider2d | 41 | The node's 2D collision shape, chosen by kind. |
joint2d | 18 | Joins this node's body to body. |
light2d | 5 | A 2D light at the node's position. |
modifier2d | 16 | Poses 2D bones toward target after the clip runs. |
occluder2d | 2 | The outline the node blocks 2D light with. |
polygon | 5 | A filled, textured 2D polygon from the mesh asset's points and triangles. |
shape2d | 21 | An untextured 2D primitive at the node. |
softbody2d | 56 | A deformable 2D body. |
sprite | 13 | A textured 2D quad at the node, sized by pixels_per_unit. |
text2d | 19 | A block of text drawn in the 2D pass, pixels_per_unit font pixels per world unit. |
tile_collision | 17 | Collision for the node's tilemap cells. |
tilemap | 8 | A grid of tiles from one tileset asset, centred on the node. |
touch_button | 9 | An on-screen button that presses an action while a finger is on it. |
touch_stick | 11 | An on-screen stick that drives action_x and action_y from -1..1 while a thumb drags it. |
transform | 4 | The node's position, rotation_euler, scale and skew in its parent's space. |
3D
| component | properties | what it gives a node |
|---|---|---|
body3d | 18 | A 3D rigid body simulated by rapier. |
bone3d | 4 | Makes the node a 3D bone. |
boolean3d | 1 | Draws the node as its children combined by op: union, difference or intersection. |
camera3d | 14 | The perspective camera the scene is drawn from. |
character3d | 12 | A 3D character controller. |
collider3d | 39 | The node's 3D collision shape, chosen by kind. |
environment | 21 | The scene's atmosphere. |
joint3d | 18 | Joins this node's body to body. |
light3d | 8 | A 3D light placed and aimed by the node. |
mesh | 6 | 3D geometry from the mesh asset in source, drawn at the node. |
modifier3d | 16 | Poses bone3d nodes toward target after the clip runs. |
reflection_probe | 5 | A box the room around it was captured inside. |
shape3d | 14 | An untextured 3D primitive at the node, tinted by color. |
softbody3d | 60 | A deformable 3D body. |
text3d | 22 | A block of text drawn in the 3D pass on a quad, pixels_per_unit font pixels per world unit. |
vehicle3d | 2 | Makes the node's body3d a raycast vehicle chassis. |
wheel3d | 11 | One wheel of the vehicle3d above it. |
Physics
| component | properties | what it gives a node |
|---|---|---|
ragdoll | 2 | Drives a rig's bones from the bodies that physics2d.ragdoll or physics3d.ragdoll built. |
Rendering
| component | properties | what it gives a node |
|---|---|---|
cloner | 9 | Draws the node's subtree many times; physics and scripts still see one node. |
material | 1 | source is the material asset this node and everything under it draw with. |
particles | 14 | A visual-only 2D emitter at the node: rate, lifetime, speed, spread and gravity. |
Animation
| component | properties | what it gives a node |
|---|---|---|
animation | 4 | Plays animation clips on the node. |
state_machine | 4 | Runs the state_machine asset in machine over the player node's clips. |
Audio
| component | properties | what it gives a node |
|---|---|---|
listener | 1 | The point positional sounds are heard from. |
sound | 10 | A sound on the node: file, volume, pitch and loop. |
UI
| component | properties | what it gives a node |
|---|---|---|
widget | 104 | A HUD element drawn every frame. |
Other
| component | properties | what it gives a node |
|---|---|---|
bindings | 1 | Reactions the node runs from a table. |
meta | 0 | Named values filed on the node, like Godot's set_meta. |
states | 2 | Named looks for the node. |
timer | 5 | Counts wait_time seconds down and emits timeout from the node. |
Asset types
| type | files | used by |
|---|---|---|
animation_clip | animations/ | animation.library |
bone_map | animations/ | — |
heightfield | terrain/ | collider2d.heightfield, collider3d.heightfield |
material | materials/ | material.source, mesh.material, shape2d.material, shape3d.material, sprite.material, tilemap.material |
mesh | models/ | collider2d.mesh, collider3d.mesh, mesh.source, occluder2d.mesh, polygon.mesh, shape2d.mesh, softbody2d.mesh, softbody3d.mesh |
path2d | paths/ | — |
path3d | paths/ | — |
skeleton_profile | animations/ | — |
sprite_sheet | sheets/ | sprite.sheet |
state_machine | animations/ | state_machine.machine |
texture | textures/ | mesh.texture, particles.texture, polygon.texture, shape2d.texture, sprite.texture |
tileset | tilesets/ | tilemap.tileset |
voxels | terrain/ | collider2d.voxels, collider3d.voxels |
widget_theme | themes/ | widget.theme |
Script modules
| module | functions | what it is for |
|---|---|---|
animation | 20 | Clip playback on a node's animation component: play, pause, seek and query. |
apple | 18 | Apple services beyond platform.*: Game Center identity, purchases, notifications. |
assets | 11 | Asset definitions by reference. |
audio | 19 | Sound playback. |
debugger | 9 | Breakpoints, pausing a script and resuming it. |
encoding | 2 | Bytes to base64 text and back. |
engine | 27 | The running app. |
events | 6 | Named events between scripts. |
export | 6 | Exports the project being edited. |
fs | 9 | Files on disk, project-relative unless the path is absolute. |
gamend | 19 | The Gamend backend: session, REST API and realtime socket. |
geometry2d | 10 | Polygons on the plane as lists of [x, y] points in outline order. |
geometry3d | 6 | Mesh operations. |
hash | 2 | SHA-256 content hashes of files and strings. |
http | 1 | HTTP requests off the frame: method, headers, body, timeout and save_to options. |
import | 7 | Imports a .glb or .gltf model, an .aseprite sprite, or a .tmx or .ldtk level into the project being edited, with the importers balaur import runs. |
input | 47 | One frame of input. |
json | 2 | JSON text to and from script values. |
log | 7 | The info, warn and error levels a script writes at, and the buffer behind them. |
math | 24 | Deterministic float maths backed by pure-Rust libm. |
multiplayer | 14 | Host, join and play a rollback match. |
node | 56 | What every node has: name, path, transform, children, components and script. |
physics | 14 | What spans both physics worlds: pausing, sleeping, tuning and clearing. |
physics2d | 55 | The 2D rigid-body world. |
physics3d | 77 | The 3D rigid-body world. |
platform | 11 | Store services every platform shares: sign-in, achievements, leaderboards, cloud saves. |
project | 13 | The projects this machine has opened, the templates a new one starts from, and the folder picker the OS provides. |
regex | 6 | Regular expressions, the regex-lite dialect: no look-around or back-references. |
release | 5 | Which build of the engine this is, what the channels are publishing, and replacing this install with another. |
render | 54 | What a frame is made of. |
replay | 17 | Records what a running game is fed and plays it back. |
rng | 5 | The engine's one deterministic PCG32 stream. |
rollback | 2 | Rollback netcode from a script's side. |
save | 6 | Save games: a table in, a table out, stored per user. |
scene | 22 | The node tree. |
script | 19 | Loads other scripts, inspects what they declare and calls into them. |
settings | 11 | Every setting the engine, its plugins and the game declare, by path. |
skeleton | 3 | Bones under a rig node: their rest pose and the order a skin numbers joints in. |
strings | 6 | Localization: one strings/<locale>.toml per language, keys to strings. |
task | 3 | Waiting inside an async handler. |
toml | 3 | TOML text to and from script tables, the format of scene files, asset definitions and component properties. |
ui | 68 | Immediate-mode UI redrawn from a script's draw_ui every frame. |
web | 7 | The page a browser build runs in; off the web every query answers nil. |
websocket | 3 | A long-lived socket for text or binary frames. |
window | 8 | The OS window and the display under it. |
Value types
| type | functions | constants |
|---|---|---|
balaur::Color | 5 | 0 |
balaur::IVec2 | 39 | 9 |
balaur::IVec3 | 38 | 11 |
balaur::Quat | 37 | 2 |
balaur::Transform2d | 15 | 3 |
balaur::Transform3d | 18 | 3 |
balaur::Vec2 | 77 | 12 |
balaur::Vec3 | 85 | 14 |
balaur::Vec4 | 71 | 16 |