浏览代码

Revert the change introduced in https://github.com/mrdoob/three.js/pull/24181 (#24190)

Levi Pesin 3 年之前
父节点
当前提交
f1e115ca4b
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      examples/jsm/loaders/GLTFLoader.js

+ 5 - 2
examples/jsm/loaders/GLTFLoader.js

@@ -3197,7 +3197,9 @@ class GLTFParser {
 			if ( ! pointsMaterial ) {
 
 				pointsMaterial = new PointsMaterial();
-				pointsMaterial.copy( material );
+				Material.prototype.copy.call( pointsMaterial, material );
+				pointsMaterial.color.copy( material.color );
+				pointsMaterial.map = material.map;
 				pointsMaterial.sizeAttenuation = false; // glTF spec says points should be 1px
 
 				this.cache.add( cacheKey, pointsMaterial );
@@ -3215,7 +3217,8 @@ class GLTFParser {
 			if ( ! lineMaterial ) {
 
 				lineMaterial = new LineBasicMaterial();
-				lineMaterial.copy( material );
+				Material.prototype.copy.call( lineMaterial, material );
+				lineMaterial.color.copy( material.color );
 
 				this.cache.add( cacheKey, lineMaterial );