Skip to content

Documentation / scene / AppCreationOptions

Interface: AppCreationOptions ​

Defined in: libs/scene/src/app/app.ts:86

Creation options for Application.

Provides the canvas, device backend, and optional runtime and device configuration.

Extends ​

Properties ​

canvas ​

canvas: HTMLCanvasElement

Defined in: libs/scene/src/app/app.ts:64

Target canvas element to attach the rendering device to.

Inherited from ​

AppOptions.canvas


backend ​

backend: DeviceBackend

Defined in: libs/scene/src/app/app.ts:68

Device backend implementation to use for GPU creation (e.g., WebGL/WebGPU backend).

Inherited from ​

AppOptions.backend


enableMSAA? ​

optional enableMSAA?: boolean

Defined in: libs/scene/src/app/app.ts:73

Whether to enable multi-sample anti-aliasing (MSAA) if supported by the backend. Defaults to false.

Inherited from ​

AppOptions.enableMSAA


pixelRatio? ​

optional pixelRatio?: number

Defined in: libs/scene/src/app/app.ts:77

Device pixel ratio used when creating the device. Defaults to window.devicePixelRatio or 1.

Inherited from ​

AppOptions.pixelRatio


runtimeOptions? ​

optional runtimeOptions?: object

Defined in: libs/scene/src/app/app.ts:90

Options for the runtime scripting system.

VFS? ​

optional VFS?: VFS

Virtual file system used to load scripts. Defaults to HttpFS at '.' if not provided.

scriptsRoot? ​

optional scriptsRoot?: string

Root directory for script files. Defaults to '/'.

editorMode? ​

optional editorMode?: EditorMode

Whether the application is running in editor mode. Should be true for user applications.

enabled? ​

optional enabled?: boolean

Whether the runtime scripting system is enabled. Should be true for user applications.

screen? ​

optional screen?: ScreenConfig

Screen configuration

Released under the MIT License.