BasicCreator()

The BasicCreator() constructor creates a new BasicCreator object.

When an object is created, properties are set to default values. BasicCreator.prototype.paths is set to a list of cubic Bezier curves for each joint orbit.

(-90, 10) (-90, 37) (-30, 10) (-30, 37)

A cubic Bezier curve has four coordinates: a start point, an end point, and corresponding control points. For example, in the orbit of the right hand "catch-to-throw" has (-90, 10), (-90, 37), (-30, 37), and (-30, 10). A total of 8 Bezier curves (SVGPathElement objects representing them) are set as shown in the table below.

armdirectionjointorbit overview
rightcatch-to-throwhandbottom half of large ellipse from right to left
elbowbottom half of small ellipse from right to left
throw-to-catchhandtop half of large ellipse from left to right
elbowtop half of small ellipse from left to right
leftcatch-to-throwhandbottom half of large ellipse from left to right
elbowbottom half of small ellipse from left to right
throw-to-catchhandtop half of large ellipse from right to left
elbowtop half of small ellipse from right to left

Note that these are approximate representations of ellipses, not exact ellipses.

Syntax

new BasicCreator()

Parameters

none

Examples

const creator = new jmotion.BasicCreator();

// creator = {
//     "offset": {
//         "left": { "x": 0, "y": -10 },
//         "right": { "x": 0, "y": -10 },
//     },
//     "paths": {
//         "left": [
//             [ path, path ],
//             [ path, path ],
//         ],
//         "right": [
//             [ path, path ],
//             [ path, path ],
//         ],
//     },
// }