@needle-tools/three 0.169.3 → 0.169.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/three.cjs +363 -359
- package/build/three.module.js +363 -359
- package/build/three.module.min.js +1 -1
- package/build/three.webgpu.js +313 -313
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +313 -313
- package/build/three.webgpu.nodes.min.js +1 -1
- package/package.json +1 -1
- package/src/renderers/webxr/WebXRManager.js +5 -1
package/build/three.cjs
CHANGED
|
@@ -241,7 +241,7 @@ class EventDispatcher {
|
|
|
241
241
|
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
if ( listeners[ type ].indexOf( listener ) === -
|
|
244
|
+
if ( listeners[ type ].indexOf( listener ) === -1 ) {
|
|
245
245
|
|
|
246
246
|
listeners[ type ].push( listener );
|
|
247
247
|
|
|
@@ -255,7 +255,7 @@ class EventDispatcher {
|
|
|
255
255
|
|
|
256
256
|
const listeners = this._listeners;
|
|
257
257
|
|
|
258
|
-
return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== -
|
|
258
|
+
return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== -1;
|
|
259
259
|
|
|
260
260
|
}
|
|
261
261
|
|
|
@@ -270,7 +270,7 @@ class EventDispatcher {
|
|
|
270
270
|
|
|
271
271
|
const index = listenerArray.indexOf( listener );
|
|
272
272
|
|
|
273
|
-
if ( index !== -
|
|
273
|
+
if ( index !== -1 ) {
|
|
274
274
|
|
|
275
275
|
listenerArray.splice( index, 1 );
|
|
276
276
|
|
|
@@ -559,15 +559,15 @@ function denormalize( value, array ) {
|
|
|
559
559
|
|
|
560
560
|
case Int32Array:
|
|
561
561
|
|
|
562
|
-
return Math.max( value / 2147483647.0, -
|
|
562
|
+
return Math.max( value / 2147483647.0, -1 );
|
|
563
563
|
|
|
564
564
|
case Int16Array:
|
|
565
565
|
|
|
566
|
-
return Math.max( value / 32767.0, -
|
|
566
|
+
return Math.max( value / 32767.0, -1 );
|
|
567
567
|
|
|
568
568
|
case Int8Array:
|
|
569
569
|
|
|
570
|
-
return Math.max( value / 127.0, -
|
|
570
|
+
return Math.max( value / 127.0, -1 );
|
|
571
571
|
|
|
572
572
|
default:
|
|
573
573
|
|
|
@@ -1009,7 +1009,7 @@ class Vector2 {
|
|
|
1009
1009
|
|
|
1010
1010
|
// clamp, to handle numerical problems
|
|
1011
1011
|
|
|
1012
|
-
return Math.acos( clamp$1( theta, -
|
|
1012
|
+
return Math.acos( clamp$1( theta, -1, 1 ) );
|
|
1013
1013
|
|
|
1014
1014
|
}
|
|
1015
1015
|
|
|
@@ -1610,7 +1610,7 @@ function toNormalizedProjectionMatrix( projectionMatrix ) {
|
|
|
1610
1610
|
function toReversedProjectionMatrix( projectionMatrix ) {
|
|
1611
1611
|
|
|
1612
1612
|
const m = projectionMatrix.elements;
|
|
1613
|
-
const isPerspectiveMatrix = m[ 11 ] === -
|
|
1613
|
+
const isPerspectiveMatrix = m[ 11 ] === -1;
|
|
1614
1614
|
|
|
1615
1615
|
// Reverse [0, 1] projection matrix
|
|
1616
1616
|
if ( isPerspectiveMatrix ) {
|
|
@@ -1646,9 +1646,9 @@ const LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = /*@__PURE__*/ new Matrix3().set(
|
|
|
1646
1646
|
);
|
|
1647
1647
|
|
|
1648
1648
|
const LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = /*@__PURE__*/ new Matrix3().set(
|
|
1649
|
-
1.2249401, -
|
|
1650
|
-
-
|
|
1651
|
-
-
|
|
1649
|
+
1.2249401, -0.2249404, 0.0,
|
|
1650
|
+
-0.0420569, 1.0420571, 0.0,
|
|
1651
|
+
-0.0196376, -0.0786361, 1.0982735
|
|
1652
1652
|
);
|
|
1653
1653
|
|
|
1654
1654
|
/**
|
|
@@ -3303,7 +3303,7 @@ class Quaternion {
|
|
|
3303
3303
|
|
|
3304
3304
|
let s = 1 - t;
|
|
3305
3305
|
const cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,
|
|
3306
|
-
dir = ( cos >= 0 ? 1 : -
|
|
3306
|
+
dir = ( cos >= 0 ? 1 : -1 ),
|
|
3307
3307
|
sqrSin = 1 - cos * cos;
|
|
3308
3308
|
|
|
3309
3309
|
// Skip the Slerp for tiny steps to avoid numeric problems:
|
|
@@ -3646,7 +3646,7 @@ class Quaternion {
|
|
|
3646
3646
|
|
|
3647
3647
|
angleTo( q ) {
|
|
3648
3648
|
|
|
3649
|
-
return 2 * Math.acos( Math.abs( clamp$1( this.dot( q ), -
|
|
3649
|
+
return 2 * Math.acos( Math.abs( clamp$1( this.dot( q ), -1, 1 ) ) );
|
|
3650
3650
|
|
|
3651
3651
|
}
|
|
3652
3652
|
|
|
@@ -3680,9 +3680,9 @@ class Quaternion {
|
|
|
3680
3680
|
|
|
3681
3681
|
conjugate() {
|
|
3682
3682
|
|
|
3683
|
-
this._x *= -
|
|
3684
|
-
this._y *= -
|
|
3685
|
-
this._z *= -
|
|
3683
|
+
this._x *= -1;
|
|
3684
|
+
this._y *= -1;
|
|
3685
|
+
this._z *= -1;
|
|
3686
3686
|
|
|
3687
3687
|
this._onChangeCallback();
|
|
3688
3688
|
|
|
@@ -4464,7 +4464,7 @@ class Vector3 {
|
|
|
4464
4464
|
|
|
4465
4465
|
// clamp, to handle numerical problems
|
|
4466
4466
|
|
|
4467
|
-
return Math.acos( clamp$1( theta, -
|
|
4467
|
+
return Math.acos( clamp$1( theta, -1, 1 ) );
|
|
4468
4468
|
|
|
4469
4469
|
}
|
|
4470
4470
|
|
|
@@ -5192,7 +5192,7 @@ const _v2$3 = /*@__PURE__*/ new Vector3();
|
|
|
5192
5192
|
|
|
5193
5193
|
class Sphere {
|
|
5194
5194
|
|
|
5195
|
-
constructor( center = new Vector3(), radius = -
|
|
5195
|
+
constructor( center = new Vector3(), radius = -1 ) {
|
|
5196
5196
|
|
|
5197
5197
|
this.isSphere = true;
|
|
5198
5198
|
|
|
@@ -5256,7 +5256,7 @@ class Sphere {
|
|
|
5256
5256
|
makeEmpty() {
|
|
5257
5257
|
|
|
5258
5258
|
this.center.set( 0, 0, 0 );
|
|
5259
|
-
this.radius = -
|
|
5259
|
+
this.radius = -1;
|
|
5260
5260
|
|
|
5261
5261
|
return this;
|
|
5262
5262
|
|
|
@@ -5438,7 +5438,7 @@ const _normal$2 = /*@__PURE__*/ new Vector3();
|
|
|
5438
5438
|
|
|
5439
5439
|
class Ray {
|
|
5440
5440
|
|
|
5441
|
-
constructor( origin = new Vector3(), direction = new Vector3( 0, 0, -
|
|
5441
|
+
constructor( origin = new Vector3(), direction = new Vector3( 0, 0, -1 ) ) {
|
|
5442
5442
|
|
|
5443
5443
|
this.origin = origin;
|
|
5444
5444
|
this.direction = direction;
|
|
@@ -5844,7 +5844,7 @@ class Ray {
|
|
|
5844
5844
|
|
|
5845
5845
|
} else if ( DdN < 0 ) {
|
|
5846
5846
|
|
|
5847
|
-
sign = -
|
|
5847
|
+
sign = -1;
|
|
5848
5848
|
DdN = - DdN;
|
|
5849
5849
|
|
|
5850
5850
|
} else {
|
|
@@ -6704,7 +6704,7 @@ class Matrix4 {
|
|
|
6704
6704
|
if ( coordinateSystem === WebGLCoordinateSystem ) {
|
|
6705
6705
|
|
|
6706
6706
|
c = - ( far + near ) / ( far - near );
|
|
6707
|
-
d = ( -
|
|
6707
|
+
d = ( -2 * far * near ) / ( far - near );
|
|
6708
6708
|
|
|
6709
6709
|
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
6710
6710
|
|
|
@@ -6720,7 +6720,7 @@ class Matrix4 {
|
|
|
6720
6720
|
te[ 0 ] = x; te[ 4 ] = 0; te[ 8 ] = a; te[ 12 ] = 0;
|
|
6721
6721
|
te[ 1 ] = 0; te[ 5 ] = y; te[ 9 ] = b; te[ 13 ] = 0;
|
|
6722
6722
|
te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = c; te[ 14 ] = d;
|
|
6723
|
-
te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = -
|
|
6723
|
+
te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = -1; te[ 15 ] = 0;
|
|
6724
6724
|
|
|
6725
6725
|
return this;
|
|
6726
6726
|
|
|
@@ -6741,12 +6741,12 @@ class Matrix4 {
|
|
|
6741
6741
|
if ( coordinateSystem === WebGLCoordinateSystem ) {
|
|
6742
6742
|
|
|
6743
6743
|
z = ( far + near ) * p;
|
|
6744
|
-
zInv = -
|
|
6744
|
+
zInv = -2 * p;
|
|
6745
6745
|
|
|
6746
6746
|
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
6747
6747
|
|
|
6748
6748
|
z = near * p;
|
|
6749
|
-
zInv = -
|
|
6749
|
+
zInv = -1 * p;
|
|
6750
6750
|
|
|
6751
6751
|
} else {
|
|
6752
6752
|
|
|
@@ -6941,7 +6941,7 @@ class Euler {
|
|
|
6941
6941
|
|
|
6942
6942
|
case 'XYZ':
|
|
6943
6943
|
|
|
6944
|
-
this._y = Math.asin( clamp$1( m13, -
|
|
6944
|
+
this._y = Math.asin( clamp$1( m13, -1, 1 ) );
|
|
6945
6945
|
|
|
6946
6946
|
if ( Math.abs( m13 ) < 0.9999999 ) {
|
|
6947
6947
|
|
|
@@ -6959,7 +6959,7 @@ class Euler {
|
|
|
6959
6959
|
|
|
6960
6960
|
case 'YXZ':
|
|
6961
6961
|
|
|
6962
|
-
this._x = Math.asin( - clamp$1( m23, -
|
|
6962
|
+
this._x = Math.asin( - clamp$1( m23, -1, 1 ) );
|
|
6963
6963
|
|
|
6964
6964
|
if ( Math.abs( m23 ) < 0.9999999 ) {
|
|
6965
6965
|
|
|
@@ -6977,7 +6977,7 @@ class Euler {
|
|
|
6977
6977
|
|
|
6978
6978
|
case 'ZXY':
|
|
6979
6979
|
|
|
6980
|
-
this._x = Math.asin( clamp$1( m32, -
|
|
6980
|
+
this._x = Math.asin( clamp$1( m32, -1, 1 ) );
|
|
6981
6981
|
|
|
6982
6982
|
if ( Math.abs( m32 ) < 0.9999999 ) {
|
|
6983
6983
|
|
|
@@ -6995,7 +6995,7 @@ class Euler {
|
|
|
6995
6995
|
|
|
6996
6996
|
case 'ZYX':
|
|
6997
6997
|
|
|
6998
|
-
this._y = Math.asin( - clamp$1( m31, -
|
|
6998
|
+
this._y = Math.asin( - clamp$1( m31, -1, 1 ) );
|
|
6999
6999
|
|
|
7000
7000
|
if ( Math.abs( m31 ) < 0.9999999 ) {
|
|
7001
7001
|
|
|
@@ -7013,7 +7013,7 @@ class Euler {
|
|
|
7013
7013
|
|
|
7014
7014
|
case 'YZX':
|
|
7015
7015
|
|
|
7016
|
-
this._z = Math.asin( clamp$1( m21, -
|
|
7016
|
+
this._z = Math.asin( clamp$1( m21, -1, 1 ) );
|
|
7017
7017
|
|
|
7018
7018
|
if ( Math.abs( m21 ) < 0.9999999 ) {
|
|
7019
7019
|
|
|
@@ -7031,7 +7031,7 @@ class Euler {
|
|
|
7031
7031
|
|
|
7032
7032
|
case 'XZY':
|
|
7033
7033
|
|
|
7034
|
-
this._z = Math.asin( - clamp$1( m12, -
|
|
7034
|
+
this._z = Math.asin( - clamp$1( m12, -1, 1 ) );
|
|
7035
7035
|
|
|
7036
7036
|
if ( Math.abs( m12 ) < 0.9999999 ) {
|
|
7037
7037
|
|
|
@@ -7558,7 +7558,7 @@ class Object3D extends EventDispatcher {
|
|
|
7558
7558
|
|
|
7559
7559
|
const index = this.children.indexOf( object );
|
|
7560
7560
|
|
|
7561
|
-
if ( index !== -
|
|
7561
|
+
if ( index !== -1 ) {
|
|
7562
7562
|
|
|
7563
7563
|
object.parent = null;
|
|
7564
7564
|
this.children.splice( index, 1 );
|
|
@@ -8899,7 +8899,7 @@ class Color {
|
|
|
8899
8899
|
|
|
8900
8900
|
getHexString( colorSpace = SRGBColorSpace ) {
|
|
8901
8901
|
|
|
8902
|
-
return ( '000000' + this.getHex( colorSpace ).toString( 16 ) ).slice( -
|
|
8902
|
+
return ( '000000' + this.getHex( colorSpace ).toString( 16 ) ).slice( -6 );
|
|
8903
8903
|
|
|
8904
8904
|
}
|
|
8905
8905
|
|
|
@@ -9779,7 +9779,7 @@ function _generateTables() {
|
|
|
9779
9779
|
|
|
9780
9780
|
// very small number (0, -0)
|
|
9781
9781
|
|
|
9782
|
-
if ( e < -
|
|
9782
|
+
if ( e < -27 ) {
|
|
9783
9783
|
|
|
9784
9784
|
baseTable[ i ] = 0x0000;
|
|
9785
9785
|
baseTable[ i | 0x100 ] = 0x8000;
|
|
@@ -9788,7 +9788,7 @@ function _generateTables() {
|
|
|
9788
9788
|
|
|
9789
9789
|
// small number (denorm)
|
|
9790
9790
|
|
|
9791
|
-
} else if ( e < -
|
|
9791
|
+
} else if ( e < -14 ) {
|
|
9792
9792
|
|
|
9793
9793
|
baseTable[ i ] = 0x0400 >> ( - e - 14 );
|
|
9794
9794
|
baseTable[ i | 0x100 ] = ( 0x0400 >> ( - e - 14 ) ) | 0x8000;
|
|
@@ -9845,7 +9845,7 @@ function _generateTables() {
|
|
|
9845
9845
|
|
|
9846
9846
|
}
|
|
9847
9847
|
|
|
9848
|
-
m &=
|
|
9848
|
+
m &= -8388609; // clear leading 1 bit
|
|
9849
9849
|
e += 0x38800000; // adjust bias
|
|
9850
9850
|
|
|
9851
9851
|
mantissaTable[ i ] = m | e;
|
|
@@ -9903,7 +9903,7 @@ function toHalfFloat( val ) {
|
|
|
9903
9903
|
|
|
9904
9904
|
if ( Math.abs( val ) > 65504 ) console.warn( 'THREE.DataUtils.toHalfFloat(): Value out of range.' );
|
|
9905
9905
|
|
|
9906
|
-
val = clamp$1( val, -
|
|
9906
|
+
val = clamp$1( val, -65504, 65504 );
|
|
9907
9907
|
|
|
9908
9908
|
_tables.floatView[ 0 ] = val;
|
|
9909
9909
|
const f = _tables.uint32View[ 0 ];
|
|
@@ -11130,7 +11130,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
11130
11130
|
|
|
11131
11131
|
tmp2.crossVectors( n2, t );
|
|
11132
11132
|
const test = tmp2.dot( tan2[ v ] );
|
|
11133
|
-
const w = ( test < 0.0 ) ? -
|
|
11133
|
+
const w = ( test < 0.0 ) ? -1 : 1.0;
|
|
11134
11134
|
|
|
11135
11135
|
tangentAttribute.setXYZW( v, tmp.x, tmp.y, tmp.z, w );
|
|
11136
11136
|
|
|
@@ -11972,7 +11972,7 @@ function checkGeometryIntersection( object, material, raycaster, ray, uv, uv1, n
|
|
|
11972
11972
|
|
|
11973
11973
|
if ( intersection.normal.dot( ray.direction ) > 0 ) {
|
|
11974
11974
|
|
|
11975
|
-
intersection.normal.multiplyScalar( -
|
|
11975
|
+
intersection.normal.multiplyScalar( -1 );
|
|
11976
11976
|
|
|
11977
11977
|
}
|
|
11978
11978
|
|
|
@@ -12036,12 +12036,12 @@ class BoxGeometry extends BufferGeometry {
|
|
|
12036
12036
|
|
|
12037
12037
|
// build each side of the box geometry
|
|
12038
12038
|
|
|
12039
|
-
buildPlane( 'z', 'y', 'x', -
|
|
12040
|
-
buildPlane( 'z', 'y', 'x', 1, -
|
|
12039
|
+
buildPlane( 'z', 'y', 'x', -1, -1, depth, height, width, depthSegments, heightSegments, 0 ); // px
|
|
12040
|
+
buildPlane( 'z', 'y', 'x', 1, -1, depth, height, - width, depthSegments, heightSegments, 1 ); // nx
|
|
12041
12041
|
buildPlane( 'x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2 ); // py
|
|
12042
|
-
buildPlane( 'x', 'z', 'y', 1, -
|
|
12043
|
-
buildPlane( 'x', 'y', 'z', 1, -
|
|
12044
|
-
buildPlane( 'x', 'y', 'z', -
|
|
12042
|
+
buildPlane( 'x', 'z', 'y', 1, -1, width, depth, - height, widthSegments, depthSegments, 3 ); // ny
|
|
12043
|
+
buildPlane( 'x', 'y', 'z', 1, -1, width, height, depth, widthSegments, heightSegments, 4 ); // pz
|
|
12044
|
+
buildPlane( 'x', 'y', 'z', -1, -1, width, height, - depth, widthSegments, heightSegments, 5 ); // nz
|
|
12045
12045
|
|
|
12046
12046
|
// build geometry
|
|
12047
12047
|
|
|
@@ -12091,7 +12091,7 @@ class BoxGeometry extends BufferGeometry {
|
|
|
12091
12091
|
|
|
12092
12092
|
vector[ u ] = 0;
|
|
12093
12093
|
vector[ v ] = 0;
|
|
12094
|
-
vector[ w ] = depth > 0 ? 1 : -
|
|
12094
|
+
vector[ w ] = depth > 0 ? 1 : -1;
|
|
12095
12095
|
|
|
12096
12096
|
// now apply vector to normal buffer
|
|
12097
12097
|
|
|
@@ -12637,7 +12637,7 @@ class PerspectiveCamera extends Camera {
|
|
|
12637
12637
|
*/
|
|
12638
12638
|
getViewBounds( distance, minTarget, maxTarget ) {
|
|
12639
12639
|
|
|
12640
|
-
_v3$1.set( -
|
|
12640
|
+
_v3$1.set( -1, -1, 0.5 ).applyMatrix4( this.projectionMatrixInverse );
|
|
12641
12641
|
|
|
12642
12642
|
minTarget.set( _v3$1.x, _v3$1.y ).multiplyScalar( - distance / _v3$1.z );
|
|
12643
12643
|
|
|
@@ -12742,7 +12742,7 @@ class PerspectiveCamera extends Camera {
|
|
|
12742
12742
|
let top = near * Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom;
|
|
12743
12743
|
let height = 2 * top;
|
|
12744
12744
|
let width = this.aspect * height;
|
|
12745
|
-
let left = -
|
|
12745
|
+
let left = -0.5 * width;
|
|
12746
12746
|
const view = this.view;
|
|
12747
12747
|
|
|
12748
12748
|
if ( this.view !== null && this.view.enabled ) {
|
|
@@ -12790,7 +12790,7 @@ class PerspectiveCamera extends Camera {
|
|
|
12790
12790
|
|
|
12791
12791
|
}
|
|
12792
12792
|
|
|
12793
|
-
const fov = -
|
|
12793
|
+
const fov = -90; // negative fov is not an error
|
|
12794
12794
|
const aspect = 1;
|
|
12795
12795
|
|
|
12796
12796
|
class CubeCamera extends Object3D {
|
|
@@ -12847,39 +12847,39 @@ class CubeCamera extends Object3D {
|
|
|
12847
12847
|
cameraPX.lookAt( 1, 0, 0 );
|
|
12848
12848
|
|
|
12849
12849
|
cameraNX.up.set( 0, 1, 0 );
|
|
12850
|
-
cameraNX.lookAt( -
|
|
12850
|
+
cameraNX.lookAt( -1, 0, 0 );
|
|
12851
12851
|
|
|
12852
|
-
cameraPY.up.set( 0, 0, -
|
|
12852
|
+
cameraPY.up.set( 0, 0, -1 );
|
|
12853
12853
|
cameraPY.lookAt( 0, 1, 0 );
|
|
12854
12854
|
|
|
12855
12855
|
cameraNY.up.set( 0, 0, 1 );
|
|
12856
|
-
cameraNY.lookAt( 0, -
|
|
12856
|
+
cameraNY.lookAt( 0, -1, 0 );
|
|
12857
12857
|
|
|
12858
12858
|
cameraPZ.up.set( 0, 1, 0 );
|
|
12859
12859
|
cameraPZ.lookAt( 0, 0, 1 );
|
|
12860
12860
|
|
|
12861
12861
|
cameraNZ.up.set( 0, 1, 0 );
|
|
12862
|
-
cameraNZ.lookAt( 0, 0, -
|
|
12862
|
+
cameraNZ.lookAt( 0, 0, -1 );
|
|
12863
12863
|
|
|
12864
12864
|
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
12865
12865
|
|
|
12866
|
-
cameraPX.up.set( 0, -
|
|
12867
|
-
cameraPX.lookAt( -
|
|
12866
|
+
cameraPX.up.set( 0, -1, 0 );
|
|
12867
|
+
cameraPX.lookAt( -1, 0, 0 );
|
|
12868
12868
|
|
|
12869
|
-
cameraNX.up.set( 0, -
|
|
12869
|
+
cameraNX.up.set( 0, -1, 0 );
|
|
12870
12870
|
cameraNX.lookAt( 1, 0, 0 );
|
|
12871
12871
|
|
|
12872
12872
|
cameraPY.up.set( 0, 0, 1 );
|
|
12873
12873
|
cameraPY.lookAt( 0, 1, 0 );
|
|
12874
12874
|
|
|
12875
|
-
cameraNY.up.set( 0, 0, -
|
|
12876
|
-
cameraNY.lookAt( 0, -
|
|
12875
|
+
cameraNY.up.set( 0, 0, -1 );
|
|
12876
|
+
cameraNY.lookAt( 0, -1, 0 );
|
|
12877
12877
|
|
|
12878
|
-
cameraPZ.up.set( 0, -
|
|
12878
|
+
cameraPZ.up.set( 0, -1, 0 );
|
|
12879
12879
|
cameraPZ.lookAt( 0, 0, 1 );
|
|
12880
12880
|
|
|
12881
|
-
cameraNZ.up.set( 0, -
|
|
12882
|
-
cameraNZ.lookAt( 0, 0, -
|
|
12881
|
+
cameraNZ.up.set( 0, -1, 0 );
|
|
12882
|
+
cameraNZ.lookAt( 0, 0, -1 );
|
|
12883
12883
|
|
|
12884
12884
|
} else {
|
|
12885
12885
|
|
|
@@ -13202,7 +13202,7 @@ class Plane {
|
|
|
13202
13202
|
|
|
13203
13203
|
negate() {
|
|
13204
13204
|
|
|
13205
|
-
this.constant *= -
|
|
13205
|
+
this.constant *= -1;
|
|
13206
13206
|
this.normal.negate();
|
|
13207
13207
|
|
|
13208
13208
|
return this;
|
|
@@ -14339,7 +14339,7 @@ const UniformsLib = {
|
|
|
14339
14339
|
|
|
14340
14340
|
envMap: { value: null },
|
|
14341
14341
|
envMapRotation: { value: /*@__PURE__*/ new Matrix3() },
|
|
14342
|
-
flipEnvMap: { value: -
|
|
14342
|
+
flipEnvMap: { value: -1 },
|
|
14343
14343
|
reflectivity: { value: 1.0 }, // basic, lambert, phong
|
|
14344
14344
|
ior: { value: 1.5 }, // physical
|
|
14345
14345
|
refractionRatio: { value: 0.98 }, // basic, lambert, phong
|
|
@@ -14760,7 +14760,7 @@ const ShaderLib = {
|
|
|
14760
14760
|
|
|
14761
14761
|
uniforms: {
|
|
14762
14762
|
envMap: { value: null },
|
|
14763
|
-
flipEnvMap: { value: -
|
|
14763
|
+
flipEnvMap: { value: -1 },
|
|
14764
14764
|
backgroundBlurriness: { value: 0 },
|
|
14765
14765
|
backgroundIntensity: { value: 1 },
|
|
14766
14766
|
backgroundRotation: { value: /*@__PURE__*/ new Matrix3() }
|
|
@@ -14775,7 +14775,7 @@ const ShaderLib = {
|
|
|
14775
14775
|
|
|
14776
14776
|
uniforms: {
|
|
14777
14777
|
tCube: { value: null },
|
|
14778
|
-
tFlip: { value: -
|
|
14778
|
+
tFlip: { value: -1 },
|
|
14779
14779
|
opacity: { value: 1.0 }
|
|
14780
14780
|
},
|
|
14781
14781
|
|
|
@@ -15009,18 +15009,18 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
|
|
|
15009
15009
|
_e1$1.copy( scene.backgroundRotation );
|
|
15010
15010
|
|
|
15011
15011
|
// accommodate left-handed frame
|
|
15012
|
-
_e1$1.x *= -
|
|
15012
|
+
_e1$1.x *= -1; _e1$1.y *= -1; _e1$1.z *= -1;
|
|
15013
15013
|
|
|
15014
15014
|
if ( background.isCubeTexture && background.isRenderTargetTexture === false ) {
|
|
15015
15015
|
|
|
15016
15016
|
// environment maps which are not cube render targets or PMREMs follow a different convention
|
|
15017
|
-
_e1$1.y *= -
|
|
15018
|
-
_e1$1.z *= -
|
|
15017
|
+
_e1$1.y *= -1;
|
|
15018
|
+
_e1$1.z *= -1;
|
|
15019
15019
|
|
|
15020
15020
|
}
|
|
15021
15021
|
|
|
15022
15022
|
boxMesh.material.uniforms.envMap.value = background;
|
|
15023
|
-
boxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background.isRenderTargetTexture === false ) ? -
|
|
15023
|
+
boxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background.isRenderTargetTexture === false ) ? -1 : 1;
|
|
15024
15024
|
boxMesh.material.uniforms.backgroundBlurriness.value = scene.backgroundBlurriness;
|
|
15025
15025
|
boxMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;
|
|
15026
15026
|
boxMesh.material.uniforms.backgroundRotation.value.setFromMatrix4( _m1$1.makeRotationFromEuler( _e1$1 ) );
|
|
@@ -16242,7 +16242,7 @@ function WebGLCubeMaps( renderer ) {
|
|
|
16242
16242
|
|
|
16243
16243
|
class OrthographicCamera extends Camera {
|
|
16244
16244
|
|
|
16245
|
-
constructor( left = -
|
|
16245
|
+
constructor( left = -1, right = 1, top = 1, bottom = -1, near = 0.1, far = 2000 ) {
|
|
16246
16246
|
|
|
16247
16247
|
super();
|
|
16248
16248
|
|
|
@@ -16405,9 +16405,9 @@ const _axisDirections$1 = [
|
|
|
16405
16405
|
/*@__PURE__*/ new Vector3( INV_PHI$1, 0, PHI$1 ),
|
|
16406
16406
|
/*@__PURE__*/ new Vector3( 0, PHI$1, - INV_PHI$1 ),
|
|
16407
16407
|
/*@__PURE__*/ new Vector3( 0, PHI$1, INV_PHI$1 ),
|
|
16408
|
-
/*@__PURE__*/ new Vector3( -
|
|
16409
|
-
/*@__PURE__*/ new Vector3( 1, 1, -
|
|
16410
|
-
/*@__PURE__*/ new Vector3( -
|
|
16408
|
+
/*@__PURE__*/ new Vector3( -1, 1, -1 ),
|
|
16409
|
+
/*@__PURE__*/ new Vector3( 1, 1, -1 ),
|
|
16410
|
+
/*@__PURE__*/ new Vector3( -1, 1, 1 ),
|
|
16411
16411
|
/*@__PURE__*/ new Vector3( 1, 1, 1 ) ];
|
|
16412
16412
|
|
|
16413
16413
|
/**
|
|
@@ -16665,8 +16665,8 @@ let PMREMGenerator$1 = class PMREMGenerator {
|
|
|
16665
16665
|
const fov = 90;
|
|
16666
16666
|
const aspect = 1;
|
|
16667
16667
|
const cubeCamera = new PerspectiveCamera( fov, aspect, near, far );
|
|
16668
|
-
const upSign = [ 1, -
|
|
16669
|
-
const forwardSign = [ 1, 1, 1, -
|
|
16668
|
+
const upSign = [ 1, -1, 1, 1, 1, 1 ];
|
|
16669
|
+
const forwardSign = [ 1, 1, 1, -1, -1, -1 ];
|
|
16670
16670
|
const renderer = this._renderer;
|
|
16671
16671
|
|
|
16672
16672
|
const originalAutoClear = renderer.autoClear;
|
|
@@ -16765,7 +16765,7 @@ let PMREMGenerator$1 = class PMREMGenerator {
|
|
|
16765
16765
|
|
|
16766
16766
|
}
|
|
16767
16767
|
|
|
16768
|
-
this._cubemapMaterial.uniforms.flipEnvMap.value = ( texture.isRenderTargetTexture === false ) ? -
|
|
16768
|
+
this._cubemapMaterial.uniforms.flipEnvMap.value = ( texture.isRenderTargetTexture === false ) ? -1 : 1;
|
|
16769
16769
|
|
|
16770
16770
|
} else {
|
|
16771
16771
|
|
|
@@ -16978,7 +16978,7 @@ function _createPlanes$1( lodMax ) {
|
|
|
16978
16978
|
for ( let face = 0; face < cubeFaces; face ++ ) {
|
|
16979
16979
|
|
|
16980
16980
|
const x = ( face % 3 ) * 2 / 3 - 1;
|
|
16981
|
-
const y = face > 2 ? 0 : -
|
|
16981
|
+
const y = face > 2 ? 0 : -1;
|
|
16982
16982
|
const coordinates = [
|
|
16983
16983
|
x, y, 0,
|
|
16984
16984
|
x + 2 / 3, y, 0,
|
|
@@ -17177,7 +17177,7 @@ function _getCubemapMaterial$1() {
|
|
|
17177
17177
|
|
|
17178
17178
|
uniforms: {
|
|
17179
17179
|
'envMap': { value: null },
|
|
17180
|
-
'flipEnvMap': { value: -
|
|
17180
|
+
'flipEnvMap': { value: -1 }
|
|
17181
17181
|
},
|
|
17182
17182
|
|
|
17183
17183
|
vertexShader: _getCommonVertexShader(),
|
|
@@ -21635,18 +21635,18 @@ function WebGLLights( extensions ) {
|
|
|
21635
21635
|
version: 0,
|
|
21636
21636
|
|
|
21637
21637
|
hash: {
|
|
21638
|
-
directionalLength: -
|
|
21639
|
-
pointLength: -
|
|
21640
|
-
spotLength: -
|
|
21641
|
-
rectAreaLength: -
|
|
21642
|
-
hemiLength: -
|
|
21643
|
-
|
|
21644
|
-
numDirectionalShadows: -
|
|
21645
|
-
numPointShadows: -
|
|
21646
|
-
numSpotShadows: -
|
|
21647
|
-
numSpotMaps: -
|
|
21648
|
-
|
|
21649
|
-
numLightProbes: -
|
|
21638
|
+
directionalLength: -1,
|
|
21639
|
+
pointLength: -1,
|
|
21640
|
+
spotLength: -1,
|
|
21641
|
+
rectAreaLength: -1,
|
|
21642
|
+
hemiLength: -1,
|
|
21643
|
+
|
|
21644
|
+
numDirectionalShadows: -1,
|
|
21645
|
+
numPointShadows: -1,
|
|
21646
|
+
numSpotShadows: -1,
|
|
21647
|
+
numSpotMaps: -1,
|
|
21648
|
+
|
|
21649
|
+
numLightProbes: -1
|
|
21650
21650
|
},
|
|
21651
21651
|
|
|
21652
21652
|
ambient: [ 0, 0, 0 ],
|
|
@@ -22277,7 +22277,7 @@ function WebGLShadowMap( renderer, objects, capabilities ) {
|
|
|
22277
22277
|
fullScreenTri.setAttribute(
|
|
22278
22278
|
'position',
|
|
22279
22279
|
new BufferAttribute(
|
|
22280
|
-
new Float32Array( [ -
|
|
22280
|
+
new Float32Array( [ -1, -1, 0.5, 3, -1, 0.5, -1, 3, 0.5 ] ),
|
|
22281
22281
|
3
|
|
22282
22282
|
)
|
|
22283
22283
|
);
|
|
@@ -22710,7 +22710,7 @@ function WebGLState( gl ) {
|
|
|
22710
22710
|
locked = false;
|
|
22711
22711
|
|
|
22712
22712
|
currentColorMask = null;
|
|
22713
|
-
currentColorClear.set( -
|
|
22713
|
+
currentColorClear.set( -1, 0, 0, 0 ); // set to invalid state
|
|
22714
22714
|
|
|
22715
22715
|
}
|
|
22716
22716
|
|
|
@@ -23006,12 +23006,12 @@ function WebGLState( gl ) {
|
|
|
23006
23006
|
let version = 0;
|
|
23007
23007
|
const glVersion = gl.getParameter( gl.VERSION );
|
|
23008
23008
|
|
|
23009
|
-
if ( glVersion.indexOf( 'WebGL' ) !== -
|
|
23009
|
+
if ( glVersion.indexOf( 'WebGL' ) !== -1 ) {
|
|
23010
23010
|
|
|
23011
23011
|
version = parseFloat( /^WebGL (\d)/.exec( glVersion )[ 1 ] );
|
|
23012
23012
|
lineWidthAvailable = ( version >= 1.0 );
|
|
23013
23013
|
|
|
23014
|
-
} else if ( glVersion.indexOf( 'OpenGL ES' ) !== -
|
|
23014
|
+
} else if ( glVersion.indexOf( 'OpenGL ES' ) !== -1 ) {
|
|
23015
23015
|
|
|
23016
23016
|
version = parseFloat( /^OpenGL ES (\d)/.exec( glVersion )[ 1 ] );
|
|
23017
23017
|
lineWidthAvailable = ( version >= 2.0 );
|
|
@@ -27097,7 +27097,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
27097
27097
|
|
|
27098
27098
|
const controllerIndex = controllerInputSources.indexOf( event.inputSource );
|
|
27099
27099
|
|
|
27100
|
-
if ( controllerIndex === -
|
|
27100
|
+
if ( controllerIndex === -1 ) {
|
|
27101
27101
|
|
|
27102
27102
|
return;
|
|
27103
27103
|
|
|
@@ -27251,7 +27251,11 @@ class WebXRManager extends EventDispatcher {
|
|
|
27251
27251
|
currentPixelRatio = renderer.getPixelRatio();
|
|
27252
27252
|
renderer.getSize( currentSize );
|
|
27253
27253
|
|
|
27254
|
-
|
|
27254
|
+
// Check that the browser implements the necessary APIs to use an
|
|
27255
|
+
// XRProjectionLayer rather than an XRWebGLLayer
|
|
27256
|
+
const useLayers = typeof XRWebGLBinding !== 'undefined' && 'createProjectionLayer' in XRWebGLBinding.prototype;
|
|
27257
|
+
|
|
27258
|
+
if ( ! useLayers ) {
|
|
27255
27259
|
|
|
27256
27260
|
const layerInit = {
|
|
27257
27261
|
antialias: attributes.antialias,
|
|
@@ -27383,7 +27387,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
27383
27387
|
|
|
27384
27388
|
let controllerIndex = controllerInputSources.indexOf( inputSource );
|
|
27385
27389
|
|
|
27386
|
-
if ( controllerIndex === -
|
|
27390
|
+
if ( controllerIndex === -1 ) {
|
|
27387
27391
|
|
|
27388
27392
|
// Assign input source a controller that currently has no input source
|
|
27389
27393
|
|
|
@@ -27407,7 +27411,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
27407
27411
|
|
|
27408
27412
|
// If all controllers do currently receive input we ignore new ones
|
|
27409
27413
|
|
|
27410
|
-
if ( controllerIndex === -
|
|
27414
|
+
if ( controllerIndex === -1 ) break;
|
|
27411
27415
|
|
|
27412
27416
|
}
|
|
27413
27417
|
|
|
@@ -27470,7 +27474,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
27470
27474
|
camera.matrixWorldInverse.copy( camera.matrixWorld ).invert();
|
|
27471
27475
|
|
|
27472
27476
|
// Check if the projection uses an infinite far plane.
|
|
27473
|
-
if ( projL[ 10 ] === -
|
|
27477
|
+
if ( projL[ 10 ] === -1 ) {
|
|
27474
27478
|
|
|
27475
27479
|
// Use the projection matrix from the left eye.
|
|
27476
27480
|
// The camera offset is sufficient to include the view volumes
|
|
@@ -27968,7 +27972,7 @@ function WebGLMaterials( renderer, properties ) {
|
|
|
27968
27972
|
|
|
27969
27973
|
if ( material.side === BackSide ) {
|
|
27970
27974
|
|
|
27971
|
-
uniforms.bumpScale.value *= -
|
|
27975
|
+
uniforms.bumpScale.value *= -1;
|
|
27972
27976
|
|
|
27973
27977
|
}
|
|
27974
27978
|
|
|
@@ -28035,19 +28039,19 @@ function WebGLMaterials( renderer, properties ) {
|
|
|
28035
28039
|
_e1.copy( envMapRotation );
|
|
28036
28040
|
|
|
28037
28041
|
// accommodate left-handed frame
|
|
28038
|
-
_e1.x *= -
|
|
28042
|
+
_e1.x *= -1; _e1.y *= -1; _e1.z *= -1;
|
|
28039
28043
|
|
|
28040
28044
|
if ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) {
|
|
28041
28045
|
|
|
28042
28046
|
// environment maps which are not cube render targets or PMREMs follow a different convention
|
|
28043
|
-
_e1.y *= -
|
|
28044
|
-
_e1.z *= -
|
|
28047
|
+
_e1.y *= -1;
|
|
28048
|
+
_e1.z *= -1;
|
|
28045
28049
|
|
|
28046
28050
|
}
|
|
28047
28051
|
|
|
28048
28052
|
uniforms.envMapRotation.value.setFromMatrix4( _m1.makeRotationFromEuler( _e1 ) );
|
|
28049
28053
|
|
|
28050
|
-
uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? -
|
|
28054
|
+
uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? -1 : 1;
|
|
28051
28055
|
|
|
28052
28056
|
uniforms.reflectivity.value = material.reflectivity;
|
|
28053
28057
|
uniforms.ior.value = material.ior;
|
|
@@ -28470,7 +28474,7 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
|
|
|
28470
28474
|
|
|
28471
28475
|
for ( let i = 0; i < maxBindingPoints; i ++ ) {
|
|
28472
28476
|
|
|
28473
|
-
if ( allocatedBindingPoints.indexOf( i ) === -
|
|
28477
|
+
if ( allocatedBindingPoints.indexOf( i ) === -1 ) {
|
|
28474
28478
|
|
|
28475
28479
|
allocatedBindingPoints.push( i );
|
|
28476
28480
|
return i;
|
|
@@ -28891,7 +28895,7 @@ class WebGLRenderer {
|
|
|
28891
28895
|
let _currentActiveCubeFace = 0;
|
|
28892
28896
|
let _currentActiveMipmapLevel = 0;
|
|
28893
28897
|
let _currentRenderTarget = null;
|
|
28894
|
-
let _currentMaterialId = -
|
|
28898
|
+
let _currentMaterialId = -1;
|
|
28895
28899
|
|
|
28896
28900
|
let _currentCamera = null;
|
|
28897
28901
|
|
|
@@ -30015,7 +30019,7 @@ class WebGLRenderer {
|
|
|
30015
30019
|
// _gl.finish();
|
|
30016
30020
|
|
|
30017
30021
|
bindingStates.resetDefaultState();
|
|
30018
|
-
_currentMaterialId = -
|
|
30022
|
+
_currentMaterialId = -1;
|
|
30019
30023
|
_currentCamera = null;
|
|
30020
30024
|
|
|
30021
30025
|
renderStateStack.pop();
|
|
@@ -30831,7 +30835,7 @@ class WebGLRenderer {
|
|
|
30831
30835
|
|
|
30832
30836
|
m_uniforms.envMap.value = envMap;
|
|
30833
30837
|
|
|
30834
|
-
m_uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? -
|
|
30838
|
+
m_uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? -1 : 1;
|
|
30835
30839
|
|
|
30836
30840
|
}
|
|
30837
30841
|
|
|
@@ -31124,7 +31128,7 @@ class WebGLRenderer {
|
|
|
31124
31128
|
|
|
31125
31129
|
}
|
|
31126
31130
|
|
|
31127
|
-
_currentMaterialId = -
|
|
31131
|
+
_currentMaterialId = -1; // reset current material to ensure correct uniform bindings
|
|
31128
31132
|
|
|
31129
31133
|
};
|
|
31130
31134
|
|
|
@@ -32311,10 +32315,10 @@ class Sprite extends Object3D {
|
|
|
32311
32315
|
_geometry$1 = new BufferGeometry();
|
|
32312
32316
|
|
|
32313
32317
|
const float32Array = new Float32Array( [
|
|
32314
|
-
-
|
|
32315
|
-
0.5, -
|
|
32318
|
+
-0.5, -0.5, 0, 0, 0,
|
|
32319
|
+
0.5, -0.5, 0, 1, 0,
|
|
32316
32320
|
0.5, 0.5, 0, 1, 1,
|
|
32317
|
-
-
|
|
32321
|
+
-0.5, 0.5, 0, 0, 1
|
|
32318
32322
|
] );
|
|
32319
32323
|
|
|
32320
32324
|
const interleavedBuffer = new InterleavedBuffer( float32Array, 5 );
|
|
@@ -32365,8 +32369,8 @@ class Sprite extends Object3D {
|
|
|
32365
32369
|
|
|
32366
32370
|
const center = this.center;
|
|
32367
32371
|
|
|
32368
|
-
transformVertex( _vA.set( -
|
|
32369
|
-
transformVertex( _vB.set( 0.5, -
|
|
32372
|
+
transformVertex( _vA.set( -0.5, -0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
32373
|
+
transformVertex( _vB.set( 0.5, -0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
32370
32374
|
transformVertex( _vC.set( 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
32371
32375
|
|
|
32372
32376
|
_uvA.set( 0, 0 );
|
|
@@ -32379,7 +32383,7 @@ class Sprite extends Object3D {
|
|
|
32379
32383
|
if ( intersect === null ) {
|
|
32380
32384
|
|
|
32381
32385
|
// check second triangle
|
|
32382
|
-
transformVertex( _vB.set( -
|
|
32386
|
+
transformVertex( _vB.set( -0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
32383
32387
|
_uvB.set( 0, 1 );
|
|
32384
32388
|
|
|
32385
32389
|
intersect = raycaster.ray.intersectTriangle( _vA, _vC, _vB, false, _intersectPoint );
|
|
@@ -33558,10 +33562,10 @@ class MultiDrawRenderList {
|
|
|
33558
33562
|
|
|
33559
33563
|
pool.push( {
|
|
33560
33564
|
|
|
33561
|
-
start: -
|
|
33562
|
-
count: -
|
|
33563
|
-
z: -
|
|
33564
|
-
index: -
|
|
33565
|
+
start: -1,
|
|
33566
|
+
count: -1,
|
|
33567
|
+
z: -1,
|
|
33568
|
+
index: -1,
|
|
33565
33569
|
|
|
33566
33570
|
} );
|
|
33567
33571
|
|
|
@@ -33910,7 +33914,7 @@ class BatchedMesh extends Mesh {
|
|
|
33910
33914
|
|
|
33911
33915
|
}
|
|
33912
33916
|
|
|
33913
|
-
addGeometry( geometry, vertexCount = -
|
|
33917
|
+
addGeometry( geometry, vertexCount = -1, indexCount = -1 ) {
|
|
33914
33918
|
|
|
33915
33919
|
this._initializeGeometry( geometry );
|
|
33916
33920
|
|
|
@@ -33925,10 +33929,10 @@ class BatchedMesh extends Mesh {
|
|
|
33925
33929
|
|
|
33926
33930
|
// get the necessary range fo the geometry
|
|
33927
33931
|
const reservedRange = {
|
|
33928
|
-
vertexStart: -
|
|
33929
|
-
vertexCount: -
|
|
33930
|
-
indexStart: -
|
|
33931
|
-
indexCount: -
|
|
33932
|
+
vertexStart: -1,
|
|
33933
|
+
vertexCount: -1,
|
|
33934
|
+
indexStart: -1,
|
|
33935
|
+
indexCount: -1,
|
|
33932
33936
|
};
|
|
33933
33937
|
|
|
33934
33938
|
let lastRange = null;
|
|
@@ -33941,7 +33945,7 @@ class BatchedMesh extends Mesh {
|
|
|
33941
33945
|
|
|
33942
33946
|
}
|
|
33943
33947
|
|
|
33944
|
-
if ( vertexCount === -
|
|
33948
|
+
if ( vertexCount === -1 ) {
|
|
33945
33949
|
|
|
33946
33950
|
reservedRange.vertexCount = geometry.getAttribute( 'position' ).count;
|
|
33947
33951
|
|
|
@@ -33965,7 +33969,7 @@ class BatchedMesh extends Mesh {
|
|
|
33965
33969
|
const hasIndex = index !== null;
|
|
33966
33970
|
if ( hasIndex ) {
|
|
33967
33971
|
|
|
33968
|
-
if ( indexCount === -
|
|
33972
|
+
if ( indexCount === -1 ) {
|
|
33969
33973
|
|
|
33970
33974
|
reservedRange.indexCount = index.count;
|
|
33971
33975
|
|
|
@@ -33988,7 +33992,7 @@ class BatchedMesh extends Mesh {
|
|
|
33988
33992
|
}
|
|
33989
33993
|
|
|
33990
33994
|
if (
|
|
33991
|
-
reservedRange.indexStart !== -
|
|
33995
|
+
reservedRange.indexStart !== -1 &&
|
|
33992
33996
|
reservedRange.indexStart + reservedRange.indexCount > this._maxIndexCount ||
|
|
33993
33997
|
reservedRange.vertexStart + reservedRange.vertexCount > this._maxVertexCount
|
|
33994
33998
|
) {
|
|
@@ -34005,7 +34009,7 @@ class BatchedMesh extends Mesh {
|
|
|
34005
34009
|
reservedRanges.push( reservedRange );
|
|
34006
34010
|
drawRanges.push( {
|
|
34007
34011
|
start: hasIndex ? reservedRange.indexStart : reservedRange.vertexStart,
|
|
34008
|
-
count: -
|
|
34012
|
+
count: -1
|
|
34009
34013
|
} );
|
|
34010
34014
|
bounds.push( {
|
|
34011
34015
|
boxInitialized: false,
|
|
@@ -34389,7 +34393,7 @@ class BatchedMesh extends Mesh {
|
|
|
34389
34393
|
const drawInfo = this._drawInfo;
|
|
34390
34394
|
if ( instanceId >= drawInfo.length || drawInfo[ instanceId ].active === false ) {
|
|
34391
34395
|
|
|
34392
|
-
return -
|
|
34396
|
+
return -1;
|
|
34393
34397
|
|
|
34394
34398
|
}
|
|
34395
34399
|
|
|
@@ -34585,7 +34589,7 @@ class BatchedMesh extends Mesh {
|
|
|
34585
34589
|
// get the camera position in the local frame
|
|
34586
34590
|
_invMatrixWorld.copy( this.matrixWorld ).invert();
|
|
34587
34591
|
_vector$5.setFromMatrixPosition( camera.matrixWorld ).applyMatrix4( _invMatrixWorld );
|
|
34588
|
-
_forward.set( 0, 0, -
|
|
34592
|
+
_forward.set( 0, 0, -1 ).transformDirection( camera.matrixWorld ).transformDirection( _invMatrixWorld );
|
|
34589
34593
|
|
|
34590
34594
|
for ( let i = 0, l = drawInfo.length; i < l; i ++ ) {
|
|
34591
34595
|
|
|
@@ -35720,7 +35724,7 @@ class Curve {
|
|
|
35720
35724
|
|
|
35721
35725
|
vec.normalize();
|
|
35722
35726
|
|
|
35723
|
-
const theta = Math.acos( clamp$1( tangents[ i - 1 ].dot( tangents[ i ] ), -
|
|
35727
|
+
const theta = Math.acos( clamp$1( tangents[ i - 1 ].dot( tangents[ i ] ), -1, 1 ) ); // clamp for floating pt errors
|
|
35724
35728
|
|
|
35725
35729
|
normals[ i ].applyMatrix4( mat.makeRotationAxis( vec, theta ) );
|
|
35726
35730
|
|
|
@@ -35734,7 +35738,7 @@ class Curve {
|
|
|
35734
35738
|
|
|
35735
35739
|
if ( closed === true ) {
|
|
35736
35740
|
|
|
35737
|
-
let theta = Math.acos( clamp$1( normals[ 0 ].dot( normals[ segments ] ), -
|
|
35741
|
+
let theta = Math.acos( clamp$1( normals[ 0 ].dot( normals[ segments ] ), -1, 1 ) );
|
|
35738
35742
|
theta /= segments;
|
|
35739
35743
|
|
|
35740
35744
|
if ( tangents[ 0 ].dot( vec.crossVectors( normals[ 0 ], normals[ segments ] ) ) > 0 ) {
|
|
@@ -36004,7 +36008,7 @@ function CubicPoly() {
|
|
|
36004
36008
|
|
|
36005
36009
|
c0 = x0;
|
|
36006
36010
|
c1 = t0;
|
|
36007
|
-
c2 = -
|
|
36011
|
+
c2 = -3 * x0 + 3 * x1 - 2 * t0 - t1;
|
|
36008
36012
|
c3 = 2 * x0 - 2 * x1 + t0 + t1;
|
|
36009
36013
|
|
|
36010
36014
|
}
|
|
@@ -36230,7 +36234,7 @@ function CatmullRom( t, p0, p1, p2, p3 ) {
|
|
|
36230
36234
|
const v1 = ( p3 - p1 ) * 0.5;
|
|
36231
36235
|
const t2 = t * t;
|
|
36232
36236
|
const t3 = t * t2;
|
|
36233
|
-
return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( -
|
|
36237
|
+
return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( -3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;
|
|
36234
36238
|
|
|
36235
36239
|
}
|
|
36236
36240
|
|
|
@@ -37303,7 +37307,7 @@ class Path extends CurvePath {
|
|
|
37303
37307
|
|
|
37304
37308
|
class LatheGeometry extends BufferGeometry {
|
|
37305
37309
|
|
|
37306
|
-
constructor( points = [ new Vector2( 0, -
|
|
37310
|
+
constructor( points = [ new Vector2( 0, -0.5 ), new Vector2( 0.5, 0 ), new Vector2( 0, 0.5 ) ], segments = 12, phiStart = 0, phiLength = Math.PI * 2 ) {
|
|
37307
37311
|
|
|
37308
37312
|
super();
|
|
37309
37313
|
|
|
@@ -37774,7 +37778,7 @@ class CylinderGeometry extends BufferGeometry {
|
|
|
37774
37778
|
let groupCount = 0;
|
|
37775
37779
|
|
|
37776
37780
|
const radius = ( top === true ) ? radiusTop : radiusBottom;
|
|
37777
|
-
const sign = ( top === true ) ? 1 : -
|
|
37781
|
+
const sign = ( top === true ) ? 1 : -1;
|
|
37778
37782
|
|
|
37779
37783
|
// first we generate the center vertex data of the cap.
|
|
37780
37784
|
// because the geometry needs one set of uvs per face,
|
|
@@ -38242,10 +38246,10 @@ class DodecahedronGeometry extends PolyhedronGeometry {
|
|
|
38242
38246
|
const vertices = [
|
|
38243
38247
|
|
|
38244
38248
|
// (±1, ±1, ±1)
|
|
38245
|
-
-
|
|
38246
|
-
-
|
|
38247
|
-
1, -
|
|
38248
|
-
1, 1, -
|
|
38249
|
+
-1, -1, -1, -1, -1, 1,
|
|
38250
|
+
-1, 1, -1, -1, 1, 1,
|
|
38251
|
+
1, -1, -1, 1, -1, 1,
|
|
38252
|
+
1, 1, -1, 1, 1, 1,
|
|
38249
38253
|
|
|
38250
38254
|
// (0, ±1/φ, ±φ)
|
|
38251
38255
|
0, - r, - t, 0, - r, t,
|
|
@@ -39178,7 +39182,7 @@ function onSegment( p, q, r ) {
|
|
|
39178
39182
|
|
|
39179
39183
|
function sign$1( num ) {
|
|
39180
39184
|
|
|
39181
|
-
return num > 0 ? 1 : num < 0 ? -
|
|
39185
|
+
return num > 0 ? 1 : num < 0 ? -1 : 0;
|
|
39182
39186
|
|
|
39183
39187
|
}
|
|
39184
39188
|
|
|
@@ -39438,7 +39442,7 @@ function addContour( vertices, contour ) {
|
|
|
39438
39442
|
|
|
39439
39443
|
class ExtrudeGeometry extends BufferGeometry {
|
|
39440
39444
|
|
|
39441
|
-
constructor( shapes = new Shape( [ new Vector2( 0.5, 0.5 ), new Vector2( -
|
|
39445
|
+
constructor( shapes = new Shape( [ new Vector2( 0.5, 0.5 ), new Vector2( -0.5, 0.5 ), new Vector2( -0.5, -0.5 ), new Vector2( 0.5, -0.5 ) ] ), options = {} ) {
|
|
39442
39446
|
|
|
39443
39447
|
super();
|
|
39444
39448
|
|
|
@@ -40225,9 +40229,9 @@ class IcosahedronGeometry extends PolyhedronGeometry {
|
|
|
40225
40229
|
const t = ( 1 + Math.sqrt( 5 ) ) / 2;
|
|
40226
40230
|
|
|
40227
40231
|
const vertices = [
|
|
40228
|
-
-
|
|
40229
|
-
0, -
|
|
40230
|
-
t, 0, -
|
|
40232
|
+
-1, t, 0, 1, t, 0, -1, - t, 0, 1, - t, 0,
|
|
40233
|
+
0, -1, t, 0, 1, t, 0, -1, - t, 0, 1, - t,
|
|
40234
|
+
t, 0, -1, t, 0, 1, - t, 0, -1, - t, 0, 1
|
|
40231
40235
|
];
|
|
40232
40236
|
|
|
40233
40237
|
const indices = [
|
|
@@ -40261,8 +40265,8 @@ class OctahedronGeometry extends PolyhedronGeometry {
|
|
|
40261
40265
|
constructor( radius = 1, detail = 0 ) {
|
|
40262
40266
|
|
|
40263
40267
|
const vertices = [
|
|
40264
|
-
1, 0, 0, -
|
|
40265
|
-
0, -
|
|
40268
|
+
1, 0, 0, -1, 0, 0, 0, 1, 0,
|
|
40269
|
+
0, -1, 0, 0, 0, 1, 0, 0, -1
|
|
40266
40270
|
];
|
|
40267
40271
|
|
|
40268
40272
|
const indices = [
|
|
@@ -40413,7 +40417,7 @@ class RingGeometry extends BufferGeometry {
|
|
|
40413
40417
|
|
|
40414
40418
|
class ShapeGeometry extends BufferGeometry {
|
|
40415
40419
|
|
|
40416
|
-
constructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( -
|
|
40420
|
+
constructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( -0.5, -0.5 ), new Vector2( 0.5, -0.5 ) ] ), curveSegments = 12 ) {
|
|
40417
40421
|
|
|
40418
40422
|
super();
|
|
40419
40423
|
|
|
@@ -40653,7 +40657,7 @@ class SphereGeometry extends BufferGeometry {
|
|
|
40653
40657
|
|
|
40654
40658
|
} else if ( iy === heightSegments && thetaEnd === Math.PI ) {
|
|
40655
40659
|
|
|
40656
|
-
uOffset = -
|
|
40660
|
+
uOffset = -0.5 / widthSegments;
|
|
40657
40661
|
|
|
40658
40662
|
}
|
|
40659
40663
|
|
|
@@ -40736,7 +40740,7 @@ class TetrahedronGeometry extends PolyhedronGeometry {
|
|
|
40736
40740
|
constructor( radius = 1, detail = 0 ) {
|
|
40737
40741
|
|
|
40738
40742
|
const vertices = [
|
|
40739
|
-
1, 1, 1, -
|
|
40743
|
+
1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1
|
|
40740
40744
|
];
|
|
40741
40745
|
|
|
40742
40746
|
const indices = [
|
|
@@ -41041,7 +41045,7 @@ class TorusKnotGeometry extends BufferGeometry {
|
|
|
41041
41045
|
|
|
41042
41046
|
class TubeGeometry extends BufferGeometry {
|
|
41043
41047
|
|
|
41044
|
-
constructor( path = new QuadraticBezierCurve3( new Vector3( -
|
|
41048
|
+
constructor( path = new QuadraticBezierCurve3( new Vector3( -1, -1, 0 ), new Vector3( -1, 1, 0 ), new Vector3( 1, 1, 0 ) ), tubularSegments = 64, radius = 1, radialSegments = 8, closed = false ) {
|
|
41045
41049
|
|
|
41046
41050
|
super();
|
|
41047
41051
|
|
|
@@ -42492,7 +42496,7 @@ function subclip( sourceClip, name, startFrame, endFrame, fps = 30 ) {
|
|
|
42492
42496
|
|
|
42493
42497
|
for ( let i = 0; i < clip.tracks.length; ++ i ) {
|
|
42494
42498
|
|
|
42495
|
-
clip.tracks[ i ].shift( -
|
|
42499
|
+
clip.tracks[ i ].shift( -1 * minStartTime );
|
|
42496
42500
|
|
|
42497
42501
|
}
|
|
42498
42502
|
|
|
@@ -42889,10 +42893,10 @@ class CubicInterpolant extends Interpolant {
|
|
|
42889
42893
|
|
|
42890
42894
|
super( parameterPositions, sampleValues, sampleSize, resultBuffer );
|
|
42891
42895
|
|
|
42892
|
-
this._weightPrev = -
|
|
42893
|
-
this._offsetPrev = -
|
|
42894
|
-
this._weightNext = -
|
|
42895
|
-
this._offsetNext = -
|
|
42896
|
+
this._weightPrev = -0;
|
|
42897
|
+
this._offsetPrev = -0;
|
|
42898
|
+
this._weightNext = -0;
|
|
42899
|
+
this._offsetNext = -0;
|
|
42896
42900
|
|
|
42897
42901
|
this.DefaultSettings_ = {
|
|
42898
42902
|
|
|
@@ -42999,8 +43003,8 @@ class CubicInterpolant extends Interpolant {
|
|
|
42999
43003
|
// evaluate polynomials
|
|
43000
43004
|
|
|
43001
43005
|
const sP = - wP * ppp + 2 * wP * pp - wP * p;
|
|
43002
|
-
const s0 = ( 1 + wP ) * ppp + ( -
|
|
43003
|
-
const s1 = ( -
|
|
43006
|
+
const s0 = ( 1 + wP ) * ppp + ( -1.5 - 2 * wP ) * pp + ( -0.5 + wP ) * p + 1;
|
|
43007
|
+
const s1 = ( -1 - wN ) * ppp + ( 1.5 + wN ) * pp + 0.5 * p;
|
|
43004
43008
|
const sN = wN * ppp - wN * pp;
|
|
43005
43009
|
|
|
43006
43010
|
// combine data linearly
|
|
@@ -43289,7 +43293,7 @@ class KeyframeTrack {
|
|
|
43289
43293
|
|
|
43290
43294
|
}
|
|
43291
43295
|
|
|
43292
|
-
while ( to !== -
|
|
43296
|
+
while ( to !== -1 && times[ to ] > endTime ) {
|
|
43293
43297
|
|
|
43294
43298
|
-- to;
|
|
43295
43299
|
|
|
@@ -43643,7 +43647,7 @@ VectorKeyframeTrack.prototype.ValueTypeName = 'vector';
|
|
|
43643
43647
|
|
|
43644
43648
|
class AnimationClip {
|
|
43645
43649
|
|
|
43646
|
-
constructor( name = '', duration = -
|
|
43650
|
+
constructor( name = '', duration = -1, tracks = [], blendMode = NormalAnimationBlendMode ) {
|
|
43647
43651
|
|
|
43648
43652
|
this.name = name;
|
|
43649
43653
|
this.tracks = tracks;
|
|
@@ -43744,7 +43748,7 @@ class AnimationClip {
|
|
|
43744
43748
|
|
|
43745
43749
|
}
|
|
43746
43750
|
|
|
43747
|
-
return new this( name, -
|
|
43751
|
+
return new this( name, -1, tracks );
|
|
43748
43752
|
|
|
43749
43753
|
}
|
|
43750
43754
|
|
|
@@ -43856,7 +43860,7 @@ class AnimationClip {
|
|
|
43856
43860
|
const blendMode = animation.blendMode;
|
|
43857
43861
|
|
|
43858
43862
|
// automatic length determination in AnimationClip.
|
|
43859
|
-
let duration = animation.length || -
|
|
43863
|
+
let duration = animation.length || -1;
|
|
43860
43864
|
|
|
43861
43865
|
const hierarchyTracks = animation.hierarchy || [];
|
|
43862
43866
|
|
|
@@ -43881,7 +43885,7 @@ class AnimationClip {
|
|
|
43881
43885
|
|
|
43882
43886
|
for ( let m = 0; m < animationKeys[ k ].morphTargets.length; m ++ ) {
|
|
43883
43887
|
|
|
43884
|
-
morphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = -
|
|
43888
|
+
morphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = -1;
|
|
43885
43889
|
|
|
43886
43890
|
}
|
|
43887
43891
|
|
|
@@ -44246,7 +44250,7 @@ class LoadingManager {
|
|
|
44246
44250
|
|
|
44247
44251
|
const index = handlers.indexOf( regex );
|
|
44248
44252
|
|
|
44249
|
-
if ( index !== -
|
|
44253
|
+
if ( index !== -1 ) {
|
|
44250
44254
|
|
|
44251
44255
|
handlers.splice( index, 2 );
|
|
44252
44256
|
|
|
@@ -45502,13 +45506,13 @@ class PointLightShadow extends LightShadow {
|
|
|
45502
45506
|
];
|
|
45503
45507
|
|
|
45504
45508
|
this._cubeDirections = [
|
|
45505
|
-
new Vector3( 1, 0, 0 ), new Vector3( -
|
|
45506
|
-
new Vector3( 0, 0, -
|
|
45509
|
+
new Vector3( 1, 0, 0 ), new Vector3( -1, 0, 0 ), new Vector3( 0, 0, 1 ),
|
|
45510
|
+
new Vector3( 0, 0, -1 ), new Vector3( 0, 1, 0 ), new Vector3( 0, -1, 0 )
|
|
45507
45511
|
];
|
|
45508
45512
|
|
|
45509
45513
|
this._cubeUps = [
|
|
45510
45514
|
new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ),
|
|
45511
|
-
new Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ), new Vector3( 0, 0, -
|
|
45515
|
+
new Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ), new Vector3( 0, 0, -1 )
|
|
45512
45516
|
];
|
|
45513
45517
|
|
|
45514
45518
|
}
|
|
@@ -45602,7 +45606,7 @@ class DirectionalLightShadow extends LightShadow {
|
|
|
45602
45606
|
|
|
45603
45607
|
constructor() {
|
|
45604
45608
|
|
|
45605
|
-
super( new OrthographicCamera( -
|
|
45609
|
+
super( new OrthographicCamera( -5, 5, 5, -5, 0.5, 500 ) );
|
|
45606
45610
|
|
|
45607
45611
|
this.isDirectionalLightShadow = true;
|
|
45608
45612
|
|
|
@@ -46390,7 +46394,7 @@ class LoaderUtils {
|
|
|
46390
46394
|
|
|
46391
46395
|
const index = url.lastIndexOf( '/' );
|
|
46392
46396
|
|
|
46393
|
-
if ( index === -
|
|
46397
|
+
if ( index === -1 ) return './';
|
|
46394
46398
|
|
|
46395
46399
|
return url.slice( 0, index + 1 );
|
|
46396
46400
|
|
|
@@ -48257,7 +48261,7 @@ class AudioListener extends Object3D {
|
|
|
48257
48261
|
if ( ! Number.isFinite( _position$1.x ) || ! Number.isFinite( _position$1.y ) || ! Number.isFinite( _position$1.z ) )
|
|
48258
48262
|
return;
|
|
48259
48263
|
|
|
48260
|
-
_orientation$1.set( 0, 0, -
|
|
48264
|
+
_orientation$1.set( 0, 0, -1 ).applyQuaternion( _quaternion$1 );
|
|
48261
48265
|
|
|
48262
48266
|
if ( listener.positionX ) {
|
|
48263
48267
|
|
|
@@ -49345,7 +49349,7 @@ class PropertyBinding {
|
|
|
49345
49349
|
|
|
49346
49350
|
const lastDot = results.nodeName && results.nodeName.lastIndexOf( '.' );
|
|
49347
49351
|
|
|
49348
|
-
if ( lastDot !== undefined && lastDot !== -
|
|
49352
|
+
if ( lastDot !== undefined && lastDot !== -1 ) {
|
|
49349
49353
|
|
|
49350
49354
|
const objectName = results.nodeName.substring( lastDot + 1 );
|
|
49351
49355
|
|
|
@@ -49353,7 +49357,7 @@ class PropertyBinding {
|
|
|
49353
49357
|
// is no way to parse 'foo.bar.baz': 'baz' must be a property, but
|
|
49354
49358
|
// 'bar' could be the objectName, or part of a nodeName (which can
|
|
49355
49359
|
// include '.' characters).
|
|
49356
|
-
if ( _supportedObjectNames.indexOf( objectName ) !== -
|
|
49360
|
+
if ( _supportedObjectNames.indexOf( objectName ) !== -1 ) {
|
|
49357
49361
|
|
|
49358
49362
|
results.nodeName = results.nodeName.substring( 0, lastDot );
|
|
49359
49363
|
results.objectName = objectName;
|
|
@@ -49374,7 +49378,7 @@ class PropertyBinding {
|
|
|
49374
49378
|
|
|
49375
49379
|
static findNode( root, nodeName ) {
|
|
49376
49380
|
|
|
49377
|
-
if ( nodeName === undefined || nodeName === '' || nodeName === '.' || nodeName === -
|
|
49381
|
+
if ( nodeName === undefined || nodeName === '' || nodeName === '.' || nodeName === -1 || nodeName === root.name || nodeName === root.uuid ) {
|
|
49378
49382
|
|
|
49379
49383
|
return root;
|
|
49380
49384
|
|
|
@@ -50333,7 +50337,7 @@ class AnimationAction {
|
|
|
50333
50337
|
this._weightInterpolant = null;
|
|
50334
50338
|
|
|
50335
50339
|
this.loop = LoopRepeat;
|
|
50336
|
-
this._loopCount = -
|
|
50340
|
+
this._loopCount = -1;
|
|
50337
50341
|
|
|
50338
50342
|
// global mixer time when the action is to be started
|
|
50339
50343
|
// it's set back to 'null' upon start of the action
|
|
@@ -50385,7 +50389,7 @@ class AnimationAction {
|
|
|
50385
50389
|
this.enabled = true;
|
|
50386
50390
|
|
|
50387
50391
|
this.time = 0; // restart clip
|
|
50388
|
-
this._loopCount = -
|
|
50392
|
+
this._loopCount = -1;// forget previous loops
|
|
50389
50393
|
this._startTime = null;// forget scheduling
|
|
50390
50394
|
|
|
50391
50395
|
return this.stopFading().stopWarping();
|
|
@@ -50780,7 +50784,7 @@ class AnimationAction {
|
|
|
50780
50784
|
|
|
50781
50785
|
if ( deltaTime === 0 ) {
|
|
50782
50786
|
|
|
50783
|
-
if ( loopCount === -
|
|
50787
|
+
if ( loopCount === -1 ) return time;
|
|
50784
50788
|
|
|
50785
50789
|
return ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time;
|
|
50786
50790
|
|
|
@@ -50788,7 +50792,7 @@ class AnimationAction {
|
|
|
50788
50792
|
|
|
50789
50793
|
if ( loop === LoopOnce ) {
|
|
50790
50794
|
|
|
50791
|
-
if ( loopCount === -
|
|
50795
|
+
if ( loopCount === -1 ) {
|
|
50792
50796
|
|
|
50793
50797
|
// just started
|
|
50794
50798
|
|
|
@@ -50822,14 +50826,14 @@ class AnimationAction {
|
|
|
50822
50826
|
|
|
50823
50827
|
this._mixer.dispatchEvent( {
|
|
50824
50828
|
type: 'finished', action: this,
|
|
50825
|
-
direction: deltaTime < 0 ? -
|
|
50829
|
+
direction: deltaTime < 0 ? -1 : 1
|
|
50826
50830
|
} );
|
|
50827
50831
|
|
|
50828
50832
|
}
|
|
50829
50833
|
|
|
50830
50834
|
} else { // repetitive Repeat or PingPong
|
|
50831
50835
|
|
|
50832
|
-
if ( loopCount === -
|
|
50836
|
+
if ( loopCount === -1 ) {
|
|
50833
50837
|
|
|
50834
50838
|
// just started
|
|
50835
50839
|
|
|
@@ -50875,7 +50879,7 @@ class AnimationAction {
|
|
|
50875
50879
|
|
|
50876
50880
|
this._mixer.dispatchEvent( {
|
|
50877
50881
|
type: 'finished', action: this,
|
|
50878
|
-
direction: deltaTime > 0 ? 1 : -
|
|
50882
|
+
direction: deltaTime > 0 ? 1 : -1
|
|
50879
50883
|
} );
|
|
50880
50884
|
|
|
50881
50885
|
} else {
|
|
@@ -51795,7 +51799,7 @@ class UniformsGroup extends EventDispatcher {
|
|
|
51795
51799
|
|
|
51796
51800
|
const index = this.uniforms.indexOf( uniform );
|
|
51797
51801
|
|
|
51798
|
-
if ( index !== -
|
|
51802
|
+
if ( index !== -1 ) this.uniforms.splice( index, 1 );
|
|
51799
51803
|
|
|
51800
51804
|
return this;
|
|
51801
51805
|
|
|
@@ -52005,7 +52009,7 @@ class Raycaster {
|
|
|
52005
52009
|
} else if ( camera.isOrthographicCamera ) {
|
|
52006
52010
|
|
|
52007
52011
|
this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera
|
|
52008
|
-
this.ray.direction.set( 0, 0, -
|
|
52012
|
+
this.ray.direction.set( 0, 0, -1 ).transformDirection( camera.matrixWorld );
|
|
52009
52013
|
this.camera = camera;
|
|
52010
52014
|
|
|
52011
52015
|
} else {
|
|
@@ -52021,7 +52025,7 @@ class Raycaster {
|
|
|
52021
52025
|
_matrix.identity().extractRotation( controller.matrixWorld );
|
|
52022
52026
|
|
|
52023
52027
|
this.ray.origin.setFromMatrixPosition( controller.matrixWorld );
|
|
52024
|
-
this.ray.direction.set( 0, 0, -
|
|
52028
|
+
this.ray.direction.set( 0, 0, -1 ).applyMatrix4( _matrix );
|
|
52025
52029
|
|
|
52026
52030
|
return this;
|
|
52027
52031
|
|
|
@@ -52151,7 +52155,7 @@ class Spherical {
|
|
|
52151
52155
|
} else {
|
|
52152
52156
|
|
|
52153
52157
|
this.theta = Math.atan2( x, z );
|
|
52154
|
-
this.phi = Math.acos( clamp$1( y / this.radius, -
|
|
52158
|
+
this.phi = Math.acos( clamp$1( y / this.radius, -1, 1 ) );
|
|
52155
52159
|
|
|
52156
52160
|
}
|
|
52157
52161
|
|
|
@@ -52615,9 +52619,9 @@ class SpotLightHelper extends Object3D {
|
|
|
52615
52619
|
const positions = [
|
|
52616
52620
|
0, 0, 0, 0, 0, 1,
|
|
52617
52621
|
0, 0, 0, 1, 0, 1,
|
|
52618
|
-
0, 0, 0, -
|
|
52622
|
+
0, 0, 0, -1, 0, 1,
|
|
52619
52623
|
0, 0, 0, 0, 1, 1,
|
|
52620
|
-
0, 0, 0, 0, -
|
|
52624
|
+
0, 0, 0, 0, -1, 1
|
|
52621
52625
|
];
|
|
52622
52626
|
|
|
52623
52627
|
for ( let i = 0, j = 1, l = 32; i < l; i ++, j ++ ) {
|
|
@@ -53389,40 +53393,40 @@ class CameraHelper extends LineSegments {
|
|
|
53389
53393
|
|
|
53390
53394
|
// center / target
|
|
53391
53395
|
|
|
53392
|
-
setPoint( 'c', pointMap, geometry, _camera$1, 0, 0, -
|
|
53396
|
+
setPoint( 'c', pointMap, geometry, _camera$1, 0, 0, -1 );
|
|
53393
53397
|
setPoint( 't', pointMap, geometry, _camera$1, 0, 0, 1 );
|
|
53394
53398
|
|
|
53395
53399
|
// near
|
|
53396
53400
|
|
|
53397
|
-
setPoint( 'n1', pointMap, geometry, _camera$1, -
|
|
53398
|
-
setPoint( 'n2', pointMap, geometry, _camera$1, w, -
|
|
53399
|
-
setPoint( 'n3', pointMap, geometry, _camera$1, -
|
|
53400
|
-
setPoint( 'n4', pointMap, geometry, _camera$1, w, h, -
|
|
53401
|
+
setPoint( 'n1', pointMap, geometry, _camera$1, -1, -1, -1 );
|
|
53402
|
+
setPoint( 'n2', pointMap, geometry, _camera$1, w, -1, -1 );
|
|
53403
|
+
setPoint( 'n3', pointMap, geometry, _camera$1, -1, h, -1 );
|
|
53404
|
+
setPoint( 'n4', pointMap, geometry, _camera$1, w, h, -1 );
|
|
53401
53405
|
|
|
53402
53406
|
// far
|
|
53403
53407
|
|
|
53404
|
-
setPoint( 'f1', pointMap, geometry, _camera$1, -
|
|
53405
|
-
setPoint( 'f2', pointMap, geometry, _camera$1, w, -
|
|
53406
|
-
setPoint( 'f3', pointMap, geometry, _camera$1, -
|
|
53408
|
+
setPoint( 'f1', pointMap, geometry, _camera$1, -1, -1, 1 );
|
|
53409
|
+
setPoint( 'f2', pointMap, geometry, _camera$1, w, -1, 1 );
|
|
53410
|
+
setPoint( 'f3', pointMap, geometry, _camera$1, -1, h, 1 );
|
|
53407
53411
|
setPoint( 'f4', pointMap, geometry, _camera$1, w, h, 1 );
|
|
53408
53412
|
|
|
53409
53413
|
// up
|
|
53410
53414
|
|
|
53411
|
-
setPoint( 'u1', pointMap, geometry, _camera$1, w * 0.7, h * 1.1, -
|
|
53412
|
-
setPoint( 'u2', pointMap, geometry, _camera$1, -
|
|
53413
|
-
setPoint( 'u3', pointMap, geometry, _camera$1, 0, h * 2, -
|
|
53415
|
+
setPoint( 'u1', pointMap, geometry, _camera$1, w * 0.7, h * 1.1, -1 );
|
|
53416
|
+
setPoint( 'u2', pointMap, geometry, _camera$1, -1 * 0.7, h * 1.1, -1 );
|
|
53417
|
+
setPoint( 'u3', pointMap, geometry, _camera$1, 0, h * 2, -1 );
|
|
53414
53418
|
|
|
53415
53419
|
// cross
|
|
53416
53420
|
|
|
53417
|
-
setPoint( 'cf1', pointMap, geometry, _camera$1, -
|
|
53421
|
+
setPoint( 'cf1', pointMap, geometry, _camera$1, -1, 0, 1 );
|
|
53418
53422
|
setPoint( 'cf2', pointMap, geometry, _camera$1, w, 0, 1 );
|
|
53419
|
-
setPoint( 'cf3', pointMap, geometry, _camera$1, 0, -
|
|
53423
|
+
setPoint( 'cf3', pointMap, geometry, _camera$1, 0, -1, 1 );
|
|
53420
53424
|
setPoint( 'cf4', pointMap, geometry, _camera$1, 0, h, 1 );
|
|
53421
53425
|
|
|
53422
|
-
setPoint( 'cn1', pointMap, geometry, _camera$1, -
|
|
53423
|
-
setPoint( 'cn2', pointMap, geometry, _camera$1, w, 0, -
|
|
53424
|
-
setPoint( 'cn3', pointMap, geometry, _camera$1, 0, -
|
|
53425
|
-
setPoint( 'cn4', pointMap, geometry, _camera$1, 0, h, -
|
|
53426
|
+
setPoint( 'cn1', pointMap, geometry, _camera$1, -1, 0, -1 );
|
|
53427
|
+
setPoint( 'cn2', pointMap, geometry, _camera$1, w, 0, -1 );
|
|
53428
|
+
setPoint( 'cn3', pointMap, geometry, _camera$1, 0, -1, -1 );
|
|
53429
|
+
setPoint( 'cn4', pointMap, geometry, _camera$1, 0, h, -1 );
|
|
53426
53430
|
|
|
53427
53431
|
geometry.getAttribute( 'position' ).needsUpdate = true;
|
|
53428
53432
|
|
|
@@ -53569,7 +53573,7 @@ class Box3Helper extends LineSegments {
|
|
|
53569
53573
|
|
|
53570
53574
|
const indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] );
|
|
53571
53575
|
|
|
53572
|
-
const positions = [ 1, 1, 1, -
|
|
53576
|
+
const positions = [ 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1 ];
|
|
53573
53577
|
|
|
53574
53578
|
const geometry = new BufferGeometry();
|
|
53575
53579
|
|
|
@@ -53618,7 +53622,7 @@ class PlaneHelper extends Line {
|
|
|
53618
53622
|
|
|
53619
53623
|
const color = hex;
|
|
53620
53624
|
|
|
53621
|
-
const positions = [ 1, -
|
|
53625
|
+
const positions = [ 1, -1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0 ];
|
|
53622
53626
|
|
|
53623
53627
|
const geometry = new BufferGeometry();
|
|
53624
53628
|
geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );
|
|
@@ -53632,7 +53636,7 @@ class PlaneHelper extends Line {
|
|
|
53632
53636
|
|
|
53633
53637
|
this.size = size;
|
|
53634
53638
|
|
|
53635
|
-
const positions2 = [ 1, 1, 0, -
|
|
53639
|
+
const positions2 = [ 1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0 ];
|
|
53636
53640
|
|
|
53637
53641
|
const geometry2 = new BufferGeometry();
|
|
53638
53642
|
geometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );
|
|
@@ -53686,7 +53690,7 @@ class ArrowHelper extends Object3D {
|
|
|
53686
53690
|
_lineGeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) );
|
|
53687
53691
|
|
|
53688
53692
|
_coneGeometry = new CylinderGeometry( 0, 0.5, 1, 5, 1 );
|
|
53689
|
-
_coneGeometry.translate( 0, -
|
|
53693
|
+
_coneGeometry.translate( 0, -0.5, 0 );
|
|
53690
53694
|
|
|
53691
53695
|
}
|
|
53692
53696
|
|
|
@@ -53713,7 +53717,7 @@ class ArrowHelper extends Object3D {
|
|
|
53713
53717
|
|
|
53714
53718
|
this.quaternion.set( 0, 0, 0, 1 );
|
|
53715
53719
|
|
|
53716
|
-
} else if ( dir.y < -
|
|
53720
|
+
} else if ( dir.y < -0.99999 ) {
|
|
53717
53721
|
|
|
53718
53722
|
this.quaternion.set( 1, 0, 0, 0 );
|
|
53719
53723
|
|
|
@@ -54124,7 +54128,7 @@ class Controls extends EventDispatcher {
|
|
|
54124
54128
|
|
|
54125
54129
|
this.enabled = true;
|
|
54126
54130
|
|
|
54127
|
-
this.state = -
|
|
54131
|
+
this.state = -1;
|
|
54128
54132
|
|
|
54129
54133
|
this.keys = {};
|
|
54130
54134
|
this.mouseButtons = { LEFT: null, MIDDLE: null, RIGHT: null };
|
|
@@ -54520,7 +54524,7 @@ function getCacheKey( object, force = false ) {
|
|
|
54520
54524
|
|
|
54521
54525
|
for ( const { property, childNode } of getNodeChildren( object ) ) {
|
|
54522
54526
|
|
|
54523
|
-
values.push( values, cyrb53( property.slice( 0, -
|
|
54527
|
+
values.push( values, cyrb53( property.slice( 0, -4 ) ), childNode.getCacheKey( force ) );
|
|
54524
54528
|
|
|
54525
54529
|
}
|
|
54526
54530
|
|
|
@@ -54637,7 +54641,7 @@ function getValueType( value ) {
|
|
|
54637
54641
|
|
|
54638
54642
|
function getValueFromType( type, ...params ) {
|
|
54639
54643
|
|
|
54640
|
-
const last4 = type ? type.slice( -
|
|
54644
|
+
const last4 = type ? type.slice( -4 ) : undefined;
|
|
54641
54645
|
|
|
54642
54646
|
if ( params.length === 1 ) { // ensure same behaviour as in NodeBuilder.format()
|
|
54643
54647
|
|
|
@@ -56263,7 +56267,7 @@ class ShaderNodeInternal extends Node {
|
|
|
56263
56267
|
|
|
56264
56268
|
const bools = [ false, true ];
|
|
56265
56269
|
const uints = [ 0, 1, 2, 3 ];
|
|
56266
|
-
const ints = [ -
|
|
56270
|
+
const ints = [ -1, -2 ];
|
|
56267
56271
|
const floats = [ 0.5, 1.5, 1 / 3, 1e-6, 1e6, Math.PI, Math.PI * 2, 1 / Math.PI, 2 / Math.PI, 1 / ( Math.PI * 2 ), Math.PI / 2 ];
|
|
56268
56272
|
|
|
56269
56273
|
const boolsCacheMap = new Map();
|
|
@@ -63834,7 +63838,7 @@ class Line2NodeMaterial extends NodeMaterial {
|
|
|
63834
63838
|
|
|
63835
63839
|
const a = cameraProjectionMatrix.element( 2 ).element( 2 ); // 3nd entry in 3th column
|
|
63836
63840
|
const b = cameraProjectionMatrix.element( 3 ).element( 2 ); // 3nd entry in 4th column
|
|
63837
|
-
const nearEstimate = b.mul( -
|
|
63841
|
+
const nearEstimate = b.mul( -0.5 ).div( a );
|
|
63838
63842
|
|
|
63839
63843
|
const alpha = nearEstimate.sub( start.z ).div( end.z.sub( start.z ) );
|
|
63840
63844
|
|
|
@@ -63873,7 +63877,7 @@ class Line2NodeMaterial extends NodeMaterial {
|
|
|
63873
63877
|
// but we need to perform ndc-space calculations in the shader, so we must address this issue directly
|
|
63874
63878
|
// perhaps there is a more elegant solution -- WestLangley
|
|
63875
63879
|
|
|
63876
|
-
const perspective = cameraProjectionMatrix.element( 2 ).element( 3 ).equal( -
|
|
63880
|
+
const perspective = cameraProjectionMatrix.element( 2 ).element( 3 ).equal( -1 ); // 4th entry in the 3rd column
|
|
63877
63881
|
|
|
63878
63882
|
If( perspective, () => {
|
|
63879
63883
|
|
|
@@ -64039,7 +64043,7 @@ class Line2NodeMaterial extends NodeMaterial {
|
|
|
64039
64043
|
const vLineDistance = varying( lineDistance.add( materialLineDashOffset ) );
|
|
64040
64044
|
const vLineDistanceOffset = offsetNode ? vLineDistance.add( offsetNode ) : vLineDistance;
|
|
64041
64045
|
|
|
64042
|
-
vUv.y.lessThan( -
|
|
64046
|
+
vUv.y.lessThan( -1 ).or( vUv.y.greaterThan( 1.0 ) ).discard(); // discard endcaps
|
|
64043
64047
|
vLineDistanceOffset.mod( dashSize.add( gapSize ) ).greaterThan( dashSize ).discard(); // todo - FIX
|
|
64044
64048
|
|
|
64045
64049
|
}
|
|
@@ -64257,7 +64261,7 @@ class EquirectUVNode extends TempNode {
|
|
|
64257
64261
|
const dir = this.dirNode;
|
|
64258
64262
|
|
|
64259
64263
|
const u = dir.z.atan2( dir.x ).mul( 1 / ( Math.PI * 2 ) ).add( 0.5 );
|
|
64260
|
-
const v = dir.y.clamp( -
|
|
64264
|
+
const v = dir.y.clamp( -1, 1.0 ).asin().mul( 1 / Math.PI ).add( 0.5 );
|
|
64261
64265
|
|
|
64262
64266
|
return vec2( u, v );
|
|
64263
64267
|
|
|
@@ -64695,7 +64699,7 @@ const F_Schlick = /*@__PURE__*/ Fn( ( { f0, f90, dotVH } ) => {
|
|
|
64695
64699
|
|
|
64696
64700
|
// Optimized variant (presented by Epic at SIGGRAPH '13)
|
|
64697
64701
|
// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf
|
|
64698
|
-
const fresnel = dotVH.mul( -
|
|
64702
|
+
const fresnel = dotVH.mul( -5.55473 ).sub( 6.98316 ).mul( dotVH ).exp2();
|
|
64699
64703
|
|
|
64700
64704
|
return f0.mul( fresnel.oneMinus() ).add( f90.mul( fresnel ) );
|
|
64701
64705
|
|
|
@@ -65041,15 +65045,15 @@ const BRDF_GGX = /*@__PURE__*/ Fn( ( inputs ) => {
|
|
|
65041
65045
|
// https://www.unrealengine.com/blog/physically-based-shading-on-mobile
|
|
65042
65046
|
const DFGApprox = /*@__PURE__*/ Fn( ( { roughness, dotNV } ) => {
|
|
65043
65047
|
|
|
65044
|
-
const c0 = vec4( -
|
|
65048
|
+
const c0 = vec4( -1, -0.0275, -0.572, 0.022 );
|
|
65045
65049
|
|
|
65046
|
-
const c1 = vec4( 1, 0.0425, 1.04, -
|
|
65050
|
+
const c1 = vec4( 1, 0.0425, 1.04, -0.04 );
|
|
65047
65051
|
|
|
65048
65052
|
const r = roughness.mul( c0 ).add( c1 );
|
|
65049
65053
|
|
|
65050
|
-
const a004 = r.x.mul( r.x ).min( dotNV.mul( -
|
|
65054
|
+
const a004 = r.x.mul( r.x ).min( dotNV.mul( -9.28 ).exp2() ).mul( r.x ).add( r.y );
|
|
65051
65055
|
|
|
65052
|
-
const fab = vec2( -
|
|
65056
|
+
const fab = vec2( -1.04, 1.04 ).mul( a004 ).add( r.zw );
|
|
65053
65057
|
|
|
65054
65058
|
return fab;
|
|
65055
65059
|
|
|
@@ -65275,7 +65279,7 @@ const w0 = ( a ) => mul( bC, mul( a, mul( a, a.negate().add( 3.0 ) ).sub( 3.0 )
|
|
|
65275
65279
|
|
|
65276
65280
|
const w1 = ( a ) => mul( bC, mul( a, mul( a, mul( 3.0, a ).sub( 6.0 ) ) ).add( 4.0 ) );
|
|
65277
65281
|
|
|
65278
|
-
const w2 = ( a ) => mul( bC, mul( a, mul( a, mul( -
|
|
65282
|
+
const w2 = ( a ) => mul( bC, mul( a, mul( a, mul( -3, a ).add( 3.0 ) ).add( 3.0 ) ).add( 1.0 ) );
|
|
65279
65283
|
|
|
65280
65284
|
const w3 = ( a ) => mul( bC, pow( a, 3 ) );
|
|
65281
65285
|
|
|
@@ -65284,7 +65288,7 @@ const g0 = ( a ) => w0( a ).add( w1( a ) );
|
|
|
65284
65288
|
const g1 = ( a ) => w2( a ).add( w3( a ) );
|
|
65285
65289
|
|
|
65286
65290
|
// h0 and h1 are the two offset functions
|
|
65287
|
-
const h0 = ( a ) => add( -
|
|
65291
|
+
const h0 = ( a ) => add( -1, w1( a ).div( w0( a ).add( w1( a ) ) ) );
|
|
65288
65292
|
|
|
65289
65293
|
const h1 = ( a ) => add( 1.0, w3( a ).div( w2( a ).add( w3( a ) ) ) );
|
|
65290
65294
|
|
|
@@ -65493,9 +65497,9 @@ const getIBLVolumeRefraction = /*@__PURE__*/ Fn( ( [ n, v, roughness, diffuseCol
|
|
|
65493
65497
|
|
|
65494
65498
|
// XYZ to linear-sRGB color space
|
|
65495
65499
|
const XYZ_TO_REC709 = /*@__PURE__*/ mat3(
|
|
65496
|
-
3.2404542, -
|
|
65497
|
-
-
|
|
65498
|
-
-
|
|
65500
|
+
3.2404542, -0.969266, 0.0556434,
|
|
65501
|
+
-1.5371385, 1.8760108, -0.2040259,
|
|
65502
|
+
-0.4985314, 0.0415560, 1.0572252
|
|
65499
65503
|
);
|
|
65500
65504
|
|
|
65501
65505
|
// Assume air interface for top
|
|
@@ -65524,7 +65528,7 @@ const evalSensitivity = ( OPD, shift ) => {
|
|
|
65524
65528
|
const pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
|
|
65525
65529
|
const VAR = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
|
|
65526
65530
|
|
|
65527
|
-
const x = float( 9.7470e-14 * Math.sqrt( 2.0 * Math.PI * 4.5282e+09 ) ).mul( phase.mul( 2.2399e+06 ).add( shift.x ).cos() ).mul( phase.pow2().mul( -
|
|
65531
|
+
const x = float( 9.7470e-14 * Math.sqrt( 2.0 * Math.PI * 4.5282e+09 ) ).mul( phase.mul( 2.2399e+06 ).add( shift.x ).cos() ).mul( phase.pow2().mul( -45282e5 ).exp() );
|
|
65528
65532
|
|
|
65529
65533
|
let xyz = val.mul( VAR.mul( 2.0 * Math.PI ).sqrt() ).mul( pos.mul( phase ).add( shift ).cos() ).mul( phase.pow2().negate().mul( VAR ).exp() );
|
|
65530
65534
|
xyz = vec3( xyz.x.add( x ), xyz.y, xyz.z ).div( 1.0685e-7 );
|
|
@@ -65623,8 +65627,8 @@ const IBLSheenBRDF = /*@__PURE__*/ Fn( ( { normal, viewDir, roughness } ) => {
|
|
|
65623
65627
|
|
|
65624
65628
|
const a = select(
|
|
65625
65629
|
roughness.lessThan( 0.25 ),
|
|
65626
|
-
float( -
|
|
65627
|
-
float( -
|
|
65630
|
+
float( -339.2 ).mul( r2 ).add( float( 161.4 ).mul( roughness ) ).sub( 25.9 ),
|
|
65631
|
+
float( -8.48 ).mul( r2 ).add( float( 14.3 ).mul( roughness ) ).sub( 9.95 )
|
|
65628
65632
|
);
|
|
65629
65633
|
|
|
65630
65634
|
const b = select(
|
|
@@ -65883,7 +65887,7 @@ class PhysicalLightingModel extends LightingModel {
|
|
|
65883
65887
|
const dotNV = transformedNormalView.dot( positionViewDirection ).clamp(); // @ TODO: Move to core dotNV
|
|
65884
65888
|
|
|
65885
65889
|
const aoNV = dotNV.add( ambientOcclusion );
|
|
65886
|
-
const aoExp = roughness.mul( -
|
|
65890
|
+
const aoExp = roughness.mul( -16 ).oneMinus().negate().exp2();
|
|
65887
65891
|
|
|
65888
65892
|
const aoNode = ambientOcclusion.sub( aoNV.pow( aoExp ).oneMinus() ).clamp();
|
|
65889
65893
|
|
|
@@ -65940,9 +65944,9 @@ class PhysicalLightingModel extends LightingModel {
|
|
|
65940
65944
|
// These defines must match with PMREMGenerator
|
|
65941
65945
|
|
|
65942
65946
|
const cubeUV_r0 = /*@__PURE__*/ float( 1.0 );
|
|
65943
|
-
const cubeUV_m0 = /*@__PURE__*/ float( -
|
|
65947
|
+
const cubeUV_m0 = /*@__PURE__*/ float( -2 );
|
|
65944
65948
|
const cubeUV_r1 = /*@__PURE__*/ float( 0.8 );
|
|
65945
|
-
const cubeUV_m1 = /*@__PURE__*/ float( -
|
|
65949
|
+
const cubeUV_m1 = /*@__PURE__*/ float( -1 );
|
|
65946
65950
|
const cubeUV_r4 = /*@__PURE__*/ float( 0.4 );
|
|
65947
65951
|
const cubeUV_m4 = /*@__PURE__*/ float( 2.0 );
|
|
65948
65952
|
const cubeUV_r5 = /*@__PURE__*/ float( 0.305 );
|
|
@@ -65960,7 +65964,7 @@ const cubeUV_minTileSize = /*@__PURE__*/ float( 16.0 );
|
|
|
65960
65964
|
const getFace = /*@__PURE__*/ Fn( ( [ direction ] ) => {
|
|
65961
65965
|
|
|
65962
65966
|
const absDirection = vec3( abs( direction ) ).toVar();
|
|
65963
|
-
const face = float( -
|
|
65967
|
+
const face = float( -1 ).toVar();
|
|
65964
65968
|
|
|
65965
65969
|
If( absDirection.x.greaterThan( absDirection.z ), () => {
|
|
65966
65970
|
|
|
@@ -66062,7 +66066,7 @@ const roughnessToMip = /*@__PURE__*/ Fn( ( [ roughness ] ) => {
|
|
|
66062
66066
|
|
|
66063
66067
|
} ).Else( () => {
|
|
66064
66068
|
|
|
66065
|
-
mip.assign( float( -
|
|
66069
|
+
mip.assign( float( -2 ).mul( log2( mul( 1.16, roughness ) ) ) ); // 1.16 = 1.79^0.25
|
|
66066
66070
|
|
|
66067
66071
|
} );
|
|
66068
66072
|
|
|
@@ -66090,25 +66094,25 @@ const getDirection = /*@__PURE__*/ Fn( ( [ uv_immutable, face ] ) => {
|
|
|
66090
66094
|
} ).ElseIf( face.equal( 1.0 ), () => {
|
|
66091
66095
|
|
|
66092
66096
|
direction.assign( direction.xzy );
|
|
66093
|
-
direction.xz.mulAssign( -
|
|
66097
|
+
direction.xz.mulAssign( -1 ); // ( -u, 1, -v ) pos y
|
|
66094
66098
|
|
|
66095
66099
|
} ).ElseIf( face.equal( 2.0 ), () => {
|
|
66096
66100
|
|
|
66097
|
-
direction.x.mulAssign( -
|
|
66101
|
+
direction.x.mulAssign( -1 ); // ( -u, v, 1 ) pos z
|
|
66098
66102
|
|
|
66099
66103
|
} ).ElseIf( face.equal( 3.0 ), () => {
|
|
66100
66104
|
|
|
66101
66105
|
direction.assign( direction.zyx );
|
|
66102
|
-
direction.xz.mulAssign( -
|
|
66106
|
+
direction.xz.mulAssign( -1 ); // ( -1, v, -u ) neg x
|
|
66103
66107
|
|
|
66104
66108
|
} ).ElseIf( face.equal( 4.0 ), () => {
|
|
66105
66109
|
|
|
66106
66110
|
direction.assign( direction.xzy );
|
|
66107
|
-
direction.xy.mulAssign( -
|
|
66111
|
+
direction.xy.mulAssign( -1 ); // ( -u, -1, v ) neg y
|
|
66108
66112
|
|
|
66109
66113
|
} ).ElseIf( face.equal( 5.0 ), () => {
|
|
66110
66114
|
|
|
66111
|
-
direction.z.mulAssign( -
|
|
66115
|
+
direction.z.mulAssign( -1 ); // ( u, v, -1 ) neg zS
|
|
66112
66116
|
|
|
66113
66117
|
} );
|
|
66114
66118
|
|
|
@@ -66211,7 +66215,7 @@ const blur = /*@__PURE__*/ Fn( ( { n, latitudinal, poleAxis, outputDirection, we
|
|
|
66211
66215
|
} );
|
|
66212
66216
|
|
|
66213
66217
|
const theta = float( dTheta.mul( float( i ) ) ).toVar();
|
|
66214
|
-
gl_FragColor.addAssign( weights.element( i ).mul( getSample( { theta: theta.mul( -
|
|
66218
|
+
gl_FragColor.addAssign( weights.element( i ).mul( getSample( { theta: theta.mul( -1 ), axis, outputDirection, mipInt, envMap, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP } ) ) );
|
|
66215
66219
|
gl_FragColor.addAssign( weights.element( i ).mul( getSample( { theta, axis, outputDirection, mipInt, envMap, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP } ) ) );
|
|
66216
66220
|
|
|
66217
66221
|
} );
|
|
@@ -66240,7 +66244,7 @@ function _getPMREMFromTexture( texture ) {
|
|
|
66240
66244
|
|
|
66241
66245
|
let cacheTexture = _cache.get( texture );
|
|
66242
66246
|
|
|
66243
|
-
const pmremVersion = cacheTexture !== undefined ? cacheTexture.pmremVersion : -
|
|
66247
|
+
const pmremVersion = cacheTexture !== undefined ? cacheTexture.pmremVersion : -1;
|
|
66244
66248
|
|
|
66245
66249
|
if ( pmremVersion !== texture.pmremVersion ) {
|
|
66246
66250
|
|
|
@@ -66344,7 +66348,7 @@ class PMREMNode extends TempNode {
|
|
|
66344
66348
|
|
|
66345
66349
|
let pmrem = this._pmrem;
|
|
66346
66350
|
|
|
66347
|
-
const pmremVersion = pmrem ? pmrem.pmremVersion : -
|
|
66351
|
+
const pmremVersion = pmrem ? pmrem.pmremVersion : -1;
|
|
66348
66352
|
const texture = this._value;
|
|
66349
66353
|
|
|
66350
66354
|
if ( pmremVersion !== texture.pmremVersion ) {
|
|
@@ -67418,23 +67422,23 @@ const normal = Fn( ( { texture, uv } ) => {
|
|
|
67418
67422
|
|
|
67419
67423
|
} ).ElseIf( uv.x.greaterThan( 1 - epsilon ), () => {
|
|
67420
67424
|
|
|
67421
|
-
ret.assign( vec3( -
|
|
67425
|
+
ret.assign( vec3( -1, 0, 0 ) );
|
|
67422
67426
|
|
|
67423
67427
|
} ).ElseIf( uv.y.greaterThan( 1 - epsilon ), () => {
|
|
67424
67428
|
|
|
67425
|
-
ret.assign( vec3( 0, -
|
|
67429
|
+
ret.assign( vec3( 0, -1, 0 ) );
|
|
67426
67430
|
|
|
67427
67431
|
} ).ElseIf( uv.z.greaterThan( 1 - epsilon ), () => {
|
|
67428
67432
|
|
|
67429
|
-
ret.assign( vec3( 0, 0, -
|
|
67433
|
+
ret.assign( vec3( 0, 0, -1 ) );
|
|
67430
67434
|
|
|
67431
67435
|
} ).Else( () => {
|
|
67432
67436
|
|
|
67433
67437
|
const step = 0.01;
|
|
67434
67438
|
|
|
67435
|
-
const x = texture.uv( uv.add( vec3( -
|
|
67436
|
-
const y = texture.uv( uv.add( vec3( 0.0, -
|
|
67437
|
-
const z = texture.uv( uv.add( vec3( 0.0, 0.0, -
|
|
67439
|
+
const x = texture.uv( uv.add( vec3( -0.01, 0.0, 0.0 ) ) ).r.sub( texture.uv( uv.add( vec3( step, 0.0, 0.0 ) ) ).r );
|
|
67440
|
+
const y = texture.uv( uv.add( vec3( 0.0, -0.01, 0.0 ) ) ).r.sub( texture.uv( uv.add( vec3( 0.0, step, 0.0 ) ) ).r );
|
|
67441
|
+
const z = texture.uv( uv.add( vec3( 0.0, 0.0, -0.01 ) ) ).r.sub( texture.uv( uv.add( vec3( 0.0, 0.0, step ) ) ).r );
|
|
67438
67442
|
|
|
67439
67443
|
ret.assign( vec3( x, y, z ) );
|
|
67440
67444
|
|
|
@@ -67523,7 +67527,7 @@ class VolumeNodeMaterial extends NodeMaterial {
|
|
|
67523
67527
|
|
|
67524
67528
|
const hitBox = Fn( ( { orig, dir } ) => {
|
|
67525
67529
|
|
|
67526
|
-
const box_min = vec3( -
|
|
67530
|
+
const box_min = vec3( -0.5 );
|
|
67527
67531
|
const box_max = vec3( 0.5 );
|
|
67528
67532
|
|
|
67529
67533
|
const inv_dir = dir.reciprocal();
|
|
@@ -68651,7 +68655,7 @@ const EXTRA_LOD_SIGMA = [ 0.125, 0.215, 0.35, 0.446, 0.526, 0.582 ];
|
|
|
68651
68655
|
// samples and exit early, but not recompile the shader.
|
|
68652
68656
|
const MAX_SAMPLES = 20;
|
|
68653
68657
|
|
|
68654
|
-
const _flatCamera = /*@__PURE__*/ new OrthographicCamera( -
|
|
68658
|
+
const _flatCamera = /*@__PURE__*/ new OrthographicCamera( -1, 1, 1, -1, 0, 1 );
|
|
68655
68659
|
const _cubeCamera = /*@__PURE__*/ new PerspectiveCamera( 90, 1 );
|
|
68656
68660
|
const _clearColor$1 = /*@__PURE__*/ new Color();
|
|
68657
68661
|
let _oldTarget = null;
|
|
@@ -68671,9 +68675,9 @@ const _axisDirections = [
|
|
|
68671
68675
|
/*@__PURE__*/ new Vector3( INV_PHI, 0, PHI ),
|
|
68672
68676
|
/*@__PURE__*/ new Vector3( 0, PHI, - INV_PHI ),
|
|
68673
68677
|
/*@__PURE__*/ new Vector3( 0, PHI, INV_PHI ),
|
|
68674
|
-
/*@__PURE__*/ new Vector3( -
|
|
68675
|
-
/*@__PURE__*/ new Vector3( 1, 1, -
|
|
68676
|
-
/*@__PURE__*/ new Vector3( -
|
|
68678
|
+
/*@__PURE__*/ new Vector3( -1, 1, -1 ),
|
|
68679
|
+
/*@__PURE__*/ new Vector3( 1, 1, -1 ),
|
|
68680
|
+
/*@__PURE__*/ new Vector3( -1, 1, 1 ),
|
|
68677
68681
|
/*@__PURE__*/ new Vector3( 1, 1, 1 )
|
|
68678
68682
|
];
|
|
68679
68683
|
|
|
@@ -68938,8 +68942,8 @@ class PMREMGenerator {
|
|
|
68938
68942
|
cubeCamera.far = far;
|
|
68939
68943
|
|
|
68940
68944
|
// px, py, pz, nx, ny, nz
|
|
68941
|
-
const upSign = [ -
|
|
68942
|
-
const forwardSign = [ 1, 1, 1, -
|
|
68945
|
+
const upSign = [ -1, 1, -1, -1, -1, -1 ];
|
|
68946
|
+
const forwardSign = [ 1, 1, 1, -1, -1, -1 ];
|
|
68943
68947
|
|
|
68944
68948
|
const renderer = this._renderer;
|
|
68945
68949
|
|
|
@@ -69254,7 +69258,7 @@ function _createPlanes( lodMax ) {
|
|
|
69254
69258
|
for ( let face = 0; face < cubeFaces; face ++ ) {
|
|
69255
69259
|
|
|
69256
69260
|
const x = ( face % 3 ) * 2 / 3 - 1;
|
|
69257
|
-
const y = face > 2 ? 0 : -
|
|
69261
|
+
const y = face > 2 ? 0 : -1;
|
|
69258
69262
|
const coordinates = [
|
|
69259
69263
|
x, y, 0,
|
|
69260
69264
|
x + 2 / 3, y, 0,
|
|
@@ -70392,7 +70396,7 @@ class NodeBuilder {
|
|
|
70392
70396
|
|
|
70393
70397
|
removeFlowTab() {
|
|
70394
70398
|
|
|
70395
|
-
this.tab = this.tab.slice( 0, -
|
|
70399
|
+
this.tab = this.tab.slice( 0, -1 );
|
|
70396
70400
|
|
|
70397
70401
|
return this;
|
|
70398
70402
|
|
|
@@ -71135,7 +71139,7 @@ function getTextureIndex( textures, name ) {
|
|
|
71135
71139
|
|
|
71136
71140
|
}
|
|
71137
71141
|
|
|
71138
|
-
return -
|
|
71142
|
+
return -1;
|
|
71139
71143
|
|
|
71140
71144
|
}
|
|
71141
71145
|
|
|
@@ -71240,7 +71244,7 @@ class FunctionOverloadingNode extends Node {
|
|
|
71240
71244
|
if ( candidateFnCall === null ) {
|
|
71241
71245
|
|
|
71242
71246
|
let candidateFn = null;
|
|
71243
|
-
let candidateScore = -
|
|
71247
|
+
let candidateScore = -1;
|
|
71244
71248
|
|
|
71245
71249
|
for ( const functionNode of this.functionNodes ) {
|
|
71246
71250
|
|
|
@@ -71660,7 +71664,7 @@ const _normal = new Vector3();
|
|
|
71660
71664
|
const _reflectorWorldPosition = new Vector3();
|
|
71661
71665
|
const _cameraWorldPosition = new Vector3();
|
|
71662
71666
|
const _rotationMatrix = new Matrix4();
|
|
71663
|
-
const _lookAtPosition = new Vector3( 0, 0, -
|
|
71667
|
+
const _lookAtPosition = new Vector3( 0, 0, -1 );
|
|
71664
71668
|
const clipPlane = new Vector4();
|
|
71665
71669
|
|
|
71666
71670
|
const _view = new Vector3();
|
|
@@ -71808,7 +71812,7 @@ class ReflectorNode extends TextureNode {
|
|
|
71808
71812
|
|
|
71809
71813
|
_rotationMatrix.extractRotation( camera.matrixWorld );
|
|
71810
71814
|
|
|
71811
|
-
_lookAtPosition.set( 0, 0, -
|
|
71815
|
+
_lookAtPosition.set( 0, 0, -1 );
|
|
71812
71816
|
_lookAtPosition.applyMatrix4( _rotationMatrix );
|
|
71813
71817
|
_lookAtPosition.add( _cameraWorldPosition );
|
|
71814
71818
|
|
|
@@ -71842,7 +71846,7 @@ class ReflectorNode extends TextureNode {
|
|
|
71842
71846
|
|
|
71843
71847
|
_q.x = ( Math.sign( clipPlane.x ) + projectionMatrix.elements[ 8 ] ) / projectionMatrix.elements[ 0 ];
|
|
71844
71848
|
_q.y = ( Math.sign( clipPlane.y ) + projectionMatrix.elements[ 9 ] ) / projectionMatrix.elements[ 5 ];
|
|
71845
|
-
_q.z = -
|
|
71849
|
+
_q.z = -1;
|
|
71846
71850
|
_q.w = ( 1.0 + projectionMatrix.elements[ 10 ] ) / projectionMatrix.elements[ 14 ];
|
|
71847
71851
|
|
|
71848
71852
|
// Calculate the scaled plane vector
|
|
@@ -71885,7 +71889,7 @@ const reflector = ( parameters ) => nodeObject( new ReflectorNode( parameters )
|
|
|
71885
71889
|
|
|
71886
71890
|
// Helper for passes that need to fill the viewport with a single quad.
|
|
71887
71891
|
|
|
71888
|
-
const _camera = /*@__PURE__*/ new OrthographicCamera( -
|
|
71892
|
+
const _camera = /*@__PURE__*/ new OrthographicCamera( -1, 1, 1, -1, 0, 1 );
|
|
71889
71893
|
|
|
71890
71894
|
// https://github.com/mrdoob/three.js/pull/21358
|
|
71891
71895
|
|
|
@@ -71895,9 +71899,9 @@ class QuadGeometry extends BufferGeometry {
|
|
|
71895
71899
|
|
|
71896
71900
|
super();
|
|
71897
71901
|
|
|
71898
|
-
const uv = flipY === false ? [ 0, -
|
|
71902
|
+
const uv = flipY === false ? [ 0, -1, 0, 1, 2, 1 ] : [ 0, 2, 0, 0, 2, 0 ];
|
|
71899
71903
|
|
|
71900
|
-
this.setAttribute( 'position', new Float32BufferAttribute( [ -
|
|
71904
|
+
this.setAttribute( 'position', new Float32BufferAttribute( [ -1, 3, 0, -1, -1, 0, 3, -1, 0 ], 3 ) );
|
|
71901
71905
|
this.setAttribute( 'uv', new Float32BufferAttribute( uv, 2 ) );
|
|
71902
71906
|
|
|
71903
71907
|
}
|
|
@@ -73091,7 +73095,7 @@ class GaussianBlurNode extends TempNode {
|
|
|
73091
73095
|
|
|
73092
73096
|
for ( let i = 0; i < kernelRadius; i ++ ) {
|
|
73093
73097
|
|
|
73094
|
-
coefficients.push( 0.39894 * Math.exp( -
|
|
73098
|
+
coefficients.push( 0.39894 * Math.exp( -0.5 * i * i / ( kernelRadius * kernelRadius ) ) / kernelRadius );
|
|
73095
73099
|
|
|
73096
73100
|
}
|
|
73097
73101
|
|
|
@@ -73262,7 +73266,7 @@ const vibrance = /*@__PURE__*/ Fn( ( [ color, adjustment = float( 1 ) ] ) => {
|
|
|
73262
73266
|
const average = add( color.r, color.g, color.b ).div( 3.0 );
|
|
73263
73267
|
|
|
73264
73268
|
const mx = color.r.max( color.g.max( color.b ) );
|
|
73265
|
-
const amt = mx.sub( average ).mul( adjustment ).mul( -
|
|
73269
|
+
const amt = mx.sub( average ).mul( adjustment ).mul( -3 );
|
|
73266
73270
|
|
|
73267
73271
|
return mix( color.rgb, mx, amt );
|
|
73268
73272
|
|
|
@@ -73465,26 +73469,26 @@ class SobelOperatorNode extends TempNode {
|
|
|
73465
73469
|
|
|
73466
73470
|
// kernel definition (in glsl matrices are filled in column-major order)
|
|
73467
73471
|
|
|
73468
|
-
const Gx = mat3( -
|
|
73469
|
-
const Gy = mat3( -
|
|
73472
|
+
const Gx = mat3( -1, -2, -1, 0, 0, 0, 1, 2, 1 ); // x direction kernel
|
|
73473
|
+
const Gy = mat3( -1, 0, 1, -2, 0, 2, -1, 0, 1 ); // y direction kernel
|
|
73470
73474
|
|
|
73471
73475
|
// fetch the 3x3 neighbourhood of a fragment
|
|
73472
73476
|
|
|
73473
73477
|
// first column
|
|
73474
73478
|
|
|
73475
|
-
const tx0y0 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( -
|
|
73476
|
-
const tx0y1 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( -
|
|
73477
|
-
const tx0y2 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( -
|
|
73479
|
+
const tx0y0 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( -1, -1 ) ) ) ).xyz );
|
|
73480
|
+
const tx0y1 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( -1, 0 ) ) ) ).xyz );
|
|
73481
|
+
const tx0y2 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( -1, 1 ) ) ) ).xyz );
|
|
73478
73482
|
|
|
73479
73483
|
// second column
|
|
73480
73484
|
|
|
73481
|
-
const tx1y0 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( 0, -
|
|
73485
|
+
const tx1y0 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( 0, -1 ) ) ) ).xyz );
|
|
73482
73486
|
const tx1y1 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( 0, 0 ) ) ) ).xyz );
|
|
73483
73487
|
const tx1y2 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( 0, 1 ) ) ) ).xyz );
|
|
73484
73488
|
|
|
73485
73489
|
// third column
|
|
73486
73490
|
|
|
73487
|
-
const tx2y0 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( 1, -
|
|
73491
|
+
const tx2y0 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( 1, -1 ) ) ) ).xyz );
|
|
73488
73492
|
const tx2y1 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( 1, 0 ) ) ) ).xyz );
|
|
73489
73493
|
const tx2y2 = luminance( sampleTexture( uvNode.add( texel.mul( vec2( 1, 1 ) ) ) ).xyz );
|
|
73490
73494
|
|
|
@@ -73594,42 +73598,42 @@ class DepthOfFieldNode extends TempNode {
|
|
|
73594
73598
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.0, 0.4 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73595
73599
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.15, 0.37 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73596
73600
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.29, 0.29 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73597
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73601
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.37, 0.15 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73598
73602
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.40, 0.0 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73599
|
-
col = col.add( sampleTexture( uvNode.add( vec2( 0.37, -
|
|
73600
|
-
col = col.add( sampleTexture( uvNode.add( vec2( 0.29, -
|
|
73601
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73602
|
-
col = col.add( sampleTexture( uvNode.add( vec2( 0.0, -
|
|
73603
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73604
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73603
|
+
col = col.add( sampleTexture( uvNode.add( vec2( 0.37, -0.15 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73604
|
+
col = col.add( sampleTexture( uvNode.add( vec2( 0.29, -0.29 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73605
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.15, -0.37 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73606
|
+
col = col.add( sampleTexture( uvNode.add( vec2( 0.0, -0.4 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73607
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.15, 0.37 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73608
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.29, 0.29 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73605
73609
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.37, 0.15 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73606
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73607
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73608
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73609
|
-
col = col.add( sampleTexture( uvNode.add( vec2( 0.15, -
|
|
73610
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.4, 0.0 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73611
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.37, -0.15 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73612
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.29, -0.29 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73613
|
+
col = col.add( sampleTexture( uvNode.add( vec2( 0.15, -0.37 ).mul( aspectcorrect ).mul( dofblur ) ) ) );
|
|
73610
73614
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.15, 0.37 ).mul( aspectcorrect ).mul( dofblur9 ) ) ) );
|
|
73611
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73612
|
-
col = col.add( sampleTexture( uvNode.add( vec2( 0.37, -
|
|
73613
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73614
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73615
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.37, 0.15 ).mul( aspectcorrect ).mul( dofblur9 ) ) ) );
|
|
73616
|
+
col = col.add( sampleTexture( uvNode.add( vec2( 0.37, -0.15 ).mul( aspectcorrect ).mul( dofblur9 ) ) ) );
|
|
73617
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.15, -0.37 ).mul( aspectcorrect ).mul( dofblur9 ) ) ) );
|
|
73618
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.15, 0.37 ).mul( aspectcorrect ).mul( dofblur9 ) ) ) );
|
|
73615
73619
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.37, 0.15 ).mul( aspectcorrect ).mul( dofblur9 ) ) ) );
|
|
73616
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73617
|
-
col = col.add( sampleTexture( uvNode.add( vec2( 0.15, -
|
|
73620
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.37, -0.15 ).mul( aspectcorrect ).mul( dofblur9 ) ) ) );
|
|
73621
|
+
col = col.add( sampleTexture( uvNode.add( vec2( 0.15, -0.37 ).mul( aspectcorrect ).mul( dofblur9 ) ) ) );
|
|
73618
73622
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.29, 0.29 ).mul( aspectcorrect ).mul( dofblur7 ) ) ) );
|
|
73619
73623
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.40, 0.0 ).mul( aspectcorrect ).mul( dofblur7 ) ) ) );
|
|
73620
|
-
col = col.add( sampleTexture( uvNode.add( vec2( 0.29, -
|
|
73621
|
-
col = col.add( sampleTexture( uvNode.add( vec2( 0.0, -
|
|
73622
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73623
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73624
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73624
|
+
col = col.add( sampleTexture( uvNode.add( vec2( 0.29, -0.29 ).mul( aspectcorrect ).mul( dofblur7 ) ) ) );
|
|
73625
|
+
col = col.add( sampleTexture( uvNode.add( vec2( 0.0, -0.4 ).mul( aspectcorrect ).mul( dofblur7 ) ) ) );
|
|
73626
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.29, 0.29 ).mul( aspectcorrect ).mul( dofblur7 ) ) ) );
|
|
73627
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.4, 0.0 ).mul( aspectcorrect ).mul( dofblur7 ) ) ) );
|
|
73628
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.29, -0.29 ).mul( aspectcorrect ).mul( dofblur7 ) ) ) );
|
|
73625
73629
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.0, 0.4 ).mul( aspectcorrect ).mul( dofblur7 ) ) ) );
|
|
73626
73630
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.29, 0.29 ).mul( aspectcorrect ).mul( dofblur4 ) ) ) );
|
|
73627
73631
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.4, 0.0 ).mul( aspectcorrect ).mul( dofblur4 ) ) ) );
|
|
73628
|
-
col = col.add( sampleTexture( uvNode.add( vec2( 0.29, -
|
|
73629
|
-
col = col.add( sampleTexture( uvNode.add( vec2( 0.0, -
|
|
73630
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73631
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73632
|
-
col = col.add( sampleTexture( uvNode.add( vec2( -
|
|
73632
|
+
col = col.add( sampleTexture( uvNode.add( vec2( 0.29, -0.29 ).mul( aspectcorrect ).mul( dofblur4 ) ) ) );
|
|
73633
|
+
col = col.add( sampleTexture( uvNode.add( vec2( 0.0, -0.4 ).mul( aspectcorrect ).mul( dofblur4 ) ) ) );
|
|
73634
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.29, 0.29 ).mul( aspectcorrect ).mul( dofblur4 ) ) ) );
|
|
73635
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.4, 0.0 ).mul( aspectcorrect ).mul( dofblur4 ) ) ) );
|
|
73636
|
+
col = col.add( sampleTexture( uvNode.add( vec2( -0.29, -0.29 ).mul( aspectcorrect ).mul( dofblur4 ) ) ) );
|
|
73633
73637
|
col = col.add( sampleTexture( uvNode.add( vec2( 0.0, 0.4 ).mul( aspectcorrect ).mul( dofblur4 ) ) ) );
|
|
73634
73638
|
|
|
73635
73639
|
col = col.div( 41 );
|
|
@@ -73983,7 +73987,7 @@ class GTAONode extends TempNode {
|
|
|
73983
73987
|
const noiseTexel = sampleNoise( noiseUv );
|
|
73984
73988
|
const randomVec = noiseTexel.xyz.mul( 2.0 ).sub( 1.0 );
|
|
73985
73989
|
const tangent = vec3( randomVec.xy, 0.0 ).normalize();
|
|
73986
|
-
const bitangent = vec3( tangent.y.mul( -
|
|
73990
|
+
const bitangent = vec3( tangent.y.mul( -1 ), tangent.x, 0.0 );
|
|
73987
73991
|
const kernelMatrix = mat3( tangent, bitangent, vec3( 0.0, 0.0, 1.0 ) );
|
|
73988
73992
|
|
|
73989
73993
|
const DIRECTIONS = this.SAMPLES.lessThan( 30 ).select( 3, 5 );
|
|
@@ -74115,7 +74119,7 @@ function generateMagicSquare( size ) {
|
|
|
74115
74119
|
|
|
74116
74120
|
for ( let num = 1; num <= noiseSquareSize; ) {
|
|
74117
74121
|
|
|
74118
|
-
if ( i === -
|
|
74122
|
+
if ( i === -1 && j === noiseSize ) {
|
|
74119
74123
|
|
|
74120
74124
|
j = noiseSize - 2;
|
|
74121
74125
|
i = 0;
|
|
@@ -74377,7 +74381,7 @@ class FXAANode extends TempNode {
|
|
|
74377
74381
|
|
|
74378
74382
|
setup() {
|
|
74379
74383
|
|
|
74380
|
-
const textureNode = this.textureNode.bias( -
|
|
74384
|
+
const textureNode = this.textureNode.bias( -100 );
|
|
74381
74385
|
const uvNode = textureNode.uvNode || uv();
|
|
74382
74386
|
|
|
74383
74387
|
// FXAA 3.11 implementation by NVIDIA, ported to WebGL by Agost Biro (biro@archilogic.com)
|
|
@@ -74438,10 +74442,10 @@ class FXAANode extends TempNode {
|
|
|
74438
74442
|
const FxaaPixelShader = Fn( ( [ uv, fxaaQualityRcpFrame, fxaaQualityEdgeThreshold, fxaaQualityinvEdgeThreshold ] ) => {
|
|
74439
74443
|
|
|
74440
74444
|
const rgbaM = FxaaTexTop( uv ).toVar();
|
|
74441
|
-
const rgbaS = FxaaTexOff( uv, vec2( 0.0, -
|
|
74445
|
+
const rgbaS = FxaaTexOff( uv, vec2( 0.0, -1 ), fxaaQualityRcpFrame.xy ).toVar();
|
|
74442
74446
|
const rgbaE = FxaaTexOff( uv, vec2( 1.0, 0.0 ), fxaaQualityRcpFrame.xy ).toVar();
|
|
74443
74447
|
const rgbaN = FxaaTexOff( uv, vec2( 0.0, 1.0 ), fxaaQualityRcpFrame.xy ).toVar();
|
|
74444
|
-
const rgbaW = FxaaTexOff( uv, vec2( -
|
|
74448
|
+
const rgbaW = FxaaTexOff( uv, vec2( -1, 0.0 ), fxaaQualityRcpFrame.xy ).toVar();
|
|
74445
74449
|
// . S .
|
|
74446
74450
|
// W M E
|
|
74447
74451
|
// . N .
|
|
@@ -74474,8 +74478,8 @@ class FXAANode extends TempNode {
|
|
|
74474
74478
|
|
|
74475
74479
|
// locate the edge
|
|
74476
74480
|
|
|
74477
|
-
const x = contrastE.greaterThan( contrastW ).select( 1, -
|
|
74478
|
-
const y = contrastS.greaterThan( contrastN ).select( 1, -
|
|
74481
|
+
const x = contrastE.greaterThan( contrastW ).select( 1, -1 ).toVar();
|
|
74482
|
+
const y = contrastS.greaterThan( contrastN ).select( 1, -1 ).toVar();
|
|
74479
74483
|
|
|
74480
74484
|
const dirToEdge = vec2( x, y ).toVar();
|
|
74481
74485
|
// . 2 . . 1 .
|
|
@@ -74933,7 +74937,7 @@ class BloomNode extends TempNode {
|
|
|
74933
74937
|
|
|
74934
74938
|
for ( let i = 0; i < kernelRadius; i ++ ) {
|
|
74935
74939
|
|
|
74936
|
-
coefficients.push( 0.39894 * Math.exp( -
|
|
74940
|
+
coefficients.push( 0.39894 * Math.exp( -0.5 * i * i / ( kernelRadius * kernelRadius ) ) / kernelRadius );
|
|
74937
74941
|
|
|
74938
74942
|
}
|
|
74939
74943
|
|
|
@@ -75119,9 +75123,9 @@ class PixelationNode extends TempNode {
|
|
|
75119
75123
|
|
|
75120
75124
|
const diff = property( 'float', 'diff' );
|
|
75121
75125
|
diff.addAssign( clamp( sampleDepth( 1, 0 ).sub( depth ) ) );
|
|
75122
|
-
diff.addAssign( clamp( sampleDepth( -
|
|
75126
|
+
diff.addAssign( clamp( sampleDepth( -1, 0 ).sub( depth ) ) );
|
|
75123
75127
|
diff.addAssign( clamp( sampleDepth( 0, 1 ).sub( depth ) ) );
|
|
75124
|
-
diff.addAssign( clamp( sampleDepth( 0, -
|
|
75128
|
+
diff.addAssign( clamp( sampleDepth( 0, -1 ).sub( depth ) ) );
|
|
75125
75129
|
|
|
75126
75130
|
return floor( smoothstep( 0.01, 0.02, diff ).mul( 2 ) ).div( 2 );
|
|
75127
75131
|
|
|
@@ -75136,7 +75140,7 @@ class PixelationNode extends TempNode {
|
|
|
75136
75140
|
|
|
75137
75141
|
const normalEdgeBias = vec3( 1, 1, 1 ); // This should probably be a parameter.
|
|
75138
75142
|
const normalDiff = dot( normal.sub( neighborNormal ), normalEdgeBias );
|
|
75139
|
-
const normalIndicator = clamp( smoothstep( -
|
|
75143
|
+
const normalIndicator = clamp( smoothstep( -0.01, 0.01, normalDiff ), 0.0, 1.0 );
|
|
75140
75144
|
|
|
75141
75145
|
// Only the shallower pixel should detect the normal edge.
|
|
75142
75146
|
|
|
@@ -75150,9 +75154,9 @@ class PixelationNode extends TempNode {
|
|
|
75150
75154
|
|
|
75151
75155
|
const indicator = property( 'float', 'indicator' );
|
|
75152
75156
|
|
|
75153
|
-
indicator.addAssign( neighborNormalEdgeIndicator( 0, -
|
|
75157
|
+
indicator.addAssign( neighborNormalEdgeIndicator( 0, -1, depth, normal ) );
|
|
75154
75158
|
indicator.addAssign( neighborNormalEdgeIndicator( 0, 1, depth, normal ) );
|
|
75155
|
-
indicator.addAssign( neighborNormalEdgeIndicator( -
|
|
75159
|
+
indicator.addAssign( neighborNormalEdgeIndicator( -1, 0, depth, normal ) );
|
|
75156
75160
|
indicator.addAssign( neighborNormalEdgeIndicator( 1, 0, depth, normal ) );
|
|
75157
75161
|
|
|
75158
75162
|
return step( 0.1, indicator );
|
|
@@ -75372,7 +75376,7 @@ class SSAAPassNode extends PassNode {
|
|
|
75372
75376
|
// The following equation varies the sampleWeight per sample so that it is uniformly distributed
|
|
75373
75377
|
// across a range of values whose rounding errors cancel each other out.
|
|
75374
75378
|
|
|
75375
|
-
const uniformCenteredDistribution = ( -
|
|
75379
|
+
const uniformCenteredDistribution = ( -0.5 + ( i + 0.5 ) / jitterOffsets.length );
|
|
75376
75380
|
this.sampleWeight.value += roundingRange * uniformCenteredDistribution;
|
|
75377
75381
|
|
|
75378
75382
|
}
|
|
@@ -75501,28 +75505,28 @@ const _JitterVectors = [
|
|
|
75501
75505
|
[ 0, 0 ]
|
|
75502
75506
|
],
|
|
75503
75507
|
[
|
|
75504
|
-
[ 4, 4 ], [ -
|
|
75508
|
+
[ 4, 4 ], [ -4, -4 ]
|
|
75505
75509
|
],
|
|
75506
75510
|
[
|
|
75507
|
-
[ -
|
|
75511
|
+
[ -2, -6 ], [ 6, -2 ], [ -6, 2 ], [ 2, 6 ]
|
|
75508
75512
|
],
|
|
75509
75513
|
[
|
|
75510
|
-
[ 1, -
|
|
75511
|
-
[ -
|
|
75514
|
+
[ 1, -3 ], [ -1, 3 ], [ 5, 1 ], [ -3, -5 ],
|
|
75515
|
+
[ -5, 5 ], [ -7, -1 ], [ 3, 7 ], [ 7, -7 ]
|
|
75512
75516
|
],
|
|
75513
75517
|
[
|
|
75514
|
-
[ 1, 1 ], [ -
|
|
75515
|
-
[ -
|
|
75516
|
-
[ -
|
|
75517
|
-
[ -
|
|
75518
|
+
[ 1, 1 ], [ -1, -3 ], [ -3, 2 ], [ 4, -1 ],
|
|
75519
|
+
[ -5, -2 ], [ 2, 5 ], [ 5, 3 ], [ 3, -5 ],
|
|
75520
|
+
[ -2, 6 ], [ 0, -7 ], [ -4, -6 ], [ -6, 4 ],
|
|
75521
|
+
[ -8, 0 ], [ 7, -4 ], [ 6, 7 ], [ -7, -8 ]
|
|
75518
75522
|
],
|
|
75519
75523
|
[
|
|
75520
|
-
[ -
|
|
75521
|
-
[ -
|
|
75522
|
-
[ -
|
|
75523
|
-
[ -
|
|
75524
|
-
[ 5, -
|
|
75525
|
-
[ 2, -
|
|
75524
|
+
[ -4, -7 ], [ -7, -5 ], [ -3, -5 ], [ -5, -4 ],
|
|
75525
|
+
[ -1, -4 ], [ -2, -2 ], [ -6, -1 ], [ -4, 0 ],
|
|
75526
|
+
[ -7, 1 ], [ -1, 2 ], [ -6, 3 ], [ -3, 3 ],
|
|
75527
|
+
[ -7, 6 ], [ -3, 6 ], [ -5, 7 ], [ -1, 7 ],
|
|
75528
|
+
[ 5, -7 ], [ 1, -6 ], [ 6, -5 ], [ 4, -4 ],
|
|
75529
|
+
[ 2, -3 ], [ 7, -2 ], [ 1, -1 ], [ 4, -1 ],
|
|
75526
75530
|
[ 2, 1 ], [ 6, 2 ], [ 0, 4 ], [ 4, 4 ],
|
|
75527
75531
|
[ 2, 5 ], [ 7, 5 ], [ 5, 6 ], [ 3, 7 ]
|
|
75528
75532
|
]
|
|
@@ -75724,15 +75728,15 @@ class AnaglyphPassNode extends StereoCompositePassNode {
|
|
|
75724
75728
|
// Dubois matrices from https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.7.6968&rep=rep1&type=pdf#page=4
|
|
75725
75729
|
|
|
75726
75730
|
this._colorMatrixLeft = uniform( new Matrix3().fromArray( [
|
|
75727
|
-
0.456100, -
|
|
75728
|
-
0.500484, -
|
|
75729
|
-
0.176381, -
|
|
75731
|
+
0.456100, -0.0400822, -0.0152161,
|
|
75732
|
+
0.500484, -0.0378246, -0.0205971,
|
|
75733
|
+
0.176381, -0.0157589, -546856e-8
|
|
75730
75734
|
] ) );
|
|
75731
75735
|
|
|
75732
75736
|
this._colorMatrixRight = uniform( new Matrix3().fromArray( [
|
|
75733
|
-
-
|
|
75734
|
-
-
|
|
75735
|
-
-
|
|
75737
|
+
-0.0434706, 0.378476, -0.0721527,
|
|
75738
|
+
-0.0879388, 0.73364, -0.112961,
|
|
75739
|
+
-155529e-8, -0.0184503, 1.2264
|
|
75736
75740
|
] ) );
|
|
75737
75741
|
|
|
75738
75742
|
}
|
|
@@ -76924,7 +76928,7 @@ const VSMPassVertical = Fn( ( { samples, radius, size, shadowPass } ) => {
|
|
|
76924
76928
|
const squaredMean = float( 0 ).toVar();
|
|
76925
76929
|
|
|
76926
76930
|
const uvStride = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( 2 ).div( samples.sub( 1 ) ) );
|
|
76927
|
-
const uvStart = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( -
|
|
76931
|
+
const uvStart = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( -1 ) );
|
|
76928
76932
|
|
|
76929
76933
|
Loop( { start: int( 0 ), end: int( samples ), type: 'int', condition: '<' }, ( { i } ) => {
|
|
76930
76934
|
|
|
@@ -76950,7 +76954,7 @@ const VSMPassHorizontal = Fn( ( { samples, radius, size, shadowPass } ) => {
|
|
|
76950
76954
|
const squaredMean = float( 0 ).toVar();
|
|
76951
76955
|
|
|
76952
76956
|
const uvStride = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( 2 ).div( samples.sub( 1 ) ) );
|
|
76953
|
-
const uvStart = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( -
|
|
76957
|
+
const uvStart = samples.lessThanEqual( float( 1 ) ).select( float( 0 ), float( -1 ) );
|
|
76954
76958
|
|
|
76955
76959
|
Loop( { start: int( 0 ), end: int( samples ), type: 'int', condition: '<' }, ( { i } ) => {
|
|
76956
76960
|
|
|
@@ -77853,9 +77857,9 @@ const acesFilmicToneMapping = /*@__PURE__*/ Fn( ( [ color, exposure ] ) => {
|
|
|
77853
77857
|
|
|
77854
77858
|
// ODT_SAT => XYZ => D60_2_D65 => sRGB
|
|
77855
77859
|
const ACESOutputMat = mat3(
|
|
77856
|
-
1.60475, -
|
|
77857
|
-
-
|
|
77858
|
-
-
|
|
77860
|
+
1.60475, -0.53108, -0.07367,
|
|
77861
|
+
-0.10208, 1.10813, -605e-5,
|
|
77862
|
+
-327e-5, -0.07276, 1.07602
|
|
77859
77863
|
);
|
|
77860
77864
|
|
|
77861
77865
|
color = color.mul( exposure ).div( 0.6 );
|
|
@@ -77879,7 +77883,7 @@ const acesFilmicToneMapping = /*@__PURE__*/ Fn( ( [ color, exposure ] ) => {
|
|
|
77879
77883
|
]
|
|
77880
77884
|
} );
|
|
77881
77885
|
|
|
77882
|
-
const LINEAR_REC2020_TO_LINEAR_SRGB = /*@__PURE__*/ mat3( vec3( 1.6605, -
|
|
77886
|
+
const LINEAR_REC2020_TO_LINEAR_SRGB = /*@__PURE__*/ mat3( vec3( 1.6605, -0.1246, -0.0182 ), vec3( -0.5876, 1.1329, -0.1006 ), vec3( -0.0728, -83e-4, 1.1187 ) );
|
|
77883
77887
|
const LINEAR_SRGB_TO_LINEAR_REC2020 = /*@__PURE__*/ mat3( vec3( 0.6274, 0.0691, 0.0164 ), vec3( 0.3293, 0.9195, 0.0880 ), vec3( 0.0433, 0.0113, 0.8956 ) );
|
|
77884
77888
|
|
|
77885
77889
|
const agxDefaultContrastApprox = /*@__PURE__*/ Fn( ( [ x_immutable ] ) => {
|
|
@@ -77896,8 +77900,8 @@ const agxToneMapping = /*@__PURE__*/ Fn( ( [ color, exposure ] ) => {
|
|
|
77896
77900
|
|
|
77897
77901
|
const colortone = vec3( color ).toVar();
|
|
77898
77902
|
const AgXInsetMatrix = mat3( vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) );
|
|
77899
|
-
const AgXOutsetMatrix = mat3( vec3( 1.1271005818144368, -
|
|
77900
|
-
const AgxMinEv = float( -
|
|
77903
|
+
const AgXOutsetMatrix = mat3( vec3( 1.1271005818144368, -0.1413297634984383, -0.14132976349843826 ), vec3( -0.11060664309660323, 1.157823702216272, -0.11060664309660294 ), vec3( -0.016493938717834573, -0.016493938717834257, 1.2519364065950405 ) );
|
|
77904
|
+
const AgxMinEv = float( -12.47393 );
|
|
77901
77905
|
const AgxMaxEv = float( 4.026069 );
|
|
77902
77906
|
colortone.mulAssign( exposure );
|
|
77903
77907
|
colortone.assign( LINEAR_SRGB_TO_LINEAR_REC2020.mul( colortone ) );
|
|
@@ -79322,9 +79326,9 @@ const mx_worley_noise_float_0 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immuta
|
|
|
79322
79326
|
const localpos = vec2( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ) ).toVar();
|
|
79323
79327
|
const sqdist = float( 1e6 ).toVar();
|
|
79324
79328
|
|
|
79325
|
-
Loop( { start: -
|
|
79329
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
79326
79330
|
|
|
79327
|
-
Loop( { start: -
|
|
79331
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
79328
79332
|
|
|
79329
79333
|
const dist = float( mx_worley_distance( localpos, x, y, X, Y, jitter, metric ) ).toVar();
|
|
79330
79334
|
sqdist.assign( min$1( sqdist, dist ) );
|
|
@@ -79360,9 +79364,9 @@ const mx_worley_noise_vec2_0 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immutab
|
|
|
79360
79364
|
const localpos = vec2( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ) ).toVar();
|
|
79361
79365
|
const sqdist = vec2( 1e6, 1e6 ).toVar();
|
|
79362
79366
|
|
|
79363
|
-
Loop( { start: -
|
|
79367
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
79364
79368
|
|
|
79365
|
-
Loop( { start: -
|
|
79369
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
79366
79370
|
|
|
79367
79371
|
const dist = float( mx_worley_distance( localpos, x, y, X, Y, jitter, metric ) ).toVar();
|
|
79368
79372
|
|
|
@@ -79408,9 +79412,9 @@ const mx_worley_noise_vec3_0 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immutab
|
|
|
79408
79412
|
const localpos = vec2( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ) ).toVar();
|
|
79409
79413
|
const sqdist = vec3( 1e6, 1e6, 1e6 ).toVar();
|
|
79410
79414
|
|
|
79411
|
-
Loop( { start: -
|
|
79415
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
79412
79416
|
|
|
79413
|
-
Loop( { start: -
|
|
79417
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
79414
79418
|
|
|
79415
79419
|
const dist = float( mx_worley_distance( localpos, x, y, X, Y, jitter, metric ) ).toVar();
|
|
79416
79420
|
|
|
@@ -79462,11 +79466,11 @@ const mx_worley_noise_float_1 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immuta
|
|
|
79462
79466
|
const localpos = vec3( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ), mx_floorfrac( p.z, Z ) ).toVar();
|
|
79463
79467
|
const sqdist = float( 1e6 ).toVar();
|
|
79464
79468
|
|
|
79465
|
-
Loop( { start: -
|
|
79469
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
79466
79470
|
|
|
79467
|
-
Loop( { start: -
|
|
79471
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
79468
79472
|
|
|
79469
|
-
Loop( { start: -
|
|
79473
|
+
Loop( { start: -1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
|
|
79470
79474
|
|
|
79471
79475
|
const dist = float( mx_worley_distance( localpos, x, y, z, X, Y, Z, jitter, metric ) ).toVar();
|
|
79472
79476
|
sqdist.assign( min$1( sqdist, dist ) );
|
|
@@ -79506,11 +79510,11 @@ const mx_worley_noise_vec2_1 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immutab
|
|
|
79506
79510
|
const localpos = vec3( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ), mx_floorfrac( p.z, Z ) ).toVar();
|
|
79507
79511
|
const sqdist = vec2( 1e6, 1e6 ).toVar();
|
|
79508
79512
|
|
|
79509
|
-
Loop( { start: -
|
|
79513
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
79510
79514
|
|
|
79511
|
-
Loop( { start: -
|
|
79515
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
79512
79516
|
|
|
79513
|
-
Loop( { start: -
|
|
79517
|
+
Loop( { start: -1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
|
|
79514
79518
|
|
|
79515
79519
|
const dist = float( mx_worley_distance( localpos, x, y, z, X, Y, Z, jitter, metric ) ).toVar();
|
|
79516
79520
|
|
|
@@ -79560,11 +79564,11 @@ const mx_worley_noise_vec3_1 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immutab
|
|
|
79560
79564
|
const localpos = vec3( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ), mx_floorfrac( p.z, Z ) ).toVar();
|
|
79561
79565
|
const sqdist = vec3( 1e6, 1e6, 1e6 ).toVar();
|
|
79562
79566
|
|
|
79563
|
-
Loop( { start: -
|
|
79567
|
+
Loop( { start: -1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
|
|
79564
79568
|
|
|
79565
|
-
Loop( { start: -
|
|
79569
|
+
Loop( { start: -1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
|
|
79566
79570
|
|
|
79567
|
-
Loop( { start: -
|
|
79571
|
+
Loop( { start: -1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
|
|
79568
79572
|
|
|
79569
79573
|
const dist = float( mx_worley_distance( localpos, x, y, z, X, Y, Z, jitter, metric ) ).toVar();
|
|
79570
79574
|
|
|
@@ -80283,7 +80287,7 @@ const parse = ( source ) => {
|
|
|
80283
80287
|
|
|
80284
80288
|
const pragmaMainIndex = source.indexOf( pragmaMain );
|
|
80285
80289
|
|
|
80286
|
-
const mainCode = pragmaMainIndex !== -
|
|
80290
|
+
const mainCode = pragmaMainIndex !== -1 ? source.slice( pragmaMainIndex + pragmaMain.length ) : source;
|
|
80287
80291
|
|
|
80288
80292
|
const declaration = mainCode.match( declarationRegexp );
|
|
80289
80293
|
|
|
@@ -80352,7 +80356,7 @@ const parse = ( source ) => {
|
|
|
80352
80356
|
|
|
80353
80357
|
const precision = declaration[ 1 ] !== undefined ? declaration[ 1 ] : '';
|
|
80354
80358
|
|
|
80355
|
-
const headerCode = pragmaMainIndex !== -
|
|
80359
|
+
const headerCode = pragmaMainIndex !== -1 ? source.slice( 0, pragmaMainIndex ) : '';
|
|
80356
80360
|
|
|
80357
80361
|
return {
|
|
80358
80362
|
type,
|