Browse Source

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

Levi Pesin 3 years ago
parent
commit
f1e115ca4b
1 changed files with 5 additions and 2 deletions
  1. 5 2
      examples/jsm/loaders/GLTFLoader.js

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

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