MeshHelper.invertFaces and mesh.clone() problem

Software: Away3D 4.x

volzh, Newbie
Posted: 19 August 2011 02:18 AM   Total Posts: 4
var mat:ColorMaterial = new ColorMaterial(0xff0000);
mat.lights [this._dayLight];
var 
cube:Cube = new Cube(mat);
MeshHelper.invertFaces(cube);
this._scene.addChild(cube); 

above is my test code for MeshHelper.
MeshHelper.invertFaces() cause error.

var mat:ColorMaterial = new ColorMaterial(0xff0000);
mat.lights [this._dayLight];
var 
cube:Cube = new Cube(mat);
cube.scaleX = -1;
var 
copy:Mesh cube.clone() as Mesh;
this._scene.addChild(copy); 

and this is test code for clone().
when cube is added to scene,
it appears face flipped.
but cloned mesh seems not applied ‘negative’ scale.
when scaleX is assigned to -0.5,
it seems applied to 0.5.
Faces are not flipped as ‘cube’ either texture.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X