Skip to content

Commit

Permalink
ZIM Cat 04 - added PWA(), custom ease, and more
Browse files Browse the repository at this point in the history
CAT 04 - Codename Diamond

ZIM EASE
https://zimjs.com/ease
Customize the easing equation with sliders
and pass results into ZIM animate()
Looks like this ease:zimEase([1.746,0.4,-0.91,0.8])
Added "snap", "ballistic" and "slowmo" eases with In, Out and InOut settings
These act like the existing eases "elasticIn", "backInOut", etc.
See https://zimjs.com/cat/easeexamples.html

ZAPPS TOOL -- PWA 82.4
https://zimjs.com/zapps.html
Made a tool to create and zip the files for a PWA (Progressive Web App)
This looks like Distill, Wonder and AssetTool (which have been slightly modernized).
This was quite a large undertaking and we hope it turned out well.
The system takes the place of 70 steps to make mobile apps using GitHub, PhoneGapBuild, signing keys, etc.
Added a PWA() class in ZIM that the tool will insert (or can be done manually)
This is used to make a custom message when on mobile browser to add to mobile home screen (A2HS)
The rest of the system creates the following files:
    manifest.json
    serviceworker.js
    libraries/ directory with local zim and createjs files
    icons/ directory with icons
    zapp.html with file calls and meta tags (and PWA call)
    readme.txt - with instructions to replace index with zapp.html code
The code page has been updated to feature the tool (see Code Page updates)

ZAPPS vs ZAP
We know that we already have a ZIM Zap tool down in the gold bars
this is for sharing files and will remain as is.
We will refer to the new Zapps tool in the plural.
Zapps is how we would like to refer to the projects we make with ZIM
You are welcome to call your projects Zapps too - or a Zapp (singular)
It is Z for ZIM and apps for apps - but Zapps also sound really fast!
And that is a great thing about ZIM - we can make apps fast!  Zapps!

SVG ASSETS
https://zimjs.com/cat/svg.html
SVG is now automatically converted to a Bitmap - thanks carddealer for the prompting
when passed into the Frame assets parameter or frame.loadAssets() assets parameter.
This can be used directly as a bitmap with asset("pic.svg").center(); etc;
The original SVG is available as an svg property on the bitmap.
The original SVG can be used in SVGContainer() to make it editable with Blob, Squiggle and transform.
The SVGContainer is still considered experimental and may not accept all SVG
But a while back, it was improved to handle arcs properly.
Added width and height parameters to svgToBitmap()
Added params parameter to svgToBitmap to pass object through to callback after bitmap param
used internally by Frame to handle SVG images

TIMECHECK
now defaults to false.  You can turn it to true to make sure that your times are good.

MOBILE FPS
Default FPS for mobile has been changed from 30fps to 60fps now that most devices are more powerful
this can be set back with Ticker.setFPS(30,60); for 30 on mobile and 60 on desktop.

KIDS
https://zimjs.com/slate
Added Phone and Portrait CheckBoxes to ZIM Kids - thanks Karel Rosseel for the idea

KEYBOARD LAYOUTS
https://zimjs.com/cat/keyboard.html
Added layout parameter (at end) with "arabic", "hebrew", "turkish" and "azerty" settings (or "querty" default).
These change the data to show different keyboards.
Thanks Hussein Ghaly (arabic), Racheli Golan (hebrew), Ferudun Vural (turkish) and Karel Roseel (azerty).
Also added an override mapping for lower to upper and upper to lower case letters to the data parameter data.
Adjusted data to handle any number of rows (min 10) for custom layouts
And added a "back" special key that is like "backspace" but only takes up one key size
The "spacebar" now takes up whatever space is left so the bottom row is always at the max number of columns

GRID
Added allowToggle, cache and numbers parameters before style parameter
Added numbersX and numbersY properties to individually set visible false if desired
These changes make the Grid ready to be used for charts

