The canvas element to render to. If not specified, one will be created if render.element
has been specified.
The 2d rendering context from the render.canvas
element.
A back-reference to the Matter.Render
module.
Optional
currentA reference to the element where the canvas is to be inserted (if render.canvas
has not been specified)
null
A reference to the Matter.Engine
instance to be used.
The mouse to render if render.options.showMousePosition
is enabled.
null
The configuration options of the renderer.
The sprite texture cache.
Generated using TypeDoc
A
Bounds
object that specifies the drawing view region. Rendering will be automatically transformed and scaled to fit within the canvas size (render.options.width
andrender.options.height
). This allows for creating views that can pan or zoom around the scene. You must also setrender.options.hasBounds
totrue
to enable bounded rendering.