Cloth Demo

This demo is a combination of the new drawing API features like drawTriangles combined with an object made from APE (ActionScript Physics Engine). The texture that is mapped across the shape in this demo can be an image, video, pixel bender or simple color.

In the color demo you can see that the cloth has two sides. This is done with the concept of backface culling. When drawing triangles, you can specify if positive or negative triangles should be bypassed in rendering. This means that for a 3D app, you don’t need to double render, but for this far simpler example you can draw the negative triangles with a different texture by doinga second fill process where you don’t draw the positive triangles.

more to come!

Cloth demo detail images

BTW, if you are using APE and want to export to for Flash Player 10, you will need to go through and rename the Vector Class to something else since it will conflict with the new Vector data type.