Advanced Mode Syntax

Patterns can be defined using a YAML based configuration input. All parameters are optional. The example below demonstrates a complete configuration using all the defaults.

siteswap: 3
startingHand: RIGHT
beatDuration: 0.28
dwellRatio: 0.8
props: [{type: ball, color: red, radius: 0.05, C: 0.9}]
dwellPath: (30)(10)
matchVelocity: false
dwellCatchScale: 0.06
dwellTossScale: 0.06
emptyCatchScale: 0.025
emptyTossScale: 0.025
armAngle: 0.1
jugglers: [{position: {x: 0, z: 0}, rotation: 0, color: grey}]
surfaces: [{position: {x: 0, y: 0, z: 0}, normal: {x: 0, y: 1, z: 0}, scale: 1, color: grey}]
drawHands: true
motionBlur: true
backgroundColor: white
Pattern

siteswap - siteswap string. Supports standard vanilla like 531, multiplex like 33[33], and synchronous like (4,6x)(6x,4). 2's are held by default, make them active by using "2A" like 42A3. Passing patterns wrap each beat in <> with each juggler pipe delimited, so <3|3> is two jugglers both running 3 ball cascade. Use P to indicate a pass, so<3P|3P> is a pass on every throw. For multiple jugglers include the index of the juggler who is the target of the pass (starting at 1), so <3P3|3|3P1> is two jugglers passing while a third runs 3 ball cascade. You can also use a shorthand for expressing passing patterns like this: <3P333|3P333>, which would be the equivalent of <3P|3P><3|3><3|3><3|3>.If you input a passing siteswap you need to specify all the juggler positions and rotations, see "Juggler Positions" below. Modify the number of spins with S, so 3S{0}3S{2} is alternating flats and doubles. You can optionally specify the club toss orientation by adding the x,y,z components of the vector representing the direction the club handle is pointing in the right hand. So 3S{2,.1,.1,1} is a toss that does 2 full rotations and is pointing slightly down and slighly inwards. Modify the dwell ratio with D, so 3D{.2}3D{.8} is a 3 ball pattern where one hand is rushing the throw (good for animating half shower patterns). Modify the catch and throw by using C and T, respectively, so 3C{P}T{C} is penguin (P) catches followed by claw (C) throws. Bounce using B and optionally specify the bounce type. If no bounce type is specified then a bounce type that will work within the timing constraints of the pattern will be selected. So 5B is a 5 ball lift bounce and 5B{HL} is a 5 ball hyperlift bounce (ie. the ball is traveling down when it is caught). Options are L for lift, HL for hyperlift, F for force, and HF for hyperforce. You can also specify the number of bounces within the braces, so 5B{2} would be a 5 ball pattern with 2 bounces. 5B{HL2} is also a valid 2 bounce pattern. You can use the standard * notation to repeat patterns symmetrically, so (4,2x)* would be the equivalent of (4,2x)(2x,4). Patterns can contain any amount of whitespace between beats, so 5 3 1 would be the same as 531.

startingHand - RIGHT/R or LEFT/L indicating which hand should start the pattern.

Timing

beatDuration - beat duration in seconds. Higher beat duration means higher throws.

dwellRatio - dwell ratio, must be between 0 and 1. Higher dwell ratio means the prop stays in the hand longer, and means shorter throws.

Props

props - array of prop definitions (you can define multiple prop definitions for a pattern). type can be "ball", "club", or "ring". color can be any HTML color name or "random". radius is the prop radius in meters (only applies to balls). C is the coefficient of restitution - basically how bouncey the prop is. Must be between 0 and 1, where 1 is 100% elastic bounces.

Hand Movement

dwellPath - customizable dwell path. Positions in the dwell path are wrapped in parentheses with the y and z components optional. Positions are in cm relative to the center of the juggler with the positive direction moving to the outside. The first position is the catch position, the last is the throw, and all points in between are passed through using a bezier cubic spline. Multiple paths are delimited by periods. So (30)(10).(10)(30) is a classic half shower hand movement where the first dwell path ((30)(10)) indicates the prop is caught 30 cm outside the center and then thrown 10 cm outside the center (ie. an inside throw). The second path ((10)(30)) indicates an outside throw.

matchVelocity - 0 or 1 indicating that the velocity of the hand should match the velocity of the prop on both catching and throwing.

dwellCatchScale dwellTossScale emptyTossScale emptyCatchScale - value (should be low) that is used to set control points for hand movement through the dwell path. Higher values indicate a more exagerated hand movement. So a high dwellCatchScale would show the hand moving a lot immediately after catching the prop, as if the prop was very heavy. A high emptyTossScale would show the hand moving a lot immediately after throwing, as if the throw had a lot of follow through.

armAngle - the angle, in radians, the arm will make with the shoulder. 0 means the elbow is pinned to the side. The higher the angle the more the elbow lifts out.

Juggler Positions

jugglers - array of juggler definitions. position is the (x,y,z) position of the juggler. rotation is the rotation, in radians, around the y axis.

Surfaces

surfaces - array of surface definitions. These can be used to define bounce juggling patterns. position is the (x,y,z) position for the center of the surface. normal is the surface's normal vector, essentially defining the direction the surface is pointing. scale is the half-width of the surface, think of it like the radius. The default is a 2-by-2 surface beneath the juggler's feet.

Animator Settings

drawHands - boolean indicating whether or not to draw hands.

motionBlur - boolean indicating whether or not draw tails behind props simulating motion blur.

backgroundColor - sets the scene background color.