super-three 0.173.4 → 0.173.5
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 +206 -206
- package/build/three.core.js +159 -159
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +47 -47
- package/build/three.module.min.js +1 -1
- package/build/three.webgpu.js +90 -90
- package/build/three.webgpu.nodes.js +90 -90
- package/package.json +1 -1
- package/src/renderers/webxr/WebXRManager.js +2 -2
package/build/three.cjs
CHANGED
|
@@ -240,7 +240,7 @@ class EventDispatcher {
|
|
|
240
240
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
if ( listeners[ type ].indexOf( listener ) === -
|
|
243
|
+
if ( listeners[ type ].indexOf( listener ) === -1 ) {
|
|
244
244
|
|
|
245
245
|
listeners[ type ].push( listener );
|
|
246
246
|
|
|
@@ -254,7 +254,7 @@ class EventDispatcher {
|
|
|
254
254
|
|
|
255
255
|
if ( listeners === undefined ) return false;
|
|
256
256
|
|
|
257
|
-
return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== -
|
|
257
|
+
return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== -1;
|
|
258
258
|
|
|
259
259
|
}
|
|
260
260
|
|
|
@@ -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
|
|
|
@@ -560,15 +560,15 @@ function denormalize( value, array ) {
|
|
|
560
560
|
|
|
561
561
|
case Int32Array:
|
|
562
562
|
|
|
563
|
-
return Math.max( value / 2147483647.0, -
|
|
563
|
+
return Math.max( value / 2147483647.0, -1 );
|
|
564
564
|
|
|
565
565
|
case Int16Array:
|
|
566
566
|
|
|
567
|
-
return Math.max( value / 32767.0, -
|
|
567
|
+
return Math.max( value / 32767.0, -1 );
|
|
568
568
|
|
|
569
569
|
case Int8Array:
|
|
570
570
|
|
|
571
|
-
return Math.max( value / 127.0, -
|
|
571
|
+
return Math.max( value / 127.0, -1 );
|
|
572
572
|
|
|
573
573
|
default:
|
|
574
574
|
|
|
@@ -1010,7 +1010,7 @@ class Vector2 {
|
|
|
1010
1010
|
|
|
1011
1011
|
// clamp, to handle numerical problems
|
|
1012
1012
|
|
|
1013
|
-
return Math.acos( clamp( theta, -
|
|
1013
|
+
return Math.acos( clamp( theta, -1, 1 ) );
|
|
1014
1014
|
|
|
1015
1015
|
}
|
|
1016
1016
|
|
|
@@ -1611,7 +1611,7 @@ function toNormalizedProjectionMatrix( projectionMatrix ) {
|
|
|
1611
1611
|
function toReversedProjectionMatrix( projectionMatrix ) {
|
|
1612
1612
|
|
|
1613
1613
|
const m = projectionMatrix.elements;
|
|
1614
|
-
const isPerspectiveMatrix = m[ 11 ] === -
|
|
1614
|
+
const isPerspectiveMatrix = m[ 11 ] === -1;
|
|
1615
1615
|
|
|
1616
1616
|
// Reverse [0, 1] projection matrix
|
|
1617
1617
|
if ( isPerspectiveMatrix ) {
|
|
@@ -1635,9 +1635,9 @@ const LINEAR_REC709_TO_XYZ = /*@__PURE__*/ new Matrix3().set(
|
|
|
1635
1635
|
);
|
|
1636
1636
|
|
|
1637
1637
|
const XYZ_TO_LINEAR_REC709 = /*@__PURE__*/ new Matrix3().set(
|
|
1638
|
-
3.2409699, -
|
|
1639
|
-
-
|
|
1640
|
-
0.0556301, -
|
|
1638
|
+
3.2409699, -1.5373832, -0.4986108,
|
|
1639
|
+
-0.9692436, 1.8759675, 0.0415551,
|
|
1640
|
+
0.0556301, -0.203977, 1.0569715
|
|
1641
1641
|
);
|
|
1642
1642
|
|
|
1643
1643
|
function createColorManagement() {
|
|
@@ -3368,7 +3368,7 @@ class Quaternion {
|
|
|
3368
3368
|
|
|
3369
3369
|
let s = 1 - t;
|
|
3370
3370
|
const cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,
|
|
3371
|
-
dir = ( cos >= 0 ? 1 : -
|
|
3371
|
+
dir = ( cos >= 0 ? 1 : -1 ),
|
|
3372
3372
|
sqrSin = 1 - cos * cos;
|
|
3373
3373
|
|
|
3374
3374
|
// Skip the Slerp for tiny steps to avoid numeric problems:
|
|
@@ -3711,7 +3711,7 @@ class Quaternion {
|
|
|
3711
3711
|
|
|
3712
3712
|
angleTo( q ) {
|
|
3713
3713
|
|
|
3714
|
-
return 2 * Math.acos( Math.abs( clamp( this.dot( q ), -
|
|
3714
|
+
return 2 * Math.acos( Math.abs( clamp( this.dot( q ), -1, 1 ) ) );
|
|
3715
3715
|
|
|
3716
3716
|
}
|
|
3717
3717
|
|
|
@@ -3745,9 +3745,9 @@ class Quaternion {
|
|
|
3745
3745
|
|
|
3746
3746
|
conjugate() {
|
|
3747
3747
|
|
|
3748
|
-
this._x *= -
|
|
3749
|
-
this._y *= -
|
|
3750
|
-
this._z *= -
|
|
3748
|
+
this._x *= -1;
|
|
3749
|
+
this._y *= -1;
|
|
3750
|
+
this._z *= -1;
|
|
3751
3751
|
|
|
3752
3752
|
this._onChangeCallback();
|
|
3753
3753
|
|
|
@@ -4529,7 +4529,7 @@ class Vector3 {
|
|
|
4529
4529
|
|
|
4530
4530
|
// clamp, to handle numerical problems
|
|
4531
4531
|
|
|
4532
|
-
return Math.acos( clamp( theta, -
|
|
4532
|
+
return Math.acos( clamp( theta, -1, 1 ) );
|
|
4533
4533
|
|
|
4534
4534
|
}
|
|
4535
4535
|
|
|
@@ -5257,7 +5257,7 @@ const _v2$3 = /*@__PURE__*/ new Vector3();
|
|
|
5257
5257
|
|
|
5258
5258
|
class Sphere {
|
|
5259
5259
|
|
|
5260
|
-
constructor( center = new Vector3(), radius = -
|
|
5260
|
+
constructor( center = new Vector3(), radius = -1 ) {
|
|
5261
5261
|
|
|
5262
5262
|
this.isSphere = true;
|
|
5263
5263
|
|
|
@@ -5321,7 +5321,7 @@ class Sphere {
|
|
|
5321
5321
|
makeEmpty() {
|
|
5322
5322
|
|
|
5323
5323
|
this.center.set( 0, 0, 0 );
|
|
5324
|
-
this.radius = -
|
|
5324
|
+
this.radius = -1;
|
|
5325
5325
|
|
|
5326
5326
|
return this;
|
|
5327
5327
|
|
|
@@ -5503,7 +5503,7 @@ const _normal$1 = /*@__PURE__*/ new Vector3();
|
|
|
5503
5503
|
|
|
5504
5504
|
class Ray {
|
|
5505
5505
|
|
|
5506
|
-
constructor( origin = new Vector3(), direction = new Vector3( 0, 0, -
|
|
5506
|
+
constructor( origin = new Vector3(), direction = new Vector3( 0, 0, -1 ) ) {
|
|
5507
5507
|
|
|
5508
5508
|
this.origin = origin;
|
|
5509
5509
|
this.direction = direction;
|
|
@@ -5909,7 +5909,7 @@ class Ray {
|
|
|
5909
5909
|
|
|
5910
5910
|
} else if ( DdN < 0 ) {
|
|
5911
5911
|
|
|
5912
|
-
sign = -
|
|
5912
|
+
sign = -1;
|
|
5913
5913
|
DdN = - DdN;
|
|
5914
5914
|
|
|
5915
5915
|
} else {
|
|
@@ -6769,7 +6769,7 @@ class Matrix4 {
|
|
|
6769
6769
|
if ( coordinateSystem === WebGLCoordinateSystem ) {
|
|
6770
6770
|
|
|
6771
6771
|
c = - ( far + near ) / ( far - near );
|
|
6772
|
-
d = ( -
|
|
6772
|
+
d = ( -2 * far * near ) / ( far - near );
|
|
6773
6773
|
|
|
6774
6774
|
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
6775
6775
|
|
|
@@ -6785,7 +6785,7 @@ class Matrix4 {
|
|
|
6785
6785
|
te[ 0 ] = x; te[ 4 ] = 0; te[ 8 ] = a; te[ 12 ] = 0;
|
|
6786
6786
|
te[ 1 ] = 0; te[ 5 ] = y; te[ 9 ] = b; te[ 13 ] = 0;
|
|
6787
6787
|
te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = c; te[ 14 ] = d;
|
|
6788
|
-
te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = -
|
|
6788
|
+
te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = -1; te[ 15 ] = 0;
|
|
6789
6789
|
|
|
6790
6790
|
return this;
|
|
6791
6791
|
|
|
@@ -6806,12 +6806,12 @@ class Matrix4 {
|
|
|
6806
6806
|
if ( coordinateSystem === WebGLCoordinateSystem ) {
|
|
6807
6807
|
|
|
6808
6808
|
z = ( far + near ) * p;
|
|
6809
|
-
zInv = -
|
|
6809
|
+
zInv = -2 * p;
|
|
6810
6810
|
|
|
6811
6811
|
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
6812
6812
|
|
|
6813
6813
|
z = near * p;
|
|
6814
|
-
zInv = -
|
|
6814
|
+
zInv = -1 * p;
|
|
6815
6815
|
|
|
6816
6816
|
} else {
|
|
6817
6817
|
|
|
@@ -7006,7 +7006,7 @@ class Euler {
|
|
|
7006
7006
|
|
|
7007
7007
|
case 'XYZ':
|
|
7008
7008
|
|
|
7009
|
-
this._y = Math.asin( clamp( m13, -
|
|
7009
|
+
this._y = Math.asin( clamp( m13, -1, 1 ) );
|
|
7010
7010
|
|
|
7011
7011
|
if ( Math.abs( m13 ) < 0.9999999 ) {
|
|
7012
7012
|
|
|
@@ -7024,7 +7024,7 @@ class Euler {
|
|
|
7024
7024
|
|
|
7025
7025
|
case 'YXZ':
|
|
7026
7026
|
|
|
7027
|
-
this._x = Math.asin( - clamp( m23, -
|
|
7027
|
+
this._x = Math.asin( - clamp( m23, -1, 1 ) );
|
|
7028
7028
|
|
|
7029
7029
|
if ( Math.abs( m23 ) < 0.9999999 ) {
|
|
7030
7030
|
|
|
@@ -7042,7 +7042,7 @@ class Euler {
|
|
|
7042
7042
|
|
|
7043
7043
|
case 'ZXY':
|
|
7044
7044
|
|
|
7045
|
-
this._x = Math.asin( clamp( m32, -
|
|
7045
|
+
this._x = Math.asin( clamp( m32, -1, 1 ) );
|
|
7046
7046
|
|
|
7047
7047
|
if ( Math.abs( m32 ) < 0.9999999 ) {
|
|
7048
7048
|
|
|
@@ -7060,7 +7060,7 @@ class Euler {
|
|
|
7060
7060
|
|
|
7061
7061
|
case 'ZYX':
|
|
7062
7062
|
|
|
7063
|
-
this._y = Math.asin( - clamp( m31, -
|
|
7063
|
+
this._y = Math.asin( - clamp( m31, -1, 1 ) );
|
|
7064
7064
|
|
|
7065
7065
|
if ( Math.abs( m31 ) < 0.9999999 ) {
|
|
7066
7066
|
|
|
@@ -7078,7 +7078,7 @@ class Euler {
|
|
|
7078
7078
|
|
|
7079
7079
|
case 'YZX':
|
|
7080
7080
|
|
|
7081
|
-
this._z = Math.asin( clamp( m21, -
|
|
7081
|
+
this._z = Math.asin( clamp( m21, -1, 1 ) );
|
|
7082
7082
|
|
|
7083
7083
|
if ( Math.abs( m21 ) < 0.9999999 ) {
|
|
7084
7084
|
|
|
@@ -7096,7 +7096,7 @@ class Euler {
|
|
|
7096
7096
|
|
|
7097
7097
|
case 'XZY':
|
|
7098
7098
|
|
|
7099
|
-
this._z = Math.asin( - clamp( m12, -
|
|
7099
|
+
this._z = Math.asin( - clamp( m12, -1, 1 ) );
|
|
7100
7100
|
|
|
7101
7101
|
if ( Math.abs( m12 ) < 0.9999999 ) {
|
|
7102
7102
|
|
|
@@ -7623,7 +7623,7 @@ class Object3D extends EventDispatcher {
|
|
|
7623
7623
|
|
|
7624
7624
|
const index = this.children.indexOf( object );
|
|
7625
7625
|
|
|
7626
|
-
if ( index !== -
|
|
7626
|
+
if ( index !== -1 ) {
|
|
7627
7627
|
|
|
7628
7628
|
object.parent = null;
|
|
7629
7629
|
this.children.splice( index, 1 );
|
|
@@ -8964,7 +8964,7 @@ class Color {
|
|
|
8964
8964
|
|
|
8965
8965
|
getHexString( colorSpace = SRGBColorSpace ) {
|
|
8966
8966
|
|
|
8967
|
-
return ( '000000' + this.getHex( colorSpace ).toString( 16 ) ).slice( -
|
|
8967
|
+
return ( '000000' + this.getHex( colorSpace ).toString( 16 ) ).slice( -6 );
|
|
8968
8968
|
|
|
8969
8969
|
}
|
|
8970
8970
|
|
|
@@ -9848,7 +9848,7 @@ function _generateTables() {
|
|
|
9848
9848
|
|
|
9849
9849
|
// very small number (0, -0)
|
|
9850
9850
|
|
|
9851
|
-
if ( e < -
|
|
9851
|
+
if ( e < -27 ) {
|
|
9852
9852
|
|
|
9853
9853
|
baseTable[ i ] = 0x0000;
|
|
9854
9854
|
baseTable[ i | 0x100 ] = 0x8000;
|
|
@@ -9857,7 +9857,7 @@ function _generateTables() {
|
|
|
9857
9857
|
|
|
9858
9858
|
// small number (denorm)
|
|
9859
9859
|
|
|
9860
|
-
} else if ( e < -
|
|
9860
|
+
} else if ( e < -14 ) {
|
|
9861
9861
|
|
|
9862
9862
|
baseTable[ i ] = 0x0400 >> ( - e - 14 );
|
|
9863
9863
|
baseTable[ i | 0x100 ] = ( 0x0400 >> ( - e - 14 ) ) | 0x8000;
|
|
@@ -9914,7 +9914,7 @@ function _generateTables() {
|
|
|
9914
9914
|
|
|
9915
9915
|
}
|
|
9916
9916
|
|
|
9917
|
-
m &=
|
|
9917
|
+
m &= -8388609; // clear leading 1 bit
|
|
9918
9918
|
e += 0x38800000; // adjust bias
|
|
9919
9919
|
|
|
9920
9920
|
mantissaTable[ i ] = m | e;
|
|
@@ -9972,7 +9972,7 @@ function toHalfFloat( val ) {
|
|
|
9972
9972
|
|
|
9973
9973
|
if ( Math.abs( val ) > 65504 ) console.warn( 'THREE.DataUtils.toHalfFloat(): Value out of range.' );
|
|
9974
9974
|
|
|
9975
|
-
val = clamp( val, -
|
|
9975
|
+
val = clamp( val, -65504, 65504 );
|
|
9976
9976
|
|
|
9977
9977
|
_tables.floatView[ 0 ] = val;
|
|
9978
9978
|
const f = _tables.uint32View[ 0 ];
|
|
@@ -11243,7 +11243,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
11243
11243
|
|
|
11244
11244
|
tmp2.crossVectors( n2, t );
|
|
11245
11245
|
const test = tmp2.dot( tan2[ v ] );
|
|
11246
|
-
const w = ( test < 0.0 ) ? -
|
|
11246
|
+
const w = ( test < 0.0 ) ? -1 : 1.0;
|
|
11247
11247
|
|
|
11248
11248
|
tangentAttribute.setXYZW( v, tmp.x, tmp.y, tmp.z, w );
|
|
11249
11249
|
|
|
@@ -12085,7 +12085,7 @@ function checkGeometryIntersection( object, material, raycaster, ray, uv, uv1, n
|
|
|
12085
12085
|
|
|
12086
12086
|
if ( intersection.normal.dot( ray.direction ) > 0 ) {
|
|
12087
12087
|
|
|
12088
|
-
intersection.normal.multiplyScalar( -
|
|
12088
|
+
intersection.normal.multiplyScalar( -1 );
|
|
12089
12089
|
|
|
12090
12090
|
}
|
|
12091
12091
|
|
|
@@ -12149,12 +12149,12 @@ class BoxGeometry extends BufferGeometry {
|
|
|
12149
12149
|
|
|
12150
12150
|
// build each side of the box geometry
|
|
12151
12151
|
|
|
12152
|
-
buildPlane( 'z', 'y', 'x', -
|
|
12153
|
-
buildPlane( 'z', 'y', 'x', 1, -
|
|
12152
|
+
buildPlane( 'z', 'y', 'x', -1, -1, depth, height, width, depthSegments, heightSegments, 0 ); // px
|
|
12153
|
+
buildPlane( 'z', 'y', 'x', 1, -1, depth, height, - width, depthSegments, heightSegments, 1 ); // nx
|
|
12154
12154
|
buildPlane( 'x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2 ); // py
|
|
12155
|
-
buildPlane( 'x', 'z', 'y', 1, -
|
|
12156
|
-
buildPlane( 'x', 'y', 'z', 1, -
|
|
12157
|
-
buildPlane( 'x', 'y', 'z', -
|
|
12155
|
+
buildPlane( 'x', 'z', 'y', 1, -1, width, depth, - height, widthSegments, depthSegments, 3 ); // ny
|
|
12156
|
+
buildPlane( 'x', 'y', 'z', 1, -1, width, height, depth, widthSegments, heightSegments, 4 ); // pz
|
|
12157
|
+
buildPlane( 'x', 'y', 'z', -1, -1, width, height, - depth, widthSegments, heightSegments, 5 ); // nz
|
|
12158
12158
|
|
|
12159
12159
|
// build geometry
|
|
12160
12160
|
|
|
@@ -12204,7 +12204,7 @@ class BoxGeometry extends BufferGeometry {
|
|
|
12204
12204
|
|
|
12205
12205
|
vector[ u ] = 0;
|
|
12206
12206
|
vector[ v ] = 0;
|
|
12207
|
-
vector[ w ] = depth > 0 ? 1 : -
|
|
12207
|
+
vector[ w ] = depth > 0 ? 1 : -1;
|
|
12208
12208
|
|
|
12209
12209
|
// now apply vector to normal buffer
|
|
12210
12210
|
|
|
@@ -12756,7 +12756,7 @@ class PerspectiveCamera extends Camera {
|
|
|
12756
12756
|
*/
|
|
12757
12757
|
getViewBounds( distance, minTarget, maxTarget ) {
|
|
12758
12758
|
|
|
12759
|
-
_v3$1.set( -
|
|
12759
|
+
_v3$1.set( -1, -1, 0.5 ).applyMatrix4( this.projectionMatrixInverse );
|
|
12760
12760
|
|
|
12761
12761
|
minTarget.set( _v3$1.x, _v3$1.y ).multiplyScalar( - distance / _v3$1.z );
|
|
12762
12762
|
|
|
@@ -12871,7 +12871,7 @@ class PerspectiveCamera extends Camera {
|
|
|
12871
12871
|
let top = near * Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom;
|
|
12872
12872
|
let height = 2 * top;
|
|
12873
12873
|
let width = this.aspect * height;
|
|
12874
|
-
let left = -
|
|
12874
|
+
let left = -0.5 * width;
|
|
12875
12875
|
const view = this.view;
|
|
12876
12876
|
|
|
12877
12877
|
if ( this.view !== null && this.view.enabled ) {
|
|
@@ -12919,7 +12919,7 @@ class PerspectiveCamera extends Camera {
|
|
|
12919
12919
|
|
|
12920
12920
|
}
|
|
12921
12921
|
|
|
12922
|
-
const fov = -
|
|
12922
|
+
const fov = -90; // negative fov is not an error
|
|
12923
12923
|
const aspect = 1;
|
|
12924
12924
|
|
|
12925
12925
|
class CubeCamera extends Object3D {
|
|
@@ -12976,39 +12976,39 @@ class CubeCamera extends Object3D {
|
|
|
12976
12976
|
cameraPX.lookAt( 1, 0, 0 );
|
|
12977
12977
|
|
|
12978
12978
|
cameraNX.up.set( 0, 1, 0 );
|
|
12979
|
-
cameraNX.lookAt( -
|
|
12979
|
+
cameraNX.lookAt( -1, 0, 0 );
|
|
12980
12980
|
|
|
12981
|
-
cameraPY.up.set( 0, 0, -
|
|
12981
|
+
cameraPY.up.set( 0, 0, -1 );
|
|
12982
12982
|
cameraPY.lookAt( 0, 1, 0 );
|
|
12983
12983
|
|
|
12984
12984
|
cameraNY.up.set( 0, 0, 1 );
|
|
12985
|
-
cameraNY.lookAt( 0, -
|
|
12985
|
+
cameraNY.lookAt( 0, -1, 0 );
|
|
12986
12986
|
|
|
12987
12987
|
cameraPZ.up.set( 0, 1, 0 );
|
|
12988
12988
|
cameraPZ.lookAt( 0, 0, 1 );
|
|
12989
12989
|
|
|
12990
12990
|
cameraNZ.up.set( 0, 1, 0 );
|
|
12991
|
-
cameraNZ.lookAt( 0, 0, -
|
|
12991
|
+
cameraNZ.lookAt( 0, 0, -1 );
|
|
12992
12992
|
|
|
12993
12993
|
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
12994
12994
|
|
|
12995
|
-
cameraPX.up.set( 0, -
|
|
12996
|
-
cameraPX.lookAt( -
|
|
12995
|
+
cameraPX.up.set( 0, -1, 0 );
|
|
12996
|
+
cameraPX.lookAt( -1, 0, 0 );
|
|
12997
12997
|
|
|
12998
|
-
cameraNX.up.set( 0, -
|
|
12998
|
+
cameraNX.up.set( 0, -1, 0 );
|
|
12999
12999
|
cameraNX.lookAt( 1, 0, 0 );
|
|
13000
13000
|
|
|
13001
13001
|
cameraPY.up.set( 0, 0, 1 );
|
|
13002
13002
|
cameraPY.lookAt( 0, 1, 0 );
|
|
13003
13003
|
|
|
13004
|
-
cameraNY.up.set( 0, 0, -
|
|
13005
|
-
cameraNY.lookAt( 0, -
|
|
13004
|
+
cameraNY.up.set( 0, 0, -1 );
|
|
13005
|
+
cameraNY.lookAt( 0, -1, 0 );
|
|
13006
13006
|
|
|
13007
|
-
cameraPZ.up.set( 0, -
|
|
13007
|
+
cameraPZ.up.set( 0, -1, 0 );
|
|
13008
13008
|
cameraPZ.lookAt( 0, 0, 1 );
|
|
13009
13009
|
|
|
13010
|
-
cameraNZ.up.set( 0, -
|
|
13011
|
-
cameraNZ.lookAt( 0, 0, -
|
|
13010
|
+
cameraNZ.up.set( 0, -1, 0 );
|
|
13011
|
+
cameraNZ.lookAt( 0, 0, -1 );
|
|
13012
13012
|
|
|
13013
13013
|
} else {
|
|
13014
13014
|
|
|
@@ -14325,10 +14325,10 @@ class Sprite extends Object3D {
|
|
|
14325
14325
|
_geometry = new BufferGeometry();
|
|
14326
14326
|
|
|
14327
14327
|
const float32Array = new Float32Array( [
|
|
14328
|
-
-
|
|
14329
|
-
0.5, -
|
|
14328
|
+
-0.5, -0.5, 0, 0, 0,
|
|
14329
|
+
0.5, -0.5, 0, 1, 0,
|
|
14330
14330
|
0.5, 0.5, 0, 1, 1,
|
|
14331
|
-
-
|
|
14331
|
+
-0.5, 0.5, 0, 0, 1
|
|
14332
14332
|
] );
|
|
14333
14333
|
|
|
14334
14334
|
const interleavedBuffer = new InterleavedBuffer( float32Array, 5 );
|
|
@@ -14379,8 +14379,8 @@ class Sprite extends Object3D {
|
|
|
14379
14379
|
|
|
14380
14380
|
const center = this.center;
|
|
14381
14381
|
|
|
14382
|
-
transformVertex( _vA.set( -
|
|
14383
|
-
transformVertex( _vB.set( 0.5, -
|
|
14382
|
+
transformVertex( _vA.set( -0.5, -0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
14383
|
+
transformVertex( _vB.set( 0.5, -0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
14384
14384
|
transformVertex( _vC.set( 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
14385
14385
|
|
|
14386
14386
|
_uvA.set( 0, 0 );
|
|
@@ -14393,7 +14393,7 @@ class Sprite extends Object3D {
|
|
|
14393
14393
|
if ( intersect === null ) {
|
|
14394
14394
|
|
|
14395
14395
|
// check second triangle
|
|
14396
|
-
transformVertex( _vB.set( -
|
|
14396
|
+
transformVertex( _vB.set( -0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
14397
14397
|
_uvB.set( 0, 1 );
|
|
14398
14398
|
|
|
14399
14399
|
intersect = raycaster.ray.intersectTriangle( _vA, _vC, _vB, false, _intersectPoint );
|
|
@@ -15621,7 +15621,7 @@ class Plane {
|
|
|
15621
15621
|
|
|
15622
15622
|
negate() {
|
|
15623
15623
|
|
|
15624
|
-
this.constant *= -
|
|
15624
|
+
this.constant *= -1;
|
|
15625
15625
|
this.normal.negate();
|
|
15626
15626
|
|
|
15627
15627
|
return this;
|
|
@@ -15958,10 +15958,10 @@ class MultiDrawRenderList {
|
|
|
15958
15958
|
|
|
15959
15959
|
pool.push( {
|
|
15960
15960
|
|
|
15961
|
-
start: -
|
|
15962
|
-
count: -
|
|
15963
|
-
z: -
|
|
15964
|
-
index: -
|
|
15961
|
+
start: -1,
|
|
15962
|
+
count: -1,
|
|
15963
|
+
z: -1,
|
|
15964
|
+
index: -1,
|
|
15965
15965
|
|
|
15966
15966
|
} );
|
|
15967
15967
|
|
|
@@ -16371,7 +16371,7 @@ class BatchedMesh extends Mesh {
|
|
|
16371
16371
|
|
|
16372
16372
|
}
|
|
16373
16373
|
|
|
16374
|
-
addGeometry( geometry, reservedVertexCount = -
|
|
16374
|
+
addGeometry( geometry, reservedVertexCount = -1, reservedIndexCount = -1 ) {
|
|
16375
16375
|
|
|
16376
16376
|
this._initializeGeometry( geometry );
|
|
16377
16377
|
|
|
@@ -16379,17 +16379,17 @@ class BatchedMesh extends Mesh {
|
|
|
16379
16379
|
|
|
16380
16380
|
const geometryInfo = {
|
|
16381
16381
|
// geometry information
|
|
16382
|
-
vertexStart: -
|
|
16383
|
-
vertexCount: -
|
|
16384
|
-
reservedVertexCount: -
|
|
16382
|
+
vertexStart: -1,
|
|
16383
|
+
vertexCount: -1,
|
|
16384
|
+
reservedVertexCount: -1,
|
|
16385
16385
|
|
|
16386
|
-
indexStart: -
|
|
16387
|
-
indexCount: -
|
|
16388
|
-
reservedIndexCount: -
|
|
16386
|
+
indexStart: -1,
|
|
16387
|
+
indexCount: -1,
|
|
16388
|
+
reservedIndexCount: -1,
|
|
16389
16389
|
|
|
16390
16390
|
// draw range information
|
|
16391
|
-
start: -
|
|
16392
|
-
count: -
|
|
16391
|
+
start: -1,
|
|
16392
|
+
count: -1,
|
|
16393
16393
|
|
|
16394
16394
|
// state
|
|
16395
16395
|
boundingBox: null,
|
|
@@ -16399,19 +16399,19 @@ class BatchedMesh extends Mesh {
|
|
|
16399
16399
|
|
|
16400
16400
|
const geometryInfoList = this._geometryInfo;
|
|
16401
16401
|
geometryInfo.vertexStart = this._nextVertexStart;
|
|
16402
|
-
geometryInfo.reservedVertexCount = reservedVertexCount === -
|
|
16402
|
+
geometryInfo.reservedVertexCount = reservedVertexCount === -1 ? geometry.getAttribute( 'position' ).count : reservedVertexCount;
|
|
16403
16403
|
|
|
16404
16404
|
const index = geometry.getIndex();
|
|
16405
16405
|
const hasIndex = index !== null;
|
|
16406
16406
|
if ( hasIndex ) {
|
|
16407
16407
|
|
|
16408
16408
|
geometryInfo.indexStart = this._nextIndexStart;
|
|
16409
|
-
geometryInfo.reservedIndexCount = reservedIndexCount === -
|
|
16409
|
+
geometryInfo.reservedIndexCount = reservedIndexCount === -1 ? index.count : reservedIndexCount;
|
|
16410
16410
|
|
|
16411
16411
|
}
|
|
16412
16412
|
|
|
16413
16413
|
if (
|
|
16414
|
-
geometryInfo.indexStart !== -
|
|
16414
|
+
geometryInfo.indexStart !== -1 &&
|
|
16415
16415
|
geometryInfo.indexStart + geometryInfo.reservedIndexCount > this._maxIndexCount ||
|
|
16416
16416
|
geometryInfo.vertexStart + geometryInfo.reservedVertexCount > this._maxVertexCount
|
|
16417
16417
|
) {
|
|
@@ -17154,7 +17154,7 @@ class BatchedMesh extends Mesh {
|
|
|
17154
17154
|
// get the camera position in the local frame
|
|
17155
17155
|
_matrix$1.copy( this.matrixWorld ).invert();
|
|
17156
17156
|
_vector$5.setFromMatrixPosition( camera.matrixWorld ).applyMatrix4( _matrix$1 );
|
|
17157
|
-
_forward.set( 0, 0, -
|
|
17157
|
+
_forward.set( 0, 0, -1 ).transformDirection( camera.matrixWorld ).transformDirection( _matrix$1 );
|
|
17158
17158
|
|
|
17159
17159
|
for ( let i = 0, l = instanceInfo.length; i < l; i ++ ) {
|
|
17160
17160
|
|
|
@@ -18374,7 +18374,7 @@ class Curve {
|
|
|
18374
18374
|
|
|
18375
18375
|
vec.normalize();
|
|
18376
18376
|
|
|
18377
|
-
const theta = Math.acos( clamp( tangents[ i - 1 ].dot( tangents[ i ] ), -
|
|
18377
|
+
const theta = Math.acos( clamp( tangents[ i - 1 ].dot( tangents[ i ] ), -1, 1 ) ); // clamp for floating pt errors
|
|
18378
18378
|
|
|
18379
18379
|
normals[ i ].applyMatrix4( mat.makeRotationAxis( vec, theta ) );
|
|
18380
18380
|
|
|
@@ -18388,7 +18388,7 @@ class Curve {
|
|
|
18388
18388
|
|
|
18389
18389
|
if ( closed === true ) {
|
|
18390
18390
|
|
|
18391
|
-
let theta = Math.acos( clamp( normals[ 0 ].dot( normals[ segments ] ), -
|
|
18391
|
+
let theta = Math.acos( clamp( normals[ 0 ].dot( normals[ segments ] ), -1, 1 ) );
|
|
18392
18392
|
theta /= segments;
|
|
18393
18393
|
|
|
18394
18394
|
if ( tangents[ 0 ].dot( vec.crossVectors( normals[ 0 ], normals[ segments ] ) ) > 0 ) {
|
|
@@ -18658,7 +18658,7 @@ function CubicPoly() {
|
|
|
18658
18658
|
|
|
18659
18659
|
c0 = x0;
|
|
18660
18660
|
c1 = t0;
|
|
18661
|
-
c2 = -
|
|
18661
|
+
c2 = -3 * x0 + 3 * x1 - 2 * t0 - t1;
|
|
18662
18662
|
c3 = 2 * x0 - 2 * x1 + t0 + t1;
|
|
18663
18663
|
|
|
18664
18664
|
}
|
|
@@ -18884,7 +18884,7 @@ function CatmullRom( t, p0, p1, p2, p3 ) {
|
|
|
18884
18884
|
const v1 = ( p3 - p1 ) * 0.5;
|
|
18885
18885
|
const t2 = t * t;
|
|
18886
18886
|
const t3 = t * t2;
|
|
18887
|
-
return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( -
|
|
18887
|
+
return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( -3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;
|
|
18888
18888
|
|
|
18889
18889
|
}
|
|
18890
18890
|
|
|
@@ -19957,7 +19957,7 @@ class Path extends CurvePath {
|
|
|
19957
19957
|
|
|
19958
19958
|
class LatheGeometry extends BufferGeometry {
|
|
19959
19959
|
|
|
19960
|
-
constructor( points = [ new Vector2( 0, -
|
|
19960
|
+
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 ) {
|
|
19961
19961
|
|
|
19962
19962
|
super();
|
|
19963
19963
|
|
|
@@ -20428,7 +20428,7 @@ class CylinderGeometry extends BufferGeometry {
|
|
|
20428
20428
|
let groupCount = 0;
|
|
20429
20429
|
|
|
20430
20430
|
const radius = ( top === true ) ? radiusTop : radiusBottom;
|
|
20431
|
-
const sign = ( top === true ) ? 1 : -
|
|
20431
|
+
const sign = ( top === true ) ? 1 : -1;
|
|
20432
20432
|
|
|
20433
20433
|
// first we generate the center vertex data of the cap.
|
|
20434
20434
|
// because the geometry needs one set of uvs per face,
|
|
@@ -20896,10 +20896,10 @@ class DodecahedronGeometry extends PolyhedronGeometry {
|
|
|
20896
20896
|
const vertices = [
|
|
20897
20897
|
|
|
20898
20898
|
// (±1, ±1, ±1)
|
|
20899
|
-
-
|
|
20900
|
-
-
|
|
20901
|
-
1, -
|
|
20902
|
-
1, 1, -
|
|
20899
|
+
-1, -1, -1, -1, -1, 1,
|
|
20900
|
+
-1, 1, -1, -1, 1, 1,
|
|
20901
|
+
1, -1, -1, 1, -1, 1,
|
|
20902
|
+
1, 1, -1, 1, 1, 1,
|
|
20903
20903
|
|
|
20904
20904
|
// (0, ±1/φ, ±φ)
|
|
20905
20905
|
0, - r, - t, 0, - r, t,
|
|
@@ -21832,7 +21832,7 @@ function onSegment( p, q, r ) {
|
|
|
21832
21832
|
|
|
21833
21833
|
function sign( num ) {
|
|
21834
21834
|
|
|
21835
|
-
return num > 0 ? 1 : num < 0 ? -
|
|
21835
|
+
return num > 0 ? 1 : num < 0 ? -1 : 0;
|
|
21836
21836
|
|
|
21837
21837
|
}
|
|
21838
21838
|
|
|
@@ -22092,7 +22092,7 @@ function addContour( vertices, contour ) {
|
|
|
22092
22092
|
|
|
22093
22093
|
class ExtrudeGeometry extends BufferGeometry {
|
|
22094
22094
|
|
|
22095
|
-
constructor( shapes = new Shape( [ new Vector2( 0.5, 0.5 ), new Vector2( -
|
|
22095
|
+
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 = {} ) {
|
|
22096
22096
|
|
|
22097
22097
|
super();
|
|
22098
22098
|
|
|
@@ -22879,9 +22879,9 @@ class IcosahedronGeometry extends PolyhedronGeometry {
|
|
|
22879
22879
|
const t = ( 1 + Math.sqrt( 5 ) ) / 2;
|
|
22880
22880
|
|
|
22881
22881
|
const vertices = [
|
|
22882
|
-
-
|
|
22883
|
-
0, -
|
|
22884
|
-
t, 0, -
|
|
22882
|
+
-1, t, 0, 1, t, 0, -1, - t, 0, 1, - t, 0,
|
|
22883
|
+
0, -1, t, 0, 1, t, 0, -1, - t, 0, 1, - t,
|
|
22884
|
+
t, 0, -1, t, 0, 1, - t, 0, -1, - t, 0, 1
|
|
22885
22885
|
];
|
|
22886
22886
|
|
|
22887
22887
|
const indices = [
|
|
@@ -22915,8 +22915,8 @@ class OctahedronGeometry extends PolyhedronGeometry {
|
|
|
22915
22915
|
constructor( radius = 1, detail = 0 ) {
|
|
22916
22916
|
|
|
22917
22917
|
const vertices = [
|
|
22918
|
-
1, 0, 0, -
|
|
22919
|
-
0, -
|
|
22918
|
+
1, 0, 0, -1, 0, 0, 0, 1, 0,
|
|
22919
|
+
0, -1, 0, 0, 0, 1, 0, 0, -1
|
|
22920
22920
|
];
|
|
22921
22921
|
|
|
22922
22922
|
const indices = [
|
|
@@ -23161,7 +23161,7 @@ class RingGeometry extends BufferGeometry {
|
|
|
23161
23161
|
|
|
23162
23162
|
class ShapeGeometry extends BufferGeometry {
|
|
23163
23163
|
|
|
23164
|
-
constructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( -
|
|
23164
|
+
constructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( -0.5, -0.5 ), new Vector2( 0.5, -0.5 ) ] ), curveSegments = 12 ) {
|
|
23165
23165
|
|
|
23166
23166
|
super();
|
|
23167
23167
|
|
|
@@ -23401,7 +23401,7 @@ class SphereGeometry extends BufferGeometry {
|
|
|
23401
23401
|
|
|
23402
23402
|
} else if ( iy === heightSegments && thetaEnd === Math.PI ) {
|
|
23403
23403
|
|
|
23404
|
-
uOffset = -
|
|
23404
|
+
uOffset = -0.5 / widthSegments;
|
|
23405
23405
|
|
|
23406
23406
|
}
|
|
23407
23407
|
|
|
@@ -23484,7 +23484,7 @@ class TetrahedronGeometry extends PolyhedronGeometry {
|
|
|
23484
23484
|
constructor( radius = 1, detail = 0 ) {
|
|
23485
23485
|
|
|
23486
23486
|
const vertices = [
|
|
23487
|
-
1, 1, 1, -
|
|
23487
|
+
1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1
|
|
23488
23488
|
];
|
|
23489
23489
|
|
|
23490
23490
|
const indices = [
|
|
@@ -23789,7 +23789,7 @@ class TorusKnotGeometry extends BufferGeometry {
|
|
|
23789
23789
|
|
|
23790
23790
|
class TubeGeometry extends BufferGeometry {
|
|
23791
23791
|
|
|
23792
|
-
constructor( path = new QuadraticBezierCurve3( new Vector3( -
|
|
23792
|
+
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 ) {
|
|
23793
23793
|
|
|
23794
23794
|
super();
|
|
23795
23795
|
|
|
@@ -25330,7 +25330,7 @@ function subclip( sourceClip, name, startFrame, endFrame, fps = 30 ) {
|
|
|
25330
25330
|
|
|
25331
25331
|
for ( let i = 0; i < clip.tracks.length; ++ i ) {
|
|
25332
25332
|
|
|
25333
|
-
clip.tracks[ i ].shift( -
|
|
25333
|
+
clip.tracks[ i ].shift( -1 * minStartTime );
|
|
25334
25334
|
|
|
25335
25335
|
}
|
|
25336
25336
|
|
|
@@ -25727,10 +25727,10 @@ class CubicInterpolant extends Interpolant {
|
|
|
25727
25727
|
|
|
25728
25728
|
super( parameterPositions, sampleValues, sampleSize, resultBuffer );
|
|
25729
25729
|
|
|
25730
|
-
this._weightPrev = -
|
|
25731
|
-
this._offsetPrev = -
|
|
25732
|
-
this._weightNext = -
|
|
25733
|
-
this._offsetNext = -
|
|
25730
|
+
this._weightPrev = -0;
|
|
25731
|
+
this._offsetPrev = -0;
|
|
25732
|
+
this._weightNext = -0;
|
|
25733
|
+
this._offsetNext = -0;
|
|
25734
25734
|
|
|
25735
25735
|
this.DefaultSettings_ = {
|
|
25736
25736
|
|
|
@@ -25837,8 +25837,8 @@ class CubicInterpolant extends Interpolant {
|
|
|
25837
25837
|
// evaluate polynomials
|
|
25838
25838
|
|
|
25839
25839
|
const sP = - wP * ppp + 2 * wP * pp - wP * p;
|
|
25840
|
-
const s0 = ( 1 + wP ) * ppp + ( -
|
|
25841
|
-
const s1 = ( -
|
|
25840
|
+
const s0 = ( 1 + wP ) * ppp + ( -1.5 - 2 * wP ) * pp + ( -0.5 + wP ) * p + 1;
|
|
25841
|
+
const s1 = ( -1 - wN ) * ppp + ( 1.5 + wN ) * pp + 0.5 * p;
|
|
25842
25842
|
const sN = wN * ppp - wN * pp;
|
|
25843
25843
|
|
|
25844
25844
|
// combine data linearly
|
|
@@ -26127,7 +26127,7 @@ class KeyframeTrack {
|
|
|
26127
26127
|
|
|
26128
26128
|
}
|
|
26129
26129
|
|
|
26130
|
-
while ( to !== -
|
|
26130
|
+
while ( to !== -1 && times[ to ] > endTime ) {
|
|
26131
26131
|
|
|
26132
26132
|
-- to;
|
|
26133
26133
|
|
|
@@ -26481,7 +26481,7 @@ VectorKeyframeTrack.prototype.ValueTypeName = 'vector';
|
|
|
26481
26481
|
|
|
26482
26482
|
class AnimationClip {
|
|
26483
26483
|
|
|
26484
|
-
constructor( name = '', duration = -
|
|
26484
|
+
constructor( name = '', duration = -1, tracks = [], blendMode = NormalAnimationBlendMode ) {
|
|
26485
26485
|
|
|
26486
26486
|
this.name = name;
|
|
26487
26487
|
this.tracks = tracks;
|
|
@@ -26582,7 +26582,7 @@ class AnimationClip {
|
|
|
26582
26582
|
|
|
26583
26583
|
}
|
|
26584
26584
|
|
|
26585
|
-
return new this( name, -
|
|
26585
|
+
return new this( name, -1, tracks );
|
|
26586
26586
|
|
|
26587
26587
|
}
|
|
26588
26588
|
|
|
@@ -26694,7 +26694,7 @@ class AnimationClip {
|
|
|
26694
26694
|
const blendMode = animation.blendMode;
|
|
26695
26695
|
|
|
26696
26696
|
// automatic length determination in AnimationClip.
|
|
26697
|
-
let duration = animation.length || -
|
|
26697
|
+
let duration = animation.length || -1;
|
|
26698
26698
|
|
|
26699
26699
|
const hierarchyTracks = animation.hierarchy || [];
|
|
26700
26700
|
|
|
@@ -26719,7 +26719,7 @@ class AnimationClip {
|
|
|
26719
26719
|
|
|
26720
26720
|
for ( let m = 0; m < animationKeys[ k ].morphTargets.length; m ++ ) {
|
|
26721
26721
|
|
|
26722
|
-
morphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = -
|
|
26722
|
+
morphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = -1;
|
|
26723
26723
|
|
|
26724
26724
|
}
|
|
26725
26725
|
|
|
@@ -27084,7 +27084,7 @@ class LoadingManager {
|
|
|
27084
27084
|
|
|
27085
27085
|
const index = handlers.indexOf( regex );
|
|
27086
27086
|
|
|
27087
|
-
if ( index !== -
|
|
27087
|
+
if ( index !== -1 ) {
|
|
27088
27088
|
|
|
27089
27089
|
handlers.splice( index, 2 );
|
|
27090
27090
|
|
|
@@ -28340,13 +28340,13 @@ class PointLightShadow extends LightShadow {
|
|
|
28340
28340
|
];
|
|
28341
28341
|
|
|
28342
28342
|
this._cubeDirections = [
|
|
28343
|
-
new Vector3( 1, 0, 0 ), new Vector3( -
|
|
28344
|
-
new Vector3( 0, 0, -
|
|
28343
|
+
new Vector3( 1, 0, 0 ), new Vector3( -1, 0, 0 ), new Vector3( 0, 0, 1 ),
|
|
28344
|
+
new Vector3( 0, 0, -1 ), new Vector3( 0, 1, 0 ), new Vector3( 0, -1, 0 )
|
|
28345
28345
|
];
|
|
28346
28346
|
|
|
28347
28347
|
this._cubeUps = [
|
|
28348
28348
|
new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ),
|
|
28349
|
-
new Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ), new Vector3( 0, 0, -
|
|
28349
|
+
new Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ), new Vector3( 0, 0, -1 )
|
|
28350
28350
|
];
|
|
28351
28351
|
|
|
28352
28352
|
}
|
|
@@ -28438,7 +28438,7 @@ class PointLight extends Light {
|
|
|
28438
28438
|
|
|
28439
28439
|
class OrthographicCamera extends Camera {
|
|
28440
28440
|
|
|
28441
|
-
constructor( left = -
|
|
28441
|
+
constructor( left = -1, right = 1, top = 1, bottom = -1, near = 0.1, far = 2000 ) {
|
|
28442
28442
|
|
|
28443
28443
|
super();
|
|
28444
28444
|
|
|
@@ -28573,7 +28573,7 @@ class DirectionalLightShadow extends LightShadow {
|
|
|
28573
28573
|
|
|
28574
28574
|
constructor() {
|
|
28575
28575
|
|
|
28576
|
-
super( new OrthographicCamera( -
|
|
28576
|
+
super( new OrthographicCamera( -5, 5, 5, -5, 0.5, 500 ) );
|
|
28577
28577
|
|
|
28578
28578
|
this.isDirectionalLightShadow = true;
|
|
28579
28579
|
|
|
@@ -29361,7 +29361,7 @@ class LoaderUtils {
|
|
|
29361
29361
|
|
|
29362
29362
|
const index = url.lastIndexOf( '/' );
|
|
29363
29363
|
|
|
29364
|
-
if ( index === -
|
|
29364
|
+
if ( index === -1 ) return './';
|
|
29365
29365
|
|
|
29366
29366
|
return url.slice( 0, index + 1 );
|
|
29367
29367
|
|
|
@@ -31255,7 +31255,7 @@ class AudioListener extends Object3D {
|
|
|
31255
31255
|
|
|
31256
31256
|
this.matrixWorld.decompose( _position$1, _quaternion$1, _scale$1 );
|
|
31257
31257
|
|
|
31258
|
-
_orientation$1.set( 0, 0, -
|
|
31258
|
+
_orientation$1.set( 0, 0, -1 ).applyQuaternion( _quaternion$1 );
|
|
31259
31259
|
|
|
31260
31260
|
if ( listener.positionX ) {
|
|
31261
31261
|
|
|
@@ -32381,7 +32381,7 @@ class PropertyBinding {
|
|
|
32381
32381
|
|
|
32382
32382
|
const lastDot = results.nodeName && results.nodeName.lastIndexOf( '.' );
|
|
32383
32383
|
|
|
32384
|
-
if ( lastDot !== undefined && lastDot !== -
|
|
32384
|
+
if ( lastDot !== undefined && lastDot !== -1 ) {
|
|
32385
32385
|
|
|
32386
32386
|
const objectName = results.nodeName.substring( lastDot + 1 );
|
|
32387
32387
|
|
|
@@ -32389,7 +32389,7 @@ class PropertyBinding {
|
|
|
32389
32389
|
// is no way to parse 'foo.bar.baz': 'baz' must be a property, but
|
|
32390
32390
|
// 'bar' could be the objectName, or part of a nodeName (which can
|
|
32391
32391
|
// include '.' characters).
|
|
32392
|
-
if ( _supportedObjectNames.indexOf( objectName ) !== -
|
|
32392
|
+
if ( _supportedObjectNames.indexOf( objectName ) !== -1 ) {
|
|
32393
32393
|
|
|
32394
32394
|
results.nodeName = results.nodeName.substring( 0, lastDot );
|
|
32395
32395
|
results.objectName = objectName;
|
|
@@ -32410,7 +32410,7 @@ class PropertyBinding {
|
|
|
32410
32410
|
|
|
32411
32411
|
static findNode( root, nodeName ) {
|
|
32412
32412
|
|
|
32413
|
-
if ( nodeName === undefined || nodeName === '' || nodeName === '.' || nodeName === -
|
|
32413
|
+
if ( nodeName === undefined || nodeName === '' || nodeName === '.' || nodeName === -1 || nodeName === root.name || nodeName === root.uuid ) {
|
|
32414
32414
|
|
|
32415
32415
|
return root;
|
|
32416
32416
|
|
|
@@ -33353,7 +33353,7 @@ class AnimationAction {
|
|
|
33353
33353
|
this._weightInterpolant = null;
|
|
33354
33354
|
|
|
33355
33355
|
this.loop = LoopRepeat;
|
|
33356
|
-
this._loopCount = -
|
|
33356
|
+
this._loopCount = -1;
|
|
33357
33357
|
|
|
33358
33358
|
// global mixer time when the action is to be started
|
|
33359
33359
|
// it's set back to 'null' upon start of the action
|
|
@@ -33405,7 +33405,7 @@ class AnimationAction {
|
|
|
33405
33405
|
this.enabled = true;
|
|
33406
33406
|
|
|
33407
33407
|
this.time = 0; // restart clip
|
|
33408
|
-
this._loopCount = -
|
|
33408
|
+
this._loopCount = -1;// forget previous loops
|
|
33409
33409
|
this._startTime = null;// forget scheduling
|
|
33410
33410
|
|
|
33411
33411
|
return this.stopFading().stopWarping();
|
|
@@ -33800,7 +33800,7 @@ class AnimationAction {
|
|
|
33800
33800
|
|
|
33801
33801
|
if ( deltaTime === 0 ) {
|
|
33802
33802
|
|
|
33803
|
-
if ( loopCount === -
|
|
33803
|
+
if ( loopCount === -1 ) return time;
|
|
33804
33804
|
|
|
33805
33805
|
return ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time;
|
|
33806
33806
|
|
|
@@ -33808,7 +33808,7 @@ class AnimationAction {
|
|
|
33808
33808
|
|
|
33809
33809
|
if ( loop === LoopOnce ) {
|
|
33810
33810
|
|
|
33811
|
-
if ( loopCount === -
|
|
33811
|
+
if ( loopCount === -1 ) {
|
|
33812
33812
|
|
|
33813
33813
|
// just started
|
|
33814
33814
|
|
|
@@ -33842,14 +33842,14 @@ class AnimationAction {
|
|
|
33842
33842
|
|
|
33843
33843
|
this._mixer.dispatchEvent( {
|
|
33844
33844
|
type: 'finished', action: this,
|
|
33845
|
-
direction: deltaTime < 0 ? -
|
|
33845
|
+
direction: deltaTime < 0 ? -1 : 1
|
|
33846
33846
|
} );
|
|
33847
33847
|
|
|
33848
33848
|
}
|
|
33849
33849
|
|
|
33850
33850
|
} else { // repetitive Repeat or PingPong
|
|
33851
33851
|
|
|
33852
|
-
if ( loopCount === -
|
|
33852
|
+
if ( loopCount === -1 ) {
|
|
33853
33853
|
|
|
33854
33854
|
// just started
|
|
33855
33855
|
|
|
@@ -33895,7 +33895,7 @@ class AnimationAction {
|
|
|
33895
33895
|
|
|
33896
33896
|
this._mixer.dispatchEvent( {
|
|
33897
33897
|
type: 'finished', action: this,
|
|
33898
|
-
direction: deltaTime > 0 ? 1 : -
|
|
33898
|
+
direction: deltaTime > 0 ? 1 : -1
|
|
33899
33899
|
} );
|
|
33900
33900
|
|
|
33901
33901
|
} else {
|
|
@@ -34851,7 +34851,7 @@ class UniformsGroup extends EventDispatcher {
|
|
|
34851
34851
|
|
|
34852
34852
|
const index = this.uniforms.indexOf( uniform );
|
|
34853
34853
|
|
|
34854
|
-
if ( index !== -
|
|
34854
|
+
if ( index !== -1 ) this.uniforms.splice( index, 1 );
|
|
34855
34855
|
|
|
34856
34856
|
return this;
|
|
34857
34857
|
|
|
@@ -35061,7 +35061,7 @@ class Raycaster {
|
|
|
35061
35061
|
} else if ( camera.isOrthographicCamera ) {
|
|
35062
35062
|
|
|
35063
35063
|
this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera
|
|
35064
|
-
this.ray.direction.set( 0, 0, -
|
|
35064
|
+
this.ray.direction.set( 0, 0, -1 ).transformDirection( camera.matrixWorld );
|
|
35065
35065
|
this.camera = camera;
|
|
35066
35066
|
|
|
35067
35067
|
} else {
|
|
@@ -35077,7 +35077,7 @@ class Raycaster {
|
|
|
35077
35077
|
_matrix.identity().extractRotation( controller.matrixWorld );
|
|
35078
35078
|
|
|
35079
35079
|
this.ray.origin.setFromMatrixPosition( controller.matrixWorld );
|
|
35080
|
-
this.ray.direction.set( 0, 0, -
|
|
35080
|
+
this.ray.direction.set( 0, 0, -1 ).applyMatrix4( _matrix );
|
|
35081
35081
|
|
|
35082
35082
|
return this;
|
|
35083
35083
|
|
|
@@ -35207,7 +35207,7 @@ class Spherical {
|
|
|
35207
35207
|
} else {
|
|
35208
35208
|
|
|
35209
35209
|
this.theta = Math.atan2( x, z );
|
|
35210
|
-
this.phi = Math.acos( clamp( y / this.radius, -
|
|
35210
|
+
this.phi = Math.acos( clamp( y / this.radius, -1, 1 ) );
|
|
35211
35211
|
|
|
35212
35212
|
}
|
|
35213
35213
|
|
|
@@ -35671,9 +35671,9 @@ class SpotLightHelper extends Object3D {
|
|
|
35671
35671
|
const positions = [
|
|
35672
35672
|
0, 0, 0, 0, 0, 1,
|
|
35673
35673
|
0, 0, 0, 1, 0, 1,
|
|
35674
|
-
0, 0, 0, -
|
|
35674
|
+
0, 0, 0, -1, 0, 1,
|
|
35675
35675
|
0, 0, 0, 0, 1, 1,
|
|
35676
|
-
0, 0, 0, 0, -
|
|
35676
|
+
0, 0, 0, 0, -1, 1
|
|
35677
35677
|
];
|
|
35678
35678
|
|
|
35679
35679
|
for ( let i = 0, j = 1, l = 32; i < l; i ++, j ++ ) {
|
|
@@ -36444,7 +36444,7 @@ class CameraHelper extends LineSegments {
|
|
|
36444
36444
|
_camera.projectionMatrixInverse.copy( this.camera.projectionMatrixInverse );
|
|
36445
36445
|
|
|
36446
36446
|
// Adjust z values based on coordinate system
|
|
36447
|
-
const nearZ = this.camera.coordinateSystem === WebGLCoordinateSystem ? -
|
|
36447
|
+
const nearZ = this.camera.coordinateSystem === WebGLCoordinateSystem ? -1 : 0;
|
|
36448
36448
|
|
|
36449
36449
|
// center / target
|
|
36450
36450
|
setPoint( 'c', pointMap, geometry, _camera, 0, 0, nearZ );
|
|
@@ -36452,34 +36452,34 @@ class CameraHelper extends LineSegments {
|
|
|
36452
36452
|
|
|
36453
36453
|
// near
|
|
36454
36454
|
|
|
36455
|
-
setPoint( 'n1', pointMap, geometry, _camera, -
|
|
36456
|
-
setPoint( 'n2', pointMap, geometry, _camera, w, -
|
|
36457
|
-
setPoint( 'n3', pointMap, geometry, _camera, -
|
|
36455
|
+
setPoint( 'n1', pointMap, geometry, _camera, -1, -1, nearZ );
|
|
36456
|
+
setPoint( 'n2', pointMap, geometry, _camera, w, -1, nearZ );
|
|
36457
|
+
setPoint( 'n3', pointMap, geometry, _camera, -1, h, nearZ );
|
|
36458
36458
|
setPoint( 'n4', pointMap, geometry, _camera, w, h, nearZ );
|
|
36459
36459
|
|
|
36460
36460
|
// far
|
|
36461
36461
|
|
|
36462
|
-
setPoint( 'f1', pointMap, geometry, _camera, -
|
|
36463
|
-
setPoint( 'f2', pointMap, geometry, _camera, w, -
|
|
36464
|
-
setPoint( 'f3', pointMap, geometry, _camera, -
|
|
36462
|
+
setPoint( 'f1', pointMap, geometry, _camera, -1, -1, 1 );
|
|
36463
|
+
setPoint( 'f2', pointMap, geometry, _camera, w, -1, 1 );
|
|
36464
|
+
setPoint( 'f3', pointMap, geometry, _camera, -1, h, 1 );
|
|
36465
36465
|
setPoint( 'f4', pointMap, geometry, _camera, w, h, 1 );
|
|
36466
36466
|
|
|
36467
36467
|
// up
|
|
36468
36468
|
|
|
36469
36469
|
setPoint( 'u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, nearZ );
|
|
36470
|
-
setPoint( 'u2', pointMap, geometry, _camera, -
|
|
36470
|
+
setPoint( 'u2', pointMap, geometry, _camera, -1 * 0.7, h * 1.1, nearZ );
|
|
36471
36471
|
setPoint( 'u3', pointMap, geometry, _camera, 0, h * 2, nearZ );
|
|
36472
36472
|
|
|
36473
36473
|
// cross
|
|
36474
36474
|
|
|
36475
|
-
setPoint( 'cf1', pointMap, geometry, _camera, -
|
|
36475
|
+
setPoint( 'cf1', pointMap, geometry, _camera, -1, 0, 1 );
|
|
36476
36476
|
setPoint( 'cf2', pointMap, geometry, _camera, w, 0, 1 );
|
|
36477
|
-
setPoint( 'cf3', pointMap, geometry, _camera, 0, -
|
|
36477
|
+
setPoint( 'cf3', pointMap, geometry, _camera, 0, -1, 1 );
|
|
36478
36478
|
setPoint( 'cf4', pointMap, geometry, _camera, 0, h, 1 );
|
|
36479
36479
|
|
|
36480
|
-
setPoint( 'cn1', pointMap, geometry, _camera, -
|
|
36480
|
+
setPoint( 'cn1', pointMap, geometry, _camera, -1, 0, nearZ );
|
|
36481
36481
|
setPoint( 'cn2', pointMap, geometry, _camera, w, 0, nearZ );
|
|
36482
|
-
setPoint( 'cn3', pointMap, geometry, _camera, 0, -
|
|
36482
|
+
setPoint( 'cn3', pointMap, geometry, _camera, 0, -1, nearZ );
|
|
36483
36483
|
setPoint( 'cn4', pointMap, geometry, _camera, 0, h, nearZ );
|
|
36484
36484
|
|
|
36485
36485
|
geometry.getAttribute( 'position' ).needsUpdate = true;
|
|
@@ -36627,7 +36627,7 @@ class Box3Helper extends LineSegments {
|
|
|
36627
36627
|
|
|
36628
36628
|
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 ] );
|
|
36629
36629
|
|
|
36630
|
-
const positions = [ 1, 1, 1, -
|
|
36630
|
+
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 ];
|
|
36631
36631
|
|
|
36632
36632
|
const geometry = new BufferGeometry();
|
|
36633
36633
|
|
|
@@ -36676,7 +36676,7 @@ class PlaneHelper extends Line {
|
|
|
36676
36676
|
|
|
36677
36677
|
const color = hex;
|
|
36678
36678
|
|
|
36679
|
-
const positions = [ 1, -
|
|
36679
|
+
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 ];
|
|
36680
36680
|
|
|
36681
36681
|
const geometry = new BufferGeometry();
|
|
36682
36682
|
geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );
|
|
@@ -36690,7 +36690,7 @@ class PlaneHelper extends Line {
|
|
|
36690
36690
|
|
|
36691
36691
|
this.size = size;
|
|
36692
36692
|
|
|
36693
|
-
const positions2 = [ 1, 1, 0, -
|
|
36693
|
+
const positions2 = [ 1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0 ];
|
|
36694
36694
|
|
|
36695
36695
|
const geometry2 = new BufferGeometry();
|
|
36696
36696
|
geometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );
|
|
@@ -36744,7 +36744,7 @@ class ArrowHelper extends Object3D {
|
|
|
36744
36744
|
_lineGeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) );
|
|
36745
36745
|
|
|
36746
36746
|
_coneGeometry = new CylinderGeometry( 0, 0.5, 1, 5, 1 );
|
|
36747
|
-
_coneGeometry.translate( 0, -
|
|
36747
|
+
_coneGeometry.translate( 0, -0.5, 0 );
|
|
36748
36748
|
|
|
36749
36749
|
}
|
|
36750
36750
|
|
|
@@ -36771,7 +36771,7 @@ class ArrowHelper extends Object3D {
|
|
|
36771
36771
|
|
|
36772
36772
|
this.quaternion.set( 0, 0, 0, 1 );
|
|
36773
36773
|
|
|
36774
|
-
} else if ( dir.y < -
|
|
36774
|
+
} else if ( dir.y < -0.99999 ) {
|
|
36775
36775
|
|
|
36776
36776
|
this.quaternion.set( 1, 0, 0, 0 );
|
|
36777
36777
|
|
|
@@ -37182,7 +37182,7 @@ class Controls extends EventDispatcher {
|
|
|
37182
37182
|
|
|
37183
37183
|
this.enabled = true;
|
|
37184
37184
|
|
|
37185
|
-
this.state = -
|
|
37185
|
+
this.state = -1;
|
|
37186
37186
|
|
|
37187
37187
|
this.keys = {};
|
|
37188
37188
|
this.mouseButtons = { LEFT: null, MIDDLE: null, RIGHT: null };
|
|
@@ -38177,7 +38177,7 @@ const UniformsLib = {
|
|
|
38177
38177
|
|
|
38178
38178
|
envMap: { value: null },
|
|
38179
38179
|
envMapRotation: { value: /*@__PURE__*/ new Matrix3() },
|
|
38180
|
-
flipEnvMap: { value: -
|
|
38180
|
+
flipEnvMap: { value: -1 },
|
|
38181
38181
|
reflectivity: { value: 1.0 }, // basic, lambert, phong
|
|
38182
38182
|
ior: { value: 1.5 }, // physical
|
|
38183
38183
|
refractionRatio: { value: 0.98 }, // basic, lambert, phong
|
|
@@ -38598,7 +38598,7 @@ const ShaderLib = {
|
|
|
38598
38598
|
|
|
38599
38599
|
uniforms: {
|
|
38600
38600
|
envMap: { value: null },
|
|
38601
|
-
flipEnvMap: { value: -
|
|
38601
|
+
flipEnvMap: { value: -1 },
|
|
38602
38602
|
backgroundBlurriness: { value: 0 },
|
|
38603
38603
|
backgroundIntensity: { value: 1 },
|
|
38604
38604
|
backgroundRotation: { value: /*@__PURE__*/ new Matrix3() }
|
|
@@ -38613,7 +38613,7 @@ const ShaderLib = {
|
|
|
38613
38613
|
|
|
38614
38614
|
uniforms: {
|
|
38615
38615
|
tCube: { value: null },
|
|
38616
|
-
tFlip: { value: -
|
|
38616
|
+
tFlip: { value: -1 },
|
|
38617
38617
|
opacity: { value: 1.0 }
|
|
38618
38618
|
},
|
|
38619
38619
|
|
|
@@ -38847,18 +38847,18 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
|
|
|
38847
38847
|
_e1$1.copy( scene.backgroundRotation );
|
|
38848
38848
|
|
|
38849
38849
|
// accommodate left-handed frame
|
|
38850
|
-
_e1$1.x *= -
|
|
38850
|
+
_e1$1.x *= -1; _e1$1.y *= -1; _e1$1.z *= -1;
|
|
38851
38851
|
|
|
38852
38852
|
if ( background.isCubeTexture && background.isRenderTargetTexture === false ) {
|
|
38853
38853
|
|
|
38854
38854
|
// environment maps which are not cube render targets or PMREMs follow a different convention
|
|
38855
|
-
_e1$1.y *= -
|
|
38856
|
-
_e1$1.z *= -
|
|
38855
|
+
_e1$1.y *= -1;
|
|
38856
|
+
_e1$1.z *= -1;
|
|
38857
38857
|
|
|
38858
38858
|
}
|
|
38859
38859
|
|
|
38860
38860
|
boxMesh.material.uniforms.envMap.value = background;
|
|
38861
|
-
boxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background.isRenderTargetTexture === false ) ? -
|
|
38861
|
+
boxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background.isRenderTargetTexture === false ) ? -1 : 1;
|
|
38862
38862
|
boxMesh.material.uniforms.backgroundBlurriness.value = scene.backgroundBlurriness;
|
|
38863
38863
|
boxMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;
|
|
38864
38864
|
boxMesh.material.uniforms.backgroundRotation.value.setFromMatrix4( _m1$1.makeRotationFromEuler( _e1$1 ) );
|
|
@@ -40122,9 +40122,9 @@ const _axisDirections = [
|
|
|
40122
40122
|
/*@__PURE__*/ new Vector3( INV_PHI, 0, PHI ),
|
|
40123
40123
|
/*@__PURE__*/ new Vector3( 0, PHI, - INV_PHI ),
|
|
40124
40124
|
/*@__PURE__*/ new Vector3( 0, PHI, INV_PHI ),
|
|
40125
|
-
/*@__PURE__*/ new Vector3( -
|
|
40126
|
-
/*@__PURE__*/ new Vector3( 1, 1, -
|
|
40127
|
-
/*@__PURE__*/ new Vector3( -
|
|
40125
|
+
/*@__PURE__*/ new Vector3( -1, 1, -1 ),
|
|
40126
|
+
/*@__PURE__*/ new Vector3( 1, 1, -1 ),
|
|
40127
|
+
/*@__PURE__*/ new Vector3( -1, 1, 1 ),
|
|
40128
40128
|
/*@__PURE__*/ new Vector3( 1, 1, 1 ) ];
|
|
40129
40129
|
|
|
40130
40130
|
/**
|
|
@@ -40392,8 +40392,8 @@ class PMREMGenerator {
|
|
|
40392
40392
|
const fov = 90;
|
|
40393
40393
|
const aspect = 1;
|
|
40394
40394
|
const cubeCamera = new PerspectiveCamera( fov, aspect, near, far );
|
|
40395
|
-
const upSign = [ 1, -
|
|
40396
|
-
const forwardSign = [ 1, 1, 1, -
|
|
40395
|
+
const upSign = [ 1, -1, 1, 1, 1, 1 ];
|
|
40396
|
+
const forwardSign = [ 1, 1, 1, -1, -1, -1 ];
|
|
40397
40397
|
const renderer = this._renderer;
|
|
40398
40398
|
|
|
40399
40399
|
const originalAutoClear = renderer.autoClear;
|
|
@@ -40492,7 +40492,7 @@ class PMREMGenerator {
|
|
|
40492
40492
|
|
|
40493
40493
|
}
|
|
40494
40494
|
|
|
40495
|
-
this._cubemapMaterial.uniforms.flipEnvMap.value = ( texture.isRenderTargetTexture === false ) ? -
|
|
40495
|
+
this._cubemapMaterial.uniforms.flipEnvMap.value = ( texture.isRenderTargetTexture === false ) ? -1 : 1;
|
|
40496
40496
|
|
|
40497
40497
|
} else {
|
|
40498
40498
|
|
|
@@ -40711,7 +40711,7 @@ function _createPlanes( lodMax ) {
|
|
|
40711
40711
|
for ( let face = 0; face < cubeFaces; face ++ ) {
|
|
40712
40712
|
|
|
40713
40713
|
const x = ( face % 3 ) * 2 / 3 - 1;
|
|
40714
|
-
const y = face > 2 ? 0 : -
|
|
40714
|
+
const y = face > 2 ? 0 : -1;
|
|
40715
40715
|
const coordinates = [
|
|
40716
40716
|
x, y, 0,
|
|
40717
40717
|
x + 2 / 3, y, 0,
|
|
@@ -40910,7 +40910,7 @@ function _getCubemapMaterial() {
|
|
|
40910
40910
|
|
|
40911
40911
|
uniforms: {
|
|
40912
40912
|
'envMap': { value: null },
|
|
40913
|
-
'flipEnvMap': { value: -
|
|
40913
|
+
'flipEnvMap': { value: -1 }
|
|
40914
40914
|
},
|
|
40915
40915
|
|
|
40916
40916
|
vertexShader: _getCommonVertexShader(),
|
|
@@ -45432,18 +45432,18 @@ function WebGLLights( extensions ) {
|
|
|
45432
45432
|
version: 0,
|
|
45433
45433
|
|
|
45434
45434
|
hash: {
|
|
45435
|
-
directionalLength: -
|
|
45436
|
-
pointLength: -
|
|
45437
|
-
spotLength: -
|
|
45438
|
-
rectAreaLength: -
|
|
45439
|
-
hemiLength: -
|
|
45440
|
-
|
|
45441
|
-
numDirectionalShadows: -
|
|
45442
|
-
numPointShadows: -
|
|
45443
|
-
numSpotShadows: -
|
|
45444
|
-
numSpotMaps: -
|
|
45445
|
-
|
|
45446
|
-
numLightProbes: -
|
|
45435
|
+
directionalLength: -1,
|
|
45436
|
+
pointLength: -1,
|
|
45437
|
+
spotLength: -1,
|
|
45438
|
+
rectAreaLength: -1,
|
|
45439
|
+
hemiLength: -1,
|
|
45440
|
+
|
|
45441
|
+
numDirectionalShadows: -1,
|
|
45442
|
+
numPointShadows: -1,
|
|
45443
|
+
numSpotShadows: -1,
|
|
45444
|
+
numSpotMaps: -1,
|
|
45445
|
+
|
|
45446
|
+
numLightProbes: -1
|
|
45447
45447
|
},
|
|
45448
45448
|
|
|
45449
45449
|
ambient: [ 0, 0, 0 ],
|
|
@@ -45984,7 +45984,7 @@ function WebGLShadowMap( renderer, objects, capabilities ) {
|
|
|
45984
45984
|
fullScreenTri.setAttribute(
|
|
45985
45985
|
'position',
|
|
45986
45986
|
new BufferAttribute(
|
|
45987
|
-
new Float32Array( [ -
|
|
45987
|
+
new Float32Array( [ -1, -1, 0.5, 3, -1, 0.5, -1, 3, 0.5 ] ),
|
|
45988
45988
|
3
|
|
45989
45989
|
)
|
|
45990
45990
|
);
|
|
@@ -46417,7 +46417,7 @@ function WebGLState( gl, extensions ) {
|
|
|
46417
46417
|
locked = false;
|
|
46418
46418
|
|
|
46419
46419
|
currentColorMask = null;
|
|
46420
|
-
currentColorClear.set( -
|
|
46420
|
+
currentColorClear.set( -1, 0, 0, 0 ); // set to invalid state
|
|
46421
46421
|
|
|
46422
46422
|
}
|
|
46423
46423
|
|
|
@@ -46746,12 +46746,12 @@ function WebGLState( gl, extensions ) {
|
|
|
46746
46746
|
let version = 0;
|
|
46747
46747
|
const glVersion = gl.getParameter( gl.VERSION );
|
|
46748
46748
|
|
|
46749
|
-
if ( glVersion.indexOf( 'WebGL' ) !== -
|
|
46749
|
+
if ( glVersion.indexOf( 'WebGL' ) !== -1 ) {
|
|
46750
46750
|
|
|
46751
46751
|
version = parseFloat( /^WebGL (\d)/.exec( glVersion )[ 1 ] );
|
|
46752
46752
|
lineWidthAvailable = ( version >= 1.0 );
|
|
46753
46753
|
|
|
46754
|
-
} else if ( glVersion.indexOf( 'OpenGL ES' ) !== -
|
|
46754
|
+
} else if ( glVersion.indexOf( 'OpenGL ES' ) !== -1 ) {
|
|
46755
46755
|
|
|
46756
46756
|
version = parseFloat( /^OpenGL ES (\d)/.exec( glVersion )[ 1 ] );
|
|
46757
46757
|
lineWidthAvailable = ( version >= 2.0 );
|
|
@@ -50497,7 +50497,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
50497
50497
|
|
|
50498
50498
|
const controllerIndex = controllerInputSources.indexOf( event.inputSource );
|
|
50499
50499
|
|
|
50500
|
-
if ( controllerIndex === -
|
|
50500
|
+
if ( controllerIndex === -1 ) {
|
|
50501
50501
|
|
|
50502
50502
|
return;
|
|
50503
50503
|
|
|
@@ -50544,6 +50544,8 @@ class WebXRManager extends EventDispatcher {
|
|
|
50544
50544
|
|
|
50545
50545
|
// restore framebuffer/rendering state
|
|
50546
50546
|
|
|
50547
|
+
scope.isPresenting = false;
|
|
50548
|
+
|
|
50547
50549
|
renderer.setRenderTarget( initialRenderTarget );
|
|
50548
50550
|
|
|
50549
50551
|
glBaseLayer = null;
|
|
@@ -50556,8 +50558,6 @@ class WebXRManager extends EventDispatcher {
|
|
|
50556
50558
|
|
|
50557
50559
|
animation.stop();
|
|
50558
50560
|
|
|
50559
|
-
scope.isPresenting = false;
|
|
50560
|
-
|
|
50561
50561
|
renderer.setPixelRatio( currentPixelRatio );
|
|
50562
50562
|
renderer.setSize( currentSize.width, currentSize.height, false );
|
|
50563
50563
|
|
|
@@ -50836,7 +50836,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
50836
50836
|
|
|
50837
50837
|
let controllerIndex = controllerInputSources.indexOf( inputSource );
|
|
50838
50838
|
|
|
50839
|
-
if ( controllerIndex === -
|
|
50839
|
+
if ( controllerIndex === -1 ) {
|
|
50840
50840
|
|
|
50841
50841
|
// Assign input source a controller that currently has no input source
|
|
50842
50842
|
|
|
@@ -50860,7 +50860,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
50860
50860
|
|
|
50861
50861
|
// If all controllers do currently receive input we ignore new ones
|
|
50862
50862
|
|
|
50863
|
-
if ( controllerIndex === -
|
|
50863
|
+
if ( controllerIndex === -1 ) break;
|
|
50864
50864
|
|
|
50865
50865
|
}
|
|
50866
50866
|
|
|
@@ -50927,7 +50927,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
50927
50927
|
camera.matrixWorldInverse.copy( camera.matrixWorld ).invert();
|
|
50928
50928
|
|
|
50929
50929
|
// Check if the projection uses an infinite far plane.
|
|
50930
|
-
if ( projL[ 10 ] === -
|
|
50930
|
+
if ( projL[ 10 ] === -1 ) {
|
|
50931
50931
|
|
|
50932
50932
|
// Use the projection matrix from the left eye.
|
|
50933
50933
|
// The camera offset is sufficient to include the view volumes
|
|
@@ -51435,7 +51435,7 @@ function WebGLMaterials( renderer, properties ) {
|
|
|
51435
51435
|
|
|
51436
51436
|
if ( material.side === BackSide ) {
|
|
51437
51437
|
|
|
51438
|
-
uniforms.bumpScale.value *= -
|
|
51438
|
+
uniforms.bumpScale.value *= -1;
|
|
51439
51439
|
|
|
51440
51440
|
}
|
|
51441
51441
|
|
|
@@ -51502,19 +51502,19 @@ function WebGLMaterials( renderer, properties ) {
|
|
|
51502
51502
|
_e1.copy( envMapRotation );
|
|
51503
51503
|
|
|
51504
51504
|
// accommodate left-handed frame
|
|
51505
|
-
_e1.x *= -
|
|
51505
|
+
_e1.x *= -1; _e1.y *= -1; _e1.z *= -1;
|
|
51506
51506
|
|
|
51507
51507
|
if ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) {
|
|
51508
51508
|
|
|
51509
51509
|
// environment maps which are not cube render targets or PMREMs follow a different convention
|
|
51510
|
-
_e1.y *= -
|
|
51511
|
-
_e1.z *= -
|
|
51510
|
+
_e1.y *= -1;
|
|
51511
|
+
_e1.z *= -1;
|
|
51512
51512
|
|
|
51513
51513
|
}
|
|
51514
51514
|
|
|
51515
51515
|
uniforms.envMapRotation.value.setFromMatrix4( _m1.makeRotationFromEuler( _e1 ) );
|
|
51516
51516
|
|
|
51517
|
-
uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? -
|
|
51517
|
+
uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? -1 : 1;
|
|
51518
51518
|
|
|
51519
51519
|
uniforms.reflectivity.value = material.reflectivity;
|
|
51520
51520
|
uniforms.ior.value = material.ior;
|
|
@@ -51937,7 +51937,7 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
|
|
|
51937
51937
|
|
|
51938
51938
|
for ( let i = 0; i < maxBindingPoints; i ++ ) {
|
|
51939
51939
|
|
|
51940
|
-
if ( allocatedBindingPoints.indexOf( i ) === -
|
|
51940
|
+
if ( allocatedBindingPoints.indexOf( i ) === -1 ) {
|
|
51941
51941
|
|
|
51942
51942
|
allocatedBindingPoints.push( i );
|
|
51943
51943
|
return i;
|
|
@@ -52360,7 +52360,7 @@ class WebGLRenderer {
|
|
|
52360
52360
|
let _currentActiveCubeFace = 0;
|
|
52361
52361
|
let _currentActiveMipmapLevel = 0;
|
|
52362
52362
|
let _currentRenderTarget = null;
|
|
52363
|
-
let _currentMaterialId = -
|
|
52363
|
+
let _currentMaterialId = -1;
|
|
52364
52364
|
|
|
52365
52365
|
let _currentCamera = null;
|
|
52366
52366
|
|
|
@@ -53503,7 +53503,7 @@ class WebGLRenderer {
|
|
|
53503
53503
|
// _gl.finish();
|
|
53504
53504
|
|
|
53505
53505
|
bindingStates.resetDefaultState();
|
|
53506
|
-
_currentMaterialId = -
|
|
53506
|
+
_currentMaterialId = -1;
|
|
53507
53507
|
_currentCamera = null;
|
|
53508
53508
|
|
|
53509
53509
|
renderStateStack.pop();
|
|
@@ -54335,7 +54335,7 @@ class WebGLRenderer {
|
|
|
54335
54335
|
|
|
54336
54336
|
m_uniforms.envMap.value = envMap;
|
|
54337
54337
|
|
|
54338
|
-
m_uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? -
|
|
54338
|
+
m_uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? -1 : 1;
|
|
54339
54339
|
|
|
54340
54340
|
}
|
|
54341
54341
|
|
|
@@ -54686,7 +54686,7 @@ class WebGLRenderer {
|
|
|
54686
54686
|
|
|
54687
54687
|
}
|
|
54688
54688
|
|
|
54689
|
-
_currentMaterialId = -
|
|
54689
|
+
_currentMaterialId = -1; // reset current material to ensure correct uniform bindings
|
|
54690
54690
|
|
|
54691
54691
|
};
|
|
54692
54692
|
|