API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classApplication
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.
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.
new(appSettings: ApplicationOptions): Application 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 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 onBackendLost: Signal<[]> onBackendRestored: Signal<[]> onCanvasFocusChange: Signal<[focused]> onFrame: Signal<[Time]> onResize: Signal<[number, number, Application]> onVisibilityChange: Signal<[visible]>