Navigation for the ZIM JavaScript Canvas Framework

AboutExamplesLearnEditorCodeDocsDevsGold
DOCS
INTRO

The Docs are to look up commands. See the LEARN section to get started. Search at top.

Important references: VIDEO | UPDATES | TEXT | CODE | TIPS

LATEST VERSIONS Modules | Scripts | CDN | ZIM 017 Min | ZIM 017 Doc | ZIM 017 Mod
Libraries | Socket | Game | Physics | Three | Cam | Pizzazz 1 | Pizzazz 2 | Pizzazz 3 | Pizzazz 4 | CreateJS | Box2D | three.js | OrbitControls | FirstPersonControls | PointerLockControls | ObjectControls | VRButton | GLTFLoader | socket.io | EasyStar (Pathfinding) | QRCode | Gifler (Gifs) | Canvas-Latex (Math) | TypeScript | NPM
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)

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)
Loader zim class - extends a zim.Button which extends a zim.Container DESCRIPTION Loader lets you upload images, text or JSON. These are available on the loaded event function. Loader uses the HTML input type=file tag and overlays this with a createjs DOMElement. Loader is a Button so can be displayed for the user to click on. It defaults to a dashed line region as you can also drag and drop files to the loader. You can also save an image using the save() method to a new browser window for the user to save NOTE due to the HTML tag being overlayed, the loader.resize() must be called if it is moved (This is called automatically when the stage is resized) NOTE if the loader is placed in a container and the container is removed or added again the loader must be manually removed or added again with loader.removeFrom() or loader.addTo(). This is so ZIM does not have to keep track of HTML tags each time a container is added or removed. NOTE as of ZIM 5.5.0 the zim namespace is no longer required (unless zns is set to true before running zim) EXAMPLE
const loader = new Loader({
   label:"UPLOAD PIC OR DROP PICS HERE",
   width:700,
   height:400,
   corner:50
}).center();
loader.on("loaded", e=>{
   loop(e.bitmaps, bitmap=>{
      bitmap.centerReg().drag();
   });
   loader.removeFrom();
   S.update();
});

