ZIM Kids Logo - pressing this will take you back to the main ZIM Kids site.
ZIM Kids - Spells for Code - Tutorials, Code Camp, Workshop, School, Lessons - Pragma, Dr Abstract's daughter sits crosslegged with hands up in a meditative pose.  She is smiling as she tells you the words next to her.
  • Here are spells to make objects and command them!
  • Most Parameters are optional but need to be in order
  • or use ZIM DUO {parameter:value, parameter:value}
  • then the order does not matter. Click EXPAND for examples!
  • Welcome, APPRENTIS. One day, all spells will make sense.
FRAME DISPLAY METHODS CONTROLS CODE WRAP META HELPER
ZIM FRAME
EXPAND Frame(scaling, width, height, color, outerColor, ready, assets, path, progress, ticker, rollover, touch, scrollTop, align, valign, canvasID, rollPerSecond, delay, canvasCheck, gpu, gpuObj, nextFrame, nextStage, allowDefault, loadFailObj, sensors, retina, mouseMoveOutside, captureMouse, shim, maxConnections, maxNum, singleTouch) EXPAND Pic(file, width, height, noCors, style, group, inherit) EXPAND Aud(file, volume, loop, loopCount, pan, offset, delay, interrupt, maxNum, style, group, inherit) EXPAND Vid(file, width, height, volume, loop, align, valign, type, style, group, inherit) EXPAND SVG(svg, width, height, bitmap, splitTypes, geometric, showControls, interactive, style, group, inherit) EXPAND Speech() EXPAND Fonts - loaded into Frame() EXPAND Keys - keyboard methods and events EXPAND Cursors - custom cursors EXPAND Tilt - device motion and orientation events EXPAND PermissionAsk(callback, permissionType, color, backgroundColor, style, group, inherit) EXPAND Colors - red, salmon, orange, green, pink, blue, brown, yellow, purple, interstellar, black, darker, licorice, dark, charcoal, grey, gray, granite, tin, pewter, silver, fog, mist, light, moon, lighter, white, faint, clear EXPAND Constants - FIT, FILL, FULL, LEFT, RIGHT, CENTER, MIDDLE, START, END, TOP, BOTTOM, OVER, UNDER, HORIZONTAL, VERTICAL, BOTH, RANDOM, RADIAL, UP, DOWN, NEXT, PREV, AUTO, DEFAULT, ALL, NONE, AVE, GET, POST, LOCALSTORAGE, SOCKET, TO, FROM, BOTH, SINE, SQUARE, TRIANGLE, SAW, ZAP, IGNORE EXPAND Globals - F, S, W, H, M
ZIM DISPLAY
-------------- BASE DISPLAY EXPAND Stage(canvasID, touch, singleTouch) EXPAND StageGL(canvasID, options, touch, singleTouch) EXPAND Container(a, b, c, d, style, group, inherit) EXPAND Shape(a, b, c, d, graphics, optimize, style, group, inherit) EXPAND Bitmap(image, width, height, left, top, scale, style, group, inherit) EXPAND SlicedBitmap(width, height, obj, slices, types, gap, scale, style, group, inherit) EXPAND Sprite(image, cols, rows, count, offsetX, offsetY, spacingX, spacingY, width, height, animations, json, id, globalControl, spriteSheet, label, frame, style, group, inherit) EXPAND MovieClip(mode, startPosition, loop, labels, style, group, inherit) EXPAND SVGContainer(svg, splitTypes, geometric, showControls, interactive, style, group, inherit) EXPAND Tag(width, height, id, frame, backgroundColor, padding, paddingH, paddingV, expand, style, group, inherit) -------------- SHADERS EXPAND Shader(width, height, fragment, uniforms, vertex, dynamic, preCall, postCall, rate, version, canvas, vertexPosition, strip, log, style, group, inherit) EXPAND ShaderOverlay(width, height, fragment, uniforms, vertex, dynamic, preCall, postCall, rate, version, canvas, vertexPosition, strip, log, style, group, inherit) EXPAND makeShader(DS, width, height, fragment, uniforms, vertex, dynamic, preCall, postCall, rate, version, canvas, vertexPosition, strip, log, tether) EXPAND Uniforms(obj) -------------- ZIM SHAPES EXPAND CustomShape(x, y, w, h) EXPAND Circle(radius, color, borderColor, borderWidth, dashed, percent, percentClose, percentArc, strokeObj, style, group, inherit) EXPAND Rectangle(width, height, color, borderColor, borderWidth, corner, dashed, strokeObj, scaleDimensions, style, group, inherit) EXPAND Triangle(a, b, c, color, borderColor, borderWidth, corner, center, adjust, dashed, strokeObj, style, group, inherit) EXPAND Poly(radius, sides, pointSize, color, borderColor, borderWidth, dashed, strokeObj, flat, style, group, inherit) EXPAND Line(length, thickness, color, startHead, endHead, dashed, strokeObj, lineType, lineOrientation, curveH, curveV, points, startLength, endLength, style, group, inherit) EXPAND Squiggle(color, thickness, points, length, controlLength, controlType, lockControlType, showControls, lockControls, handleSize, allowToggle, move, dashed, onTop, circleColor, circleBorderColor, stickColor, stickThickness, selectColor, selectPoints, editPoints, interactive, strokeObj, style, group, inherit) EXPAND Blob(color, borderColor, borderWidth, points, radius, controlLength, controlType, lockControlType, showControls, lockControls, handleSize, allowToggle, move, dashed, onTop, circleColor, circleBorderColor, stickColor, stickThickness, selectColor, selectPoints, editPoints, interactive, strokeObj, style, group, inherit) EXPAND Flare(color, borderColor, borderWidth, crossAngle, thickness, thicknessA, thicknessB, pin, startX, startY, lengths, angles, anglesA, anglesB, anglesEnd, cross, crossColors, close, dashed, strokeObj, spineColor, spineBorderWidth, spineBorderColor, spineDashed, spineStrokeObj, closeColor, closeBorderWidth, closeBorderColor, closeDashed, closeStrokeObj, style, group, inherit) EXPAND MultiFlare(flares, pins, angles, endToEnd, style, group, inherit) EXPAND FlareBox(width, height, color, borderColor, borderWidth, flares, corners, pins, style, group, inherit) -------------- COMPONENTS EXPAND Label(text, size, font, color, rollColor, shadowColor, shadowBlur, align, valign, bold, italic, variant, lineWidth, lineHeight, backing, outlineColor, outlineWidth, backgroundColor, backgroundBorderColor, backgroundBorderWidth, corner, backgroundDashed, padding, paddingH, paddingV, shiftH, shiftV, rollPersist, labelWidth, labelHeight, maxSize, splitWords, style, group, inherit) EXPAND LabelOnPath(label, path, percentAngle, percents, showPath, allowToggle, interactive, onTop, rtl, style, group, inherit) EXPAND LabelOnArc(label, size, font, color, radius, flip, spacing, letterSpacing, angles, showCircle, arcColor, arcBorderColor, arcBorderWidth, radiusSpread, rtl, style, group, inherit) EXPAND LabelLetters(label, align, valign, letterSpacing, letterSpacings, lineSpacing, lineSpacings, lineHeight, lineAlign, lineValign, cache, rtl, lineWidth, style, group, inherit) EXPAND LabelWords(label, width, size, font, color, backgroundColor, itemCache, itemRegX, itemRegY, spacingH, spacingV, wrapperType, align, valign, alignInner, valignInner, flip, reverse, bottomFull, colSize, rowSize, height, minSpreadNum, minStretchNum, percentVoidH, offsetVoidH, percentVoidV, offsetVoidV, minStretchFirst, style, group, inherit) EXPAND Emoji(code, size, monochrome, italic, backgroundColor, backgroundBorderColor, backgroundBorderWidth, corner, backing, padding, paddingH, paddingV, shiftH, shiftV, style, group, inherit) EXPAND Button(width, height, label, backgroundColor, rollBackgroundColor, downBackgroundColor, color, rollColor, downColor, borderColor, borderWidth, rollBorderColor, downBorderColor, backing, rollBacking, downBacking, icon, rollIcon, downIcon, corner, dashed, shadowColor, shadowBlur, gradient, gloss, align, valign, indent, indentH, indentV, hitPadding, autoPadding, autoPaddingH, autoPaddingV, rollPersist, toggle, toggleBackgroundColor, rollToggleBackgroundColor, downToggleBackgroundColor, toggleColor, rollToggleColor, downToggleColor, toggleBacking, rollToggleBacking, downToggleBacking, toggleIcon, rollToggleIcon, downToggleIcon, toggleEvent, wait, waitTime, waitBackgroundColor, rollWaitBackgroundColor, downWaitBackgroundColor, waitColor, rollWaitColor, downWaitColor, waitBacking, rollWaitBacking, downWaitBacking, waitIcon, rollWaitIcon, downWaitIcon, waitModal, waitEnabled, style, group, inherit) EXPAND CheckBox(size, label, startChecked, color, backgroundColor, borderColor, borderWidth, corner, margin, indicatorType, indicatorColor, tap, rtl, style, group, inherit) EXPAND RadioButtons(size, buttons, vertical, color, backgroundColor, spacing, margin, always, indicatorColor, index, rtl, selectedIndex, style, group, inherit) EXPAND Toggle(width, height, label, startToggled, backgroundColor, margin, indicatorType, indicatorColor, tap, toggleBackgroundColor, color, borderColor, borderWidth, corner, indicatorCorner, shadowColor, shadowBlur, time, labelLeft, style, group, inherit) EXPAND Tip(text, tipAlign, tipValign, margin, marginH, marginV, outside, target, delay, time, mouseClose, size, font, color, rollColor, shadowColor, shadowBlur, align, valign, lineWidth, lineHeight, backing, outlineColor, outlineWidth, backgroundColor, backgroundBorderColor, backgroundBorderWidth, corner, backgroundDashed, padding, paddingH, paddingV, shiftH, shiftV, rollPersist, labelWidth, labelHeight, maxSize, bold, italic, variant, splitWords, style, group, inherit) EXPAND Pane(content, backgroundColor, color, width, height, draggable, resets, modal, corner, backdropColor, shadowColor, shadowBlur, center, displayClose, backdropClose, backing, fadeTime, container, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, close, closeColor, autoPadding, autoPaddingH, autoPaddingV, keyboardAccess, style, group, inherit) EXPAND Panel(width, height, content, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, backgroundColor, borderColor, borderWidth, corner, close, closeColor, next, nextColor, extraButton, collapse, collapseColor, collapsed, align, shadowColor, shadowBlur, draggable, boundary, style, group, inherit) EXPAND Window(width, height, content, backgroundColor, borderColor, borderWidth, padding, corner, swipe, scrollBarActive, scrollBarDrag, scrollBarColor, scrollBarAlpha, scrollBarFade, scrollBarH, scrollBarV, slide, slideFactor, slideSnap, slideSnapDamp, interactive, shadowColor, shadowBlur, paddingH, paddingV, scrollWheel, damp, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, draggable, boundary, onTop, close, closeColor, cancelCurrentDrag, fullSize, fullSizeColor, resizeHandle, collapse, collapseColor, collapsed, optimize, resizeBoundary, resizeVisible, continuous, style, group, inherit) EXPAND Page(width, height, color, color2, angle, corner, pattern, scalePattern, cache, style, group, inherit) EXPAND Central(width, height, style, group, inherit) EXPAND Layer(width, height, titleBar, titleBarContainer, backgroundColor, rollBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, color, rollColor, selectedColor, selectedRollColor, borderWidth, borderColor, dashed, transformObject, titleBarWidth, titleBarHeight, titleBarX, titleBarY, titleBarDraggable, close, closeColor, closeBackgroundColor, closeIndicatorColor, anchor, onTop, style, group, inherit) EXPAND Waiter(container, speed, foregroundColor, backgroundColor, corner, shadowColor, shadowBlur, fadeTime, style, group, inherit) EXPAND ProgressBar(barType, foregroundColor, backgroundColor, borderColor, borderWidth, padding, label, color, labelPosition, percentage, corner, shadowColor, shadowBlur, backing, delay, fastClose, container, autoHide, width, style, group, inherit) EXPAND Indicator(width, height, num, foregroundColor, backgroundColor, borderColor, borderWidth, backdropColor, corner, indicatorType, selectedIndicatorType, fill, scale, lightScale, interactive, shadowColor, shadowBlur, index, backgroundAlpha, selectedIndex, style, group, inherit) EXPAND TextInput(width, height, placeholder, text, size, font, color, backgroundColor, borderColor, borderWidth, maxLength, password, selectionColor, selectionAlpha, cursorColor, cursorSpeed, shadowColor, shadowBlur, align, corner, padding, paddingH, paddingV, shiftH, shiftV, scrollBarActive, scrollBarDrag, scrollBarColor, scrollBarAlpha, scrollBarFade, scrollBarH, scrollBarV, readOnly, inputType, rtl, uppercase, placeholderInstant, keyboardShift, style, group, inherit) EXPAND List(width, height, list, viewNum, vertical, currentSelected, align, valign, labelAlign, labelValign, labelIndent, labelIndentH, labelIndentV, indent, spacing, backgroundColor, rollBackgroundColor, downBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, backdropColor, color, rollColor, downColor, selectedColor, selectedRollColor, borderColor, borderWidth, padding, corner, swipe, scrollBarActive, scrollBarDrag, scrollBarColor, scrollBarAlpha, scrollBarFade, scrollBarH, scrollBarV, scrollBarOverlay, slide, slideFactor, slideSnap, slideSnapDamp, shadowColor, shadowBlur, paddingH, paddingV, scrollWheel, damp, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, draggable, boundary, onTop, close, closeColor, collapse, collapseColor, collapsed, excludeCustomTap, organizer, checkBox, pulldown, clone, cancelCurrentDrag, index, noScale, pulldownToggle, optimize, keyEnabled, resizeHandle, resizeBoundary, resizeVisible, continuous, closeOthers, drop, dropTargets, dropSelf, dropCopy, dropColor, dropThickness, dropScrollSpeed, dropReticleAlpha, dropHitTest, dropFull, dropSnap, dropEnd, dropScale, dropWidth, dropHeight, selectedIndex, style, group, inherit) EXPAND Stepper(list, width, backgroundColor, borderColor, borderWidth, label, color, vertical, arrows, corner, shadowColor, shadowBlur, continuous, display, press, hold, holdDelay, holdSpeed, draggable, dragSensitivity, dragRange, stepperType, min, max, step, step2, arrows2, arrows2Scale, keyEnabled, keyArrows, rightForward, downForward, index, value, arrowColor, arrowScale, selectedIndex, currentValue, style, group, inherit) EXPAND Slider(min, max, step, button, barLength, barWidth, barColor, vertical, useTicks, tickColor, tickStep, semiTicks, tickScale, semiTickScale, accentSize, accentOffset, accentColor, accentBackgroundColor, accentDifference, sound, inside, keyArrows, keyArrowsStep, keyArrowsH, keyArrowsV, damp, value, expand, expandVertical, expandBar, expandBarVertical, useLabels, labelMargin, labelColor, range, rangeColor, rangeWidth, rangeMin, rangeMax, rangeAve, addZero, currentValue, style, group, inherit) EXPAND Selector(tile, borderColor, borderWidth, backgroundColor, corner, dashed, paddingH, paddingV, speed, diagonal, dim, multi, keyArrows, behind, resizeScale, index, liveIndex, selectedIndex, style, group, inherit); EXPAND Slicer(obj, objScale, slices, types, titleBar, remember, upload, selection, multiple, proportion, resize, style, group, inherit); EXPAND SlicerTypes(slicer, titleBar, sliceType, style, group, inherit); EXPAND Dial(min, max, step, width, backgroundColor, indicatorColor, indicatorScale, indicatorType, useTicks, innerTicks, tickColor, tickStep, semiTicks, tickScale, semiTickScale, innerCircle, innerScale, innerColor, inner2Color, accentSize, accentOffset, accentColor, accentBackgroundColor, accentDifference, sound, linear, gap, limit, keyArrows, keyArrowsStep, keyArrowsH, keyArrowsV, continuous, continuousMin, continuousMax, damp, value, useLabels, labelMargin, addZero, currentValue, style, group, inherit); EXPAND Tabs(width, height, tabs, backgroundColor, rollBackgroundColor, downBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, color, rollColor, downColor, selectedColor, selectedRollColor, vertical, spacing, currentEnabled, currentSelected, corner, base, keyEnabled, gradient, gloss, backing, rollBacking, wait, waitTime, waitBackgroundColor, rollWaitBackgroundColor, waitColor, rollWaitColor, waitModal, waitEnabled, backdropColor, align, valign, labelAlign, labelValign, labelIndent, labelIndentH, labelIndentV, indent, useTap, excludeCustomTap, index, styleLabels, keyWrap, selectedIndex, style, group, inherit) EXPAND Pad(width, cols, rows, keys, backgroundColor, rollBackgroundColor, downBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, color, rollColor, downColor, selectedColor, selectedRollColor, spacing, currentEnabled, currentSelected, corner, labelColor, gradient, gloss, backing, rollBacking, wait, waitTime, waitBackgroundColor, rollWaitBackgroundColor, waitColor, rollWaitColor, waitModal, waitEnabled, index, selectedIndex, style, group, inherit) EXPAND NumPad(advanced, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, backgroundColor, borderColor, borderWidth, corner, numberCorner, close, closeColor, collapse, collapseColor, collapsed, align, shadowColor, shadowBlur, draggable, boundary, style, group, inherit) EXPAND DPad(axis, width, backgroundColor, borderWidth, borderColor, indicatorColor, indicatorPressColor, indicatorScale, indicatorRadius, innerCircle, innerScale, activeRadius, clamp, logo, style, group, inherit) EXPAND Radial(labels, size, font, height, coreRadius, coreColor, startAngle, totalAngle, angles, flip, shiftV, icons, rollIcons, rotateIcons, iconsShiftVertical, backgroundColor, rollBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, backdropColor, color, rollColor, selectedColor, selectedRollColor, borderColor, borderWidth, gradient, gap, gapAsAngle, spacing, spacingInner, spacingOuter, currentEnabled, currentSelected, index, selectedIndex, style, group, inherit) EXPAND RadialMenu(menu, size, font, height, coreRadius, coreColor, title, titleIcon, startAngle, totalAngle, flip, shiftRadial, rotateIcons, iconsShiftRadial, backgroundColor, rollBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, backdropColor, color, rollColor, selectedColor, selectedRollColor, borderColor, borderWidth, gradient, gap, gapAsAngle, spacing, spacingInner, spacingOuter, currentEnabled, currentSelected, open, under, style, group, inherit) EXPAND ColorPicker(width, colors, cols, spacing, greyPicker, alphaPicker, startBackgroundColor, draggable, shadowColor, shadowBlur, buttonBar, circles, indicator, backgroundColor, keyArrows, container, index, selectedColor, dropperTarget, spectrumCollapse, spectrumMode, spectrumClose, spectrumOk, spectrumTitle, tolerancePicker, collapsed, selectedIndex, style, group, inherit) EXPAND EmojiPicker(width, height, emojis, monochrome, backgroundColor, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, cache, size, collapse, collapseColor, collapsed, colSize, rowSize, style, group, inherit) EXPAND TextEditor(width, color, backgroundColor, fieldColor, fieldHeight, textSize, sizeList, optionList, colorList, fontList, live, button, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, wrap, limit, scroll, placeholder, password, borderColor, borderWidth, margin, corner, shadowColor, shadowBlur, draggable, boundary, frame, fontListHeight, fontListViewNum, style, group, inherit) EXPAND Keyboard(labels, backgroundColor, color, shiftBackgroundColor, shiftHoldBackgroundColor, placeBackgroundColor, placeColor, cursorColor, shadeAlpha, borderColor, borderWidth, margin, corner, draggable, placeClose, shadowColor, shadowBlur, container, data, place, placeShiftH, placeShiftV, placeScale, special, rtl, hardKeyboard, layout, numPadScale, numPadDraggable, numPadOnly, numPadAdvanced, maxLength, numbersOnly, style, group, inherit) EXPAND Organizer(width, list, useAdd, useRemove, usePosition, autoAdd, autoRemove, autoPosition, addForward, removeForward, backgroundColor, rollBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, color, rollColor, selectedColor, selectedRollColor, spacing, corner, keyEnabled, gradient, gloss, backdropColor, style, group, inherit) EXPAND Connectors(width, height, points, node, line, linear, linearWrap, linearOrder, num, snapH, snapV, dropType, dropArray, continuous, startIndex, duplicateLine, deleteNode, dblclick, fullMove, min, max, boundary, expand, nodeRollColor, nodeRollBorderColor, nodeSelectedColor, nodeSelectedBorderColor, baseColor, baseBorderColor, baseRollover, rootLock, grandChildren, dblclickTime, steps, style, group, inherit) EXPAND Marquee(width, height, items, time, transition, speed, direction, marginLeft, marginRight, marqueeType, borderColor, borderWidth, refresh, mix, style, group, inherit) EXPAND Carousel(items, viewNum, time, spacing, backgroundColor, backing, padding, paddingH, paddingV, arrowLeft, arrowRight, arrowGap, valign, ease, swipe, remember, index, continuous, selectedIndex, style, group, inherit) EXPAND Loader(width, height, label, type, backgroundColor, rollBackgroundColor, color, rollColor, borderColor, borderWidth, corner, shadowColor, shadowBlur, hitPadding, gradient, gloss, dashed, backing, rollBacking, rollPersist, icon, rollIcon, toggle, toggleBacking, rollToggleBacking, toggleIcon, rollToggleIcon, toggleEvent, frame, multiple, accept, style, group, inherit) EXPAND TextArea(width, height, placeholder, text, size, padding, color, backgroundColor, borderColor, borderWidth, corner, shadowColor, shadowBlur, dashed, id, readOnly, spellCheck, password, inputType, wrap, maxLength, frame, expand, keyboardShift, style, group, inherit)
ZIM METHODS
-------------- BASE METHODS EXPAND obj.cache(width||x, height||y, null||width, null||height, scale, options, margin) EXPAND obj.updateCache(blendMode) EXPAND obj.uncache() EXPAND obj.on(type, listener, scope, once, data, useCapture) EXPAND obj.off(type, listener, useCapture) EXPAND obj.removeAllEventListeners(type) EXPAND obj.getBounds() EXPAND obj.setBounds(width||x||Boundary, height||y, null||width, null||height) EXPAND obj.localToGlobal(x, y) EXPAND obj.globalToLocal(x, y) EXPAND obj.localToLocal(x, y, target) EXPAND obj.clone(exact) EXPAND obj.dispose(disposing) -------------- ADDING AND REMOVING EXPAND obj.addTo(container, index, still) EXPAND obj.removeFrom(container) EXPAND obj.added(call, interval, maxTime) EXPAND obj.centerReg(container, index, add) EXPAND obj.center(container, index, add) EXPAND obj.place(id) EXPAND obj.placeReg(id) -------------- SHORT CHAINABLE EXPAND obj.pos(x, y, horizontal, vertical, container, index, add, reg, regX, regY) EXPAND obj.loc(target|x, y, container, index, add, localToLocal) EXPAND obj.mov(x, y) EXPAND obj.sca(scale, scaleY) EXPAND obj.alp(alpha) EXPAND obj.vis(visible) EXPAND obj.ble(blendMode) EXPAND obj.dye(color) EXPAND obj.hov(value, prop) EXPAND obj.rot(rotation, x, y) EXPAND obj.siz(width, height, only) EXPAND obj.ske(skewX, skewY) EXPAND obj.reg(regX, regY, still) EXPAND obj.top() EXPAND obj.bot() EXPAND obj.ord(num) EXPAND obj.cur(type) EXPAND obj.sha(color||Shadow, offsetX, offsetY, blur) EXPAND obj.dep(depth) EXPAND obj.nam(name) -------------- INTERACTIONS, EFFECTS AND PHYSICS EXPAND obj.movement(call) EXPAND obj.noMovement() EXPAND obj.tap(call, distance, time, once, dbl, dblTime, call2, call3, call4, cursor, mobileUp) EXPAND obj.noTap() EXPAND obj.hold(call, distance, time, once) EXPAND obj.noHold() EXPAND obj.change(call, once) EXPAND obj.noChange() EXPAND obj.drag(boundary, axis, overCursor, dragCursor, all, swipe, localBoundary, onTop, surround, slide, slideFactor, slideSnap, slideSnapDamp, reg, removeTweens, startBounds, rect, currentTarget, offStage, immediateBoundary, singleTouch, dropTargets, dropCopy, dropSnap, dropBack, dropEnd, dropFull, dropHitTest, dropScale, dropWidth, dropHeight) EXPAND obj.noDrag(recursive) EXPAND obj.dragBoundary(boundary) EXPAND obj.mouse() EXPAND obj.noMouse() EXPAND obj.wire(target, prop, twoWay, setSource, filter, call, input) EXPAND obj.noWire(target, prop, input) EXPAND obj.wired(source, prop, twoWay, setSource, filter, call, input) EXPAND obj.noWired() EXPAND obj.bind(id, props, extra, filter, bindObj) EXPAND obj.noBind(props, removeConnectionData, call, bindObj) EXPAND obj.transform(move, stretchX, stretchY, scale, rotate, allowToggle, visible, onTop, showStretch, showRotate, showScale, showReg, showBorder, borderColor, borderWidth, dashed, customCursors, handleSize, regSize, snapDistance, snapRotation, cache, events, ghostColor, ghostWidth, ghostDashed, ghostHidden, frame, container, minScaleX, maxScaleX, minScaleY, maxScaleY, sliceX, sliceY) EXPAND obj.gesture(move, scale, rotate, boundary, minScale, maxScale, snapRotate, localBoundary, slide, slideFactor, regControl, onTop, surround, circularBounds, rect) EXPAND obj.noGesture(move, scale, rotate) EXPAND obj.gestureBoundary(boundary, new) EXPAND obj.effect(effect, x, y, width, height) EXPAND obj.updateEffects(redoChache) EXPAND obj.noEffect(effects, cache) EXPAND obj.addPhysics(dynamic, contract, shape, friction, linear, angular, density, bounciness, maskBits, categoryBits, physics, restitution, sensor) EXPAND obj.removePhysics() -------------- HIT TESTS EXPAND obj.hitTestPoint(x, y, boundsCheck) EXPAND obj.hitTestReg(other, boundsCheck) EXPAND obj.hitTestRect(other, num, boundsCheck, inside) EXPAND obj.hitTestCircle(other, num, boundsCheck, inside) EXPAND obj.hitTestCircleRect(other, margin) EXPAND obj.hitTestCircles(other, margin) EXPAND obj.hitTestBounds(other, margin, boundsShape) EXPAND obj.hitTestPath(other, num, showPoints, returnPoints) EXPAND obj.hitTestGrid(width, height, cols, rows, x, y, offsetX, offsetY, spacingX, spacingY, local, type) -------------- ANIMATE, WIGGLE, LOOP EXPAND obj.animate(props, time, ease, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startCall, startParams, animateCall, animateParams, sequence, sequenceCall, sequenceParams, sequenceReverse, sequenceRatio, ticker, cjsProps, css, protect, override, from, set, id, events, sequenceTarget, dynamic, drag, clamp, startPaused, clean, obj, seriesWait, sequenceWait, rate, pauseOnBlur, easeAmount, easeFrequency, timeUnit, timeCheck, noAnimateCall, pathDamp) EXPAND obj.stopAnimate(ids, toEnd) EXPAND obj.pauseAnimate(state, ids) EXPAND obj.wiggle(property, baseAmount, minAmount, maxAmount, minTime, maxTime, totalTime, type, ease, integer, id, startType, ticker, wait, pauseOnBlur, endOnStart) EXPAND obj.loop(call, reverse, interval, step, start, end, immediate, complete, completeParams) -------------- GENERAL EXPAND obj.scaleTo(boundObj, percentX, percentY, type, boundsOnly, simple) EXPAND obj.fit(left, top, width, height, type) EXPAND obj.boundsToGlobal(rect, flip, inside, globalObj) EXPAND obj.resetBounds(width||boundsX, height||boundsY, null||width, null||height, margin) EXPAND obj.copyMatrix(source) EXPAND obj.duplicate(exact) EXPAND obj.expand(padding, paddingV, paddingRight, paddingBottom) EXPAND obj.setSwipe(swipe) EXPAND obj.setMask(mask, dynamic) EXPAND obj.outline(color, size, boundsOnly) EXPAND obj.blendmodes(time, basic)
ZIM CONTROLS
EXPAND STYLE and Style() EXPAND PATH EXPAND TIME EXPAND TIMECHECK EXPAND DIR EXPAND SEEDRAND EXPAND SEEDRANDCOUNT EXPAND ANIMATE EXPAND OPTIMIZE EXPAND ACTIONEVENT EXPAND DEFAULTWIRE EXPAND KEYFOCUS EXPAND POSREG EXPAND DRAGALL EXPAND MOBILE EXPAND Ticker = {} -------------- PAGES, LAYOUT, ACCESSIBILITY EXPAND Pages(pages, transition, speed, transitionTable, holder, arrowDisableColor, continuous, style, group, inherit) EXPAND Arrow(backgroundColor, rollBackgroundColor, pages, direction, type, newPage, trans, speed, style, group, inherit) EXPAND HotSpot(obj, x, y, width, height, call, callOver, callOut, local, talk) EXPAND HotSpots(spots, local, mouseDowns) EXPAND Guide(obj, vertical, pixels, hideKey, pixelKey, style, group, inherit) EXPAND Grid(obj, color, pixels, hideKey, pixelKey, allowToggle, cache, numbers, style, group, inherit) EXPAND Wrapper(items, width, spacingH, spacingV, wrapperType, align, valign, alignInner, valignInner, flip, reverse, bottomFull, colSize, rowSize, height, minSpreadNum, minStretchNum, percentVoidH, offsetVoidH, percentVoidV, offsetVoidV, minStretchFirst, style, group, inherit) EXPAND Tile(obj, cols, rows, spacingH, spacingV, unique, width, height, squeezeH, squeezeV, colSize, rowSize, align, valign, count, mirrorH, mirrorV, snapToPixel, clone, events, exact, scaleToH, scaleToV, scaleToType, backgroundColor, backgroundPadding, backgroundPaddingH, backgroundPaddingV, backing, backdropColor, backdropPadding, backdropPaddingH, backdropPaddingV, mat, style, group, inherit) EXPAND Pack(width, height, items, spacingH, spacingV, flatten, direction, lock, backgroundColor, align, valign, lastAlign, paddingH, paddingV, dragOrder, dragColor, dragThickness, dragDashed, reverse, funnel, showPacking, order, container, style, group, inherit) EXPAND Beads(path, obj, count, angle, startPercent, endPercent, percents, onTop, showControls, visible, interactive, clone, group, style, inherit) EXPAND Layout(holder, regions, lastMargin, lastMarginMin, backgroundColor, vertical, showRegions, scalingObject, hideKey, style, group, inherit) EXPAND Accessibility(appName, tabOrder, tabIndex, cycle, decimals, frame, application, alwaysHighlight, AHTime, AHColor, AHBorderWidth, AHBorderPadding, AHAlpha, AHObject, AHObjectScale) -------------- 3D EXPAND TextureActive(width, height, color, color2, angle, borderColor, borderWidth, corner, interactive, animated, backingOrbit, pattern, scalePattern, style, group, inherit) EXPAND TextureActives(actives, threejs, zimThree, renderer, scene, camera, controls, layers, near, far, ignoreList, toggleKey, color, outerColor, damp, style, group, inherit) EXPAND TextureActivesManager(stage, toggleKey, damp) -------------- MANAGERS EXPAND Manager() EXPAND ResizeManager() EXPAND TransformManager(objects, persistID) EXPAND GuideManager() EXPAND GridManager() EXPAND LayoutManager() EXPAND SelectionSet(selections) EXPAND SelectionManager(sets, multipleKey, multipleSets) EXPAND Bind(connection, bindType, master, masterFilter, couple, smartDecimals, report, setDefault) -------------- CONTROLLERS EXPAND Swipe(obj, distance, duration, isometric, overrideNoSwipe) EXPAND Swiper(swipeOn, target, property, sensitivity, swiperType, min, max, damp, integer, factor, loop, pauseTime, otherSwiper) EXPAND MotionController(target, type, speed, axis, boundary, map, diagonal, damp, flip, orient, constant, firstPerson, turnSpeed, moveThreshold, stickThreshold, container, localBoundary, mouseMoveOutside, mousedownIncludes, minPercentSpeed, maxPercentSpeed, dampKeyup, rotate, mouseOutside) EXPAND GamePad() EXPAND Portal(obj, lands) EXPAND Physics(gravity, borders, scroll, frame) EXPAND TimeLine(objects, width, startPaused, barColor, buttonColor, themeColor, corner, ticks, damp, loop, noLoop, call, style, group, inherit) -------------- EFFECTS EXPAND BlurEffect(blurX, blurY, quality, style, group, inherit) EXPAND GlowEffect(color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject, style, group, inherit) EXPAND ShadowEffect(distance, angle, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject, style, group, inherit) EXPAND ThresholdEffect(redValue, greenValue, blueValue, passColor, failColor, style, group, inherit) EXPAND ColorEffect(redMultiplier, greenMultiplier, blueMultiplier, alphaMultiplier, redOffset, greenOffset, blueOffset, alphaOffset, style, group, inherit) EXPAND MultiEffect(hue, saturation, brightness, contrast, style, group, inherit) EXPAND AlphaEffect(mask, style, group, inherit) EXPAND Pixel(obj, amount, amountY, blur, dynamic, blendmode, boundary, expand, amountFactor, blurFactor, style, group, inherit) EXPAND Parallax(layers, damp, auto, stage, startPaused, mouseMoveOutside, clamp) EXPAND Flipper(front, back, interactive, time, vertical, flipped, ease, frontPress, backPress, reverse, continuous, style, group, inherit) EXPAND Book(width, height, pages, startPage, rollUp, radius, backgroundColor, arrows, handleHTML) EXPAND Scrambler(tile, keys, keyProperty, scramble, time, wait, num, shadowColor, shadowBlur, swap, swapLock, style, group, inherit) EXPAND Scroller(backing, speed, direction, horizontal, gapFix, stage, container, backing2, style, group, inherit) EXPAND Dynamo(sprite, speed, label, startFrame, endFrame, update, reversible, flip, flipVertical, style, group, inherit) EXPAND Accelerator(objects) EXPAND Emitter(obj, width, height, interval, num, life, fade, shrink, warm, decayTime, decayStart, trace, traceFadeTime, traceShiftX, traceShiftY, angle, force, gravity, wind, layers, animation, random, horizontal, vertical, sink, sinkForce, cache, events, startPaused, pool, poolMin, particles, focusWarm, style, group, inherit) EXPAND Generator(color, strokeColor, strokeWidth, draw, stamp, setup, maxCount, boundary, drawCount, drawPause, drawSpacebarPause, startX, startY, cache, recordLinePoints, frame, seed, output, outputType, style, group, inherit)

