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

Reverted MMDLoader Object.assign() change. See #10151.

上级 7bc1c5d5
......@@ -1076,7 +1076,7 @@ THREE.MMDLoader.prototype.createMesh = function ( model, texturePath, onProgress
var p = materialParams[ i ];
var p2 = model.materials[ i ];
var m = new THREE.ShaderMaterial( {
uniforms: Object.assign( {}, shader.uniforms ),
uniforms: THREE.UniformsUtils.clone( shader.uniforms ),
vertexShader: shader.vertexShader,
fragmentShader: shader.fragmentShader
} );
......@@ -1983,18 +1983,18 @@ THREE.MMDLoader.CubicBezierInterpolation.prototype._calculate = function( x1, x2
*/
THREE.ShaderLib[ 'mmd' ] = {
uniforms: Object.assign(
uniforms: THREE.UniformsUtils.merge( [
THREE.ShaderLib[ 'phong' ].uniforms,
// MMD specific for toon mapping
{
"celShading" : { type: "i", value: 0 },
"toonMap" : { type: "t", value: null },
"hasToonTexture" : { type: "i", value: 0 }
},
THREE.ShaderLib[ 'phong' ].uniforms
}
),
] ),
vertexShader: THREE.ShaderLib[ 'phong' ].vertexShader,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册