{
import away3d.containers.View3D;
import away3d.core.utils.Color;
import away3d.materials.ColorMaterial;
import away3d.primitives.Plane;
import flash.display.Sprite;
import flash.events.Event;
public class BasicPlane extends Sprite
{
private var _view:View3D;
private var _plane:Plane;
public function BasicPlane()
{
viewSet();
objectSet();
}
private function objectSet():void
{
_plane = new Plane();
_plane.bothsides = true;
_plane.yUp = false;
_plane.material = new ColorMaterial(0xff0000);
_plane.back = new ColorMaterial(0xff00ff);
_plane.width = 100;
_plane.height = 150;
_view.scene.addChild(_plane);
}
private function viewSet():void
{
_view = new View3D();
_view.x = stage.stageWidth / 2;
_view.y = stage.stageHeight / 2;
this.addChild(_view);
addEventListener(Event.ENTER_FRAME, engine);
}
private function engine(e:Event):void
{
_view.render();
_plane.rotationY += 2;
}
}
}
'ActionScript3.0 > Away3d 3' 카테고리의 다른 글
Away3d_Cylineder(); (0) | 2010.11.29 |
---|---|
Away3d_Cube(); (0) | 2010.11.29 |
Away3d_Cone(); (0) | 2010.11.29 |
Away3d_Sphere(); (0) | 2010.11.29 |
Away3d _ view3D(); (0) | 2010.11.29 |