Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BufferAttributes and Materials are cloned by reference for Object3D instances, no matter what #30351

Closed
wants to merge 13 commits into from
4 changes: 4 additions & 0 deletions src/core/Object3D.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import { Layers } from './Layers.js';
import { Matrix3 } from '../math/Matrix3.js';
import { generateUUID } from '../math/MathUtils.js';
import { BufferGeometry } from './BufferGeometry.js';

Check warning on line 9 in src/core/Object3D.js

View workflow job for this annotation

GitHub Actions / Lint testing

'BufferGeometry' is defined but never used
Fixed Show fixed Hide fixed

let _object3DId = 0;

Expand Down Expand Up @@ -1002,6 +1003,9 @@

if ( recursive === true ) {

source.geometry = source.geometry.clone();
source.material = source.material.clone();

for ( let i = 0; i < source.children.length; i ++ ) {

const child = source.children[ i ];
Expand Down
Loading