提交 9ce5de81 编写于 作者: M Mr.doob

Material/MaterialLoader: Handle emissiveMap.

上级 de3ee0a7
......@@ -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 ) {
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册