Parcourir la source

r151 (bis) (bis)

Mr.doob il y a 2 ans
Parent
commit
4e361e96bc
7 fichiers modifiés avec 14 ajouts et 50 suppressions
  1. 4 16
      build/three.cjs
  2. 4 16
      build/three.js
  3. 0 0
      build/three.min.js
  4. 4 16
      build/three.module.js
  5. 0 0
      build/three.module.min.js
  6. 1 1
      package-lock.json
  7. 1 1
      package.json

+ 4 - 16
build/three.cjs

@@ -1479,18 +1479,6 @@ function createElementNS( name ) {
 
 
 }
 }
 
 
-function deepClone( value ) {
-
-	if ( typeof structuredClone === 'function' ) {
-
-		return structuredClone( value );
-
-	}
-
-	return JSON.parse( JSON.stringify( value ) );
-
-}
-
 function SRGBToLinear( c ) {
 function SRGBToLinear( c ) {
 
 
 	return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 );
 	return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 );
@@ -1989,7 +1977,7 @@ class Texture extends EventDispatcher {
 		this.unpackAlignment = source.unpackAlignment;
 		this.unpackAlignment = source.unpackAlignment;
 		this.encoding = source.encoding;
 		this.encoding = source.encoding;
 
 
-		this.userData = deepClone( source.userData );
+		this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
 
 		this.needsUpdate = true;
 		this.needsUpdate = true;
 
 
@@ -7885,7 +7873,7 @@ class Object3D extends EventDispatcher {
 		this.frustumCulled = source.frustumCulled;
 		this.frustumCulled = source.frustumCulled;
 		this.renderOrder = source.renderOrder;
 		this.renderOrder = source.renderOrder;
 
 
-		this.userData = deepClone( source.userData );
+		this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
 
 		if ( recursive === true ) {
 		if ( recursive === true ) {
 
 
@@ -8705,7 +8693,7 @@ class Material extends EventDispatcher {
 
 
 		this.toneMapped = source.toneMapped;
 		this.toneMapped = source.toneMapped;
 
 
-		this.userData = deepClone( source.userData );
+		this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
 
 		return this;
 		return this;
 
 
@@ -11255,7 +11243,7 @@ class BufferGeometry extends EventDispatcher {
 
 
 		// user data
 		// user data
 
 
-		this.userData = deepClone( source.userData );
+		this.userData = source.userData;
 
 
 		return this;
 		return this;
 
 

+ 4 - 16
build/three.js

@@ -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 ) {
 	function SRGBToLinear( c ) {
 
 
 		return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 );
 		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.unpackAlignment = source.unpackAlignment;
 			this.encoding = source.encoding;
 			this.encoding = source.encoding;
 
 
-			this.userData = deepClone( source.userData );
+			this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
 
 			this.needsUpdate = true;
 			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.frustumCulled = source.frustumCulled;
 			this.renderOrder = source.renderOrder;
 			this.renderOrder = source.renderOrder;
 
 
-			this.userData = deepClone( source.userData );
+			this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
 
 			if ( recursive === true ) {
 			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.toneMapped = source.toneMapped;
 
 
-			this.userData = deepClone( source.userData );
+			this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
 
 			return this;
 			return this;
 
 
@@ -11260,7 +11248,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 
 			// user data
 			// user data
 
 
-			this.userData = deepClone( source.userData );
+			this.userData = source.userData;
 
 
 			return this;
 			return this;
 
 

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
build/three.min.js


+ 4 - 16
build/three.module.js

@@ -1477,18 +1477,6 @@ function createElementNS( name ) {
 
 
 }
 }
 
 
-function deepClone( value ) {
-
-	if ( typeof structuredClone === 'function' ) {
-
-		return structuredClone( value );
-
-	}
-
-	return JSON.parse( JSON.stringify( value ) );
-
-}
-
 function SRGBToLinear( c ) {
 function SRGBToLinear( c ) {
 
 
 	return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 );
 	return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 );
@@ -1987,7 +1975,7 @@ class Texture extends EventDispatcher {
 		this.unpackAlignment = source.unpackAlignment;
 		this.unpackAlignment = source.unpackAlignment;
 		this.encoding = source.encoding;
 		this.encoding = source.encoding;
 
 
-		this.userData = deepClone( source.userData );
+		this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
 
 		this.needsUpdate = true;
 		this.needsUpdate = true;
 
 
@@ -7883,7 +7871,7 @@ class Object3D extends EventDispatcher {
 		this.frustumCulled = source.frustumCulled;
 		this.frustumCulled = source.frustumCulled;
 		this.renderOrder = source.renderOrder;
 		this.renderOrder = source.renderOrder;
 
 
-		this.userData = deepClone( source.userData );
+		this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
 
 		if ( recursive === true ) {
 		if ( recursive === true ) {
 
 
@@ -8703,7 +8691,7 @@ class Material extends EventDispatcher {
 
 
 		this.toneMapped = source.toneMapped;
 		this.toneMapped = source.toneMapped;
 
 
-		this.userData = deepClone( source.userData );
+		this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
 
 		return this;
 		return this;
 
 
@@ -11253,7 +11241,7 @@ class BufferGeometry extends EventDispatcher {
 
 
 		// user data
 		// user data
 
 
-		this.userData = deepClone( source.userData );
+		this.userData = source.userData;
 
 
 		return this;
 		return this;
 
 

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
build/three.module.min.js


+ 1 - 1
package-lock.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "three",
   "name": "three",
-  "version": "0.151.1",
+  "version": "0.151.2",
   "lockfileVersion": 2,
   "lockfileVersion": 2,
   "requires": true,
   "requires": true,
   "packages": {
   "packages": {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "three",
   "name": "three",
-  "version": "0.151.1",
+  "version": "0.151.2",
   "description": "JavaScript 3D library",
   "description": "JavaScript 3D library",
   "type": "module",
   "type": "module",
   "main": "./build/three.js",
   "main": "./build/three.js",

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff