Core.prototype.drawProps()

The drawProps() method draws all props given a list of coordinates.

p0 p1 p2

Specify the coordinates of the number of props as an array. The number of props specified here will be drawn in Core.prototype.middle regardless of the number set by setProps() method. A coordinate is a DOMPoint-like object with x and y properties.

{ "x": 0, "y": 0 }

Syntax

drawProps(props)

Parameters

props
An array of prop coordinates.

Return value

none

Examples

const core = new jmotion.Core("#board");
const props = [
    { "x": 12, "y": -219 },
    { "x": 5, "y": -39 },
    { "x": -67, "y": 21 },
];
core.drawProps(props);