Webgl Obj Loader Versions Save

A simple OBJ model loader to help facilitate the learning of WebGL.

v2.0.8

4 years ago

Provider better support for requireJS/AMD imports.

v2.0.6

4 years ago

The triangulation of n-gons was not functionion properly (see #69).

v2.0.5

4 years ago

Webpack 4's UMD output would, for some reason, dump window as the global object by default. This updates the webpack config to dump a check instead of blindly using window.

v2.0.4

4 years ago

Simple bump to update dependencies with security issues and to ensure that filenames are normalized.

v2.0.3

5 years ago

Provides support for N-gons using an elementary triangulate method. Any help for a more advanced triangulate method would be greatly appreciated!

v2.0.2

5 years ago

2.0.2

  • Updated to TypeScript
  • Breaking change: the Mesh option indicesPerMaterial has been removed in favor of always providing the indices per material.
    • Instead of mesh.indices holding an array of arrays of numbers, mesh.indicesPerMaterial will now hold the indices where the top level array index is the index of the material and the inner arrays are the indices for that material.
  • Breaking change: the Layout class has changed from directly applying attributes to the Layout instance to creating an attributeMap

v1.0.0

6 years ago

Added MTL parsing support

  • Modularized all of the source files into ES6 modules.
    • The Mesh, MaterialLibrary, and Material classes are now actual ES6 classes.
  • Added tests for each of the classes
    • Found a bug in the Mesh class. Vertex normals would not appear if the face declaration used the shorthand variant; e.g. f 1/1
  • Provided Initial MTL file parsing support.
    • Still requires Documentation. For now, have a look at the tests in the test directory for examples of use.
    • Use the new downloadModels() function in order to download the OBJ meshes complete with their MTL files attached. If the MTL files reference images, by default, those images will be downloaded and attached.
  • The downloading functions now use the new fetch() API which utilizes promises.