ZIM js JavaScript Framework

Canvas Components, Controls and more!

ZIM 5.0 Launches with Particle Emitter for #HTML #Canvas with #JavaScript and #CreateJS with #ZIMjs

ZIM 5 has launched with a new concept called a ZIM VEE value.  http://zimjs.com This allows for dynamic parameters and works in conjunction with a new global command called zik() to pick from the options provided by the ZIM VEE value when needed.

For example, the new ZIM Emitter class emits particles.  We can pass in an object to emit, for instance a Circle, and the Emitter will clone the object and shoot out circles.  Well, we might want different types of particles to emit.  We can’t randomize the particle and pass in the random particle because the Emitter would then emit that one type of particle.  So instead, we pass in a ZIM VEE value of options and zik() will pick from the options each time the Emitter emits.

The ZIM VEE value can be one of the three following types – although if you pass just a single value like a Circle or a Number, etc. then this will pass through unchanged.

  1. An array of options: [new zim.Circle(), new zim.Rectangle()]
  2. A function that returns a value: function(){return Date.now();}
  3. A ZIM RAND object literal: {min:10, max:20, integer:true, negative:true}

The first two are also recursive so you can pass in an array of functions or have a function return an array that holds multiple ZIM RAND objects, etc.

In the case of the Emitter, we could pass in [new zim.Circle(), new zim.Rectangle()] and the Emitter would emit Circles and Rectangles.  Or we could pass in a function that creates a unique snowflake and each time, the Emitter would emit a unique snowflake.

ZIM interval() also accepts ZIM VEE values so now we can easily have a variable time interval:

zim.interval({min:1000, max:3000}, function() {
  zog("random delays!");

ZIM 5 also comes with a wiggle() method that works well with the Emitter to wiggle the sink of the Emitter.  The sink attracts particles.  So you can make a flame wiggle around or make snowflakes swirl in the wind.

This is a CODE launch of ZIM 5 – the site… entitled ZIM VEE will launch in a few months with an all new look and support for FIVE satellite modules: Physics, 3D, Game, Pizzazz, and Socket modules.  There will also be animated avatars and a philosophical side so stay tuned!  http://zimjs.com and of course see the Bubbling videos on all this!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


This entry was posted on May 2, 2017 by in animation, design, interactive media, javascript, launch, physics and tagged , , , , , , , , , .
%d bloggers like this: