After Merge To One Mesh - My Scene Get Slower

Software: Away3D 4.x

Concept Z, Sr. Member
Posted: 01 August 2011 10:08 AM   Total Posts: 124
private function extrudeWall (wallArr:Array):void {
  
  
  mergeTool 
= new Merge(false,true);
  
  
_finalWallMesh = new Mesh();  
  
  var 
wallNum wallArr.length;
  
  for (var 
i:uint =0;i<wallNumi++ ){
   
   
var path:Vector.<Vector3D> = new Vector.<Vector3D >([new Vector3D(),new Vector3D()]);
   
path[0]wallArr[i][0];   
   
path[1]wallArr[i][1];  
   
   var 
wallExtrude = new LinearExtrude(wallMaterialpathLinearExtrude.Y_AXIS301false3,1,nullfalse,false""false);
   
            
_finalWallMeshArr.push (Mesh(wallExtrude));
           
//wallContainer.addChild(wallExtrude);      
   

   
 _finalWallMesh
mergeTool.applyToMeshes(Mesh(_finalWallMeshArr.shift()), _finalWallMeshArr);
   
_finalWallMesh.materialwallMaterial;
  
wallContainer.addChild(_finalWallMesh);
  
  
  
  


I was very confused why after the merge to one mesh , my scene get much more PLOYs and runs very slow than before ?

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Avatar
Fabrice Closier, Administrator
Posted: 03 August 2011 10:35 AM   Total Posts: 1265   [ # 1 ]

I have just uploaded a fix to Merge class. Don’t know if it will affect your code for sure, but it will certainly not slow it down.

   

Concept Z, Sr. Member
Posted: 10 August 2011 09:23 AM   Total Posts: 124   [ # 2 ]

After merge , still get much more POLYS than before… and under Flash Player 11 beta2 , it throw errors…

http://away3d.com/forum/viewthread/471/

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X