|
@@ -1484,18 +1484,6 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
|
|
|
|
|
|
}
|
|
|
|
|
|
- function deepClone( value ) {
|
|
|
-
|
|
|
- if ( typeof structuredClone === 'function' ) {
|
|
|
-
|
|
|
- return structuredClone( value );
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- return JSON.parse( JSON.stringify( value ) );
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
function SRGBToLinear( c ) {
|
|
|
|
|
|
return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 );
|
|
@@ -1994,7 +1982,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
|
|
|
this.unpackAlignment = source.unpackAlignment;
|
|
|
this.encoding = source.encoding;
|
|
|
|
|
|
- this.userData = deepClone( source.userData );
|
|
|
+ this.userData = JSON.parse( JSON.stringify( source.userData ) );
|
|
|
|
|
|
this.needsUpdate = true;
|
|
|
|
|
@@ -7890,7 +7878,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
|
|
|
this.frustumCulled = source.frustumCulled;
|
|
|
this.renderOrder = source.renderOrder;
|
|
|
|
|
|
- this.userData = deepClone( source.userData );
|
|
|
+ this.userData = JSON.parse( JSON.stringify( source.userData ) );
|
|
|
|
|
|
if ( recursive === true ) {
|
|
|
|
|
@@ -8710,7 +8698,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
|
|
|
|
|
|
this.toneMapped = source.toneMapped;
|
|
|
|
|
|
- this.userData = deepClone( source.userData );
|
|
|
+ this.userData = JSON.parse( JSON.stringify( source.userData ) );
|
|
|
|
|
|
return this;
|
|
|
|
|
@@ -11260,7 +11248,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
|
|
|
|
|
|
// user data
|
|
|
|
|
|
- this.userData = deepClone( source.userData );
|
|
|
+ this.userData = source.userData;
|
|
|
|
|
|
return this;
|
|
|
|