Stage3D Demos #1

Pocket

Stage3D is fantastic evolution of Flash Player. I created some demo from older Flash 3D demo. I use Alternativa3D.

remaked from Visual Art Demo.

remaked from PV3D Sample #4 : Simple tiled motion of photo display.

Alternativa Template

I made an Alternativa3D Template Class such as PV3D’s BasicView Class.

Sample code is here.

package {
    import alternativa.engine3d.materials.FillMaterial;
    import alternativa.engine3d.primitives.Box;
    import org.libspark.alternativa3d.view.AlternativaTemplate;

    public class Main extends AlternativaTemplate {
        private var box:Box;

        override protected function atInit():void {
            var material:FillMaterial = new FillMaterial(0xFFFFFF, 0.5);

            box = new Box(500, 500, 500, 5, 5, 5);
            box.setMaterialToAllSurfaces(material);
            scene.addChild(box);
        }

        override protected function atPreRender():void {

            box.rotationY += 1 * Math.PI / 180;
            box.rotationZ += 1 * Math.PI / 180;
        }
    }
}