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. 若出现破面现象,采用以下代码

var view:View3D = new View3D({scene:scene, camera:camera, renderer:Renderer.CORRECT_Z_ORDER});

2. 双面渲染 & 翻转材质方向

// 双面渲染
object3D.bothsides = true;
// 翻转材质
object3D.invertFaces();

3. 给object3D添加滤镜

var myFilter1:Array = new Array()
myFilter1.push(new GlowFilter(0xFFFFAA, 1, 25, 25, 3, 1, false, false));
// Defines whether the contents of the 3d object are rendered using it's own render session 
sun.ownCanvas=true;
sun.filters=myFilter1;

相关推荐