API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classApplication

@codexo/exojs / core / stable

Top-level engine instance. Owns the canvas, render backend, scene-stack controller, input + interaction managers, asset loader, tween manager, shared audio singleton, and the per-frame loop. Lifecycle: construct with options → `await app.start(scene)` → engine runs the request-animation-frame loop until `app.stop()` or `app.destroy()`. The render backend is chosen and initialized during `start()`; query Application.backend or Application.capabilities after start has resolved. The class exposes Signals for the major state-change points (Application.onResize, Application.onFrame, Application.onCanvasFocusChange, Application.onVisibilityChange, Application.onBackendLost, Application.onBackendRestored) so subscribers can react without subclassing. `pauseOnHidden = true` short-circuits the per-frame work while `document.hidden` is true (still consumes RAF callbacks but skips scene update + render). Useful for games; leave off for tools and background-active simulations.

20
props
7
methods
6
events
Import
import { Application } from '@codexo/exojs'

Top-level engine instance. Owns the canvas, render backend, scene-stack controller, input + interaction managers, asset loader, tween manager, shared audio singleton, and the per-frame loop.

Lifecycle: construct with options → `await app.start(scene)` → engine runs the request-animation-frame loop until `app.stop()` or `app.destroy()`. The render backend is chosen and initialized during `start()`; query Application.backend or Application.capabilities after start has resolved.

The class exposes Signals for the major state-change points (Application.onResize, Application.onFrame, Application.onCanvasFocusChange, Application.onVisibilityChange, Application.onBackendLost, Application.onBackendRestored) so subscribers can react without subclassing.

`pauseOnHidden = true` short-circuits the per-frame work while `document.hidden` is true (still consumes RAF callbacks but skips scene update + render). Useful for games; leave off for tools and background-active simulations.

Constructors 1
new(appSettings: ApplicationOptions): Application
Methods 7
destroy(): void
renderTo(node: RenderNode, options: RenderToOptions): RenderTexture
resize(width: number, height: number): this
setCursor(cursor: string | HTMLCanvasElement | HTMLImageElement | Texture): this
start(scene: Scene): Promise<Application>
stop(): this
update(): this
Properties 20
canvas: HTMLCanvasElement
input: InputManager
interaction: InteractionManager
loader: Loader
options: ApplicationOptions
pauseOnHidden: boolean
scene: SceneManager
tweens: TweenManager
activeTime: Time
audio: AudioManager
backend: RenderBackend
canvasFocused: boolean
capabilities: Capabilities
cursor: string
documentVisible: boolean
frameCount: number
frameTime: Time
rendering: RenderingContext
startupTime: Time
status: ApplicationStatus
Events 6
onBackendLost: Signal<[]>
onBackendRestored: Signal<[]>
onCanvasFocusChange: Signal<[focused]>
onFrame: Signal<[Time]>
onResize: Signal<[number, number, Application]>
onVisibilityChange: Signal<[visible]>
Source