Away3D(八):Texture mapping

BitmapMaterial :用于简单texture mapping

var earthMaterial:BitmapMaterial = new BitmapMaterial(Cast.bitmap(earthBitmap));

 

BitmapMaterial :使用 smooth 减少材质像素化 )和 precision (the texture should be correctly rendered to within 2 pixels )属性

var away3DMaterial:BitmapMaterial = new BitmapMaterial(Cast.bitmap(away3DBitmap), {smooth:true, precision:2});
 

TransformBitmapMaterial :可以用于平铺材质tile image)

var tiledAway3DMaterial:TransformBitmapMaterial = new TransformBitmapMaterial(Cast.bitmap(away3DBitmap), {repeat:true, scaleX:.5, scaleY:.5});

 

repeat 必须 设置为 true ,不然没有效果

 

 

你可能感兴趣的:(Away3D)