Skip to content

Conversation

@jespertheend
Copy link
Contributor

@jespertheend jespertheend commented Aug 15, 2023

Fixed #26588

Description

Previously, calling Object3D.clone() would not clone material arrays. Causing the new object to share a reference to the array of the old object. This change fixes that, preventing unexpected modifications to the wrong object.

@github-actions
Copy link

github-actions bot commented Aug 15, 2023

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
646 kB (160.2 kB) 646.2 kB (160.3 kB) +135 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
439.1 kB (106.3 kB) 439.1 kB (106.4 kB) +45 B

@jespertheend jespertheend marked this pull request as ready for review August 15, 2023 21:44
@Mugen87 Mugen87 added this to the r156 milestone Aug 16, 2023
@Mugen87 Mugen87 merged commit 03b6cc6 into mrdoob:dev Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clone the material array when Object3D.clone() is called

4 participants