2010年1月16日 星期六

Away3D Texture Mapping Learning

與 Papervision3D 完全不同的寫法, 不過一樣簡單

Away3D 如要使用 Texture Mapping 就要使用 TransformBitmapMaterial
e.g.
material = new TransformBitmapMaterial(Cast.bitmap(headBmp), { repeat:true, scaleX:.5, scaleY:.5 } );

"repeat" 屬性就相等於 "tile"
scaleX & scaleY 就相等於 mapping 的UV比例

可以看看以下範例:


Source

沒有留言:

張貼留言