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

Merge pull request #7780 from JamesHagerman/dev

Removing uuid assumption from MaterialLoader.parse() but on the dev b…
......@@ -49,7 +49,11 @@ THREE.MaterialLoader.prototype = {
parse: function ( json ) {
var material = new THREE[ json.type ];
material.uuid = json.uuid;
if ( json.uuid !== undefined) {
material.uuid = json.uuid;
} else {
material.uuid = THREE.Math.generateUUID();
}
if ( json.name !== undefined ) material.name = json.name;
if ( json.color !== undefined ) material.color.setHex( json.color );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册