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, the app system registry (input, interaction, audio, tweens, rendering), asset loader, 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.

31
props
8
methods
8
events
Import
import { Application } from '@codexo/exojs'

Top-level engine instance. Owns the canvas, render backend, scene-stack controller, the app system registry (input, interaction, audio, tweens, rendering), asset loader, 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 8
capture(node: RenderNode, options: CaptureOptions): RenderTexture
destroy(): void
resize(width: number, height: number): this
screenToWorld(x: number, y: number): PointLike
setCursor(cursor: string | HTMLCanvasElement | HTMLImageElement | Texture): this
start(scene: Scene): Promise<Application>
stop(): this
update(): this
Properties 31
canvas: HTMLCanvasElement
focus: FocusManager
input: InputManager
interaction: InteractionManager
loader: Loader
options: ApplicationOptions
pauseOnHidden: boolean
random: Random
scene: SceneManager
serializers: SerializationRegistry
systems: SystemRegistry
tweens: TweenManager
activeTime: Time
audio: AudioManager
backend: RenderBackend
canvasFocused: boolean
capabilities: Capabilities
clearColor: Color
cursor: string
documentVisible: boolean
fixedTimeStep: number
frameAlpha: number
frameCount: number
frameTime: Time
height: number
pixelRatio: number
rendering: RenderingContext
sizingMode: CanvasSizingMode
startupTime: Time
status: ApplicationStatus
width: number
Events 8
onBackendLost: Signal<[]>
onBackendRestored: Signal<[]>
onCanvasFocusChange: Signal<[focused]>
onError: Signal<[error]>
onFixedFrame: Signal<[Time]>
onFrame: Signal<[Time]>
onResize: Signal<[number, number, Application]>
onVisibilityChange: Signal<[visible]>
Source