【发布时间】:2014-10-04 01:54:13
【问题描述】:
您好,我尝试使用 png 对球体进行纹理处理,但它应用了错误的纹理并将其弄乱了。 在正确设置之前,我找不到任何方法来移动它并使用纹理/材料。 我想创建一个足球并将其应用为球纹理 这是我用来创建材料并应用它的代码 谢谢
[Embed(source=”../assets/Ball.png”)]
public static var TheBallTextureClass:Class;
public var TheBallMaterial:TextureMaterial;
var theball:Mesh;
TheBallTexture = new BitmapTexture(new TheBallTextureClass().bitmapData);
TheBallMaterial = new TextureMaterial(Cast.bitmapTexture(TheBallTexture));
TheBallMaterial.smooth = true;
TheBallMaterial.repeat = true;
theball = new Mesh(new SphereGeometry(30), _ballMaterial);
【问题讨论】:
标签: actionscript-3 flash textures away3d