Away3D
iteye_13072
这个作者很懒,什么都没留下…
展开
-
Away3D Lite:Basic_SceneSetup
scene = new Scene3D();// 亦可添加参数:camera = new Camera3D({z:-1000});camera = new Camera3D();camera.z = -1000;// 亦可添加参数:view = new View3D({scene:scene, camera:camera});view = new View3D();...2009-11-20 16:35:06 · 133 阅读 · 0 评论 -
Away3D(八):Texture mapping
BitmapMaterial:用于简单texture mappingvar earthMaterial:BitmapMaterial = new BitmapMaterial(Cast.bitmap(earthBitmap)); BitmapMaterial:使用 smooth (减少材质像素化)和 precision (the texture should b...2009-12-04 16:09:36 · 80 阅读 · 0 评论 -
Away3D(七):Primitives(Part 3)
The Cone:(圆锥)// create three cones with different optionscone1 = new Cone({material:"red#black",segmentsH:3,segmentsW:15,heigth:100,radius:50,x:-170});view.scene.addChild(cone1);// ope...2009-12-04 14:58:38 · 88 阅读 · 0 评论 -
Flash3D 编程技巧:全景浏览的键盘交互(Away3D)
创建三个侦听:this.stage.addEventListener(KeyboardEvent.KEY_DOWN,onKeyDown);this.stage.addEventListener(KeyboardEvent.KEY_UP,onKeyUp);this.addEventListener(Event.ENTER_FRAME,onEnterFrame); ...2009-12-04 14:12:16 · 183 阅读 · 0 评论 -
Away3D(六):Primitives(Part 2)
The Trident:(坐标轴) var axis:Trident = new Trident();view.scene.addChild(axis); // 三个坐标轴的长度都是200,并且都标有X,Y,Z字母var axis:Trident = new Trident(200,true); The RegularPolygon:(普通多边形)...2009-12-04 14:07:00 · 78 阅读 · 0 评论 -
Away3D(五):Primitives(Part 1)
The Triangle:var tri:Triangle = new Triangle();tri.a = new Vertex(0,200,0);tri.b = new Vertex(100,0,0);tri.c = new Vertex(-100,0,0);tri.bothsides = true;view.scene.addChild(tri);...2009-12-01 17:03:01 · 83 阅读 · 0 评论 -
Away3D(四):Create the Earth and heavens in less than an hour with Away3D
原文:http://www.flashmagazine.com/Tutorials/detail/create_the_earth_and_heavens_in_less_than_an_hour_with_away3d/ 译文:http://www.flashas.net/as/20090414/4038.html 1. 若出现破面现象,采用以下代码v...2009-12-01 16:18:32 · 89 阅读 · 0 评论 -
Flash3D编程技巧:物体环视浏览器(Away3D)
定义一些以后会用到的变量:private var View:View3D;// HoverCam controlsprivate var camera:HoverCamera3D;private var lastMouseX:Number;private var lastMouseY:Number;private var lastPanAngle:Num...2009-11-30 19:59:52 · 211 阅读 · 0 评论 -
Away3D(三):Manipulating 3D objects
Movement in 3D space:三种方法:(世界坐标)// 一cube.x = 100;cube.y = -100;cube.z = 100;// 二cube.position = new Number3D(100,-100,300);// 三cube.moveTo(100,-100,300); 如果你想让一个object面...2009-11-30 19:55:04 · 70 阅读 · 0 评论 -
Away3D(二):The View and the Scene
The View:var view:View3D = new View3D();addChild(view); 缺省情况下,view没有被剪裁,需要设置clipping属性才行View = new View3D({scene:viewScene,camera:cam,x:w/2,y:h/2});var myClip:RectangleClipping...2009-11-30 19:49:42 · 72 阅读 · 0 评论 -
Away3D(一):The Camera(s)
原理图:Away3D Cameras:var cam:Camera3D = new Camera3D({zoom:5,focus:200});var cam:Camera3D = new Camera3D({zoom:5,focus:200});cam.zoom = 5;cam.focus = 200;cam.pan = 45; // 水平方...2009-11-30 19:44:22 · 88 阅读 · 0 评论 -
Flash3D 编程技巧:全景浏览的鼠标交互(Away3D Lite)
1. 注册侦听器addEventListener(Event.ENTER_FRAME, onEnterFrame);stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp); 2. MouseD...2009-11-26 14:20:16 · 183 阅读 · 0 评论 -
Away3D Lite:Flex Project 使用模板
1. 3D as实现类,同ActionScript Project一致package{ import away3dlite.materials.*; import away3dlite.primitives.*; import away3dlite.templates.*; [SWF(backgroundColor="#000000", frameRat...2009-11-26 09:57:08 · 102 阅读 · 0 评论 -
Away3D Lite:Others
使用TargetCamera:// 将camera锁定住对象meshtargetCamera = new TargetCamera3D(10, 100, mesh);targetCamera.z = -1000;// 给view赋值:新的cameraview.camera = targetCamera; 锁定摄像机视角:ov...2009-11-24 19:42:01 · 89 阅读 · 0 评论 -
Away3D Lite:ExMD2Cubic
加载MD2模型文件:// 位图文件材质var material:BitmapFileMaterial = new BitmapFileMaterial("assets/pg.png");material.smooth = true;// MD2文件类var md2:MD2 = new MD2();md2.material = material;mat...2009-11-24 19:28:34 · 80 阅读 · 0 评论 -
Away3D Lite:ExCollada
采用FastTemplate模板:默认start()// Template setup designed for speed. public class ExCollada extends FastTemplate{} onInit():// Fired on instantiation of the template.ove...2009-11-24 15:26:38 · 106 阅读 · 0 评论 -
Away3D Lite:Basic_LoadModel
开启Debug模式:具体什么作用,尚不知// Class for emmiting debuging messages, warnings and errors.Debug.active = true; 引入外部文件创建材质:[Embed(source="assets/fskingr.jpg")]private var GreenPaint:...2009-11-24 13:57:48 · 104 阅读 · 0 评论 -
Away3D Lite:Basic_InteractiveObject
初始化引擎:scene = new Scene3D();// 创建一个俯瞰镜头// Extended camera used to hover round a specified target objectcamera = new HoverCamera3D();camera.focus = 50;// 镜头距离中心点的距离camera.distan...2009-11-22 20:29:44 · 78 阅读 · 0 评论 -
Away3D(九):Lighting & shading
Away3D中的光照可以分为三个基本要素:the light source(s) defining the properties of the light(s)light source(s) 定义了光照的属性shaders providing algorithms that determine how a light source i...2009-12-05 10:37:30 · 138 阅读 · 0 评论