Generator(color, strokeColor, strokeWidth, draw, stamp, setup, maxCount, boundary, drawCount, drawPause, drawSpacebarPause, startX, startY, cache, recordLinePoints, frame, seed, output, outputType, style, group, inherit)
Generator zim class - extends a ZIM Container which extends a CreateJS Container DESCRIPTION Used for dynamic drawing such as generative art or visualizations. Generator provides a set of RELATIVE drawing commands that primarily match the traditional absolute drawing commands for shapes on the canvas. Rather than add all these commands to the Shape class they have been added to the Generator class. This optimizes the Shape class which is used for all components and ZIM shapes. HOW IT WORKS The arrangement is similar to Processing (or P5js for a JS version). There is one Shape that gets drawn into and code can be put in three different callback functions: setup - happens once at the start (similar to Processing) draw - happens at the framerate (similar to Processing) stamp - loops all at once (different that Processing?) SETUP The optional setup runs once before the draw or stamp functions run. This function will not be used as much as in Processing because ZIM has a Frame(). Also, things can be set up before the Generator code is called. And the Generator class has parameters for color, strokeColor and strokeWidth. Generator defaults to start at the center of the stage - so in the setup, translate(-W/2, -H/2) could be used to start at the top left. Setup can be run again with resetup() DRAW The optional draw function runs at the framerate and receives count, total and shape parameters. This will have the affect of animating the drawing as it "processes" the code By default, this will pause and unpause when the screen or the spacebar is pressed. Draw can be drawn again with redraw() STAMP The optional stamp function runs inside a loop and produces the final drawing at once. The function receives count, total, shape and stampNum parameters. You can switch between the stamp and draw function with the same code inside. The end product will be the same. Stamps can be stamped again with restamp() RELATIVE The draw and stamp work the same way, running the code inside for each count. The magic happens because the commands are relative. Even g.rectangle().rotate(5) is beautiful. Each new rectangle after the first will be rotated 5 degrees In absolute space, the corner points would have to be calculated with sine and cosine - ew. Generator does the matrix calculations to avoid this. Each new command starts where the last command left off. But each command also has an x and y value to translate if desired. This x and y value is relative to the current rotation and scale. Often, the x and y is left at 0, 0. We considered removing them as parameters because translate() can be called but we left them in to be the same as Processing. COUNT, PAUSE AND STEP The count parameter of draw or stamp suplies the current count. This provides ways to modify commands. for instance circle(0,0,count*10); will draw circles that get bigger. This can also be used to set the rate of change - often by using smaller factors such as count*.01, etc. Count can also be used to pause or do something different at certain places in the drawing Pause also has an optional number of seconds to pause or a ZIM interval() and pause(false) can be used. Generator has a count property which can be set to go forward or back to a certain count. Step calls a step - usually used when pause is true - an interval could then be used for steps PUSH AND POP There is also push() and pop() as in Processing. These remember the position, rotation, scale and skew when push() is used and then return the generator to these settings when pop() is used. Multiple pushes can be set and then popped back. These can be used to make fractals with recursive branching. CLEAR AND RESET The clear() method will clear the image but keep the transforms The reset() method will reset the transforms, set to startX and startY and reset color, strokeColor and strokeWidth These can also be called through resetup(), redraw() and restamp() EXPORT Generator() can export frames as images that can then be compiled into a video. Set the output parameter to true or a file prefix string (otherwise the prefix will be gen). This will make Generator() use draw (even if stamp is set) at 6 frames per second so the Browser can handle file saves. The files will be saved with 6 numbers: gen_000000.png, gen_000001.png, etc. They will be saved in your Browser's default downloads so MOVE them into a folder of their own. See the note at bottom about enabling Browser Automatic Downloads. NOTE the canvas background color does not show up    if desired, add a new Rectangle(W, H, F.color).addTo().bot(); NOTE Generator() will output the first image before it starts drawing.    You can delete the first image if you want the video to start at the first drawn frame. NOTE FFmpeg is suggested but there are other options such as https://github.com/spite/ccapture.js    Or screen capture software such as OBS - if just posting to Twitter and quality does not matter. Instructions to make a video from saved image series:    Download FFmpeg: https://zimjs.org/cdn/ffmpeg.zip, UNZIP it and put it INTO the image folder.    Open a command line. On PC, type "command" into the Windows search box then on the command line type:    cd \path\to\images or to change drive use /d like cd /d E:\path\to\images    Once in the directory with your images type (or paste) something like:    ffmpeg -r 60 -f image2 -s 1024x768 -i gen_%06d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p final.mp4    You can read about these at https://www.ffmpeg.org/ffmpeg.html (but would not bother)       -r framerate (fps)       -f canonical form (image2 to work with image sequences)       -s resolution       -i file name to find with %06 representing 6 decimal placeholder       -vcodec codec       -crf quality - the lower the better... 10-30 is fine       -pix_fmt pixel format       final.mp4 the output video NOTE to enable Multiple File Downloads in Chrome "simply" go to menu > Settings > Privacy & Security > Site Setting > Permissions > Addtional Permissions > Automatic Downloads > turn Ask ON We found that ADD site: file:///path/ to local file did not seem to prevent Chrome from asking. And part way through Chrome asked again for permission to download but the process still worked. Alternatively, we could look at saving Blobs (data) of the images but the download process works.     GENERAL EXAMPLES SEE: https://zimjs.com/cat/generator.html SEE: https://zimjs.com/codepen/bloob.html // for animating stamps with noise NOTE The drawing uses matrix transforms on Shape which takes the shape out of traditional positioning. A drawing property is available on the Generator that points to a Container that holds the drawing. This container can be moved, dragged, etc. so use this to manipulate the drawing in a traditional manner. The generator has a shape property which can be used to access the raw shape for absolute drawing for instance. NOTE The drawing container is automatically added to the default stage as the Generator is created NOTE if manually caching generator.shape or generator.drawing, there is a slight time delay before shape is drawn so cache when the "complete" event is called NOTE as of ZIM 5.5.0 the zim namespace is no longer required (unless zns is set to true before running zim) EXAMPLE
// Draw a line from the center of the stage to 100 pixels to the right
// usually we draw inside a draw or stamp function
const g = new Generator();
g.line(0,0,100,0);
EXAMPLE
// draw an octagon - stop at 8 lines
const g = new Generator({draw:gen});
function gen(count) {
   g.line(0,0,100,0).rotate(45);
   if (count == 8) g.stop();
}

