WireframeMapGenerator.as - causing exception - is this a bug ?

Software: Away3D 4.x

Penry, Newbie
Posted: 13 February 2013 03:33 PM   Total Posts: 1

Hi - I’m very new here (downloaded Away3D 4.1.0 Alpha a couple of hours ago) - i’m working through tutorials to get going, and came across what looks to me like a possible bug.

The tutorial code i’m using is here -> http://www.flashmagazine.com/Tutorials/detail/away3d_4_basics_-_the_view_and_the_scene/

put simply, it creates a couple of simple shapes and revolves them.  But when run i’m getting an exeption cause by WireframeMapGenerator.as .

specifically, looking at lines 77 to 80 of that as file :

do {
uvs[i]*w; ++i;
texSpaceUV[i] uvs[i]*h;
while (++len); 

this shows the variable i is incremented twice in the loop - however in the example i’m running, len is an odd number - so on the final pass the second texSpaceUV causes an exception “Error #1125: The index 2873 is out of range 2873.”

is the first ++i eroneous ?



Rhaedes, Newbie
Posted: 21 May 2013 04:55 PM   Total Posts: 2   [ # 1 ]

Hi! I have just come across this error, too.

As far as I know, this should work:

var mesh:Mesh = new Mesh(new SphereGeometry( ));
uvMap:BitmapData WireframeMapGenerator.generateSolidMap(mesh);
mesh.material= new TextureMaterial(new BitmapTexture(uvMap)); 

But the sphere is covered in a bizarre ‘galaxy-like’ swirl, rather than straight white lines marking the edges.

Passing paramaters to SphereGeometry() often results in a crash (rather than a distorted UV map), with an index out of range error.

I’ve tried this with the CubeGeometry, too, with the same result.




Rhaedes, Newbie
Posted: 21 May 2013 08:14 PM   Total Posts: 2   [ # 2 ]

Rolled back from 4.1.1 to 4.0.9 and the problem has gone.

It appears to be a problem with the ISubGeometry, since UVData, instead of containing pairs of numbers, contains groups of 13.



Away3D Forum

Member Login