diff --git a/src/loaders/MaterialLoader.js b/src/loaders/MaterialLoader.js index c0e274e8fde74e051c803ebd5c587eaa503254a0..f22e097c15543c2cf64d819d3aa94b901ebd4bd3 100644 --- a/src/loaders/MaterialLoader.js +++ b/src/loaders/MaterialLoader.js @@ -115,6 +115,7 @@ THREE.MaterialLoader.prototype = { if ( json.roughnessMap !== undefined ) material.roughnessMap = this.getTexture( json.roughnessMap ); if ( json.metalnessMap !== undefined ) material.metalnessMap = this.getTexture( json.metalnessMap ); + if ( json.emissiveMap !== undefined ) material.emissiveMap = this.getTexture( json.emissiveMap ); if ( json.specularMap !== undefined ) material.specularMap = this.getTexture( json.specularMap ); if ( json.envMap !== undefined ) { diff --git a/src/materials/Material.js b/src/materials/Material.js index ae45b1960266d9c58103e35c2087cba0d1ebac00..c9230bd27744974e29406c8cca7d29c676678ead 100644 --- a/src/materials/Material.js +++ b/src/materials/Material.js @@ -172,7 +172,10 @@ THREE.Material.prototype = { } if ( this.roughnessMap instanceof THREE.Texture ) data.roughnessMap = this.roughnessMap.toJSON( meta ).uuid; if ( this.metalnessMap instanceof THREE.Texture ) data.metalnessMap = this.metalnessMap.toJSON( meta ).uuid; + + if ( this.emissiveMap instanceof THREE.Texture ) data.emissiveMap = this.emissiveMap.toJSON( meta ).uuid; if ( this.specularMap instanceof THREE.Texture ) data.specularMap = this.specularMap.toJSON( meta ).uuid; + if ( this.envMap instanceof THREE.Texture ) { data.envMap = this.envMap.toJSON( meta ).uuid; diff --git a/src/math/Quaternion.js b/src/math/Quaternion.js index 4fa833a9700f034e84af86d92ec81c134676b9d7..fe72141b1adeec12679488bdcca3f5b82550b597 100644 --- a/src/math/Quaternion.js +++ b/src/math/Quaternion.js @@ -538,7 +538,7 @@ Object.assign( THREE.Quaternion, { cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1, - dir = ( cos >= 0 ? 1 : -1 ), + dir = ( cos >= 0 ? 1 : - 1 ), sqrSin = 1 - cos * cos; // Skip the Slerp for tiny steps to avoid numeric problems: @@ -573,7 +573,7 @@ Object.assign( THREE.Quaternion, { } - dst[ dstOffset ] = x0; + dst[ dstOffset ] = x0; dst[ dstOffset + 1 ] = y0; dst[ dstOffset + 2 ] = z0; dst[ dstOffset + 3 ] = w0;