Sets the debug render style for the given Matter Body.
If you are using this on a Phaser Game Object, such as a Matter Sprite, 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 Body render colors to the defaults found in the World Debug Config, then call
this method with just the body
parameter provided and no others.
name | type | arguments | description |
---|---|---|---|
body | MatterJS.BodyType |
The Matter Body 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 |
fillColor | number | <optional> |
The fill color. If |
fillOpacity | number | <optional> |
The fill opacity, between 0 and 1. If |
This Matter World instance for method chaining.