Optional appAuthored logical pixel height of the application
1080
Optional appAuthored logical pixel width of the application
1920
Optional boundsBounds margin to extend the boundary in which a Node is added as Quad.
Optional clearRGBA encoded number of the background to use
0x00000000
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.
1
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.
window.devicePixelRatio
Optional enableInclude context call (i.e. WebGL) information in FPS updates
When enabled the number of calls to each context method over the
fpsUpdateInterval will be included in the FPS update payload's
contextSpyData property.
Enabling the context spy has a serious impact on performance so only use it when you need to extract context call information.
false (disabled)
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 fpsInterval in milliseconds to receive FPS updates
If set to 0, FPS updates will be disabled.
0 (disabled)
Optional inspectorDOM Inspector
The inspector will replicate the state of the Nodes created in the renderer and allow inspection of the state of the nodes.
Optional numNumber or Image Workers to use
On devices with multiple cores, this can be used to improve image loading as well as reduce the impact of image loading on the main thread. Set to 0 to disable image workers.
2
Optional quadQuad buffer size in bytes
4 * 1024 * 1024
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 textureTexture Memory Manager Settings
Generated using TypeDoc
Configuration settings for RendererMain