// or use maxCount:
const g = new Generator({draw:gen, maxCount:8});
function gen(count) {
   g.line(0,0,100,0).rotate(45);
}

// make a Blob with points of drawing
// could set interactive:false on Blob for just filled in picture
// lines will not fill in Generator
// shapes fill and curves fill themselves but not collectively
const g = new Generator({stamp:gen, maxCount:8, recordLinePoints:true});
function gen(count) {
   g.line(0,0,100,0).rotate(45);
}
g.on("complete", makeBlob);
function makeBlob() {
   new Blob({points:g.linePoints, color:red}).addTo();
   g.drawing.removeFrom()
   S.update();
}
EXAMPLE
// draw a fan of lines always going back to 0,0
const g = new Generator({draw:gen, maxCount:360/5});
function gen(count) {
   g.line(0,0,200,0).translate(-200).rotate(5);
}

// or stamp the fan of lines:
const g = new Generator({stamp:gen, maxCount:8});
function gen(count) {
   g.line(0,0,100,0).rotate(45);
}

// make random color lines with a hole in the middle and draggable
const g = new Generator({stamp:gen, strokeColor:[red,pink,purple], strokeWidth:2, maxCount:360/5});
function gen(count) {
   g.line(50,0,200,0).translate(-250).rotate(5);
}
g.drawing.drag();

