Phaser API Documentation

  Version: 
debugCallback: function

Description:

You can optionally choose to render the vertices of this Rope to a Graphics instance.

Achieve this by setting the debugCallback and the debugGraphic properties.

You can do this in a single call via the Rope.setDebug method, which will use the built-in debug function. You can also set it to your own callback. The callback will be invoked once per render and sent the following parameters:

debugCallback(src, meshLength, verts)

src is the Rope instance being debugged. meshLength is the number of mesh vertices in total. verts is an array of the translated vertex coordinates.

To disable rendering, set this property back to null.

Type:
function
Since: 3.23.0