Kaleidoscope with Box2d physics
Move the mouse left and right over the kaleidoscope to change rotation speed.
Refereshing will generate new shapes.
This was just a little project to get familiar with Box2d AS3 physics engine. It creates and layers two discreet simulations of semitransparent pieces. This is what the simulation of one looks like before it is skinned
The pieces are skinned using ActionScript 3.0 drawing methods. It then uses Grant Skinner’s Kaleidoscope class to reflect the animation 6 times.
I think there are some useful pieces of code in here:
– Drawing routines for graphic polygons.
– Drawing routines for Box2d polygons.
– A simple actor class that creates and manages Box2d bodies and their visible counter parts
– Circular physics container (made of boxes).
Download the source code here.
The source code includes version 2.1a of Box2d for AS3 and Grant Skinner’s Kaleidoscope class.