// make a series of color lines with a hole in the middle and draggable
// using push() and pop() to not think about how to reset!
// so... draw a line, go back to how it was before drawing, rotate, then draw a line, etc.
// each time it draws the line it chooses the next ZIM VEE value in the series
const g = new Generator({stamp:gen, strokeColor:series(yellow,green,orange), strokeWidth:5, maxCount:360/5});
function gen(count) {
   g.push().line(50,0,200,0).pop().rotate(5);
}

// add a circle to the end
const g = new Generator({stamp:gen, strokeColor:series(yellow,green,orange), strokeWidth:5, maxCount:360/5});
function gen(count) {
   g.push().line(50,0,200,0).circle(15,0,5).pop().rotate(5);
}

// removing circle stroke and adding fill the same color as the stroke
// note, do not remove the stroke first or the currentColor will be null
// currentColor is the applied color from the ZIM VEE value
const g = new Generator({draw:gen, strokeColor:series(yellow,green,orange), strokeWidth:5, maxCount:360/5});
function gen(count) {
   g.push()
      .line(50,0,200,0)
      .fill(g.currentStrokeColor)
      .noStroke()
      .circle(15,0,5)
    .pop()
    .rotate(5);
}
EXAMPLE
// using ZIM VEE series to adjust stroke color and width
const g = new Generator({draw:gen, maxCount:360/2, strokeColor:green});
const s = series({min:1, max:4}).step(.1).bounce(); // stroke sizes
const c = series(blue,pink,green).every(12); // color change
function gen(count, total, g) {
   g
      .rectangle(0,0,200,200)
      .stroke(g.currentStrokeColor.toColor(c,.3), s) // blend color change
      .rotate(2);
}
EXAMPLE
// Clone example
const g1 = new Generator({draw:gen, maxCount:360/10});
function gen(count, total, g) {
   // note: we have three generators calling this function
   // so collect and use the generator g that is calling gen()
   g.rectangle(0,0,100,100).rotate(10);
}
const g2 = g1.clone();
g2.drawing.mov(100);
const g3 = g1.clone();
g3.drawing.mov(-100);
EXAMPLE
// draw rectangles that get smaller and translate like a starfish
const g = new Generator({
   draw:gen,
   color:series(yellow,green,orange),
   strokeColor:white,
   strokeWidth:3,
   maxCount:100/.3
});
function gen(count, total) {
   var mod = count*.3
    g.rectangle(mod, mod, 100-mod, 100-mod, 0).rotate(30);
}
EXAMPLE
// common processing tree
const g = new Generator({
   strokeColor:green,
   strokeWidth:2,
   setup:gen
});
function gen() {
   var length = 150;
   g.translate(0, H/2);
   branch(150, 5);
   // recursive function - not stamp or draw
   function branch(length, thickness) {
      g.line(0,0,0,-length);
      if (length > 4) {
         g.push().rotate(30);
         branch(length*.75);
         g.pop().push().rotate(-30);
         branch(length*.75);
         g.pop();
      }
   }
}
EXAMPLE
// Using restamp to animate Generator
// Radial Animation and Noise - also see:
https://codepen.io/danzen/pen/ExgQRjW
https://codepen.io/zimjs/pen/XWjrmoQ
https://codepen.io/zimjs/pen/jOMZjOy

