BasicCreator
The BasicCreator object creates arms and props state list from each arm's orbit data and each props throwing data. The reason it has the word Basic in its name is because it has the following features: the number of arms is fixed at two, alternating between "catch-to-throw" and "throw-to-catch" movements, and their times are equal.
Constructor
- BasicCreator()
- Creates a new BasicCreator object.
Properties
- BasicCreator.prototype.offset
- An object with coordinates of the prop relative to the palm where the prop is on the palm.
- The object has right and left properties, where right is relative to the right palm and left is relative to the left palm.
- By default, both right and left are (0, -10).
- BasicCreator.prototype.paths
- An object with arrays of arrays of orbits for each joint.
- The object has right and left properties, where right is an array of arrays of right hand orbits and left is an array of arrays of left hand orbits. The orbit is an SVGPathElement object (<path> tag), but the transform attribute in that object has no effect, so specify it without transform.
- The inner array contains all the joint orbits for one arm's "catch-to-throw" or "throw-to-catch" movement. The outer array contains them alternately as many times as desired. Usually the ending coordinate of one orbit and the starting coordinate of the subsequent orbit are the same.
-
[ [ hand0, elbow0, ... ], [ hand1, elbow1, ... ], ... ]
- By default, both right and left draw the bottom half of the ellipse as "catch-to-throw" and the top half of the ellipse as "throw-to-catch". Both have two orbits, one for the hand and the other for the elbow.
- If you set it yourself, make sure that the joints are in order from the palm to the shoulder.
Methods
- BasicCreator.prototype.calculateOrbits()
- Calculates right and left arm movements and prop orbits based on throwing data.
- BasicCreator.prototype.getScale()
- Returns the scale that should be used for graphics.
- BasicCreator.prototype.getWidth()
- Returns the line width that should be used for graphics.