sunag 3 недель назад
Родитель
Сommit
843e32fcc8

+ 60 - 30
build/three.cjs

@@ -1948,6 +1948,36 @@ function log( ...params ) {
 
 }
 
+/**
+ * Enhances log/warn/error messages related to TSL.
+ *
+ * @param {Array<any>} params - The original message parameters.
+ * @returns {Array<any>} The filtered and enhanced message parameters.
+ */
+function enhanceLogMessage( params ) {
+
+	const message = params[ 0 ];
+
+	if ( typeof message === 'string' && message.startsWith( 'TSL:' ) ) {
+
+		const stackTrace = params[ 1 ];
+
+		if ( stackTrace && stackTrace.isStackTrace ) {
+
+			params[ 0 ] += ' ' + stackTrace.getLocation();
+
+		} else {
+
+			params[ 1 ] = 'Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.';
+
+		}
+
+	}
+
+	return params;
+
+}
+
 /**
  * Logs a warning message with the 'THREE.' prefix.
  *
@@ -1960,6 +1990,8 @@ function log( ...params ) {
  */
 function warn( ...params ) {
 
+	params = enhanceLogMessage( params );
+
 	const message = 'THREE.' + params.shift();
 
 	if ( _setConsoleFunction ) {
@@ -1968,7 +2000,17 @@ function warn( ...params ) {
 
 	} else {
 
-		console.warn( message, ...params );
+		const stackTrace = params[ 0 ];
+
+		if ( stackTrace && stackTrace.isStackTrace ) {
+
+			console.warn( stackTrace.getError( message ) );
+
+		} else {
+
+			console.warn( message, ...params );
+
+		}
 
 	}
 
@@ -1986,6 +2028,8 @@ function warn( ...params ) {
  */
 function error( ...params ) {
 
+	params = enhanceLogMessage( params );
+
 	const message = 'THREE.' + params.shift();
 
 	if ( _setConsoleFunction ) {
@@ -1994,7 +2038,17 @@ function error( ...params ) {
 
 	} else {
 
-		console.error( message, ...params );
+		const stackTrace = params[ 0 ];
+
+		if ( stackTrace && stackTrace.isStackTrace ) {
+
+			console.error( stackTrace.getError( message ) );
+
+		} else {
+
+			console.error( message, ...params );
+
+		}
 
 	}
 
@@ -51465,7 +51519,7 @@ class PropertyMixer {
 		this._addIndex = 4;
 
 		/**
-		 * TODO
+		 * Accumulated weight of the property binding.
 		 *
 		 * @type {number}
 		 * @default 0
@@ -51473,7 +51527,7 @@ class PropertyMixer {
 		this.cumulativeWeight = 0;
 
 		/**
-		 * TODO
+		 * Accumulated additive weight of the property binding.
 		 *
 		 * @type {number}
 		 * @default 0
@@ -51481,7 +51535,7 @@ class PropertyMixer {
 		this.cumulativeWeightAdditive = 0;
 
 		/**
-		 * TODO
+		 * Number of active keyframe tracks currently using this property binding.
 		 *
 		 * @type {number}
 		 * @default 0
@@ -51489,7 +51543,7 @@ class PropertyMixer {
 		this.useCount = 0;
 
 		/**
-		 * TODO
+		 * Number of keyframe tracks referencing this property binding.
 		 *
 		 * @type {number}
 		 * @default 0
@@ -57159,30 +57213,6 @@ class PointLightHelper extends Mesh {
 
 		this.update();
 
-
-		/*
-	// TODO: delete this comment?
-	const distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 );
-	const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );
-
-	this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );
-	this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );
-
-	const d = light.distance;
-
-	if ( d === 0.0 ) {
-
-		this.lightDistance.visible = false;
-
-	} else {
-
-		this.lightDistance.scale.set( d, d, d );
-
-	}
-
-	this.add( this.lightDistance );
-	*/
-
 	}
 
 	/**

+ 60 - 30
build/three.core.js

@@ -1946,6 +1946,36 @@ function log( ...params ) {
 
 }
 
+/**
+ * Enhances log/warn/error messages related to TSL.
+ *
+ * @param {Array<any>} params - The original message parameters.
+ * @returns {Array<any>} The filtered and enhanced message parameters.
+ */
+function enhanceLogMessage( params ) {
+
+	const message = params[ 0 ];
+
+	if ( typeof message === 'string' && message.startsWith( 'TSL:' ) ) {
+
+		const stackTrace = params[ 1 ];
+
+		if ( stackTrace && stackTrace.isStackTrace ) {
+
+			params[ 0 ] += ' ' + stackTrace.getLocation();
+
+		} else {
+
+			params[ 1 ] = 'Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.';
+
+		}
+
+	}
+
+	return params;
+
+}
+
 /**
  * Logs a warning message with the 'THREE.' prefix.
  *
@@ -1958,6 +1988,8 @@ function log( ...params ) {
  */
 function warn( ...params ) {
 
+	params = enhanceLogMessage( params );
+
 	const message = 'THREE.' + params.shift();
 
 	if ( _setConsoleFunction ) {
@@ -1966,7 +1998,17 @@ function warn( ...params ) {
 
 	} else {
 
-		console.warn( message, ...params );
+		const stackTrace = params[ 0 ];
+
+		if ( stackTrace && stackTrace.isStackTrace ) {
+
+			console.warn( stackTrace.getError( message ) );
+
+		} else {
+
+			console.warn( message, ...params );
+
+		}
 
 	}
 
@@ -1984,6 +2026,8 @@ function warn( ...params ) {
  */
 function error( ...params ) {
 
+	params = enhanceLogMessage( params );
+
 	const message = 'THREE.' + params.shift();
 
 	if ( _setConsoleFunction ) {
@@ -1992,7 +2036,17 @@ function error( ...params ) {
 
 	} else {
 
-		console.error( message, ...params );
+		const stackTrace = params[ 0 ];
+
+		if ( stackTrace && stackTrace.isStackTrace ) {
+
+			console.error( stackTrace.getError( message ) );
+
+		} else {
+
+			console.error( message, ...params );
+
+		}
 
 	}
 
@@ -51463,7 +51517,7 @@ class PropertyMixer {
 		this._addIndex = 4;
 
 		/**
-		 * TODO
+		 * Accumulated weight of the property binding.
 		 *
 		 * @type {number}
 		 * @default 0
@@ -51471,7 +51525,7 @@ class PropertyMixer {
 		this.cumulativeWeight = 0;
 
 		/**
-		 * TODO
+		 * Accumulated additive weight of the property binding.
 		 *
 		 * @type {number}
 		 * @default 0
@@ -51479,7 +51533,7 @@ class PropertyMixer {
 		this.cumulativeWeightAdditive = 0;
 
 		/**
-		 * TODO
+		 * Number of active keyframe tracks currently using this property binding.
 		 *
 		 * @type {number}
 		 * @default 0
@@ -51487,7 +51541,7 @@ class PropertyMixer {
 		this.useCount = 0;
 
 		/**
-		 * TODO
+		 * Number of keyframe tracks referencing this property binding.
 		 *
 		 * @type {number}
 		 * @default 0
@@ -57157,30 +57211,6 @@ class PointLightHelper extends Mesh {
 
 		this.update();
 
-
-		/*
-	// TODO: delete this comment?
-	const distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 );
-	const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );
-
-	this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );
-	this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );
-
-	const d = light.distance;
-
-	if ( d === 0.0 ) {
-
-		this.lightDistance.visible = false;
-
-	} else {
-
-		this.lightDistance.scale.set( d, d, d );
-
-	}
-
-	this.add( this.lightDistance );
-	*/
-
 	}
 
 	/**

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/three.core.min.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 2
build/three.tsl.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/three.tsl.min.js


Разница между файлами не показана из-за своего большого размера
+ 223 - 998
build/three.webgpu.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/three.webgpu.min.js


Разница между файлами не показана из-за своего большого размера
+ 223 - 998
build/three.webgpu.nodes.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/three.webgpu.nodes.min.js


Некоторые файлы не были показаны из-за большого количества измененных файлов

粤ICP备19079148号