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
281 stars 59 forks source link

Support N-gons in an OBJ model #25

Closed frenchtoast747 closed 5 years ago

frenchtoast747 commented 9 years ago

Currently, if a model has more than 4 vertices in a face, the model will not load correctly and will have gaps. To prevent this from happening, the model first needs to be pre-processed and triangulated to make it WebGL happy.

This is somewhat of a pain for people wanting to learn WebGL, but not care about how model files are laid out (or how to use some third party program to pre-process the file).

Instead, the model should be converted to triangles on the fly.

qtip commented 6 years ago

We should have the library emit a warning message with a description of the problem and suggestions for fixing it at the very least.

frenchtoast747 commented 5 years ago

Support for N-gons has been added in v2.0.3