雖然chowky 支持papervision 的MIT license多一點,只不多apache license 的away 3D 的performance 真的 very impressive. 已經有愈來愈多的gaming 都採用away 3d 來做。
怎開一個flex project 和加入away 3d 的library 就不提了,自己找找吧。
Away 3D 要用actionscript 來加入的,away 3d 的是利用了View3D作為他的container class.
override protected function createChildren():void
{
super.createChildren();
view = new View3D();
addChild( view );
view.addEventListener(Event.ADDED_TO_STAGE, update);
}
RectangleClipping 就好似一個mask ,大過mask的部份就會不顯示。
private function update(e:* = null):void
{
view.x = unscaledWidth/2;
view.y = unscaledHeight/2;
view.clipping = new RectangleClipping({minX:-unscaledWidth/2,minY:-unscaledHeight/2,maxX:unscaledWidth/2,maxY:unscaledHeight/2});
view.render();
}
最後當然是要加入updateDisplayList,因為每一次 flex refresh screen 的時候就會call 這個method.
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
update();
}
Sample Application
View Source
Source: http://www.flashmagazine.com/tutorials/detail/using_away3d_with_flex/


#1 by joseph smariela on July 25, 2010 - 12:18 am
Whether is shoes or a new dress, the accessories are the key. In today’s trends, keeping up to the latest is become a challenge, a expense for sure. Quality cost quite a lot these days.