make mip-mapping on by default

This commit is contained in:
Rachel Hwang 2017-06-13 14:22:54 -04:00
parent c82c3ec36e
commit d1ac5816d4
3 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@ Change Log
### 1.1.1 2017-04-25
* Fixed `CHANGES.md` formatting.
* Change texture sampling to use NEAREST_MIPMAP_LINEAR by default [#83](https://github.com/AnalyticalGraphicsInc/obj2gltf/pull/83).
### 1.1.0 2017-04-25

View File

@ -126,7 +126,7 @@ function createGltf(objData) {
if (Object.keys(images).length > 0) {
gltf.samplers[samplerId] = {
magFilter : WebGLConstants.LINEAR,
minFilter : WebGLConstants.LINEAR,
minFilter : WebGLConstants.NEAREST_MIPMAP_LINEAR,
wrapS : WebGLConstants.REPEAT,
wrapT : WebGLConstants.REPEAT
};

View File

@ -143,7 +143,7 @@ describe('createGltf', function() {
expect(gltf.samplers.sampler).toEqual({
magFilter : WebGLConstants.LINEAR,
minFilter : WebGLConstants.LINEAR,
minFilter : WebGLConstants.NEAREST_MIPMAP_LINEAR,
wrapS : WebGLConstants.REPEAT,
wrapT : WebGLConstants.REPEAT
});