x_ite 9.5.0 → 9.5.2
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/README.md +1 -1
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +14 -14
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +25 -25
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -13
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +18 -18
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +33 -33
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +32 -34
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +9 -9
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +28 -28
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +25 -27
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +101 -66
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +20 -22
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +19 -21
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +38 -38
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +24 -24
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjection.js +15 -15
- package/dist/assets/components/TextureProjection.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +40 -36
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +19 -19
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +97 -44
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.d.ts +1 -1
- package/dist/x_ite.js +862 -653
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.min.mjs +1 -1
- package/dist/x_ite.mjs +862 -653
- package/dist/x_ite.zip +0 -0
- package/package.json +2 -2
package/dist/x_ite.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* X_ITE v9.5.
|
|
1
|
+
/* X_ITE v9.5.2 */var __webpack_modules__ = ({
|
|
2
2
|
|
|
3
|
-
/***/
|
|
3
|
+
/***/ 347:
|
|
4
4
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
5
5
|
|
|
6
|
-
/* provided dependency */ var jQuery = __webpack_require__(
|
|
6
|
+
/* provided dependency */ var jQuery = __webpack_require__(575);
|
|
7
7
|
/**
|
|
8
8
|
* @preserve jquery.fullscreen 1.1.5
|
|
9
9
|
* https://github.com/code-lts/jquery-fullscreen-plugin
|
|
@@ -199,7 +199,7 @@ installFullScreenHandlers();
|
|
|
199
199
|
|
|
200
200
|
/***/ }),
|
|
201
201
|
|
|
202
|
-
/***/
|
|
202
|
+
/***/ 431:
|
|
203
203
|
/***/ ((module, exports, __webpack_require__) => {
|
|
204
204
|
|
|
205
205
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -213,7 +213,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
213
213
|
(function (factory) {
|
|
214
214
|
if ( true ) {
|
|
215
215
|
// AMD. Register as an anonymous module.
|
|
216
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(
|
|
216
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(575)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
217
217
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
218
218
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
219
219
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
@@ -424,7 +424,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
424
424
|
|
|
425
425
|
/***/ }),
|
|
426
426
|
|
|
427
|
-
/***/
|
|
427
|
+
/***/ 575:
|
|
428
428
|
/***/ (function(module, exports) {
|
|
429
429
|
|
|
430
430
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -11148,7 +11148,7 @@ return jQuery;
|
|
|
11148
11148
|
|
|
11149
11149
|
/***/ }),
|
|
11150
11150
|
|
|
11151
|
-
/***/
|
|
11151
|
+
/***/ 932:
|
|
11152
11152
|
/***/ ((module) => {
|
|
11153
11153
|
|
|
11154
11154
|
/**
|
|
@@ -15927,7 +15927,7 @@ if (true) {
|
|
|
15927
15927
|
|
|
15928
15928
|
/***/ }),
|
|
15929
15929
|
|
|
15930
|
-
/***/
|
|
15930
|
+
/***/ 319:
|
|
15931
15931
|
/***/ (function(__unused_webpack_module, exports) {
|
|
15932
15932
|
|
|
15933
15933
|
|
|
@@ -19172,7 +19172,7 @@ if (true) {
|
|
|
19172
19172
|
|
|
19173
19173
|
/***/ }),
|
|
19174
19174
|
|
|
19175
|
-
/***/
|
|
19175
|
+
/***/ 280:
|
|
19176
19176
|
/***/ (function(module, exports) {
|
|
19177
19177
|
|
|
19178
19178
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -20299,7 +20299,7 @@ Object .defineProperty (Namespace, "add",
|
|
|
20299
20299
|
}
|
|
20300
20300
|
else
|
|
20301
20301
|
{
|
|
20302
|
-
const X3D = window [Symbol .for ("X_ITE.X3D-9.5.
|
|
20302
|
+
const X3D = window [Symbol .for ("X_ITE.X3D-9.5.2")];
|
|
20303
20303
|
|
|
20304
20304
|
if (X3D)
|
|
20305
20305
|
X3D [name] = module;
|
|
@@ -24558,15 +24558,15 @@ function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double)
|
|
|
24558
24558
|
|
|
24559
24559
|
return function (translation, rotation, scale, scaleOrientation, center)
|
|
24560
24560
|
{
|
|
24561
|
-
args .push (translation ?.getValue ()
|
|
24562
|
-
rotation ?.getValue ()
|
|
24563
|
-
scale ?.getValue ()
|
|
24564
|
-
scaleOrientation ?.getValue ()
|
|
24565
|
-
center ?.getValue ()
|
|
24561
|
+
args .push (translation ?.getValue (),
|
|
24562
|
+
rotation ?.getValue (),
|
|
24563
|
+
scale ?.getValue (),
|
|
24564
|
+
scaleOrientation ?.getValue (),
|
|
24565
|
+
center ?.getValue ());
|
|
24566
24566
|
|
|
24567
24567
|
for (let i = args .length - 1; i > -1; -- i)
|
|
24568
24568
|
{
|
|
24569
|
-
if (args [i]
|
|
24569
|
+
if (args [i])
|
|
24570
24570
|
break;
|
|
24571
24571
|
|
|
24572
24572
|
args .pop ();
|
|
@@ -24583,15 +24583,15 @@ function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double)
|
|
|
24583
24583
|
|
|
24584
24584
|
return function (translation, rotation, scale, scaleOrientation, center)
|
|
24585
24585
|
{
|
|
24586
|
-
args .push (translation ?.getValue ()
|
|
24587
|
-
rotation ?.getValue ()
|
|
24588
|
-
scale ?.getValue ()
|
|
24589
|
-
scaleOrientation ?.getValue ()
|
|
24590
|
-
center ?.getValue ()
|
|
24586
|
+
args .push (translation ?.getValue (),
|
|
24587
|
+
rotation ?.getValue (),
|
|
24588
|
+
scale ?.getValue (),
|
|
24589
|
+
scaleOrientation ?.getValue (),
|
|
24590
|
+
center ?.getValue ());
|
|
24591
24591
|
|
|
24592
24592
|
for (let i = args .length - 1; i > -1; -- i)
|
|
24593
24593
|
{
|
|
24594
|
-
if (args [i]
|
|
24594
|
+
if (args [i])
|
|
24595
24595
|
break;
|
|
24596
24596
|
|
|
24597
24597
|
args .pop ();
|
|
@@ -25843,110 +25843,90 @@ Object .assign (Matrix3 .prototype,
|
|
|
25843
25843
|
|
|
25844
25844
|
return function (translation, rotation, scale, scaleOrientation, center)
|
|
25845
25845
|
{
|
|
25846
|
+
this .identity ();
|
|
25847
|
+
|
|
25846
25848
|
switch (arguments .length)
|
|
25847
25849
|
{
|
|
25848
|
-
case 0:
|
|
25849
|
-
{
|
|
25850
|
-
this .identity ();
|
|
25851
|
-
break;
|
|
25852
|
-
}
|
|
25853
25850
|
case 1:
|
|
25854
25851
|
{
|
|
25855
|
-
if (translation
|
|
25852
|
+
if (translation)
|
|
25853
|
+
this .translate (translation);
|
|
25856
25854
|
|
|
25857
|
-
this .identity ();
|
|
25858
|
-
this .translate (translation);
|
|
25859
25855
|
break;
|
|
25860
25856
|
}
|
|
25861
25857
|
case 2:
|
|
25862
25858
|
{
|
|
25863
|
-
if (translation
|
|
25864
|
-
|
|
25865
|
-
|
|
25866
|
-
this .identity ();
|
|
25867
|
-
this .translate (translation);
|
|
25859
|
+
if (translation)
|
|
25860
|
+
this .translate (translation);
|
|
25868
25861
|
|
|
25869
|
-
if (rotation
|
|
25862
|
+
if (rotation)
|
|
25870
25863
|
this .rotate (rotation);
|
|
25871
25864
|
|
|
25872
25865
|
break;
|
|
25873
25866
|
}
|
|
25874
25867
|
case 3:
|
|
25875
25868
|
{
|
|
25876
|
-
if (translation
|
|
25877
|
-
|
|
25878
|
-
if (scale === null) scale = Numbers_Vector2 .One;
|
|
25869
|
+
if (translation)
|
|
25870
|
+
this .translate (translation);
|
|
25879
25871
|
|
|
25880
|
-
|
|
25881
|
-
this .translate (translation);
|
|
25882
|
-
|
|
25883
|
-
if (rotation !== 0)
|
|
25872
|
+
if (rotation)
|
|
25884
25873
|
this .rotate (rotation);
|
|
25885
25874
|
|
|
25886
|
-
if (!
|
|
25875
|
+
if (scale && !scale .equals (Numbers_Vector2 .One))
|
|
25887
25876
|
this .scale (scale);
|
|
25888
25877
|
|
|
25889
25878
|
break;
|
|
25890
25879
|
}
|
|
25891
25880
|
case 4:
|
|
25892
25881
|
{
|
|
25893
|
-
if (translation
|
|
25894
|
-
|
|
25895
|
-
if (scale === null) scale = Numbers_Vector2 .One;
|
|
25896
|
-
if (scaleOrientation === null) scaleOrientation = 0;
|
|
25897
|
-
|
|
25898
|
-
this .identity ();
|
|
25899
|
-
this .translate (translation);
|
|
25882
|
+
if (translation)
|
|
25883
|
+
this .translate (translation);
|
|
25900
25884
|
|
|
25901
|
-
if (rotation
|
|
25885
|
+
if (rotation)
|
|
25902
25886
|
this .rotate (rotation);
|
|
25903
25887
|
|
|
25904
|
-
if (!
|
|
25888
|
+
if (scale && !scale .equals (Numbers_Vector2 .One))
|
|
25905
25889
|
{
|
|
25906
|
-
|
|
25907
|
-
|
|
25908
|
-
if (hasScaleOrientation)
|
|
25890
|
+
if (scaleOrientation)
|
|
25909
25891
|
{
|
|
25910
25892
|
this .rotate (scaleOrientation);
|
|
25911
25893
|
this .scale (scale);
|
|
25912
25894
|
this .rotate (-scaleOrientation);
|
|
25913
25895
|
}
|
|
25914
25896
|
else
|
|
25897
|
+
{
|
|
25915
25898
|
this .scale (scale);
|
|
25899
|
+
}
|
|
25916
25900
|
}
|
|
25917
25901
|
|
|
25918
25902
|
break;
|
|
25919
25903
|
}
|
|
25920
25904
|
case 5:
|
|
25921
25905
|
{
|
|
25922
|
-
if (translation === null) translation = Numbers_Vector2 .Zero;
|
|
25923
|
-
if (rotation === null) rotation = 0;
|
|
25924
|
-
if (scale === null) scale = Numbers_Vector2 .One;
|
|
25925
|
-
if (scaleOrientation === null) scaleOrientation = 0;
|
|
25926
|
-
if (center === null) center = Numbers_Vector2 .Zero;
|
|
25927
|
-
|
|
25928
25906
|
// P' = T * C * R * SR * S * -SR * -C * P
|
|
25929
|
-
|
|
25930
|
-
|
|
25907
|
+
if (translation)
|
|
25908
|
+
this .translate (translation);
|
|
25931
25909
|
|
|
25932
|
-
const hasCenter = !
|
|
25910
|
+
const hasCenter = center && !center .equals (Numbers_Vector2 .Zero);
|
|
25933
25911
|
|
|
25934
25912
|
if (hasCenter)
|
|
25935
25913
|
this .translate (center);
|
|
25936
25914
|
|
|
25937
|
-
if (rotation
|
|
25915
|
+
if (rotation)
|
|
25938
25916
|
this .rotate (rotation);
|
|
25939
25917
|
|
|
25940
|
-
if (!
|
|
25918
|
+
if (scale && !scale .equals (Numbers_Vector2 .One))
|
|
25941
25919
|
{
|
|
25942
|
-
if (scaleOrientation
|
|
25920
|
+
if (scaleOrientation)
|
|
25943
25921
|
{
|
|
25944
25922
|
this .rotate (scaleOrientation);
|
|
25945
25923
|
this .scale (scale);
|
|
25946
25924
|
this .rotate (-scaleOrientation);
|
|
25947
25925
|
}
|
|
25948
25926
|
else
|
|
25927
|
+
{
|
|
25949
25928
|
this .scale (scale);
|
|
25929
|
+
}
|
|
25950
25930
|
}
|
|
25951
25931
|
|
|
25952
25932
|
if (hasCenter)
|
|
@@ -25968,24 +25948,10 @@ Object .assign (Matrix3 .prototype,
|
|
|
25968
25948
|
})(),
|
|
25969
25949
|
get: (() =>
|
|
25970
25950
|
{
|
|
25971
|
-
const
|
|
25972
|
-
dummyTranslation = new Numbers_Vector2 (),
|
|
25973
|
-
dummyRotation = new Numbers_Vector3 (),
|
|
25974
|
-
dummyScale = new Numbers_Vector2 (),
|
|
25975
|
-
dummyScaleOrientation = new Numbers_Vector3 (),
|
|
25976
|
-
dummyCenter = new Numbers_Vector2 (),
|
|
25977
|
-
rotMatrix = new Numbers_Matrix2 (),
|
|
25978
|
-
soMatrix = new Numbers_Matrix2 (),
|
|
25979
|
-
c = new Numbers_Vector2 ();
|
|
25951
|
+
const c = new Numbers_Vector2 ();
|
|
25980
25952
|
|
|
25981
25953
|
return function (translation, rotation, scale, scaleOrientation, center)
|
|
25982
25954
|
{
|
|
25983
|
-
if (translation === null) translation = dummyTranslation;
|
|
25984
|
-
if (rotation === null) rotation = dummyRotation;
|
|
25985
|
-
if (scale === null) scale = dummyScale;
|
|
25986
|
-
if (scaleOrientation === null) scaleOrientation = dummyScaleOrientation;
|
|
25987
|
-
if (center === null) center = dummyCenter;
|
|
25988
|
-
|
|
25989
25955
|
switch (arguments .length)
|
|
25990
25956
|
{
|
|
25991
25957
|
case 1:
|
|
@@ -25994,42 +25960,26 @@ Object .assign (Matrix3 .prototype,
|
|
|
25994
25960
|
break;
|
|
25995
25961
|
}
|
|
25996
25962
|
case 2:
|
|
25997
|
-
{
|
|
25998
|
-
this .factor (translation, rotMatrix, dummyScale, soMatrix);
|
|
25999
|
-
|
|
26000
|
-
rotation [0] = rotMatrix [0];
|
|
26001
|
-
rotation [1] = rotMatrix [1];
|
|
26002
|
-
rotation [2] = Math .atan2 (rotMatrix [1], rotMatrix [0]);
|
|
26003
|
-
break;
|
|
26004
|
-
}
|
|
26005
25963
|
case 3:
|
|
26006
|
-
{
|
|
26007
|
-
this .factor (translation, rotMatrix, scale, soMatrix);
|
|
26008
|
-
|
|
26009
|
-
rotation [0] = rotMatrix [0];
|
|
26010
|
-
rotation [1] = rotMatrix [1];
|
|
26011
|
-
rotation [2] = Math .atan2 (rotMatrix [1], rotMatrix [0]);
|
|
26012
|
-
break;
|
|
26013
|
-
}
|
|
26014
25964
|
case 4:
|
|
26015
25965
|
{
|
|
26016
|
-
this .factor (translation,
|
|
26017
|
-
|
|
26018
|
-
rotation [0] = rotMatrix [0];
|
|
26019
|
-
rotation [1] = rotMatrix [1];
|
|
26020
|
-
rotation [2] = Math .atan2 (rotMatrix [1], rotMatrix [0]);
|
|
26021
|
-
|
|
26022
|
-
scaleOrientation [0] = soMatrix [0];
|
|
26023
|
-
scaleOrientation [1] = soMatrix [1];
|
|
26024
|
-
scaleOrientation [2] = Math .atan2 (soMatrix [1], soMatrix [0]);
|
|
25966
|
+
this .factor (translation, rotation, scale, scaleOrientation);
|
|
26025
25967
|
break;
|
|
26026
25968
|
}
|
|
26027
25969
|
case 5:
|
|
26028
25970
|
{
|
|
26029
|
-
|
|
26030
|
-
|
|
26031
|
-
|
|
26032
|
-
|
|
25971
|
+
if (center)
|
|
25972
|
+
{
|
|
25973
|
+
m .set (c .assign (center) .negate ());
|
|
25974
|
+
m .multLeft (this);
|
|
25975
|
+
m .translate (center);
|
|
25976
|
+
m .get (translation, rotation, scale, scaleOrientation);
|
|
25977
|
+
}
|
|
25978
|
+
else
|
|
25979
|
+
{
|
|
25980
|
+
this .factor (translation, rotation, scale, scaleOrientation);
|
|
25981
|
+
}
|
|
25982
|
+
|
|
26033
25983
|
break;
|
|
26034
25984
|
}
|
|
26035
25985
|
}
|
|
@@ -26038,8 +25988,9 @@ Object .assign (Matrix3 .prototype,
|
|
|
26038
25988
|
factor: (() =>
|
|
26039
25989
|
{
|
|
26040
25990
|
const
|
|
25991
|
+
s = new Numbers_Vector2 (),
|
|
26041
25992
|
si = new Numbers_Matrix2 (),
|
|
26042
|
-
|
|
25993
|
+
so = new Numbers_Matrix2 (),
|
|
26043
25994
|
b = new Numbers_Matrix2 ();
|
|
26044
25995
|
|
|
26045
25996
|
const eigen = { values: [ ], vectors: [[ ], [ ]] };
|
|
@@ -26047,7 +25998,7 @@ Object .assign (Matrix3 .prototype,
|
|
|
26047
25998
|
return function (translation, rotation, scale, scaleOrientation)
|
|
26048
25999
|
{
|
|
26049
26000
|
// (1) Get translation.
|
|
26050
|
-
translation
|
|
26001
|
+
translation ?.set (this [6], this [7]);
|
|
26051
26002
|
|
|
26052
26003
|
// (2) Create 3x3 matrix.
|
|
26053
26004
|
const a = this .submatrix;
|
|
@@ -26062,19 +26013,35 @@ Object .assign (Matrix3 .prototype,
|
|
|
26062
26013
|
|
|
26063
26014
|
// Find min / max eigenvalues and do ratio test to determine singularity.
|
|
26064
26015
|
|
|
26065
|
-
|
|
26066
|
-
|
|
26016
|
+
so .set (e .vectors [0] [0], e .vectors [1] [0],
|
|
26017
|
+
e .vectors [0] [1], e .vectors [1] [1]);
|
|
26067
26018
|
|
|
26068
|
-
|
|
26019
|
+
if (scaleOrientation)
|
|
26020
|
+
{
|
|
26021
|
+
scaleOrientation [0] = so [0];
|
|
26022
|
+
scaleOrientation [1] = so [1];
|
|
26023
|
+
scaleOrientation [2] = Math .atan2 (so [1], so [0]);
|
|
26024
|
+
}
|
|
26025
|
+
|
|
26026
|
+
// Compute s = sqrt(eigen values), with sign. Set si = s-inverse
|
|
26027
|
+
|
|
26028
|
+
s .set (det_sign * Math .sqrt (e .values [0]),
|
|
26029
|
+
det_sign * Math .sqrt (e .values [1]));
|
|
26069
26030
|
|
|
26070
|
-
scale
|
|
26071
|
-
scale .y = det_sign * Math .sqrt (e .values [1]);
|
|
26031
|
+
scale ?.assign (s);
|
|
26072
26032
|
|
|
26073
|
-
|
|
26074
|
-
|
|
26033
|
+
if (rotation)
|
|
26034
|
+
{
|
|
26035
|
+
si [0] = 1 / s .x;
|
|
26036
|
+
si [3] = 1 / s .y;
|
|
26037
|
+
|
|
26038
|
+
// (5) Compute U = !R ~S R A.
|
|
26039
|
+
a .multLeft (so) .multLeft (si) .multLeft (so .transpose ());
|
|
26075
26040
|
|
|
26076
|
-
|
|
26077
|
-
|
|
26041
|
+
rotation [0] = a [0];
|
|
26042
|
+
rotation [1] = a [1];
|
|
26043
|
+
rotation [2] = Math .atan2 (a [1], a [0]);
|
|
26044
|
+
}
|
|
26078
26045
|
};
|
|
26079
26046
|
})(),
|
|
26080
26047
|
determinant2 ()
|
|
@@ -26506,15 +26473,11 @@ function SFMatrix3Template (TypeName, double)
|
|
|
26506
26473
|
|
|
26507
26474
|
return function (translation, rotation, scale, scaleOrientation, center)
|
|
26508
26475
|
{
|
|
26509
|
-
args .push (translation ?.getValue ()
|
|
26510
|
-
rotation ?? null,
|
|
26511
|
-
scale ?.getValue () ?? null,
|
|
26512
|
-
scaleOrientation ?? null,
|
|
26513
|
-
center ?.getValue () ?? null);
|
|
26476
|
+
args .push (translation ?.getValue (), rotation, scale ?.getValue (), scaleOrientation, center ?.getValue ());
|
|
26514
26477
|
|
|
26515
26478
|
for (let i = args .length - 1; i > -1; -- i)
|
|
26516
26479
|
{
|
|
26517
|
-
if (args [i]
|
|
26480
|
+
if (args [i])
|
|
26518
26481
|
break;
|
|
26519
26482
|
|
|
26520
26483
|
args .pop ();
|
|
@@ -28203,110 +28166,90 @@ Object .assign (Matrix4_Matrix4 .prototype,
|
|
|
28203
28166
|
|
|
28204
28167
|
return function (translation, rotation, scale, scaleOrientation, center)
|
|
28205
28168
|
{
|
|
28169
|
+
this .identity ();
|
|
28170
|
+
|
|
28206
28171
|
switch (arguments .length)
|
|
28207
28172
|
{
|
|
28208
|
-
case 0:
|
|
28209
|
-
{
|
|
28210
|
-
this .identity ();
|
|
28211
|
-
break;
|
|
28212
|
-
}
|
|
28213
28173
|
case 1:
|
|
28214
28174
|
{
|
|
28215
|
-
if (translation
|
|
28175
|
+
if (translation)
|
|
28176
|
+
this .translate (translation);
|
|
28216
28177
|
|
|
28217
|
-
this .identity ();
|
|
28218
|
-
this .translate (translation);
|
|
28219
28178
|
break;
|
|
28220
28179
|
}
|
|
28221
28180
|
case 2:
|
|
28222
28181
|
{
|
|
28223
|
-
if (translation
|
|
28224
|
-
|
|
28182
|
+
if (translation)
|
|
28183
|
+
this .translate (translation);
|
|
28225
28184
|
|
|
28226
|
-
|
|
28227
|
-
this .translate (translation);
|
|
28228
|
-
|
|
28229
|
-
if (! rotation .equals (Numbers_Rotation4 .Identity))
|
|
28185
|
+
if (rotation && !rotation .equals (Numbers_Rotation4 .Identity))
|
|
28230
28186
|
this .rotate (rotation);
|
|
28231
28187
|
|
|
28232
28188
|
break;
|
|
28233
28189
|
}
|
|
28234
28190
|
case 3:
|
|
28235
28191
|
{
|
|
28236
|
-
if (translation
|
|
28237
|
-
|
|
28238
|
-
if (scale === null) scale = Numbers_Vector3 .One;
|
|
28239
|
-
|
|
28240
|
-
this .identity ();
|
|
28241
|
-
this .translate (translation);
|
|
28192
|
+
if (translation)
|
|
28193
|
+
this .translate (translation);
|
|
28242
28194
|
|
|
28243
|
-
if (!
|
|
28195
|
+
if (rotation && !rotation .equals (Numbers_Rotation4 .Identity))
|
|
28244
28196
|
this .rotate (rotation);
|
|
28245
28197
|
|
|
28246
|
-
if (!
|
|
28247
|
-
this .scale
|
|
28198
|
+
if (scale && !scale .equals (Numbers_Vector3 .One))
|
|
28199
|
+
this .scale (scale);
|
|
28248
28200
|
|
|
28249
28201
|
break;
|
|
28250
28202
|
}
|
|
28251
28203
|
case 4:
|
|
28252
28204
|
{
|
|
28253
|
-
if (translation
|
|
28254
|
-
|
|
28255
|
-
if (scale === null) scale = Numbers_Vector3 .One;
|
|
28256
|
-
if (scaleOrientation === null) scaleOrientation = Numbers_Rotation4 .Identity;
|
|
28257
|
-
|
|
28258
|
-
this .identity ();
|
|
28259
|
-
this .translate (translation);
|
|
28205
|
+
if (translation)
|
|
28206
|
+
this .translate (translation);
|
|
28260
28207
|
|
|
28261
|
-
if (!
|
|
28208
|
+
if (rotation && !rotation .equals (Numbers_Rotation4 .Identity))
|
|
28262
28209
|
this .rotate (rotation);
|
|
28263
28210
|
|
|
28264
|
-
if (!
|
|
28211
|
+
if (scale && !scale .equals (Numbers_Vector3 .One))
|
|
28265
28212
|
{
|
|
28266
|
-
|
|
28267
|
-
|
|
28268
|
-
if (hasScaleOrientation)
|
|
28213
|
+
if (scaleOrientation && !scaleOrientation .equals (Numbers_Rotation4 .Identity))
|
|
28269
28214
|
{
|
|
28270
28215
|
this .rotate (scaleOrientation);
|
|
28271
28216
|
this .scale (scale);
|
|
28272
28217
|
this .rotate (invScaleOrientation .assign (scaleOrientation) .inverse ());
|
|
28273
28218
|
}
|
|
28274
28219
|
else
|
|
28220
|
+
{
|
|
28275
28221
|
this .scale (scale);
|
|
28222
|
+
}
|
|
28276
28223
|
}
|
|
28277
28224
|
|
|
28278
28225
|
break;
|
|
28279
28226
|
}
|
|
28280
28227
|
case 5:
|
|
28281
28228
|
{
|
|
28282
|
-
if (translation === null) translation = Numbers_Vector3 .Zero;
|
|
28283
|
-
if (rotation === null) rotation = Numbers_Rotation4 .Identity;
|
|
28284
|
-
if (scale === null) scale = Numbers_Vector3 .One;
|
|
28285
|
-
if (scaleOrientation === null) scaleOrientation = Numbers_Rotation4 .Identity;
|
|
28286
|
-
if (center === null) center = Numbers_Vector3 .Zero;
|
|
28287
|
-
|
|
28288
28229
|
// P' = T * C * R * SR * S * -SR * -C * P
|
|
28289
|
-
|
|
28290
|
-
|
|
28230
|
+
if (translation)
|
|
28231
|
+
this .translate (translation);
|
|
28291
28232
|
|
|
28292
|
-
const hasCenter = !
|
|
28233
|
+
const hasCenter = center && !center .equals (Numbers_Vector3 .Zero);
|
|
28293
28234
|
|
|
28294
28235
|
if (hasCenter)
|
|
28295
28236
|
this .translate (center);
|
|
28296
28237
|
|
|
28297
|
-
if (!
|
|
28238
|
+
if (rotation && !rotation .equals (Numbers_Rotation4 .Identity))
|
|
28298
28239
|
this .rotate (rotation);
|
|
28299
28240
|
|
|
28300
|
-
if (!
|
|
28241
|
+
if (scale && !scale .equals (Numbers_Vector3 .One))
|
|
28301
28242
|
{
|
|
28302
|
-
if (!
|
|
28243
|
+
if (scaleOrientation && !scaleOrientation .equals (Numbers_Rotation4 .Identity))
|
|
28303
28244
|
{
|
|
28304
28245
|
this .rotate (scaleOrientation);
|
|
28305
28246
|
this .scale (scale);
|
|
28306
28247
|
this .rotate (invScaleOrientation .assign (scaleOrientation) .inverse ());
|
|
28307
28248
|
}
|
|
28308
28249
|
else
|
|
28250
|
+
{
|
|
28309
28251
|
this .scale (scale);
|
|
28252
|
+
}
|
|
28310
28253
|
}
|
|
28311
28254
|
|
|
28312
28255
|
if (hasCenter)
|
|
@@ -28328,24 +28271,10 @@ Object .assign (Matrix4_Matrix4 .prototype,
|
|
|
28328
28271
|
})(),
|
|
28329
28272
|
get: (() =>
|
|
28330
28273
|
{
|
|
28331
|
-
const
|
|
28332
|
-
dummyTranslation = new Numbers_Vector3 (),
|
|
28333
|
-
dummyRotation = new Numbers_Rotation4 (),
|
|
28334
|
-
dummyScale = new Numbers_Vector3 (),
|
|
28335
|
-
dummyScaleOrientation = new Numbers_Rotation4 (),
|
|
28336
|
-
dummyCenter = new Numbers_Vector3 (),
|
|
28337
|
-
rot = new Numbers_Matrix3 (),
|
|
28338
|
-
so = new Numbers_Matrix3 (),
|
|
28339
|
-
c = new Numbers_Vector3 ();
|
|
28274
|
+
const c = new Numbers_Vector3 ();
|
|
28340
28275
|
|
|
28341
28276
|
return function (translation, rotation, scale, scaleOrientation, center)
|
|
28342
28277
|
{
|
|
28343
|
-
if (translation === null) translation = dummyTranslation;
|
|
28344
|
-
if (rotation === null) rotation = dummyRotation;
|
|
28345
|
-
if (scale === null) scale = dummyScale;
|
|
28346
|
-
if (scaleOrientation === null) scaleOrientation = dummyScaleOrientation;
|
|
28347
|
-
if (center === null) center = dummyCenter;
|
|
28348
|
-
|
|
28349
28278
|
switch (arguments .length)
|
|
28350
28279
|
{
|
|
28351
28280
|
case 1:
|
|
@@ -28354,30 +28283,26 @@ Object .assign (Matrix4_Matrix4 .prototype,
|
|
|
28354
28283
|
break;
|
|
28355
28284
|
}
|
|
28356
28285
|
case 2:
|
|
28357
|
-
{
|
|
28358
|
-
this .factor (translation, rot, dummyScale, so);
|
|
28359
|
-
rotation .setMatrix (rot);
|
|
28360
|
-
break;
|
|
28361
|
-
}
|
|
28362
28286
|
case 3:
|
|
28363
|
-
{
|
|
28364
|
-
this .factor (translation, rot, scale, so);
|
|
28365
|
-
rotation .setMatrix (rot);
|
|
28366
|
-
break;
|
|
28367
|
-
}
|
|
28368
28287
|
case 4:
|
|
28369
28288
|
{
|
|
28370
|
-
this .factor (translation,
|
|
28371
|
-
rotation .setMatrix (rot);
|
|
28372
|
-
scaleOrientation .setMatrix (so);
|
|
28289
|
+
this .factor (translation, rotation, scale, scaleOrientation);
|
|
28373
28290
|
break;
|
|
28374
28291
|
}
|
|
28375
28292
|
case 5:
|
|
28376
28293
|
{
|
|
28377
|
-
|
|
28378
|
-
|
|
28379
|
-
|
|
28380
|
-
|
|
28294
|
+
if (center)
|
|
28295
|
+
{
|
|
28296
|
+
Matrix4_m .set (c .assign (center) .negate ());
|
|
28297
|
+
Matrix4_m .multLeft (this);
|
|
28298
|
+
Matrix4_m .translate (center);
|
|
28299
|
+
Matrix4_m .get (translation, rotation, scale, scaleOrientation);
|
|
28300
|
+
}
|
|
28301
|
+
else
|
|
28302
|
+
{
|
|
28303
|
+
this .factor (translation, rotation, scale, scaleOrientation);
|
|
28304
|
+
}
|
|
28305
|
+
|
|
28381
28306
|
break;
|
|
28382
28307
|
}
|
|
28383
28308
|
}
|
|
@@ -28423,8 +28348,9 @@ Object .assign (Matrix4_Matrix4 .prototype,
|
|
|
28423
28348
|
factor: (() =>
|
|
28424
28349
|
{
|
|
28425
28350
|
const
|
|
28351
|
+
s = new Numbers_Vector3 (),
|
|
28426
28352
|
si = new Numbers_Matrix3 (),
|
|
28427
|
-
|
|
28353
|
+
so = new Numbers_Matrix3 (),
|
|
28428
28354
|
b = new Numbers_Matrix3 ();
|
|
28429
28355
|
|
|
28430
28356
|
const eigen = { values: [ ], vectors: [[ ], [ ], [ ]] };
|
|
@@ -28432,7 +28358,7 @@ Object .assign (Matrix4_Matrix4 .prototype,
|
|
|
28432
28358
|
return function (translation, rotation, scale, scaleOrientation)
|
|
28433
28359
|
{
|
|
28434
28360
|
// (1) Get translation.
|
|
28435
|
-
translation
|
|
28361
|
+
translation ?.set (this [12], this [13], this [14]);
|
|
28436
28362
|
|
|
28437
28363
|
// (2) Create 3x3 matrix.
|
|
28438
28364
|
const a = this .submatrix;
|
|
@@ -28447,22 +28373,29 @@ Object .assign (Matrix4_Matrix4 .prototype,
|
|
|
28447
28373
|
|
|
28448
28374
|
// Find min / max eigenvalues and do ratio test to determine singularity.
|
|
28449
28375
|
|
|
28450
|
-
|
|
28451
|
-
|
|
28452
|
-
|
|
28376
|
+
so .set (e .vectors [0] [0], e .vectors [1] [0], e .vectors [2] [0],
|
|
28377
|
+
e .vectors [0] [1], e .vectors [1] [1], e .vectors [2] [1],
|
|
28378
|
+
e .vectors [0] [2], e .vectors [1] [2], e .vectors [2] [2]);
|
|
28379
|
+
|
|
28380
|
+
scaleOrientation ?.setMatrix (so);
|
|
28453
28381
|
|
|
28454
|
-
// Compute s = sqrt(
|
|
28382
|
+
// Compute s = sqrt(eigen values), with sign. Set si = s-inverse
|
|
28455
28383
|
|
|
28456
|
-
|
|
28457
|
-
|
|
28458
|
-
|
|
28384
|
+
s .set (det_sign * Math .sqrt (e .values [0]),
|
|
28385
|
+
det_sign * Math .sqrt (e .values [1]),
|
|
28386
|
+
det_sign * Math .sqrt (e .values [2]));
|
|
28459
28387
|
|
|
28460
|
-
|
|
28461
|
-
|
|
28462
|
-
|
|
28388
|
+
scale ?.assign (s);
|
|
28389
|
+
|
|
28390
|
+
if (rotation)
|
|
28391
|
+
{
|
|
28392
|
+
si [0] = 1 / s .x;
|
|
28393
|
+
si [4] = 1 / s .y;
|
|
28394
|
+
si [8] = 1 / s .z;
|
|
28463
28395
|
|
|
28464
|
-
|
|
28465
|
-
|
|
28396
|
+
// (5) Compute U = !R ~S R A.
|
|
28397
|
+
rotation .setMatrix (a .multLeft (so) .multLeft (si) .multLeft (so .transpose ()));
|
|
28398
|
+
}
|
|
28466
28399
|
};
|
|
28467
28400
|
})(),
|
|
28468
28401
|
determinant3 ()
|
|
@@ -34266,7 +34199,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
|
|
|
34266
34199
|
x_ite_Namespace .add ("X3DBaseNode", "x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
|
|
34267
34200
|
/* harmony default export */ const Base_X3DBaseNode = (X3DBaseNode_default_);
|
|
34268
34201
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Legacy.js
|
|
34269
|
-
/* provided dependency */ var $ = __webpack_require__(
|
|
34202
|
+
/* provided dependency */ var $ = __webpack_require__(575);
|
|
34270
34203
|
/*******************************************************************************
|
|
34271
34204
|
*
|
|
34272
34205
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -34403,7 +34336,7 @@ x_ite_Namespace .add ("Legacy", "x_ite/Browser/Legacy", Legacy_default_);
|
|
|
34403
34336
|
*
|
|
34404
34337
|
******************************************************************************/
|
|
34405
34338
|
|
|
34406
|
-
const BROWSER_VERSION_default_ = "9.5.
|
|
34339
|
+
const BROWSER_VERSION_default_ = "9.5.2";
|
|
34407
34340
|
;
|
|
34408
34341
|
|
|
34409
34342
|
x_ite_Namespace .add ("BROWSER_VERSION", "x_ite/BROWSER_VERSION", BROWSER_VERSION_default_);
|
|
@@ -38124,81 +38057,74 @@ Object .assign (X3DUrlObject .prototype,
|
|
|
38124
38057
|
{
|
|
38125
38058
|
return this [X3DUrlObject_cache] && this .getBrowser () .getBrowserOption ("Cache");
|
|
38126
38059
|
},
|
|
38127
|
-
requestImmediateLoad (cache = true)
|
|
38060
|
+
async requestImmediateLoad (cache = true)
|
|
38128
38061
|
{
|
|
38129
|
-
|
|
38062
|
+
switch (this .checkLoadState ())
|
|
38130
38063
|
{
|
|
38131
|
-
|
|
38132
|
-
{
|
|
38133
|
-
const _loading = Symbol ();
|
|
38134
|
-
|
|
38135
|
-
this ._loadState .addFieldCallback (_loading, () =>
|
|
38136
|
-
{
|
|
38137
|
-
switch (this .checkLoadState ())
|
|
38138
|
-
{
|
|
38139
|
-
case Base_X3DConstants .COMPLETE_STATE:
|
|
38140
|
-
this ._loadState .removeFieldCallback (_loading);
|
|
38141
|
-
resolve ();
|
|
38142
|
-
break;
|
|
38143
|
-
case Base_X3DConstants .FAILED_STATE:
|
|
38144
|
-
this ._loadState .removeFieldCallback (_loading);
|
|
38145
|
-
reject ();
|
|
38146
|
-
break;
|
|
38147
|
-
}
|
|
38148
|
-
});
|
|
38149
|
-
};
|
|
38150
|
-
|
|
38151
|
-
const loadState = this .checkLoadState ();
|
|
38152
|
-
|
|
38153
|
-
switch (loadState)
|
|
38154
|
-
{
|
|
38155
|
-
case Base_X3DConstants .IN_PROGRESS_STATE:
|
|
38156
|
-
{
|
|
38157
|
-
loading ();
|
|
38158
|
-
return;
|
|
38159
|
-
}
|
|
38160
|
-
case Base_X3DConstants .COMPLETE_STATE:
|
|
38161
|
-
{
|
|
38162
|
-
resolve ();
|
|
38163
|
-
return;
|
|
38164
|
-
}
|
|
38165
|
-
case Base_X3DConstants .FAILED_STATE:
|
|
38166
|
-
{
|
|
38167
|
-
reject ();
|
|
38168
|
-
return;
|
|
38169
|
-
}
|
|
38170
|
-
}
|
|
38171
|
-
|
|
38172
|
-
const browser = this .getBrowser ();
|
|
38173
|
-
|
|
38174
|
-
if (!browser .getBrowserOption ("LoadUrlObjects") && this .getExecutionContext () !== browser .getPrivateScene ())
|
|
38064
|
+
case Base_X3DConstants .IN_PROGRESS_STATE:
|
|
38175
38065
|
{
|
|
38176
|
-
|
|
38066
|
+
await this .loading ();
|
|
38177
38067
|
return;
|
|
38178
38068
|
}
|
|
38179
|
-
|
|
38180
|
-
if (!this ._load .getValue ())
|
|
38069
|
+
case Base_X3DConstants .COMPLETE_STATE:
|
|
38181
38070
|
{
|
|
38182
|
-
reject ();
|
|
38183
38071
|
return;
|
|
38184
38072
|
}
|
|
38185
|
-
|
|
38186
|
-
if (this ._url .length === 0)
|
|
38073
|
+
case Base_X3DConstants .FAILED_STATE:
|
|
38187
38074
|
{
|
|
38188
|
-
|
|
38189
|
-
return;
|
|
38075
|
+
throw new Error (`Failed loading ${this .getTypeName ()}.`);
|
|
38190
38076
|
}
|
|
38077
|
+
}
|
|
38191
38078
|
|
|
38192
|
-
|
|
38193
|
-
this .setLoadState (Base_X3DConstants .IN_PROGRESS_STATE);
|
|
38079
|
+
const browser = this .getBrowser ();
|
|
38194
38080
|
|
|
38195
|
-
|
|
38196
|
-
|
|
38197
|
-
|
|
38198
|
-
|
|
38199
|
-
|
|
38081
|
+
if (!browser .getBrowserOption ("LoadUrlObjects") && this .getExecutionContext () !== browser .getPrivateScene ())
|
|
38082
|
+
return;
|
|
38083
|
+
|
|
38084
|
+
if (!this ._load .getValue ())
|
|
38085
|
+
throw new Error (`${this .getTypeName ()}.load is false.`);
|
|
38200
38086
|
|
|
38201
|
-
|
|
38087
|
+
if (this ._url .length === 0)
|
|
38088
|
+
{
|
|
38089
|
+
this .unloadData ();
|
|
38090
|
+
return;
|
|
38091
|
+
}
|
|
38092
|
+
|
|
38093
|
+
this .setCache (cache);
|
|
38094
|
+
this .setLoadState (Base_X3DConstants .IN_PROGRESS_STATE);
|
|
38095
|
+
|
|
38096
|
+
if (this .isInitialized ())
|
|
38097
|
+
// Buffer prevents double load of the scene if load and url field are set at the same time.
|
|
38098
|
+
this ._loadData = this .getBrowser () .getCurrentTime ();
|
|
38099
|
+
else
|
|
38100
|
+
this .loadData ();
|
|
38101
|
+
|
|
38102
|
+
await this .loading ();
|
|
38103
|
+
},
|
|
38104
|
+
loading ()
|
|
38105
|
+
{
|
|
38106
|
+
return new Promise ((resolve, reject) =>
|
|
38107
|
+
{
|
|
38108
|
+
const _loading = Symbol ();
|
|
38109
|
+
|
|
38110
|
+
this ._loadState .addFieldCallback (_loading, () =>
|
|
38111
|
+
{
|
|
38112
|
+
switch (this .checkLoadState ())
|
|
38113
|
+
{
|
|
38114
|
+
case Base_X3DConstants .COMPLETE_STATE:
|
|
38115
|
+
{
|
|
38116
|
+
this ._loadState .removeFieldCallback (_loading);
|
|
38117
|
+
resolve ();
|
|
38118
|
+
break;
|
|
38119
|
+
}
|
|
38120
|
+
case Base_X3DConstants .FAILED_STATE:
|
|
38121
|
+
{
|
|
38122
|
+
this ._loadState .removeFieldCallback (_loading);
|
|
38123
|
+
reject (new Error (`Failed loading ${this .getTypeName ()}.`));
|
|
38124
|
+
break;
|
|
38125
|
+
}
|
|
38126
|
+
}
|
|
38127
|
+
});
|
|
38202
38128
|
});
|
|
38203
38129
|
},
|
|
38204
38130
|
loadNow ()
|
|
@@ -39015,7 +38941,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
|
|
|
39015
38941
|
x_ite_Namespace .add ("X3DProtoDeclaration", "x_ite/Prototype/X3DProtoDeclaration", X3DProtoDeclaration_default_);
|
|
39016
38942
|
/* harmony default export */ const Prototype_X3DProtoDeclaration = (X3DProtoDeclaration_default_);
|
|
39017
38943
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
|
|
39018
|
-
/* provided dependency */ var X3DParser_$ = __webpack_require__(
|
|
38944
|
+
/* provided dependency */ var X3DParser_$ = __webpack_require__(575);
|
|
39019
38945
|
/*******************************************************************************
|
|
39020
38946
|
*
|
|
39021
38947
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -39277,7 +39203,7 @@ const Expressions_default_ = Expressions;
|
|
|
39277
39203
|
x_ite_Namespace .add ("Expressions", "x_ite/Parser/Expressions", Expressions_default_);
|
|
39278
39204
|
/* harmony default export */ const Parser_Expressions = (Expressions_default_);
|
|
39279
39205
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/VRMLParser.js
|
|
39280
|
-
/* provided dependency */ var VRMLParser_$ = __webpack_require__(
|
|
39206
|
+
/* provided dependency */ var VRMLParser_$ = __webpack_require__(575);
|
|
39281
39207
|
/*******************************************************************************
|
|
39282
39208
|
*
|
|
39283
39209
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -39349,8 +39275,8 @@ x_ite_Namespace .add ("Expressions", "x_ite/Parser/Expressions", Expressions_def
|
|
|
39349
39275
|
// VRML lexical elements
|
|
39350
39276
|
const Grammar = Parser_Expressions ({
|
|
39351
39277
|
// General
|
|
39352
|
-
Whitespaces: /
|
|
39353
|
-
Comment:
|
|
39278
|
+
Whitespaces: /[\x20\n,\t\r]+/gy,
|
|
39279
|
+
Comment: /#.*?(?=[\n\r])/gy,
|
|
39354
39280
|
Break: /\r?\n/g,
|
|
39355
39281
|
|
|
39356
39282
|
// Header
|
|
@@ -39383,8 +39309,8 @@ const Grammar = Parser_Expressions ({
|
|
|
39383
39309
|
Period: /\./gy,
|
|
39384
39310
|
Colon: /\:/gy,
|
|
39385
39311
|
|
|
39386
|
-
Id: /
|
|
39387
|
-
ComponentNameId: /
|
|
39312
|
+
Id: /[^\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f]{1}[^\x00-\x20\x22\x23\x27\x2c\x2e\x5b\x5c\x5d\x7b\x7d\x7f]*/gy,
|
|
39313
|
+
ComponentNameId: /[^\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f\x3a]{1}[^\x00-\x20\x22\x23\x27\x2c\x2e\x5b\x5c\x5d\x7b\x7d\x7f\x3a]*/gy,
|
|
39388
39314
|
|
|
39389
39315
|
initializeOnly: /initializeOnly/gy,
|
|
39390
39316
|
inputOnly: /inputOnly/gy,
|
|
@@ -39396,15 +39322,16 @@ const Grammar = Parser_Expressions ({
|
|
|
39396
39322
|
eventOut: /eventOut/gy,
|
|
39397
39323
|
exposedField: /exposedField/gy,
|
|
39398
39324
|
|
|
39399
|
-
FieldType: /
|
|
39325
|
+
FieldType: /[SM]F(?:Bool|ColorRGBA|Color|Double|Float|Image|Int32|Matrix3d|Matrix3f|Matrix4d|Matrix4f|Node|Rotation|String|Time|Vec2d|Vec2f|Vec3d|Vec3f|Vec4d|Vec4f)/gy,
|
|
39400
39326
|
|
|
39401
39327
|
// Values
|
|
39402
|
-
int32:
|
|
39403
|
-
double: /
|
|
39404
|
-
|
|
39328
|
+
int32: /(?:0[xX][\da-fA-F]+)|(?:[+-]?\d+)/gy,
|
|
39329
|
+
double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/gy,
|
|
39330
|
+
doubleQuotes: /"/gy,
|
|
39331
|
+
noDoubleQuotes: /[^"]+/gy,
|
|
39405
39332
|
|
|
39406
39333
|
CONSTANTS: /([+-]?)\b(NAN|INFINITY|INF|PI|PI2|PI1_4|PI2_4|PI3_4|PI4_4|PI5_4|PI6_4|PI7_4|PI8_4|PI1_2|PI2_2|PI3_2|PI4_2|PI1_3|PI2_3|PI3_3|PI4_3|PI5_3|PI6_3|SQRT1_2|SQRT2)\b/igy,
|
|
39407
|
-
HTMLColor: /
|
|
39334
|
+
HTMLColor: /[a-zA-Z]+|0[xX][\da-fA-F]+|rgba?\(.*?\)/gy,
|
|
39408
39335
|
});
|
|
39409
39336
|
|
|
39410
39337
|
/*
|
|
@@ -39518,7 +39445,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39518
39445
|
|
|
39519
39446
|
if (line .length > 80)
|
|
39520
39447
|
{
|
|
39521
|
-
line = line .
|
|
39448
|
+
line = line .substring (linePos - 40, linePos + 40);
|
|
39522
39449
|
lastLine = "";
|
|
39523
39450
|
linePos = 40;
|
|
39524
39451
|
}
|
|
@@ -39593,7 +39520,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39593
39520
|
{
|
|
39594
39521
|
if (Grammar .Whitespaces .parse (this))
|
|
39595
39522
|
{
|
|
39596
|
-
this .lines (this .result [
|
|
39523
|
+
this .lines (this .result [0]);
|
|
39597
39524
|
|
|
39598
39525
|
return true;
|
|
39599
39526
|
}
|
|
@@ -39669,13 +39596,9 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39669
39596
|
})(),
|
|
39670
39597
|
headerStatement ()
|
|
39671
39598
|
{
|
|
39672
|
-
Grammar .Header .
|
|
39673
|
-
|
|
39674
|
-
const result = Grammar .Header .exec (this .input);
|
|
39675
|
-
|
|
39676
|
-
if (result)
|
|
39599
|
+
if (Grammar .Header .parse (this))
|
|
39677
39600
|
{
|
|
39678
|
-
this .getScene () .setSpecificationVersion (result [2]);
|
|
39601
|
+
this .getScene () .setSpecificationVersion (this .result [2]);
|
|
39679
39602
|
this .getScene () .setEncoding ("VRML");
|
|
39680
39603
|
return true;
|
|
39681
39604
|
}
|
|
@@ -39690,7 +39613,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39690
39613
|
{
|
|
39691
39614
|
if (this .profileNameId ())
|
|
39692
39615
|
{
|
|
39693
|
-
const profile = this .getBrowser () .getProfile (this .result [
|
|
39616
|
+
const profile = this .getBrowser () .getProfile (this .result [0]);
|
|
39694
39617
|
|
|
39695
39618
|
this .getScene () .setProfile (profile);
|
|
39696
39619
|
return;
|
|
@@ -39714,7 +39637,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39714
39637
|
{
|
|
39715
39638
|
if (this .componentNameId ())
|
|
39716
39639
|
{
|
|
39717
|
-
const componentNameIdCharacters = this .result [
|
|
39640
|
+
const componentNameIdCharacters = this .result [0];
|
|
39718
39641
|
|
|
39719
39642
|
this .comments ();
|
|
39720
39643
|
|
|
@@ -39755,11 +39678,11 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39755
39678
|
{
|
|
39756
39679
|
if (this .categoryNameId ())
|
|
39757
39680
|
{
|
|
39758
|
-
const categoryNameId = this .result [
|
|
39681
|
+
const categoryNameId = this .result [0];
|
|
39759
39682
|
|
|
39760
39683
|
if (this .unitNameId ())
|
|
39761
39684
|
{
|
|
39762
|
-
const unitNameId = this .result [
|
|
39685
|
+
const unitNameId = this .result [0];
|
|
39763
39686
|
|
|
39764
39687
|
if (this .unitConversionFactor ())
|
|
39765
39688
|
{
|
|
@@ -39839,7 +39762,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39839
39762
|
{
|
|
39840
39763
|
if (this .nodeNameId ())
|
|
39841
39764
|
{
|
|
39842
|
-
const localNodeNameId = this .result [
|
|
39765
|
+
const localNodeNameId = this .result [0];
|
|
39843
39766
|
|
|
39844
39767
|
this .comments ();
|
|
39845
39768
|
|
|
@@ -39848,7 +39771,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39848
39771
|
if (Grammar .AS .parse (this))
|
|
39849
39772
|
{
|
|
39850
39773
|
if (this .exportedNodeNameId ())
|
|
39851
|
-
var exportedNodeNameId = this .result [
|
|
39774
|
+
var exportedNodeNameId = this .result [0];
|
|
39852
39775
|
else
|
|
39853
39776
|
throw new Error ("No name given after AS.");
|
|
39854
39777
|
}
|
|
@@ -39884,7 +39807,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39884
39807
|
if (this .nodeNameId ())
|
|
39885
39808
|
{
|
|
39886
39809
|
const
|
|
39887
|
-
inlineNodeNameId = this .result [
|
|
39810
|
+
inlineNodeNameId = this .result [0],
|
|
39888
39811
|
namedNode = this .getExecutionContext () .getNamedNode (inlineNodeNameId);
|
|
39889
39812
|
|
|
39890
39813
|
this .comments ();
|
|
@@ -39893,14 +39816,14 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39893
39816
|
{
|
|
39894
39817
|
if (this .exportedNodeNameId ())
|
|
39895
39818
|
{
|
|
39896
|
-
const exportedNodeNameId = this .result [
|
|
39819
|
+
const exportedNodeNameId = this .result [0];
|
|
39897
39820
|
|
|
39898
39821
|
this .comments ();
|
|
39899
39822
|
|
|
39900
39823
|
if (Grammar .AS .parse (this))
|
|
39901
39824
|
{
|
|
39902
39825
|
if (this .nodeNameId ())
|
|
39903
|
-
var nodeNameId = this .result [
|
|
39826
|
+
var nodeNameId = this .result [0];
|
|
39904
39827
|
|
|
39905
39828
|
else
|
|
39906
39829
|
throw new Error ("No name given after AS.");
|
|
@@ -39966,7 +39889,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39966
39889
|
if (Grammar .DEF .parse (this))
|
|
39967
39890
|
{
|
|
39968
39891
|
if (this .nodeNameId ())
|
|
39969
|
-
return this .node (this .result [
|
|
39892
|
+
return this .node (this .result [0]);
|
|
39970
39893
|
|
|
39971
39894
|
throw new Error ("No name given after DEF.");
|
|
39972
39895
|
}
|
|
@@ -39974,7 +39897,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
39974
39897
|
if (Grammar .USE .parse (this))
|
|
39975
39898
|
{
|
|
39976
39899
|
if (this .nodeNameId ())
|
|
39977
|
-
return this .getExecutionContext () .getNamedNode (this .result [
|
|
39900
|
+
return this .getExecutionContext () .getNamedNode (this .result [0]) .getValue ();
|
|
39978
39901
|
|
|
39979
39902
|
throw new Error ("No name given after USE.");
|
|
39980
39903
|
}
|
|
@@ -40007,7 +39930,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40007
39930
|
{
|
|
40008
39931
|
if (this .nodeTypeId ())
|
|
40009
39932
|
{
|
|
40010
|
-
const nodeTypeId = this .result [
|
|
39933
|
+
const nodeTypeId = this .result [0];
|
|
40011
39934
|
|
|
40012
39935
|
this .comments ();
|
|
40013
39936
|
|
|
@@ -40129,12 +40052,12 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40129
40052
|
{
|
|
40130
40053
|
if (this .fieldType ())
|
|
40131
40054
|
{
|
|
40132
|
-
const fieldType = this .result [
|
|
40055
|
+
const fieldType = this .result [0];
|
|
40133
40056
|
|
|
40134
40057
|
if (this .inputOnlyId ())
|
|
40135
40058
|
{
|
|
40136
40059
|
const
|
|
40137
|
-
fieldId = this .result [
|
|
40060
|
+
fieldId = this .result [0],
|
|
40138
40061
|
field = new (x_ite_Fields [fieldType]) ();
|
|
40139
40062
|
|
|
40140
40063
|
field .setAccessType (Base_X3DConstants .inputOnly);
|
|
@@ -40147,19 +40070,19 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40147
40070
|
|
|
40148
40071
|
this .Id ();
|
|
40149
40072
|
|
|
40150
|
-
throw new Error (`Unknown event or field type: '${this .result [
|
|
40073
|
+
throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
|
|
40151
40074
|
}
|
|
40152
40075
|
|
|
40153
40076
|
if (Grammar .outputOnly .parse (this) || Grammar .eventOut .parse (this))
|
|
40154
40077
|
{
|
|
40155
40078
|
if (this .fieldType ())
|
|
40156
40079
|
{
|
|
40157
|
-
const fieldType = this .result [
|
|
40080
|
+
const fieldType = this .result [0];
|
|
40158
40081
|
|
|
40159
40082
|
if (this .outputOnlyId ())
|
|
40160
40083
|
{
|
|
40161
40084
|
const
|
|
40162
|
-
fieldId = this .result [
|
|
40085
|
+
fieldId = this .result [0],
|
|
40163
40086
|
field = new (x_ite_Fields [fieldType]) ();
|
|
40164
40087
|
|
|
40165
40088
|
field .setAccessType (Base_X3DConstants .outputOnly);
|
|
@@ -40172,19 +40095,19 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40172
40095
|
|
|
40173
40096
|
this .Id ();
|
|
40174
40097
|
|
|
40175
|
-
throw new Error (`Unknown event or field type: '${this .result [
|
|
40098
|
+
throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
|
|
40176
40099
|
}
|
|
40177
40100
|
|
|
40178
40101
|
if (Grammar .initializeOnly .parse (this) || Grammar .field .parse (this))
|
|
40179
40102
|
{
|
|
40180
40103
|
if (this .fieldType ())
|
|
40181
40104
|
{
|
|
40182
|
-
const fieldType = this .result [
|
|
40105
|
+
const fieldType = this .result [0];
|
|
40183
40106
|
|
|
40184
40107
|
if (this .initializeOnlyId ())
|
|
40185
40108
|
{
|
|
40186
40109
|
const
|
|
40187
|
-
fieldId = this .result [
|
|
40110
|
+
fieldId = this .result [0],
|
|
40188
40111
|
field = new (x_ite_Fields [fieldType]) ();
|
|
40189
40112
|
|
|
40190
40113
|
if (this .fieldValue (field))
|
|
@@ -40202,7 +40125,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40202
40125
|
|
|
40203
40126
|
this .Id ();
|
|
40204
40127
|
|
|
40205
|
-
throw new Error (`Unknown event or field type: '${this .result [
|
|
40128
|
+
throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
|
|
40206
40129
|
}
|
|
40207
40130
|
|
|
40208
40131
|
return null;
|
|
@@ -40220,12 +40143,12 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40220
40143
|
{
|
|
40221
40144
|
if (this .fieldType ())
|
|
40222
40145
|
{
|
|
40223
|
-
const fieldType = this .result [
|
|
40146
|
+
const fieldType = this .result [0];
|
|
40224
40147
|
|
|
40225
40148
|
if (this .inputOutputId ())
|
|
40226
40149
|
{
|
|
40227
40150
|
const
|
|
40228
|
-
fieldId = this .result [
|
|
40151
|
+
fieldId = this .result [0],
|
|
40229
40152
|
field = new (x_ite_Fields [fieldType]) ();
|
|
40230
40153
|
|
|
40231
40154
|
if (this .fieldValue (field))
|
|
@@ -40243,7 +40166,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40243
40166
|
|
|
40244
40167
|
this .Id ();
|
|
40245
40168
|
|
|
40246
|
-
throw new Error (`Unknown event or field type: '${this .result [
|
|
40169
|
+
throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
|
|
40247
40170
|
}
|
|
40248
40171
|
|
|
40249
40172
|
return null;
|
|
@@ -40256,7 +40179,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40256
40179
|
{
|
|
40257
40180
|
if (this .nodeTypeId ())
|
|
40258
40181
|
{
|
|
40259
|
-
const nodeTypeId = this .result [
|
|
40182
|
+
const nodeTypeId = this .result [0];
|
|
40260
40183
|
|
|
40261
40184
|
this .comments ();
|
|
40262
40185
|
|
|
@@ -40323,12 +40246,12 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40323
40246
|
{
|
|
40324
40247
|
if (this .fieldType ())
|
|
40325
40248
|
{
|
|
40326
|
-
const fieldType = this .result [
|
|
40249
|
+
const fieldType = this .result [0];
|
|
40327
40250
|
|
|
40328
40251
|
if (this .inputOnlyId ())
|
|
40329
40252
|
{
|
|
40330
40253
|
const
|
|
40331
|
-
fieldId = this .result [
|
|
40254
|
+
fieldId = this .result [0],
|
|
40332
40255
|
field = new (x_ite_Fields [fieldType]) ();
|
|
40333
40256
|
|
|
40334
40257
|
field .setAccessType (Base_X3DConstants .inputOnly);
|
|
@@ -40341,19 +40264,19 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40341
40264
|
|
|
40342
40265
|
this .Id ()
|
|
40343
40266
|
|
|
40344
|
-
throw new Error (`Unknown event or field type: '${this .result [
|
|
40267
|
+
throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
|
|
40345
40268
|
}
|
|
40346
40269
|
|
|
40347
40270
|
if (Grammar .outputOnly .parse (this) || Grammar .eventOut .parse (this))
|
|
40348
40271
|
{
|
|
40349
40272
|
if (this .fieldType ())
|
|
40350
40273
|
{
|
|
40351
|
-
const fieldType = this .result [
|
|
40274
|
+
const fieldType = this .result [0];
|
|
40352
40275
|
|
|
40353
40276
|
if (this .outputOnlyId ())
|
|
40354
40277
|
{
|
|
40355
40278
|
const
|
|
40356
|
-
fieldId = this .result [
|
|
40279
|
+
fieldId = this .result [0],
|
|
40357
40280
|
field = new (x_ite_Fields [fieldType]) ();
|
|
40358
40281
|
|
|
40359
40282
|
field .setAccessType (Base_X3DConstants .outputOnly);
|
|
@@ -40366,19 +40289,19 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40366
40289
|
|
|
40367
40290
|
this .Id ()
|
|
40368
40291
|
|
|
40369
|
-
throw new Error (`Unknown event or field type: '${this .result [
|
|
40292
|
+
throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
|
|
40370
40293
|
}
|
|
40371
40294
|
|
|
40372
40295
|
if (Grammar .initializeOnly .parse (this) || Grammar .field .parse (this))
|
|
40373
40296
|
{
|
|
40374
40297
|
if (this .fieldType ())
|
|
40375
40298
|
{
|
|
40376
|
-
const fieldType = this .result [
|
|
40299
|
+
const fieldType = this .result [0];
|
|
40377
40300
|
|
|
40378
40301
|
if (this .initializeOnlyId ())
|
|
40379
40302
|
{
|
|
40380
40303
|
const
|
|
40381
|
-
fieldId = this .result [
|
|
40304
|
+
fieldId = this .result [0],
|
|
40382
40305
|
field = new (x_ite_Fields [fieldType]) ();
|
|
40383
40306
|
|
|
40384
40307
|
field .setAccessType (Base_X3DConstants .initializeOnly);
|
|
@@ -40391,19 +40314,19 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40391
40314
|
|
|
40392
40315
|
this .Id ()
|
|
40393
40316
|
|
|
40394
|
-
throw new Error (`Unknown event or field type: '${this .result [
|
|
40317
|
+
throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
|
|
40395
40318
|
}
|
|
40396
40319
|
|
|
40397
40320
|
if (Grammar .inputOutput .parse (this) || Grammar .exposedField .parse (this))
|
|
40398
40321
|
{
|
|
40399
40322
|
if (this .fieldType ())
|
|
40400
40323
|
{
|
|
40401
|
-
const fieldType = this .result [
|
|
40324
|
+
const fieldType = this .result [0];
|
|
40402
40325
|
|
|
40403
40326
|
if (this .inputOutputId ())
|
|
40404
40327
|
{
|
|
40405
40328
|
const
|
|
40406
|
-
fieldId = this .result [
|
|
40329
|
+
fieldId = this .result [0],
|
|
40407
40330
|
field = new (x_ite_Fields [fieldType]) ();
|
|
40408
40331
|
|
|
40409
40332
|
field .setAccessType (Base_X3DConstants .inputOutput);
|
|
@@ -40416,7 +40339,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40416
40339
|
|
|
40417
40340
|
this .Id ()
|
|
40418
40341
|
|
|
40419
|
-
throw new Error (`Unknown event or field type: '${this .result [
|
|
40342
|
+
throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
|
|
40420
40343
|
}
|
|
40421
40344
|
|
|
40422
40345
|
return null;
|
|
@@ -40434,7 +40357,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40434
40357
|
if (this .nodeNameId ())
|
|
40435
40358
|
{
|
|
40436
40359
|
const
|
|
40437
|
-
fromNodeId = this .result [
|
|
40360
|
+
fromNodeId = this .result [0],
|
|
40438
40361
|
fromNode = this .getExecutionContext () .getLocalNode (fromNodeId);
|
|
40439
40362
|
|
|
40440
40363
|
this .comments ();
|
|
@@ -40443,7 +40366,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40443
40366
|
{
|
|
40444
40367
|
if (this .outputOnlyId ())
|
|
40445
40368
|
{
|
|
40446
|
-
const eventOutId = this .result [
|
|
40369
|
+
const eventOutId = this .result [0];
|
|
40447
40370
|
|
|
40448
40371
|
this .comments ();
|
|
40449
40372
|
|
|
@@ -40452,7 +40375,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40452
40375
|
if (this .nodeNameId ())
|
|
40453
40376
|
{
|
|
40454
40377
|
const
|
|
40455
|
-
toNodeId = this .result [
|
|
40378
|
+
toNodeId = this .result [0],
|
|
40456
40379
|
toNode = this .getExecutionContext () .getLocalNode (toNodeId);
|
|
40457
40380
|
|
|
40458
40381
|
this .comments ();
|
|
@@ -40463,7 +40386,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40463
40386
|
{
|
|
40464
40387
|
try
|
|
40465
40388
|
{
|
|
40466
|
-
const eventInId = this .result [
|
|
40389
|
+
const eventInId = this .result [0];
|
|
40467
40390
|
|
|
40468
40391
|
this .getExecutionContext () .addRoute (fromNode, eventOutId, toNode, eventInId);
|
|
40469
40392
|
return true;
|
|
@@ -40503,7 +40426,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40503
40426
|
{
|
|
40504
40427
|
if (this .nodeTypeId ())
|
|
40505
40428
|
{
|
|
40506
|
-
const nodeTypeId = this .result [
|
|
40429
|
+
const nodeTypeId = this .result [0];
|
|
40507
40430
|
|
|
40508
40431
|
const baseNode = this .getExecutionContext () .createNode (nodeTypeId, false)
|
|
40509
40432
|
?? this .getExecutionContext () .createProto (nodeTypeId, false);
|
|
@@ -40584,17 +40507,17 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40584
40507
|
|
|
40585
40508
|
if (this .Id ())
|
|
40586
40509
|
{
|
|
40587
|
-
const accessType = this .accessTypes [this .result [
|
|
40510
|
+
const accessType = this .accessTypes [this .result [0]];
|
|
40588
40511
|
|
|
40589
40512
|
if (accessType)
|
|
40590
40513
|
{
|
|
40591
40514
|
if (this .fieldType ())
|
|
40592
40515
|
{
|
|
40593
|
-
const fieldType = this .result [
|
|
40516
|
+
const fieldType = this .result [0];
|
|
40594
40517
|
|
|
40595
40518
|
if (this .Id ())
|
|
40596
40519
|
{
|
|
40597
|
-
const fieldId = this .result [
|
|
40520
|
+
const fieldId = this .result [0];
|
|
40598
40521
|
|
|
40599
40522
|
this .comments ();
|
|
40600
40523
|
|
|
@@ -40604,7 +40527,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40604
40527
|
{
|
|
40605
40528
|
if (this .Id ())
|
|
40606
40529
|
{
|
|
40607
|
-
const isId = this .result [
|
|
40530
|
+
const isId = this .result [0];
|
|
40608
40531
|
|
|
40609
40532
|
try
|
|
40610
40533
|
{
|
|
@@ -40696,7 +40619,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40696
40619
|
|
|
40697
40620
|
if (this .Id ())
|
|
40698
40621
|
{
|
|
40699
|
-
const fieldId = this .result [
|
|
40622
|
+
const fieldId = this .result [0];
|
|
40700
40623
|
|
|
40701
40624
|
try
|
|
40702
40625
|
{
|
|
@@ -40729,7 +40652,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40729
40652
|
{
|
|
40730
40653
|
if (this .Id ())
|
|
40731
40654
|
{
|
|
40732
|
-
const isId = this .result [
|
|
40655
|
+
const isId = this .result [0];
|
|
40733
40656
|
|
|
40734
40657
|
try
|
|
40735
40658
|
{
|
|
@@ -40831,7 +40754,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40831
40754
|
|
|
40832
40755
|
if (Grammar .double .parse (this))
|
|
40833
40756
|
{
|
|
40834
|
-
this .value = parseFloat (this .result [
|
|
40757
|
+
this .value = parseFloat (this .result [0]);
|
|
40835
40758
|
return true;
|
|
40836
40759
|
}
|
|
40837
40760
|
|
|
@@ -40842,7 +40765,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40842
40765
|
this .value = this .CONSTANTS [this .result [2] .toUpperCase ()];
|
|
40843
40766
|
|
|
40844
40767
|
if (this .result [1] === "-")
|
|
40845
|
-
this .value = -
|
|
40768
|
+
this .value = -this .value;
|
|
40846
40769
|
|
|
40847
40770
|
return true;
|
|
40848
40771
|
}
|
|
@@ -40855,7 +40778,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40855
40778
|
|
|
40856
40779
|
if (Grammar .int32 .parse (this))
|
|
40857
40780
|
{
|
|
40858
|
-
this .value = parseInt (this .result [
|
|
40781
|
+
this .value = parseInt (this .result [0]);
|
|
40859
40782
|
return true;
|
|
40860
40783
|
}
|
|
40861
40784
|
|
|
@@ -40865,13 +40788,30 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40865
40788
|
{
|
|
40866
40789
|
this .comments ();
|
|
40867
40790
|
|
|
40868
|
-
if (Grammar .
|
|
40791
|
+
if (Grammar .doubleQuotes .parse (this))
|
|
40869
40792
|
{
|
|
40870
|
-
|
|
40793
|
+
let value = "";
|
|
40871
40794
|
|
|
40872
|
-
|
|
40795
|
+
while (Grammar .noDoubleQuotes .parse (this))
|
|
40796
|
+
{
|
|
40797
|
+
value += this .result [0];
|
|
40873
40798
|
|
|
40874
|
-
|
|
40799
|
+
if (value .at (-1) !== "\\")
|
|
40800
|
+
break;
|
|
40801
|
+
|
|
40802
|
+
Grammar .doubleQuotes .parse (this);
|
|
40803
|
+
|
|
40804
|
+
value += "\"";
|
|
40805
|
+
}
|
|
40806
|
+
|
|
40807
|
+
if (Grammar .doubleQuotes .parse (this))
|
|
40808
|
+
{
|
|
40809
|
+
this .lines (value);
|
|
40810
|
+
|
|
40811
|
+
this .value = x_ite_Fields .SFString .unescape (value);
|
|
40812
|
+
|
|
40813
|
+
return true;
|
|
40814
|
+
}
|
|
40875
40815
|
}
|
|
40876
40816
|
|
|
40877
40817
|
return false;
|
|
@@ -40950,7 +40890,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
40950
40890
|
|
|
40951
40891
|
if (Grammar .HTMLColor .parse (this))
|
|
40952
40892
|
{
|
|
40953
|
-
const color = this .convertColor (this .result [
|
|
40893
|
+
const color = this .convertColor (this .result [0] .replace (/0x/i, "#"));
|
|
40954
40894
|
|
|
40955
40895
|
field .r = color [0];
|
|
40956
40896
|
field .g = color [1];
|
|
@@ -41033,7 +40973,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
41033
40973
|
|
|
41034
40974
|
if (Grammar .HTMLColor .parse (this))
|
|
41035
40975
|
{
|
|
41036
|
-
const color = this .convertColor (this .result [
|
|
40976
|
+
const color = this .convertColor (this .result [0] .replace (/0x/i, "#"));
|
|
41037
40977
|
|
|
41038
40978
|
field .r = color [0];
|
|
41039
40979
|
field .g = color [1];
|
|
@@ -41963,7 +41903,7 @@ const VRMLParser_default_ = VRMLParser;
|
|
|
41963
41903
|
x_ite_Namespace .add ("VRMLParser", "x_ite/Parser/VRMLParser", VRMLParser_default_);
|
|
41964
41904
|
/* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
|
|
41965
41905
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
|
|
41966
|
-
/* provided dependency */ var XMLParser_$ = __webpack_require__(
|
|
41906
|
+
/* provided dependency */ var XMLParser_$ = __webpack_require__(575);
|
|
41967
41907
|
/*******************************************************************************
|
|
41968
41908
|
*
|
|
41969
41909
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -43317,10 +43257,10 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
|
|
|
43317
43257
|
if (typeof object [key] === "object")
|
|
43318
43258
|
{
|
|
43319
43259
|
if (isNaN (parseInt (key)))
|
|
43320
|
-
this .convertObject (key, object, element, parentkey .
|
|
43260
|
+
this .convertObject (key, object, element, parentkey .substring (1));
|
|
43321
43261
|
|
|
43322
43262
|
else
|
|
43323
|
-
this .convertToDOM (object[ key], key, element, parentkey .
|
|
43263
|
+
this .convertToDOM (object[ key], key, element, parentkey .substring (1));
|
|
43324
43264
|
}
|
|
43325
43265
|
}
|
|
43326
43266
|
},
|
|
@@ -43368,11 +43308,11 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
|
|
|
43368
43308
|
|
|
43369
43309
|
if (object !== null && typeof object [key] === "object")
|
|
43370
43310
|
{
|
|
43371
|
-
if (key
|
|
43311
|
+
if (key [0] === "@")
|
|
43372
43312
|
{
|
|
43373
43313
|
this .convertToDOM (object [key], key, element);
|
|
43374
43314
|
}
|
|
43375
|
-
else if (key
|
|
43315
|
+
else if (key [0] === "-")
|
|
43376
43316
|
{
|
|
43377
43317
|
this .convertChildren (key, object [key], element);
|
|
43378
43318
|
}
|
|
@@ -43389,33 +43329,30 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
|
|
|
43389
43329
|
{
|
|
43390
43330
|
this .createCDATA (document, element, object [key] .join ("\n"));
|
|
43391
43331
|
}
|
|
43392
|
-
else
|
|
43332
|
+
else if (key === "connect" || key === "fieldValue" || key === "field" || key === "meta" || key === "component" || key === "unit")
|
|
43393
43333
|
{
|
|
43394
|
-
|
|
43334
|
+
for (const childkey in object [key])
|
|
43395
43335
|
{
|
|
43396
|
-
for
|
|
43336
|
+
// for each field
|
|
43337
|
+
if (typeof object [key] [childkey] === "object")
|
|
43397
43338
|
{
|
|
43398
|
-
|
|
43399
|
-
if (typeof object [key] [childkey] === "object")
|
|
43400
|
-
{
|
|
43401
|
-
const child = this .createElement (key, containerField);
|
|
43339
|
+
const child = this .createElement (key, containerField);
|
|
43402
43340
|
|
|
43403
|
-
|
|
43341
|
+
this .convertToDOM (object [key] [childkey], childkey, child);
|
|
43404
43342
|
|
|
43405
|
-
|
|
43406
|
-
|
|
43407
|
-
}
|
|
43343
|
+
element .appendChild (child);
|
|
43344
|
+
element .appendChild (document .createTextNode ("\n"));
|
|
43408
43345
|
}
|
|
43409
43346
|
}
|
|
43410
|
-
|
|
43411
|
-
|
|
43412
|
-
|
|
43347
|
+
}
|
|
43348
|
+
else
|
|
43349
|
+
{
|
|
43350
|
+
const child = this .createElement (key, containerField);
|
|
43413
43351
|
|
|
43414
|
-
|
|
43352
|
+
this .convertToDOM (object [key], key, child);
|
|
43415
43353
|
|
|
43416
|
-
|
|
43417
|
-
|
|
43418
|
-
}
|
|
43354
|
+
element .appendChild (child);
|
|
43355
|
+
element .appendChild (document .createTextNode ("\n"));
|
|
43419
43356
|
}
|
|
43420
43357
|
}
|
|
43421
43358
|
},
|
|
@@ -43524,7 +43461,7 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
|
|
|
43524
43461
|
}
|
|
43525
43462
|
case "number":
|
|
43526
43463
|
{
|
|
43527
|
-
this .elementSetAttribute (element, key .
|
|
43464
|
+
this .elementSetAttribute (element, key .substring (1), object [key]);
|
|
43528
43465
|
break;
|
|
43529
43466
|
}
|
|
43530
43467
|
case "string":
|
|
@@ -43532,7 +43469,7 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
|
|
|
43532
43469
|
if (key !== "#comment")
|
|
43533
43470
|
{
|
|
43534
43471
|
// ordinary string attributes
|
|
43535
|
-
this .elementSetAttribute (element, key .
|
|
43472
|
+
this .elementSetAttribute (element, key .substring (1), this .JSONStringToXML (object [key]));
|
|
43536
43473
|
}
|
|
43537
43474
|
else
|
|
43538
43475
|
{
|
|
@@ -43545,7 +43482,7 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
|
|
|
43545
43482
|
}
|
|
43546
43483
|
case "boolean":
|
|
43547
43484
|
{
|
|
43548
|
-
this .elementSetAttribute (element, key .
|
|
43485
|
+
this .elementSetAttribute (element, key .substring (1), object [key]);
|
|
43549
43486
|
break;
|
|
43550
43487
|
}
|
|
43551
43488
|
case "undefined":
|
|
@@ -43563,7 +43500,7 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
|
|
|
43563
43500
|
|
|
43564
43501
|
if (isArray)
|
|
43565
43502
|
{
|
|
43566
|
-
if (parentkey
|
|
43503
|
+
if (parentkey [0] === "@")
|
|
43567
43504
|
{
|
|
43568
43505
|
if (arrayOfStrings)
|
|
43569
43506
|
{
|
|
@@ -43572,12 +43509,12 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
|
|
|
43572
43509
|
for (const str in localArray)
|
|
43573
43510
|
localArray [str] = this .SFStringToXML (localArray [str]);
|
|
43574
43511
|
|
|
43575
|
-
this .elementSetAttribute (element, parentkey .
|
|
43512
|
+
this .elementSetAttribute (element, parentkey .substring (1), '"' + localArray .join ('" "') + '"');
|
|
43576
43513
|
}
|
|
43577
43514
|
else
|
|
43578
43515
|
{
|
|
43579
43516
|
// if non string array
|
|
43580
|
-
this .elementSetAttribute (element, parentkey .
|
|
43517
|
+
this .elementSetAttribute (element, parentkey .substring (1), localArray .join (" "));
|
|
43581
43518
|
}
|
|
43582
43519
|
}
|
|
43583
43520
|
|
|
@@ -44072,7 +44009,7 @@ const URLs_default_ = URLs;
|
|
|
44072
44009
|
x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
|
|
44073
44010
|
/* harmony default export */ const Networking_URLs = (URLs_default_);
|
|
44074
44011
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
|
|
44075
|
-
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(
|
|
44012
|
+
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(575);
|
|
44076
44013
|
/*******************************************************************************
|
|
44077
44014
|
*
|
|
44078
44015
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -47374,7 +47311,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
|
|
|
47374
47311
|
x_ite_Namespace .add ("GLTF2Parser", "x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
|
|
47375
47312
|
/* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
|
|
47376
47313
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
|
|
47377
|
-
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(
|
|
47314
|
+
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(575);
|
|
47378
47315
|
/*******************************************************************************
|
|
47379
47316
|
*
|
|
47380
47317
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -47526,7 +47463,7 @@ const GLB2Parser_default_ = GLB2Parser;
|
|
|
47526
47463
|
x_ite_Namespace .add ("GLB2Parser", "x_ite/Parser/GLB2Parser", GLB2Parser_default_);
|
|
47527
47464
|
/* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
|
|
47528
47465
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
|
|
47529
|
-
/* provided dependency */ var OBJParser_$ = __webpack_require__(
|
|
47466
|
+
/* provided dependency */ var OBJParser_$ = __webpack_require__(575);
|
|
47530
47467
|
/*******************************************************************************
|
|
47531
47468
|
*
|
|
47532
47469
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -47595,7 +47532,7 @@ const OBJParser_Grammar = Parser_Expressions ({
|
|
|
47595
47532
|
whitespaces: /[\x20\n\t\r]+/gy,
|
|
47596
47533
|
whitespacesNoLineTerminator: /[\x20\t]+/gy,
|
|
47597
47534
|
comment: /#.*?(?=[\n\r])/gy,
|
|
47598
|
-
untilEndOfLine: /
|
|
47535
|
+
untilEndOfLine: /[^\r\n]+/gy,
|
|
47599
47536
|
|
|
47600
47537
|
// Keywords
|
|
47601
47538
|
mtllib: /\bmtllib\b/gy,
|
|
@@ -47620,8 +47557,8 @@ const OBJParser_Grammar = Parser_Expressions ({
|
|
|
47620
47557
|
slash: /\//gy,
|
|
47621
47558
|
|
|
47622
47559
|
// Values
|
|
47623
|
-
int32: /(
|
|
47624
|
-
double: /
|
|
47560
|
+
int32: /(?:0[xX][\da-fA-F]+)|(?:[+-]?\d+)/gy,
|
|
47561
|
+
double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/gy,
|
|
47625
47562
|
constants: /([+-])((?:NAN|INF|INFINITY))/igy,
|
|
47626
47563
|
});
|
|
47627
47564
|
|
|
@@ -47788,7 +47725,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
|
|
|
47788
47725
|
|
|
47789
47726
|
if (OBJParser_Grammar .untilEndOfLine .parse (this))
|
|
47790
47727
|
{
|
|
47791
|
-
const mtllibs = this .result [
|
|
47728
|
+
const mtllibs = this .result [0] .trim () .split (/\s+/);
|
|
47792
47729
|
|
|
47793
47730
|
await Promise .all (mtllibs .map (path => this .mtllib (path)));
|
|
47794
47731
|
}
|
|
@@ -47853,7 +47790,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
|
|
|
47853
47790
|
|
|
47854
47791
|
if (OBJParser_Grammar .untilEndOfLine .parse (this))
|
|
47855
47792
|
{
|
|
47856
|
-
const id = this .result [
|
|
47793
|
+
const id = this .result [0];
|
|
47857
47794
|
|
|
47858
47795
|
this .material = this .materials .get (id) || this .defaultMaterial;
|
|
47859
47796
|
this .texture = this .textures .get (id);
|
|
@@ -47881,7 +47818,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
|
|
|
47881
47818
|
{
|
|
47882
47819
|
const
|
|
47883
47820
|
scene = this .getExecutionContext (),
|
|
47884
|
-
name = this .sanitizeName (this .result [
|
|
47821
|
+
name = this .sanitizeName (this .result [0]);
|
|
47885
47822
|
|
|
47886
47823
|
if (this .group .children .length)
|
|
47887
47824
|
{
|
|
@@ -47892,7 +47829,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
|
|
|
47892
47829
|
scene .getRootNodes () .push (this .object);
|
|
47893
47830
|
}
|
|
47894
47831
|
|
|
47895
|
-
if (name)
|
|
47832
|
+
if (name && !this .object .getValue () .getName ())
|
|
47896
47833
|
{
|
|
47897
47834
|
scene .addNamedNode (scene .getUniqueName (name), this .object);
|
|
47898
47835
|
scene .addExportedNode (scene .getUniqueExportName (name), this .object);
|
|
@@ -47916,7 +47853,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
|
|
|
47916
47853
|
{
|
|
47917
47854
|
const
|
|
47918
47855
|
scene = this .getExecutionContext (),
|
|
47919
|
-
id = this .result [
|
|
47856
|
+
id = this .result [0],
|
|
47920
47857
|
name = this .sanitizeName (id),
|
|
47921
47858
|
group = this .groups .get (id);
|
|
47922
47859
|
|
|
@@ -47936,7 +47873,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
|
|
|
47936
47873
|
|
|
47937
47874
|
this .groups .set (id, this .group);
|
|
47938
47875
|
|
|
47939
|
-
if (name)
|
|
47876
|
+
if (name && !this .group .getValue () .getName ())
|
|
47940
47877
|
{
|
|
47941
47878
|
scene .addNamedNode (scene .getUniqueName (name), this .group);
|
|
47942
47879
|
scene .addExportedNode (scene .getUniqueExportName (name), this .group);
|
|
@@ -48188,7 +48125,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
|
|
|
48188
48125
|
|
|
48189
48126
|
if (OBJParser_Grammar .int32 .parse (this))
|
|
48190
48127
|
{
|
|
48191
|
-
this .value = parseInt (this .result [
|
|
48128
|
+
this .value = parseInt (this .result [0]);
|
|
48192
48129
|
|
|
48193
48130
|
return true;
|
|
48194
48131
|
}
|
|
@@ -48201,7 +48138,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
|
|
|
48201
48138
|
|
|
48202
48139
|
if (OBJParser_Grammar .double .parse (this))
|
|
48203
48140
|
{
|
|
48204
|
-
this .value = parseFloat (this .result [
|
|
48141
|
+
this .value = parseFloat (this .result [0]);
|
|
48205
48142
|
|
|
48206
48143
|
return true;
|
|
48207
48144
|
}
|
|
@@ -48362,7 +48299,7 @@ Object .assign (MaterialParser .prototype,
|
|
|
48362
48299
|
|
|
48363
48300
|
if (OBJParser_Grammar .untilEndOfLine .parse (this))
|
|
48364
48301
|
{
|
|
48365
|
-
this .id = this .result [
|
|
48302
|
+
this .id = this .result [0];
|
|
48366
48303
|
|
|
48367
48304
|
this .material = this .executionContext .createNode ("Material");
|
|
48368
48305
|
|
|
@@ -48529,7 +48466,7 @@ Object .assign (MaterialParser .prototype,
|
|
|
48529
48466
|
|
|
48530
48467
|
if (OBJParser_Grammar .untilEndOfLine .parse (this))
|
|
48531
48468
|
{
|
|
48532
|
-
const string = this .result [
|
|
48469
|
+
const string = this .result [0];
|
|
48533
48470
|
|
|
48534
48471
|
if (string .length && this .id .length)
|
|
48535
48472
|
{
|
|
@@ -48564,7 +48501,7 @@ Object .assign (MaterialParser .prototype,
|
|
|
48564
48501
|
|
|
48565
48502
|
if (OBJParser_Grammar .int32 .parse (this))
|
|
48566
48503
|
{
|
|
48567
|
-
this .value = parseInt (this .result [
|
|
48504
|
+
this .value = parseInt (this .result [0]);
|
|
48568
48505
|
|
|
48569
48506
|
return true;
|
|
48570
48507
|
}
|
|
@@ -48577,7 +48514,7 @@ Object .assign (MaterialParser .prototype,
|
|
|
48577
48514
|
|
|
48578
48515
|
if (OBJParser_Grammar .double .parse (this))
|
|
48579
48516
|
{
|
|
48580
|
-
this .value = parseFloat (this .result [
|
|
48517
|
+
this .value = parseFloat (this .result [0]);
|
|
48581
48518
|
|
|
48582
48519
|
return true;
|
|
48583
48520
|
}
|
|
@@ -48687,7 +48624,7 @@ const STLAParser_Grammar = Parser_Expressions ({
|
|
|
48687
48624
|
whitespaces: /[\x20\n\t\r]+/gy,
|
|
48688
48625
|
whitespacesNoLineTerminator: /[\x20\t]+/gy,
|
|
48689
48626
|
comment: /;.*?(?=[\n\r])/gy,
|
|
48690
|
-
untilEndOfLine: /
|
|
48627
|
+
untilEndOfLine: /[^\r\n]+/gy,
|
|
48691
48628
|
|
|
48692
48629
|
// Keywords
|
|
48693
48630
|
solid: /solid/gy,
|
|
@@ -48701,8 +48638,8 @@ const STLAParser_Grammar = Parser_Expressions ({
|
|
|
48701
48638
|
endsolid: /endsolid/gy,
|
|
48702
48639
|
|
|
48703
48640
|
// Values
|
|
48704
|
-
name:
|
|
48705
|
-
double: /
|
|
48641
|
+
name: /\w+/gy,
|
|
48642
|
+
double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/gy,
|
|
48706
48643
|
constants: /([+-])((?:NAN|INF|INFINITY))/igy,
|
|
48707
48644
|
});
|
|
48708
48645
|
|
|
@@ -48816,7 +48753,7 @@ Object .assign (Object .setPrototypeOf (STLAParser .prototype, Parser_X3DParser
|
|
|
48816
48753
|
geometry = scene .createNode ("TriangleSet"),
|
|
48817
48754
|
normal = scene .createNode ("Normal"),
|
|
48818
48755
|
coordinate = scene .createNode ("Coordinate"),
|
|
48819
|
-
name = this .sanitizeName (STLAParser_Grammar .name .parse (this) ? this .result [
|
|
48756
|
+
name = this .sanitizeName (STLAParser_Grammar .name .parse (this) ? this .result [0] : "");
|
|
48820
48757
|
|
|
48821
48758
|
STLAParser_Grammar .untilEndOfLine .parse (this);
|
|
48822
48759
|
|
|
@@ -48980,7 +48917,7 @@ Object .assign (Object .setPrototypeOf (STLAParser .prototype, Parser_X3DParser
|
|
|
48980
48917
|
|
|
48981
48918
|
if (STLAParser_Grammar .double .parse (this))
|
|
48982
48919
|
{
|
|
48983
|
-
this .value = parseFloat (this .result [
|
|
48920
|
+
this .value = parseFloat (this .result [0]);
|
|
48984
48921
|
|
|
48985
48922
|
return true;
|
|
48986
48923
|
}
|
|
@@ -49224,7 +49161,7 @@ const PLYAParser_Grammar = Parser_Expressions ({
|
|
|
49224
49161
|
// General
|
|
49225
49162
|
whitespaces: /[\x20\n\t\r]+/gy,
|
|
49226
49163
|
whitespacesNoLineTerminator: /[\x20\t]+/gy,
|
|
49227
|
-
untilEndOfLine: /
|
|
49164
|
+
untilEndOfLine: /[^\r\n]+/gy,
|
|
49228
49165
|
line: /.*?\r?\n/gy,
|
|
49229
49166
|
|
|
49230
49167
|
// Keywords
|
|
@@ -49232,15 +49169,15 @@ const PLYAParser_Grammar = Parser_Expressions ({
|
|
|
49232
49169
|
format: /format ascii 1.0/gy,
|
|
49233
49170
|
comment: /\bcomment\b/gy,
|
|
49234
49171
|
element: /\belement\b/gy,
|
|
49235
|
-
elementName: /\b
|
|
49172
|
+
elementName: /\b\S+\b/gy,
|
|
49236
49173
|
property: /\bproperty\b/gy,
|
|
49237
49174
|
propertyList: /\blist\b/gy,
|
|
49238
|
-
propertyType: /\b(char|uchar|short|ushort|int|uint|float|double|int8|uint8|int16|uint16|int32|uint32|float32|float64)\b/gy,
|
|
49239
|
-
propertyName: /\b
|
|
49175
|
+
propertyType: /\b(?:char|uchar|short|ushort|int|uint|float|double|int8|uint8|int16|uint16|int32|uint32|float32|float64)\b/gy,
|
|
49176
|
+
propertyName: /\b\S+\b/gy,
|
|
49240
49177
|
endHeader: /\bend_header\b/gy,
|
|
49241
49178
|
|
|
49242
|
-
double: /
|
|
49243
|
-
int32: /(
|
|
49179
|
+
double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/gy,
|
|
49180
|
+
int32: /(?:0[xX][\da-fA-F]+)|(?:[+-]?\d+)/gy,
|
|
49244
49181
|
});
|
|
49245
49182
|
|
|
49246
49183
|
/*
|
|
@@ -49329,7 +49266,7 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
|
|
|
49329
49266
|
{
|
|
49330
49267
|
if (PLYAParser_Grammar .comment .parse (this) && PLYAParser_Grammar .untilEndOfLine .parse (this))
|
|
49331
49268
|
{
|
|
49332
|
-
this .comments .push (this .result [
|
|
49269
|
+
this .comments .push (this .result [0] .trim ());
|
|
49333
49270
|
return true;
|
|
49334
49271
|
}
|
|
49335
49272
|
|
|
@@ -49341,7 +49278,7 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
|
|
|
49341
49278
|
|
|
49342
49279
|
if (PLYAParser_Grammar .double .parse (this))
|
|
49343
49280
|
{
|
|
49344
|
-
this .value = parseFloat (this .result [
|
|
49281
|
+
this .value = parseFloat (this .result [0]);
|
|
49345
49282
|
|
|
49346
49283
|
return true;
|
|
49347
49284
|
}
|
|
@@ -49354,7 +49291,7 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
|
|
|
49354
49291
|
|
|
49355
49292
|
if (PLYAParser_Grammar .int32 .parse (this))
|
|
49356
49293
|
{
|
|
49357
|
-
this .value = parseInt (this .result [
|
|
49294
|
+
this .value = parseInt (this .result [0]);
|
|
49358
49295
|
|
|
49359
49296
|
return true;
|
|
49360
49297
|
}
|
|
@@ -49428,7 +49365,7 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
|
|
|
49428
49365
|
|
|
49429
49366
|
if (PLYAParser_Grammar .elementName .parse (this))
|
|
49430
49367
|
{
|
|
49431
|
-
const name = this .result [
|
|
49368
|
+
const name = this .result [0];
|
|
49432
49369
|
|
|
49433
49370
|
if (this .int32 ())
|
|
49434
49371
|
{
|
|
@@ -49465,14 +49402,14 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
|
|
|
49465
49402
|
if (PLYAParser_Grammar .propertyType .parse (this))
|
|
49466
49403
|
{
|
|
49467
49404
|
const
|
|
49468
|
-
type = this .result [
|
|
49405
|
+
type = this .result [0],
|
|
49469
49406
|
value = this .typeMapping .get (type);
|
|
49470
49407
|
|
|
49471
49408
|
this .whitespacesNoLineTerminator ();
|
|
49472
49409
|
|
|
49473
49410
|
if (PLYAParser_Grammar .propertyName .parse (this))
|
|
49474
49411
|
{
|
|
49475
|
-
const name = this .result [
|
|
49412
|
+
const name = this .result [0];
|
|
49476
49413
|
|
|
49477
49414
|
properties .push ({ type, value, name });
|
|
49478
49415
|
return true;
|
|
@@ -49485,21 +49422,21 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
|
|
|
49485
49422
|
|
|
49486
49423
|
if (PLYAParser_Grammar .propertyType .parse (this))
|
|
49487
49424
|
{
|
|
49488
|
-
const count = this .typeMapping .get (this .result [
|
|
49425
|
+
const count = this .typeMapping .get (this .result [0]);
|
|
49489
49426
|
|
|
49490
49427
|
this .whitespacesNoLineTerminator ();
|
|
49491
49428
|
|
|
49492
49429
|
if (PLYAParser_Grammar .propertyType .parse (this))
|
|
49493
49430
|
{
|
|
49494
49431
|
const
|
|
49495
|
-
type = this .result [
|
|
49432
|
+
type = this .result [0],
|
|
49496
49433
|
value = this .typeMapping .get (type);
|
|
49497
49434
|
|
|
49498
49435
|
this .whitespacesNoLineTerminator ();
|
|
49499
49436
|
|
|
49500
49437
|
if (PLYAParser_Grammar .propertyName .parse (this))
|
|
49501
49438
|
{
|
|
49502
|
-
const name = this .result [
|
|
49439
|
+
const name = this .result [0];
|
|
49503
49440
|
|
|
49504
49441
|
properties .push ({ count, type, value, name });
|
|
49505
49442
|
return true;
|
|
@@ -50884,8 +50821,8 @@ const MatrixStack_default_ = MatrixStack;
|
|
|
50884
50821
|
x_ite_Namespace .add ("MatrixStack", "standard/Math/Utility/MatrixStack", MatrixStack_default_);
|
|
50885
50822
|
/* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
|
|
50886
50823
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
|
|
50887
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
50888
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
50824
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(575);
|
|
50825
|
+
/* provided dependency */ var libtess = __webpack_require__(932);
|
|
50889
50826
|
/*******************************************************************************
|
|
50890
50827
|
*
|
|
50891
50828
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -50963,12 +50900,12 @@ const SVGParser_Grammar = Parser_Expressions ({
|
|
|
50963
50900
|
closeParenthesis: /\)/gy,
|
|
50964
50901
|
|
|
50965
50902
|
// Units
|
|
50966
|
-
length: /
|
|
50903
|
+
length: /em|ex|px|in|cm|mm|pt|pc|%/gy,
|
|
50967
50904
|
percent: /%/gy,
|
|
50968
50905
|
|
|
50969
50906
|
// Values
|
|
50970
|
-
int32: /(
|
|
50971
|
-
double: /
|
|
50907
|
+
int32: /(?:0[xX][\da-fA-F]+)|(?:[+-]?\d+)/gy,
|
|
50908
|
+
double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/gy,
|
|
50972
50909
|
constants: /([+-])((?:NAN|INF|INFINITY))/igy,
|
|
50973
50910
|
matrix: /matrix/gy,
|
|
50974
50911
|
translate: /translate/gy,
|
|
@@ -50976,9 +50913,9 @@ const SVGParser_Grammar = Parser_Expressions ({
|
|
|
50976
50913
|
scale: /scale/gy,
|
|
50977
50914
|
skewX: /skewX/gy,
|
|
50978
50915
|
skewY: /skewY/gy,
|
|
50979
|
-
color: /
|
|
50916
|
+
color: /[a-zA-Z]+|#[\da-fA-F]+|rgba?\(.*?\)/gy,
|
|
50980
50917
|
url: /url\("?(.*?)"?\)/gy,
|
|
50981
|
-
path: /
|
|
50918
|
+
path: /[mMlLhHvVqQtTcCsSaAzZ]/gy,
|
|
50982
50919
|
});
|
|
50983
50920
|
|
|
50984
50921
|
/*
|
|
@@ -52164,7 +52101,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
|
|
|
52164
52101
|
|
|
52165
52102
|
if (SVGParser_Grammar .length .parse (this))
|
|
52166
52103
|
{
|
|
52167
|
-
switch (this .result [
|
|
52104
|
+
switch (this .result [0])
|
|
52168
52105
|
{
|
|
52169
52106
|
case "em":
|
|
52170
52107
|
value *= EM;
|
|
@@ -52290,7 +52227,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
|
|
|
52290
52227
|
break;
|
|
52291
52228
|
|
|
52292
52229
|
previous = command;
|
|
52293
|
-
command = this .result [
|
|
52230
|
+
command = this .result [0];
|
|
52294
52231
|
relative = command === command .toLowerCase ();
|
|
52295
52232
|
|
|
52296
52233
|
switch (command)
|
|
@@ -53338,7 +53275,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
|
|
|
53338
53275
|
|
|
53339
53276
|
if (SVGParser_Grammar .int32 .parse (this))
|
|
53340
53277
|
{
|
|
53341
|
-
this .value = parseInt (this .result [
|
|
53278
|
+
this .value = parseInt (this .result [0]);
|
|
53342
53279
|
|
|
53343
53280
|
return true;
|
|
53344
53281
|
}
|
|
@@ -53351,7 +53288,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
|
|
|
53351
53288
|
|
|
53352
53289
|
if (SVGParser_Grammar .double .parse (this))
|
|
53353
53290
|
{
|
|
53354
|
-
this .value = parseFloat (this .result [
|
|
53291
|
+
this .value = parseFloat (this .result [0]);
|
|
53355
53292
|
|
|
53356
53293
|
return true;
|
|
53357
53294
|
}
|
|
@@ -53379,7 +53316,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
|
|
|
53379
53316
|
|
|
53380
53317
|
const defaultColor = this .cssColor (c);
|
|
53381
53318
|
|
|
53382
|
-
this .value = color .set (... this .convertColor (this .result [
|
|
53319
|
+
this .value = color .set (... this .convertColor (this .result [0], defaultColor));
|
|
53383
53320
|
|
|
53384
53321
|
return true;
|
|
53385
53322
|
};
|
|
@@ -53653,7 +53590,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
53653
53590
|
x_ite_Namespace .add ("SVGParser", "x_ite/Parser/SVGParser", SVGParser_default_);
|
|
53654
53591
|
/* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
|
|
53655
53592
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
|
|
53656
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
53593
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(575);
|
|
53657
53594
|
/*******************************************************************************
|
|
53658
53595
|
*
|
|
53659
53596
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -54003,7 +53940,7 @@ const Plane3_default_ = Plane3;
|
|
|
54003
53940
|
x_ite_Namespace .add ("Plane3", "standard/Math/Geometry/Plane3", Plane3_default_);
|
|
54004
53941
|
/* harmony default export */ const Geometry_Plane3 = (Plane3_default_);
|
|
54005
53942
|
;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
|
|
54006
|
-
/* provided dependency */ var Triangle3_libtess = __webpack_require__(
|
|
53943
|
+
/* provided dependency */ var Triangle3_libtess = __webpack_require__(932);
|
|
54007
53944
|
/*******************************************************************************
|
|
54008
53945
|
*
|
|
54009
53946
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -60211,7 +60148,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60211
60148
|
{
|
|
60212
60149
|
this .vertexArrayObject .update ();
|
|
60213
60150
|
|
|
60214
|
-
this .
|
|
60151
|
+
this .updateInstances = true;
|
|
60215
60152
|
},
|
|
60216
60153
|
buildTexCoords ()
|
|
60217
60154
|
{
|
|
@@ -60961,7 +60898,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60961
60898
|
{
|
|
60962
60899
|
const instances = shapeNode .getInstances ();
|
|
60963
60900
|
|
|
60964
|
-
if (instances .vertexArrayObject .update (this .
|
|
60901
|
+
if (instances .vertexArrayObject .update (this .updateInstances) .enable (shaderNode .getProgram ()))
|
|
60965
60902
|
{
|
|
60966
60903
|
const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
|
|
60967
60904
|
|
|
@@ -60973,11 +60910,14 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60973
60910
|
if (normalMatrixOffset !== undefined)
|
|
60974
60911
|
shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
|
|
60975
60912
|
|
|
60913
|
+
if (this .coordIndices .length)
|
|
60914
|
+
shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
|
|
60915
|
+
|
|
60976
60916
|
shaderNode .enableTexCoordAttribute (gl, this .texCoordBuffers, 0, 0);
|
|
60977
60917
|
shaderNode .enableNormalAttribute (gl, this .normalBuffer, 0, 0);
|
|
60978
60918
|
shaderNode .enableVertexAttribute (gl, this .vertexBuffer, 0, 0);
|
|
60979
60919
|
|
|
60980
|
-
this .
|
|
60920
|
+
this .updateInstances = false;
|
|
60981
60921
|
}
|
|
60982
60922
|
|
|
60983
60923
|
gl .drawArraysInstanced (this .primitiveMode, 0, this .vertexCount, shapeNode .getNumInstances ());
|
|
@@ -61022,18 +60962,24 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61022
60962
|
|
|
61023
60963
|
const instances = shapeNode .getInstances ();
|
|
61024
60964
|
|
|
61025
|
-
if (instances .vertexArrayObject .update (this .
|
|
60965
|
+
if (instances .vertexArrayObject .update (this .updateInstances) .enable (shaderNode .getProgram ()))
|
|
61026
60966
|
{
|
|
61027
|
-
const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
|
|
60967
|
+
const { instancesStride, particleOffset, velocityOffset, matrixOffset, normalMatrixOffset } = shapeNode;
|
|
61028
60968
|
|
|
61029
60969
|
if (particleOffset !== undefined)
|
|
61030
60970
|
shaderNode .enableParticleAttribute (gl, instances, instancesStride, particleOffset, 1);
|
|
61031
60971
|
|
|
60972
|
+
if (velocityOffset !== undefined)
|
|
60973
|
+
shaderNode .enableParticleVelocityAttribute (gl, instances, instancesStride, velocityOffset, 1);
|
|
60974
|
+
|
|
61032
60975
|
shaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 1);
|
|
61033
60976
|
|
|
61034
60977
|
if (normalMatrixOffset !== undefined)
|
|
61035
60978
|
shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
|
|
61036
60979
|
|
|
60980
|
+
if (this .coordIndices .length)
|
|
60981
|
+
shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
|
|
60982
|
+
|
|
61037
60983
|
for (let i = 0, length = attribNodes .length; i < length; ++ i)
|
|
61038
60984
|
attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
|
|
61039
60985
|
|
|
@@ -61047,7 +60993,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61047
60993
|
shaderNode .enableNormalAttribute (gl, this .normalBuffer, 0, 0);
|
|
61048
60994
|
shaderNode .enableVertexAttribute (gl, this .vertexBuffer, 0, 0);
|
|
61049
60995
|
|
|
61050
|
-
this .
|
|
60996
|
+
this .updateInstances = false;
|
|
61051
60997
|
}
|
|
61052
60998
|
|
|
61053
60999
|
// Draw depending on wireframe, solid and transparent.
|
|
@@ -62432,9 +62378,23 @@ Object .assign (Object .setPrototypeOf (X3DTexture2DNode .prototype, Texturing_X
|
|
|
62432
62378
|
},
|
|
62433
62379
|
clearTexture ()
|
|
62434
62380
|
{
|
|
62435
|
-
this .
|
|
62381
|
+
this .setTextureData (1, 1, false, false, defaultData);
|
|
62382
|
+
},
|
|
62383
|
+
getTextureData (texture = this .getTexture (), width = this .getWidth (), height = this .getHeight ())
|
|
62384
|
+
{
|
|
62385
|
+
const
|
|
62386
|
+
gl = this .getBrowser () .getContext (),
|
|
62387
|
+
framebuffer = gl .createFramebuffer (),
|
|
62388
|
+
data = new Uint8Array (width * height * 4);
|
|
62389
|
+
|
|
62390
|
+
gl .bindFramebuffer (gl .FRAMEBUFFER, framebuffer);
|
|
62391
|
+
gl .framebufferTexture2D (gl .FRAMEBUFFER, gl .COLOR_ATTACHMENT0, gl .TEXTURE_2D, texture, 0);
|
|
62392
|
+
gl .readPixels (0, 0, width, height, gl .RGBA, gl .UNSIGNED_BYTE, data);
|
|
62393
|
+
gl .deleteFramebuffer (framebuffer);
|
|
62394
|
+
|
|
62395
|
+
return data;
|
|
62436
62396
|
},
|
|
62437
|
-
|
|
62397
|
+
setTextureData (width, height, colorSpaceConversion, transparent, data)
|
|
62438
62398
|
{
|
|
62439
62399
|
this .width = width;
|
|
62440
62400
|
this .height = height;
|
|
@@ -62455,7 +62415,7 @@ Object .assign (Object .setPrototypeOf (X3DTexture2DNode .prototype, Texturing_X
|
|
|
62455
62415
|
this .updateTextureParameters ();
|
|
62456
62416
|
this .addNodeEvent ();
|
|
62457
62417
|
},
|
|
62458
|
-
|
|
62418
|
+
updateTextureData (data)
|
|
62459
62419
|
{
|
|
62460
62420
|
const gl = this .getBrowser () .getContext ();
|
|
62461
62421
|
|
|
@@ -62509,7 +62469,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
62509
62469
|
x_ite_Namespace .add ("X3DTexture2DNode", "x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
|
|
62510
62470
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
|
|
62511
62471
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
62512
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
62472
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(575);
|
|
62513
62473
|
/*******************************************************************************
|
|
62514
62474
|
*
|
|
62515
62475
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -62725,7 +62685,7 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, Texturing_X3DTe
|
|
|
62725
62685
|
|
|
62726
62686
|
// Upload image to GPU.
|
|
62727
62687
|
|
|
62728
|
-
this .
|
|
62688
|
+
this .setTextureData (width, height, false, transparent, data);
|
|
62729
62689
|
this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
|
|
62730
62690
|
}
|
|
62731
62691
|
else
|
|
@@ -62734,7 +62694,7 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, Texturing_X3DTe
|
|
|
62734
62694
|
|
|
62735
62695
|
// Upload image to GPU.
|
|
62736
62696
|
|
|
62737
|
-
this .
|
|
62697
|
+
this .setTextureData (width, height, this ._colorSpaceConversion .getValue (), this .isTransparent (), image);
|
|
62738
62698
|
this .setTransparent (this .isImageTransparent (this .getTextureData (this .getTexture (), width, height)));
|
|
62739
62699
|
this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
|
|
62740
62700
|
this .addNodeEvent ();
|
|
@@ -62746,20 +62706,6 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, Texturing_X3DTe
|
|
|
62746
62706
|
this .setError ({ type: error .message });
|
|
62747
62707
|
}
|
|
62748
62708
|
},
|
|
62749
|
-
getTextureData (texture, width, height)
|
|
62750
|
-
{
|
|
62751
|
-
const
|
|
62752
|
-
gl = this .getBrowser () .getContext (),
|
|
62753
|
-
framebuffer = gl .createFramebuffer (),
|
|
62754
|
-
data = new Uint8Array (width * height * 4);
|
|
62755
|
-
|
|
62756
|
-
gl .bindFramebuffer (gl .FRAMEBUFFER, framebuffer);
|
|
62757
|
-
gl .framebufferTexture2D (gl .FRAMEBUFFER, gl .COLOR_ATTACHMENT0, gl .TEXTURE_2D, texture, 0);
|
|
62758
|
-
gl .readPixels (0, 0, width, height, gl .RGBA, gl .UNSIGNED_BYTE, data);
|
|
62759
|
-
gl .deleteFramebuffer (framebuffer);
|
|
62760
|
-
|
|
62761
|
-
return data;
|
|
62762
|
-
},
|
|
62763
62709
|
dispose ()
|
|
62764
62710
|
{
|
|
62765
62711
|
Networking_X3DUrlObject .prototype .dispose .call (this);
|
|
@@ -66107,7 +66053,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
66107
66053
|
x_ite_Namespace .add ("X3DWorld", "x_ite/Execution/X3DWorld", X3DWorld_default_);
|
|
66108
66054
|
/* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
|
|
66109
66055
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
|
|
66110
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
66056
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(575);
|
|
66111
66057
|
/*******************************************************************************
|
|
66112
66058
|
*
|
|
66113
66059
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -66161,7 +66107,7 @@ x_ite_Namespace .add ("X3DWorld", "x_ite/Execution/X3DWorld", X3DWorld_default_)
|
|
|
66161
66107
|
|
|
66162
66108
|
|
|
66163
66109
|
|
|
66164
|
-
const
|
|
66110
|
+
const foreignMimeType = new Set ([
|
|
66165
66111
|
"text/html",
|
|
66166
66112
|
"application/xhtml+xml",
|
|
66167
66113
|
])
|
|
@@ -66351,7 +66297,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
|
|
|
66351
66297
|
this .URL .pathname === referer .pathname &&
|
|
66352
66298
|
this .URL .hash)
|
|
66353
66299
|
{
|
|
66354
|
-
this .bindViewpoint (decodeURIComponent (this .URL .hash .
|
|
66300
|
+
this .bindViewpoint (decodeURIComponent (this .URL .hash .substring (1)));
|
|
66355
66301
|
return;
|
|
66356
66302
|
}
|
|
66357
66303
|
}
|
|
@@ -66372,15 +66318,15 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
|
|
|
66372
66318
|
// Load URL async
|
|
66373
66319
|
|
|
66374
66320
|
const
|
|
66375
|
-
options
|
|
66376
|
-
response
|
|
66377
|
-
|
|
66321
|
+
options = { cache: this .node .getCache () ? "default" : "reload", signal: this .controller .signal },
|
|
66322
|
+
response = this .checkResponse (await fetch (this .URL, options)),
|
|
66323
|
+
mimeType = response .headers .get ("content-type") ?.replace (/;.*$/, "");
|
|
66378
66324
|
|
|
66379
66325
|
if (this .foreign)
|
|
66380
66326
|
{
|
|
66381
|
-
// console .log (
|
|
66327
|
+
// console .log (mimeType);
|
|
66382
66328
|
|
|
66383
|
-
if (
|
|
66329
|
+
if (foreignMimeType .has (mimeType))
|
|
66384
66330
|
return this .foreign (this .URL .href, this .target);
|
|
66385
66331
|
}
|
|
66386
66332
|
|
|
@@ -67043,7 +66989,7 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
|
|
|
67043
66989
|
x_ite_Namespace .add ("ProtoDeclarationArray", "x_ite/Prototype/ProtoDeclarationArray", ProtoDeclarationArray_default_);
|
|
67044
66990
|
/* harmony default export */ const Prototype_ProtoDeclarationArray = (ProtoDeclarationArray_default_);
|
|
67045
66991
|
;// CONCATENATED MODULE: ./src/x_ite/Routing/X3DRoute.js
|
|
67046
|
-
/* provided dependency */ var X3DRoute_$ = __webpack_require__(
|
|
66992
|
+
/* provided dependency */ var X3DRoute_$ = __webpack_require__(575);
|
|
67047
66993
|
/*******************************************************************************
|
|
67048
66994
|
*
|
|
67049
66995
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -67843,7 +67789,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
67843
67789
|
throw new Error (`Couldn't add named node: node named '${name}' is already in use.`);
|
|
67844
67790
|
|
|
67845
67791
|
if (this [_namedNodes] .get (node .getName ()) ?.getValue () === node)
|
|
67846
|
-
throw new Error (`Couldn't add named node: node named '${node .getName ()}'
|
|
67792
|
+
throw new Error (`Couldn't add named node: node named '${node .getName ()}' already has a name.`);
|
|
67847
67793
|
|
|
67848
67794
|
// Add named node.
|
|
67849
67795
|
|
|
@@ -77422,6 +77368,17 @@ function X3DTransformMatrix3DNode (executionContext)
|
|
|
77422
77368
|
|
|
77423
77369
|
Object .assign (Object .setPrototypeOf (X3DTransformMatrix3DNode .prototype, Grouping_X3DGroupingNode .prototype),
|
|
77424
77370
|
{
|
|
77371
|
+
getBBox (bbox, shadows)
|
|
77372
|
+
{
|
|
77373
|
+
if (this ._bboxSize .getValue () .equals (this .getDefaultBBoxSize ()))
|
|
77374
|
+
return this .getSubBBox (bbox, shadows) .multRight (this .matrix);
|
|
77375
|
+
|
|
77376
|
+
return bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
|
|
77377
|
+
},
|
|
77378
|
+
getMatrix ()
|
|
77379
|
+
{
|
|
77380
|
+
return this .matrix;
|
|
77381
|
+
},
|
|
77425
77382
|
setMatrix (matrix)
|
|
77426
77383
|
{
|
|
77427
77384
|
if (matrix .equals (Numbers_Matrix4 .Identity))
|
|
@@ -77439,10 +77396,6 @@ Object .assign (Object .setPrototypeOf (X3DTransformMatrix3DNode .prototype, Gro
|
|
|
77439
77396
|
delete this .traverse;
|
|
77440
77397
|
}
|
|
77441
77398
|
},
|
|
77442
|
-
getMatrix ()
|
|
77443
|
-
{
|
|
77444
|
-
return this .matrix;
|
|
77445
|
-
},
|
|
77446
77399
|
setTransform (t, r, s, so, c)
|
|
77447
77400
|
{
|
|
77448
77401
|
if (t .equals (Numbers_Vector3 .Zero) && r .equals (Numbers_Rotation4 .Identity) && s .equals (Numbers_Vector3 .One))
|
|
@@ -77460,13 +77413,6 @@ Object .assign (Object .setPrototypeOf (X3DTransformMatrix3DNode .prototype, Gro
|
|
|
77460
77413
|
delete this .traverse;
|
|
77461
77414
|
}
|
|
77462
77415
|
},
|
|
77463
|
-
getBBox (bbox, shadows)
|
|
77464
|
-
{
|
|
77465
|
-
if (this ._bboxSize .getValue () .equals (this .getDefaultBBoxSize ()))
|
|
77466
|
-
return this .getSubBBox (bbox, shadows) .multRight (this .matrix);
|
|
77467
|
-
|
|
77468
|
-
return bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
|
|
77469
|
-
},
|
|
77470
77416
|
traverse (type, renderObject)
|
|
77471
77417
|
{
|
|
77472
77418
|
const modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
@@ -87141,10 +87087,10 @@ function X3DLineGeometryNode (executionContext)
|
|
|
87141
87087
|
browser = this .getBrowser (),
|
|
87142
87088
|
gl = browser .getContext ();
|
|
87143
87089
|
|
|
87144
|
-
this .lineStipples
|
|
87145
|
-
this .lineStippleBuffer
|
|
87146
|
-
this .
|
|
87147
|
-
this .
|
|
87090
|
+
this .lineStipples = new Float32Array ();
|
|
87091
|
+
this .lineStippleBuffer = gl .createBuffer ();
|
|
87092
|
+
this .lineTrianglesBuffer = gl .createBuffer ();
|
|
87093
|
+
this .thickLinesVertexArrayObject = new Rendering_VertexArray (gl);
|
|
87148
87094
|
|
|
87149
87095
|
this .setGeometryType (1);
|
|
87150
87096
|
this .setPrimitiveMode (gl .LINES);
|
|
@@ -87165,25 +87111,25 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87165
87111
|
{
|
|
87166
87112
|
Rendering_X3DGeometryNode .prototype .updateVertexArrays .call (this);
|
|
87167
87113
|
|
|
87168
|
-
this .
|
|
87114
|
+
this .thickLinesVertexArrayObject .update ();
|
|
87169
87115
|
},
|
|
87170
87116
|
buildTexCoords ()
|
|
87171
87117
|
{
|
|
87172
87118
|
// Line stipple support.
|
|
87173
87119
|
|
|
87174
|
-
|
|
87120
|
+
const numLines = this .getVertices () .length / 8;
|
|
87121
|
+
|
|
87122
|
+
if (this .lineStipples .length / 6 === numLines)
|
|
87175
87123
|
return;
|
|
87176
87124
|
|
|
87177
|
-
const
|
|
87178
|
-
gl = this .getBrowser () .getContext (),
|
|
87179
|
-
numLines = this .getVertices () .length / 8;
|
|
87125
|
+
const gl = this .getBrowser () .getContext ();
|
|
87180
87126
|
|
|
87181
87127
|
this .lineStipples = new Float32Array (numLines * 6);
|
|
87182
87128
|
|
|
87183
87129
|
gl .bindBuffer (gl .ARRAY_BUFFER, this .lineStippleBuffer);
|
|
87184
87130
|
gl .bufferData (gl .ARRAY_BUFFER, this .lineStipples, gl .DYNAMIC_DRAW);
|
|
87185
87131
|
|
|
87186
|
-
gl .bindBuffer (gl .ARRAY_BUFFER, this .
|
|
87132
|
+
gl .bindBuffer (gl .ARRAY_BUFFER, this .lineTrianglesBuffer);
|
|
87187
87133
|
gl .bufferData (gl .ARRAY_BUFFER, new Float32Array (16 * 6 * numLines), gl .DYNAMIC_DRAW);
|
|
87188
87134
|
},
|
|
87189
87135
|
updateLengthSoFar: (() =>
|
|
@@ -87240,7 +87186,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87240
87186
|
{
|
|
87241
87187
|
// Setup vertex attributes.
|
|
87242
87188
|
|
|
87243
|
-
if (this .
|
|
87189
|
+
if (this .thickLinesVertexArrayObject .enable (shaderNode .getProgram ()))
|
|
87244
87190
|
{
|
|
87245
87191
|
const
|
|
87246
87192
|
stride = 16 * Float32Array .BYTES_PER_ELEMENT,
|
|
@@ -87249,15 +87195,13 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87249
87195
|
normalOffset = 9 * Float32Array .BYTES_PER_ELEMENT,
|
|
87250
87196
|
vertexOffset = 12 * Float32Array .BYTES_PER_ELEMENT;
|
|
87251
87197
|
|
|
87252
|
-
shaderNode .enableCoordIndexAttribute (gl, this .
|
|
87253
|
-
shaderNode .enableLineStippleAttribute (gl, this .
|
|
87198
|
+
shaderNode .enableCoordIndexAttribute (gl, this .lineTrianglesBuffer, stride, coordIndexOffset);
|
|
87199
|
+
shaderNode .enableLineStippleAttribute (gl, this .lineTrianglesBuffer, stride, lineStippleOffset);
|
|
87254
87200
|
|
|
87255
87201
|
if (this .hasNormals)
|
|
87256
|
-
shaderNode .enableNormalAttribute (gl, this .
|
|
87202
|
+
shaderNode .enableNormalAttribute (gl, this .lineTrianglesBuffer, stride, normalOffset);
|
|
87257
87203
|
|
|
87258
|
-
shaderNode .enableVertexAttribute (gl, this .
|
|
87259
|
-
|
|
87260
|
-
gl .bindBuffer (gl .ARRAY_BUFFER, null);
|
|
87204
|
+
shaderNode .enableVertexAttribute (gl, this .lineTrianglesBuffer, stride, vertexOffset);
|
|
87261
87205
|
}
|
|
87262
87206
|
|
|
87263
87207
|
gl .frontFace (gl .CCW);
|
|
@@ -87326,31 +87270,30 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87326
87270
|
gl .uniform4f (transformShaderNode .viewport, viewport .x, viewport .y, viewport .z, viewport .w);
|
|
87327
87271
|
gl .uniformMatrix4fv (transformShaderNode .modelViewProjectionMatrix, false, modelViewProjectionMatrixArray);
|
|
87328
87272
|
gl .uniformMatrix4fv (transformShaderNode .invModelViewProjectionMatrix, false, invModelViewProjectionMatrixArray);
|
|
87329
|
-
gl .uniform1f (transformShaderNode .
|
|
87273
|
+
gl .uniform1f (transformShaderNode .linewidthScaleFactor1_2, linePropertiesNode .getLinewidthScaleFactor () / 2);
|
|
87330
87274
|
|
|
87331
87275
|
// Setup vertex attributes.
|
|
87332
87276
|
|
|
87333
|
-
if (this .
|
|
87277
|
+
if (this .thickLinesVertexArrayObject .enable (transformShaderNode .getProgram ()))
|
|
87334
87278
|
{
|
|
87335
87279
|
const
|
|
87336
|
-
coordIndexStride
|
|
87337
|
-
coordIndexOffset0
|
|
87338
|
-
coordIndexOffset1
|
|
87339
|
-
|
|
87340
|
-
|
|
87341
|
-
|
|
87342
|
-
|
|
87343
|
-
|
|
87344
|
-
|
|
87345
|
-
|
|
87346
|
-
|
|
87347
|
-
|
|
87348
|
-
|
|
87349
|
-
|
|
87350
|
-
|
|
87351
|
-
|
|
87352
|
-
|
|
87353
|
-
vertexOffset1 = 4 * Float32Array .BYTES_PER_ELEMENT;
|
|
87280
|
+
coordIndexStride = 2 * Float32Array .BYTES_PER_ELEMENT,
|
|
87281
|
+
coordIndexOffset0 = 0,
|
|
87282
|
+
coordIndexOffset1 = 1 * Float32Array .BYTES_PER_ELEMENT,
|
|
87283
|
+
lengthSoFarStride = 6 * Float32Array .BYTES_PER_ELEMENT,
|
|
87284
|
+
lengthSoFarOffset = 5 * Float32Array .BYTES_PER_ELEMENT,
|
|
87285
|
+
fogDepthStride = 2 * Float32Array .BYTES_PER_ELEMENT,
|
|
87286
|
+
fogDepthOffset0 = 0,
|
|
87287
|
+
fogDepthOffset1 = 1 * Float32Array .BYTES_PER_ELEMENT,
|
|
87288
|
+
colorStride = 8 * Float32Array .BYTES_PER_ELEMENT,
|
|
87289
|
+
colorOffset0 = 0,
|
|
87290
|
+
colorOffset1 = 4 * Float32Array .BYTES_PER_ELEMENT,
|
|
87291
|
+
normalStride = 6 * Float32Array .BYTES_PER_ELEMENT,
|
|
87292
|
+
normalOffset0 = 0,
|
|
87293
|
+
normalOffset1 = 3 * Float32Array .BYTES_PER_ELEMENT,
|
|
87294
|
+
vertexStride = 8 * Float32Array .BYTES_PER_ELEMENT,
|
|
87295
|
+
vertexOffset0 = 0,
|
|
87296
|
+
vertexOffset1 = 4 * Float32Array .BYTES_PER_ELEMENT;
|
|
87354
87297
|
|
|
87355
87298
|
// for (let i = 0, length = attribNodes .length; i < length; ++ i)
|
|
87356
87299
|
// attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
|
|
@@ -87361,8 +87304,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87361
87304
|
transformShaderNode .enableFloatAttrib (gl, "x3d_CoordIndex1", this .coordIndexBuffer, 1, coordIndexStride, coordIndexOffset1);
|
|
87362
87305
|
}
|
|
87363
87306
|
|
|
87364
|
-
transformShaderNode .enableFloatAttrib (gl, "
|
|
87365
|
-
transformShaderNode .enableFloatAttrib (gl, "x3d_LineStipple1", this .lineStippleBuffer, 3, lineStippleStride, lineStippleOffset1);
|
|
87307
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_LengthSoFar", this .lineStippleBuffer, 1, lengthSoFarStride, lengthSoFarOffset);
|
|
87366
87308
|
|
|
87367
87309
|
if (this .hasFogCoords)
|
|
87368
87310
|
{
|
|
@@ -87384,12 +87326,14 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87384
87326
|
|
|
87385
87327
|
transformShaderNode .enableFloatAttrib (gl, "x3d_Vertex0", this .vertexBuffer, 4, vertexStride, vertexOffset0);
|
|
87386
87328
|
transformShaderNode .enableFloatAttrib (gl, "x3d_Vertex1", this .vertexBuffer, 4, vertexStride, vertexOffset1);
|
|
87329
|
+
|
|
87387
87330
|
}
|
|
87388
87331
|
|
|
87389
87332
|
// Transform lines.
|
|
87390
87333
|
|
|
87334
|
+
gl .bindBuffer (gl .ARRAY_BUFFER, null);
|
|
87391
87335
|
gl .bindTransformFeedback (gl .TRANSFORM_FEEDBACK, browser .getLineTransformFeedback ());
|
|
87392
|
-
gl .bindBufferBase (gl .TRANSFORM_FEEDBACK_BUFFER, 0, this .
|
|
87336
|
+
gl .bindBufferBase (gl .TRANSFORM_FEEDBACK_BUFFER, 0, this .lineTrianglesBuffer);
|
|
87393
87337
|
gl .enable (gl .RASTERIZER_DISCARD);
|
|
87394
87338
|
gl .beginTransformFeedback (gl .POINTS);
|
|
87395
87339
|
gl .drawArraysInstanced (gl .POINTS, 0, this .vertexCount / 2, 2);
|
|
@@ -87400,7 +87344,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87400
87344
|
// DEBUG
|
|
87401
87345
|
|
|
87402
87346
|
// const data = new Float32Array (16 * 6 * this .vertexCount / 2);
|
|
87403
|
-
// gl .bindBuffer (gl .ARRAY_BUFFER, this .
|
|
87347
|
+
// gl .bindBuffer (gl .ARRAY_BUFFER, this .lineTrianglesBuffer);
|
|
87404
87348
|
// gl .getBufferSubData (gl .ARRAY_BUFFER, 0, data);
|
|
87405
87349
|
// console .log (data);
|
|
87406
87350
|
|
|
@@ -87416,7 +87360,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87416
87360
|
|
|
87417
87361
|
// Setup vertex attributes.
|
|
87418
87362
|
|
|
87419
|
-
if (this .
|
|
87363
|
+
if (this .thickLinesVertexArrayObject .enable (shaderNode .getProgram ()))
|
|
87420
87364
|
{
|
|
87421
87365
|
const
|
|
87422
87366
|
stride = 16 * Float32Array .BYTES_PER_ELEMENT,
|
|
@@ -87430,21 +87374,19 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87430
87374
|
// for (let i = 0, length = attribNodes .length; i < length; ++ i)
|
|
87431
87375
|
// attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
|
|
87432
87376
|
|
|
87433
|
-
shaderNode .enableCoordIndexAttribute
|
|
87434
|
-
shaderNode .enableLineStippleAttribute (gl, this .
|
|
87377
|
+
shaderNode .enableCoordIndexAttribute (gl, this .lineTrianglesBuffer, stride, coordIndexOffset);
|
|
87378
|
+
shaderNode .enableLineStippleAttribute (gl, this .lineTrianglesBuffer, stride, lineStippleOffset);
|
|
87435
87379
|
|
|
87436
87380
|
if (this .hasFogCoords)
|
|
87437
|
-
shaderNode .enableFogDepthAttribute (gl, this .
|
|
87381
|
+
shaderNode .enableFogDepthAttribute (gl, this .lineTrianglesBuffer, stride, fogCoordOffset);
|
|
87438
87382
|
|
|
87439
87383
|
if (this .colorMaterial)
|
|
87440
|
-
shaderNode .enableColorAttribute (gl, this .
|
|
87384
|
+
shaderNode .enableColorAttribute (gl, this .lineTrianglesBuffer, stride, colorOffset);
|
|
87441
87385
|
|
|
87442
87386
|
if (this .hasNormals)
|
|
87443
|
-
shaderNode .enableNormalAttribute (gl, this .
|
|
87387
|
+
shaderNode .enableNormalAttribute (gl, this .lineTrianglesBuffer, stride, normalOffset);
|
|
87444
87388
|
|
|
87445
|
-
shaderNode .enableVertexAttribute (gl, this .
|
|
87446
|
-
|
|
87447
|
-
gl .bindBuffer (gl .ARRAY_BUFFER, null);
|
|
87389
|
+
shaderNode .enableVertexAttribute (gl, this .lineTrianglesBuffer, stride, vertexOffset);
|
|
87448
87390
|
}
|
|
87449
87391
|
|
|
87450
87392
|
gl .frontFace (gl .CCW);
|
|
@@ -87500,67 +87442,276 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87500
87442
|
gl .lineWidth (1);
|
|
87501
87443
|
};
|
|
87502
87444
|
})(),
|
|
87503
|
-
displayInstanced (
|
|
87445
|
+
displayInstanced: (() =>
|
|
87504
87446
|
{
|
|
87505
87447
|
const
|
|
87506
|
-
|
|
87507
|
-
|
|
87508
|
-
|
|
87509
|
-
renderModeNodes = appearanceNode .getRenderModes (),
|
|
87510
|
-
attribNodes = this .getAttrib (),
|
|
87511
|
-
attribBuffers = this .getAttribBuffers (),
|
|
87512
|
-
primitiveMode = browser .getPrimitiveMode (this .getPrimitiveMode ());
|
|
87448
|
+
matrix = new Numbers_Matrix4 (),
|
|
87449
|
+
modelViewProjectionMatrixArray = new Float32Array (16),
|
|
87450
|
+
invModelViewProjectionMatrixArray = new Float32Array (16);
|
|
87513
87451
|
|
|
87514
|
-
|
|
87515
|
-
|
|
87452
|
+
return function (gl, renderContext, shapeNode)
|
|
87453
|
+
{
|
|
87454
|
+
const
|
|
87455
|
+
browser = this .getBrowser (),
|
|
87456
|
+
geometryContext = shapeNode .getGeometryContext (),
|
|
87457
|
+
appearanceNode = renderContext .appearanceNode,
|
|
87458
|
+
linePropertiesNode = appearanceNode .getLineProperties (),
|
|
87459
|
+
shaderNode = appearanceNode .getShader (geometryContext, renderContext),
|
|
87460
|
+
renderModeNodes = appearanceNode .getRenderModes (),
|
|
87461
|
+
attribNodes = this .getAttrib (),
|
|
87462
|
+
attribBuffers = this .getAttribBuffers ();
|
|
87516
87463
|
|
|
87517
|
-
|
|
87464
|
+
if (linePropertiesNode)
|
|
87465
|
+
{
|
|
87466
|
+
if (linePropertiesNode .getApplied () && linePropertiesNode .getLinetype () !== 1)
|
|
87467
|
+
this .updateLengthSoFar (gl, renderContext);
|
|
87518
87468
|
|
|
87519
|
-
|
|
87520
|
-
|
|
87469
|
+
if (linePropertiesNode .getTransformLines ())
|
|
87470
|
+
{
|
|
87471
|
+
const
|
|
87472
|
+
renderObject = renderContext .renderObject,
|
|
87473
|
+
viewport = renderObject .getViewVolume () .getViewport (),
|
|
87474
|
+
projectionMatrix = renderObject .getProjectionMatrix () .get (),
|
|
87475
|
+
primitiveMode = browser .getWireframe () ? gl .TRIANGLES : browser .getPrimitiveMode (gl .TRIANGLES),
|
|
87476
|
+
transformShaderNode = browser .getLineTransformInstancedShader ();
|
|
87521
87477
|
|
|
87522
|
-
|
|
87478
|
+
modelViewProjectionMatrixArray .set (matrix .assign (renderContext .modelViewMatrix) .multRight (projectionMatrix));
|
|
87479
|
+
invModelViewProjectionMatrixArray .set (matrix .inverse ());
|
|
87523
87480
|
|
|
87524
|
-
|
|
87481
|
+
// Start
|
|
87525
87482
|
|
|
87526
|
-
|
|
87527
|
-
{
|
|
87528
|
-
const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
|
|
87483
|
+
transformShaderNode .enable (gl);
|
|
87529
87484
|
|
|
87530
|
-
|
|
87531
|
-
|
|
87485
|
+
gl .uniform4f (transformShaderNode .viewport, viewport .x, viewport .y, viewport .z, viewport .w);
|
|
87486
|
+
gl .uniformMatrix4fv (transformShaderNode .modelViewProjectionMatrix, false, modelViewProjectionMatrixArray);
|
|
87487
|
+
gl .uniformMatrix4fv (transformShaderNode .invModelViewProjectionMatrix, false, invModelViewProjectionMatrixArray);
|
|
87488
|
+
gl .uniform1f (transformShaderNode .linewidthScaleFactor1_2, linePropertiesNode .getLinewidthScaleFactor () / 2);
|
|
87532
87489
|
|
|
87533
|
-
|
|
87490
|
+
// Setup vertex attributes.
|
|
87534
87491
|
|
|
87535
|
-
|
|
87536
|
-
shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
|
|
87492
|
+
const instances = shapeNode .getInstances ();
|
|
87537
87493
|
|
|
87538
|
-
|
|
87539
|
-
|
|
87494
|
+
if (instances .thickLinesVertexArrayObject .update (this .updateInstances) .enable (transformShaderNode .getProgram ()))
|
|
87495
|
+
{
|
|
87496
|
+
const { instancesStride, matrixOffset, normalMatrixOffset, colorOffset } = shapeNode;
|
|
87540
87497
|
|
|
87541
|
-
|
|
87542
|
-
shaderNode .enableFogDepthAttribute (gl, this .fogDepthBuffer, 0, 0);
|
|
87498
|
+
transformShaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 2);
|
|
87543
87499
|
|
|
87544
|
-
|
|
87545
|
-
|
|
87500
|
+
if (normalMatrixOffset !== undefined)
|
|
87501
|
+
transformShaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 2);
|
|
87546
87502
|
|
|
87547
|
-
|
|
87548
|
-
|
|
87503
|
+
const
|
|
87504
|
+
coordIndexStride = 2 * Float32Array .BYTES_PER_ELEMENT,
|
|
87505
|
+
coordIndexOffset0 = 0,
|
|
87506
|
+
coordIndexOffset1 = 1 * Float32Array .BYTES_PER_ELEMENT,
|
|
87507
|
+
lengthSoFarStride = 6 * Float32Array .BYTES_PER_ELEMENT,
|
|
87508
|
+
lengthSoFarOffset = 5 * Float32Array .BYTES_PER_ELEMENT,
|
|
87509
|
+
fogDepthStride = 2 * Float32Array .BYTES_PER_ELEMENT,
|
|
87510
|
+
fogDepthOffset0 = 0,
|
|
87511
|
+
fogDepthOffset1 = 1 * Float32Array .BYTES_PER_ELEMENT,
|
|
87512
|
+
colorStride = 8 * Float32Array .BYTES_PER_ELEMENT,
|
|
87513
|
+
colorOffset0 = 0,
|
|
87514
|
+
colorOffset1 = 4 * Float32Array .BYTES_PER_ELEMENT,
|
|
87515
|
+
normalStride = 6 * Float32Array .BYTES_PER_ELEMENT,
|
|
87516
|
+
normalOffset0 = 0,
|
|
87517
|
+
normalOffset1 = 3 * Float32Array .BYTES_PER_ELEMENT,
|
|
87518
|
+
vertexStride = 8 * Float32Array .BYTES_PER_ELEMENT,
|
|
87519
|
+
vertexOffset0 = 0,
|
|
87520
|
+
vertexOffset1 = 4 * Float32Array .BYTES_PER_ELEMENT;
|
|
87549
87521
|
|
|
87550
|
-
|
|
87522
|
+
// for (let i = 0, length = attribNodes .length; i < length; ++ i)
|
|
87523
|
+
// attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
|
|
87551
87524
|
|
|
87552
|
-
|
|
87553
|
-
|
|
87525
|
+
if (this .coordIndices .length)
|
|
87526
|
+
{
|
|
87527
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_CoordIndex0", this .coordIndexBuffer, 1, coordIndexStride, coordIndexOffset0);
|
|
87528
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_CoordIndex1", this .coordIndexBuffer, 1, coordIndexStride, coordIndexOffset1);
|
|
87529
|
+
}
|
|
87554
87530
|
|
|
87555
|
-
|
|
87531
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_LengthSoFar", this .lineStippleBuffer, 1, lengthSoFarStride, lengthSoFarOffset);
|
|
87556
87532
|
|
|
87557
|
-
|
|
87533
|
+
if (this .hasFogCoords)
|
|
87534
|
+
{
|
|
87535
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_FogDepth0", this .fogDepthBuffer, 1, fogDepthStride, fogDepthOffset0);
|
|
87536
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_FogDepth1", this .fogDepthBuffer, 1, fogDepthStride, fogDepthOffset1);
|
|
87537
|
+
}
|
|
87558
87538
|
|
|
87559
|
-
|
|
87560
|
-
|
|
87539
|
+
if (geometryContext .colorMaterial)
|
|
87540
|
+
{
|
|
87541
|
+
if (geometryContext === this)
|
|
87542
|
+
{
|
|
87543
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_Color0", this .colorBuffer, 4, colorStride, colorOffset0);
|
|
87544
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_Color1", this .colorBuffer, 4, colorStride, colorOffset1);
|
|
87545
|
+
}
|
|
87546
|
+
else
|
|
87547
|
+
{
|
|
87548
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_Color0", instances, 4, instancesStride, colorOffset, 2);
|
|
87549
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_Color1", instances, 4, instancesStride, colorOffset, 2);
|
|
87550
|
+
}
|
|
87551
|
+
}
|
|
87561
87552
|
|
|
87562
|
-
|
|
87563
|
-
|
|
87553
|
+
if (this .hasNormals)
|
|
87554
|
+
{
|
|
87555
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_Normal0", this .normalBuffer, 3, normalStride, normalOffset0);
|
|
87556
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_Normal1", this .normalBuffer, 3, normalStride, normalOffset1);
|
|
87557
|
+
}
|
|
87558
|
+
|
|
87559
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_Vertex0", this .vertexBuffer, 4, vertexStride, vertexOffset0);
|
|
87560
|
+
transformShaderNode .enableFloatAttrib (gl, "x3d_Vertex1", this .vertexBuffer, 4, vertexStride, vertexOffset1);
|
|
87561
|
+
}
|
|
87562
|
+
|
|
87563
|
+
// Create lineTrianglesBuffer
|
|
87564
|
+
|
|
87565
|
+
const numLines = this .getVertices () .length / 8 * shapeNode .getNumInstances ();
|
|
87566
|
+
|
|
87567
|
+
if (instances .numLines !== numLines)
|
|
87568
|
+
{
|
|
87569
|
+
instances .numLines = numLines;
|
|
87570
|
+
|
|
87571
|
+
gl .bindBuffer (gl .ARRAY_BUFFER, instances .lineTrianglesBuffer);
|
|
87572
|
+
gl .bufferData (gl .ARRAY_BUFFER, new Float32Array (16 * 6 * numLines), gl .DYNAMIC_DRAW);
|
|
87573
|
+
}
|
|
87574
|
+
|
|
87575
|
+
// Transform lines.
|
|
87576
|
+
|
|
87577
|
+
gl .bindBuffer (gl .ARRAY_BUFFER, null);
|
|
87578
|
+
gl .bindTransformFeedback (gl .TRANSFORM_FEEDBACK, browser .getLineTransformFeedback ());
|
|
87579
|
+
gl .bindBufferBase (gl .TRANSFORM_FEEDBACK_BUFFER, 0, instances .lineTrianglesBuffer);
|
|
87580
|
+
gl .enable (gl .RASTERIZER_DISCARD);
|
|
87581
|
+
gl .beginTransformFeedback (gl .POINTS);
|
|
87582
|
+
gl .drawArraysInstanced (gl .POINTS, 0, this .vertexCount / 2, 2 * shapeNode .getNumInstances ());
|
|
87583
|
+
gl .endTransformFeedback ();
|
|
87584
|
+
gl .disable (gl .RASTERIZER_DISCARD);
|
|
87585
|
+
gl .bindTransformFeedback (gl .TRANSFORM_FEEDBACK, null);
|
|
87586
|
+
|
|
87587
|
+
// DEBUG
|
|
87588
|
+
|
|
87589
|
+
// const data = new Float32Array (16 * 6 * this .vertexCount / 2);
|
|
87590
|
+
// gl .bindBuffer (gl .ARRAY_BUFFER, instances .lineTrianglesBuffer);
|
|
87591
|
+
// gl .getBufferSubData (gl .ARRAY_BUFFER, 0, data);
|
|
87592
|
+
// console .log (data);
|
|
87593
|
+
|
|
87594
|
+
// Render triangles.
|
|
87595
|
+
|
|
87596
|
+
for (const node of renderModeNodes)
|
|
87597
|
+
node .enable (gl);
|
|
87598
|
+
|
|
87599
|
+
// Setup shader.
|
|
87600
|
+
|
|
87601
|
+
shaderNode .enable (gl);
|
|
87602
|
+
shaderNode .setUniforms (gl, geometryContext, renderContext);
|
|
87603
|
+
|
|
87604
|
+
// Setup vertex attributes.
|
|
87605
|
+
|
|
87606
|
+
if (instances .thickLinesVertexArrayObject .update (this .updateInstances) .enable (shaderNode .getProgram ()))
|
|
87607
|
+
{
|
|
87608
|
+
shaderNode .enableInstanceMatrixAttribute (gl, browser .getDefaultInstanceMatrices (), 100, 0, 1);
|
|
87609
|
+
shaderNode .enableInstanceNormalMatrixAttribute (gl, browser .getDefaultInstanceMatrices (), 100, 64, 1);
|
|
87610
|
+
|
|
87611
|
+
const
|
|
87612
|
+
stride = 16 * Float32Array .BYTES_PER_ELEMENT,
|
|
87613
|
+
coordIndexOffset = 0,
|
|
87614
|
+
lineStippleOffset = 1 * Float32Array .BYTES_PER_ELEMENT,
|
|
87615
|
+
fogCoordOffset = 4 * Float32Array .BYTES_PER_ELEMENT,
|
|
87616
|
+
colorOffset = 5 * Float32Array .BYTES_PER_ELEMENT,
|
|
87617
|
+
normalOffset = 9 * Float32Array .BYTES_PER_ELEMENT,
|
|
87618
|
+
vertexOffset = 12 * Float32Array .BYTES_PER_ELEMENT;
|
|
87619
|
+
|
|
87620
|
+
// for (let i = 0, length = attribNodes .length; i < length; ++ i)
|
|
87621
|
+
// attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
|
|
87622
|
+
|
|
87623
|
+
shaderNode .enableCoordIndexAttribute (gl, instances .lineTrianglesBuffer, stride, coordIndexOffset);
|
|
87624
|
+
shaderNode .enableLineStippleAttribute (gl, instances .lineTrianglesBuffer, stride, lineStippleOffset);
|
|
87625
|
+
|
|
87626
|
+
if (this .hasFogCoords)
|
|
87627
|
+
shaderNode .enableFogDepthAttribute (gl, instances .lineTrianglesBuffer, stride, fogCoordOffset);
|
|
87628
|
+
|
|
87629
|
+
if (geometryContext .colorMaterial)
|
|
87630
|
+
shaderNode .enableColorAttribute (gl, instances .lineTrianglesBuffer, stride, colorOffset);
|
|
87631
|
+
|
|
87632
|
+
if (this .hasNormals)
|
|
87633
|
+
shaderNode .enableNormalAttribute (gl, instances .lineTrianglesBuffer, stride, normalOffset);
|
|
87634
|
+
|
|
87635
|
+
shaderNode .enableVertexAttribute (gl, instances .lineTrianglesBuffer, stride, vertexOffset);
|
|
87636
|
+
|
|
87637
|
+
this .updateInstances = false;
|
|
87638
|
+
}
|
|
87639
|
+
|
|
87640
|
+
gl .frontFace (gl .CCW);
|
|
87641
|
+
gl .enable (gl .CULL_FACE);
|
|
87642
|
+
gl .drawArrays (primitiveMode, 0, this .vertexCount * 3 * shapeNode .getNumInstances ());
|
|
87643
|
+
|
|
87644
|
+
for (const node of renderModeNodes)
|
|
87645
|
+
node .disable (gl);
|
|
87646
|
+
|
|
87647
|
+
return;
|
|
87648
|
+
}
|
|
87649
|
+
}
|
|
87650
|
+
|
|
87651
|
+
const primitiveMode = browser .getPrimitiveMode (this .getPrimitiveMode ());
|
|
87652
|
+
|
|
87653
|
+
for (const node of renderModeNodes)
|
|
87654
|
+
node .enable (gl);
|
|
87655
|
+
|
|
87656
|
+
// Setup shader.
|
|
87657
|
+
|
|
87658
|
+
shaderNode .enable (gl);
|
|
87659
|
+
shaderNode .setUniforms (gl, this, renderContext);
|
|
87660
|
+
|
|
87661
|
+
// Setup vertex attributes.
|
|
87662
|
+
|
|
87663
|
+
const instances = shapeNode .getInstances ();
|
|
87664
|
+
|
|
87665
|
+
if (instances .vertexArrayObject .update (this .updateInstances) .enable (shaderNode .getProgram ()))
|
|
87666
|
+
{
|
|
87667
|
+
const { instancesStride, particleOffset, velocityOffset, matrixOffset, normalMatrixOffset, colorOffset } = shapeNode;
|
|
87668
|
+
|
|
87669
|
+
if (particleOffset !== undefined)
|
|
87670
|
+
shaderNode .enableParticleAttribute (gl, instances, instancesStride, particleOffset, 1);
|
|
87671
|
+
|
|
87672
|
+
if (velocityOffset !== undefined)
|
|
87673
|
+
shaderNode .enableParticleVelocityAttribute (gl, instances, instancesStride, velocityOffset, 1);
|
|
87674
|
+
|
|
87675
|
+
shaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 1);
|
|
87676
|
+
|
|
87677
|
+
if (normalMatrixOffset !== undefined)
|
|
87678
|
+
shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
|
|
87679
|
+
|
|
87680
|
+
if (this .coordIndices .length)
|
|
87681
|
+
shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
|
|
87682
|
+
|
|
87683
|
+
for (let i = 0, length = attribNodes .length; i < length; ++ i)
|
|
87684
|
+
attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
|
|
87685
|
+
|
|
87686
|
+
if (this .hasFogCoords)
|
|
87687
|
+
shaderNode .enableFogDepthAttribute (gl, this .fogDepthBuffer, 0, 0);
|
|
87688
|
+
|
|
87689
|
+
if (geometryContext .colorMaterial)
|
|
87690
|
+
{
|
|
87691
|
+
if (geometryContext === this)
|
|
87692
|
+
shaderNode .enableColorAttribute (gl, this .colorBuffer, 0, 0);
|
|
87693
|
+
else
|
|
87694
|
+
shaderNode .enableColorAttribute (gl, instances, instancesStride, colorOffset, 1);
|
|
87695
|
+
}
|
|
87696
|
+
|
|
87697
|
+
if (this .hasNormals)
|
|
87698
|
+
shaderNode .enableNormalAttribute (gl, this .normalBuffer, 0, 0);
|
|
87699
|
+
|
|
87700
|
+
shaderNode .enableVertexAttribute (gl, this .vertexBuffer, 0, 0);
|
|
87701
|
+
|
|
87702
|
+
this .updateInstances = false;
|
|
87703
|
+
}
|
|
87704
|
+
|
|
87705
|
+
// Wireframes are always solid so only one drawing call is needed.
|
|
87706
|
+
|
|
87707
|
+
gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, shapeNode .getNumInstances ());
|
|
87708
|
+
|
|
87709
|
+
for (const node of renderModeNodes)
|
|
87710
|
+
node .disable (gl);
|
|
87711
|
+
|
|
87712
|
+
gl .lineWidth (1);
|
|
87713
|
+
};
|
|
87714
|
+
})(),
|
|
87564
87715
|
});
|
|
87565
87716
|
|
|
87566
87717
|
Object .defineProperties (X3DLineGeometryNode,
|
|
@@ -89003,18 +89154,24 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
89003
89154
|
|
|
89004
89155
|
const instances = shapeNode .getInstances ();
|
|
89005
89156
|
|
|
89006
|
-
if (instances .vertexArrayObject .update (this .
|
|
89157
|
+
if (instances .vertexArrayObject .update (this .updateInstances) .enable (shaderNode .getProgram ()))
|
|
89007
89158
|
{
|
|
89008
|
-
const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
|
|
89159
|
+
const { instancesStride, particleOffset, velocityOffset, matrixOffset, normalMatrixOffset } = shapeNode;
|
|
89009
89160
|
|
|
89010
89161
|
if (particleOffset !== undefined)
|
|
89011
89162
|
shaderNode .enableParticleAttribute (gl, instances, instancesStride, particleOffset, 1);
|
|
89012
89163
|
|
|
89164
|
+
if (velocityOffset !== undefined)
|
|
89165
|
+
shaderNode .enableParticleVelocityAttribute (gl, instances, instancesStride, velocityOffset, 1);
|
|
89166
|
+
|
|
89013
89167
|
shaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 1);
|
|
89014
89168
|
|
|
89015
89169
|
if (normalMatrixOffset !== undefined)
|
|
89016
89170
|
shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
|
|
89017
89171
|
|
|
89172
|
+
if (this .coordIndices .length)
|
|
89173
|
+
shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
|
|
89174
|
+
|
|
89018
89175
|
for (let i = 0, length = attribNodes .length; i < length; ++ i)
|
|
89019
89176
|
attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
|
|
89020
89177
|
|
|
@@ -89029,7 +89186,7 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
89029
89186
|
|
|
89030
89187
|
shaderNode .enableVertexAttribute (gl, this .vertexBuffer, 0, 0);
|
|
89031
89188
|
|
|
89032
|
-
this .
|
|
89189
|
+
this .updateInstances = false;
|
|
89033
89190
|
}
|
|
89034
89191
|
|
|
89035
89192
|
// Wireframes are always solid so only one drawing call is needed.
|
|
@@ -89955,7 +90112,7 @@ const X3DShaderNode_default_ = X3DShaderNode;
|
|
|
89955
90112
|
x_ite_Namespace .add ("X3DShaderNode", "x_ite/Components/Shaders/X3DShaderNode", X3DShaderNode_default_);
|
|
89956
90113
|
/* harmony default export */ const Shaders_X3DShaderNode = (X3DShaderNode_default_);
|
|
89957
90114
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
|
|
89958
|
-
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(
|
|
90115
|
+
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(575);
|
|
89959
90116
|
/*******************************************************************************
|
|
89960
90117
|
*
|
|
89961
90118
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -90262,6 +90419,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
90262
90419
|
"Normal",
|
|
90263
90420
|
"Vertex",
|
|
90264
90421
|
"Particle",
|
|
90422
|
+
"ParticleVelocity",
|
|
90265
90423
|
"ParticleMatrix",
|
|
90266
90424
|
"ParticleNormalMatrix",
|
|
90267
90425
|
"InstanceMatrix",
|
|
@@ -91090,7 +91248,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91090
91248
|
gl .uniform1i (location, textureUnit);
|
|
91091
91249
|
}
|
|
91092
91250
|
},
|
|
91093
|
-
enableFloatAttrib (gl, name, buffer, components, stride, offset)
|
|
91251
|
+
enableFloatAttrib (gl, name, buffer, components, stride, offset, divisor = 0)
|
|
91094
91252
|
{
|
|
91095
91253
|
const location = gl .getAttribLocation (this .getProgram (), name);
|
|
91096
91254
|
|
|
@@ -91100,6 +91258,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91100
91258
|
gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
|
|
91101
91259
|
gl .enableVertexAttribArray (location);
|
|
91102
91260
|
gl .vertexAttribPointer (location, components, gl .FLOAT, false, stride, offset);
|
|
91261
|
+
gl .vertexAttribDivisor (location, divisor);
|
|
91103
91262
|
},
|
|
91104
91263
|
enableMatrix3Attrib (gl, name, buffer, stride, offset)
|
|
91105
91264
|
{
|
|
@@ -91163,13 +91322,14 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91163
91322
|
gl .enableVertexAttribArray (location);
|
|
91164
91323
|
gl .vertexAttribPointer (location, 1, gl .FLOAT, false, stride, offset);
|
|
91165
91324
|
},
|
|
91166
|
-
enableColorAttribute (gl, buffer, stride, offset)
|
|
91325
|
+
enableColorAttribute (gl, buffer, stride, offset, divisor = 0)
|
|
91167
91326
|
{
|
|
91168
91327
|
const location = this .x3d_Color;
|
|
91169
91328
|
|
|
91170
91329
|
gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
|
|
91171
91330
|
gl .enableVertexAttribArray (location);
|
|
91172
91331
|
gl .vertexAttribPointer (location, 4, gl .FLOAT, false, stride, offset);
|
|
91332
|
+
gl .vertexAttribDivisor (location, divisor)
|
|
91173
91333
|
},
|
|
91174
91334
|
colorAttributeDivisor (gl, divisor)
|
|
91175
91335
|
{
|
|
@@ -91224,6 +91384,15 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91224
91384
|
gl .vertexAttribPointer (location, 4, gl .FLOAT, false, stride, offset);
|
|
91225
91385
|
gl .vertexAttribDivisor (location, divisor);
|
|
91226
91386
|
},
|
|
91387
|
+
enableParticleVelocityAttribute (gl, buffer, stride, offset, divisor)
|
|
91388
|
+
{
|
|
91389
|
+
const location = this .x3d_ParticleVelocity;
|
|
91390
|
+
|
|
91391
|
+
gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
|
|
91392
|
+
gl .enableVertexAttribArray (location);
|
|
91393
|
+
gl .vertexAttribPointer (location, 3, gl .FLOAT, false, stride, offset);
|
|
91394
|
+
gl .vertexAttribDivisor (location, divisor);
|
|
91395
|
+
},
|
|
91227
91396
|
enableInstanceMatrixAttribute (gl, buffer, stride, offset, divisor)
|
|
91228
91397
|
{
|
|
91229
91398
|
const location0 = this .x3d_InstanceMatrix;
|
|
@@ -94618,7 +94787,17 @@ x_ite_Namespace .add ("LineTransform2.fs", "assets/shaders/webgl2/LineTransform2
|
|
|
94618
94787
|
/* harmony default export */ const LineTransform2_fs = (LineTransform2_fs_default_);
|
|
94619
94788
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/LineTransform2.vs.js
|
|
94620
94789
|
const LineTransform2_vs_default_ = /* glsl */ `#version 300 es
|
|
94621
|
-
precision highp float;uniform vec4 viewport;uniform mat4 modelViewProjectionMatrix;uniform mat4 invModelViewProjectionMatrix;uniform float
|
|
94790
|
+
precision highp float;uniform vec4 viewport;uniform mat4 modelViewProjectionMatrix;uniform mat4 invModelViewProjectionMatrix;uniform float linewidthScaleFactor1_2;
|
|
94791
|
+
#if defined(X3D_INSTANCING)
|
|
94792
|
+
in mat4 x3d_InstanceMatrix;
|
|
94793
|
+
#endif
|
|
94794
|
+
in float x3d_LengthSoFar;in float x3d_CoordIndex0;in float x3d_FogDepth0;in vec4 x3d_Color0;in vec3 x3d_Normal0;in vec4 x3d_Vertex0;in float x3d_CoordIndex1;in float x3d_FogDepth1;in vec4 x3d_Color1;in vec3 x3d_Normal1;in vec4 x3d_Vertex1;out float coordIndex0;out vec3 lineStipple0;out float fogDepth0;out vec4 color0;out vec3 normal0;out vec4 vertex0;out float coordIndex1;out vec3 lineStipple1;out float fogDepth1;out vec4 color1;out vec3 normal1;out vec4 vertex1;out float coordIndex2;out vec3 lineStipple2;out float fogDepth2;out vec4 color2;out vec3 normal2;out vec4 vertex2;vec3 projectPoint(const in vec4 point,const in mat4 modelViewProjectionMatrix,const in vec4 viewport){vec4 vin=modelViewProjectionMatrix*point;vin.xyz=vin.xyz/(2.0*vin.w)+0.5;return vec3(vin.xy*viewport.zw+viewport.xy,vin.z);}vec4 unProjectPoint(const in vec3 win,const in mat4 invModelViewProjection,const in vec4 viewport){vec4 vin=vec4((win.xy-viewport.xy)/viewport.zw*2.0-1.0,2.0*win.z-1.0,1.0);vin=invModelViewProjection*vin;return vec4(vin.xyz/vin.w,1.0);}void main(){
|
|
94795
|
+
#if defined(X3D_INSTANCING)
|
|
94796
|
+
vec3 projected0=projectPoint(x3d_InstanceMatrix*x3d_Vertex0,modelViewProjectionMatrix,viewport);vec3 projected1=projectPoint(x3d_InstanceMatrix*x3d_Vertex1,modelViewProjectionMatrix,viewport);
|
|
94797
|
+
#else
|
|
94798
|
+
vec3 projected0=projectPoint(x3d_Vertex0,modelViewProjectionMatrix,viewport);vec3 projected1=projectPoint(x3d_Vertex1,modelViewProjectionMatrix,viewport);
|
|
94799
|
+
#endif
|
|
94800
|
+
vec2 direction=normalize(projected1.xy-projected0.xy);vec2 offset=vec2(-direction.y,direction.x)*linewidthScaleFactor1_2;vec3 l0=vec3(projected1.xy,x3d_LengthSoFar);vec3 l1=vec3(projected0.xy,x3d_LengthSoFar);if(gl_InstanceID % 2==0){vec2 pq0=projected0.xy+offset;vec2 pq1=projected0.xy-offset;vec2 pq2=projected1.xy-offset;vec4 p0=unProjectPoint(vec3(pq0.xy,projected0.z),invModelViewProjectionMatrix,viewport);vec4 p1=unProjectPoint(vec3(pq1.xy,projected0.z),invModelViewProjectionMatrix,viewport);vec4 p2=unProjectPoint(vec3(pq2.xy,projected1.z),invModelViewProjectionMatrix,viewport);coordIndex0=x3d_CoordIndex0;lineStipple0=l0;fogDepth0=x3d_FogDepth0;color0=x3d_Color0;normal0=x3d_Normal0;vertex0=p0;coordIndex1=x3d_CoordIndex0;lineStipple1=l0;fogDepth1=x3d_FogDepth0;color1=x3d_Color0;normal1=x3d_Normal0;vertex1=p1;coordIndex2=x3d_CoordIndex1;lineStipple2=l1;fogDepth2=x3d_FogDepth1;color2=x3d_Color1;normal2=x3d_Normal1;vertex2=p2;}else{vec2 pq0=projected0.xy+offset;vec2 pq2=projected1.xy-offset;vec2 pq3=projected1.xy+offset;vec4 p0=unProjectPoint(vec3(pq0.xy,projected0.z),invModelViewProjectionMatrix,viewport);vec4 p2=unProjectPoint(vec3(pq2.xy,projected1.z),invModelViewProjectionMatrix,viewport);vec4 p3=unProjectPoint(vec3(pq3.xy,projected1.z),invModelViewProjectionMatrix,viewport);coordIndex0=x3d_CoordIndex0;lineStipple0=l0;fogDepth0=x3d_FogDepth0;color0=x3d_Color0;normal0=x3d_Normal0;vertex0=p0;coordIndex1=x3d_CoordIndex1;lineStipple1=l1;fogDepth1=x3d_FogDepth1;color1=x3d_Color1;normal1=x3d_Normal1;vertex1=p2;coordIndex2=x3d_CoordIndex1;lineStipple2=l1;fogDepth2=x3d_FogDepth1;color2=x3d_Color1;normal2=x3d_Normal1;vertex2=p3;}}`
|
|
94622
94801
|
;
|
|
94623
94802
|
|
|
94624
94803
|
x_ite_Namespace .add ("LineTransform2.vs", "assets/shaders/webgl2/LineTransform2.vs", LineTransform2_vs_default_);
|
|
@@ -95473,11 +95652,11 @@ const ShaderRegistry = {
|
|
|
95473
95652
|
Fog: Fog2_glsl,
|
|
95474
95653
|
Fragment: Fragment2_glsl,
|
|
95475
95654
|
Hatch: Hatch2_glsl,
|
|
95655
|
+
Instancing: Instancing2_glsl,
|
|
95476
95656
|
Lighting: Lighting2_glsl,
|
|
95477
95657
|
Line2: Line22_glsl,
|
|
95478
95658
|
Material: Material2_glsl,
|
|
95479
95659
|
Normal: Normal2_glsl,
|
|
95480
|
-
Instancing: Instancing2_glsl,
|
|
95481
95660
|
Perlin: Perlin2_glsl,
|
|
95482
95661
|
Point: Point2_glsl,
|
|
95483
95662
|
PointSize: PointSize2_glsl,
|
|
@@ -95642,7 +95821,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
95642
95821
|
x_ite_Namespace .add ("ShaderCompiler", "x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
|
|
95643
95822
|
/* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
|
|
95644
95823
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
95645
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
95824
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(575);
|
|
95646
95825
|
/*******************************************************************************
|
|
95647
95826
|
*
|
|
95648
95827
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -96299,7 +96478,7 @@ const X3DAppearanceNode_default_ = X3DAppearanceNode;
|
|
|
96299
96478
|
x_ite_Namespace .add ("X3DAppearanceNode", "x_ite/Components/Shape/X3DAppearanceNode", X3DAppearanceNode_default_);
|
|
96300
96479
|
/* harmony default export */ const Shape_X3DAppearanceNode = (X3DAppearanceNode_default_);
|
|
96301
96480
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/Appearance.js
|
|
96302
|
-
/* provided dependency */ var Appearance_$ = __webpack_require__(
|
|
96481
|
+
/* provided dependency */ var Appearance_$ = __webpack_require__(575);
|
|
96303
96482
|
/*******************************************************************************
|
|
96304
96483
|
*
|
|
96305
96484
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -98804,6 +98983,10 @@ Object .assign (Object .setPrototypeOf (X3DShapeNode .prototype, Core_X3DChildNo
|
|
|
98804
98983
|
this .set_appearance__ ();
|
|
98805
98984
|
this .set_geometry__ ();
|
|
98806
98985
|
},
|
|
98986
|
+
getNumInstances ()
|
|
98987
|
+
{
|
|
98988
|
+
return 1;
|
|
98989
|
+
},
|
|
98807
98990
|
getBBox (bbox, shadows)
|
|
98808
98991
|
{
|
|
98809
98992
|
if (shadows)
|
|
@@ -98918,7 +99101,6 @@ Object .assign (Object .setPrototypeOf (X3DShapeNode .prototype, Core_X3DChildNo
|
|
|
98918
99101
|
{
|
|
98919
99102
|
if (this .getGeometry ())
|
|
98920
99103
|
this .bbox .assign (this .getGeometry () .getBBox ());
|
|
98921
|
-
|
|
98922
99104
|
else
|
|
98923
99105
|
this .bbox .set ();
|
|
98924
99106
|
}
|
|
@@ -105248,8 +105430,8 @@ const GifMedia_default_ = GifMedia;
|
|
|
105248
105430
|
x_ite_Namespace .add ("GifMedia", "x_ite/Browser/Texturing/GifMedia", GifMedia_default_);
|
|
105249
105431
|
/* harmony default export */ const Texturing_GifMedia = (GifMedia_default_);
|
|
105250
105432
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
105251
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
105252
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
105433
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(575);
|
|
105434
|
+
/* provided dependency */ var SuperGif = __webpack_require__(280);
|
|
105253
105435
|
/*******************************************************************************
|
|
105254
105436
|
*
|
|
105255
105437
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -105446,7 +105628,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
|
|
|
105446
105628
|
this ._duration_changed = video .duration;
|
|
105447
105629
|
|
|
105448
105630
|
this .setMediaElement (video);
|
|
105449
|
-
this .
|
|
105631
|
+
this .setTextureData (width, height, true, false, video);
|
|
105450
105632
|
this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
|
|
105451
105633
|
|
|
105452
105634
|
this .set_speed__ ();
|
|
@@ -105466,7 +105648,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
|
|
|
105466
105648
|
this ._duration_changed = gif .duration;
|
|
105467
105649
|
|
|
105468
105650
|
this .setMediaElement (gif);
|
|
105469
|
-
this .
|
|
105651
|
+
this .setTextureData (gif .get_canvas () .width, gif .get_canvas () .height, true, false, gif .get_frames () [0] .data);
|
|
105470
105652
|
this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
|
|
105471
105653
|
|
|
105472
105654
|
this .set_speed__ ();
|
|
@@ -105494,7 +105676,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
|
|
|
105494
105676
|
const media = this .getMediaElement ();
|
|
105495
105677
|
|
|
105496
105678
|
if (media)
|
|
105497
|
-
this .
|
|
105679
|
+
this .updateTextureData (media .currentFrame ?.data ?? media);
|
|
105498
105680
|
},
|
|
105499
105681
|
traverse: Texturing_X3DTexture2DNode .prototype .traverse,
|
|
105500
105682
|
dispose ()
|
|
@@ -106668,7 +106850,7 @@ Object .assign (Object .setPrototypeOf (PixelTexture .prototype, Texturing_X3DTe
|
|
|
106668
106850
|
data = new Uint8Array (cx2 .getImageData (0, 0, width, height) .data .buffer);
|
|
106669
106851
|
}
|
|
106670
106852
|
|
|
106671
|
-
this .
|
|
106853
|
+
this .setTextureData (width, height, true, transparent, data);
|
|
106672
106854
|
this ._loadState = Base_X3DConstants .COMPLETE_STATE;
|
|
106673
106855
|
}
|
|
106674
106856
|
else
|
|
@@ -107854,8 +108036,6 @@ x_ite_Namespace .add ("Time", "x_ite/Components/Time", Time_default_);
|
|
|
107854
108036
|
|
|
107855
108037
|
|
|
107856
108038
|
|
|
107857
|
-
const nop = Function .prototype;
|
|
107858
|
-
|
|
107859
108039
|
const Context =
|
|
107860
108040
|
{
|
|
107861
108041
|
excludes: new Set ([
|
|
@@ -107888,16 +108068,10 @@ const Context =
|
|
|
107888
108068
|
{
|
|
107889
108069
|
const ext = gl .getExtension ("OES_vertex_array_object");
|
|
107890
108070
|
|
|
107891
|
-
gl .bindVertexArray = ext
|
|
107892
|
-
gl .createVertexArray = ext
|
|
107893
|
-
gl .deleteVertexArray = ext
|
|
107894
|
-
gl .isVertexArray = ext
|
|
107895
|
-
}
|
|
107896
|
-
|
|
107897
|
-
{
|
|
107898
|
-
const ext = gl .getExtension ("ANGLE_instanced_arrays");
|
|
107899
|
-
|
|
107900
|
-
gl .drawArraysInstanced = ext ?.drawArraysInstancedANGLE .bind (ext) ?? nop;
|
|
108071
|
+
gl .bindVertexArray = ext .bindVertexArrayOES .bind (ext);
|
|
108072
|
+
gl .createVertexArray = ext .createVertexArrayOES .bind (ext);
|
|
108073
|
+
gl .deleteVertexArray = ext .deleteVertexArrayOES .bind (ext);
|
|
108074
|
+
gl .isVertexArray = ext .isVertexArrayOES .bind (ext);
|
|
107901
108075
|
}
|
|
107902
108076
|
}
|
|
107903
108077
|
}
|
|
@@ -107919,7 +108093,7 @@ const Context =
|
|
|
107919
108093
|
|
|
107920
108094
|
if (aliasedLineWidthRange [0] === 1 && aliasedLineWidthRange [1] === 1)
|
|
107921
108095
|
{
|
|
107922
|
-
gl .lineWidth =
|
|
108096
|
+
gl .lineWidth = Function .prototype;
|
|
107923
108097
|
gl .HAS_FEATURE_TRANSFORMED_LINES = gl .getVersion () >= 2;
|
|
107924
108098
|
|
|
107925
108099
|
if (DEVELOPMENT)
|
|
@@ -108641,7 +108815,7 @@ const gettext_default_ = (string) => locale .get (string) || string;
|
|
|
108641
108815
|
x_ite_Namespace .add ("gettext", "locale/gettext", gettext_default_);
|
|
108642
108816
|
/* harmony default export */ const gettext = (gettext_default_);
|
|
108643
108817
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
|
|
108644
|
-
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(
|
|
108818
|
+
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(575);
|
|
108645
108819
|
/*******************************************************************************
|
|
108646
108820
|
*
|
|
108647
108821
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -109214,7 +109388,7 @@ const TextureQuality_default_ = TextureQuality;
|
|
|
109214
109388
|
x_ite_Namespace .add ("TextureQuality", "x_ite/Browser/Core/TextureQuality", TextureQuality_default_);
|
|
109215
109389
|
/* harmony default export */ const Core_TextureQuality = (TextureQuality_default_);
|
|
109216
109390
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserOptions.js
|
|
109217
|
-
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(
|
|
109391
|
+
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(575);
|
|
109218
109392
|
/*******************************************************************************
|
|
109219
109393
|
*
|
|
109220
109394
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -109808,7 +109982,7 @@ const RenderingProperties_default_ = RenderingProperties;
|
|
|
109808
109982
|
x_ite_Namespace .add ("RenderingProperties", "x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
|
|
109809
109983
|
/* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
|
|
109810
109984
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
|
|
109811
|
-
/* provided dependency */ var Notification_$ = __webpack_require__(
|
|
109985
|
+
/* provided dependency */ var Notification_$ = __webpack_require__(575);
|
|
109812
109986
|
/*******************************************************************************
|
|
109813
109987
|
*
|
|
109814
109988
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -109931,8 +110105,8 @@ const Notification_default_ = Notification;
|
|
|
109931
110105
|
x_ite_Namespace .add ("Notification", "x_ite/Browser/Core/Notification", Notification_default_);
|
|
109932
110106
|
/* harmony default export */ const Core_Notification = (Notification_default_);
|
|
109933
110107
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
|
|
109934
|
-
/* provided dependency */ var jquery_fullscreen = __webpack_require__(
|
|
109935
|
-
/* provided dependency */ var ContextMenu_$ = __webpack_require__(
|
|
110108
|
+
/* provided dependency */ var jquery_fullscreen = __webpack_require__(347);
|
|
110109
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(575);
|
|
109936
110110
|
/*******************************************************************************
|
|
109937
110111
|
*
|
|
109938
110112
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -112693,7 +112867,7 @@ const DataStorage_default_ = DataStorage;
|
|
|
112693
112867
|
x_ite_Namespace .add ("DataStorage", "standard/Utility/DataStorage", DataStorage_default_);
|
|
112694
112868
|
/* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
|
|
112695
112869
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
112696
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
112870
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(575);
|
|
112697
112871
|
/*******************************************************************************
|
|
112698
112872
|
*
|
|
112699
112873
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -115216,8 +115390,8 @@ const X3DViewer_default_ = X3DViewer;
|
|
|
115216
115390
|
x_ite_Namespace .add ("X3DViewer", "x_ite/Browser/Navigation/X3DViewer", X3DViewer_default_);
|
|
115217
115391
|
/* harmony default export */ const Navigation_X3DViewer = (X3DViewer_default_);
|
|
115218
115392
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
115219
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
115220
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
115393
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(431);
|
|
115394
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(575);
|
|
115221
115395
|
/*******************************************************************************
|
|
115222
115396
|
*
|
|
115223
115397
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -116089,8 +116263,8 @@ const ExamineViewer_default_ = ExamineViewer;
|
|
|
116089
116263
|
x_ite_Namespace .add ("ExamineViewer", "x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
|
|
116090
116264
|
/* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
|
|
116091
116265
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
116092
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
116093
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
116266
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(431);
|
|
116267
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(575);
|
|
116094
116268
|
/*******************************************************************************
|
|
116095
116269
|
*
|
|
116096
116270
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -117099,8 +117273,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
117099
117273
|
x_ite_Namespace .add ("FlyViewer", "x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
|
|
117100
117274
|
/* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
|
|
117101
117275
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
117102
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
117103
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
117276
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(431);
|
|
117277
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(575);
|
|
117104
117278
|
/*******************************************************************************
|
|
117105
117279
|
*
|
|
117106
117280
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -117431,8 +117605,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
117431
117605
|
x_ite_Namespace .add ("NoneViewer", "x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
|
|
117432
117606
|
/* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
|
|
117433
117607
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
117434
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
117435
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
117608
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(431);
|
|
117609
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(575);
|
|
117436
117610
|
/*******************************************************************************
|
|
117437
117611
|
*
|
|
117438
117612
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118571,8 +118745,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
118571
118745
|
x_ite_Namespace .add ("X3DPickingContext", "x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
|
|
118572
118746
|
/* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
|
|
118573
118747
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
118574
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
118575
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
118748
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(431);
|
|
118749
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(575);
|
|
118576
118750
|
/*******************************************************************************
|
|
118577
118751
|
*
|
|
118578
118752
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119876,7 +120050,7 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
|
|
|
119876
120050
|
x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
|
|
119877
120051
|
/* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
|
|
119878
120052
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
119879
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
120053
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(575);
|
|
119880
120054
|
/*******************************************************************************
|
|
119881
120055
|
*
|
|
119882
120056
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -120496,16 +120670,20 @@ x_ite_Namespace .add ("X3DShadersContext", "x_ite/Browser/Shaders/X3DShadersCont
|
|
|
120496
120670
|
|
|
120497
120671
|
|
|
120498
120672
|
|
|
120673
|
+
|
|
120674
|
+
|
|
120499
120675
|
const
|
|
120500
|
-
_linetypeTextures
|
|
120501
|
-
_hatchStyleTextures
|
|
120502
|
-
_defaultAppearance
|
|
120503
|
-
_defaultPointProperties
|
|
120504
|
-
_defaultLineProperties
|
|
120505
|
-
_defaultMaterial
|
|
120506
|
-
_lineFillTextureProperties
|
|
120507
|
-
_lineTransformShaderNode
|
|
120508
|
-
|
|
120676
|
+
_linetypeTextures = Symbol (),
|
|
120677
|
+
_hatchStyleTextures = Symbol (),
|
|
120678
|
+
_defaultAppearance = Symbol (),
|
|
120679
|
+
_defaultPointProperties = Symbol (),
|
|
120680
|
+
_defaultLineProperties = Symbol (),
|
|
120681
|
+
_defaultMaterial = Symbol (),
|
|
120682
|
+
_lineFillTextureProperties = Symbol (),
|
|
120683
|
+
_lineTransformShaderNode = Symbol (),
|
|
120684
|
+
_lineTransformInstancedShaderNode = Symbol (),
|
|
120685
|
+
_lineTransformFeedback = Symbol (),
|
|
120686
|
+
_defaultInstanceMatrices = Symbol ();
|
|
120509
120687
|
|
|
120510
120688
|
function X3DShapeContext ()
|
|
120511
120689
|
{
|
|
@@ -120613,12 +120791,32 @@ Object .assign (X3DShapeContext .prototype,
|
|
|
120613
120791
|
return this [_lineFillTextureProperties];
|
|
120614
120792
|
},
|
|
120615
120793
|
getLineTransformShader ()
|
|
120794
|
+
{
|
|
120795
|
+
this [_lineTransformShaderNode] = this .createLineTransformShader (false);
|
|
120796
|
+
|
|
120797
|
+
this .getLineTransformShader = function () { return this [_lineTransformShaderNode]; };
|
|
120798
|
+
|
|
120799
|
+
Object .defineProperty (this, "getLineTransformShader", { enumerable: false });
|
|
120800
|
+
|
|
120801
|
+
return this [_lineTransformShaderNode];
|
|
120802
|
+
},
|
|
120803
|
+
getLineTransformInstancedShader ()
|
|
120804
|
+
{
|
|
120805
|
+
this [_lineTransformInstancedShaderNode] = this .createLineTransformShader (true);
|
|
120806
|
+
|
|
120807
|
+
this .getLineTransformInstancedShader = function () { return this [_lineTransformInstancedShaderNode]; };
|
|
120808
|
+
|
|
120809
|
+
Object .defineProperty (this, "getLineTransformInstancedShader", { enumerable: false });
|
|
120810
|
+
|
|
120811
|
+
return this [_lineTransformInstancedShaderNode];
|
|
120812
|
+
},
|
|
120813
|
+
createLineTransformShader (instanced)
|
|
120616
120814
|
{
|
|
120617
120815
|
const uniformNames = [
|
|
120618
120816
|
"viewport",
|
|
120619
120817
|
"modelViewProjectionMatrix",
|
|
120620
120818
|
"invModelViewProjectionMatrix",
|
|
120621
|
-
"
|
|
120819
|
+
"linewidthScaleFactor1_2",
|
|
120622
120820
|
];
|
|
120623
120821
|
|
|
120624
120822
|
const transformFeedbackVaryings = [
|
|
@@ -120627,13 +120825,7 @@ Object .assign (X3DShapeContext .prototype,
|
|
|
120627
120825
|
"coordIndex2", "lineStipple2", "fogDepth2", "color2", "normal2", "vertex2",
|
|
120628
120826
|
];
|
|
120629
120827
|
|
|
120630
|
-
|
|
120631
|
-
|
|
120632
|
-
this .getLineTransformShader = function () { return this [_lineTransformShaderNode]; };
|
|
120633
|
-
|
|
120634
|
-
Object .defineProperty (this, "getLineTransformShader", { enumerable: false });
|
|
120635
|
-
|
|
120636
|
-
return this [_lineTransformShaderNode];
|
|
120828
|
+
return this .createShader (`LineTransform${instanced ? "Instanced" : ""}`, "LineTransform", "LineTransform", instanced ? ["X3D_INSTANCING"] : [ ], uniformNames, transformFeedbackVaryings);
|
|
120637
120829
|
},
|
|
120638
120830
|
getLineTransformFeedback ()
|
|
120639
120831
|
{
|
|
@@ -120647,6 +120839,23 @@ Object .assign (X3DShapeContext .prototype,
|
|
|
120647
120839
|
|
|
120648
120840
|
return this [_lineTransformFeedback];
|
|
120649
120841
|
},
|
|
120842
|
+
getDefaultInstanceMatrices ()
|
|
120843
|
+
{
|
|
120844
|
+
const
|
|
120845
|
+
gl = this .getContext (),
|
|
120846
|
+
data = new Float32Array ([... Numbers_Matrix4 .Identity, ... Numbers_Matrix3 .Identity]);
|
|
120847
|
+
|
|
120848
|
+
this [_defaultInstanceMatrices] = gl .createBuffer ();
|
|
120849
|
+
|
|
120850
|
+
gl .bindBuffer (gl .ARRAY_BUFFER, this [_defaultInstanceMatrices]);
|
|
120851
|
+
gl .bufferData (gl .ARRAY_BUFFER, data, gl .STATIC_DRAW);
|
|
120852
|
+
|
|
120853
|
+
this .getDefaultInstanceMatrices = function () { return this [_defaultInstanceMatrices]; };
|
|
120854
|
+
|
|
120855
|
+
Object .defineProperty (this, "getDefaultInstanceMatrices", { enumerable: false });
|
|
120856
|
+
|
|
120857
|
+
return this [_defaultInstanceMatrices];
|
|
120858
|
+
},
|
|
120650
120859
|
});
|
|
120651
120860
|
|
|
120652
120861
|
const X3DShapeContext_default_ = X3DShapeContext;
|
|
@@ -120789,7 +120998,7 @@ const X3DSoundContext_default_ = X3DSoundContext;
|
|
|
120789
120998
|
x_ite_Namespace .add ("X3DSoundContext", "x_ite/Browser/Sound/X3DSoundContext", X3DSoundContext_default_);
|
|
120790
120999
|
/* harmony default export */ const Sound_X3DSoundContext = (X3DSoundContext_default_);
|
|
120791
121000
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/KTXDecoder.js
|
|
120792
|
-
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(
|
|
121001
|
+
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(575);
|
|
120793
121002
|
const KTXDecoder_default_ = class KTXDecoder
|
|
120794
121003
|
{
|
|
120795
121004
|
constructor (gl, externalKtxlib, scriptDir)
|
|
@@ -122343,7 +122552,7 @@ const Components_default_ = Components;
|
|
|
122343
122552
|
x_ite_Namespace .add ("Components", "x_ite/Components", Components_default_);
|
|
122344
122553
|
/* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
|
|
122345
122554
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
|
|
122346
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
122555
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(575);
|
|
122347
122556
|
/*******************************************************************************
|
|
122348
122557
|
* MIT License
|
|
122349
122558
|
*
|
|
@@ -123476,7 +123685,7 @@ const SupportedProfiles_default_ = SupportedProfiles;
|
|
|
123476
123685
|
x_ite_Namespace .add ("SupportedProfiles", "x_ite/Configuration/SupportedProfiles", SupportedProfiles_default_);
|
|
123477
123686
|
/* harmony default export */ const Configuration_SupportedProfiles = (SupportedProfiles_default_);
|
|
123478
123687
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
|
|
123479
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
123688
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(575);
|
|
123480
123689
|
/*******************************************************************************
|
|
123481
123690
|
*
|
|
123482
123691
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -124568,7 +124777,7 @@ const X3DBrowser_default_ = X3DBrowser;
|
|
|
124568
124777
|
x_ite_Namespace .add ("X3DBrowser", "x_ite/Browser/X3DBrowser", X3DBrowser_default_);
|
|
124569
124778
|
/* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
|
|
124570
124779
|
;// CONCATENATED MODULE: ./src/x_ite/X3DCanvasElement.js
|
|
124571
|
-
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(
|
|
124780
|
+
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(575);
|
|
124572
124781
|
/*******************************************************************************
|
|
124573
124782
|
*
|
|
124574
124783
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -124705,8 +124914,8 @@ const X3DCanvasElement_default_ = X3DCanvasElement;
|
|
|
124705
124914
|
x_ite_Namespace .add ("X3DCanvasElement", "x_ite/X3DCanvasElement", X3DCanvasElement_default_);
|
|
124706
124915
|
/* harmony default export */ const x_ite_X3DCanvasElement = (X3DCanvasElement_default_);
|
|
124707
124916
|
;// CONCATENATED MODULE: ./src/lib/jquery.js
|
|
124708
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
124709
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
124917
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(575);
|
|
124918
|
+
/* provided dependency */ var pako = __webpack_require__(319);
|
|
124710
124919
|
Object .assign (jquery_$,
|
|
124711
124920
|
{
|
|
124712
124921
|
decodeText (input)
|
|
@@ -124783,14 +124992,14 @@ const jquery_default_ = jquery_$;
|
|
|
124783
124992
|
x_ite_Namespace .add ("jquery", "lib/jquery", jquery_default_);
|
|
124784
124993
|
/* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
|
|
124785
124994
|
;// CONCATENATED MODULE: ./src/lib/libtess.js
|
|
124786
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
124995
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(932);
|
|
124787
124996
|
const libtess_default_ = libtess_libtess;
|
|
124788
124997
|
;
|
|
124789
124998
|
|
|
124790
124999
|
x_ite_Namespace .add ("libtess", "lib/libtess", libtess_default_);
|
|
124791
125000
|
/* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
|
|
124792
125001
|
;// CONCATENATED MODULE: ./src/x_ite/X3D.js
|
|
124793
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
125002
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(575);
|
|
124794
125003
|
/*******************************************************************************
|
|
124795
125004
|
*
|
|
124796
125005
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -125098,7 +125307,7 @@ Object .assign (X3D,
|
|
|
125098
125307
|
|
|
125099
125308
|
// Assign X3D to global namespace.
|
|
125100
125309
|
|
|
125101
|
-
window [Symbol .for ("X_ITE.X3D-9.5.
|
|
125310
|
+
window [Symbol .for ("X_ITE.X3D-9.5.2")] = x_ite_X3D;
|
|
125102
125311
|
|
|
125103
125312
|
customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
|
|
125104
125313
|
|