Startup.esp Documentation
The resource META-INF/startup.esp can be loaded by scrunner by adding the file name module:org.bzdev.anim2d to the scrunner command line or by adding the line
to a script This will import a number of classes:### module:org.bzdev.anim2d
-
Animation2D,AnimationLayer2D,AnimationLayer2DFactory,AnimationLayer2D.Type,AnimationPath2D,AnimationPath2DFactory,ConnectingLine2D,ConnectingLine2DFactory,GraphView,GraphViewFactory,GraphView.ZoomMode,KinematicOps2D,PlacedAnimationObject2D,PlacedObject2DFactory, andPlacedObject2DFactory.RefPointModefrom the package org.bzdev.anim2d. -
BasicSplinePath2Dfrom the package org.bzdev.geom. -
AnimatedPanelGraphicsfrom the package org.bzdev.swing.
- createAnimation. There is single argument is an
ESP object with the following properties:
- frameWidth. The value of this property is the width of the animation frame in units of points.
- frameHeight. The value of this property is the height of the animation frame in units of points.
- ticksPerSecond. The value of this property is the number of simulation ticks per second.
- ticksPerFrame. The value of this property is the number of simulation ticks until another animation frame is to be created.
- imageSpaceDistance. The value of this property is a measured distance in units of points.
- gcsDistance. The value of this property is the GCS distance in meters that imageSpaceDistance represents.
- xgcs. The value of this property is the X coordinate in GCS coordinates for a reference point (the default value is 0.0).
- ygcs. The value of this property is the Y coordinate in GCS coordinates for a reference point (the default value is 0.0).
- xf. The value of this property is the fraction of the distance along the animation frame (left = 0.0, right = 1.0) for the X coordinate of the reference point (the default value is 0.0).
- yf. The value of this property is the fraction of the distance along the animation frame (bottom = 0.0, top = 1.0) for the Y coordinate of the reference point (the default value is 0.0).
- runAnimation. This function takes four arguments:
- a2d. The animation (e.g., an animation created by calling createAnimation).
- title. The title to use for a window when a built-in viewer is used.
- da. A directory accessor (typically provided by the scrunner -d option) for a temporary directory used to hold a sequence of images that will be used by a program such as ffmpeg to create the final animation.
- tend. The time (in seconds) at which the animation ends.
For example,
import (org.bzdev.util.units.MKS); var a2d = createAnimation({ frameWidth: 800, frameHeight: 600, ticksPerSecond: 1000.0, ticksPerFrame: 40, imageSpaceDistance: 200, gcsDistance: feet(12) }); ... runAnimation(a2d, "Example", null, 30.0);