Skip to content

WebAppOptions

Defined in: app.ts:1053

optional colorSpace?: "linear" | "gamma"

Defined in: app.ts:1077

Project color space (Project Settings → Rendering). ‘linear’ renders in linear light: sRGB decode on sample, linear blending in sRGB-format intermediates, and an explicit linear→sRGB encode in the final blit. Must be declared at app creation — shaders compile against it.


optional getViewportSize?: () => object

Defined in: app.ts:1054

object

height: number

width: number


optional plugins?: Plugin[]

Defined in: app.ts:1061


optional renderSurface?: RenderSurfaceSource

Defined in: app.ts:1060

How the host provides the render surface (WebGL2 context handle / WebGPU device + swapchain / headless default). See RenderSurfaceSource. Omitted ⇒ { kind: 'default' } (module.initRenderer resolves its own).


optional screenFit?: ScreenScalingData

Defined in: app.ts:1085

Project camera fit (Project Settings → Display). When set with a real scaleMode (≥ 0), the MAIN scene camera letterboxes this design resolution into the actual aspect regardless of any UI Canvas; omitted / scaleMode = -1 keeps the legacy behavior (Canvas fit when present, else raw orthoSize). See ScreenScaling.


optional sideModules?: SideModuleHost

Defined in: app.ts:1064

The realm’s optional-native-module acquirer; set before plugins build so SpinePlugin (and later physics) can pull from it. See App.sideModules.


optional ySortLayers?: number

Defined in: app.ts:1070

Bitmask of render layers (bits 0..31) that sort by world Y within the layer — top-down occlusion (lower on screen draws on top). Project-level setting (Project Settings → Rendering); change later via Renderer.setYSortLayers.