Here is the source code for the Magic Carpet demo, just unpack it in your project directory of choice and import the project in Flex Builder, making sure to resolve the dependancies as it makes use of the following packages:

Let me explain the modifications in APE: i just wanted the engine to perform the timestep in a fixed fashion, so i initially modified it to accept a value, expressed in Hz, that represents the integrator’s timestep to be used, this way no matter if different machines have different framerates, animating will be the same everywhere.

Then i was in need to rebuild the mesh at runtime since i wanted to be able to define tesselation and spacing directly from the UI: by trying to modify the values i got huge slowdowns and hangs that i have no clue of what that was, until later on i realized that APE was creating and attaching hundred of Sprite objects to its container. I tried to use a NullSprite object since i thought it would be ok to provide a reference to a common null-painter object, but that won’t did the trick, so i just settled things once and for all and removed most of the “presentation” logic in it as also i really had no need to have Sprite objects instanced and added for every particle and spring.

Download Magic Carpet v1.0b5 src

*UPDATE*
I uploaded a video on YouTube if you just want to take a look at it: