All of the code to use Juggling Lab at your site is in the single file JugglingLab.jar
. This archive
includes the applet class JugglingLab.class
, which is configurable to contain any or
all of the following elements: An animation view, a pattern input text field,
a pattern browser list, a siteswap generator, and a ladder diagram editor.
Also the following classes within JugglingLab.jar
can be run as command line applications:
JugglingLab.class
, which is an application version of the applet.siteswapGenerator.class
, which gives command line access to the siteswap generator.
Use no command line options for a help message (e.g.,
"java -cp JugglingLab.jar jugglinglab/generator/siteswapGenerator
").Juggling Lab recognizes six parameters within the
<applet>
tag, called config
, animprefs
, notation
, pattern
,
jmldir
, and jmlfile
. Each of these parameters is optional, and set as follows:
config
"entry=siteswap;view=jml;locale=he"
entry
– determines which notation (if any) is used in the pattern input panel shown on the left of the applet display. Values are 'none' and 'siteswap'; default value is 'siteswap'.view
– determines which type of animation view is shown on the right of the applet display. Values are 'none', 'simple', 'edit', 'selection', and 'jml'; default value is 'simple'.locale
– determines the user interface language, overriding the system default. Values are in the form 'xx_YY', where 'xx' is an ISO 639-1 two-letter language code and
'YY' is an optional ISO 3166 two-letter country code. Examples are 'en_US' (US English) and 'fr' (French). Default is the
system-supplied locale.animprefs
"slowdown=1.0;fps=10"
stereo
– determines whether to display a stereo pair of images. Values are true/false; default value is false.dbuffer
– determines if the display will be double-buffered to minimize flicker. Values are true/false; default value is true.startpaused
– causes the animator to wait for a prompt from the user to begin animation. Values are true/false; default value is false.catchsound
– determines whether catches are audible. Values are true/false; default value is false.bouncesound
– determines whether bounces off the ground are audible. Values are true/false; default value is true.fps
– sets the number of frames per second to be drawn by the animator. Values are floating point
numbers greater than 0.0; default value is 30.0.slowdown
– defines an overall time slowdown factor (e.g., slowdown=1.0 is actual speed,
slowdown=2.0 is half actual speed). Values are floating point numbers greater than 0.0; default value is 2.0.border
– defines a border (in pixels) around the animation. Values are integers greater than
or equal to 0; default value is 0.notation
pattern
parameter below. Currently recognized values are 'jml' and 'siteswap'; default is 'siteswap'.
pattern
notation
parameter above, for conversion to JML and
animation. The expected input format varies by notation; for the notations currently implemented it is:
jml
– the text string should be in standard JML format, described in the
JML documentation.
To get examples, use the "Save as HTML" feature in the application and look at the HTML generated.siteswap
– text string should be in one of two formats (the applet will auto-detect
which you're using):
"(4x,4x)"
.jmldir
jmlfile
below.jmlfile
patterns/demo.jml
.Look at the HTML files in the Juggling Lab distribution for examples of how you can use the applet within a web page.