
This is the external API contract for AuraJS core runtime surfaces.
Core contract covers:
This contract is for public integration and day-to-day game development.
AuraJS calls these when present:
aura.setup = async function () {}
aura.update = function (dt) {}
aura.draw = function () {}
aura.onResize = function (w, h) {}
aura.onFocus = function () {}
aura.onBlur = function () {}
aura.window.setTitle("My Game")
aura.window.setSize(1280, 720)
aura.window.setFullscreen(false)
aura.window.getSize() // { width, height }
aura.window.getPixelRatio()
aura.window.getFPS()
aura.input.isKeyDown("arrowright")
aura.input.isKeyPressed("space")
aura.input.isKeyReleased("escape")
aura.draw2d.clear(20, 20, 30)
aura.draw2d.rectFill(100, 100, 120, 80, aura.rgb(1, 0, 0))
aura.draw2d.sprite(aura.assets.image("player.png"), 320, 240)
aura.draw2d.text("Hello", 24, 24, { size: 18, color: aura.Color.WHITE })
await aura.assets.load(["player.png", "theme.ogg"])
const image = aura.assets.image("player.png")
aura.audio.play("theme.ogg", { loop: true, volume: 0.7 })
aura.storage.save("save1", { level: 3, score: 4200 })
const save = aura.storage.load("save1")
aura.math.clamp(value, 0, 1)
aura.math.lerp(a, b, t)
aura.timer.after(1.0, () => {})
aura.timer.every(0.5, () => {})
aura.collision.rectRect(ax, ay, aw, ah, bx, by, bw, bh)
aura.collision.circleCircle(ax, ay, ar, bx, by, br)
Optional namespaces are available only when enabled in config:
modules.physicsmodules.networkmodules.multiplayerIf disabled, calls return deterministic guidance errors.
This external contract is stable for current AuraJS docs. Breaking API changes are introduced only with explicit versioned updates.