frenchtoast747 / webgl-obj-loader

A simple OBJ model loader to help facilitate the learning of WebGL.
http://frenchtoast747.github.io/webgl-obj-loader/
MIT License
282 stars 59 forks source link

UV layout, error in the code. #55

Closed dybiszb closed 6 years ago

dybiszb commented 6 years ago

Hi there, I just spotted that (webgl-obj-loader.js; line 866): _case layout.Layout.UV.key: dataView.setFloat32(offset, this.textures[i 2], true); dataView.setFloat32(offset + 4, this.vertices[i 2 + 1], true);

probably should look like _case layout.Layout.UV.key: dataView.setFloat32(offset, this.textures[i 2], true); dataView.setFloat32(offset + 4, this.textures[i 2 + 1], true);

which seems to solve a small problem that I had with correct gBuffer mappings ; D

frenchtoast747 commented 6 years ago

Thanks, @dybiszb, for finding the issue and reporting!

Fixed on master. I will be doing a release with the fix later on.

dybiszb commented 6 years ago

No problem - my pleasure ; )