Releases: danzen/zimjs
ZIM 2.0 - DUO
ZIM 2.0 is here code name, DUO. There are now two ways to pass parameters... the traditional way and now with a single object having properties that match the parameter names. This means we can avoid long lists of nulls as we try and get to a parameter near the end of the signature! For example:
var but = new zim.Button(200, 50, "hello", null, null, null, null, 0); to set the corner to 0 becomes:
var but = new zim.Button({width:200, height:50, label:"hello", corner:0});
So not necessarily shorter, although it can be, but a lot less counting parameters.
zob() is the function that allows this to work. At the top of the function your add this code:
var duo; if (duo = zob(yourFunction, arguments)) return duo;
Replace yourFunction with your function name (note that arguments.callee does not work in strict mode)
arguments stays as arguments as it is collecting the parameter values.
zob checks for a single object literal as a sole parameter
and if found, matches things up and recalls the function
NOTE - if you are minifying the code, you will need to adjust this slightly to pass in a signature string
(see docs)
The CDN strategy has changed for ZIM 2.0. All the 2.0 modules are minified automatically.
Only the file with _doc on the end for the main zim file is un-minified.
ZIM 1.5.0
Updates Parallax class in ZIM Build so that along with mouseX and mouseY, the class also handles scrollX and scrollY as well as any custom input for instance from a slider. This allows parallax to be used with scroll bars. An example of a scrolling parallax site is available as is a stand alone zimparallax.js file. ZIM has been stable for the last while. We would like to do a slider component... and there will be upcoming advanced interfaces like socket but for cam motion detection, perhaps animating to sound, etc.
ZIM 1.4.0
Adds a Frame module to simplify the start template for ZIM projects. The Frame class in the Frame module handles making the canvas and the stage as well as scaling the stage in a variety of ways - full, fit, outside, and none. The Frame object provides events for rescaling and orientation change as well as stage, stageW, stateH, and orientation properties. There is also a redrawCanvas to completely redraw the canvas and make a new stage if desired. Usually you can handle this with the full scaling setting but redrawCanvas could be handy for orientation changes in the fit, outside and none modes.
ZIMjs 1.3.0
Adds Guide and GuideManager classes, a scaleTo() function, documentation rewrite to be able to pull a directory and summary from the code to a docs page http://zimjs.code/docs.html and a number of additional parameters and checks.
ZIMjs 1.2.0
Added Pages Module, combined Code and DOM modules. Added components to the Build module. Updated inline documentation.
ZIMjs 1.0.0
Initial release of ZIMjs - Interactive Media Modules