away3D操纵三维物体之静态立方体实例

/*在fb下新建as项目运行此实例*/

Basic07_cube.as
package{
	import away3d.containers.View3D;
	import away3d.primitives.Cube;
	
	import flash.display.Sprite;
	
	[SWF(width="500", height="400", frameRate="60", backgroundColor="#FFFFFF")]
	
	public class Basic07_cube extends Sprite{
		public function Basic07_cube(){
			var myView:View3D = new View3D({x:250, y:200});    // create a viewport
			addChild(myView);
			var cube:Cube = new Cube();    // create a sphere and put it on the 3D stage
			myView.scene.addChild(cube);
			myView.render();    // render the view
		}
		
	}
}

你可能感兴趣的:(Flash)