未验证 提交 a6e78f8e 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #13635 from donmccurdy/bug-gltfloader-default-material

GLTFLoader: Fix default for missing material.pbrMetallicRoughness
......@@ -1871,14 +1871,14 @@ THREE.GLTFLoader = ( function () {
materialType = kmuExtension.getMaterialType( materialDef );
pending.push( kmuExtension.extendParams( materialParams, materialDef, parser ) );
} else if ( materialDef.pbrMetallicRoughness !== undefined ) {
} else {
// Specification:
// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#metallic-roughness-material
materialType = THREE.MeshStandardMaterial;
var metallicRoughness = materialDef.pbrMetallicRoughness;
var metallicRoughness = materialDef.pbrMetallicRoughness || {};
materialParams.color = new THREE.Color( 1.0, 1.0, 1.0 );
materialParams.opacity = 1.0;
......@@ -1909,10 +1909,6 @@ THREE.GLTFLoader = ( function () {
}
} else {
materialType = THREE.MeshPhongMaterial;
}
if ( materialDef.doubleSided === true ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册