PV3D Cube

by phi16
なにがなんだかようわからん

複数のCubeを一気に回転させる方法だれかおしえてください><
♥0 | Line 29 | Modified 2011-06-27 00:30:47 | MIT License
play

ActionScript3 source code

/**
 * Copyright phi16 ( http://wonderfl.net/user/phi16 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/9CqC
 */

package {
    import flash.events.Event
    import org.papervision3d.view.BasicView
    import org.papervision3d.lights.*
    import org.papervision3d.materials.utils.MaterialsList;
    import org.papervision3d.materials.shadematerials.*
    import org.papervision3d.objects.primitives.*
    public class CubeTest extends BasicView{ 
        public var cube:Cube;
        public function CubeTest(){
            var light:PointLight3D=new PointLight3D(true);
            light.x=300;
            light.y=300;
            light.z=-300;
            var material:PhongMaterial=new PhongMaterial(light,0x000000,0x666666,0);
            var materialList:MaterialsList=new MaterialsList({all:material});
            cube=new Cube(materialList,100,100,100);
            scene.addChild(cube);
            camera.x=0;
            camera.y=300;
            camera.z=0.00000001;
            startRendering();
            addEventListener(Event.ENTER_FRAME,Loop);
        }
        public function Loop(e:Event):void{
            cube.rotationY+=5;
        }
    }
}