// if wanting a save button
const saveButton = new Button({label:"SAVE"})
   .pos(10,10,RIGHT,BOTTOM)
   .tap(()=>{
      loader.save(S); // or some other container... can specify crop bounds too
   }
EXAMPLE
// loading a JSON file:
const loader = new Loader({
   type:"JSON",
   label:"UPLOAD JSON",
   width:700,
   height:400,
   corner:50
}).center();
// choose a test.json file with the following in it:
// {"test":"testing"}
loader.on("loaded", e=>{
   zog(e.json.test); // "testing"
   loader.removeFrom();
   S.update();
});
EXAMPLE
// save a json file
const obj = {a:[1,2,3], b:"hello"};
new Loader().save({content:obj, type:"json"}); // save a json file with obj
EXAMPLE
// save a text file
const textInput = new TextInput().center();
new Button({label:"SUBMIT", wait:"SAVED"}).center().mov(0,100).tap(()=>{
   new Loader().save({content:textInput.text, filename:"answer.txt", type:"text"});
});
PARAMETERS ** supports DUO - parameters or single object with properties below ** supports OCT - parameter defaults can be set with STYLE control (like CSS) width - (default 250) the width of the button height - (default 70) the height of the button label - (default "UPLOAD PIC") ZIM Label or plain text type - (default "image") set to "text" to receive text or "JSON" to receive a parsed JSON file and "other" for others like MP3 backgroundColor - (default "rgba(0,0,0,.05)") background color of button (any CSS color) rollBackgroundColor - (default "rgba(0,0,0,.1)") rollover color of button backbground color - (default "rgba(0,0,0,.5)") text color of button (any CSS color) rollColor - (default color) rollover text color of button borderColor - (default rgba(0,0,0,.3)) the color of the border borderWidth - (default 1) thickness of the border corner - (default 0) the round of the corner (set to 0 for no corner)    can also be an array of [topLeft, topRight, bottomRight, bottomLeft] shadowColor - (default "rgba(0,0,0,.3)") set to -1 for no shadow shadowBlur - (default 14) how blurred the shadow is if the shadow is set hitPadding - (default 0) adds extra hit area to the button (good for mobile) gradient - (default 0) 0 to 1 (try .3) adds a gradient to the button gloss - (default 0) 0 to 1 (try .1) adds a gloss to the button backing - (default null) a Display object for the backing of the button (eg. Shape, Bitmap, Container, Sprite)    see ZIM Pizzazz module for a fun set of Button Shapes like Boomerangs, Ovals, Lightning Bolts, etc.    https://zimjs.com/bits/view/pizzazz.html rollBacking - (default null) a Display object for the backing of the rolled-on button rollPersist - (default false) set to true to keep rollover state when button is pressed even if rolling off icon - (default false) set to display object to add icon at the center of the button and remove label    https://zimjs.com/bits/view/icons.html rollIcon - (default false) set to display object to show icon on rollover toggle - (default null) set to string to toggle with label or display object to toggle with icon or if no icon, the backing rollToggle - (default null) set to display object to toggle with rollIcon or rollBacking if no icon    there is no rollToggle for a label - that is handled by rollColor on the label toggleEvent - (default mousedown for mobile and click for not mobile) what event causes the toggle dashed - (default true) set to false to turn off the dashed for the border frame - (default the zdf) a reference to the Frame (to scale and position the HTML tag) multiple - (default true) set to false to let user only upload one file rather than multiple files (with shift or ctrl) accept - (default null) set to extension / MIME-type to limit types of files the upload dialog will suggest    here are some examples:    "image/*"    "image/jpeg, image/png"    ".png, .jpeg, .jpg, .gif"       "image/jpeg, .jpeg, .jpg"    ".txt, .json, application/json"    "audio/mpeg, .mp3" 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 resize() - call the resize event if the scale or position of the Loader is changed    this will sync the location of the HTML input tag    resize() is only needed if the scale or x, y of the Loader (or its container) is changed    it is not needed for general window resizing - the Loader handles this    Note: if the Frame itself changes location in the HTML document, call a F.update()    this will then dispatch an update event to the Loader and it will resize()    this is not needed if resizing the window or scrolling - see Frame update() method docs save(content, filename, x, y, width, height, cached, cachedBounds, type, data, quality) - save a picture or text (supports ZIM DUO)    content - the Display object to be saved such as a Container, Bitmap, etc.       or text (or Label, TextInput, TextArea) or JSON or object for JSON       if text or json, then x, y, width, height, cached, cachedBounds, data, and quality are ignored    filename - (default random) - the text name of the file (with or without extension - also see type)    x, y, width, height - the cropping bounds on that object otherwise defaults to 0,0,W,H    cached - (default false) set to true if the object is currently already cached    cachedBounds - if you are saving a different bounds than was previously cached       setting the bounds here (createjs.Rectangle) will restore the cache to the previous bounds    type - (default "png") set to "jpeg" for jpeg or "txt", "text" or "json"       json will convert the content to JSON if it is not already in JSON format    data - (default false) set to true to save as base64 data       otherwise save returns the object for chaining    quality - (default .92) a number between 0 an 1 representing the quality of the saved image (jpeg)       note, this parameter may be moved to before data in the next version of ZIM Button methods: setBacking(type, newBacking) - dynamically set any type of backing for button (if null removes backing for that type)    Backing types are: "backing", "rollBacking", "toggleBacking", "rollToggleBacking", "waitBacking", "rollWaitBacking"    note - all backing will have a pattern property if a pattern is set as a backing setIcon(type, newIcon) - dynamically set any type of icon for button (if null removes icon for that type)    Icon types are: "icon", "rollIcon", "toggleIcon", "rollToggleIcon", "waitIcon", "rollWaitIcon" toggle(state) - forces a toggle of label if toggle param is string, else toggles icon if icon is set or otherwise toggles backing    state defaults to null so just toggles    pass in true to go to the toggled state and false to go to the original state hasProp(property as String) - returns true if property exists on object else returns false clone() - makes a copy with properties such as x, y, etc. also copied dispose() - removes from parent, removes event listeners - must still set outside references to null for garbage collection ALSO ZIM 4TH adds all the methods listed under Container (see above), such as: 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 tag - the HTML input tag of type file - used for uploading frame - get or set the frame - set this if changing frames Button properties: text - references the text property of the Label object of the button label - gives access to the label backgroundColor - get or set non-rolled on backing color (if no backing specified) rollBackgroundColor - get or set rolled on backing color color - get or set non-rolled on text color (if no icon specified) rollColor - get or set rolled on text color backing - references the backing of the button rollBacking - references the rollBacking (if set) icon - references the icon of the button (if set) rollIcon - references the rollIcon (if set) toggleObj - references the toggle object (string or display object if set) rollToggle - references the rollToggle (if set) toggled - true if button is in toggled state, false if button is in original state enabled - default is true - set to false to disable rollPersist - default is false - set to true to keep rollover state when button is pressed even if rolling off focus - get or set the focus property of the Button used for tabOrder ALSO see ZIM Container for properties such as: width, height, widthOnly, heightOnly, draggable, level, depth, group blendMode, hue, saturation, brightness, contrast, etc. ALSO see the CreateJS Easel Docs for Container properties, such as: x, y, rotation, scaleX, scaleY, regX, regY, skewX, skewY, alpha, cursor, shadow, name, mouseChildren, mouseEnabled, parent, numChildren, etc. ACTIONEVENT This component is affected by the general ACTIONEVENT setting The default is "mousedown" - if set to something else the component will act on click (press) EVENTS loaded - is dispatched when the files(s) are uploaded - the event object comes with the following properties:    FOR IMAGES (see types array)       e.bitmaps - an array of Bitmap objects of the loaded images       e.bitmap - the first Bitmap to be created from the loaded images       e.lastBitmap - the last Bitmap to be created from the loaded images       e.total - the total Bitmap objects to be created from the loaded images    FOR TEXT (see types array)       e.texts - an array of String objects of the loaded text files       e.text - the first text loaded       e.lastText - the last text loaded       e.total - the total number of texts loaded    FOR JSON (see types array)       e.jsons - an array of JSON objects of the loaded JSON files       e.json - the first JSON object loaded       e.lastJSON - the last JSON object loaded       e.total - the total number of JSON files loaded    FOR OTHER (see types array)       e.others - an array of other objects of loaded files       e.other - the first other object loaded       e.lastOther - the last other object loaded       e.total - the total number of other files loaded ALSO see the CreateJS Easel Docs for Container events such as: added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmove, pressup, removed, rollout, rollover CLOSE ▲PAGE ▤CODE ▤VIDS
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) 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