Skip to content

Commit 843e32f

Browse files
committed
Updated builds.
1 parent 849d328 commit 843e32f

File tree

9 files changed

+621
-2117
lines changed

9 files changed

+621
-2117
lines changed

build/three.cjs

Lines changed: 60 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,6 +1948,36 @@ function log( ...params ) {
19481948

19491949
}
19501950

1951+
/**
1952+
* Enhances log/warn/error messages related to TSL.
1953+
*
1954+
* @param {Array<any>} params - The original message parameters.
1955+
* @returns {Array<any>} The filtered and enhanced message parameters.
1956+
*/
1957+
function enhanceLogMessage( params ) {
1958+
1959+
const message = params[ 0 ];
1960+
1961+
if ( typeof message === 'string' && message.startsWith( 'TSL:' ) ) {
1962+
1963+
const stackTrace = params[ 1 ];
1964+
1965+
if ( stackTrace && stackTrace.isStackTrace ) {
1966+
1967+
params[ 0 ] += ' ' + stackTrace.getLocation();
1968+
1969+
} else {
1970+
1971+
params[ 1 ] = 'Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.';
1972+
1973+
}
1974+
1975+
}
1976+
1977+
return params;
1978+
1979+
}
1980+
19511981
/**
19521982
* Logs a warning message with the 'THREE.' prefix.
19531983
*
@@ -1960,6 +1990,8 @@ function log( ...params ) {
19601990
*/
19611991
function warn( ...params ) {
19621992

1993+
params = enhanceLogMessage( params );
1994+
19631995
const message = 'THREE.' + params.shift();
19641996

19651997
if ( _setConsoleFunction ) {
@@ -1968,7 +2000,17 @@ function warn( ...params ) {
19682000

19692001
} else {
19702002

1971-
console.warn( message, ...params );
2003+
const stackTrace = params[ 0 ];
2004+
2005+
if ( stackTrace && stackTrace.isStackTrace ) {
2006+
2007+
console.warn( stackTrace.getError( message ) );
2008+
2009+
} else {
2010+
2011+
console.warn( message, ...params );
2012+
2013+
}
19722014

19732015
}
19742016

@@ -1986,6 +2028,8 @@ function warn( ...params ) {
19862028
*/
19872029
function error( ...params ) {
19882030

2031+
params = enhanceLogMessage( params );
2032+
19892033
const message = 'THREE.' + params.shift();
19902034

19912035
if ( _setConsoleFunction ) {
@@ -1994,7 +2038,17 @@ function error( ...params ) {
19942038

19952039
} else {
19962040

1997-
console.error( message, ...params );
2041+
const stackTrace = params[ 0 ];
2042+
2043+
if ( stackTrace && stackTrace.isStackTrace ) {
2044+
2045+
console.error( stackTrace.getError( message ) );
2046+
2047+
} else {
2048+
2049+
console.error( message, ...params );
2050+
2051+
}
19982052

19992053
}
20002054

@@ -51465,31 +51519,31 @@ class PropertyMixer {
5146551519
this._addIndex = 4;
5146651520

5146751521
/**
51468-
* TODO
51522+
* Accumulated weight of the property binding.
5146951523
*
5147051524
* @type {number}
5147151525
* @default 0
5147251526
*/
5147351527
this.cumulativeWeight = 0;
5147451528

5147551529
/**
51476-
* TODO
51530+
* Accumulated additive weight of the property binding.
5147751531
*
5147851532
* @type {number}
5147951533
* @default 0
5148051534
*/
5148151535
this.cumulativeWeightAdditive = 0;
5148251536

5148351537
/**
51484-
* TODO
51538+
* Number of active keyframe tracks currently using this property binding.
5148551539
*
5148651540
* @type {number}
5148751541
* @default 0
5148851542
*/
5148951543
this.useCount = 0;
5149051544

5149151545
/**
51492-
* TODO
51546+
* Number of keyframe tracks referencing this property binding.
5149351547
*
5149451548
* @type {number}
5149551549
* @default 0
@@ -57159,30 +57213,6 @@ class PointLightHelper extends Mesh {
5715957213

5716057214
this.update();
5716157215

57162-
57163-
/*
57164-
// TODO: delete this comment?
57165-
const distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 );
57166-
const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );
57167-
57168-
this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );
57169-
this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );
57170-
57171-
const d = light.distance;
57172-
57173-
if ( d === 0.0 ) {
57174-
57175-
this.lightDistance.visible = false;
57176-
57177-
} else {
57178-
57179-
this.lightDistance.scale.set( d, d, d );
57180-
57181-
}
57182-
57183-
this.add( this.lightDistance );
57184-
*/
57185-
5718657216
}
5718757217

5718857218
/**

build/three.core.js

Lines changed: 60 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1946,6 +1946,36 @@ function log( ...params ) {
19461946

19471947
}
19481948

1949+
/**
1950+
* Enhances log/warn/error messages related to TSL.
1951+
*
1952+
* @param {Array<any>} params - The original message parameters.
1953+
* @returns {Array<any>} The filtered and enhanced message parameters.
1954+
*/
1955+
function enhanceLogMessage( params ) {
1956+
1957+
const message = params[ 0 ];
1958+
1959+
if ( typeof message === 'string' && message.startsWith( 'TSL:' ) ) {
1960+
1961+
const stackTrace = params[ 1 ];
1962+
1963+
if ( stackTrace && stackTrace.isStackTrace ) {
1964+
1965+
params[ 0 ] += ' ' + stackTrace.getLocation();
1966+
1967+
} else {
1968+
1969+
params[ 1 ] = 'Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.';
1970+
1971+
}
1972+
1973+
}
1974+
1975+
return params;
1976+
1977+
}
1978+
19491979
/**
19501980
* Logs a warning message with the 'THREE.' prefix.
19511981
*
@@ -1958,6 +1988,8 @@ function log( ...params ) {
19581988
*/
19591989
function warn( ...params ) {
19601990

1991+
params = enhanceLogMessage( params );
1992+
19611993
const message = 'THREE.' + params.shift();
19621994

19631995
if ( _setConsoleFunction ) {
@@ -1966,7 +1998,17 @@ function warn( ...params ) {
19661998

19671999
} else {
19682000

1969-
console.warn( message, ...params );
2001+
const stackTrace = params[ 0 ];
2002+
2003+
if ( stackTrace && stackTrace.isStackTrace ) {
2004+
2005+
console.warn( stackTrace.getError( message ) );
2006+
2007+
} else {
2008+
2009+
console.warn( message, ...params );
2010+
2011+
}
19702012

19712013
}
19722014

@@ -1984,6 +2026,8 @@ function warn( ...params ) {
19842026
*/
19852027
function error( ...params ) {
19862028

2029+
params = enhanceLogMessage( params );
2030+
19872031
const message = 'THREE.' + params.shift();
19882032

19892033
if ( _setConsoleFunction ) {
@@ -1992,7 +2036,17 @@ function error( ...params ) {
19922036

19932037
} else {
19942038

1995-
console.error( message, ...params );
2039+
const stackTrace = params[ 0 ];
2040+
2041+
if ( stackTrace && stackTrace.isStackTrace ) {
2042+
2043+
console.error( stackTrace.getError( message ) );
2044+
2045+
} else {
2046+
2047+
console.error( message, ...params );
2048+
2049+
}
19962050

19972051
}
19982052

@@ -51463,31 +51517,31 @@ class PropertyMixer {
5146351517
this._addIndex = 4;
5146451518

5146551519
/**
51466-
* TODO
51520+
* Accumulated weight of the property binding.
5146751521
*
5146851522
* @type {number}
5146951523
* @default 0
5147051524
*/
5147151525
this.cumulativeWeight = 0;
5147251526

5147351527
/**
51474-
* TODO
51528+
* Accumulated additive weight of the property binding.
5147551529
*
5147651530
* @type {number}
5147751531
* @default 0
5147851532
*/
5147951533
this.cumulativeWeightAdditive = 0;
5148051534

5148151535
/**
51482-
* TODO
51536+
* Number of active keyframe tracks currently using this property binding.
5148351537
*
5148451538
* @type {number}
5148551539
* @default 0
5148651540
*/
5148751541
this.useCount = 0;
5148851542

5148951543
/**
51490-
* TODO
51544+
* Number of keyframe tracks referencing this property binding.
5149151545
*
5149251546
* @type {number}
5149351547
* @default 0
@@ -57157,30 +57211,6 @@ class PointLightHelper extends Mesh {
5715757211

5715857212
this.update();
5715957213

57160-
57161-
/*
57162-
// TODO: delete this comment?
57163-
const distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 );
57164-
const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );
57165-
57166-
this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );
57167-
this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );
57168-
57169-
const d = light.distance;
57170-
57171-
if ( d === 0.0 ) {
57172-
57173-
this.lightDistance.visible = false;
57174-
57175-
} else {
57176-
57177-
this.lightDistance.scale.set( d, d, d );
57178-
57179-
}
57180-
57181-
this.add( this.lightDistance );
57182-
*/
57183-
5718457214
}
5718557215

5718657216
/**

build/three.core.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/three.tsl.js

Lines changed: 1 addition & 3 deletions
Large diffs are not rendered by default.

build/three.tsl.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)