super-three 0.173.3 → 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 +783 -270
- package/build/three.core.js +174 -159
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +610 -112
- 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.core.js
CHANGED
|
@@ -238,7 +238,7 @@ class EventDispatcher {
|
|
|
238
238
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
if ( listeners[ type ].indexOf( listener ) === -
|
|
241
|
+
if ( listeners[ type ].indexOf( listener ) === -1 ) {
|
|
242
242
|
|
|
243
243
|
listeners[ type ].push( listener );
|
|
244
244
|
|
|
@@ -252,7 +252,7 @@ class EventDispatcher {
|
|
|
252
252
|
|
|
253
253
|
if ( listeners === undefined ) return false;
|
|
254
254
|
|
|
255
|
-
return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== -
|
|
255
|
+
return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== -1;
|
|
256
256
|
|
|
257
257
|
}
|
|
258
258
|
|
|
@@ -268,7 +268,7 @@ class EventDispatcher {
|
|
|
268
268
|
|
|
269
269
|
const index = listenerArray.indexOf( listener );
|
|
270
270
|
|
|
271
|
-
if ( index !== -
|
|
271
|
+
if ( index !== -1 ) {
|
|
272
272
|
|
|
273
273
|
listenerArray.splice( index, 1 );
|
|
274
274
|
|
|
@@ -558,15 +558,15 @@ function denormalize( value, array ) {
|
|
|
558
558
|
|
|
559
559
|
case Int32Array:
|
|
560
560
|
|
|
561
|
-
return Math.max( value / 2147483647.0, -
|
|
561
|
+
return Math.max( value / 2147483647.0, -1 );
|
|
562
562
|
|
|
563
563
|
case Int16Array:
|
|
564
564
|
|
|
565
|
-
return Math.max( value / 32767.0, -
|
|
565
|
+
return Math.max( value / 32767.0, -1 );
|
|
566
566
|
|
|
567
567
|
case Int8Array:
|
|
568
568
|
|
|
569
|
-
return Math.max( value / 127.0, -
|
|
569
|
+
return Math.max( value / 127.0, -1 );
|
|
570
570
|
|
|
571
571
|
default:
|
|
572
572
|
|
|
@@ -1008,7 +1008,7 @@ class Vector2 {
|
|
|
1008
1008
|
|
|
1009
1009
|
// clamp, to handle numerical problems
|
|
1010
1010
|
|
|
1011
|
-
return Math.acos( clamp( theta, -
|
|
1011
|
+
return Math.acos( clamp( theta, -1, 1 ) );
|
|
1012
1012
|
|
|
1013
1013
|
}
|
|
1014
1014
|
|
|
@@ -1609,7 +1609,7 @@ function toNormalizedProjectionMatrix( projectionMatrix ) {
|
|
|
1609
1609
|
function toReversedProjectionMatrix( projectionMatrix ) {
|
|
1610
1610
|
|
|
1611
1611
|
const m = projectionMatrix.elements;
|
|
1612
|
-
const isPerspectiveMatrix = m[ 11 ] === -
|
|
1612
|
+
const isPerspectiveMatrix = m[ 11 ] === -1;
|
|
1613
1613
|
|
|
1614
1614
|
// Reverse [0, 1] projection matrix
|
|
1615
1615
|
if ( isPerspectiveMatrix ) {
|
|
@@ -1633,9 +1633,9 @@ const LINEAR_REC709_TO_XYZ = /*@__PURE__*/ new Matrix3().set(
|
|
|
1633
1633
|
);
|
|
1634
1634
|
|
|
1635
1635
|
const XYZ_TO_LINEAR_REC709 = /*@__PURE__*/ new Matrix3().set(
|
|
1636
|
-
3.2409699, -
|
|
1637
|
-
-
|
|
1638
|
-
0.0556301, -
|
|
1636
|
+
3.2409699, -1.5373832, -0.4986108,
|
|
1637
|
+
-0.9692436, 1.8759675, 0.0415551,
|
|
1638
|
+
0.0556301, -0.203977, 1.0569715
|
|
1639
1639
|
);
|
|
1640
1640
|
|
|
1641
1641
|
function createColorManagement() {
|
|
@@ -3366,7 +3366,7 @@ class Quaternion {
|
|
|
3366
3366
|
|
|
3367
3367
|
let s = 1 - t;
|
|
3368
3368
|
const cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,
|
|
3369
|
-
dir = ( cos >= 0 ? 1 : -
|
|
3369
|
+
dir = ( cos >= 0 ? 1 : -1 ),
|
|
3370
3370
|
sqrSin = 1 - cos * cos;
|
|
3371
3371
|
|
|
3372
3372
|
// Skip the Slerp for tiny steps to avoid numeric problems:
|
|
@@ -3709,7 +3709,7 @@ class Quaternion {
|
|
|
3709
3709
|
|
|
3710
3710
|
angleTo( q ) {
|
|
3711
3711
|
|
|
3712
|
-
return 2 * Math.acos( Math.abs( clamp( this.dot( q ), -
|
|
3712
|
+
return 2 * Math.acos( Math.abs( clamp( this.dot( q ), -1, 1 ) ) );
|
|
3713
3713
|
|
|
3714
3714
|
}
|
|
3715
3715
|
|
|
@@ -3743,9 +3743,9 @@ class Quaternion {
|
|
|
3743
3743
|
|
|
3744
3744
|
conjugate() {
|
|
3745
3745
|
|
|
3746
|
-
this._x *= -
|
|
3747
|
-
this._y *= -
|
|
3748
|
-
this._z *= -
|
|
3746
|
+
this._x *= -1;
|
|
3747
|
+
this._y *= -1;
|
|
3748
|
+
this._z *= -1;
|
|
3749
3749
|
|
|
3750
3750
|
this._onChangeCallback();
|
|
3751
3751
|
|
|
@@ -4527,7 +4527,7 @@ class Vector3 {
|
|
|
4527
4527
|
|
|
4528
4528
|
// clamp, to handle numerical problems
|
|
4529
4529
|
|
|
4530
|
-
return Math.acos( clamp( theta, -
|
|
4530
|
+
return Math.acos( clamp( theta, -1, 1 ) );
|
|
4531
4531
|
|
|
4532
4532
|
}
|
|
4533
4533
|
|
|
@@ -5255,7 +5255,7 @@ const _v2$3 = /*@__PURE__*/ new Vector3();
|
|
|
5255
5255
|
|
|
5256
5256
|
class Sphere {
|
|
5257
5257
|
|
|
5258
|
-
constructor( center = new Vector3(), radius = -
|
|
5258
|
+
constructor( center = new Vector3(), radius = -1 ) {
|
|
5259
5259
|
|
|
5260
5260
|
this.isSphere = true;
|
|
5261
5261
|
|
|
@@ -5319,7 +5319,7 @@ class Sphere {
|
|
|
5319
5319
|
makeEmpty() {
|
|
5320
5320
|
|
|
5321
5321
|
this.center.set( 0, 0, 0 );
|
|
5322
|
-
this.radius = -
|
|
5322
|
+
this.radius = -1;
|
|
5323
5323
|
|
|
5324
5324
|
return this;
|
|
5325
5325
|
|
|
@@ -5501,7 +5501,7 @@ const _normal$1 = /*@__PURE__*/ new Vector3();
|
|
|
5501
5501
|
|
|
5502
5502
|
class Ray {
|
|
5503
5503
|
|
|
5504
|
-
constructor( origin = new Vector3(), direction = new Vector3( 0, 0, -
|
|
5504
|
+
constructor( origin = new Vector3(), direction = new Vector3( 0, 0, -1 ) ) {
|
|
5505
5505
|
|
|
5506
5506
|
this.origin = origin;
|
|
5507
5507
|
this.direction = direction;
|
|
@@ -5907,7 +5907,7 @@ class Ray {
|
|
|
5907
5907
|
|
|
5908
5908
|
} else if ( DdN < 0 ) {
|
|
5909
5909
|
|
|
5910
|
-
sign = -
|
|
5910
|
+
sign = -1;
|
|
5911
5911
|
DdN = - DdN;
|
|
5912
5912
|
|
|
5913
5913
|
} else {
|
|
@@ -6767,7 +6767,7 @@ class Matrix4 {
|
|
|
6767
6767
|
if ( coordinateSystem === WebGLCoordinateSystem ) {
|
|
6768
6768
|
|
|
6769
6769
|
c = - ( far + near ) / ( far - near );
|
|
6770
|
-
d = ( -
|
|
6770
|
+
d = ( -2 * far * near ) / ( far - near );
|
|
6771
6771
|
|
|
6772
6772
|
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
6773
6773
|
|
|
@@ -6783,7 +6783,7 @@ class Matrix4 {
|
|
|
6783
6783
|
te[ 0 ] = x; te[ 4 ] = 0; te[ 8 ] = a; te[ 12 ] = 0;
|
|
6784
6784
|
te[ 1 ] = 0; te[ 5 ] = y; te[ 9 ] = b; te[ 13 ] = 0;
|
|
6785
6785
|
te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = c; te[ 14 ] = d;
|
|
6786
|
-
te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = -
|
|
6786
|
+
te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = -1; te[ 15 ] = 0;
|
|
6787
6787
|
|
|
6788
6788
|
return this;
|
|
6789
6789
|
|
|
@@ -6804,12 +6804,12 @@ class Matrix4 {
|
|
|
6804
6804
|
if ( coordinateSystem === WebGLCoordinateSystem ) {
|
|
6805
6805
|
|
|
6806
6806
|
z = ( far + near ) * p;
|
|
6807
|
-
zInv = -
|
|
6807
|
+
zInv = -2 * p;
|
|
6808
6808
|
|
|
6809
6809
|
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
6810
6810
|
|
|
6811
6811
|
z = near * p;
|
|
6812
|
-
zInv = -
|
|
6812
|
+
zInv = -1 * p;
|
|
6813
6813
|
|
|
6814
6814
|
} else {
|
|
6815
6815
|
|
|
@@ -7004,7 +7004,7 @@ class Euler {
|
|
|
7004
7004
|
|
|
7005
7005
|
case 'XYZ':
|
|
7006
7006
|
|
|
7007
|
-
this._y = Math.asin( clamp( m13, -
|
|
7007
|
+
this._y = Math.asin( clamp( m13, -1, 1 ) );
|
|
7008
7008
|
|
|
7009
7009
|
if ( Math.abs( m13 ) < 0.9999999 ) {
|
|
7010
7010
|
|
|
@@ -7022,7 +7022,7 @@ class Euler {
|
|
|
7022
7022
|
|
|
7023
7023
|
case 'YXZ':
|
|
7024
7024
|
|
|
7025
|
-
this._x = Math.asin( - clamp( m23, -
|
|
7025
|
+
this._x = Math.asin( - clamp( m23, -1, 1 ) );
|
|
7026
7026
|
|
|
7027
7027
|
if ( Math.abs( m23 ) < 0.9999999 ) {
|
|
7028
7028
|
|
|
@@ -7040,7 +7040,7 @@ class Euler {
|
|
|
7040
7040
|
|
|
7041
7041
|
case 'ZXY':
|
|
7042
7042
|
|
|
7043
|
-
this._x = Math.asin( clamp( m32, -
|
|
7043
|
+
this._x = Math.asin( clamp( m32, -1, 1 ) );
|
|
7044
7044
|
|
|
7045
7045
|
if ( Math.abs( m32 ) < 0.9999999 ) {
|
|
7046
7046
|
|
|
@@ -7058,7 +7058,7 @@ class Euler {
|
|
|
7058
7058
|
|
|
7059
7059
|
case 'ZYX':
|
|
7060
7060
|
|
|
7061
|
-
this._y = Math.asin( - clamp( m31, -
|
|
7061
|
+
this._y = Math.asin( - clamp( m31, -1, 1 ) );
|
|
7062
7062
|
|
|
7063
7063
|
if ( Math.abs( m31 ) < 0.9999999 ) {
|
|
7064
7064
|
|
|
@@ -7076,7 +7076,7 @@ class Euler {
|
|
|
7076
7076
|
|
|
7077
7077
|
case 'YZX':
|
|
7078
7078
|
|
|
7079
|
-
this._z = Math.asin( clamp( m21, -
|
|
7079
|
+
this._z = Math.asin( clamp( m21, -1, 1 ) );
|
|
7080
7080
|
|
|
7081
7081
|
if ( Math.abs( m21 ) < 0.9999999 ) {
|
|
7082
7082
|
|
|
@@ -7094,7 +7094,7 @@ class Euler {
|
|
|
7094
7094
|
|
|
7095
7095
|
case 'XZY':
|
|
7096
7096
|
|
|
7097
|
-
this._z = Math.asin( - clamp( m12, -
|
|
7097
|
+
this._z = Math.asin( - clamp( m12, -1, 1 ) );
|
|
7098
7098
|
|
|
7099
7099
|
if ( Math.abs( m12 ) < 0.9999999 ) {
|
|
7100
7100
|
|
|
@@ -7621,7 +7621,7 @@ class Object3D extends EventDispatcher {
|
|
|
7621
7621
|
|
|
7622
7622
|
const index = this.children.indexOf( object );
|
|
7623
7623
|
|
|
7624
|
-
if ( index !== -
|
|
7624
|
+
if ( index !== -1 ) {
|
|
7625
7625
|
|
|
7626
7626
|
object.parent = null;
|
|
7627
7627
|
this.children.splice( index, 1 );
|
|
@@ -8962,7 +8962,7 @@ class Color {
|
|
|
8962
8962
|
|
|
8963
8963
|
getHexString( colorSpace = SRGBColorSpace ) {
|
|
8964
8964
|
|
|
8965
|
-
return ( '000000' + this.getHex( colorSpace ).toString( 16 ) ).slice( -
|
|
8965
|
+
return ( '000000' + this.getHex( colorSpace ).toString( 16 ) ).slice( -6 );
|
|
8966
8966
|
|
|
8967
8967
|
}
|
|
8968
8968
|
|
|
@@ -9846,7 +9846,7 @@ function _generateTables() {
|
|
|
9846
9846
|
|
|
9847
9847
|
// very small number (0, -0)
|
|
9848
9848
|
|
|
9849
|
-
if ( e < -
|
|
9849
|
+
if ( e < -27 ) {
|
|
9850
9850
|
|
|
9851
9851
|
baseTable[ i ] = 0x0000;
|
|
9852
9852
|
baseTable[ i | 0x100 ] = 0x8000;
|
|
@@ -9855,7 +9855,7 @@ function _generateTables() {
|
|
|
9855
9855
|
|
|
9856
9856
|
// small number (denorm)
|
|
9857
9857
|
|
|
9858
|
-
} else if ( e < -
|
|
9858
|
+
} else if ( e < -14 ) {
|
|
9859
9859
|
|
|
9860
9860
|
baseTable[ i ] = 0x0400 >> ( - e - 14 );
|
|
9861
9861
|
baseTable[ i | 0x100 ] = ( 0x0400 >> ( - e - 14 ) ) | 0x8000;
|
|
@@ -9912,7 +9912,7 @@ function _generateTables() {
|
|
|
9912
9912
|
|
|
9913
9913
|
}
|
|
9914
9914
|
|
|
9915
|
-
m &=
|
|
9915
|
+
m &= -8388609; // clear leading 1 bit
|
|
9916
9916
|
e += 0x38800000; // adjust bias
|
|
9917
9917
|
|
|
9918
9918
|
mantissaTable[ i ] = m | e;
|
|
@@ -9970,7 +9970,7 @@ function toHalfFloat( val ) {
|
|
|
9970
9970
|
|
|
9971
9971
|
if ( Math.abs( val ) > 65504 ) console.warn( 'THREE.DataUtils.toHalfFloat(): Value out of range.' );
|
|
9972
9972
|
|
|
9973
|
-
val = clamp( val, -
|
|
9973
|
+
val = clamp( val, -65504, 65504 );
|
|
9974
9974
|
|
|
9975
9975
|
_tables.floatView[ 0 ] = val;
|
|
9976
9976
|
const f = _tables.uint32View[ 0 ];
|
|
@@ -11241,7 +11241,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
11241
11241
|
|
|
11242
11242
|
tmp2.crossVectors( n2, t );
|
|
11243
11243
|
const test = tmp2.dot( tan2[ v ] );
|
|
11244
|
-
const w = ( test < 0.0 ) ? -
|
|
11244
|
+
const w = ( test < 0.0 ) ? -1 : 1.0;
|
|
11245
11245
|
|
|
11246
11246
|
tangentAttribute.setXYZW( v, tmp.x, tmp.y, tmp.z, w );
|
|
11247
11247
|
|
|
@@ -12083,7 +12083,7 @@ function checkGeometryIntersection( object, material, raycaster, ray, uv, uv1, n
|
|
|
12083
12083
|
|
|
12084
12084
|
if ( intersection.normal.dot( ray.direction ) > 0 ) {
|
|
12085
12085
|
|
|
12086
|
-
intersection.normal.multiplyScalar( -
|
|
12086
|
+
intersection.normal.multiplyScalar( -1 );
|
|
12087
12087
|
|
|
12088
12088
|
}
|
|
12089
12089
|
|
|
@@ -12147,12 +12147,12 @@ class BoxGeometry extends BufferGeometry {
|
|
|
12147
12147
|
|
|
12148
12148
|
// build each side of the box geometry
|
|
12149
12149
|
|
|
12150
|
-
buildPlane( 'z', 'y', 'x', -
|
|
12151
|
-
buildPlane( 'z', 'y', 'x', 1, -
|
|
12150
|
+
buildPlane( 'z', 'y', 'x', -1, -1, depth, height, width, depthSegments, heightSegments, 0 ); // px
|
|
12151
|
+
buildPlane( 'z', 'y', 'x', 1, -1, depth, height, - width, depthSegments, heightSegments, 1 ); // nx
|
|
12152
12152
|
buildPlane( 'x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2 ); // py
|
|
12153
|
-
buildPlane( 'x', 'z', 'y', 1, -
|
|
12154
|
-
buildPlane( 'x', 'y', 'z', 1, -
|
|
12155
|
-
buildPlane( 'x', 'y', 'z', -
|
|
12153
|
+
buildPlane( 'x', 'z', 'y', 1, -1, width, depth, - height, widthSegments, depthSegments, 3 ); // ny
|
|
12154
|
+
buildPlane( 'x', 'y', 'z', 1, -1, width, height, depth, widthSegments, heightSegments, 4 ); // pz
|
|
12155
|
+
buildPlane( 'x', 'y', 'z', -1, -1, width, height, - depth, widthSegments, heightSegments, 5 ); // nz
|
|
12156
12156
|
|
|
12157
12157
|
// build geometry
|
|
12158
12158
|
|
|
@@ -12202,7 +12202,7 @@ class BoxGeometry extends BufferGeometry {
|
|
|
12202
12202
|
|
|
12203
12203
|
vector[ u ] = 0;
|
|
12204
12204
|
vector[ v ] = 0;
|
|
12205
|
-
vector[ w ] = depth > 0 ? 1 : -
|
|
12205
|
+
vector[ w ] = depth > 0 ? 1 : -1;
|
|
12206
12206
|
|
|
12207
12207
|
// now apply vector to normal buffer
|
|
12208
12208
|
|
|
@@ -12754,7 +12754,7 @@ class PerspectiveCamera extends Camera {
|
|
|
12754
12754
|
*/
|
|
12755
12755
|
getViewBounds( distance, minTarget, maxTarget ) {
|
|
12756
12756
|
|
|
12757
|
-
_v3$1.set( -
|
|
12757
|
+
_v3$1.set( -1, -1, 0.5 ).applyMatrix4( this.projectionMatrixInverse );
|
|
12758
12758
|
|
|
12759
12759
|
minTarget.set( _v3$1.x, _v3$1.y ).multiplyScalar( - distance / _v3$1.z );
|
|
12760
12760
|
|
|
@@ -12869,7 +12869,7 @@ class PerspectiveCamera extends Camera {
|
|
|
12869
12869
|
let top = near * Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom;
|
|
12870
12870
|
let height = 2 * top;
|
|
12871
12871
|
let width = this.aspect * height;
|
|
12872
|
-
let left = -
|
|
12872
|
+
let left = -0.5 * width;
|
|
12873
12873
|
const view = this.view;
|
|
12874
12874
|
|
|
12875
12875
|
if ( this.view !== null && this.view.enabled ) {
|
|
@@ -12917,7 +12917,7 @@ class PerspectiveCamera extends Camera {
|
|
|
12917
12917
|
|
|
12918
12918
|
}
|
|
12919
12919
|
|
|
12920
|
-
const fov = -
|
|
12920
|
+
const fov = -90; // negative fov is not an error
|
|
12921
12921
|
const aspect = 1;
|
|
12922
12922
|
|
|
12923
12923
|
class CubeCamera extends Object3D {
|
|
@@ -12974,39 +12974,39 @@ class CubeCamera extends Object3D {
|
|
|
12974
12974
|
cameraPX.lookAt( 1, 0, 0 );
|
|
12975
12975
|
|
|
12976
12976
|
cameraNX.up.set( 0, 1, 0 );
|
|
12977
|
-
cameraNX.lookAt( -
|
|
12977
|
+
cameraNX.lookAt( -1, 0, 0 );
|
|
12978
12978
|
|
|
12979
|
-
cameraPY.up.set( 0, 0, -
|
|
12979
|
+
cameraPY.up.set( 0, 0, -1 );
|
|
12980
12980
|
cameraPY.lookAt( 0, 1, 0 );
|
|
12981
12981
|
|
|
12982
12982
|
cameraNY.up.set( 0, 0, 1 );
|
|
12983
|
-
cameraNY.lookAt( 0, -
|
|
12983
|
+
cameraNY.lookAt( 0, -1, 0 );
|
|
12984
12984
|
|
|
12985
12985
|
cameraPZ.up.set( 0, 1, 0 );
|
|
12986
12986
|
cameraPZ.lookAt( 0, 0, 1 );
|
|
12987
12987
|
|
|
12988
12988
|
cameraNZ.up.set( 0, 1, 0 );
|
|
12989
|
-
cameraNZ.lookAt( 0, 0, -
|
|
12989
|
+
cameraNZ.lookAt( 0, 0, -1 );
|
|
12990
12990
|
|
|
12991
12991
|
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
12992
12992
|
|
|
12993
|
-
cameraPX.up.set( 0, -
|
|
12994
|
-
cameraPX.lookAt( -
|
|
12993
|
+
cameraPX.up.set( 0, -1, 0 );
|
|
12994
|
+
cameraPX.lookAt( -1, 0, 0 );
|
|
12995
12995
|
|
|
12996
|
-
cameraNX.up.set( 0, -
|
|
12996
|
+
cameraNX.up.set( 0, -1, 0 );
|
|
12997
12997
|
cameraNX.lookAt( 1, 0, 0 );
|
|
12998
12998
|
|
|
12999
12999
|
cameraPY.up.set( 0, 0, 1 );
|
|
13000
13000
|
cameraPY.lookAt( 0, 1, 0 );
|
|
13001
13001
|
|
|
13002
|
-
cameraNY.up.set( 0, 0, -
|
|
13003
|
-
cameraNY.lookAt( 0, -
|
|
13002
|
+
cameraNY.up.set( 0, 0, -1 );
|
|
13003
|
+
cameraNY.lookAt( 0, -1, 0 );
|
|
13004
13004
|
|
|
13005
|
-
cameraPZ.up.set( 0, -
|
|
13005
|
+
cameraPZ.up.set( 0, -1, 0 );
|
|
13006
13006
|
cameraPZ.lookAt( 0, 0, 1 );
|
|
13007
13007
|
|
|
13008
|
-
cameraNZ.up.set( 0, -
|
|
13009
|
-
cameraNZ.lookAt( 0, 0, -
|
|
13008
|
+
cameraNZ.up.set( 0, -1, 0 );
|
|
13009
|
+
cameraNZ.lookAt( 0, 0, -1 );
|
|
13010
13010
|
|
|
13011
13011
|
} else {
|
|
13012
13012
|
|
|
@@ -14323,10 +14323,10 @@ class Sprite extends Object3D {
|
|
|
14323
14323
|
_geometry = new BufferGeometry();
|
|
14324
14324
|
|
|
14325
14325
|
const float32Array = new Float32Array( [
|
|
14326
|
-
-
|
|
14327
|
-
0.5, -
|
|
14326
|
+
-0.5, -0.5, 0, 0, 0,
|
|
14327
|
+
0.5, -0.5, 0, 1, 0,
|
|
14328
14328
|
0.5, 0.5, 0, 1, 1,
|
|
14329
|
-
-
|
|
14329
|
+
-0.5, 0.5, 0, 0, 1
|
|
14330
14330
|
] );
|
|
14331
14331
|
|
|
14332
14332
|
const interleavedBuffer = new InterleavedBuffer( float32Array, 5 );
|
|
@@ -14377,8 +14377,8 @@ class Sprite extends Object3D {
|
|
|
14377
14377
|
|
|
14378
14378
|
const center = this.center;
|
|
14379
14379
|
|
|
14380
|
-
transformVertex( _vA.set( -
|
|
14381
|
-
transformVertex( _vB.set( 0.5, -
|
|
14380
|
+
transformVertex( _vA.set( -0.5, -0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
14381
|
+
transformVertex( _vB.set( 0.5, -0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
14382
14382
|
transformVertex( _vC.set( 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
14383
14383
|
|
|
14384
14384
|
_uvA.set( 0, 0 );
|
|
@@ -14391,7 +14391,7 @@ class Sprite extends Object3D {
|
|
|
14391
14391
|
if ( intersect === null ) {
|
|
14392
14392
|
|
|
14393
14393
|
// check second triangle
|
|
14394
|
-
transformVertex( _vB.set( -
|
|
14394
|
+
transformVertex( _vB.set( -0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );
|
|
14395
14395
|
_uvB.set( 0, 1 );
|
|
14396
14396
|
|
|
14397
14397
|
intersect = raycaster.ray.intersectTriangle( _vA, _vC, _vB, false, _intersectPoint );
|
|
@@ -15619,7 +15619,7 @@ class Plane {
|
|
|
15619
15619
|
|
|
15620
15620
|
negate() {
|
|
15621
15621
|
|
|
15622
|
-
this.constant *= -
|
|
15622
|
+
this.constant *= -1;
|
|
15623
15623
|
this.normal.negate();
|
|
15624
15624
|
|
|
15625
15625
|
return this;
|
|
@@ -15956,10 +15956,10 @@ class MultiDrawRenderList {
|
|
|
15956
15956
|
|
|
15957
15957
|
pool.push( {
|
|
15958
15958
|
|
|
15959
|
-
start: -
|
|
15960
|
-
count: -
|
|
15961
|
-
z: -
|
|
15962
|
-
index: -
|
|
15959
|
+
start: -1,
|
|
15960
|
+
count: -1,
|
|
15961
|
+
z: -1,
|
|
15962
|
+
index: -1,
|
|
15963
15963
|
|
|
15964
15964
|
} );
|
|
15965
15965
|
|
|
@@ -16369,7 +16369,7 @@ class BatchedMesh extends Mesh {
|
|
|
16369
16369
|
|
|
16370
16370
|
}
|
|
16371
16371
|
|
|
16372
|
-
addGeometry( geometry, reservedVertexCount = -
|
|
16372
|
+
addGeometry( geometry, reservedVertexCount = -1, reservedIndexCount = -1 ) {
|
|
16373
16373
|
|
|
16374
16374
|
this._initializeGeometry( geometry );
|
|
16375
16375
|
|
|
@@ -16377,17 +16377,17 @@ class BatchedMesh extends Mesh {
|
|
|
16377
16377
|
|
|
16378
16378
|
const geometryInfo = {
|
|
16379
16379
|
// geometry information
|
|
16380
|
-
vertexStart: -
|
|
16381
|
-
vertexCount: -
|
|
16382
|
-
reservedVertexCount: -
|
|
16380
|
+
vertexStart: -1,
|
|
16381
|
+
vertexCount: -1,
|
|
16382
|
+
reservedVertexCount: -1,
|
|
16383
16383
|
|
|
16384
|
-
indexStart: -
|
|
16385
|
-
indexCount: -
|
|
16386
|
-
reservedIndexCount: -
|
|
16384
|
+
indexStart: -1,
|
|
16385
|
+
indexCount: -1,
|
|
16386
|
+
reservedIndexCount: -1,
|
|
16387
16387
|
|
|
16388
16388
|
// draw range information
|
|
16389
|
-
start: -
|
|
16390
|
-
count: -
|
|
16389
|
+
start: -1,
|
|
16390
|
+
count: -1,
|
|
16391
16391
|
|
|
16392
16392
|
// state
|
|
16393
16393
|
boundingBox: null,
|
|
@@ -16397,19 +16397,19 @@ class BatchedMesh extends Mesh {
|
|
|
16397
16397
|
|
|
16398
16398
|
const geometryInfoList = this._geometryInfo;
|
|
16399
16399
|
geometryInfo.vertexStart = this._nextVertexStart;
|
|
16400
|
-
geometryInfo.reservedVertexCount = reservedVertexCount === -
|
|
16400
|
+
geometryInfo.reservedVertexCount = reservedVertexCount === -1 ? geometry.getAttribute( 'position' ).count : reservedVertexCount;
|
|
16401
16401
|
|
|
16402
16402
|
const index = geometry.getIndex();
|
|
16403
16403
|
const hasIndex = index !== null;
|
|
16404
16404
|
if ( hasIndex ) {
|
|
16405
16405
|
|
|
16406
16406
|
geometryInfo.indexStart = this._nextIndexStart;
|
|
16407
|
-
geometryInfo.reservedIndexCount = reservedIndexCount === -
|
|
16407
|
+
geometryInfo.reservedIndexCount = reservedIndexCount === -1 ? index.count : reservedIndexCount;
|
|
16408
16408
|
|
|
16409
16409
|
}
|
|
16410
16410
|
|
|
16411
16411
|
if (
|
|
16412
|
-
geometryInfo.indexStart !== -
|
|
16412
|
+
geometryInfo.indexStart !== -1 &&
|
|
16413
16413
|
geometryInfo.indexStart + geometryInfo.reservedIndexCount > this._maxIndexCount ||
|
|
16414
16414
|
geometryInfo.vertexStart + geometryInfo.reservedVertexCount > this._maxVertexCount
|
|
16415
16415
|
) {
|
|
@@ -17152,7 +17152,7 @@ class BatchedMesh extends Mesh {
|
|
|
17152
17152
|
// get the camera position in the local frame
|
|
17153
17153
|
_matrix$1.copy( this.matrixWorld ).invert();
|
|
17154
17154
|
_vector$5.setFromMatrixPosition( camera.matrixWorld ).applyMatrix4( _matrix$1 );
|
|
17155
|
-
_forward.set( 0, 0, -
|
|
17155
|
+
_forward.set( 0, 0, -1 ).transformDirection( camera.matrixWorld ).transformDirection( _matrix$1 );
|
|
17156
17156
|
|
|
17157
17157
|
for ( let i = 0, l = instanceInfo.length; i < l; i ++ ) {
|
|
17158
17158
|
|
|
@@ -18372,7 +18372,7 @@ class Curve {
|
|
|
18372
18372
|
|
|
18373
18373
|
vec.normalize();
|
|
18374
18374
|
|
|
18375
|
-
const theta = Math.acos( clamp( tangents[ i - 1 ].dot( tangents[ i ] ), -
|
|
18375
|
+
const theta = Math.acos( clamp( tangents[ i - 1 ].dot( tangents[ i ] ), -1, 1 ) ); // clamp for floating pt errors
|
|
18376
18376
|
|
|
18377
18377
|
normals[ i ].applyMatrix4( mat.makeRotationAxis( vec, theta ) );
|
|
18378
18378
|
|
|
@@ -18386,7 +18386,7 @@ class Curve {
|
|
|
18386
18386
|
|
|
18387
18387
|
if ( closed === true ) {
|
|
18388
18388
|
|
|
18389
|
-
let theta = Math.acos( clamp( normals[ 0 ].dot( normals[ segments ] ), -
|
|
18389
|
+
let theta = Math.acos( clamp( normals[ 0 ].dot( normals[ segments ] ), -1, 1 ) );
|
|
18390
18390
|
theta /= segments;
|
|
18391
18391
|
|
|
18392
18392
|
if ( tangents[ 0 ].dot( vec.crossVectors( normals[ 0 ], normals[ segments ] ) ) > 0 ) {
|
|
@@ -18656,7 +18656,7 @@ function CubicPoly() {
|
|
|
18656
18656
|
|
|
18657
18657
|
c0 = x0;
|
|
18658
18658
|
c1 = t0;
|
|
18659
|
-
c2 = -
|
|
18659
|
+
c2 = -3 * x0 + 3 * x1 - 2 * t0 - t1;
|
|
18660
18660
|
c3 = 2 * x0 - 2 * x1 + t0 + t1;
|
|
18661
18661
|
|
|
18662
18662
|
}
|
|
@@ -18882,7 +18882,7 @@ function CatmullRom( t, p0, p1, p2, p3 ) {
|
|
|
18882
18882
|
const v1 = ( p3 - p1 ) * 0.5;
|
|
18883
18883
|
const t2 = t * t;
|
|
18884
18884
|
const t3 = t * t2;
|
|
18885
|
-
return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( -
|
|
18885
|
+
return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( -3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;
|
|
18886
18886
|
|
|
18887
18887
|
}
|
|
18888
18888
|
|
|
@@ -19955,7 +19955,7 @@ class Path extends CurvePath {
|
|
|
19955
19955
|
|
|
19956
19956
|
class LatheGeometry extends BufferGeometry {
|
|
19957
19957
|
|
|
19958
|
-
constructor( points = [ new Vector2( 0, -
|
|
19958
|
+
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 ) {
|
|
19959
19959
|
|
|
19960
19960
|
super();
|
|
19961
19961
|
|
|
@@ -20426,7 +20426,7 @@ class CylinderGeometry extends BufferGeometry {
|
|
|
20426
20426
|
let groupCount = 0;
|
|
20427
20427
|
|
|
20428
20428
|
const radius = ( top === true ) ? radiusTop : radiusBottom;
|
|
20429
|
-
const sign = ( top === true ) ? 1 : -
|
|
20429
|
+
const sign = ( top === true ) ? 1 : -1;
|
|
20430
20430
|
|
|
20431
20431
|
// first we generate the center vertex data of the cap.
|
|
20432
20432
|
// because the geometry needs one set of uvs per face,
|
|
@@ -20894,10 +20894,10 @@ class DodecahedronGeometry extends PolyhedronGeometry {
|
|
|
20894
20894
|
const vertices = [
|
|
20895
20895
|
|
|
20896
20896
|
// (±1, ±1, ±1)
|
|
20897
|
-
-
|
|
20898
|
-
-
|
|
20899
|
-
1, -
|
|
20900
|
-
1, 1, -
|
|
20897
|
+
-1, -1, -1, -1, -1, 1,
|
|
20898
|
+
-1, 1, -1, -1, 1, 1,
|
|
20899
|
+
1, -1, -1, 1, -1, 1,
|
|
20900
|
+
1, 1, -1, 1, 1, 1,
|
|
20901
20901
|
|
|
20902
20902
|
// (0, ±1/φ, ±φ)
|
|
20903
20903
|
0, - r, - t, 0, - r, t,
|
|
@@ -21830,7 +21830,7 @@ function onSegment( p, q, r ) {
|
|
|
21830
21830
|
|
|
21831
21831
|
function sign( num ) {
|
|
21832
21832
|
|
|
21833
|
-
return num > 0 ? 1 : num < 0 ? -
|
|
21833
|
+
return num > 0 ? 1 : num < 0 ? -1 : 0;
|
|
21834
21834
|
|
|
21835
21835
|
}
|
|
21836
21836
|
|
|
@@ -22090,7 +22090,7 @@ function addContour( vertices, contour ) {
|
|
|
22090
22090
|
|
|
22091
22091
|
class ExtrudeGeometry extends BufferGeometry {
|
|
22092
22092
|
|
|
22093
|
-
constructor( shapes = new Shape( [ new Vector2( 0.5, 0.5 ), new Vector2( -
|
|
22093
|
+
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 = {} ) {
|
|
22094
22094
|
|
|
22095
22095
|
super();
|
|
22096
22096
|
|
|
@@ -22877,9 +22877,9 @@ class IcosahedronGeometry extends PolyhedronGeometry {
|
|
|
22877
22877
|
const t = ( 1 + Math.sqrt( 5 ) ) / 2;
|
|
22878
22878
|
|
|
22879
22879
|
const vertices = [
|
|
22880
|
-
-
|
|
22881
|
-
0, -
|
|
22882
|
-
t, 0, -
|
|
22880
|
+
-1, t, 0, 1, t, 0, -1, - t, 0, 1, - t, 0,
|
|
22881
|
+
0, -1, t, 0, 1, t, 0, -1, - t, 0, 1, - t,
|
|
22882
|
+
t, 0, -1, t, 0, 1, - t, 0, -1, - t, 0, 1
|
|
22883
22883
|
];
|
|
22884
22884
|
|
|
22885
22885
|
const indices = [
|
|
@@ -22913,8 +22913,8 @@ class OctahedronGeometry extends PolyhedronGeometry {
|
|
|
22913
22913
|
constructor( radius = 1, detail = 0 ) {
|
|
22914
22914
|
|
|
22915
22915
|
const vertices = [
|
|
22916
|
-
1, 0, 0, -
|
|
22917
|
-
0, -
|
|
22916
|
+
1, 0, 0, -1, 0, 0, 0, 1, 0,
|
|
22917
|
+
0, -1, 0, 0, 0, 1, 0, 0, -1
|
|
22918
22918
|
];
|
|
22919
22919
|
|
|
22920
22920
|
const indices = [
|
|
@@ -23159,7 +23159,7 @@ class RingGeometry extends BufferGeometry {
|
|
|
23159
23159
|
|
|
23160
23160
|
class ShapeGeometry extends BufferGeometry {
|
|
23161
23161
|
|
|
23162
|
-
constructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( -
|
|
23162
|
+
constructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( -0.5, -0.5 ), new Vector2( 0.5, -0.5 ) ] ), curveSegments = 12 ) {
|
|
23163
23163
|
|
|
23164
23164
|
super();
|
|
23165
23165
|
|
|
@@ -23399,7 +23399,7 @@ class SphereGeometry extends BufferGeometry {
|
|
|
23399
23399
|
|
|
23400
23400
|
} else if ( iy === heightSegments && thetaEnd === Math.PI ) {
|
|
23401
23401
|
|
|
23402
|
-
uOffset = -
|
|
23402
|
+
uOffset = -0.5 / widthSegments;
|
|
23403
23403
|
|
|
23404
23404
|
}
|
|
23405
23405
|
|
|
@@ -23482,7 +23482,7 @@ class TetrahedronGeometry extends PolyhedronGeometry {
|
|
|
23482
23482
|
constructor( radius = 1, detail = 0 ) {
|
|
23483
23483
|
|
|
23484
23484
|
const vertices = [
|
|
23485
|
-
1, 1, 1, -
|
|
23485
|
+
1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1
|
|
23486
23486
|
];
|
|
23487
23487
|
|
|
23488
23488
|
const indices = [
|
|
@@ -23787,7 +23787,7 @@ class TorusKnotGeometry extends BufferGeometry {
|
|
|
23787
23787
|
|
|
23788
23788
|
class TubeGeometry extends BufferGeometry {
|
|
23789
23789
|
|
|
23790
|
-
constructor( path = new QuadraticBezierCurve3( new Vector3( -
|
|
23790
|
+
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 ) {
|
|
23791
23791
|
|
|
23792
23792
|
super();
|
|
23793
23793
|
|
|
@@ -25328,7 +25328,7 @@ function subclip( sourceClip, name, startFrame, endFrame, fps = 30 ) {
|
|
|
25328
25328
|
|
|
25329
25329
|
for ( let i = 0; i < clip.tracks.length; ++ i ) {
|
|
25330
25330
|
|
|
25331
|
-
clip.tracks[ i ].shift( -
|
|
25331
|
+
clip.tracks[ i ].shift( -1 * minStartTime );
|
|
25332
25332
|
|
|
25333
25333
|
}
|
|
25334
25334
|
|
|
@@ -25725,10 +25725,10 @@ class CubicInterpolant extends Interpolant {
|
|
|
25725
25725
|
|
|
25726
25726
|
super( parameterPositions, sampleValues, sampleSize, resultBuffer );
|
|
25727
25727
|
|
|
25728
|
-
this._weightPrev = -
|
|
25729
|
-
this._offsetPrev = -
|
|
25730
|
-
this._weightNext = -
|
|
25731
|
-
this._offsetNext = -
|
|
25728
|
+
this._weightPrev = -0;
|
|
25729
|
+
this._offsetPrev = -0;
|
|
25730
|
+
this._weightNext = -0;
|
|
25731
|
+
this._offsetNext = -0;
|
|
25732
25732
|
|
|
25733
25733
|
this.DefaultSettings_ = {
|
|
25734
25734
|
|
|
@@ -25835,8 +25835,8 @@ class CubicInterpolant extends Interpolant {
|
|
|
25835
25835
|
// evaluate polynomials
|
|
25836
25836
|
|
|
25837
25837
|
const sP = - wP * ppp + 2 * wP * pp - wP * p;
|
|
25838
|
-
const s0 = ( 1 + wP ) * ppp + ( -
|
|
25839
|
-
const s1 = ( -
|
|
25838
|
+
const s0 = ( 1 + wP ) * ppp + ( -1.5 - 2 * wP ) * pp + ( -0.5 + wP ) * p + 1;
|
|
25839
|
+
const s1 = ( -1 - wN ) * ppp + ( 1.5 + wN ) * pp + 0.5 * p;
|
|
25840
25840
|
const sN = wN * ppp - wN * pp;
|
|
25841
25841
|
|
|
25842
25842
|
// combine data linearly
|
|
@@ -26125,7 +26125,7 @@ class KeyframeTrack {
|
|
|
26125
26125
|
|
|
26126
26126
|
}
|
|
26127
26127
|
|
|
26128
|
-
while ( to !== -
|
|
26128
|
+
while ( to !== -1 && times[ to ] > endTime ) {
|
|
26129
26129
|
|
|
26130
26130
|
-- to;
|
|
26131
26131
|
|
|
@@ -26479,7 +26479,7 @@ VectorKeyframeTrack.prototype.ValueTypeName = 'vector';
|
|
|
26479
26479
|
|
|
26480
26480
|
class AnimationClip {
|
|
26481
26481
|
|
|
26482
|
-
constructor( name = '', duration = -
|
|
26482
|
+
constructor( name = '', duration = -1, tracks = [], blendMode = NormalAnimationBlendMode ) {
|
|
26483
26483
|
|
|
26484
26484
|
this.name = name;
|
|
26485
26485
|
this.tracks = tracks;
|
|
@@ -26580,7 +26580,7 @@ class AnimationClip {
|
|
|
26580
26580
|
|
|
26581
26581
|
}
|
|
26582
26582
|
|
|
26583
|
-
return new this( name, -
|
|
26583
|
+
return new this( name, -1, tracks );
|
|
26584
26584
|
|
|
26585
26585
|
}
|
|
26586
26586
|
|
|
@@ -26692,7 +26692,7 @@ class AnimationClip {
|
|
|
26692
26692
|
const blendMode = animation.blendMode;
|
|
26693
26693
|
|
|
26694
26694
|
// automatic length determination in AnimationClip.
|
|
26695
|
-
let duration = animation.length || -
|
|
26695
|
+
let duration = animation.length || -1;
|
|
26696
26696
|
|
|
26697
26697
|
const hierarchyTracks = animation.hierarchy || [];
|
|
26698
26698
|
|
|
@@ -26717,7 +26717,7 @@ class AnimationClip {
|
|
|
26717
26717
|
|
|
26718
26718
|
for ( let m = 0; m < animationKeys[ k ].morphTargets.length; m ++ ) {
|
|
26719
26719
|
|
|
26720
|
-
morphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = -
|
|
26720
|
+
morphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = -1;
|
|
26721
26721
|
|
|
26722
26722
|
}
|
|
26723
26723
|
|
|
@@ -27082,7 +27082,7 @@ class LoadingManager {
|
|
|
27082
27082
|
|
|
27083
27083
|
const index = handlers.indexOf( regex );
|
|
27084
27084
|
|
|
27085
|
-
if ( index !== -
|
|
27085
|
+
if ( index !== -1 ) {
|
|
27086
27086
|
|
|
27087
27087
|
handlers.splice( index, 2 );
|
|
27088
27088
|
|
|
@@ -28338,13 +28338,13 @@ class PointLightShadow extends LightShadow {
|
|
|
28338
28338
|
];
|
|
28339
28339
|
|
|
28340
28340
|
this._cubeDirections = [
|
|
28341
|
-
new Vector3( 1, 0, 0 ), new Vector3( -
|
|
28342
|
-
new Vector3( 0, 0, -
|
|
28341
|
+
new Vector3( 1, 0, 0 ), new Vector3( -1, 0, 0 ), new Vector3( 0, 0, 1 ),
|
|
28342
|
+
new Vector3( 0, 0, -1 ), new Vector3( 0, 1, 0 ), new Vector3( 0, -1, 0 )
|
|
28343
28343
|
];
|
|
28344
28344
|
|
|
28345
28345
|
this._cubeUps = [
|
|
28346
28346
|
new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ),
|
|
28347
|
-
new Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ), new Vector3( 0, 0, -
|
|
28347
|
+
new Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ), new Vector3( 0, 0, -1 )
|
|
28348
28348
|
];
|
|
28349
28349
|
|
|
28350
28350
|
}
|
|
@@ -28436,7 +28436,7 @@ class PointLight extends Light {
|
|
|
28436
28436
|
|
|
28437
28437
|
class OrthographicCamera extends Camera {
|
|
28438
28438
|
|
|
28439
|
-
constructor( left = -
|
|
28439
|
+
constructor( left = -1, right = 1, top = 1, bottom = -1, near = 0.1, far = 2000 ) {
|
|
28440
28440
|
|
|
28441
28441
|
super();
|
|
28442
28442
|
|
|
@@ -28571,7 +28571,7 @@ class DirectionalLightShadow extends LightShadow {
|
|
|
28571
28571
|
|
|
28572
28572
|
constructor() {
|
|
28573
28573
|
|
|
28574
|
-
super( new OrthographicCamera( -
|
|
28574
|
+
super( new OrthographicCamera( -5, 5, 5, -5, 0.5, 500 ) );
|
|
28575
28575
|
|
|
28576
28576
|
this.isDirectionalLightShadow = true;
|
|
28577
28577
|
|
|
@@ -29359,7 +29359,7 @@ class LoaderUtils {
|
|
|
29359
29359
|
|
|
29360
29360
|
const index = url.lastIndexOf( '/' );
|
|
29361
29361
|
|
|
29362
|
-
if ( index === -
|
|
29362
|
+
if ( index === -1 ) return './';
|
|
29363
29363
|
|
|
29364
29364
|
return url.slice( 0, index + 1 );
|
|
29365
29365
|
|
|
@@ -29855,6 +29855,21 @@ class ObjectLoader extends Loader {
|
|
|
29855
29855
|
geometry = bufferGeometryLoader.parse( data );
|
|
29856
29856
|
break;
|
|
29857
29857
|
|
|
29858
|
+
case 'Geometry':
|
|
29859
|
+
|
|
29860
|
+
if ( 'THREE' in window && 'LegacyJSONLoader' in THREE ) {
|
|
29861
|
+
|
|
29862
|
+
var geometryLoader = new THREE.LegacyJSONLoader();
|
|
29863
|
+
geometry = geometryLoader.parse( data, this.resourcePath ).geometry;
|
|
29864
|
+
|
|
29865
|
+
|
|
29866
|
+
} else {
|
|
29867
|
+
|
|
29868
|
+
console.error( 'THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type "Geometry".' );
|
|
29869
|
+
|
|
29870
|
+
}
|
|
29871
|
+
break;
|
|
29872
|
+
|
|
29858
29873
|
default:
|
|
29859
29874
|
|
|
29860
29875
|
if ( data.type in Geometries ) {
|
|
@@ -31238,7 +31253,7 @@ class AudioListener extends Object3D {
|
|
|
31238
31253
|
|
|
31239
31254
|
this.matrixWorld.decompose( _position$1, _quaternion$1, _scale$1 );
|
|
31240
31255
|
|
|
31241
|
-
_orientation$1.set( 0, 0, -
|
|
31256
|
+
_orientation$1.set( 0, 0, -1 ).applyQuaternion( _quaternion$1 );
|
|
31242
31257
|
|
|
31243
31258
|
if ( listener.positionX ) {
|
|
31244
31259
|
|
|
@@ -32364,7 +32379,7 @@ class PropertyBinding {
|
|
|
32364
32379
|
|
|
32365
32380
|
const lastDot = results.nodeName && results.nodeName.lastIndexOf( '.' );
|
|
32366
32381
|
|
|
32367
|
-
if ( lastDot !== undefined && lastDot !== -
|
|
32382
|
+
if ( lastDot !== undefined && lastDot !== -1 ) {
|
|
32368
32383
|
|
|
32369
32384
|
const objectName = results.nodeName.substring( lastDot + 1 );
|
|
32370
32385
|
|
|
@@ -32372,7 +32387,7 @@ class PropertyBinding {
|
|
|
32372
32387
|
// is no way to parse 'foo.bar.baz': 'baz' must be a property, but
|
|
32373
32388
|
// 'bar' could be the objectName, or part of a nodeName (which can
|
|
32374
32389
|
// include '.' characters).
|
|
32375
|
-
if ( _supportedObjectNames.indexOf( objectName ) !== -
|
|
32390
|
+
if ( _supportedObjectNames.indexOf( objectName ) !== -1 ) {
|
|
32376
32391
|
|
|
32377
32392
|
results.nodeName = results.nodeName.substring( 0, lastDot );
|
|
32378
32393
|
results.objectName = objectName;
|
|
@@ -32393,7 +32408,7 @@ class PropertyBinding {
|
|
|
32393
32408
|
|
|
32394
32409
|
static findNode( root, nodeName ) {
|
|
32395
32410
|
|
|
32396
|
-
if ( nodeName === undefined || nodeName === '' || nodeName === '.' || nodeName === -
|
|
32411
|
+
if ( nodeName === undefined || nodeName === '' || nodeName === '.' || nodeName === -1 || nodeName === root.name || nodeName === root.uuid ) {
|
|
32397
32412
|
|
|
32398
32413
|
return root;
|
|
32399
32414
|
|
|
@@ -33336,7 +33351,7 @@ class AnimationAction {
|
|
|
33336
33351
|
this._weightInterpolant = null;
|
|
33337
33352
|
|
|
33338
33353
|
this.loop = LoopRepeat;
|
|
33339
|
-
this._loopCount = -
|
|
33354
|
+
this._loopCount = -1;
|
|
33340
33355
|
|
|
33341
33356
|
// global mixer time when the action is to be started
|
|
33342
33357
|
// it's set back to 'null' upon start of the action
|
|
@@ -33388,7 +33403,7 @@ class AnimationAction {
|
|
|
33388
33403
|
this.enabled = true;
|
|
33389
33404
|
|
|
33390
33405
|
this.time = 0; // restart clip
|
|
33391
|
-
this._loopCount = -
|
|
33406
|
+
this._loopCount = -1;// forget previous loops
|
|
33392
33407
|
this._startTime = null;// forget scheduling
|
|
33393
33408
|
|
|
33394
33409
|
return this.stopFading().stopWarping();
|
|
@@ -33783,7 +33798,7 @@ class AnimationAction {
|
|
|
33783
33798
|
|
|
33784
33799
|
if ( deltaTime === 0 ) {
|
|
33785
33800
|
|
|
33786
|
-
if ( loopCount === -
|
|
33801
|
+
if ( loopCount === -1 ) return time;
|
|
33787
33802
|
|
|
33788
33803
|
return ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time;
|
|
33789
33804
|
|
|
@@ -33791,7 +33806,7 @@ class AnimationAction {
|
|
|
33791
33806
|
|
|
33792
33807
|
if ( loop === LoopOnce ) {
|
|
33793
33808
|
|
|
33794
|
-
if ( loopCount === -
|
|
33809
|
+
if ( loopCount === -1 ) {
|
|
33795
33810
|
|
|
33796
33811
|
// just started
|
|
33797
33812
|
|
|
@@ -33825,14 +33840,14 @@ class AnimationAction {
|
|
|
33825
33840
|
|
|
33826
33841
|
this._mixer.dispatchEvent( {
|
|
33827
33842
|
type: 'finished', action: this,
|
|
33828
|
-
direction: deltaTime < 0 ? -
|
|
33843
|
+
direction: deltaTime < 0 ? -1 : 1
|
|
33829
33844
|
} );
|
|
33830
33845
|
|
|
33831
33846
|
}
|
|
33832
33847
|
|
|
33833
33848
|
} else { // repetitive Repeat or PingPong
|
|
33834
33849
|
|
|
33835
|
-
if ( loopCount === -
|
|
33850
|
+
if ( loopCount === -1 ) {
|
|
33836
33851
|
|
|
33837
33852
|
// just started
|
|
33838
33853
|
|
|
@@ -33878,7 +33893,7 @@ class AnimationAction {
|
|
|
33878
33893
|
|
|
33879
33894
|
this._mixer.dispatchEvent( {
|
|
33880
33895
|
type: 'finished', action: this,
|
|
33881
|
-
direction: deltaTime > 0 ? 1 : -
|
|
33896
|
+
direction: deltaTime > 0 ? 1 : -1
|
|
33882
33897
|
} );
|
|
33883
33898
|
|
|
33884
33899
|
} else {
|
|
@@ -34834,7 +34849,7 @@ class UniformsGroup extends EventDispatcher {
|
|
|
34834
34849
|
|
|
34835
34850
|
const index = this.uniforms.indexOf( uniform );
|
|
34836
34851
|
|
|
34837
|
-
if ( index !== -
|
|
34852
|
+
if ( index !== -1 ) this.uniforms.splice( index, 1 );
|
|
34838
34853
|
|
|
34839
34854
|
return this;
|
|
34840
34855
|
|
|
@@ -35044,7 +35059,7 @@ class Raycaster {
|
|
|
35044
35059
|
} else if ( camera.isOrthographicCamera ) {
|
|
35045
35060
|
|
|
35046
35061
|
this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera
|
|
35047
|
-
this.ray.direction.set( 0, 0, -
|
|
35062
|
+
this.ray.direction.set( 0, 0, -1 ).transformDirection( camera.matrixWorld );
|
|
35048
35063
|
this.camera = camera;
|
|
35049
35064
|
|
|
35050
35065
|
} else {
|
|
@@ -35060,7 +35075,7 @@ class Raycaster {
|
|
|
35060
35075
|
_matrix.identity().extractRotation( controller.matrixWorld );
|
|
35061
35076
|
|
|
35062
35077
|
this.ray.origin.setFromMatrixPosition( controller.matrixWorld );
|
|
35063
|
-
this.ray.direction.set( 0, 0, -
|
|
35078
|
+
this.ray.direction.set( 0, 0, -1 ).applyMatrix4( _matrix );
|
|
35064
35079
|
|
|
35065
35080
|
return this;
|
|
35066
35081
|
|
|
@@ -35190,7 +35205,7 @@ class Spherical {
|
|
|
35190
35205
|
} else {
|
|
35191
35206
|
|
|
35192
35207
|
this.theta = Math.atan2( x, z );
|
|
35193
|
-
this.phi = Math.acos( clamp( y / this.radius, -
|
|
35208
|
+
this.phi = Math.acos( clamp( y / this.radius, -1, 1 ) );
|
|
35194
35209
|
|
|
35195
35210
|
}
|
|
35196
35211
|
|
|
@@ -35654,9 +35669,9 @@ class SpotLightHelper extends Object3D {
|
|
|
35654
35669
|
const positions = [
|
|
35655
35670
|
0, 0, 0, 0, 0, 1,
|
|
35656
35671
|
0, 0, 0, 1, 0, 1,
|
|
35657
|
-
0, 0, 0, -
|
|
35672
|
+
0, 0, 0, -1, 0, 1,
|
|
35658
35673
|
0, 0, 0, 0, 1, 1,
|
|
35659
|
-
0, 0, 0, 0, -
|
|
35674
|
+
0, 0, 0, 0, -1, 1
|
|
35660
35675
|
];
|
|
35661
35676
|
|
|
35662
35677
|
for ( let i = 0, j = 1, l = 32; i < l; i ++, j ++ ) {
|
|
@@ -36427,7 +36442,7 @@ class CameraHelper extends LineSegments {
|
|
|
36427
36442
|
_camera.projectionMatrixInverse.copy( this.camera.projectionMatrixInverse );
|
|
36428
36443
|
|
|
36429
36444
|
// Adjust z values based on coordinate system
|
|
36430
|
-
const nearZ = this.camera.coordinateSystem === WebGLCoordinateSystem ? -
|
|
36445
|
+
const nearZ = this.camera.coordinateSystem === WebGLCoordinateSystem ? -1 : 0;
|
|
36431
36446
|
|
|
36432
36447
|
// center / target
|
|
36433
36448
|
setPoint( 'c', pointMap, geometry, _camera, 0, 0, nearZ );
|
|
@@ -36435,34 +36450,34 @@ class CameraHelper extends LineSegments {
|
|
|
36435
36450
|
|
|
36436
36451
|
// near
|
|
36437
36452
|
|
|
36438
|
-
setPoint( 'n1', pointMap, geometry, _camera, -
|
|
36439
|
-
setPoint( 'n2', pointMap, geometry, _camera, w, -
|
|
36440
|
-
setPoint( 'n3', pointMap, geometry, _camera, -
|
|
36453
|
+
setPoint( 'n1', pointMap, geometry, _camera, -1, -1, nearZ );
|
|
36454
|
+
setPoint( 'n2', pointMap, geometry, _camera, w, -1, nearZ );
|
|
36455
|
+
setPoint( 'n3', pointMap, geometry, _camera, -1, h, nearZ );
|
|
36441
36456
|
setPoint( 'n4', pointMap, geometry, _camera, w, h, nearZ );
|
|
36442
36457
|
|
|
36443
36458
|
// far
|
|
36444
36459
|
|
|
36445
|
-
setPoint( 'f1', pointMap, geometry, _camera, -
|
|
36446
|
-
setPoint( 'f2', pointMap, geometry, _camera, w, -
|
|
36447
|
-
setPoint( 'f3', pointMap, geometry, _camera, -
|
|
36460
|
+
setPoint( 'f1', pointMap, geometry, _camera, -1, -1, 1 );
|
|
36461
|
+
setPoint( 'f2', pointMap, geometry, _camera, w, -1, 1 );
|
|
36462
|
+
setPoint( 'f3', pointMap, geometry, _camera, -1, h, 1 );
|
|
36448
36463
|
setPoint( 'f4', pointMap, geometry, _camera, w, h, 1 );
|
|
36449
36464
|
|
|
36450
36465
|
// up
|
|
36451
36466
|
|
|
36452
36467
|
setPoint( 'u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, nearZ );
|
|
36453
|
-
setPoint( 'u2', pointMap, geometry, _camera, -
|
|
36468
|
+
setPoint( 'u2', pointMap, geometry, _camera, -1 * 0.7, h * 1.1, nearZ );
|
|
36454
36469
|
setPoint( 'u3', pointMap, geometry, _camera, 0, h * 2, nearZ );
|
|
36455
36470
|
|
|
36456
36471
|
// cross
|
|
36457
36472
|
|
|
36458
|
-
setPoint( 'cf1', pointMap, geometry, _camera, -
|
|
36473
|
+
setPoint( 'cf1', pointMap, geometry, _camera, -1, 0, 1 );
|
|
36459
36474
|
setPoint( 'cf2', pointMap, geometry, _camera, w, 0, 1 );
|
|
36460
|
-
setPoint( 'cf3', pointMap, geometry, _camera, 0, -
|
|
36475
|
+
setPoint( 'cf3', pointMap, geometry, _camera, 0, -1, 1 );
|
|
36461
36476
|
setPoint( 'cf4', pointMap, geometry, _camera, 0, h, 1 );
|
|
36462
36477
|
|
|
36463
|
-
setPoint( 'cn1', pointMap, geometry, _camera, -
|
|
36478
|
+
setPoint( 'cn1', pointMap, geometry, _camera, -1, 0, nearZ );
|
|
36464
36479
|
setPoint( 'cn2', pointMap, geometry, _camera, w, 0, nearZ );
|
|
36465
|
-
setPoint( 'cn3', pointMap, geometry, _camera, 0, -
|
|
36480
|
+
setPoint( 'cn3', pointMap, geometry, _camera, 0, -1, nearZ );
|
|
36466
36481
|
setPoint( 'cn4', pointMap, geometry, _camera, 0, h, nearZ );
|
|
36467
36482
|
|
|
36468
36483
|
geometry.getAttribute( 'position' ).needsUpdate = true;
|
|
@@ -36610,7 +36625,7 @@ class Box3Helper extends LineSegments {
|
|
|
36610
36625
|
|
|
36611
36626
|
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 ] );
|
|
36612
36627
|
|
|
36613
|
-
const positions = [ 1, 1, 1, -
|
|
36628
|
+
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 ];
|
|
36614
36629
|
|
|
36615
36630
|
const geometry = new BufferGeometry();
|
|
36616
36631
|
|
|
@@ -36659,7 +36674,7 @@ class PlaneHelper extends Line {
|
|
|
36659
36674
|
|
|
36660
36675
|
const color = hex;
|
|
36661
36676
|
|
|
36662
|
-
const positions = [ 1, -
|
|
36677
|
+
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 ];
|
|
36663
36678
|
|
|
36664
36679
|
const geometry = new BufferGeometry();
|
|
36665
36680
|
geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );
|
|
@@ -36673,7 +36688,7 @@ class PlaneHelper extends Line {
|
|
|
36673
36688
|
|
|
36674
36689
|
this.size = size;
|
|
36675
36690
|
|
|
36676
|
-
const positions2 = [ 1, 1, 0, -
|
|
36691
|
+
const positions2 = [ 1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0 ];
|
|
36677
36692
|
|
|
36678
36693
|
const geometry2 = new BufferGeometry();
|
|
36679
36694
|
geometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );
|
|
@@ -36727,7 +36742,7 @@ class ArrowHelper extends Object3D {
|
|
|
36727
36742
|
_lineGeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) );
|
|
36728
36743
|
|
|
36729
36744
|
_coneGeometry = new CylinderGeometry( 0, 0.5, 1, 5, 1 );
|
|
36730
|
-
_coneGeometry.translate( 0, -
|
|
36745
|
+
_coneGeometry.translate( 0, -0.5, 0 );
|
|
36731
36746
|
|
|
36732
36747
|
}
|
|
36733
36748
|
|
|
@@ -36754,7 +36769,7 @@ class ArrowHelper extends Object3D {
|
|
|
36754
36769
|
|
|
36755
36770
|
this.quaternion.set( 0, 0, 0, 1 );
|
|
36756
36771
|
|
|
36757
|
-
} else if ( dir.y < -
|
|
36772
|
+
} else if ( dir.y < -0.99999 ) {
|
|
36758
36773
|
|
|
36759
36774
|
this.quaternion.set( 1, 0, 0, 0 );
|
|
36760
36775
|
|
|
@@ -37165,7 +37180,7 @@ class Controls extends EventDispatcher {
|
|
|
37165
37180
|
|
|
37166
37181
|
this.enabled = true;
|
|
37167
37182
|
|
|
37168
|
-
this.state = -
|
|
37183
|
+
this.state = -1;
|
|
37169
37184
|
|
|
37170
37185
|
this.keys = {};
|
|
37171
37186
|
this.mouseButtons = { LEFT: null, MIDDLE: null, RIGHT: null };
|