obj2gltf/lib
Janusz Bossy 573cdc244f Adds texture overrides for independent materials
Allows passing a `materialOverrides` option to the `loadMtl` function.
When generating a new material parsed from the `.mtl` file the overrides
that are specific to this material are applied first before the global
material overrides already existing in the code. This allows the users
to specify different set of materials to override for a model. Following
is an example value for the `materialOverrides` key:

```
{
  "material1Name": {
    "alphaTexture": "path_to_the_texture_file",
    "ambientTexture": "path_to_the_texture_file",
    "diffuseTexture": "path_to_the_texture_file",
    "emissiveTexture": "path_to_the_texture_file",
    "normalTexture": "path_to_the_texture_file",
    "specularTexture": "path_to_the_texture_file",
    "specularShininessTexture": "path_to_the_texture_file",
  }
}
```

It's possible to define more than one material override. If the `.mtl`
file has materials that were not provided in the `materialOverrides`
option they are loaded from the `.mtl` file without any overrides.
2020-07-07 15:45:28 +02:00
..
ArrayStorage.js var to let/const 2019-02-05 22:03:42 -05:00
Texture.js Reorganization of material loading and returning buffer rather than writing file 2017-08-08 15:09:00 -04:00
createGltf.js Fix for when specular and diffuse reference the same texture 2019-10-26 20:07:29 -04:00
getBufferPadded.js var to let/const 2019-02-05 22:03:42 -05:00
getJsonBufferPadded.js var to let/const 2019-02-05 22:03:42 -05:00
gltfToGlb.js var to let/const 2019-02-05 22:03:42 -05:00
loadMtl.js Adds texture overrides for independent materials 2020-07-07 15:45:28 +02:00
loadObj.js Merge branch 'master' into absolute-paths 2019-10-29 13:59:34 -04:00
loadTexture.js Fix for when specular and diffuse reference the same texture 2019-10-26 20:07:29 -04:00
obj2gltf.js Fix default value in doc 2019-08-26 07:56:03 -04:00
outsideDirectory.js var to let/const 2019-02-05 22:03:42 -05:00
readLines.js eslint fixes 2019-10-27 15:28:30 -04:00
writeGltf.js Don't let separate resources exceed Node buffer size limit 2019-03-19 21:25:42 -04:00