- Object Literals
- HTML Collections
- It can run a specified number of times
- It can run at specified or random times within ranges
- It can start right away (or not)
- It passes the count and total to the function
GraphicsThe Canvas is known for its dynamic drawing. This boils down the Shape class. ZIM uses the CreateJS Graphics class for custom shapes with:
- Fills and Strokes
- Lines and Curves
- Rectangles and Circles
- PolyStars and Ellipses
- Linear and Radial Gradients
- Paths from Adobe Animate
PenZIM provides a Pen class that can be manually dragged, animated and animated along paths. The Pen has a variety of types and options that can be explored in the GEN-PEN tool.
Pen(size, color, penType, damp, spread, borderColor, borderWidth, end, paper, nib, cache, ctrlKey, cropScale, undo, undoKeys, draggable, onTop, deleteable, doubleClickDelete, immediateStop, lineAlpha, lineBlendMode) Docs
ShapesZIM provides a set of shapes all that can be dragged, animated, transformed, used as masks, have blendModes applied, etc. These are: ZIM NIO site:
- Users can change the paths - like in Illustrator
- Their points can be animated
- Objects can be animated along their paths
- Text can be placed along their paths
- Objects can be dragged along their paths
- Paths can be recorded
- User-changed paths can be automatically saved
- SVG can be converted into Blobs and Squiggles
Squiggle(color, thickness, points, length, controlLength, controlType, lockControlType, showControls, lockControls, handleSize, allowToggle, move, dashed, onTop, stickColor, selectColor, selectPoints, editPoints, interactive, style, group, inherit) DocsClick the example above to try - and note that the colors are being animated.
TileThe ZIM Tile class lets you easily tile objects. With ZIM Pick, these can be randomized or sequenced. Items in the Tile can be interactive and can be animated in Sequence with the sequence parameter of animate().
Tile(obj, cols, rows, spacingH, spacingV, width, height, squeezeH, squeezeV, colSize, rowSize, align, valign, count, mirrorH, mirrorV, snapToPixel, clone) Docs
EmitterParticles can be beautiful! The ZIM Emitter class Lets you emit particles and again, with ZIM Pick, these can be randomized or sequenced. Emitter also provides a sink system to attract or repel particles. Any object can be emitted or a Shape object can be used to draw lines in a shape. There are many options some of which are explored on the Particles page.
Emitter(obj, width, height, interval, num, life, fade, shrink, decayTime, decayStart, trace, traceFadeTime, traceShiftX, traceShiftY, angle, force, gravity, wind, layers, animation, random, horizontal, vertical, sink, sinkForce, cache, events, startPaused, pool, poolMin, particles) Docs