package com.zeronine.basicCone
{
import away3d.containers.View3D;
import away3d.materials.WireframeMaterial;
import away3d.primitives.Cone;
import flash.display.Sprite;
import flash.events.Event;
public class BasicCone extends Sprite
{
private var _view:View3D;
private var _cone:Cone;
public function BasicCone()
{
viewSet();
}
private function viewSet():void
{
_view = new View3D();
_view.x = stage.stageWidth / 2;
_view.y = stage.stageHeight / 2;
this.addChild(_view);
this.addEventListener(Event.ENTER_FRAME, engine);
coneSet();
}
private function coneSet():void
{
_cone = new Cone();
_cone.material = new WireframeMaterial(0xff0000);
_cone.radius = 80;
_cone.height = 150;
_view.scene.addChild(_cone);
}
private function engine(e:Event):void
{
_view.render();
_cone.rotationY += 2;
}
}
}
{
import away3d.containers.View3D;
import away3d.materials.WireframeMaterial;
import away3d.primitives.Cone;
import flash.display.Sprite;
import flash.events.Event;
public class BasicCone extends Sprite
{
private var _view:View3D;
private var _cone:Cone;
public function BasicCone()
{
viewSet();
}
private function viewSet():void
{
_view = new View3D();
_view.x = stage.stageWidth / 2;
_view.y = stage.stageHeight / 2;
this.addChild(_view);
this.addEventListener(Event.ENTER_FRAME, engine);
coneSet();
}
private function coneSet():void
{
_cone = new Cone();
_cone.material = new WireframeMaterial(0xff0000);
_cone.radius = 80;
_cone.height = 150;
_view.scene.addChild(_cone);
}
private function engine(e:Event):void
{
_view.render();
_cone.rotationY += 2;
}
}
}
'ActionScript3.0 > Away3d 3' 카테고리의 다른 글
Away3d_Cylineder(); (0) | 2010.11.29 |
---|---|
Away3d_Cube(); (0) | 2010.11.29 |
Away3d_Plane(); (0) | 2010.11.29 |
Away3d_Sphere(); (0) | 2010.11.29 |
Away3d _ view3D(); (0) | 2010.11.29 |