Optional
appAuthored logical pixel height of the application
Optional
appAuthored logical pixel width of the application
Optional
boundsBounds margin to extend the boundary in which a Node is added as Quad.
Optional
clearRGBA encoded number of the background to use
Optional
deviceFactor 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.
Optional
deviceFactor 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.
Optional
enableInclude context call (i.e. WebGL) information in FPS updates
Font Engines
The font engines to use for text rendering. CanvasTextRenderer is supported
on all platforms. SdfTextRenderer is a more performant renderer.
When using renderEngine=CanvasCoreRenderer
you can only use CanvasTextRenderer
.
The renderEngine=WebGLCoreRenderer
supports both CanvasTextRenderer
and SdfTextRenderer
.
This setting is used to enable tree shaking of unused font engines. Please import your font engine(s) as follows:
import { CanvasTextRenderer } from '@lightning/renderer/canvas';
import { SdfTextRenderer } from '@lightning/renderer/webgl';
If both CanvasTextRenderer and SdfTextRenderer are provided, the first renderer provided will be asked first if it can render the font. If it cannot render the font, the next renderer will be asked. If no renderer can render the font, the text will not be rendered.
Note that if you have fonts available in both engines the second font engine will not be used. This is because the first font engine will always be asked first.
Optional
forceForce WebGL2
Optional
fpsInterval in milliseconds to receive FPS updates
Optional
inspectorDOM Inspector
Optional
numNumber or Image Workers to use
Optional
quadQuad buffer size in bytes
Renderer Engine
The renderer engine to use. Spawns a WebGL or Canvas renderer. WebGL is more performant and supports more features. Canvas is supported on most platforms.
Note: When using CanvasCoreRenderer you can only use CanvasTextRenderer. The WebGLCoreRenderer supports both CanvasTextRenderer and SdfTextRenderer for Text Rendering.
Optional
strictEnable strictBounds
Optional
textureTexture Memory Manager Settings
Configuration settings for RendererMain