
This page covers the runtime model that every AuraJS game starts from.
AuraJS looks for these top-level callbacks on aura:
aura.setup()aura.update(dt)aura.draw()aura.onResize(width, height)aura.onFocus()aura.onBlur()aura.onQuit()Notes:
setup() runs once during boot.update(dt) is the main game-step callback.draw() owns immediate-mode rendering.onResize, onFocus, and onBlur are optional lifecycle hooks.onQuit() can veto shutdown in native runtime by returning false.AuraJS is immediate-mode first.
aura.draw().aura.scene, aura.scene3d, aura.anim2d, aura.animation, aura.tween, aura.tilemap, and aura.ecs help organize state, but they do not take over the host loop.aura.scene3d is a deterministic hierarchy/helper layer. It does not replace aura.draw3d.drawMesh(...) ownership.You should expect the runtime to provide these major groups:
window, input, draw2d, audio, assets, storage, fs, math, timer, collision, collision3d, ecs, debuganim2d, animation, tween, particles, tilemap, scene, statedraw3d, camera3d, light, mesh, material, scene3d, skinnedMesh, videophysics, physics3d, terrain, navmesh, character3d, computenet, multiplayerThe current optional runtime modules are:
modules.physics = true enables aura.physicsmodules.network = true enables aura.netmodules.multiplayer = true enables aura.multiplayerIf one of these modules is disabled, AuraJS throws deterministic guidance with a reason code such as:
optional_module_physics_disabledoptional_module_net_disabledoptional_module_multiplayer_disabledThe guidance text points back to the config flag that enables the module.
AuraJS surfaces validation failures in two main ways:
{ ok: false, reasonCode: '...' } for helper-style APIsAs a game dev or agent, you should prefer handling reason codes instead of string-matching whole error messages.
aura.state is special: it is added by the CLI/runtime bootstrap layer instead of the bare host namespace installer.