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

remove unused reference to document so you can use this lib in a worker #11

Closed nickdesaulniers closed 9 years ago

nickdesaulniers commented 9 years ago

In fact, this entire lib should be written to always work within a worker. For a mesh like the Stanford Dragon (~9MB), this lib would block the main thread. I've been using it in a worker, but it should create a worker no matter what, since all browsers that support WebGL all support web workers. It should also divide up the parsing work between a few workers using a work stealing algorithm, since it takes a few seconds (too long) to parse large meshes.