Hierarchy

  • IRender

Properties

bounds: IBounds

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 and render.options.height). This allows for creating views that can pan or zoom around the scene. You must also set render.options.hasBounds to true to enable bounded rendering.

canvas: HTMLCanvasElement

The canvas element to render to. If not specified, one will be created if render.element has been specified.

context: CanvasRenderingContext2D

The 2d rendering context from the render.canvas element.

controller: default

A back-reference to the Matter.Render module.

Deprecated

currentBackground?: string
element: null | HTMLElement

A reference to the element where the canvas is to be inserted (if render.canvas has not been specified)

Default

null
engine: IEngine

A reference to the Matter.Engine instance to be used.

frameRequestId: null | number
mouse: null | IMouse

The mouse to render if render.options.showMousePosition is enabled.

Default

null

The configuration options of the renderer.

textures: Record<string, HTMLImageElement>

The sprite texture cache.

Generated using TypeDoc