Constructor
#
new BlockCore(world, attributes, optionsopt)
Parameters:
Name |
Type |
Attributes |
Description |
world |
Matter.World
|
|
The Matter.js world object |
attributes |
object
|
|
Visual properties e.g. position, dimensions and color |
options |
Matter.IChamferableBodyDefinition
|
<optional>
|
Defines the behaviour e.g. mass, bouncyness or whether it can move |
Methods
#
draw()
Draws the matter body to the p5 canvas
#
drawVertices(vertices)
Parameters:
Name |
Type |
Description |
vertices |
Array.<Matter.Vector>
|
|