Specify the coordinates of the number of props as an array. A coordinate is a DOMPoint-like object with x and y properties.
{ "x": 0, "y": 0 }
The number of props specified here will be drawn in Core.prototype.middle regardless of the number of elements in Core.prototype.props. It processes the elements of Core.prototype.props in order and creates SVGUseElement objects (<use> tag) internally. If there are not enough elements, it will return to the beginning and use them.
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);