hi, there

I have just started a migration  from away3D to away3dLite. In one of
my project I have to generate faces and 3dshapes basing on changing
economic data. In old away3d I used addFace function of the mesh class
for this purpose. In away3DLite I have not found any analogy for this.
I wrote some code (see below) for more or less convenient face adding
but I suspect that I simply have not examined away3dLite well and
there is a better way to add new faces;

public function addFace(vs:Vector.<Vector3D>,uvs:Vector.<Point>):void
{
  var q:int=Math.min(vs.length,uvs.length);
  for(var i:int=0;i<q;i++)
  {
    this.pushV3D(vs[i],uvs[i]);
  }
  this._faceLengths.push(q);
}

public function pushV3D(v:Vector3D,uv:Point):void
{
  this._vertices.push(v.x,v.y,v.z);
  this._uvtData.push(uv.x,uv.y,1);
  this._indices.push(this._indicesTotal++);
}

Reply via email to