GENERAL
Added dragPaused property to objects with drag() to pause or unpause dragging
this keeps setting like boundary where noDrag() does not
BREAK Added a corner parameter and property to Triangle after borderWidth and before center parameter
new Triangle(500,500,500,red,black,5,[20,20,100]).center()
A negative wait time can be provided to animations in the animate() series
this will start an animation before the previous animation ends - thanks Ami Hanya for the excellent idea
Added a toggle() method and toggled property to List when accordion is set
this will toggle the outermost (first) accordion - good for opening and closing a pulldown - thanks Ofweird Top for the suggestion!
Removed a test for touch to scroll page in tag mode if swiping on stage on allowDefault true
It was causing double mouse events - will see if we can figure out a way to do the page scroll.
updated the code page Organization to latest ZIM
Made Dial accept currentValue style - left it out previously
Made Slider and Dial accept VEE for min, max, step and currentValue
also set these so delayPick works for instance, when tiling
List animateTo() has its timePerItem fixed = was switched the wrong way for s/ms
Adjusted List to capture selectedIndex, selected when tabs are used
Adjusted List to animateTo() an item if tabbing and the item is not in view (top left reg assumed)
Tabs - added keyLoop parameter at end before style which defaults to true to wrap tabs when tab key reaches end or start
made List set keyLoop to false so List does not go past its ends when the tab key is used.
Made Layout accept DisplayObjects as region objects - for default values
eg. new Layout(stage, [header, content, footer]) gets converted to
new Layout(stage, [{object:header}, {object:content}, {object:footer}])
Made it so an object passed into Layout as a region will update its outline() if there is one
Made debug() chainable in physics (and updateDebug(), removeDebug())
Made ColorPicker have a selectedColor parameter along with the existing selectedIndex parameter
BREAK for the List accordion tree object, changed the arrow property to expander
with three types: "plus", "arrow" or "none" - thanks Ofweird Top for the suggestion.
Also adjusted list to not apply backgroundColor style for label (not item, but actual label) that messes up rollover and shade colors
Fixed ZIM ISO example https://zimjs.com/iso/ to not have scaling problem with older game module.

CODE PAGE
Updated Code template to include less comments.
Updated Meta Tags examples https://zimjs.com/templates/meta.html
Added FONT to ZIM Tips
Reorganized the Code Page as follows:
    removed the last sections: organization, treats, createjs, principles, programming
    and added them to a darkpaper page - linked to in the Code Help section.
    Converted these to ES6 as well.
    Shortened the template and removed the "minimal" template.
    Linked to more to get to the rest of the templates so removed the second template section.
    Added a FEATURES section with Mobile (Zapps), SHIM for Animate and Accessibility.
    This leaves the following sections:
    START, FEATURES, CDN, HELP, TOOLS and LIBRARIES
    Inserted a link bar to these in between each of the sections for easy navigation
    Took Badges out of HELP and added Medium and DevTO site in HELP.

CREATEJS GITHUB
updated ZIM CreateJS to 1.3.3 (Codename Diamond - 10 years!)
but also made the following legacy changes to the CreateJS GitHub repository:
Fixed Polystar last bevel or miter
CreateJS/EaselJS#1046
Added drawPolygon() and pg() graphics methods
CreateJS/EaselJS#1058
Adjusted MovieClip to not avoid extra processing if one frame
CreateJS/EaselJS#1048
Adjusted SoundJS XHR test locally as was giving errors for local sounds
It still gives a warning for needing to interact before playing sounds
We are not playing the sound but just testing
So we respond with a warning that says sounds are ready to play.
CreateJS/SoundJS@5213ac5
Adjusted TweenJS to add a hook for change tween properties dynamically
CreateJS/TweenJS@6df2b9c

NOT yet added to CreateJS repository - will test - but is in the ZIM 1.3.3 createjs:
Fixed selecting on touch screen on Chrome issue with allowDefault false
Thanks Ferudun for testing and thoughts.
CreateJS/EaselJS#997
  • Loading branch information
danzen committed Apr 18, 2021
1 parent 8ab505f commit 4f90d29
Showing 1 changed file with 1,747 additions and 498 deletions.
Loading

0 comments on commit 4f90d29

Please sign in to comment.