CalmGenerator

The CalmGenerator object creates arms and props state list from each arm's orbit data and each props throwing data. 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

CalmGenerator()
Creates a new CalmGenerator object.

Properties

CalmGenerator.prototype.offset
An object with coordinates of the prop relative to the hand where the prop is on the hand.
The object has right and left properties, where right is relative to the right hand and left is relative to the left hand.
right = (0, -10)
By default, both right and left are (0, -10).
CalmGenerator.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 arm orbits and left is an array of arrays of left arm orbits. The orbit is an SVGPathElement object (<path> tag), but the transform attribute in that object has no effect, so specify it without transform.
elbow hand
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 hand to the shoulder.
CalmGenerator.prototype.resolution
The resolution used when calculateOrbits() is called. The default is 1, and you can specify a positive real number.
CalmGenerator.prototype.scale (read-only)
A positive real number representing the scale.
It is the recommended scale for displaying all coordinates obtained from the previous calculateOrbits() call, using the maximum value included in the siteswap.
max value1-56-z
scale1(max value - 1) ÷ 4
If the maximum value is 5 or less, the scale is always 1. If the maximum value is 6 or greater, for example 7, then (7 - 1) ÷ 4 = 1.5.
CalmGenerator.prototype.width (read-only)
A positive real number representing the width of the line.
It is the recommended line width when setting scale based on CalmGenerator.prototype.scale, using the maximum value included in the siteswap.
max value1-56-z
line width1(max value + 5) ÷ 10
If the maximum value is 5 or less, the width is always 1. If the maximum value is 6 or greater, for example 7, then (7 + 5) ÷ 10 = 1.2.

Methods

CalmGenerator.prototype.calculateOrbits()
Calculates right and left arm movements and prop orbits based on throwing data.