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

development example dosen't work well. #52

Closed liubgithub closed 5 years ago

liubgithub commented 6 years ago

Thanks for your good works,I have cloned this project and attempted to run the deveplement examples,but it warns with 'mesh.js:534 Material "Gold" not found in mesh. Did you forget to call addMaterialLibrary(...)?'. I have no idea whether I have overlooked something.

frenchtoast747 commented 6 years ago

The only thing I can think of is that

  1. You need to be running a local development server (like http-server
  2. You need to run that server in the root of the project so that the path ../dist/webgl-obj-loader.js resolves correctly.

I just pushed a fix to a bug that was preventing images from resolving and would thus hang on the promise. On version 1.1.3 everything is working for me with the above two steps.