kottore / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

[Away3DLite Haxe] #111

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. loading md2 through md2.parseGeometry function

var md2:MD2 = new MD2();
model = Lib.as(md2.parseGeometry(Resource.getBytes("test_md2").getData()),
MovieMesh);
model.material = new BitmapMaterial(new Texture());
view.scene.addchild(model);

There are missing textures in model after loading.
Example in 
http://www.brighthub.com/hubfolio/matthew-casperson/media/p/66601.aspx

rev. 2453 on win 7

It is only simple mistake in code, problem is solved when in 

away3dlite/loaders/MD2.hx

lines :
43. while (++i < num_st)
44.   uvs.push(data.readShort() / skinwidth); uvs.push((data.readShort() /
skinheight));

will be replaced by :
43. while (++i < num_st)
44. {
45.   uvs.push(data.readShort() / skinwidth);
46.   uvs.push((data.readShort() / skinheight));
47. }

after this correction all model faces will load with texture. 

Original issue reported on code.google.com by kolesar....@gmail.com on 22 Apr 2010 at 8:44

GoogleCodeExporter commented 8 years ago
Patch applied on the current svn trunk. Thanks for the patch!

Original comment by waneck on 18 Jul 2010 at 7:16