const segments = 30; // how many lines
const delta = 360/segments; // angle between each line
const inner = 100; // inner radius
const outer = 300; // outer radius
const variation = outer-inner; // maximum noise

let c = 1;    // curve factor
let s = .02;    // speed factor
let t = 0;      // time

// The ZIM Generator() works somewhat like Processing / P5js.
// Setting stamp instead of draw will draw all generations immediately
// rather than one generation at a time.
const g = new Generator({
   stamp:gen,
   strokeWidth:2,
   maxCount:segments
});

function gen(count) {
   let angle = delta*count*RAD;  // (0-360 degrees in radians)
   // use sin and cos to make noise values join back at same place
   let noise = g.noise(c*Math.sin(angle), c*Math.cos(angle), t);
   let radius = inner+variation*noise;
   g.push()
      g.push().line(0,0,radius,0).pop().line(radius,-5,0,10);
   g.pop()
   g.rotate(delta); // rotate delta each time
}

Ticker.add(()=>{
   t+=s; // set the speed through the noise
   g.restamp();
});
PARAMETERS ** supports DUO - parameters or single object with properties below ** supports VEE - parameters marked with ZIM VEE mean a zim Pick() object or Pick Literal can be passed Pick Literal formats: [1,3,2] - random; {min:10, max:20} - range; series(1,2,3) - order, function(){return result;} - function ** supports OCT - parameter defaults can be set with STYLE control (like CSS) color - |ZIM VEE| (default null) the fill color of shapes and individual curves (lines do not fill like in normal shape drawing) strokeColor - |ZIM VEE| (default white) the color of the stroke or shape border strokeWidth - |ZIM VEE| (default 1) the thickness of the stroke or shape border draw - (default null) an optional function to call within an internal ZIM new Ticker that runs at the frame rate    draw will receive count, maxCount and generator parameters    will result in the same drawing as the stamp function but animates the drawing stamp - (default null) an optional function to call within an internal ZIM loop    stamp will receive count, maxCount and generator parameters    will result in the same drawing as the draw function but happens right away (or within syncronous processing time) setup - (default null) an optional function to call before the stamp or call functions run    setup will receive count (0), maxCount and generator parameters maxCount - (default 1000) the maximum number of times the stamp or draw functions will run boundary - (default null) the drawing size if cache is true drawCount - (default 1) the count per draw. Set to a higher number to slow down the drawing (2 is twice as long) drawPause - (default true) set to false to not pause the draw function on stage mousedown    will dispatch "generatorpaused" and "generatorunpaused" events    note the pause() method as well to handle pauses manually drawSpacebarPause - (default true) set to false to not pause the draw function when the spacebar key is pressed    will dispatch "generatorpaused" and "generatorunpaused" events    note the pause() method as well to handle pauses manually startX - (default S.width/2) set to 0 to start at stage left, etc. startY - (default S.height/2) set to 0 to start at stage top, etc. cache - (default false) set to true to cache image and boost performance - especially when dragging a complex drawing afterwards    if you notice performance issues then set cache to true    setting cache to true will be a little blurry    NOTE: if manually caching shape, there is a slight time delay before shape is drawn so use the "complete" event to applying cache() recordLinePoints - (default false) set to true to record the end points of line() commands    set to "nonzero" to also record non-zero start points    set to "zero" to also record 0,0 start points (and non-zero start points (and end points)))    see the linePoints property to retrieve the array as [[x,y], [x,y], [x,y], etc.] frame - (default zimDefaultFrame) change to another frame if not drawing in the zimDefaultFrame seed - (default null) a specific seed for the Generator Noise - otherwise random output - (default null) set to true to export frames as images    set to a string to change the prefix of the file names to something other than "gen"    output will export a series of images with six digits.    The images can be compiled into a video    SEE the EXPORT section at the bottom of the Generator() docs description.    Also see outputType outputType - (default "png") or set to "jpeg" - the file type used if the output parameter is set to true style - (default true) set to false to ignore styles set with the STYLE - will receive original parameter defaults group - (default null) set to String (or comma delimited String) so STYLE can set default styles to the group(s) (like a CSS class) inherit - (default null) used internally but can receive an {} of styles directly METHODS ** ALL PARAMETER BELOW SUPPORT |ZIM VEE| ** These are relative shape commands similar to traditional shape commands (see Shape on Docs) ** Note that the curves also include an x and y as the first two parameters ** Methods return the generator for chaining (unless otherwise specified) fill(color) - sets the color or no fill if left empty or null is passed in    also see lighten(), darken(), toColor() stroke(color, size) - sets the stroke color and / or stroke size    leaving one empty or null will not adjust that parameter - see noStroke() to remove stroke    also see lighten(), darken(), toColor(), thicken() noStroke() - turn the stroke off translate(x, y) - move the location relatively    if the shape is rotated then translate(100) will move along the rotation angle rotate(degrees) - relatively rotate future drawing by this angle - does not affect previously drawn shapes setScale(x, y) - relatively scale future drawing by this amount - does not affect previously drawn shapes    leaving y out will scale both x and y the same    ** scale(x, y) is DEPRECATED - it works for now, but might be removed as it conflicts with DisplayObject.scale property skew(x, y) - relatively skew future drawing by this angle - does not affect previously drawn shapes    leaving y out will NOT skew the y line(x1, y1, x2, y2) - draw a line from the start x and y to the end x and y    this will be oriented to the current rotation and scaled and skewed to the current scale and skew settings arc(x, y, radius, startAngle, endAngle, anticlockwise) - an arc that will be adjusted to current transform settings curve(x1, y1, cpx, cpy, x2, y2) - a quadratic curve that will be adjusted to current transform settings    x1 and y1 - the start point - note the Shape qt() or CreateJS graphics.curveTo() do not include this start point    cpx and cpy - control point adjusted relatively to current transform settings    x2 and y2 - the final point adjusted relatively to current transform settings bezier(x1, y1, cp1x, cp1y, cp2x, cp2y, x2, y2) - a cubic bezier curve that will be adjusted to current transform settings    x1 and y1 - the start point - note the Shape bt() or CreateJS graphics.bezierTo() do not include this start point    cp1x and cp1y - control point for the first point's Bezier handle adjusted relatively to current transform settings    cp2x and cp2y - control point for the second point's Bezier handle adjusted relatively to current transform settings    x2 and y2 - the final point adjusted relatively to current transform settings rectangle(x, y, w, h, a, b, c, d) - a rectangle if x, y, w, h are provided    a, b, c, d are for rounding the corners       if only a is provided then all corners will round to a       otherwise they start at the top left and go clockwise to bottom left       a: topLeft, b:topRight, c:bottomRight, d:bottomLeft circle(x, y, radius, percent, percentClose) - a circle    with percent like the ZIM Circle() - to make a semicircle    and percentClose (default true) to close the path of the semicircle oval(x, y, w, h) - an oval specified by with width and height which will be adjusted relative to current transform settings poly(x, y, radius, sides, pointSize, angle) - a polygon like the ZIM Poly() but with x,y and angle parameter    radius - (default 50) the radius (from the center to the edge or half the diameter) ;-)    sides - (default 5) the number of sides    pointSize - (default 0) a factor that will indent or outdent the sides to form stars       0 is no indent - 1 is a complete indent - which will have no fill and if there is a border will look like a stick figure       beyond 1 is cool - it overlaps on itself and makes multiple patterns    angle - (default 0) along the relative x axis - different than Poly() which rotates negaitve 90 to start ** ALL PARAMETERS ABOVE SUPPORT |ZIM VEE| push() - remember the current transform properties (x,y,rotation,scale,skew) and color and stroke properties    see pop() to return to these remembered property settings    note push() can be used any number of times before pop() is used, effectively nesting remembered states pop() - return to the remembered transform properties (x,y,rotation,scale,skew) and color and stroke properties    see push() to set remembered properties    note push() can be used any number of times before pop() is used, effectively nesting remembered states step() - advance the draw function one time - good for when the generator is paused to then step through calculations blit() - write to drawing cache - if cache is true - done automatically if using draw, stamp or setup pause(state, time) - pause or unpause the generator with optional time in seconds (see ZIM TIME constant)    will dispatch a "paused" and "unpaused" event - different than the "generatorpaused" and "generatorunpaused" for stage mousedown and spacebar key stop() - stops the Generator at which point it cannot be started - just make a new one noise(a,b,c,d) - ZIM Noise simplex method 1,2,3,4 depending on number of parameters    returns a value from 0 to 1 as opposed to the simplex methods which return from -1 to 1    see also the seed parameter for Generator which will seed this Noise    see https://zimjs.com/codepen/bloob.html for a good explanation and example of using Noise with Generator clear() - clears the shape reset() - sets the transforms back to 0 (rotation, scale, skew) and sets the x and y to startX and startY    also sets the color, strokeColor and strokeWidth back to original values resetup(clear) - resets and calls the setup function again    clear defaults to true - set to false to not clear the drawing redraw(clear, setup) - redraw starting from count 0    clear and setup default to true    set to false to not clear or not call setup restamp(clear, setup) - restamp starting from count 0    clear and setup default to true    set to false to not clear or not call setup    calling restamp increases the stampNum property - also available as the fourth parameter in stamp    this can be used to animate stamps for instance adjusting a noise input    https://zimjs.com/codepen/bloob.html clone() - create another generator with the same settings    The clone will call the same setup, draw and stamp functions,    so use the generator parameter in these functions to draw into the specific generator drawings    eg. draw(count, total, g) {g.rectangle(0,0,100,100).rotate(5)}    To make a copy of generator output, clone() the generator.drawing dispose() - stops and disposes the Generator - the drawing may still need to be removed ALSO ZIM 4TH adds all the methods listed under Container (see above), such as: ** THESE NEED to be used on the Generator drawing property drag(), hitTestRect(), animate(), sca(), reg(), mov(), center(), centerReg(), addTo(), removeFrom(), loop(), outline(), place(), pos(), alp(), rot(), setMask(), etc. ALSO See the CreateJS Easel Docs for Container methods, such as: on(), off(), getBounds(), setBounds(), cache(), uncache(), updateCache(), dispatchEvent(), addChild(), removeChild(), addChildAt(), getChildAt(), contains(), removeAllChildren(), etc. PROPERTIES type - holds the class name as a String drawing - reference to the ZIM Container that holds the drawing shape    automatically added to the stage when new Generator() is made    ** use this for applying ZIM methods and properties to the drawing shape - reference to the ZIM Shape object being draw into    ** because of the matrix being used, this does not respond to position methods or properties    see the drawing property above to drag, animate, loc, etc. count - the current count in the draw or stamp loop maxCount - the number the draw or stamp loop will loop to drawCount - how many counts go by until the draw function runs - default is 1 for each count    setting to 2 will draw twice as slow, 10 will draw ten times as slow, etc. stampCount - how many times the stamp function has been called with restamp()    this is also passed in as the fourth parameter to the stamp function color - |ZIM VEE| get the current color - will set too but not until the next draw - use the fill() method    this could be a ZIM VEE value - also see currentColor for the color actually being applied (after ZIM VEE is picked) currentColor - the actual color being applied (after ZIM VEE is picked) strokeColor - |ZIM VEE| get the current strokeColor - will set too but not until the next draw - use the stroke() method    this could be a ZIM VEE value - also see currentStrokeColor for the color actually being applied (after ZIM VEE is picked) currentStrokeColor - the actual stroke color being applied (after ZIM VEE is picked) strokeWidth - |ZIM VEE| get the current strokeWidth - will set too but not until the next draw - use the stroke() method    this could be a ZIM VEE value - also see currentStrokeWidth for the color actually being applied (after ZIM VEE is picked) currentStrokeWidth - the actual stroke width being applied (after ZIM VEE is picked) currentX - get the current x value currentY - get the current y value linePoints - if the recordLinePoints parameter is true then this is an array of [x,y] values paused - read only as to the pause state of the Generator - see also pause() method stack - current array of push() remembered transforms stored as a matrix colorStrokeStack - current array of push() remembered color, strokeColor, strokeWidth, currentColor, currentStrokeColor and currentStrokeWidth properties ALSO See the CreateJS Easel Docs for Container properties, such as: ** THESE NEED to be used on the Generator drawing property x, y, rotation, scaleX, scaleY, regX, regY, skewX, skewY, alpha, cursor, shadow, name, mouseChildren, mouseEnabled, parent, numChildren, etc. EVENTS dispatches a "drawing" event each time the draw function is called - not used for stamp function dispatches a "complete" event when maxCount has been reached - not dispatched if stop() is called dispatches "paused" and "unpaused" events when pause() is used (and time of time parameter has finished) dispatches "generatorpaused" and "generatorunpaused" events when stage mousedown or space key is pressed and drawpause or drawSpacebarPause parameters are true CLOSE ▲PAGE ▤CODE ▤VIDS
EXPAND Pen(size, color, penType, damp, spread, borderColor, borderWidth, end, paper, nib, cache, ctrlKey, cropScale, undo, undoKeys, move, onTop, deleteable, doubleClickDelete, holdDelete, immediateStop, lineAlpha, lineBlendMode, frame, dashed, pullColor, pullThickness, style, group, inherit) EXPAND SoundWave(num, input, include, smoothing, min, max, operation, baseline, magnify, reduce, adjust, channel) EXPAND Synth(volume, frequency) EXPAND VR(content, angle, distance, parallax, parallaxAngle, damp, parallaxDamp, startAngle, negativeParallax, borderMarkers, swiper, holder)
ZIM CODE
-------------- FEATURED EXPAND chop(obj, cols, rows, tile, margin, scale) EXPAND shuffle(array, different) EXPAND pluck(array, remove) EXPAND rand(a, b, integer, negative) EXPAND seedRandom(seed) EXPAND odds(percent) EXPAND rarity(weights, shuffle, zimColors, dynamicPayload) EXPAND repeats(array, total) EXPAND series(array|item1|obj, item2, item3) EXPAND loop(obj, call, reverse, interval, step, start, end, immediate, complete, completeParams) EXPAND getTIME(time, timeType, minWarning, maxWarning, noWarning) EXPAND timeout(time, call, pauseOnBlur, timeUnit) EXPAND interval(time, call, total, immediate, pauseOnBlur, timeUnit, complete, completeParams) EXPAND async(url, callback, callbackString, maxTime, maxCancel) EXPAND couple(json) EXPAND decouple(json) EXPAND convertColor(color, toColorType, alpha) EXPAND colorRange(color1, color2, ratio) EXPAND lighten(color, ratio) EXPAND darken(color, ratio) EXPAND toColor(color, targetColor, ratio) EXPAND toAlpha(color, alpha) EXPAND toBW(hex) EXPAND invertColor(hex) EXPAND zimEase(points, polynomials, convert, reverse, lockEnds) EXPAND spline(points, tension, close, shape, removeLast) EXPAND getPointAtPercent(x1, y1, x2, y2, percent) EXPAND pointAlongCurve(points, ratio, getAngle) EXPAND distanceAlongCurve(points) EXPAND closestPointAlongCurve(point, segmentPoints, num, interpolate, percentage) EXPAND transformPoints(points, transformType, amount, x, y) EXPAND trimEndPoints(points) EXPAND reversePoints(points) EXPAND appendPoints(original, points, controlType) EXPAND prependPoints(original, points, controlType) EXPAND splitPoints(points, index, trimEnds) EXPAND outlineImage(image, reverse) EXPAND simplifyPoints(points, tolerance, highestQuality, reverse, removeLast) EXPAND makeID(type, length, letterCase) EXPAND makeSyllable(length, firstVowel) EXPAND makePrimitive(obj) EXPAND makeMath() EXPAND swapProperties(property, objA, objB) EXPAND setProps(obj, props) EXPAND mobile(orientation) EXPAND vee(obj) EXPAND extend(subclass, superclass, override, prefix, prototype) -------------- BASICS EXPAND copy(obj, clone, cloneContainers) EXPAND merge(objects) EXPAND sortObject(obj, property, reverse) EXPAND arraysEqual(a, b, strict) EXPAND arrayMinMax(arr) EXPAND isEmpty(obj) EXPAND isPick(obj) EXPAND isJSON(str) EXPAND parseJSON(str) EXPAND decimals(num, places, addZeros, addZerosBefore, includeZero, time) EXPAND countDecimals(num) EXPAND sign(num) EXPAND constrain(num, min, max, negative) EXPAND dist(a, b, c, d) EXPAND rectIntersect(a, b, margin) EXPAND boundsAroundPoints(points) EXPAND angle(a, b, c, d) EXPAND TAU, DEG, RAD, PHI EXPAND smoothStep(num, min, max) EXPAND unicodeToUTF(val) EXPAND capitalizeFirst(string) -------------- CLASSES EXPAND Ajax(master, couple, lock, unique) EXPAND Noise(seed) EXPAND Point(x, y, z, q, r, s, t, u, v, w) EXPAND Bezier(a, b, c, d) EXPAND Boundary(x|bounds, y, width, height) EXPAND GradientColor(colors, ratios|angle, x0, y0, x1, y1) EXPAND RadialColor(colors, ratios, x0, y0, r0, x1, y1, r1) EXPAND BitmapColor(image, repetition, matrix) EXPAND Damp(startValue, damp) EXPAND Proportion(baseMin, baseMax, targetMin, targetMax, factor, targetRound, clamp, clampMin, clampMax) EXPAND ProportionDamp(baseMin, baseMax, targetMin, targetMax, damp, factor, targetRound, clamp, clampMin, clampMax) EXPAND Dictionary(unique) EXPAND Hierarchy(input) EXPAND Pick(choices) -------------- CREATEJS CLASSES EXPAND createjs.BitmapData(width, height, transparent, fillColor) EXPAND createjs.BitmapDataChannel() EXPAND createjs.ColorTransform(redMultiplier, greenMultiplier, blueMultiplier, alphaMultiplier, redOffset, greenOffset, blueOffset, alphaOffset) -------------- HTML FUNCTIONS EXPAND scrollX(num, time) EXPAND scrollY(num, time) EXPAND windowWidth() EXPAND windowHeight() EXPAND browserZoom() EXPAND getQueryString(string) EXPAND swapHTML(idA, idB) EXPAND urlEncode(string) EXPAND urlDecode(string) EXPAND setCookie(name, value, days) EXPAND getCookie(name) EXPAND deleteCookie(name)
ZIM WRAP
EXPAND zog(item1, item2, etc.) ~ log EXPAND zid(string) ~ id EXPAND zss(string) ~ css EXPAND zgo(url, target, width, height, fullscreen, modal) ~ go EXPAND zum(string) ~ num EXPAND zot(value) ~ not EXPAND zop(e) ~ stop EXPAND zil() ~ still EXPAND zet(selector, first) ~ set EXPAND zob(func, args, sig, scope) ~ object EXPAND zik(Array|function|object|Pick) ~ pick EXPAND zta(item1, item2, etc.) ~ table EXPAND zor(item1, item2, etc.) ~ or
ZIM META
EXPAND DISTILL EXPAND distill() EXPAND parseAudioSprite(audioSpriteData, outputAudioSprite) EXPAND previewAudioSprite(audioSpriteData, numLetters, frame) EXPAND svgToBitmap(svg, callback, width, height, params) EXPAND makeContent(content, maxWidth, color, scrollBar) EXPAND zimify(obj, a, b, c, d, list) EXPAND zimplify(exclude) EXPAND fastFrame(cjs, stage) EXPAND addWires(obj) EXPAND setBlurDetect() EXPAND ZIMONON EXPAND ZIMON = {} EXPAND Wonder(wid, client, app, notes, server) EXPAND VERSION EXPAND getLatestVersions(call) EXPAND PWA(call, label, backgroundColor, color, backdropColor, pane, noScale) EXPAND QR(url, color, backgroundColor, size, clickable, correctLevel) EXPAND GIF(file, width, height, startPaused) EXPAND Rive(width, height, src, stateMachines, artboard, animations, autoplay, layout, buffer, file, useOffscreenRenderer, enableRiveAssetCDN, shouldDisableRiveListeners, isTouchScrollEnabled, automaticallyHandleEvents, onLoad, onLoadError, onPlay, onPause, onStop, onLoop, onStateChange, onAdvance, assetLoader, canvas) EXPAND RiveListener(src, damp, canvas, wasm) EXPAND THEME()
ZIM GAME
EXPAND LeaderBoard(data, title, width, height, corner, backgroundColor, titleColor, colors, total, scoreWidth, scorePlaces, scoreZeros, spacing, arrows, borderColor, borderWidth, shadowColor, shadowBlur, reverse, allowZero, font, fontSize, nameShift, scoreShift, rankShift) EXPAND Meter(stage, vertical, horizontal, color, textColor, padding, decimals, alpha, skew) EXPAND Board(size, cols, rows, backgroundColor, rollBackgroundColor, borderColor, borderWidth, isometric, indicatorColor, indicatorBorderColor, indicatorBorderWidth, indicatorSize, indicatorType, arrows, arrowColor, arrowRollColor, swipe, info, labels, color, scaleMin, scaleMax, buffer) EXPAND Person(shirt, pants, head, outline, player, cache) EXPAND Orb(radius, color, color2, accentColor, accentColor2, flat, alpha, time, delay) EXPAND Tree() EXPAND Timer(time, step, colon, down, isometric, startPaused, size, font, color, backgroundColor, borderColor, borderWidth, align, valign, bold, italic, variant, width, height, decimals) EXPAND Scorer(score, isometric, size, font, color, backgroundColor, borderColor, borderWidth, align, valign, bold, italic, variant, width, height) EXPAND Dialog(width, height, words, dialogType, tailType, fill, size, font, color, backgroundColor, borderColor, borderWidth, align, valign, corner, shadowColor, shadowBlur, padding, paddingH, paddingV, shiftH, shiftV, slantLeft, slantRight, slantTop, slantBottom, tailH, tailV, tailShiftH, tailShiftV, tailShiftAngle, arrows, arrowsInside, arrowsFlip, index, selectedIndex)
ZIM THREE
EXPAND Three(width, height, color, cameraPosition, cameraLook, interactive, resize, frame, ortho, textureActive, colorSpace, colorManagement, legacyLights, throttle, lay, full, xr, VRButton, xrBufferScale, tag) EXPAND XRControllers(three, type, color, highlightColor, lineColor, lineLength, threshhold) EXPAND XRMovement(three, XRControllers, speed, acceleration, rotationSpeed, rotationAcceleration, hapticMax, verticalStrafe, radiusMax, threshhold, directionFix, boxMax, rotationAngle, rotationInterval) EXPAND XRTeleport(three, XRControllers, XRMovement, floor, offsetHeight, button, hand, markerColor, markerBlend, markerRadius)
ZIM SOCKET
EXPAND Socket(server, appName, roomName, maxPeople, fill, initObj)
ZIM CAM
EXPAND Cam(width, height, flip, facingMode, config) EXPAND CamMotion(obj, preview, smooth, damp, sensitivity, precision, period, colorFilter, colorSensitivity, mode, visualizerObj, visualizerColor, visualizerBaseColor, visualizerScale, visualizerBaseScale, guideH, guideV, randomize, cam, frame, facingMode, config) EXPAND CamCursor(cursor, preview, camMotion, radius, color, borderColor, borderWidth, stillColor, stillBorderColor, stillTime, colorFilter, colorSensitivity, cam, facingMode, config) EXPAND CamAlpha(cam, color) EXPAND CamControls(camMotion, close, collapse) EXPAND CamAsk(color, backgroundColor)
ZIM PIZZAZZ
EXPAND makeShape(type, color, width, height) EXPAND makeIcon(type, color, scale, multi, multiAlpha, multiScale, multiX, multiY, skewX, skewY, backing) EXPAND makePattern(type, colors, size, cols, rows, spacingH, spacingV, interval, startPaused, backgroundColor, gradient, cache) EXPAND makePath() ** there is no makePath() - please read details