Constructs a new Renderer instance
Renderer settings
Element ID or HTMLElement to insert the canvas into
Create a new Dynamic Shader controller
A Dynamic Shader is a shader that can be composed of an array of mulitple effects. Each effect can be animated or changed after creation (provided the effect is given a name).
Example:
renderer.createNode({
shader: renderer.createDynamicShader([
renderer.createEffect('radius', {
radius: 0
}, 'effect1'),
renderer.createEffect('border', {
color: 0xff00ffff,
width: 10,
}, 'effect2'),
]),
});
Create an effect to be used in a Dynamic Shader
The {name} parameter is optional but required if you want to animate the effect or change the effect's properties after creation.
See createDynamicShader for an example.
Create a new scene graph node
A node is the main graphical building block of the Renderer scene graph. It can be a container for other nodes, or it can be a leaf node that renders a solid color, gradient, image, or specific texture, using a specific shader.
To create a text node, see createTextNode.
See CoreNode for more details.
Create a new shader controller for a shader type
Create a new scene graph text node
A text node is the second graphical building block of the Renderer scene graph. It renders text using a specific text renderer that is automatically chosen based on the font requested and what type of fonts are installed into an app.
See ITextNode for more details.
Create a new texture reference
Destroy a node
The Renderer Main API
Remarks
This is the primary class used to configure and operate the Renderer.
It is used to create and destroy Nodes, as well as Texture and Shader references.
Example:
Events
fpsUpdate
fpsUpdateInterval
milliseconds with the current FPSframeTick
idle
criticalCleanup
memUsed
- The amount of memory (in bytes) used by textures before the cleanup processcriticalThreshold
- The critical threshold (in bytes)criticalCleanupFailed
memUsed
- The amount of memory (in bytes) used by textures after the cleanup processcriticalThreshold
- The critical threshold (in bytes)