ZIM js JavaScript Framework

Canvas Components, Controls and more!

Physics Engines with ZIM – Box2D, JavaScript and Createjs


ZIM and CreateJS work with Physics Engines such as Box2D.  Above is a more complex example with buoyancy and sensors.  Press the yellow area to add more ingredients or hold a key down to go all Swedish Chef!

A simple example shows how to use ZIM Physics to easily set up a Box2D world, add rectangle, circle and triangle bodies and map them to ZIM shapes. ZIM Physics also lets you easily apply mouse interaction, borders around your stage, and abstracts away about 80% of the Box2D verbose code.


ZIM Physics gives you access to the Box2D world as a world property.  So you can still apply any custom Box2D code.  You can insert function to apply forces into the update function by using physics.Ticker.add(function, after) where after defaults to true to place the function after the world step and clearing of forces.  Setting after to false will place the function before the world step.

So cool! Try it out at http://zimjs.com



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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s


This entry was posted on September 16, 2016 by in interactive media, javascript, physics and tagged , , , , , , , , , , .


%d bloggers like this: