Skip to content

Commit 173cf53

Browse files
authored
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()
1 parent fde61b4 commit 173cf53

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/materials/ShaderMaterial.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ class ShaderMaterial extends Material {
279279

280280
this.glslVersion = source.glslVersion;
281281

282+
this.defaultAttributeValues = Object.assign( {}, source.defaultAttributeValues );
283+
284+
this.index0AttributeName = source.index0AttributeName;
285+
286+
this.uniformsNeedUpdate = source.uniformsNeedUpdate;
287+
282288
return this;
283289

284290
}

0 commit comments

Comments
 (0)