API reference

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

C

classCapabilities

@codexo/exojs / core / stable

Frozen snapshot of host-environment feature support: which renderer backends are available, which input modalities are present, audio / fullscreen / vibration / OffscreenCanvas / Worker support, max touch points, and the resolved devicePixelRatio. Construction is private - the only public entry is Capabilities.ready, a lazy-cached `Promise<Capabilities>` that fires the (mostly) async probes on first access. The resolved instance is frozen and never mutates. Application.capabilities returns the same instance once `app.start()` has resolved.

21
props
0
methods
0
events
Import
import { Capabilities } from '@codexo/exojs'

Frozen snapshot of host-environment feature support: which renderer backends are available, which input modalities are present, audio / fullscreen / vibration / OffscreenCanvas / Worker support, max touch points, and the resolved devicePixelRatio.

Construction is private - the only public entry is Capabilities.ready, a lazy-cached `Promise<Capabilities>` that fires the (mostly) async probes on first access. The resolved instance is frozen and never mutates. Application.capabilities returns the same instance once `app.start()` has resolved.

Properties21
audio: boolean
deviceMemory: number
devicePixelRatio: number
The host's CSS-to-device pixel ratio, or 1 where there is no document to ask - a worker has no ratio of its own and inherits whatever its host decided the surface's backing size should be.
fullscreen: boolean
gamepad: boolean
imageBitmap: boolean
keyboard: boolean
maxTouchPoints: number
offscreenCanvas: boolean
offscreenWebgl2: boolean
Whether a WebGL2 context can actually be created on an OffscreenCanvas in this realm - probed by creating one, not inferred from the constructor being defined. The two can differ: a host may expose OffscreenCanvas and still refuse it a GPU-backed context.
pointer: boolean
touch: boolean
vibration: boolean
webgl2: boolean
webgpu: boolean
webgpuAdapter: GPUAdapter | null
webgpuArchitecture: null | string
webgpuVendor: null | string
webWorkers: boolean
ready: Promise<Capabilities>
Lazy-cached Promise that resolves to a frozen Capabilities instance. The first read kicks off the async probes (currently just the WebGPU adapter request); every subsequent read returns the same Promise. Concurrent callers share the in-flight detection - no double work. Early-warmup pattern for callers who want to overlap detection with other startup work: ts void Capabilities.ready; // fire-and-forget; starts probes now // ... unrelated bootstrap ... const caps = await Capabilities.ready; // typically already resolved
Source