I like cubes… Papervision3D exploding cubes especially

The cubewall
A simple XML driven gallery (noooo way, not another one!). I like cubes. So I made an exploding wall. Sorry, no source – it’s too crappy. Anyway: Additionally there will be some more functionality if I ever find time. Physics for instance…

Well, basically I create a matrix of cubes (slices) which get skinned with a BitmapMaterial. While going through the loop building the small cubes, I slice the bitmap material as well and assign it to one side (or more if one wishes).

There is an example here to get the main idea: http://pv3d.org/2009/04/09/sliced-cube/

Getting data from XML, I cycle through the small cubes (foreach cube in matrix), explode them (Tweener) and re-skin the material.

cubes[cubesIndex].replaceMaterialByName(createSlicedBitmapMaterial(material, sliceX, sliceWidth, sliceY, sliceHeight), „back“);

Hmmm… well, after skinning it, the cubes will be moved to their initial position. That’s it.

Dieser Post ist auch verfügbar auf: Englisch

Kommentar verfassen