Geometry scale ?!

Software: Away3D 4.x

Avatar
loth, Sr. Member
Posted: 29 October 2013 03:38 PM   Total Posts: 236

Hello i’m on version of oimophysics with worker
and i use sea3d format, i use many object clone with the same geometry

i needed to scale geometry and sea3d forum give me the solution so :

in away3d.core.base.SubGeometryBase class.

default is

public function scale(scale:Number):void
{
   
var vertices:Vector.<Number> = UVData;
   var 
len:uint vertices.length;
   var 
offset:int vertexOffset;
   var 
stride:int vertexStride;
 
   for (var 
i:uint offsetlen+= stride{
      vertices[i] 
*= scale;
      
vertices[i 1] *= scale;
      
vertices[i 2] *= scale;
   
}

and the good one should be

public function scale(scale:Number):void
{
   
var vertices:Vector.<Number> = vertexData;
   var 
len:uint vertices.length;
   var 
offset:int vertexOffset;
   var 
stride:int vertexStride;
 
   for (var 
i:uint offsetlen+= stride{
      vertices[i] 
*= scale;
      
vertices[i 1] *= scale;
      
vertices[i 2] *= scale;
   
}

is a error or they are any reason scale uvdata ?
thank’s

   

John Brookes, Moderator
Posted: 29 October 2013 04:35 PM   Total Posts: 732   [ # 1 ]

Yeah should be vertexData, although you would only notice the issue if you were not using CompactSubGeometry.

Submit bug on git.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X