Settings for the Renderer that can be updated during runtime.

interface RendererRuntimeSettings {
    appHeight: number;
    appWidth: number;
    boundsMargin: number | [number, number, number, number];
    clearColor: number;
    deviceLogicalPixelRatio: number;
    devicePhysicalPixelRatio: number;
    fpsUpdateInterval: number;
    inspector: false | typeof Inspector;
    textureMemory: Partial<TextureMemoryManagerSettings>;
    textureProcessingTimeLimit: number;
}

Properties

appHeight: number

Authored logical pixel height of the application

1080

appWidth: number

Authored logical pixel width of the application

1920

boundsMargin: number | [number, number, number, number]

Bounds margin to extend the boundary in which a Node is added as Quad.

clearColor: number

RGBA encoded number of the background to use

0x00000000

deviceLogicalPixelRatio: number

Factor to convert app-authored logical coorindates to device logical coordinates

This value allows auto-scaling to support larger/small resolutions than the app was authored for.

If the app was authored for 1920x1080 and this value is 2, the app's canvas will be rendered at 3840x2160 logical pixels.

Likewise, if the app was authored for 1920x1080 and this value is 0.66667, the app's canvas will be rendered at 1280x720 logical pixels.

1

devicePhysicalPixelRatio: number

Factor to convert device logical coordinates to device physical coordinates

This value allows auto-scaling to support devices with different pixel densities.

This controls the number of physical pixels that are used to render each logical pixel. For example, if the device has a pixel density of 2, each logical pixel will be rendered using 2x2 physical pixels.

By default, it will be set to window.devicePixelRatio which is the pixel density of the device the app is running on reported by the browser.

window.devicePixelRatio

fpsUpdateInterval: number

Interval in milliseconds to receive FPS updates

If set to 0, FPS updates will be disabled.

0 (disabled)

inspector: false | typeof Inspector

DOM Inspector

The inspector will replicate the state of the Nodes created in the renderer and allow inspection of the state of the nodes.

textureMemory: Partial<TextureMemoryManagerSettings>

Texture Memory Manager Settings

textureProcessingTimeLimit: number

Texture Processing Limit (in milliseconds)

The maximum amount of time the renderer is allowed to process textures in a single frame. If the processing time exceeds this limit, the renderer will skip processing the remaining textures and continue rendering the frame.

10