To use Juggling Lab in your page, you only need a single executable from the Juggling Lab
distribution, called JugglingLab.jar. This archive
includes two applet classes usable within a web page:
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. This
applet requires Java 2 support within the browser, which is most reliable when users have downloaded
the Java plug-in from Sun.JugglingLabAWT.class, which runs under Java 1.1 and shows only
a 2D animator view (i.e., the pattern input and ladder diagram are unavailable, as
these are Swing-based GUI components). When using this applet, the
config and patternfile parameters below are
unused.If you are only using the JugglingLabAWT class, you can use the
JugglingLabAWTApplet.jar archive file instead of JugglingLab.jar; it leaves
out the unused classes and is therefore a shorter download when running over the network.
In addition to these applets, the following classes can be run as command line applications:
JugglingLab.class, which is an application version of the applet. Use command line
option "help" for a help message.siteswapGenerator.class, which gives command line access to the siteswap generator.
Use no command line options for a help message.In addition to these executable jar files, you must include the
JugglingLab_source.jar file on your site as well. As stated
in the Juggling Lab license, the recommended way to do this is to always include the JugglingLab_source.jar file in the same directory as the executable jar files.
When used as an applet, Juggling Lab recognizes seven parameters within the
<applet> tag. These are named config,
animprefs, notation, pattern,
jmldir, jmlfile, and uploadscript. Each of these parameters is optional,
and is set as follows:
config"entry=siteswap;view=jml"
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'.animprefs"threed=true;fps=10"
threed -- determines whether the display is a 3d solid perspective display, or a 2d wireframe orthographic display. Values are true/false; default value is false.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.
Has no effect in 3d display mode, which is always double-buffered. 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.notationpattern parameter below. Currently recognized values are 'jml' and 'siteswap'; default is 'siteswap'.
patternnotation 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)".jmldirjmlfile below. For example, http://jugglinglab.sourceforge.net/wiki_patterns/.
jmlfilepattern parameter above is ignored. If the file is a pattern list, it is
displayed in a "Patterns" tab attached to the left side of the applet. The format of this
parameter is a UNIX-like path to the pattern file, relative to either jmldir if defined, or to the HTML document containing the applet. For example, patterns/demo.jml.
uploadscripthttp://jugglinglab.sourceforge.net/cgi-bin/JL_fup.pl.
No examples in here yet.
Look at the HTML files in the Juggling Lab distribution for examples of how you can use the applet within a web page.