`
sjkgxf7191
  • 浏览: 251714 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

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 ,不然没有效果

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics