Sets the debug render style for the given Matter Constraint.
If you are using this on a Phaser Game Object, then pass in the body property to this method, not the Game Object itself.
If you wish to skip a parameter, so it retains its current value, pass false
for it.
If you wish to reset the Constraint render colors to the defaults found in the World Debug Config, then call
this method with just the constraint
parameter provided and no others.
name | type | arguments | description |
---|---|---|---|
constraint | MatterJS.ConstraintType |
The Matter Constraint to set the render style on. |
|
lineColor | number | <optional> |
The line color. If |
lineOpacity | number | <optional> |
The line opacity, between 0 and 1. If |
lineThickness | number | <optional> |
The line thickness. If |
pinSize | number | <optional> |
If this constraint is a pin, this sets the size of the pin circle. If |
anchorColor | number | <optional> |
The color used when rendering this constraints anchors. If |
anchorSize | number | <optional> |
The size of the anchor circle, if this constraint has anchors. If |
This Matter World instance for method chaining.