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

error #62

Closed haroel closed 5 years ago

haroel commented 5 years ago
  1. download the same image mutiple times, you can get all images paths and set in the hashmap, then,download in queue;
  2. error check filename( see below)
haroel commented 5 years ago

it should be this


for (const materialName in mtl.materials) {
    if (!mtl.materials.hasOwnProperty(materialName)) {
        continue;
    }
    const material = mtl.materials[materialName];
    for (const attr of mapAttributes) {
        const mapData = material[attr];
        // check if mapData.filename isnot empty
        if (!mapData **|| !mapData.filename** ) {
            continue;
        }
frenchtoast747 commented 5 years ago

Hi @haroel, thank you for filing this issue.

I'm not quite understanding. Could you provide the error that is occurring either by pasting the text or a screenshot of the console error?

frenchtoast747 commented 5 years ago

Closing, unless more information can be provided.