Phaser API Documentation

  Version: 
renderGrid(grid, graphics, lineColor, lineOpacity)

Description:

Renders the Engine Broadphase Controller Grid to the given Graphics instance.

The debug renderer calls this method if the showBroadphase config value is set.

This method is used internally by the Matter Debug Renderer, but is also exposed publically should you wish to render the Grid to your own Graphics instance.

Parameters:

name type description
grid MatterJS.Grid

The Matter Grid to be rendered.

graphics Phaser.GameObjects.Graphics

The Graphics object to render to.

lineColor number

The line color.

lineOpacity number

The line opacity, between 0 and 1.

Returns:
Description:

This Matter World instance for method chaining.

Since: 3.22.0