فهرست منبع

ShaderMaterial: Fix copy method to include missing properties (#32219)

* ShaderMaterial: Fix copy method to include missing properties

The copy method was missing several properties that are defined in the constructor:
- defaultAttributeValues
- index0AttributeName
- uniformsNeedUpdate

This fix ensures all ShaderMaterial properties are properly copied when cloning materials.

* Remove redundant property copies already handled by Material.copy()
Gourav N S S 2 ماه پیش
والد
کامیت
173cf53163
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      src/materials/ShaderMaterial.js

+ 6 - 0
src/materials/ShaderMaterial.js

@@ -279,6 +279,12 @@ class ShaderMaterial extends Material {
 
 		this.glslVersion = source.glslVersion;
 
+		this.defaultAttributeValues = Object.assign( {}, source.defaultAttributeValues );
+
+		this.index0AttributeName = source.index0AttributeName;
+
+		this.uniformsNeedUpdate = source.uniformsNeedUpdate;
+
 		return this;
 
 	}

粤ICP备19079148号