Here is a quick example of contructing a cube using Planes instead of the Cube primitive in Papervision3D. Click the picture to view the opening and shutting cube.
-Once the cube is open, click the bottom of the inside in order to close it again.
This technique makes it possible to open and close the cube, so you can hide little goodies inside of it.
The rotation of the top plane makes it all a little more difficult.
You’d think you would be able to easily rotate a plane to create this effect, but because objects rotate from their center, you have to make a little work-around to rotate a plane from its edge.
Basically, you’ve got to create an empty DisplayObject3D, and place its center on the edge you want to rotate from. Then you create the plane you want to rotate, and attach it to the empty DisplayObject3D.
So then when you want to rotate the plane, you simply rotate the empty DisplayObject3D instead of the plane itself, and, tada.. it works.
Happy New Year, here’s the source!