Re-sizing Material

Software: Away3D 4.x

Munty, Newbie
Posted: 10 May 2012 04:58 AM   Total Posts: 3

Hey Guys,

I am still pretty new to Away3d, this combined with a lack of tutorials on the new 4.0 beta version might make this seem like a really newbie question. Recently switched to Away3d 4.0 beta in the middle of a project and had some issues with the new texture material. In previous versions, if you were to apply a material onto a primitive such as a cube for example, the material would automatically re-size to fit on the faces. However, when I combine texture materials and cube geometry in a mesh, the size is distorted. Could anyone show me the correct way to apply texture material so that it fits correctly onto the faces of a cube?

thanks!

   

marronnier, Newbie
Posted: 14 May 2012 08:57 PM   Total Posts: 17   [ # 1 ]
[Embed(source="../../../../../asstmp/arrow.png")]
private var myCube:Class;

var 
bTexture:BitmapTexture = new BitmapTexture(new myCube().bitmapData);
var 
mat:TextureMaterial = new TextureMaterial(bTexturetruefalsefalse); 
var 
cubeMesh:Mesh = new Mesh(new CubeGeometry(646464111false), mat);
addChild(cubeMesh); 

For using tile6 property some fixes needed :)

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X