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
5 changes: 5 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

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

View workflow job for this annotation

GitHub Actions / Lint testing

A space is required before '}'
Fixed Show fixed Hide fixed

let _object3DId = 0;

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

if ( recursive === true ) {

// de-reference (value-copy / deep clone) BufferAttributes & Material

Check failure on line 1006 in src/core/Object3D.js

View workflow job for this annotation

GitHub Actions / Lint testing

Expected indentation of 3 tabs but found 6 spaces
source.geometry = source.geometry.clone();
source.material = source.material.clone();

Check failure on line 1009 in src/core/Object3D.js

View workflow job for this annotation

GitHub Actions / Lint testing

Trailing spaces not allowed
for ( let i = 0; i < source.children.length; i ++ ) {

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