x_ite 10.4.1 → 10.5.0
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 +4 -4
- package/dist/X3DUOM.xml +10 -0
- package/dist/assets/components/AnnotationComponent.js +2 -2
- package/dist/assets/components/AnnotationComponent.min.js +2 -2
- package/dist/assets/components/CADGeometryComponent.js +2 -2
- package/dist/assets/components/CADGeometryComponent.min.js +2 -2
- package/dist/assets/components/CubeMapTexturingComponent.js +7 -7
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
- package/dist/assets/components/DISComponent.js +2 -2
- package/dist/assets/components/DISComponent.min.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
- package/dist/assets/components/Geometry2DComponent.js +19 -23
- package/dist/assets/components/Geometry2DComponent.min.js +2 -2
- package/dist/assets/components/GeospatialComponent.js +2 -2
- package/dist/assets/components/GeospatialComponent.min.js +2 -2
- package/dist/assets/components/HAnimComponent.js +2 -2
- package/dist/assets/components/HAnimComponent.min.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
- package/dist/assets/components/LayoutComponent.js +3 -7
- package/dist/assets/components/LayoutComponent.min.js +2 -2
- package/dist/assets/components/NURBSComponent.js +859 -812
- package/dist/assets/components/NURBSComponent.min.js +2 -2
- package/dist/assets/components/ParticleSystemsComponent.js +10 -13
- package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
- package/dist/assets/components/PickingComponent.js +2 -2
- package/dist/assets/components/PickingComponent.min.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
- package/dist/assets/components/ScriptingComponent.js +2 -2
- package/dist/assets/components/ScriptingComponent.min.js +2 -2
- package/dist/assets/components/TextComponent.js +9 -17
- package/dist/assets/components/TextComponent.min.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.js +14 -8
- package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
- package/dist/assets/components/Texturing3DComponent.js +16 -16
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
- package/dist/assets/components/X_ITEComponent.js +87 -54
- package/dist/assets/components/X_ITEComponent.min.js +2 -2
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.d.ts +12 -0
- package/dist/x_ite.js +1166 -1125
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +1166 -1125
- package/dist/x_ite.zip +0 -0
- package/package.json +5 -5
package/dist/x_ite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* X_ITE v10.
|
|
1
|
+
/* X_ITE v10.5.0 */
|
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
4
4
|
module.exports = factory();
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
return /******/ (() => { // webpackBootstrap
|
|
13
13
|
/******/ var __webpack_modules__ = ({
|
|
14
14
|
|
|
15
|
-
/***/
|
|
15
|
+
/***/ 306:
|
|
16
16
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
17
17
|
|
|
18
|
-
/* provided dependency */ var jQuery = __webpack_require__(
|
|
18
|
+
/* provided dependency */ var jQuery = __webpack_require__(386);
|
|
19
19
|
/**
|
|
20
20
|
* @preserve jquery.fullscreen 1.1.5
|
|
21
21
|
* https://github.com/code-lts/jquery-fullscreen-plugin
|
|
@@ -211,7 +211,7 @@ installFullScreenHandlers();
|
|
|
211
211
|
|
|
212
212
|
/***/ }),
|
|
213
213
|
|
|
214
|
-
/***/
|
|
214
|
+
/***/ 336:
|
|
215
215
|
/***/ ((module, exports, __webpack_require__) => {
|
|
216
216
|
|
|
217
217
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -225,7 +225,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
225
225
|
(function (factory) {
|
|
226
226
|
if ( true ) {
|
|
227
227
|
// AMD. Register as an anonymous module.
|
|
228
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(
|
|
228
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(386)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
229
229
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
230
230
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
231
231
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
@@ -436,7 +436,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
436
436
|
|
|
437
437
|
/***/ }),
|
|
438
438
|
|
|
439
|
-
/***/
|
|
439
|
+
/***/ 386:
|
|
440
440
|
/***/ (function(module, exports) {
|
|
441
441
|
|
|
442
442
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -11160,7 +11160,7 @@ return jQuery;
|
|
|
11160
11160
|
|
|
11161
11161
|
/***/ }),
|
|
11162
11162
|
|
|
11163
|
-
/***/
|
|
11163
|
+
/***/ 475:
|
|
11164
11164
|
/***/ ((module) => {
|
|
11165
11165
|
|
|
11166
11166
|
/**
|
|
@@ -15939,7 +15939,7 @@ if (true) {
|
|
|
15939
15939
|
|
|
15940
15940
|
/***/ }),
|
|
15941
15941
|
|
|
15942
|
-
/***/
|
|
15942
|
+
/***/ 514:
|
|
15943
15943
|
/***/ (function(__unused_webpack_module, exports) {
|
|
15944
15944
|
|
|
15945
15945
|
|
|
@@ -19184,7 +19184,7 @@ if (true) {
|
|
|
19184
19184
|
|
|
19185
19185
|
/***/ }),
|
|
19186
19186
|
|
|
19187
|
-
/***/
|
|
19187
|
+
/***/ 141:
|
|
19188
19188
|
/***/ (function(module, exports) {
|
|
19189
19189
|
|
|
19190
19190
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -20311,7 +20311,7 @@ Object .defineProperty (Namespace, "add",
|
|
|
20311
20311
|
return module;
|
|
20312
20312
|
}
|
|
20313
20313
|
|
|
20314
|
-
const X3D = window [Symbol .for ("X_ITE.X3D-10.
|
|
20314
|
+
const X3D = window [Symbol .for ("X_ITE.X3D-10.5.0")];
|
|
20315
20315
|
|
|
20316
20316
|
if (X3D)
|
|
20317
20317
|
X3D [name] = module;
|
|
@@ -20567,6 +20567,10 @@ const Algorithm =
|
|
|
20567
20567
|
|
|
20568
20568
|
return value;
|
|
20569
20569
|
},
|
|
20570
|
+
project (value, fromLow, fromHigh, toLow, toHigh)
|
|
20571
|
+
{
|
|
20572
|
+
return toLow + ((value - fromLow) / (fromHigh - fromLow)) * (toHigh - toLow);
|
|
20573
|
+
},
|
|
20570
20574
|
roundToMultiple (value, multiple)
|
|
20571
20575
|
{
|
|
20572
20576
|
return Math .ceil (value / multiple) * multiple;
|
|
@@ -20871,37 +20875,10 @@ function Generator ({ style = "TIDY", indent = "", precision = 7, doublePrecisio
|
|
|
20871
20875
|
this .html = html;
|
|
20872
20876
|
this .closingTags = html || closingTags;
|
|
20873
20877
|
|
|
20874
|
-
this .floatFormat
|
|
20875
|
-
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
useGrouping: false,
|
|
20879
|
-
})
|
|
20880
|
-
.format;
|
|
20881
|
-
|
|
20882
|
-
this .floatExponentialFormat = new Intl .NumberFormat ("en",
|
|
20883
|
-
{
|
|
20884
|
-
notation: "scientific",
|
|
20885
|
-
maximumSignificantDigits: this .precision,
|
|
20886
|
-
useGrouping: false,
|
|
20887
|
-
})
|
|
20888
|
-
.format;
|
|
20889
|
-
|
|
20890
|
-
this .doubleFormat = new Intl .NumberFormat ("en",
|
|
20891
|
-
{
|
|
20892
|
-
notation: "standard",
|
|
20893
|
-
maximumSignificantDigits: this .doublePrecision,
|
|
20894
|
-
useGrouping: false,
|
|
20895
|
-
})
|
|
20896
|
-
.format;
|
|
20897
|
-
|
|
20898
|
-
this .doubleExponentialFormat = new Intl .NumberFormat ("en",
|
|
20899
|
-
{
|
|
20900
|
-
notation: "scientific",
|
|
20901
|
-
maximumSignificantDigits: this .doublePrecision,
|
|
20902
|
-
useGrouping: false,
|
|
20903
|
-
})
|
|
20904
|
-
.format;
|
|
20878
|
+
this .floatFormat = this .createFloatFormat (this .precision);
|
|
20879
|
+
this .floatExponentialFormat = this .createFloatExponentialFormat (this .precision);
|
|
20880
|
+
this .doubleFormat = this .createFloatFormat (this .doublePrecision);
|
|
20881
|
+
this .doubleExponentialFormat = this .createFloatExponentialFormat (this .doublePrecision);
|
|
20905
20882
|
|
|
20906
20883
|
this .Style (style);
|
|
20907
20884
|
|
|
@@ -21048,6 +21025,26 @@ Object .assign (Generator .prototype,
|
|
|
21048
21025
|
|
|
21049
21026
|
return "";
|
|
21050
21027
|
},
|
|
21028
|
+
createFloatFormat (precision)
|
|
21029
|
+
{
|
|
21030
|
+
return new Intl .NumberFormat ("en",
|
|
21031
|
+
{
|
|
21032
|
+
notation: "standard",
|
|
21033
|
+
maximumSignificantDigits: precision,
|
|
21034
|
+
useGrouping: false,
|
|
21035
|
+
})
|
|
21036
|
+
.format;
|
|
21037
|
+
},
|
|
21038
|
+
createFloatExponentialFormat (precision)
|
|
21039
|
+
{
|
|
21040
|
+
return new Intl .NumberFormat ("en",
|
|
21041
|
+
{
|
|
21042
|
+
notation: "scientific",
|
|
21043
|
+
maximumSignificantDigits: precision,
|
|
21044
|
+
useGrouping: false,
|
|
21045
|
+
})
|
|
21046
|
+
.format;
|
|
21047
|
+
},
|
|
21051
21048
|
FloatFormat (value)
|
|
21052
21049
|
{
|
|
21053
21050
|
if (Number .isFinite (value))
|
|
@@ -24699,7 +24696,7 @@ const SFInt32_default_ = SFInt32;
|
|
|
24699
24696
|
|
|
24700
24697
|
|
|
24701
24698
|
|
|
24702
|
-
function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double)
|
|
24699
|
+
function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double, properties = { })
|
|
24703
24700
|
{
|
|
24704
24701
|
const _formatter = double ? "DoubleFormat" : "FloatFormat";
|
|
24705
24702
|
|
|
@@ -24712,7 +24709,7 @@ function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double)
|
|
|
24712
24709
|
},
|
|
24713
24710
|
});
|
|
24714
24711
|
|
|
24715
|
-
|
|
24712
|
+
Object .assign (Object .setPrototypeOf (Constructor .prototype, Base_X3DField .prototype),
|
|
24716
24713
|
{
|
|
24717
24714
|
*[Symbol .iterator] ()
|
|
24718
24715
|
{
|
|
@@ -24872,7 +24869,33 @@ function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double)
|
|
|
24872
24869
|
|
|
24873
24870
|
generator .string += generator .JSONNumber (generator [_formatter] (value [last]));
|
|
24874
24871
|
},
|
|
24875
|
-
}
|
|
24872
|
+
},
|
|
24873
|
+
properties);
|
|
24874
|
+
|
|
24875
|
+
for (const key of Object .keys (Constructor .prototype))
|
|
24876
|
+
Object .defineProperty (Constructor .prototype, key, { enumerable: false });
|
|
24877
|
+
|
|
24878
|
+
function defineProperty (i)
|
|
24879
|
+
{
|
|
24880
|
+
Object .defineProperty (Constructor .prototype, i,
|
|
24881
|
+
{
|
|
24882
|
+
get ()
|
|
24883
|
+
{
|
|
24884
|
+
return this .getValue () [i];
|
|
24885
|
+
},
|
|
24886
|
+
set (value)
|
|
24887
|
+
{
|
|
24888
|
+
this .getValue () [i] = value;
|
|
24889
|
+
this .addEvent ();
|
|
24890
|
+
},
|
|
24891
|
+
enumerable: true,
|
|
24892
|
+
});
|
|
24893
|
+
}
|
|
24894
|
+
|
|
24895
|
+
for (let i = 0; i < Matrix .prototype .length; ++ i)
|
|
24896
|
+
defineProperty (i);
|
|
24897
|
+
|
|
24898
|
+
return Constructor;
|
|
24876
24899
|
}
|
|
24877
24900
|
|
|
24878
24901
|
const SFMatrixPrototypeTemplate_default_ = SFMatrixPrototypeTemplate;
|
|
@@ -24927,6 +24950,8 @@ const SFMatrixPrototypeTemplate_default_ = SFMatrixPrototypeTemplate;
|
|
|
24927
24950
|
*
|
|
24928
24951
|
******************************************************************************/
|
|
24929
24952
|
|
|
24953
|
+
|
|
24954
|
+
|
|
24930
24955
|
function Vector2 (x = 0, y = 0)
|
|
24931
24956
|
{
|
|
24932
24957
|
this .x = x;
|
|
@@ -25087,6 +25112,11 @@ Object .assign (Vector2 .prototype,
|
|
|
25087
25112
|
this .y = y;
|
|
25088
25113
|
return this;
|
|
25089
25114
|
},
|
|
25115
|
+
clamp (min, max)
|
|
25116
|
+
{
|
|
25117
|
+
this .x = Math_Algorithm .clamp (this .x, min .x, max .x);
|
|
25118
|
+
this .y = Math_Algorithm .clamp (this .y, min .y, max .y);
|
|
25119
|
+
},
|
|
25090
25120
|
toString ()
|
|
25091
25121
|
{
|
|
25092
25122
|
return this .x + " " +
|
|
@@ -25379,6 +25409,12 @@ Object .assign (Vector3 .prototype,
|
|
|
25379
25409
|
this .z = z;
|
|
25380
25410
|
return this;
|
|
25381
25411
|
},
|
|
25412
|
+
clamp (min, max)
|
|
25413
|
+
{
|
|
25414
|
+
this .x = Math_Algorithm .clamp (this .x, min .x, max .x);
|
|
25415
|
+
this .y = Math_Algorithm .clamp (this .y, min .y, max .y);
|
|
25416
|
+
this .z = Math_Algorithm .clamp (this .z, min .z, max .z);
|
|
25417
|
+
},
|
|
25382
25418
|
toString ()
|
|
25383
25419
|
{
|
|
25384
25420
|
return this .x + " " +
|
|
@@ -26623,8 +26659,8 @@ function SFMatrix3Template (TypeName, double)
|
|
|
26623
26659
|
r2 = arguments [2];
|
|
26624
26660
|
|
|
26625
26661
|
Base_X3DField .call (this, new Numbers_Matrix3 (r0 .x, r0 .y, r0 .z,
|
|
26626
|
-
|
|
26627
|
-
|
|
26662
|
+
r1 .x, r1 .y, r1 .z,
|
|
26663
|
+
r2 .x, r2 .y, r2 .z));
|
|
26628
26664
|
|
|
26629
26665
|
break;
|
|
26630
26666
|
}
|
|
@@ -26641,7 +26677,7 @@ function SFMatrix3Template (TypeName, double)
|
|
|
26641
26677
|
}
|
|
26642
26678
|
}
|
|
26643
26679
|
|
|
26644
|
-
|
|
26680
|
+
return Fields_SFMatrixPrototypeTemplate (SFMatrix3, TypeName, Numbers_Matrix3, double,
|
|
26645
26681
|
{
|
|
26646
26682
|
setTransform: (function ()
|
|
26647
26683
|
{
|
|
@@ -26665,31 +26701,6 @@ function SFMatrix3Template (TypeName, double)
|
|
|
26665
26701
|
};
|
|
26666
26702
|
})(),
|
|
26667
26703
|
});
|
|
26668
|
-
|
|
26669
|
-
for (const key of Object .keys (SFMatrix3 .prototype))
|
|
26670
|
-
Object .defineProperty (SFMatrix3 .prototype, key, { enumerable: false });
|
|
26671
|
-
|
|
26672
|
-
function defineProperty (i)
|
|
26673
|
-
{
|
|
26674
|
-
Object .defineProperty (SFMatrix3 .prototype, i,
|
|
26675
|
-
{
|
|
26676
|
-
get ()
|
|
26677
|
-
{
|
|
26678
|
-
return this .getValue () [i];
|
|
26679
|
-
},
|
|
26680
|
-
set (value)
|
|
26681
|
-
{
|
|
26682
|
-
this .getValue () [i] = +value;
|
|
26683
|
-
this .addEvent ();
|
|
26684
|
-
},
|
|
26685
|
-
enumerable: true,
|
|
26686
|
-
});
|
|
26687
|
-
}
|
|
26688
|
-
|
|
26689
|
-
for (let i = 0, length = Numbers_Matrix3 .prototype .length; i < length; ++ i)
|
|
26690
|
-
defineProperty (i);
|
|
26691
|
-
|
|
26692
|
-
return SFMatrix3;
|
|
26693
26704
|
}
|
|
26694
26705
|
|
|
26695
26706
|
const SFMatrix3 = {
|
|
@@ -26749,6 +26760,8 @@ const SFMatrix3_default_ = SFMatrix3;
|
|
|
26749
26760
|
*
|
|
26750
26761
|
******************************************************************************/
|
|
26751
26762
|
|
|
26763
|
+
|
|
26764
|
+
|
|
26752
26765
|
function Vector4 (x = 0, y = 0, z = 0, w = 0)
|
|
26753
26766
|
{
|
|
26754
26767
|
this .x = x;
|
|
@@ -26964,6 +26977,13 @@ Object .assign (Vector4 .prototype,
|
|
|
26964
26977
|
this .w = w;
|
|
26965
26978
|
return this;
|
|
26966
26979
|
},
|
|
26980
|
+
clamp (min, max)
|
|
26981
|
+
{
|
|
26982
|
+
this .x = Math_Algorithm .clamp (this .x, min .x, max .x);
|
|
26983
|
+
this .y = Math_Algorithm .clamp (this .y, min .y, max .y);
|
|
26984
|
+
this .z = Math_Algorithm .clamp (this .z, min .z, max .z);
|
|
26985
|
+
this .w = Math_Algorithm .clamp (this .w, min .w, max .w);
|
|
26986
|
+
},
|
|
26967
26987
|
toString ()
|
|
26968
26988
|
{
|
|
26969
26989
|
return this .x + " " +
|
|
@@ -29058,9 +29078,9 @@ function SFMatrix4Template (TypeName, double)
|
|
|
29058
29078
|
r3 = arguments [3];
|
|
29059
29079
|
|
|
29060
29080
|
Base_X3DField .call (this, new Numbers_Matrix4 (r0 .x, r0 .y, r0 .z, r0 .w,
|
|
29061
|
-
|
|
29062
|
-
|
|
29063
|
-
|
|
29081
|
+
r1 .x, r1 .y, r1 .z, r1 .w,
|
|
29082
|
+
r2 .x, r2 .y, r2 .z, r2 .w,
|
|
29083
|
+
r3 .x, r3 .y, r3 .z, r3 .w));
|
|
29064
29084
|
|
|
29065
29085
|
break;
|
|
29066
29086
|
}
|
|
@@ -29078,32 +29098,7 @@ function SFMatrix4Template (TypeName, double)
|
|
|
29078
29098
|
}
|
|
29079
29099
|
}
|
|
29080
29100
|
|
|
29081
|
-
Fields_SFMatrixPrototypeTemplate (SFMatrix4, TypeName, Numbers_Matrix4, double);
|
|
29082
|
-
|
|
29083
|
-
for (const key of Object .keys (SFMatrix4 .prototype))
|
|
29084
|
-
Object .defineProperty (SFMatrix4 .prototype, key, { enumerable: false });
|
|
29085
|
-
|
|
29086
|
-
function defineProperty (i)
|
|
29087
|
-
{
|
|
29088
|
-
Object .defineProperty (SFMatrix4 .prototype, i,
|
|
29089
|
-
{
|
|
29090
|
-
get ()
|
|
29091
|
-
{
|
|
29092
|
-
return this .getValue () [i];
|
|
29093
|
-
},
|
|
29094
|
-
set (value)
|
|
29095
|
-
{
|
|
29096
|
-
this .getValue () [i] = value;
|
|
29097
|
-
this .addEvent ();
|
|
29098
|
-
},
|
|
29099
|
-
enumerable: true,
|
|
29100
|
-
});
|
|
29101
|
-
}
|
|
29102
|
-
|
|
29103
|
-
for (let i = 0, length = Numbers_Matrix4 .prototype .length; i < length; ++ i)
|
|
29104
|
-
defineProperty (i);
|
|
29105
|
-
|
|
29106
|
-
return SFMatrix4;
|
|
29101
|
+
return Fields_SFMatrixPrototypeTemplate (SFMatrix4, TypeName, Numbers_Matrix4, double);
|
|
29107
29102
|
}
|
|
29108
29103
|
|
|
29109
29104
|
const SFMatrix4 = {
|
|
@@ -29738,7 +29733,7 @@ const SFNode_default_ = SFNode;
|
|
|
29738
29733
|
|
|
29739
29734
|
|
|
29740
29735
|
|
|
29741
|
-
function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double)
|
|
29736
|
+
function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double, properties = { })
|
|
29742
29737
|
{
|
|
29743
29738
|
const _formatter = double ? "DoubleFormat" : "FloatFormat";
|
|
29744
29739
|
|
|
@@ -29751,7 +29746,7 @@ function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double)
|
|
|
29751
29746
|
},
|
|
29752
29747
|
});
|
|
29753
29748
|
|
|
29754
|
-
|
|
29749
|
+
Object .assign (Object .setPrototypeOf (Constructor .prototype, Base_X3DField .prototype),
|
|
29755
29750
|
{
|
|
29756
29751
|
*[Symbol .iterator] ()
|
|
29757
29752
|
{
|
|
@@ -29886,7 +29881,80 @@ function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double)
|
|
|
29886
29881
|
|
|
29887
29882
|
generator .string += generator .JSONNumber (generator [_formatter] (generator .ToUnit (category, value [last])));
|
|
29888
29883
|
},
|
|
29889
|
-
}
|
|
29884
|
+
},
|
|
29885
|
+
properties);
|
|
29886
|
+
|
|
29887
|
+
for (const key of Object .keys (Constructor .prototype))
|
|
29888
|
+
Object .defineProperty (Constructor .prototype, key, { enumerable: false });
|
|
29889
|
+
|
|
29890
|
+
const x = {
|
|
29891
|
+
get ()
|
|
29892
|
+
{
|
|
29893
|
+
return this .getValue () .x;
|
|
29894
|
+
},
|
|
29895
|
+
set (value)
|
|
29896
|
+
{
|
|
29897
|
+
this .getValue () .x = +value;
|
|
29898
|
+
this .addEvent ();
|
|
29899
|
+
},
|
|
29900
|
+
};
|
|
29901
|
+
|
|
29902
|
+
const y = {
|
|
29903
|
+
get ()
|
|
29904
|
+
{
|
|
29905
|
+
return this .getValue () .y;
|
|
29906
|
+
},
|
|
29907
|
+
set (value)
|
|
29908
|
+
{
|
|
29909
|
+
this .getValue () .y = +value;
|
|
29910
|
+
this .addEvent ();
|
|
29911
|
+
},
|
|
29912
|
+
};
|
|
29913
|
+
|
|
29914
|
+
const z = {
|
|
29915
|
+
get ()
|
|
29916
|
+
{
|
|
29917
|
+
return this .getValue () .z;
|
|
29918
|
+
},
|
|
29919
|
+
set (value)
|
|
29920
|
+
{
|
|
29921
|
+
this .getValue () .z = +value;
|
|
29922
|
+
this .addEvent ();
|
|
29923
|
+
},
|
|
29924
|
+
};
|
|
29925
|
+
|
|
29926
|
+
const w = {
|
|
29927
|
+
get ()
|
|
29928
|
+
{
|
|
29929
|
+
return this .getValue () .w;
|
|
29930
|
+
},
|
|
29931
|
+
set (value)
|
|
29932
|
+
{
|
|
29933
|
+
this .getValue () .w = +value;
|
|
29934
|
+
this .addEvent ();
|
|
29935
|
+
},
|
|
29936
|
+
};
|
|
29937
|
+
|
|
29938
|
+
const indices = [
|
|
29939
|
+
[0, x],
|
|
29940
|
+
[1, y],
|
|
29941
|
+
[2, z],
|
|
29942
|
+
[3, w],
|
|
29943
|
+
];
|
|
29944
|
+
|
|
29945
|
+
const props = [
|
|
29946
|
+
["x", Object .assign ({ enumerable: true }, x)],
|
|
29947
|
+
["y", Object .assign ({ enumerable: true }, y)],
|
|
29948
|
+
["z", Object .assign ({ enumerable: true }, z)],
|
|
29949
|
+
["w", Object .assign ({ enumerable: true }, w)],
|
|
29950
|
+
];
|
|
29951
|
+
|
|
29952
|
+
indices .length = Vector .prototype .length;
|
|
29953
|
+
props .length = Vector .prototype .length;
|
|
29954
|
+
|
|
29955
|
+
Object .defineProperties (Constructor .prototype, Object .fromEntries (indices .concat (props)));
|
|
29956
|
+
|
|
29957
|
+
return Constructor;
|
|
29890
29958
|
}
|
|
29891
29959
|
|
|
29892
29960
|
const SFVecPrototypeTemplate_default_ = SFVecPrototypeTemplate;
|
|
@@ -29968,64 +30036,13 @@ function SFVec3Template (TypeName, double)
|
|
|
29968
30036
|
}
|
|
29969
30037
|
}
|
|
29970
30038
|
|
|
29971
|
-
|
|
30039
|
+
return Fields_SFVecPrototypeTemplate (SFVec3, TypeName, Numbers_Vector3, double,
|
|
29972
30040
|
{
|
|
29973
30041
|
cross (vector)
|
|
29974
30042
|
{
|
|
29975
30043
|
return new (this .constructor) (this .getValue () .copy () .cross (vector .getValue ()));
|
|
29976
30044
|
},
|
|
29977
30045
|
});
|
|
29978
|
-
|
|
29979
|
-
for (const key of Object .keys (SFVec3 .prototype))
|
|
29980
|
-
Object .defineProperty (SFVec3 .prototype, key, { enumerable: false });
|
|
29981
|
-
|
|
29982
|
-
const x = {
|
|
29983
|
-
get ()
|
|
29984
|
-
{
|
|
29985
|
-
return this .getValue () .x;
|
|
29986
|
-
},
|
|
29987
|
-
set (value)
|
|
29988
|
-
{
|
|
29989
|
-
this .getValue () .x = +value;
|
|
29990
|
-
this .addEvent ();
|
|
29991
|
-
},
|
|
29992
|
-
};
|
|
29993
|
-
|
|
29994
|
-
const y = {
|
|
29995
|
-
get ()
|
|
29996
|
-
{
|
|
29997
|
-
return this .getValue () .y;
|
|
29998
|
-
},
|
|
29999
|
-
set (value)
|
|
30000
|
-
{
|
|
30001
|
-
this .getValue () .y = +value;
|
|
30002
|
-
this .addEvent ();
|
|
30003
|
-
},
|
|
30004
|
-
};
|
|
30005
|
-
|
|
30006
|
-
const z = {
|
|
30007
|
-
get ()
|
|
30008
|
-
{
|
|
30009
|
-
return this .getValue () .z;
|
|
30010
|
-
},
|
|
30011
|
-
set (value)
|
|
30012
|
-
{
|
|
30013
|
-
this .getValue () .z = +value;
|
|
30014
|
-
this .addEvent ();
|
|
30015
|
-
},
|
|
30016
|
-
};
|
|
30017
|
-
|
|
30018
|
-
Object .defineProperties (SFVec3 .prototype,
|
|
30019
|
-
{
|
|
30020
|
-
0: x,
|
|
30021
|
-
1: y,
|
|
30022
|
-
2: z,
|
|
30023
|
-
x: Object .assign ({ enumerable: true }, x),
|
|
30024
|
-
y: Object .assign ({ enumerable: true }, y),
|
|
30025
|
-
z: Object .assign ({ enumerable: true }, z),
|
|
30026
|
-
});
|
|
30027
|
-
|
|
30028
|
-
return SFVec3;
|
|
30029
30046
|
}
|
|
30030
30047
|
|
|
30031
30048
|
const SFVec3 = {
|
|
@@ -30661,44 +30678,7 @@ function SFVec2Template (TypeName, double)
|
|
|
30661
30678
|
}
|
|
30662
30679
|
}
|
|
30663
30680
|
|
|
30664
|
-
Fields_SFVecPrototypeTemplate (SFVec2, TypeName, Numbers_Vector2, double);
|
|
30665
|
-
|
|
30666
|
-
for (const key of Object .keys (SFVec2 .prototype))
|
|
30667
|
-
Object .defineProperty (SFVec2 .prototype, key, { enumerable: false });
|
|
30668
|
-
|
|
30669
|
-
const x = {
|
|
30670
|
-
get ()
|
|
30671
|
-
{
|
|
30672
|
-
return this .getValue () .x;
|
|
30673
|
-
},
|
|
30674
|
-
set (value)
|
|
30675
|
-
{
|
|
30676
|
-
this .getValue () .x = +value;
|
|
30677
|
-
this .addEvent ();
|
|
30678
|
-
},
|
|
30679
|
-
};
|
|
30680
|
-
|
|
30681
|
-
const y = {
|
|
30682
|
-
get ()
|
|
30683
|
-
{
|
|
30684
|
-
return this .getValue () .y;
|
|
30685
|
-
},
|
|
30686
|
-
set (value)
|
|
30687
|
-
{
|
|
30688
|
-
this .getValue () .y = +value;
|
|
30689
|
-
this .addEvent ();
|
|
30690
|
-
},
|
|
30691
|
-
};
|
|
30692
|
-
|
|
30693
|
-
Object .defineProperties (SFVec2 .prototype,
|
|
30694
|
-
{
|
|
30695
|
-
0: x,
|
|
30696
|
-
1: y,
|
|
30697
|
-
x: Object .assign ({ enumerable: true }, x),
|
|
30698
|
-
y: Object .assign ({ enumerable: true }, y),
|
|
30699
|
-
});
|
|
30700
|
-
|
|
30701
|
-
return SFVec2;
|
|
30681
|
+
return Fields_SFVecPrototypeTemplate (SFVec2, TypeName, Numbers_Vector2, double);
|
|
30702
30682
|
}
|
|
30703
30683
|
|
|
30704
30684
|
const SFVec2 = {
|
|
@@ -30785,72 +30765,7 @@ function SFVec4Template (TypeName, double)
|
|
|
30785
30765
|
}
|
|
30786
30766
|
}
|
|
30787
30767
|
|
|
30788
|
-
Fields_SFVecPrototypeTemplate (SFVec4, TypeName, Numbers_Vector4, double);
|
|
30789
|
-
|
|
30790
|
-
for (const key of Object .keys (SFVec4 .prototype))
|
|
30791
|
-
Object .defineProperty (SFVec4 .prototype, key, { enumerable: false });
|
|
30792
|
-
|
|
30793
|
-
const x = {
|
|
30794
|
-
get ()
|
|
30795
|
-
{
|
|
30796
|
-
return this .getValue () .x;
|
|
30797
|
-
},
|
|
30798
|
-
set (value)
|
|
30799
|
-
{
|
|
30800
|
-
this .getValue () .x = +value;
|
|
30801
|
-
this .addEvent ();
|
|
30802
|
-
},
|
|
30803
|
-
};
|
|
30804
|
-
|
|
30805
|
-
const y = {
|
|
30806
|
-
get ()
|
|
30807
|
-
{
|
|
30808
|
-
return this .getValue () .y;
|
|
30809
|
-
},
|
|
30810
|
-
set (value)
|
|
30811
|
-
{
|
|
30812
|
-
this .getValue () .y = +value;
|
|
30813
|
-
this .addEvent ();
|
|
30814
|
-
},
|
|
30815
|
-
};
|
|
30816
|
-
|
|
30817
|
-
const z = {
|
|
30818
|
-
get ()
|
|
30819
|
-
{
|
|
30820
|
-
return this .getValue () .z;
|
|
30821
|
-
},
|
|
30822
|
-
set (value)
|
|
30823
|
-
{
|
|
30824
|
-
this .getValue () .z = +value;
|
|
30825
|
-
this .addEvent ();
|
|
30826
|
-
},
|
|
30827
|
-
};
|
|
30828
|
-
|
|
30829
|
-
const w = {
|
|
30830
|
-
get ()
|
|
30831
|
-
{
|
|
30832
|
-
return this .getValue () .w;
|
|
30833
|
-
},
|
|
30834
|
-
set (value)
|
|
30835
|
-
{
|
|
30836
|
-
this .getValue () .w = +value;
|
|
30837
|
-
this .addEvent ();
|
|
30838
|
-
},
|
|
30839
|
-
};
|
|
30840
|
-
|
|
30841
|
-
Object .defineProperties (SFVec4 .prototype,
|
|
30842
|
-
{
|
|
30843
|
-
0: x,
|
|
30844
|
-
1: y,
|
|
30845
|
-
2: z,
|
|
30846
|
-
3: w,
|
|
30847
|
-
x: Object .assign ({ enumerable: true }, x),
|
|
30848
|
-
y: Object .assign ({ enumerable: true }, y),
|
|
30849
|
-
z: Object .assign ({ enumerable: true }, z),
|
|
30850
|
-
w: Object .assign ({ enumerable: true }, w),
|
|
30851
|
-
});
|
|
30852
|
-
|
|
30853
|
-
return SFVec4;
|
|
30768
|
+
return Fields_SFVecPrototypeTemplate (SFVec4, TypeName, Numbers_Vector4, double);
|
|
30854
30769
|
}
|
|
30855
30770
|
|
|
30856
30771
|
const SFVec4 = {
|
|
@@ -34258,7 +34173,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
|
|
|
34258
34173
|
|
|
34259
34174
|
/* harmony default export */ const Base_X3DBaseNode = (x_ite_Namespace .add ("X3DBaseNode", X3DBaseNode_default_));
|
|
34260
34175
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Legacy.js
|
|
34261
|
-
/* provided dependency */ var $ = __webpack_require__(
|
|
34176
|
+
/* provided dependency */ var $ = __webpack_require__(386);
|
|
34262
34177
|
/*******************************************************************************
|
|
34263
34178
|
*
|
|
34264
34179
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -34394,7 +34309,7 @@ const Legacy_default_ = Legacy;
|
|
|
34394
34309
|
*
|
|
34395
34310
|
******************************************************************************/
|
|
34396
34311
|
|
|
34397
|
-
const BROWSER_VERSION_default_ = "10.
|
|
34312
|
+
const BROWSER_VERSION_default_ = "10.5.0";
|
|
34398
34313
|
;
|
|
34399
34314
|
|
|
34400
34315
|
/* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
|
|
@@ -35181,7 +35096,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
|
|
|
35181
35096
|
|
|
35182
35097
|
for (const reference of field .getReferences ())
|
|
35183
35098
|
{
|
|
35184
|
-
initializableReference
|
|
35099
|
+
initializableReference ||= reference .isInitializable ();
|
|
35185
35100
|
|
|
35186
35101
|
// Output user defined reference field
|
|
35187
35102
|
|
|
@@ -35244,7 +35159,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
|
|
|
35244
35159
|
|
|
35245
35160
|
for (const reference of field .getReferences ())
|
|
35246
35161
|
{
|
|
35247
|
-
initializableReference
|
|
35162
|
+
initializableReference ||= reference .isInitializable ();
|
|
35248
35163
|
|
|
35249
35164
|
// Output build in reference field
|
|
35250
35165
|
|
|
@@ -37419,7 +37334,7 @@ const X3DBindableNode_default_ = X3DBindableNode;
|
|
|
37419
37334
|
|
|
37420
37335
|
/* harmony default export */ const Core_X3DBindableNode = (x_ite_Namespace .add ("X3DBindableNode", X3DBindableNode_default_));
|
|
37421
37336
|
;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
|
|
37422
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
37337
|
+
/* provided dependency */ var libtess = __webpack_require__(475);
|
|
37423
37338
|
/*******************************************************************************
|
|
37424
37339
|
*
|
|
37425
37340
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -37461,7 +37376,7 @@ const X3DBindableNode_default_ = X3DBindableNode;
|
|
|
37461
37376
|
*
|
|
37462
37377
|
* You should have received a copy of the GNU General Public License version 3
|
|
37463
37378
|
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
37464
|
-
* copy of the
|
|
37379
|
+
* copy of the GPLc License.
|
|
37465
37380
|
*
|
|
37466
37381
|
* For Silvio, Joy and Adi.
|
|
37467
37382
|
*
|
|
@@ -37471,6 +37386,13 @@ const X3DBindableNode_default_ = X3DBindableNode;
|
|
|
37471
37386
|
|
|
37472
37387
|
const Triangle3 =
|
|
37473
37388
|
{
|
|
37389
|
+
/**
|
|
37390
|
+
*
|
|
37391
|
+
* @param {Vector3} a first point of triangle
|
|
37392
|
+
* @param {Vector3} b second point of triangle
|
|
37393
|
+
* @param {Vector3} c third point of triangle
|
|
37394
|
+
* @returns
|
|
37395
|
+
*/
|
|
37474
37396
|
area: (() =>
|
|
37475
37397
|
{
|
|
37476
37398
|
const
|
|
@@ -37482,15 +37404,23 @@ const Triangle3 =
|
|
|
37482
37404
|
return B .assign (b) .subtract (a) .cross (C .assign (c) .subtract (a)) .magnitude () / 2;
|
|
37483
37405
|
};
|
|
37484
37406
|
})(),
|
|
37485
|
-
|
|
37407
|
+
/**
|
|
37408
|
+
*
|
|
37409
|
+
* @param {Vector3} a first point of triangle
|
|
37410
|
+
* @param {Vector3} b second point of triangle
|
|
37411
|
+
* @param {Vector3} c third point of triangle
|
|
37412
|
+
* @param {Vector3} normal resulting normal
|
|
37413
|
+
* @returns
|
|
37414
|
+
*/
|
|
37415
|
+
normal (a, b, c, normal)
|
|
37486
37416
|
{
|
|
37487
37417
|
const
|
|
37488
|
-
x1 =
|
|
37489
|
-
y1 =
|
|
37490
|
-
z1 =
|
|
37491
|
-
x2 =
|
|
37492
|
-
y2 =
|
|
37493
|
-
z2 =
|
|
37418
|
+
x1 = c .x - b .x,
|
|
37419
|
+
y1 = c .y - b .y,
|
|
37420
|
+
z1 = c .z - b .z,
|
|
37421
|
+
x2 = a .x - b .x,
|
|
37422
|
+
y2 = a .y - b .y,
|
|
37423
|
+
z2 = a .z - b .z;
|
|
37494
37424
|
|
|
37495
37425
|
normal .set (y1 * z2 - z1 * y2,
|
|
37496
37426
|
z1 * x2 - x1 * z2,
|
|
@@ -37498,15 +37428,24 @@ const Triangle3 =
|
|
|
37498
37428
|
|
|
37499
37429
|
return normal .normalize ();
|
|
37500
37430
|
},
|
|
37501
|
-
|
|
37431
|
+
/**
|
|
37432
|
+
*
|
|
37433
|
+
* @param {Vector3} a first point of quad
|
|
37434
|
+
* @param {Vector3} b second point of quad
|
|
37435
|
+
* @param {Vector3} c third point of quad
|
|
37436
|
+
* @param {Vector3} d third point of quad
|
|
37437
|
+
* @param {Vector3} normal resulting normal
|
|
37438
|
+
* @returns
|
|
37439
|
+
*/
|
|
37440
|
+
quadNormal (a, b, c, d, normal)
|
|
37502
37441
|
{
|
|
37503
37442
|
const
|
|
37504
|
-
x1 =
|
|
37505
|
-
y1 =
|
|
37506
|
-
z1 =
|
|
37507
|
-
x2 =
|
|
37508
|
-
y2 =
|
|
37509
|
-
z2 =
|
|
37443
|
+
x1 = c .x - a .x,
|
|
37444
|
+
y1 = c .y - a .y,
|
|
37445
|
+
z1 = c .z - a .z,
|
|
37446
|
+
x2 = d .x - b .x,
|
|
37447
|
+
y2 = d .y - b .y,
|
|
37448
|
+
z2 = d .z - b .z;
|
|
37510
37449
|
|
|
37511
37450
|
normal .set (y1 * z2 - z1 * y2,
|
|
37512
37451
|
z1 * x2 - x1 * z2,
|
|
@@ -39957,7 +39896,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
|
|
|
39957
39896
|
|
|
39958
39897
|
/* harmony default export */ const Prototype_X3DProtoDeclaration = (x_ite_Namespace .add ("X3DProtoDeclaration", X3DProtoDeclaration_default_));
|
|
39959
39898
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
|
|
39960
|
-
/* provided dependency */ var X3DParser_$ = __webpack_require__(
|
|
39899
|
+
/* provided dependency */ var X3DParser_$ = __webpack_require__(386);
|
|
39961
39900
|
/*******************************************************************************
|
|
39962
39901
|
*
|
|
39963
39902
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -40171,39 +40110,38 @@ const X3DParser_default_ = X3DParser;
|
|
|
40171
40110
|
*
|
|
40172
40111
|
******************************************************************************/
|
|
40173
40112
|
|
|
40174
|
-
|
|
40113
|
+
const functions =
|
|
40175
40114
|
{
|
|
40176
|
-
|
|
40177
|
-
|
|
40178
|
-
parser .result = this .exec (parser .input);
|
|
40179
|
-
|
|
40180
|
-
if (parser .result)
|
|
40115
|
+
parse (parser)
|
|
40181
40116
|
{
|
|
40182
|
-
|
|
40183
|
-
return true;
|
|
40184
|
-
}
|
|
40117
|
+
this .lastIndex = parser .lastIndex;
|
|
40185
40118
|
|
|
40186
|
-
|
|
40187
|
-
}
|
|
40119
|
+
parser .result = this .exec (parser .input);
|
|
40188
40120
|
|
|
40189
|
-
|
|
40190
|
-
{
|
|
40191
|
-
|
|
40192
|
-
|
|
40193
|
-
|
|
40121
|
+
if (parser .result)
|
|
40122
|
+
{
|
|
40123
|
+
parser .lastIndex = this .lastIndex;
|
|
40124
|
+
return true;
|
|
40125
|
+
}
|
|
40194
40126
|
|
|
40195
|
-
|
|
40127
|
+
return false;
|
|
40128
|
+
},
|
|
40129
|
+
lookahead (parser)
|
|
40130
|
+
{
|
|
40131
|
+
const
|
|
40132
|
+
lastIndex = parser .lastIndex,
|
|
40133
|
+
result = this .parse (parser);
|
|
40196
40134
|
|
|
40197
|
-
|
|
40198
|
-
|
|
40135
|
+
parser .lastIndex = lastIndex;
|
|
40136
|
+
|
|
40137
|
+
return result;
|
|
40138
|
+
},
|
|
40139
|
+
};
|
|
40199
40140
|
|
|
40200
40141
|
function Expressions (Grammar)
|
|
40201
40142
|
{
|
|
40202
40143
|
for (const value of Object .values (Grammar))
|
|
40203
|
-
|
|
40204
|
-
value .parse = parse;
|
|
40205
|
-
value .lookahead = lookahead;
|
|
40206
|
-
}
|
|
40144
|
+
Object .assign (value, functions);
|
|
40207
40145
|
|
|
40208
40146
|
return Grammar;
|
|
40209
40147
|
}
|
|
@@ -40213,7 +40151,7 @@ const Expressions_default_ = Expressions;
|
|
|
40213
40151
|
|
|
40214
40152
|
/* harmony default export */ const Parser_Expressions = (x_ite_Namespace .add ("Expressions", Expressions_default_));
|
|
40215
40153
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/VRMLParser.js
|
|
40216
|
-
/* provided dependency */ var VRMLParser_$ = __webpack_require__(
|
|
40154
|
+
/* provided dependency */ var VRMLParser_$ = __webpack_require__(386);
|
|
40217
40155
|
/*******************************************************************************
|
|
40218
40156
|
*
|
|
40219
40157
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -42912,7 +42850,7 @@ const VRMLParser_default_ = VRMLParser;
|
|
|
42912
42850
|
|
|
42913
42851
|
/* harmony default export */ const Parser_VRMLParser = (x_ite_Namespace .add ("VRMLParser", VRMLParser_default_));
|
|
42914
42852
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
|
|
42915
|
-
/* provided dependency */ var XMLParser_$ = __webpack_require__(
|
|
42853
|
+
/* provided dependency */ var XMLParser_$ = __webpack_require__(386);
|
|
42916
42854
|
/*******************************************************************************
|
|
42917
42855
|
*
|
|
42918
42856
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -45085,7 +45023,7 @@ const URLs_default_ = URLs;
|
|
|
45085
45023
|
|
|
45086
45024
|
/* harmony default export */ const Networking_URLs = (x_ite_Namespace .add ("URLs", URLs_default_));
|
|
45087
45025
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
|
|
45088
|
-
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(
|
|
45026
|
+
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(386);
|
|
45089
45027
|
/*******************************************************************************
|
|
45090
45028
|
*
|
|
45091
45029
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -48729,7 +48667,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
|
|
|
48729
48667
|
|
|
48730
48668
|
/* harmony default export */ const Parser_GLTF2Parser = (x_ite_Namespace .add ("GLTF2Parser", GLTF2Parser_default_));
|
|
48731
48669
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
|
|
48732
|
-
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(
|
|
48670
|
+
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(386);
|
|
48733
48671
|
/*******************************************************************************
|
|
48734
48672
|
*
|
|
48735
48673
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -48880,7 +48818,7 @@ const GLB2Parser_default_ = GLB2Parser;
|
|
|
48880
48818
|
|
|
48881
48819
|
/* harmony default export */ const Parser_GLB2Parser = (x_ite_Namespace .add ("GLB2Parser", GLB2Parser_default_));
|
|
48882
48820
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
|
|
48883
|
-
/* provided dependency */ var OBJParser_$ = __webpack_require__(
|
|
48821
|
+
/* provided dependency */ var OBJParser_$ = __webpack_require__(386);
|
|
48884
48822
|
/*******************************************************************************
|
|
48885
48823
|
*
|
|
48886
48824
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -52145,70 +52083,76 @@ const Bezier_default_ = Bezier;
|
|
|
52145
52083
|
*
|
|
52146
52084
|
******************************************************************************/
|
|
52147
52085
|
|
|
52148
|
-
|
|
52086
|
+
class MatrixStack extends Array
|
|
52149
52087
|
{
|
|
52150
|
-
|
|
52088
|
+
#top = 0;
|
|
52089
|
+
|
|
52090
|
+
constructor (Type)
|
|
52151
52091
|
{
|
|
52152
|
-
|
|
52153
|
-
set (matrix)
|
|
52154
|
-
{
|
|
52155
|
-
this [this .top] .assign (matrix);
|
|
52156
|
-
},
|
|
52157
|
-
get ()
|
|
52158
|
-
{
|
|
52159
|
-
return this [this .top];
|
|
52160
|
-
},
|
|
52161
|
-
push ()
|
|
52162
|
-
{
|
|
52163
|
-
const top = ++ this .top;
|
|
52092
|
+
super ();
|
|
52164
52093
|
|
|
52165
|
-
|
|
52166
|
-
|
|
52167
|
-
else
|
|
52168
|
-
this [top] = this [top - 1] .copy ();
|
|
52169
|
-
},
|
|
52170
|
-
pushMatrix (matrix)
|
|
52171
|
-
{
|
|
52172
|
-
const top = ++ this .top;
|
|
52094
|
+
this .push (new Type ());
|
|
52095
|
+
}
|
|
52173
52096
|
|
|
52174
|
-
|
|
52175
|
-
|
|
52176
|
-
|
|
52177
|
-
|
|
52178
|
-
|
|
52179
|
-
|
|
52180
|
-
|
|
52181
|
-
|
|
52182
|
-
|
|
52183
|
-
|
|
52184
|
-
|
|
52185
|
-
|
|
52186
|
-
|
|
52187
|
-
|
|
52188
|
-
|
|
52189
|
-
|
|
52190
|
-
|
|
52191
|
-
|
|
52192
|
-
|
|
52193
|
-
|
|
52194
|
-
|
|
52195
|
-
|
|
52196
|
-
|
|
52197
|
-
|
|
52198
|
-
|
|
52199
|
-
|
|
52200
|
-
|
|
52201
|
-
|
|
52202
|
-
|
|
52203
|
-
|
|
52204
|
-
|
|
52205
|
-
|
|
52206
|
-
|
|
52207
|
-
|
|
52208
|
-
|
|
52209
|
-
|
|
52210
|
-
|
|
52211
|
-
|
|
52097
|
+
set (matrix)
|
|
52098
|
+
{
|
|
52099
|
+
this [this .#top] .assign (matrix);
|
|
52100
|
+
}
|
|
52101
|
+
|
|
52102
|
+
get ()
|
|
52103
|
+
{
|
|
52104
|
+
return this [this .#top];
|
|
52105
|
+
}
|
|
52106
|
+
|
|
52107
|
+
push (matrix = this [this .#top])
|
|
52108
|
+
{
|
|
52109
|
+
const top = ++ this .#top;
|
|
52110
|
+
|
|
52111
|
+
if (top < this .length)
|
|
52112
|
+
this [top] .assign (matrix);
|
|
52113
|
+
else
|
|
52114
|
+
this [top] = matrix .copy ();
|
|
52115
|
+
}
|
|
52116
|
+
|
|
52117
|
+
pop ()
|
|
52118
|
+
{
|
|
52119
|
+
-- this .#top;
|
|
52120
|
+
}
|
|
52121
|
+
|
|
52122
|
+
clear ()
|
|
52123
|
+
{
|
|
52124
|
+
this .#top = 0;
|
|
52125
|
+
}
|
|
52126
|
+
|
|
52127
|
+
size ()
|
|
52128
|
+
{
|
|
52129
|
+
return this .#top + 1;
|
|
52130
|
+
}
|
|
52131
|
+
|
|
52132
|
+
identity ()
|
|
52133
|
+
{
|
|
52134
|
+
this [this .#top] .identity ();
|
|
52135
|
+
}
|
|
52136
|
+
|
|
52137
|
+
multLeft (matrix)
|
|
52138
|
+
{
|
|
52139
|
+
this [this .#top] .multLeft (matrix);
|
|
52140
|
+
}
|
|
52141
|
+
|
|
52142
|
+
translate (vector)
|
|
52143
|
+
{
|
|
52144
|
+
this [this .#top] .translate (vector);
|
|
52145
|
+
}
|
|
52146
|
+
|
|
52147
|
+
rotate (rotation)
|
|
52148
|
+
{
|
|
52149
|
+
this [this .#top] .rotate (rotation);
|
|
52150
|
+
}
|
|
52151
|
+
|
|
52152
|
+
scale (vector)
|
|
52153
|
+
{
|
|
52154
|
+
this [this .#top] .scale (vector);
|
|
52155
|
+
}
|
|
52212
52156
|
}
|
|
52213
52157
|
|
|
52214
52158
|
const MatrixStack_default_ = MatrixStack;
|
|
@@ -52216,8 +52160,8 @@ const MatrixStack_default_ = MatrixStack;
|
|
|
52216
52160
|
|
|
52217
52161
|
/* harmony default export */ const Utility_MatrixStack = (x_ite_Namespace .add ("MatrixStack", MatrixStack_default_));
|
|
52218
52162
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
|
|
52219
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
52220
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
52163
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(386);
|
|
52164
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(475);
|
|
52221
52165
|
/*******************************************************************************
|
|
52222
52166
|
*
|
|
52223
52167
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -54987,7 +54931,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
54987
54931
|
|
|
54988
54932
|
/* harmony default export */ const Parser_SVGParser = (x_ite_Namespace .add ("SVGParser", SVGParser_default_));
|
|
54989
54933
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
|
|
54990
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
54934
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(386);
|
|
54991
54935
|
/*******************************************************************************
|
|
54992
54936
|
*
|
|
54993
54937
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -55419,55 +55363,20 @@ const Plane3_default_ = Plane3;
|
|
|
55419
55363
|
* p0 -------- p1 near plane
|
|
55420
55364
|
*/
|
|
55421
55365
|
|
|
55422
|
-
function ViewVolume (
|
|
55366
|
+
function ViewVolume (... args)
|
|
55423
55367
|
{
|
|
55424
55368
|
this .viewport = new Numbers_Vector4 ();
|
|
55425
55369
|
this .scissor = new Numbers_Vector4 ();
|
|
55426
55370
|
|
|
55427
|
-
this .points
|
|
55428
|
-
|
|
55429
|
-
|
|
55430
|
-
|
|
55431
|
-
|
|
55432
|
-
|
|
55433
|
-
new Numbers_Vector3 (),
|
|
55434
|
-
new Numbers_Vector3 (),
|
|
55435
|
-
new Numbers_Vector3 (),
|
|
55436
|
-
new Numbers_Vector3 (),
|
|
55437
|
-
];
|
|
55438
|
-
|
|
55439
|
-
this .normals = [
|
|
55440
|
-
new Numbers_Vector3 (), // front
|
|
55441
|
-
new Numbers_Vector3 (), // left
|
|
55442
|
-
new Numbers_Vector3 (), // right
|
|
55443
|
-
new Numbers_Vector3 (), // top
|
|
55444
|
-
new Numbers_Vector3 (), // bottom
|
|
55445
|
-
new Numbers_Vector3 (), // back
|
|
55446
|
-
];
|
|
55447
|
-
|
|
55448
|
-
this .edges = [
|
|
55449
|
-
new Numbers_Vector3 (),
|
|
55450
|
-
new Numbers_Vector3 (),
|
|
55451
|
-
new Numbers_Vector3 (),
|
|
55452
|
-
new Numbers_Vector3 (),
|
|
55453
|
-
|
|
55454
|
-
new Numbers_Vector3 (),
|
|
55455
|
-
new Numbers_Vector3 (),
|
|
55456
|
-
new Numbers_Vector3 (),
|
|
55457
|
-
new Numbers_Vector3 (),
|
|
55458
|
-
];
|
|
55459
|
-
|
|
55460
|
-
this .planes = [
|
|
55461
|
-
new Geometry_Plane3 (), // front
|
|
55462
|
-
new Geometry_Plane3 (), // left
|
|
55463
|
-
new Geometry_Plane3 (), // right
|
|
55464
|
-
new Geometry_Plane3 (), // top
|
|
55465
|
-
new Geometry_Plane3 (), // bottom
|
|
55466
|
-
new Geometry_Plane3 (), // back
|
|
55467
|
-
];
|
|
55371
|
+
this .points = Array .from ({ length: 8 }, () => new Numbers_Vector3 ());
|
|
55372
|
+
// front, left, right, top, bottom, back
|
|
55373
|
+
this .normals = Array .from ({ length: 6 }, () => new Numbers_Vector3 ());
|
|
55374
|
+
this .edges = Array .from ({ length: 8 }, () => new Numbers_Vector3 ());
|
|
55375
|
+
// front, left, right, top, bottom, back
|
|
55376
|
+
this .planes = Array .from ({ length: 6 }, () => new Geometry_Plane3 ());
|
|
55468
55377
|
|
|
55469
|
-
if (
|
|
55470
|
-
this .set (
|
|
55378
|
+
if (args .length)
|
|
55379
|
+
this .set (... args);
|
|
55471
55380
|
}
|
|
55472
55381
|
|
|
55473
55382
|
Object .assign (ViewVolume .prototype,
|
|
@@ -55560,58 +55469,21 @@ Object .assign (ViewVolume .prototype,
|
|
|
55560
55469
|
},
|
|
55561
55470
|
intersectsSphere (radius, center)
|
|
55562
55471
|
{
|
|
55563
|
-
const
|
|
55564
|
-
|
|
55565
|
-
|
|
55566
|
-
|
|
55567
|
-
|
|
55568
|
-
if (p1 .getDistanceToPoint (center) > radius)
|
|
55569
|
-
return false;
|
|
55570
|
-
|
|
55571
|
-
if (p2 .getDistanceToPoint (center) > radius)
|
|
55572
|
-
return false;
|
|
55573
|
-
|
|
55574
|
-
if (p3 .getDistanceToPoint (center) > radius)
|
|
55575
|
-
return false;
|
|
55576
|
-
|
|
55577
|
-
if (p4 .getDistanceToPoint (center) > radius)
|
|
55578
|
-
return false;
|
|
55579
|
-
|
|
55580
|
-
if (p5 .getDistanceToPoint (center) > radius)
|
|
55581
|
-
return false;
|
|
55472
|
+
for (const plane of this .planes)
|
|
55473
|
+
{
|
|
55474
|
+
if (plane .getDistanceToPoint (center) > radius)
|
|
55475
|
+
return false;
|
|
55476
|
+
}
|
|
55582
55477
|
|
|
55583
55478
|
return true;
|
|
55584
55479
|
},
|
|
55585
55480
|
intersectsBox: (() =>
|
|
55586
55481
|
{
|
|
55587
|
-
const
|
|
55588
|
-
new Numbers_Vector3 (),
|
|
55589
|
-
new Numbers_Vector3 (),
|
|
55590
|
-
new Numbers_Vector3 (),
|
|
55591
|
-
new Numbers_Vector3 ()
|
|
55592
|
-
|
|
55593
|
-
new Numbers_Vector3 (),
|
|
55594
|
-
new Numbers_Vector3 (),
|
|
55595
|
-
new Numbers_Vector3 (),
|
|
55596
|
-
new Numbers_Vector3 (),
|
|
55597
|
-
];
|
|
55598
|
-
|
|
55599
|
-
const normals1 = [
|
|
55600
|
-
new Numbers_Vector3 (),
|
|
55601
|
-
new Numbers_Vector3 (),
|
|
55602
|
-
new Numbers_Vector3 (),
|
|
55603
|
-
];
|
|
55604
|
-
|
|
55605
|
-
const axes1 = [
|
|
55606
|
-
new Numbers_Vector3 (),
|
|
55607
|
-
new Numbers_Vector3 (),
|
|
55608
|
-
new Numbers_Vector3 (),
|
|
55609
|
-
];
|
|
55610
|
-
|
|
55611
|
-
const axes = [ ];
|
|
55612
|
-
|
|
55613
|
-
for (let i = 0; i < 3 * 8; ++ i)
|
|
55614
|
-
axes .push (new Numbers_Vector3 ());
|
|
55482
|
+
const
|
|
55483
|
+
points1 = Array .from ({ length: 8 }, () => new Numbers_Vector3 ()),
|
|
55484
|
+
normals1 = Array .from ({ length: 3 }, () => new Numbers_Vector3 ()),
|
|
55485
|
+
axes1 = Array .from ({ length: 3 }, () => new Numbers_Vector3 ()),
|
|
55486
|
+
axes = Array .from ({ length: 3 * 8 }, () => new Numbers_Vector3 ());
|
|
55615
55487
|
|
|
55616
55488
|
return function (box)
|
|
55617
55489
|
{
|
|
@@ -55659,21 +55531,21 @@ Object .assign (ViewVolume,
|
|
|
55659
55531
|
{
|
|
55660
55532
|
const invModelViewProjectionMatrix = new Numbers_Matrix4 ();
|
|
55661
55533
|
|
|
55662
|
-
return function (
|
|
55534
|
+
return function (winX, winY, winZ, modelViewMatrix, projectionMatrix, viewport, point)
|
|
55663
55535
|
{
|
|
55664
|
-
return this .unProjectPointMatrix (
|
|
55536
|
+
return this .unProjectPointMatrix (winX, winY, winZ, invModelViewProjectionMatrix .assign (modelViewMatrix) .multRight (projectionMatrix) .inverse (), viewport, point);
|
|
55665
55537
|
};
|
|
55666
55538
|
})(),
|
|
55667
55539
|
unProjectPointMatrix: (() =>
|
|
55668
55540
|
{
|
|
55669
55541
|
const vin = new Numbers_Vector4 ();
|
|
55670
55542
|
|
|
55671
|
-
return function (
|
|
55543
|
+
return function (winX, winY, winZ, invModelViewProjectionMatrix, viewport, point)
|
|
55672
55544
|
{
|
|
55673
55545
|
// Transformation of normalized coordinates between -1 and 1
|
|
55674
|
-
vin .set ((
|
|
55675
|
-
(
|
|
55676
|
-
|
|
55546
|
+
vin .set ((winX - viewport [0]) / viewport [2] * 2 - 1,
|
|
55547
|
+
(winY - viewport [1]) / viewport [3] * 2 - 1,
|
|
55548
|
+
winZ * 2 - 1,
|
|
55677
55549
|
1);
|
|
55678
55550
|
|
|
55679
55551
|
//Objects coordinates
|
|
@@ -55688,9 +55560,9 @@ Object .assign (ViewVolume,
|
|
|
55688
55560
|
{
|
|
55689
55561
|
const invModelViewProjectionMatrix = new Numbers_Matrix4 ();
|
|
55690
55562
|
|
|
55691
|
-
return function (
|
|
55563
|
+
return function (winX, winY, modelViewMatrix, projectionMatrix, viewport, result)
|
|
55692
55564
|
{
|
|
55693
|
-
return this .unProjectRayMatrix (
|
|
55565
|
+
return this .unProjectRayMatrix (winX, winY, invModelViewProjectionMatrix .assign (modelViewMatrix) .multRight (projectionMatrix) .inverse (), viewport, result);
|
|
55694
55566
|
};
|
|
55695
55567
|
})(),
|
|
55696
55568
|
unProjectRayMatrix: (() =>
|
|
@@ -55699,10 +55571,10 @@ Object .assign (ViewVolume,
|
|
|
55699
55571
|
near = new Numbers_Vector3 (),
|
|
55700
55572
|
far = new Numbers_Vector3 ();
|
|
55701
55573
|
|
|
55702
|
-
return function (
|
|
55574
|
+
return function (winX, winY, invModelViewProjectionMatrix, viewport, result)
|
|
55703
55575
|
{
|
|
55704
|
-
ViewVolume .unProjectPointMatrix (
|
|
55705
|
-
ViewVolume .unProjectPointMatrix (
|
|
55576
|
+
ViewVolume .unProjectPointMatrix (winX, winY, 0.0, invModelViewProjectionMatrix, viewport, near);
|
|
55577
|
+
ViewVolume .unProjectPointMatrix (winX, winY, 0.9, invModelViewProjectionMatrix, viewport, far);
|
|
55706
55578
|
|
|
55707
55579
|
return result .setPoints (near, far);
|
|
55708
55580
|
};
|
|
@@ -55711,7 +55583,7 @@ Object .assign (ViewVolume,
|
|
|
55711
55583
|
{
|
|
55712
55584
|
const vin = new Numbers_Vector4 ();
|
|
55713
55585
|
|
|
55714
|
-
return function (point, modelViewMatrix, projectionMatrix, viewport,
|
|
55586
|
+
return function (point, modelViewMatrix, projectionMatrix, viewport, vOut)
|
|
55715
55587
|
{
|
|
55716
55588
|
if (point .length === 4)
|
|
55717
55589
|
vin .assign (point);
|
|
@@ -55722,7 +55594,7 @@ Object .assign (ViewVolume,
|
|
|
55722
55594
|
|
|
55723
55595
|
const d = 1 / (2 * vin .w);
|
|
55724
55596
|
|
|
55725
|
-
return
|
|
55597
|
+
return vOut .set ((vin .x * d + 0.5) * viewport [2] + viewport [0],
|
|
55726
55598
|
(vin .y * d + 0.5) * viewport [3] + viewport [1],
|
|
55727
55599
|
(vin .z * d + 0.5));
|
|
55728
55600
|
};
|
|
@@ -55731,7 +55603,7 @@ Object .assign (ViewVolume,
|
|
|
55731
55603
|
{
|
|
55732
55604
|
const vin = new Numbers_Vector4 ();
|
|
55733
55605
|
|
|
55734
|
-
return function (point, modelViewProjectionMatrix, viewport,
|
|
55606
|
+
return function (point, modelViewProjectionMatrix, viewport, vOut)
|
|
55735
55607
|
{
|
|
55736
55608
|
if (point .length === 4)
|
|
55737
55609
|
vin .assign (point);
|
|
@@ -55742,7 +55614,7 @@ Object .assign (ViewVolume,
|
|
|
55742
55614
|
|
|
55743
55615
|
const d = 1 / (2 * vin .w);
|
|
55744
55616
|
|
|
55745
|
-
return
|
|
55617
|
+
return vOut .set ((vin .x * d + 0.5) * viewport [2] + viewport [0],
|
|
55746
55618
|
(vin .y * d + 0.5) * viewport [3] + viewport [1],
|
|
55747
55619
|
(vin .z * d + 0.5));
|
|
55748
55620
|
};
|
|
@@ -56524,11 +56396,11 @@ Object .assign (Line3 .prototype,
|
|
|
56524
56396
|
if (v < 0 || u + v > 1)
|
|
56525
56397
|
return false;
|
|
56526
56398
|
|
|
56527
|
-
//let
|
|
56399
|
+
//let u = edge2 .dot (qvec) * inv_det;
|
|
56528
56400
|
|
|
56529
|
-
uvt .u = u;
|
|
56530
|
-
uvt .v =
|
|
56531
|
-
uvt .t =
|
|
56401
|
+
uvt .u = 1 - u - v;
|
|
56402
|
+
uvt .v = u;
|
|
56403
|
+
uvt .t = v;
|
|
56532
56404
|
|
|
56533
56405
|
return true;
|
|
56534
56406
|
};
|
|
@@ -56710,53 +56582,51 @@ function X3DRenderObject (executionContext)
|
|
|
56710
56582
|
{
|
|
56711
56583
|
const browser = executionContext .getBrowser ();
|
|
56712
56584
|
|
|
56713
|
-
this .renderKey
|
|
56714
|
-
this .renderAndGlobalLightsKey
|
|
56715
|
-
this .renderCount
|
|
56716
|
-
this .view
|
|
56717
|
-
this .viewVolumes
|
|
56718
|
-
this .projectionMatrix
|
|
56719
|
-
this .modelViewMatrix
|
|
56720
|
-
this .viewMatrix
|
|
56721
|
-
this .cameraSpaceMatrix
|
|
56722
|
-
this .viewportArray
|
|
56723
|
-
this .projectionMatrixArray
|
|
56724
|
-
this .viewMatrixArray
|
|
56725
|
-
this .cameraSpaceMatrixArray
|
|
56726
|
-
this .hitRay
|
|
56727
|
-
this .sensors
|
|
56728
|
-
this .viewpointGroups
|
|
56729
|
-
this .lights
|
|
56730
|
-
this .globalLightsKeys
|
|
56731
|
-
this .globalLights
|
|
56732
|
-
this .localObjectsKeys
|
|
56733
|
-
this .localObjects
|
|
56734
|
-
this .globalShadows
|
|
56735
|
-
this .globalShadow
|
|
56736
|
-
this .localShadows
|
|
56737
|
-
this .localFogs
|
|
56738
|
-
this .layouts
|
|
56739
|
-
this .humanoids
|
|
56740
|
-
this .generatedCubeMapTextures
|
|
56741
|
-
this .collisions
|
|
56742
|
-
this .collisionTime
|
|
56743
|
-
this .numPointingShapes
|
|
56744
|
-
this .numCollisionShapes
|
|
56745
|
-
this .numShadowShapes
|
|
56746
|
-
this .numOpaqueShapes
|
|
56747
|
-
this .numTransparentShapes
|
|
56748
|
-
this .pointingShapes
|
|
56749
|
-
this .collisionShapes
|
|
56750
|
-
this .activeCollisions
|
|
56751
|
-
this .shadowShapes
|
|
56752
|
-
this .opaqueShapes
|
|
56753
|
-
this .transparentShapes
|
|
56754
|
-
this .
|
|
56755
|
-
this .
|
|
56756
|
-
this .
|
|
56757
|
-
this .
|
|
56758
|
-
this .speed = 0;
|
|
56759
|
-
this .depthBuffer = new Rendering_TextureBuffer (browser, DEPTH_BUFFER_SIZE, DEPTH_BUFFER_SIZE, true);
|
|
56585
|
+
this .renderKey = "";
|
|
56586
|
+
this .renderAndGlobalLightsKey = "";
|
|
56587
|
+
this .renderCount = 0;
|
|
56588
|
+
this .view = null;
|
|
56589
|
+
this .viewVolumes = [ ];
|
|
56590
|
+
this .projectionMatrix = new Utility_MatrixStack (Numbers_Matrix4);
|
|
56591
|
+
this .modelViewMatrix = new Utility_MatrixStack (Numbers_Matrix4);
|
|
56592
|
+
this .viewMatrix = new Utility_MatrixStack (Numbers_Matrix4);
|
|
56593
|
+
this .cameraSpaceMatrix = new Utility_MatrixStack (Numbers_Matrix4);
|
|
56594
|
+
this .viewportArray = new Int32Array (4);
|
|
56595
|
+
this .projectionMatrixArray = new Float32Array (16);
|
|
56596
|
+
this .viewMatrixArray = new Float32Array (16);
|
|
56597
|
+
this .cameraSpaceMatrixArray = new Float32Array (16);
|
|
56598
|
+
this .hitRay = new Geometry_Line3 (Numbers_Vector3 .Zero, Numbers_Vector3 .Zero);
|
|
56599
|
+
this .sensors = [[ ]];
|
|
56600
|
+
this .viewpointGroups = [ ];
|
|
56601
|
+
this .lights = [ ];
|
|
56602
|
+
this .globalLightsKeys = [ ];
|
|
56603
|
+
this .globalLights = [ ];
|
|
56604
|
+
this .localObjectsKeys = [ ];
|
|
56605
|
+
this .localObjects = [ ];
|
|
56606
|
+
this .globalShadows = [ false ];
|
|
56607
|
+
this .globalShadow = false;
|
|
56608
|
+
this .localShadows = [ false ];
|
|
56609
|
+
this .localFogs = [ null ];
|
|
56610
|
+
this .layouts = [ ];
|
|
56611
|
+
this .humanoids = [ null ];
|
|
56612
|
+
this .generatedCubeMapTextures = [ ];
|
|
56613
|
+
this .collisions = [ ];
|
|
56614
|
+
this .collisionTime = new Time_StopWatch ();
|
|
56615
|
+
this .numPointingShapes = 0;
|
|
56616
|
+
this .numCollisionShapes = 0;
|
|
56617
|
+
this .numShadowShapes = 0;
|
|
56618
|
+
this .numOpaqueShapes = 0;
|
|
56619
|
+
this .numTransparentShapes = 0;
|
|
56620
|
+
this .pointingShapes = [ ];
|
|
56621
|
+
this .collisionShapes = [ ];
|
|
56622
|
+
this .activeCollisions = [ ];
|
|
56623
|
+
this .shadowShapes = [ ];
|
|
56624
|
+
this .opaqueShapes = [ ];
|
|
56625
|
+
this .transparentShapes = [ ];
|
|
56626
|
+
this .transparencySorter = new Algorithms_MergeSort (this .transparentShapes, (a, b) => a .distance < b .distance);
|
|
56627
|
+
this .transmission = false;
|
|
56628
|
+
this .speed = 0;
|
|
56629
|
+
this .depthBuffer = new Rendering_TextureBuffer (browser, DEPTH_BUFFER_SIZE, DEPTH_BUFFER_SIZE, true);
|
|
56760
56630
|
}
|
|
56761
56631
|
|
|
56762
56632
|
Object .assign (X3DRenderObject .prototype,
|
|
@@ -56855,7 +56725,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
56855
56725
|
|
|
56856
56726
|
return function ()
|
|
56857
56727
|
{
|
|
56858
|
-
renderCount >>>= 0; //
|
|
56728
|
+
renderCount >>>= 0; // convert to uint
|
|
56859
56729
|
this .renderCount = ++ renderCount;
|
|
56860
56730
|
}
|
|
56861
56731
|
})(),
|
|
@@ -57074,31 +56944,9 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57074
56944
|
{
|
|
57075
56945
|
return this .transparentShapes;
|
|
57076
56946
|
},
|
|
57077
|
-
|
|
57078
|
-
{
|
|
57079
|
-
return this .transmissionOpaqueShapes .length;
|
|
57080
|
-
},
|
|
57081
|
-
setNumTransmissionOpaqueShapes (value)
|
|
57082
|
-
{
|
|
57083
|
-
// Needed for StaticGroup.
|
|
57084
|
-
this .transmissionOpaqueShapes .length = value;
|
|
57085
|
-
},
|
|
57086
|
-
getTransmissionOpaqueShapes ()
|
|
57087
|
-
{
|
|
57088
|
-
return this .transmissionOpaqueShapes;
|
|
57089
|
-
},
|
|
57090
|
-
getNumTransmissionTransparentShapes ()
|
|
57091
|
-
{
|
|
57092
|
-
return this .transmissionTransparentShapes .length;
|
|
57093
|
-
},
|
|
57094
|
-
setNumTransmissionTransparentShapes (value)
|
|
57095
|
-
{
|
|
57096
|
-
// Needed for StaticGroup.
|
|
57097
|
-
this .transmissionTransparentShapes .length = value;
|
|
57098
|
-
},
|
|
57099
|
-
getTransmissionTransparentShapes ()
|
|
56947
|
+
isTransmission ()
|
|
57100
56948
|
{
|
|
57101
|
-
return this .
|
|
56949
|
+
return this .transmission;
|
|
57102
56950
|
},
|
|
57103
56951
|
constrainTranslation (translation, stepBack)
|
|
57104
56952
|
{
|
|
@@ -57184,7 +57032,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57184
57032
|
cameraSpaceProjectionMatrix .multRight (projectionMatrix);
|
|
57185
57033
|
cameraSpaceProjectionMatrix .multLeft (viewpoint .getCameraSpaceMatrix ());
|
|
57186
57034
|
|
|
57187
|
-
this .getProjectionMatrix () .
|
|
57035
|
+
this .getProjectionMatrix () .push (cameraSpaceProjectionMatrix);
|
|
57188
57036
|
|
|
57189
57037
|
const depth = this .getDepth (projectionMatrix);
|
|
57190
57038
|
|
|
@@ -57232,12 +57080,12 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57232
57080
|
}
|
|
57233
57081
|
case Rendering_TraverseType .COLLISION:
|
|
57234
57082
|
{
|
|
57235
|
-
// Collect for collide and
|
|
57083
|
+
// Collect for collide and gravitate
|
|
57236
57084
|
this .numCollisionShapes = 0;
|
|
57237
57085
|
|
|
57238
57086
|
callback .call (group, type, this);
|
|
57239
57087
|
this .collide ();
|
|
57240
|
-
this .
|
|
57088
|
+
this .gravitate ();
|
|
57241
57089
|
break;
|
|
57242
57090
|
}
|
|
57243
57091
|
case Rendering_TraverseType .SHADOW:
|
|
@@ -57254,10 +57102,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57254
57102
|
this .numOpaqueShapes = 0;
|
|
57255
57103
|
this .numTransparentShapes = 0;
|
|
57256
57104
|
|
|
57257
|
-
this .transmission = false;
|
|
57258
|
-
this .transmissionOpaqueShapes .length = 0;
|
|
57259
|
-
this .transmissionTransparentShapes .length = 0;
|
|
57260
|
-
|
|
57261
57105
|
this .setGlobalFog (this .getFog ());
|
|
57262
57106
|
|
|
57263
57107
|
callback .call (group, type, this);
|
|
@@ -57304,9 +57148,9 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57304
57148
|
const pointingContext = this .pointingShapes [num];
|
|
57305
57149
|
|
|
57306
57150
|
pointingContext .modelViewMatrix .set (modelViewMatrix);
|
|
57307
|
-
pointingContext .shapeNode = shapeNode;
|
|
57308
57151
|
pointingContext .scissor = viewVolume .getScissor ();
|
|
57309
57152
|
pointingContext .humanoidNode = this .humanoids .at (-1);
|
|
57153
|
+
pointingContext .shapeNode = shapeNode;
|
|
57310
57154
|
|
|
57311
57155
|
// Clip planes & sensors
|
|
57312
57156
|
|
|
@@ -57403,9 +57247,9 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57403
57247
|
const depthContext = this .shadowShapes [num];
|
|
57404
57248
|
|
|
57405
57249
|
depthContext .modelViewMatrix .set (modelViewMatrix);
|
|
57406
|
-
depthContext .shapeNode = shapeNode;
|
|
57407
57250
|
depthContext .scissor = viewVolume .getScissor ();
|
|
57408
57251
|
depthContext .humanoidNode = this .humanoids .at (-1);
|
|
57252
|
+
depthContext .shapeNode = shapeNode;
|
|
57409
57253
|
|
|
57410
57254
|
// Clip planes
|
|
57411
57255
|
|
|
@@ -57446,11 +57290,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57446
57290
|
var renderContext = this .transparentShapes [num];
|
|
57447
57291
|
|
|
57448
57292
|
renderContext .distance = bboxCenter .z;
|
|
57449
|
-
|
|
57450
|
-
if (shapeNode .isTransmission ())
|
|
57451
|
-
this .transmission = true;
|
|
57452
|
-
else
|
|
57453
|
-
this .transmissionTransparentShapes .push (renderContext);
|
|
57454
57293
|
}
|
|
57455
57294
|
else
|
|
57456
57295
|
{
|
|
@@ -57460,20 +57299,17 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57460
57299
|
this .opaqueShapes .push (this .createRenderContext (false));
|
|
57461
57300
|
|
|
57462
57301
|
var renderContext = this .opaqueShapes [num];
|
|
57463
|
-
|
|
57464
|
-
if (shapeNode .isTransmission ())
|
|
57465
|
-
this .transmission = true;
|
|
57466
|
-
else
|
|
57467
|
-
this .transmissionOpaqueShapes .push (renderContext);
|
|
57468
57302
|
}
|
|
57469
57303
|
|
|
57304
|
+
this .transmission ||= shapeNode .isTransmission ();
|
|
57305
|
+
|
|
57470
57306
|
renderContext .modelViewMatrix .set (modelViewMatrix);
|
|
57471
57307
|
renderContext .scissor .assign (viewVolume .getScissor ());
|
|
57472
|
-
renderContext .shadows
|
|
57473
|
-
renderContext .fogNode
|
|
57474
|
-
renderContext .
|
|
57475
|
-
renderContext .
|
|
57476
|
-
renderContext .
|
|
57308
|
+
renderContext .shadows = this .localShadows .at (-1);
|
|
57309
|
+
renderContext .fogNode = this .localFogs .at (-1);
|
|
57310
|
+
renderContext .humanoidNode = this .humanoids .at (-1);
|
|
57311
|
+
renderContext .shapeNode = shapeNode;
|
|
57312
|
+
renderContext .appearanceNode = shapeNode .getAppearance ();
|
|
57477
57313
|
|
|
57478
57314
|
// Clip planes and local lights
|
|
57479
57315
|
|
|
@@ -57506,7 +57342,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57506
57342
|
const
|
|
57507
57343
|
browser = this .getBrowser (),
|
|
57508
57344
|
gl = browser .getContext (),
|
|
57509
|
-
viewport = this .
|
|
57345
|
+
viewport = this .viewVolumes .at (-1) .getViewport (),
|
|
57510
57346
|
[x, y] = browser .getPointer ();
|
|
57511
57347
|
|
|
57512
57348
|
// Configure depth shaders.
|
|
@@ -57621,7 +57457,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57621
57457
|
collision .set_active (true);
|
|
57622
57458
|
};
|
|
57623
57459
|
})(),
|
|
57624
|
-
|
|
57460
|
+
gravitate: (() =>
|
|
57625
57461
|
{
|
|
57626
57462
|
const
|
|
57627
57463
|
projectionMatrix = new Numbers_Matrix4 (),
|
|
@@ -57655,14 +57491,14 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57655
57491
|
avatarHeight = navigationInfo .getAvatarHeight (),
|
|
57656
57492
|
stepHeight = navigationInfo .getStepHeight ();
|
|
57657
57493
|
|
|
57658
|
-
// Reshape viewpoint for
|
|
57494
|
+
// Reshape viewpoint for gravitate.
|
|
57659
57495
|
|
|
57660
57496
|
Geometry_Camera .ortho (-collisionRadius,
|
|
57661
57497
|
collisionRadius,
|
|
57662
57498
|
-collisionRadius,
|
|
57663
57499
|
collisionRadius,
|
|
57664
57500
|
nearValue,
|
|
57665
|
-
Math .max (collisionRadius
|
|
57501
|
+
Math .max (collisionRadius, avatarHeight) * 2,
|
|
57666
57502
|
projectionMatrix);
|
|
57667
57503
|
|
|
57668
57504
|
// Transform viewpoint to look down the up vector.
|
|
@@ -57679,13 +57515,13 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57679
57515
|
cameraSpaceProjectionMatrix .multRight (projectionMatrix);
|
|
57680
57516
|
cameraSpaceProjectionMatrix .multLeft (viewpoint .getCameraSpaceMatrix ());
|
|
57681
57517
|
|
|
57682
|
-
this .getProjectionMatrix () .
|
|
57518
|
+
this .getProjectionMatrix () .push (cameraSpaceProjectionMatrix);
|
|
57683
57519
|
|
|
57684
57520
|
let distance = -this .getDepth (projectionMatrix);
|
|
57685
57521
|
|
|
57686
57522
|
this .getProjectionMatrix () .pop ();
|
|
57687
57523
|
|
|
57688
|
-
//
|
|
57524
|
+
// gravitate or step up.
|
|
57689
57525
|
|
|
57690
57526
|
distance -= avatarHeight;
|
|
57691
57527
|
|
|
@@ -57693,7 +57529,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57693
57529
|
|
|
57694
57530
|
if (distance > 0)
|
|
57695
57531
|
{
|
|
57696
|
-
//
|
|
57532
|
+
// gravitate and fall down the to the floor.
|
|
57697
57533
|
|
|
57698
57534
|
const currentFrameRate = this .speed ? browser .getCurrentFrameRate () : 1000000;
|
|
57699
57535
|
|
|
@@ -57749,7 +57585,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57749
57585
|
const
|
|
57750
57586
|
browser = this .getBrowser (),
|
|
57751
57587
|
gl = browser .getContext (),
|
|
57752
|
-
viewport = this .
|
|
57588
|
+
viewport = this .viewVolumes .at (-1) .getViewport ();
|
|
57753
57589
|
|
|
57754
57590
|
// Configure depth shaders.
|
|
57755
57591
|
|
|
@@ -57803,7 +57639,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57803
57639
|
gl = browser .getContext (),
|
|
57804
57640
|
frameBuffers = this .getFrameBuffers (),
|
|
57805
57641
|
numFrameBuffers = frameBuffers .length,
|
|
57806
|
-
viewport = this .
|
|
57642
|
+
viewport = this .viewVolumes .at (-1) .getViewport (),
|
|
57807
57643
|
lights = this .lights,
|
|
57808
57644
|
globalLightsKeys = this .globalLightsKeys,
|
|
57809
57645
|
globalLights = this .globalLights,
|
|
@@ -57826,14 +57662,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57826
57662
|
generatedCubeMapTexture .renderTexture (this);
|
|
57827
57663
|
}
|
|
57828
57664
|
|
|
57829
|
-
// Set up shadow matrix for all lights, and matrix for all projective textures.
|
|
57830
|
-
|
|
57831
|
-
if (headlight)
|
|
57832
|
-
browser .getHeadlight () .setGlobalVariables (this);
|
|
57833
|
-
|
|
57834
|
-
for (const light of lights)
|
|
57835
|
-
light .setGlobalVariables (this);
|
|
57836
|
-
|
|
57837
57665
|
this .renderAndGlobalLightsKey = `.${this .renderKey}.${globalLightsKeys .sort () .join ("")}.`;
|
|
57838
57666
|
this .globalShadow = globalShadows .at (-1);
|
|
57839
57667
|
|
|
@@ -57851,14 +57679,23 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57851
57679
|
|
|
57852
57680
|
this .viewportArray .set (viewport);
|
|
57853
57681
|
|
|
57854
|
-
if (this .view)
|
|
57682
|
+
if (this .view && this .isActive ())
|
|
57855
57683
|
{
|
|
57856
|
-
this .projectionMatrixArray
|
|
57857
|
-
|
|
57858
|
-
|
|
57684
|
+
this .projectionMatrixArray .set (this .view .projectionMatrix);
|
|
57685
|
+
|
|
57686
|
+
if (browser .getBrowserOption ("XRMovementControl") === "VIEWPOINT")
|
|
57687
|
+
{
|
|
57688
|
+
this .cameraSpaceMatrixArray .set (this .getCameraSpaceMatrix () .get ());
|
|
57689
|
+
this .viewMatrixArray .set (this .getViewMatrix () .get ());
|
|
57859
57690
|
|
|
57860
|
-
|
|
57861
|
-
|
|
57691
|
+
Numbers_Matrix4 .prototype .multLeft (this .cameraSpaceMatrixArray, this .view .inverse);
|
|
57692
|
+
Numbers_Matrix4 .prototype .multRight (this .viewMatrixArray, this .view .matrix);
|
|
57693
|
+
}
|
|
57694
|
+
else
|
|
57695
|
+
{
|
|
57696
|
+
this .cameraSpaceMatrixArray .set (this .view .cameraSpaceMatrix);
|
|
57697
|
+
this .viewMatrixArray .set (this .view .viewMatrix);
|
|
57698
|
+
}
|
|
57862
57699
|
}
|
|
57863
57700
|
else
|
|
57864
57701
|
{
|
|
@@ -57867,22 +57704,29 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57867
57704
|
this .viewMatrixArray .set (this .getViewMatrix () .get ());
|
|
57868
57705
|
}
|
|
57869
57706
|
|
|
57707
|
+
// Set up shadow matrix for all lights, and matrix for all projective textures.
|
|
57708
|
+
|
|
57709
|
+
if (headlight)
|
|
57710
|
+
browser .getHeadlight () .setGlobalVariables (this);
|
|
57711
|
+
|
|
57712
|
+
for (const light of lights)
|
|
57713
|
+
light .setGlobalVariables (this);
|
|
57714
|
+
|
|
57715
|
+
// Draw shapes.
|
|
57716
|
+
|
|
57870
57717
|
if (independent && this .transmission)
|
|
57871
57718
|
{
|
|
57872
57719
|
// Transmission
|
|
57873
57720
|
|
|
57874
|
-
const
|
|
57875
|
-
transmissionBuffer = browser .getTransmissionBuffer (),
|
|
57876
|
-
transmissionOpaqueShapes = this .transmissionOpaqueShapes,
|
|
57877
|
-
transmissionTransparentShapes = this .transmissionTransparentShapes,
|
|
57878
|
-
numTransmissionOpaqueShapes = transmissionOpaqueShapes .length,
|
|
57879
|
-
numTransmissionTransparentShapes = transmissionTransparentShapes .length;
|
|
57721
|
+
const transmissionBuffer = browser .getTransmissionBuffer ();
|
|
57880
57722
|
|
|
57881
|
-
this .drawShapes (gl, browser, transmissionBuffer, gl .COLOR_BUFFER_BIT, false, viewport,
|
|
57723
|
+
this .drawShapes (gl, browser, transmissionBuffer, gl .COLOR_BUFFER_BIT, false, viewport, this .opaqueShapes, this .numOpaqueShapes, this .transparentShapes, this .numTransparentShapes, this .transparencySorter);
|
|
57882
57724
|
|
|
57883
57725
|
gl .bindTexture (gl .TEXTURE_2D, transmissionBuffer .getColorTexture ());
|
|
57884
57726
|
gl .generateMipmap (gl .TEXTURE_2D);
|
|
57885
57727
|
|
|
57728
|
+
this .transmission = false;
|
|
57729
|
+
|
|
57886
57730
|
// Draw with sorted blend or OIT.
|
|
57887
57731
|
|
|
57888
57732
|
this .drawShapes (gl, browser, frameBuffer, 0, frameBuffer .getOIT (), viewport, this .opaqueShapes, this .numOpaqueShapes, this .transparentShapes, this .numTransparentShapes, this .transparencySorter);
|
|
@@ -57922,7 +57766,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57922
57766
|
globalShadows .length = 1;
|
|
57923
57767
|
generatedCubeMapTextures .length = 0;
|
|
57924
57768
|
},
|
|
57925
|
-
drawShapes (gl, browser, frameBuffer,
|
|
57769
|
+
drawShapes (gl, browser, frameBuffer, clearBits, oit, viewport, opaqueShapes, numOpaqueShapes, transparentShapes, numTransparentShapes, transparencySorter)
|
|
57926
57770
|
{
|
|
57927
57771
|
frameBuffer .bind ();
|
|
57928
57772
|
|
|
@@ -57936,7 +57780,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57936
57780
|
this .advanceRenderCount ();
|
|
57937
57781
|
|
|
57938
57782
|
gl .clearColor (0, 0, 0, 0);
|
|
57939
|
-
gl .clear (gl .DEPTH_BUFFER_BIT |
|
|
57783
|
+
gl .clear (gl .DEPTH_BUFFER_BIT | clearBits);
|
|
57940
57784
|
gl .blendFuncSeparate (gl .SRC_ALPHA, gl .ONE_MINUS_SRC_ALPHA, gl .ONE, gl .ONE_MINUS_SRC_ALPHA);
|
|
57941
57785
|
|
|
57942
57786
|
this .getBackground () .display (gl, this);
|
|
@@ -57987,7 +57831,9 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57987
57831
|
|
|
57988
57832
|
function X3DRenderObject_assign (lhs, rhs)
|
|
57989
57833
|
{
|
|
57990
|
-
|
|
57834
|
+
const length = rhs .length;
|
|
57835
|
+
|
|
57836
|
+
for (let i = 0; i < length; ++ i)
|
|
57991
57837
|
lhs [i] = rhs [i];
|
|
57992
57838
|
|
|
57993
57839
|
lhs .length = length;
|
|
@@ -59263,12 +59109,7 @@ const Group_default_ = Group;
|
|
|
59263
59109
|
|
|
59264
59110
|
|
|
59265
59111
|
|
|
59266
|
-
|
|
59267
|
-
{
|
|
59268
|
-
TELEPORT: true,
|
|
59269
|
-
LINEAR: true,
|
|
59270
|
-
ANIMATE: true,
|
|
59271
|
-
};
|
|
59112
|
+
|
|
59272
59113
|
|
|
59273
59114
|
function NavigationInfo (executionContext)
|
|
59274
59115
|
{
|
|
@@ -59283,7 +59124,7 @@ function NavigationInfo (executionContext)
|
|
|
59283
59124
|
|
|
59284
59125
|
this ._avatarSize .setUnit ("length");
|
|
59285
59126
|
this ._speed .setUnit ("speed");
|
|
59286
|
-
this ._visibilityLimit .setUnit ("
|
|
59127
|
+
this ._visibilityLimit .setUnit ("length");
|
|
59287
59128
|
}
|
|
59288
59129
|
|
|
59289
59130
|
Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBindableNode .prototype),
|
|
@@ -59294,12 +59135,14 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59294
59135
|
|
|
59295
59136
|
this ._type .addInterest ("set_type__", this);
|
|
59296
59137
|
this ._headlight .addInterest ("set_headlight__", this);
|
|
59138
|
+
this ._visibilityLimit .addInterest ("set_visibilityLimit__", this);
|
|
59297
59139
|
this ._transitionStart .addInterest ("set_transitionStart__", this);
|
|
59298
59140
|
this ._transitionComplete .addInterest ("set_transitionComplete__", this);
|
|
59299
59141
|
this ._isBound .addInterest ("set_isBound__", this);
|
|
59300
59142
|
|
|
59301
59143
|
this .set_type__ ();
|
|
59302
59144
|
this .set_headlight__ ();
|
|
59145
|
+
this .set_visibilityLimit__ ();
|
|
59303
59146
|
},
|
|
59304
59147
|
getViewer ()
|
|
59305
59148
|
{
|
|
@@ -59333,30 +59176,31 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59333
59176
|
{
|
|
59334
59177
|
const nearValue = this .getCollisionRadius ();
|
|
59335
59178
|
|
|
59336
|
-
|
|
59337
|
-
return 1e-5;
|
|
59338
|
-
|
|
59339
|
-
else
|
|
59340
|
-
return nearValue / 2;
|
|
59179
|
+
return nearValue === 0 ? 1e-5 : nearValue / 2;
|
|
59341
59180
|
},
|
|
59342
59181
|
getFarValue (viewpoint)
|
|
59343
59182
|
{
|
|
59344
|
-
return this .
|
|
59345
|
-
? this ._visibilityLimit .getValue ()
|
|
59346
|
-
: viewpoint .getMaxFarValue ();
|
|
59183
|
+
return this .visibilityLimit || viewpoint .getMaxFarValue ();
|
|
59347
59184
|
},
|
|
59348
|
-
getTransitionType ()
|
|
59185
|
+
getTransitionType: (function ()
|
|
59349
59186
|
{
|
|
59350
|
-
|
|
59351
|
-
|
|
59352
|
-
|
|
59187
|
+
const TransitionTypes = new Set ([
|
|
59188
|
+
"TELEPORT",
|
|
59189
|
+
"LINEAR",
|
|
59190
|
+
"ANIMATE",
|
|
59191
|
+
]);
|
|
59353
59192
|
|
|
59354
|
-
|
|
59355
|
-
|
|
59356
|
-
|
|
59193
|
+
return function ()
|
|
59194
|
+
{
|
|
59195
|
+
for (const value of this ._transitionType)
|
|
59196
|
+
{
|
|
59197
|
+
if (TransitionTypes .has (value))
|
|
59198
|
+
return value;
|
|
59199
|
+
}
|
|
59357
59200
|
|
|
59358
|
-
|
|
59359
|
-
|
|
59201
|
+
return "LINEAR";
|
|
59202
|
+
};
|
|
59203
|
+
})(),
|
|
59360
59204
|
set_type__ ()
|
|
59361
59205
|
{
|
|
59362
59206
|
// Determine active viewer.
|
|
@@ -59397,7 +59241,7 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59397
59241
|
noneViewer = false,
|
|
59398
59242
|
lookAt = false;
|
|
59399
59243
|
|
|
59400
|
-
if (!
|
|
59244
|
+
if (!this ._type .length)
|
|
59401
59245
|
{
|
|
59402
59246
|
examineViewer = true;
|
|
59403
59247
|
walkViewer = true;
|
|
@@ -59439,7 +59283,7 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59439
59283
|
lookAt = true;
|
|
59440
59284
|
break;
|
|
59441
59285
|
default:
|
|
59442
|
-
// Some
|
|
59286
|
+
// Some strings lead to:
|
|
59443
59287
|
examineViewer = true;
|
|
59444
59288
|
continue;
|
|
59445
59289
|
}
|
|
@@ -59475,9 +59319,13 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59475
59319
|
else
|
|
59476
59320
|
this .enable = Function .prototype;
|
|
59477
59321
|
},
|
|
59322
|
+
set_visibilityLimit__ ()
|
|
59323
|
+
{
|
|
59324
|
+
this .visibilityLimit = Math .max (this ._visibilityLimit .getValue (), 0);
|
|
59325
|
+
},
|
|
59478
59326
|
set_transitionStart__ ()
|
|
59479
59327
|
{
|
|
59480
|
-
if (!
|
|
59328
|
+
if (!this ._transitionActive .getValue ())
|
|
59481
59329
|
this ._transitionActive = true;
|
|
59482
59330
|
},
|
|
59483
59331
|
set_transitionComplete__ ()
|
|
@@ -59503,7 +59351,7 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59503
59351
|
|
|
59504
59352
|
const headlight = this .getBrowser () .getHeadlight ();
|
|
59505
59353
|
|
|
59506
|
-
renderObject .getGlobalLights ()
|
|
59354
|
+
renderObject .getGlobalLights () .push (headlight);
|
|
59507
59355
|
renderObject .getGlobalLightsKeys () .push (headlight .lightNode .getLightKey ());
|
|
59508
59356
|
},
|
|
59509
59357
|
traverse (type, renderObject)
|
|
@@ -60399,42 +60247,43 @@ function X3DGeometryNode (executionContext)
|
|
|
60399
60247
|
this .planes [i] = new Geometry_Plane3 ();
|
|
60400
60248
|
}
|
|
60401
60249
|
|
|
60402
|
-
|
|
60250
|
+
class GeometryArray extends Array
|
|
60403
60251
|
{
|
|
60404
|
-
|
|
60405
|
-
// Array version runs faster, see BeyondGermany and TreasureIsland.
|
|
60406
|
-
value ()
|
|
60407
|
-
{
|
|
60408
|
-
// return new Fields .MFFloat ();
|
|
60252
|
+
#typedArray = new Float32Array ();
|
|
60409
60253
|
|
|
60410
|
-
|
|
60411
|
-
|
|
60412
|
-
|
|
60254
|
+
assign (value)
|
|
60255
|
+
{
|
|
60256
|
+
const length = value .length;
|
|
60413
60257
|
|
|
60414
|
-
|
|
60415
|
-
|
|
60416
|
-
const length = value .length;
|
|
60258
|
+
for (let i = 0; i < length; ++ i)
|
|
60259
|
+
this [i] = value [i];
|
|
60417
60260
|
|
|
60418
|
-
|
|
60419
|
-
|
|
60261
|
+
this .length = length;
|
|
60262
|
+
}
|
|
60420
60263
|
|
|
60421
|
-
|
|
60422
|
-
|
|
60264
|
+
getValue ()
|
|
60265
|
+
{
|
|
60266
|
+
return this .#typedArray;
|
|
60267
|
+
}
|
|
60423
60268
|
|
|
60424
|
-
|
|
60425
|
-
|
|
60426
|
-
|
|
60427
|
-
|
|
60269
|
+
shrinkToFit ()
|
|
60270
|
+
{
|
|
60271
|
+
if (this .length === this .#typedArray .length)
|
|
60272
|
+
this .#typedArray .set (this);
|
|
60273
|
+
else
|
|
60274
|
+
this .#typedArray = new Float32Array (this);
|
|
60275
|
+
}
|
|
60276
|
+
}
|
|
60428
60277
|
|
|
60429
|
-
|
|
60430
|
-
|
|
60431
|
-
|
|
60432
|
-
|
|
60433
|
-
|
|
60434
|
-
|
|
60435
|
-
|
|
60278
|
+
Object .defineProperty (X3DGeometryNode, "createArray",
|
|
60279
|
+
{
|
|
60280
|
+
// Function to select ether Array or MFFloat for color/normal/vertex arrays.
|
|
60281
|
+
// Array version runs faster, see BeyondGermany and TreasureIsland.
|
|
60282
|
+
value ()
|
|
60283
|
+
{
|
|
60284
|
+
// return new Fields .MFFloat ();
|
|
60436
60285
|
|
|
60437
|
-
return
|
|
60286
|
+
return new GeometryArray ();
|
|
60438
60287
|
},
|
|
60439
60288
|
})
|
|
60440
60289
|
|
|
@@ -60474,14 +60323,14 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60474
60323
|
|
|
60475
60324
|
this .set_live__ ();
|
|
60476
60325
|
},
|
|
60477
|
-
setGeometryType (value)
|
|
60478
|
-
{
|
|
60479
|
-
this .geometryType = value;
|
|
60480
|
-
},
|
|
60481
60326
|
getGeometryType ()
|
|
60482
60327
|
{
|
|
60483
60328
|
return this .geometryType;
|
|
60484
60329
|
},
|
|
60330
|
+
setGeometryType (value)
|
|
60331
|
+
{
|
|
60332
|
+
this .geometryType = value;
|
|
60333
|
+
},
|
|
60485
60334
|
setTransparent (value)
|
|
60486
60335
|
{
|
|
60487
60336
|
if (!!value !== this ._transparent .getValue ())
|
|
@@ -60524,22 +60373,22 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60524
60373
|
{
|
|
60525
60374
|
return Numbers_Matrix4 .Identity;
|
|
60526
60375
|
},
|
|
60527
|
-
setPrimitiveMode (value)
|
|
60528
|
-
{
|
|
60529
|
-
this .primitiveMode = value;
|
|
60530
|
-
},
|
|
60531
60376
|
getPrimitiveMode ()
|
|
60532
60377
|
{
|
|
60533
60378
|
return this .primitiveMode;
|
|
60534
60379
|
},
|
|
60535
|
-
|
|
60380
|
+
setPrimitiveMode (value)
|
|
60536
60381
|
{
|
|
60537
|
-
|
|
60382
|
+
this .primitiveMode = value;
|
|
60538
60383
|
},
|
|
60539
60384
|
setSolid (value)
|
|
60540
60385
|
{
|
|
60541
60386
|
this .solid = value;
|
|
60542
60387
|
},
|
|
60388
|
+
isSolid ()
|
|
60389
|
+
{
|
|
60390
|
+
return this .solid;
|
|
60391
|
+
},
|
|
60543
60392
|
setCCW (value)
|
|
60544
60393
|
{
|
|
60545
60394
|
const gl = this .getBrowser () .getContext ();
|
|
@@ -60562,33 +60411,14 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60562
60411
|
{
|
|
60563
60412
|
return this .attribBuffers;
|
|
60564
60413
|
},
|
|
60565
|
-
setFogDepths (value)
|
|
60566
|
-
{
|
|
60567
|
-
this .fogDepths .assign (value);
|
|
60568
|
-
},
|
|
60569
60414
|
getFogDepths ()
|
|
60570
60415
|
{
|
|
60571
60416
|
return this .fogDepths;
|
|
60572
60417
|
},
|
|
60573
|
-
setColors (value)
|
|
60574
|
-
{
|
|
60575
|
-
this .colors .assign (value);
|
|
60576
|
-
},
|
|
60577
60418
|
getColors ()
|
|
60578
60419
|
{
|
|
60579
60420
|
return this .colors;
|
|
60580
60421
|
},
|
|
60581
|
-
setMultiTexCoords (value)
|
|
60582
|
-
{
|
|
60583
|
-
const
|
|
60584
|
-
multiTexCoords = this .multiTexCoords,
|
|
60585
|
-
length = value .length;
|
|
60586
|
-
|
|
60587
|
-
for (let i = 0; i < length; ++ i)
|
|
60588
|
-
multiTexCoords [i] = value [i];
|
|
60589
|
-
|
|
60590
|
-
multiTexCoords .length = length;
|
|
60591
|
-
},
|
|
60592
60422
|
getMultiTexCoords ()
|
|
60593
60423
|
{
|
|
60594
60424
|
return this .multiTexCoords;
|
|
@@ -60621,26 +60451,14 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60621
60451
|
|
|
60622
60452
|
this .textureCoordinateNode .getTextureCoordinateMapping (this .textureCoordinateMapping);
|
|
60623
60453
|
},
|
|
60624
|
-
setTangents (value)
|
|
60625
|
-
{
|
|
60626
|
-
this .tangents .assign (value);
|
|
60627
|
-
},
|
|
60628
60454
|
getTangents ()
|
|
60629
60455
|
{
|
|
60630
60456
|
return this .tangents;
|
|
60631
60457
|
},
|
|
60632
|
-
setNormals (value)
|
|
60633
|
-
{
|
|
60634
|
-
this .normals .assign (value);
|
|
60635
|
-
},
|
|
60636
60458
|
getNormals ()
|
|
60637
60459
|
{
|
|
60638
60460
|
return this .normals;
|
|
60639
60461
|
},
|
|
60640
|
-
setVertices (value)
|
|
60641
|
-
{
|
|
60642
|
-
this .vertices .assign (value);
|
|
60643
|
-
},
|
|
60644
60462
|
getVertices ()
|
|
60645
60463
|
{
|
|
60646
60464
|
return this .vertices;
|
|
@@ -60734,28 +60552,35 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60734
60552
|
})(),
|
|
60735
60553
|
generateTangents ()
|
|
60736
60554
|
{
|
|
60737
|
-
|
|
60738
|
-
|
|
60555
|
+
try
|
|
60556
|
+
{
|
|
60557
|
+
if (this .geometryType < 2)
|
|
60558
|
+
return;
|
|
60739
60559
|
|
|
60740
|
-
|
|
60741
|
-
|
|
60560
|
+
if (!this .vertices .length)
|
|
60561
|
+
return;
|
|
60742
60562
|
|
|
60743
|
-
|
|
60744
|
-
|
|
60563
|
+
if (!MikkTSpace .isInitialized ())
|
|
60564
|
+
return void (MikkTSpace .initialize () .then (() => this .requestRebuild ()));
|
|
60745
60565
|
|
|
60746
|
-
|
|
60747
|
-
|
|
60748
|
-
|
|
60749
|
-
|
|
60750
|
-
|
|
60751
|
-
|
|
60566
|
+
const
|
|
60567
|
+
vertices = this .vertices .getValue () .filter ((v, i) => i % 4 < 3),
|
|
60568
|
+
normals = this .normals .getValue (),
|
|
60569
|
+
texCoords = this .multiTexCoords [0] .getValue () .filter ((v, i) => i % 4 < 2),
|
|
60570
|
+
tangents = MikkTSpace .generateTangents (vertices, normals, texCoords),
|
|
60571
|
+
length = tangents .length;
|
|
60752
60572
|
|
|
60753
|
-
|
|
60754
|
-
|
|
60755
|
-
|
|
60573
|
+
// Convert coordinate system handedness to respect output format of MikkTSpace.
|
|
60574
|
+
for (let i = 3; i < length; i += 4)
|
|
60575
|
+
tangents [i] = -tangents [i]; // Flip w-channel.
|
|
60756
60576
|
|
|
60757
|
-
|
|
60758
|
-
|
|
60577
|
+
this .tangents .assign (tangents);
|
|
60578
|
+
this .tangents .shrinkToFit ();
|
|
60579
|
+
}
|
|
60580
|
+
catch (error)
|
|
60581
|
+
{
|
|
60582
|
+
console .error (error);
|
|
60583
|
+
}
|
|
60759
60584
|
},
|
|
60760
60585
|
refineNormals (normalIndex, normals, creaseAngle)
|
|
60761
60586
|
{
|
|
@@ -60835,16 +60660,13 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60835
60660
|
{
|
|
60836
60661
|
// Get barycentric coordinates.
|
|
60837
60662
|
|
|
60838
|
-
const
|
|
60839
|
-
u = uvt .u,
|
|
60840
|
-
v = uvt .v,
|
|
60841
|
-
t = uvt .t;
|
|
60663
|
+
const { u, v, t } = uvt;
|
|
60842
60664
|
|
|
60843
60665
|
// Determine vectors for X3DPointingDeviceSensors.
|
|
60844
60666
|
|
|
60845
|
-
const point = new Numbers_Vector3 (
|
|
60846
|
-
|
|
60847
|
-
|
|
60667
|
+
const point = new Numbers_Vector3 (u * vertices [i4] + v * vertices [i4 + 4] + t * vertices [i4 + 8],
|
|
60668
|
+
u * vertices [i4 + 1] + v * vertices [i4 + 5] + t * vertices [i4 + 9],
|
|
60669
|
+
u * vertices [i4 + 2] + v * vertices [i4 + 6] + t * vertices [i4 + 10]);
|
|
60848
60670
|
|
|
60849
60671
|
if (clipPlanes .length)
|
|
60850
60672
|
{
|
|
@@ -60852,16 +60674,16 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60852
60674
|
continue;
|
|
60853
60675
|
}
|
|
60854
60676
|
|
|
60855
|
-
const texCoord = new Numbers_Vector2 (
|
|
60856
|
-
|
|
60677
|
+
const texCoord = new Numbers_Vector2 (u * texCoords [i4] + v * texCoords [i4 + 4] + t * texCoords [i4 + 8],
|
|
60678
|
+
u * texCoords [i4 + 1] + v * texCoords [i4 + 5] + t * texCoords [i4 + 9]);
|
|
60857
60679
|
|
|
60858
60680
|
const i3 = i * 3;
|
|
60859
60681
|
|
|
60860
|
-
const normal = new Numbers_Vector3 (
|
|
60861
|
-
|
|
60862
|
-
|
|
60682
|
+
const normal = new Numbers_Vector3 (u * normals [i3] + v * normals [i3 + 3] + t * normals [i3 + 6],
|
|
60683
|
+
u * normals [i3 + 1] + v * normals [i3 + 4] + t * normals [i3 + 7],
|
|
60684
|
+
u * normals [i3 + 2] + v * normals [i3 + 5] + t * normals [i3 + 8]);
|
|
60863
60685
|
|
|
60864
|
-
intersections .push ({ texCoord
|
|
60686
|
+
intersections .push ({ texCoord, normal, point: this .getMatrix () .multVecMatrix (point) });
|
|
60865
60687
|
}
|
|
60866
60688
|
}
|
|
60867
60689
|
}
|
|
@@ -61176,17 +60998,20 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61176
60998
|
// Determine bbox.
|
|
61177
60999
|
|
|
61178
61000
|
const
|
|
61179
|
-
vertices
|
|
61180
|
-
|
|
61181
|
-
|
|
61001
|
+
vertices = this .vertices .getValue (),
|
|
61002
|
+
numVertices = vertices .length,
|
|
61003
|
+
min = this .min,
|
|
61004
|
+
max = this .max;
|
|
61182
61005
|
|
|
61183
|
-
if (
|
|
61006
|
+
if (numVertices)
|
|
61184
61007
|
{
|
|
61185
61008
|
if (min .x === Number .POSITIVE_INFINITY)
|
|
61186
61009
|
{
|
|
61187
|
-
for (let i = 0
|
|
61010
|
+
for (let i = 0; i < numVertices; i += 4)
|
|
61188
61011
|
{
|
|
61189
|
-
|
|
61012
|
+
const { [i]: v1, [i + 1]: v2, [i + 2]: v3 } = vertices;
|
|
61013
|
+
|
|
61014
|
+
point .set (v1, v2, v3);
|
|
61190
61015
|
|
|
61191
61016
|
min .min (point);
|
|
61192
61017
|
max .max (point);
|
|
@@ -61345,7 +61170,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61345
61170
|
appearanceNode = renderContext .appearanceNode,
|
|
61346
61171
|
shaderNode = appearanceNode .getShader (this, renderContext);
|
|
61347
61172
|
|
|
61348
|
-
if (this .solid || !appearanceNode .getBackMaterial ()
|
|
61173
|
+
if (this .solid || !appearanceNode .getBackMaterial ())
|
|
61349
61174
|
{
|
|
61350
61175
|
this .displayGeometry (gl, renderContext, appearanceNode, shaderNode, true, true);
|
|
61351
61176
|
}
|
|
@@ -61398,51 +61223,43 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61398
61223
|
|
|
61399
61224
|
// Draw depending on wireframe, solid and transparent.
|
|
61400
61225
|
|
|
61401
|
-
|
|
61402
|
-
{
|
|
61403
|
-
for (let i = 0, length = this .vertexCount; i < length; i += 3)
|
|
61404
|
-
gl .drawArrays (primitiveMode, i, 3);
|
|
61405
|
-
}
|
|
61406
|
-
else
|
|
61407
|
-
{
|
|
61408
|
-
const positiveScale = Numbers_Matrix4 .prototype .determinant3 .call (renderContext .modelViewMatrix) > 0;
|
|
61409
|
-
|
|
61410
|
-
gl .frontFace (positiveScale ? this .frontFace : this .backFace .get (this .frontFace));
|
|
61411
|
-
|
|
61412
|
-
if (renderContext .transparent || back !== front)
|
|
61413
|
-
{
|
|
61414
|
-
// Render transparent or back or front.
|
|
61226
|
+
const positiveScale = Numbers_Matrix4 .prototype .determinant3 .call (renderContext .modelViewMatrix) > 0;
|
|
61415
61227
|
|
|
61416
|
-
|
|
61228
|
+
gl .frontFace (positiveScale ? this .frontFace : this .backFace .get (this .frontFace));
|
|
61417
61229
|
|
|
61418
|
-
|
|
61230
|
+
if (renderContext .transparent || back !== front)
|
|
61231
|
+
{
|
|
61232
|
+
// Render transparent or back or front.
|
|
61419
61233
|
|
|
61420
|
-
|
|
61421
|
-
{
|
|
61422
|
-
gl .cullFace (gl .FRONT);
|
|
61423
|
-
gl .drawArrays (primitiveMode, 0, this .vertexCount);
|
|
61424
|
-
}
|
|
61234
|
+
gl .enable (gl .CULL_FACE);
|
|
61425
61235
|
|
|
61426
|
-
|
|
61236
|
+
// Render back.
|
|
61427
61237
|
|
|
61428
|
-
|
|
61429
|
-
{
|
|
61430
|
-
gl .cullFace (gl .BACK);
|
|
61431
|
-
gl .drawArrays (primitiveMode, 0, this .vertexCount);
|
|
61432
|
-
}
|
|
61433
|
-
}
|
|
61434
|
-
else
|
|
61238
|
+
if (back && !this .solid)
|
|
61435
61239
|
{
|
|
61436
|
-
|
|
61240
|
+
gl .cullFace (gl .FRONT);
|
|
61241
|
+
gl .drawArrays (primitiveMode, 0, this .vertexCount);
|
|
61242
|
+
}
|
|
61437
61243
|
|
|
61438
|
-
|
|
61439
|
-
gl .enable (gl .CULL_FACE);
|
|
61440
|
-
else
|
|
61441
|
-
gl .disable (gl .CULL_FACE);
|
|
61244
|
+
// Render front.
|
|
61442
61245
|
|
|
61246
|
+
if (front)
|
|
61247
|
+
{
|
|
61248
|
+
gl .cullFace (gl .BACK);
|
|
61443
61249
|
gl .drawArrays (primitiveMode, 0, this .vertexCount);
|
|
61444
61250
|
}
|
|
61445
61251
|
}
|
|
61252
|
+
else
|
|
61253
|
+
{
|
|
61254
|
+
// Render solid or both sides.
|
|
61255
|
+
|
|
61256
|
+
if (this .solid)
|
|
61257
|
+
gl .enable (gl .CULL_FACE);
|
|
61258
|
+
else
|
|
61259
|
+
gl .disable (gl .CULL_FACE);
|
|
61260
|
+
|
|
61261
|
+
gl .drawArrays (primitiveMode, 0, this .vertexCount);
|
|
61262
|
+
}
|
|
61446
61263
|
|
|
61447
61264
|
for (const node of renderModeNodes)
|
|
61448
61265
|
node .disable (gl);
|
|
@@ -61485,7 +61302,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61485
61302
|
appearanceNode = renderContext .appearanceNode,
|
|
61486
61303
|
shaderNode = appearanceNode .getShader (this, renderContext);
|
|
61487
61304
|
|
|
61488
|
-
if (this .solid || !appearanceNode .getBackMaterial ()
|
|
61305
|
+
if (this .solid || !appearanceNode .getBackMaterial ())
|
|
61489
61306
|
{
|
|
61490
61307
|
this .displayInstancedGeometry (gl, renderContext, appearanceNode, shaderNode, true, true, shapeNode);
|
|
61491
61308
|
}
|
|
@@ -62346,6 +62163,17 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62346
62163
|
if (this ._hidden .getValue ())
|
|
62347
62164
|
return;
|
|
62348
62165
|
|
|
62166
|
+
const browser = this .getBrowser ();
|
|
62167
|
+
|
|
62168
|
+
// Always fill background.
|
|
62169
|
+
|
|
62170
|
+
if (browser .getWireframe ())
|
|
62171
|
+
{
|
|
62172
|
+
const ext = gl .getExtension ("WEBGL_polygon_mode");
|
|
62173
|
+
|
|
62174
|
+
ext ?.polygonModeWEBGL (gl .FRONT_AND_BACK, ext .FILL_WEBGL);
|
|
62175
|
+
}
|
|
62176
|
+
|
|
62349
62177
|
// Setup context.
|
|
62350
62178
|
|
|
62351
62179
|
gl .disable (gl .DEPTH_TEST);
|
|
@@ -62382,6 +62210,15 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62382
62210
|
gl .depthMask (true);
|
|
62383
62211
|
gl .enable (gl .DEPTH_TEST);
|
|
62384
62212
|
gl .disable (gl .BLEND);
|
|
62213
|
+
|
|
62214
|
+
// Restore polygon mode.
|
|
62215
|
+
|
|
62216
|
+
if (browser .getWireframe ())
|
|
62217
|
+
{
|
|
62218
|
+
const ext = gl .getExtension ("WEBGL_polygon_mode");
|
|
62219
|
+
|
|
62220
|
+
ext ?.polygonModeWEBGL (gl .FRONT_AND_BACK, ext .LINE_WEBGL);
|
|
62221
|
+
}
|
|
62385
62222
|
};
|
|
62386
62223
|
})(),
|
|
62387
62224
|
drawSphere (renderObject, modelViewMatrixArray, projectionMatrixArray)
|
|
@@ -63103,7 +62940,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
63103
62940
|
|
|
63104
62941
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (x_ite_Namespace .add ("X3DTexture2DNode", X3DTexture2DNode_default_));
|
|
63105
62942
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
63106
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
62943
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(386);
|
|
63107
62944
|
/*******************************************************************************
|
|
63108
62945
|
*
|
|
63109
62946
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -63583,6 +63420,7 @@ const Background_default_ = Background;
|
|
|
63583
63420
|
|
|
63584
63421
|
|
|
63585
63422
|
|
|
63423
|
+
|
|
63586
63424
|
function X3DLayerNode (executionContext, defaultViewpoint, groupNode)
|
|
63587
63425
|
{
|
|
63588
63426
|
Core_X3DNode .call (this, executionContext);
|
|
@@ -63773,6 +63611,9 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63773
63611
|
viewpointNode = this .getViewpoint (),
|
|
63774
63612
|
bbox = this .getBBox (new Geometry_Box3 ()) .multRight (viewpointNode .getModelMatrix () .copy () .inverse ());
|
|
63775
63613
|
|
|
63614
|
+
if (bbox .size .equals (Numbers_Vector3 .Zero))
|
|
63615
|
+
return;
|
|
63616
|
+
|
|
63776
63617
|
viewpointNode .lookAt (this, bbox .center, viewpointNode .getLookAtDistance (bbox), transitionTime, factor, straighten);
|
|
63777
63618
|
},
|
|
63778
63619
|
straightenView ()
|
|
@@ -63790,10 +63631,8 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63790
63631
|
},
|
|
63791
63632
|
set_viewport__ ()
|
|
63792
63633
|
{
|
|
63793
|
-
this .viewportNode = Base_X3DCast (Base_X3DConstants .X3DViewportNode, this ._viewport)
|
|
63794
|
-
|
|
63795
|
-
if (!this .viewportNode)
|
|
63796
|
-
this .viewportNode = this .getBrowser () .getDefaultViewport ();
|
|
63634
|
+
this .viewportNode = Base_X3DCast (Base_X3DConstants .X3DViewportNode, this ._viewport)
|
|
63635
|
+
?? this .getBrowser () .getDefaultViewport ();
|
|
63797
63636
|
},
|
|
63798
63637
|
bindBindables (viewpointName)
|
|
63799
63638
|
{
|
|
@@ -63819,21 +63658,31 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63819
63658
|
},
|
|
63820
63659
|
traverse (type, renderObject = this)
|
|
63821
63660
|
{
|
|
63822
|
-
const
|
|
63661
|
+
const
|
|
63662
|
+
browser = this .getBrowser (),
|
|
63663
|
+
viewpointNode = this .getViewpoint (),
|
|
63664
|
+
pose = browser .getPose ();
|
|
63823
63665
|
|
|
63824
63666
|
if (pose && this .active)
|
|
63825
63667
|
{
|
|
63826
|
-
this .getProjectionMatrix ()
|
|
63827
|
-
|
|
63828
|
-
|
|
63668
|
+
this .getProjectionMatrix () .push (pose .views [0] .projectionMatrix);
|
|
63669
|
+
|
|
63670
|
+
if (browser .getBrowserOption ("XRMovementControl") === "VIEWPOINT")
|
|
63671
|
+
{
|
|
63672
|
+
this .getCameraSpaceMatrix () .push (viewpointNode .getCameraSpaceMatrix ());
|
|
63673
|
+
this .getViewMatrix () .push (viewpointNode .getViewMatrix ());
|
|
63674
|
+
}
|
|
63675
|
+
else
|
|
63676
|
+
{
|
|
63677
|
+
this .getCameraSpaceMatrix () .push (pose .cameraSpaceMatrix);
|
|
63678
|
+
this .getViewMatrix () .push (pose .viewMatrix);
|
|
63679
|
+
}
|
|
63829
63680
|
}
|
|
63830
63681
|
else
|
|
63831
63682
|
{
|
|
63832
|
-
|
|
63833
|
-
|
|
63834
|
-
this .
|
|
63835
|
-
this .getCameraSpaceMatrix () .pushMatrix (viewpointNode .getCameraSpaceMatrix ());
|
|
63836
|
-
this .getViewMatrix () .pushMatrix (viewpointNode .getViewMatrix ());
|
|
63683
|
+
this .getProjectionMatrix () .push (viewpointNode .getProjectionMatrix (this));
|
|
63684
|
+
this .getCameraSpaceMatrix () .push (viewpointNode .getCameraSpaceMatrix ());
|
|
63685
|
+
this .getViewMatrix () .push (viewpointNode .getViewMatrix ());
|
|
63837
63686
|
}
|
|
63838
63687
|
|
|
63839
63688
|
switch (type)
|
|
@@ -63879,7 +63728,7 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63879
63728
|
|
|
63880
63729
|
this .setHitRay (this .getProjectionMatrix () .get (), viewport, browser .getPointer ());
|
|
63881
63730
|
this .getNavigationInfo () .enable (type, renderObject);
|
|
63882
|
-
this .getModelViewMatrix () .
|
|
63731
|
+
this .getModelViewMatrix () .push (this .getViewMatrix () .get ());
|
|
63883
63732
|
|
|
63884
63733
|
this .viewportNode .push (this);
|
|
63885
63734
|
renderObject .render (type, this .groupNodes .traverse, this .groupNodes);
|
|
@@ -63891,7 +63740,7 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63891
63740
|
{
|
|
63892
63741
|
if (this ._display .getValue ())
|
|
63893
63742
|
{
|
|
63894
|
-
this .getModelViewMatrix () .
|
|
63743
|
+
this .getModelViewMatrix () .push (Numbers_Matrix4 .Identity);
|
|
63895
63744
|
|
|
63896
63745
|
this .viewportNode .push (this);
|
|
63897
63746
|
this .groupNodes .traverse (type, renderObject);
|
|
@@ -63911,7 +63760,7 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63911
63760
|
{
|
|
63912
63761
|
if (this ._pickable .getValue ())
|
|
63913
63762
|
{
|
|
63914
|
-
this .getModelViewMatrix () .
|
|
63763
|
+
this .getModelViewMatrix () .push (Numbers_Matrix4 .Identity);
|
|
63915
63764
|
|
|
63916
63765
|
this .viewportNode .push (this);
|
|
63917
63766
|
this .groupNodes .traverse (type, renderObject);
|
|
@@ -63940,8 +63789,8 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63940
63789
|
|
|
63941
63790
|
Geometry_Camera .ortho (-size, size, -size, size, -size, size, projectionMatrix);
|
|
63942
63791
|
|
|
63943
|
-
this .getProjectionMatrix () .
|
|
63944
|
-
this .getModelViewMatrix () .
|
|
63792
|
+
this .getProjectionMatrix () .push (projectionMatrix);
|
|
63793
|
+
this .getModelViewMatrix () .push (this .getViewMatrix () .get ());
|
|
63945
63794
|
|
|
63946
63795
|
// Render
|
|
63947
63796
|
this .viewportNode .push (this);
|
|
@@ -63958,7 +63807,7 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63958
63807
|
if (this ._display .getValue ())
|
|
63959
63808
|
{
|
|
63960
63809
|
this .getNavigationInfo () .enable (type, renderObject);
|
|
63961
|
-
this .getModelViewMatrix () .
|
|
63810
|
+
this .getModelViewMatrix () .push (this .getViewMatrix () .get ());
|
|
63962
63811
|
|
|
63963
63812
|
this .viewportNode .push (this);
|
|
63964
63813
|
renderObject .render (type, this .groupNodes .traverse, this .groupNodes);
|
|
@@ -65475,7 +65324,7 @@ Object .assign (Object .setPrototypeOf (X3DViewpointNode .prototype, Core_X3DBin
|
|
|
65475
65324
|
getUpVector ()
|
|
65476
65325
|
{
|
|
65477
65326
|
// Local y-axis,
|
|
65478
|
-
// see https://www.web3d.org/documents/specifications/19775-1/
|
|
65327
|
+
// see https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/navigation.html#NavigationInfo.
|
|
65479
65328
|
return Numbers_Vector3 .yAxis;
|
|
65480
65329
|
},
|
|
65481
65330
|
getSpeedFactor ()
|
|
@@ -65662,8 +65511,11 @@ Object .assign (Object .setPrototypeOf (X3DViewpointNode .prototype, Core_X3DBin
|
|
|
65662
65511
|
|
|
65663
65512
|
this .lookAt (layerNode, point, minDistance, transitionTime, factor, straighten);
|
|
65664
65513
|
},
|
|
65665
|
-
lookAtBBox (layerNode, bbox, transitionTime = 1, factor, straighten)
|
|
65514
|
+
lookAtBBox (layerNode, bbox, transitionTime = 1, factor = 1, straighten = false)
|
|
65666
65515
|
{
|
|
65516
|
+
if (bbox .size .equals (Numbers_Vector3 .Zero))
|
|
65517
|
+
return;
|
|
65518
|
+
|
|
65667
65519
|
bbox = bbox .copy () .multRight (this .getModelMatrix () .copy () .inverse ());
|
|
65668
65520
|
|
|
65669
65521
|
this .lookAt (layerNode, bbox .center, this .getLookAtDistance (bbox), transitionTime, factor, straighten);
|
|
@@ -65741,18 +65593,26 @@ Object .assign (Object .setPrototypeOf (X3DViewpointNode .prototype, Core_X3DBin
|
|
|
65741
65593
|
{
|
|
65742
65594
|
bbox .copy () .multRight (this .modelMatrix .copy () .inverse ());
|
|
65743
65595
|
|
|
65744
|
-
|
|
65745
|
-
|
|
65746
|
-
|
|
65747
|
-
|
|
65748
|
-
|
|
65596
|
+
if (bbox .size .equals (Numbers_Vector3 .Zero))
|
|
65597
|
+
{
|
|
65598
|
+
this .set_nearDistance__ ();
|
|
65599
|
+
this .set_farDistance__ ();
|
|
65600
|
+
}
|
|
65601
|
+
else
|
|
65602
|
+
{
|
|
65603
|
+
const
|
|
65604
|
+
direction = this .getUserPosition () .copy () .subtract (bbox .center) .normalize (),
|
|
65605
|
+
distance = this .getLookAtDistance (bbox),
|
|
65606
|
+
userPosition = bbox .center .copy () .add (direction .multiply (distance)),
|
|
65607
|
+
userOrientation = this .getLookAtRotation (userPosition, bbox .center);
|
|
65749
65608
|
|
|
65750
|
-
|
|
65751
|
-
|
|
65752
|
-
|
|
65753
|
-
|
|
65754
|
-
|
|
65755
|
-
|
|
65609
|
+
this ._positionOffset = userPosition .subtract (this .getPosition ());
|
|
65610
|
+
this ._orientationOffset = this .getOrientation () .copy () .inverse () .multRight (userOrientation);
|
|
65611
|
+
this ._centerOfRotationOffset = bbox .center .copy () .subtract (this .getCenterOfRotation ());
|
|
65612
|
+
this ._fieldOfViewScale = 1;
|
|
65613
|
+
this .nearDistance = distance * (0.125 / 10);
|
|
65614
|
+
this .farDistance = this .nearDistance * this .getMaxFarValue () / 0.125;
|
|
65615
|
+
}
|
|
65756
65616
|
},
|
|
65757
65617
|
traverse (type, renderObject)
|
|
65758
65618
|
{
|
|
@@ -66464,7 +66324,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
66464
66324
|
|
|
66465
66325
|
/* harmony default export */ const Execution_X3DWorld = (x_ite_Namespace .add ("X3DWorld", X3DWorld_default_));
|
|
66466
66326
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
|
|
66467
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
66327
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(386);
|
|
66468
66328
|
/*******************************************************************************
|
|
66469
66329
|
*
|
|
66470
66330
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -67394,7 +67254,7 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
|
|
|
67394
67254
|
|
|
67395
67255
|
/* harmony default export */ const Prototype_ProtoDeclarationArray = (x_ite_Namespace .add ("ProtoDeclarationArray", ProtoDeclarationArray_default_));
|
|
67396
67256
|
;// CONCATENATED MODULE: ./src/x_ite/Routing/X3DRoute.js
|
|
67397
|
-
/* provided dependency */ var X3DRoute_$ = __webpack_require__(
|
|
67257
|
+
/* provided dependency */ var X3DRoute_$ = __webpack_require__(386);
|
|
67398
67258
|
/*******************************************************************************
|
|
67399
67259
|
*
|
|
67400
67260
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -67558,8 +67418,6 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
67558
67418
|
: this [_sourceNode] .getExportedNode ();
|
|
67559
67419
|
|
|
67560
67420
|
this [_sourceField] = sourceNode .getField (this [_sourceFieldName]);
|
|
67561
|
-
|
|
67562
|
-
this [_sourceField] .addOutputRoute (this);
|
|
67563
67421
|
}
|
|
67564
67422
|
catch (error)
|
|
67565
67423
|
{
|
|
@@ -67574,7 +67432,6 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
67574
67432
|
|
|
67575
67433
|
this [_destinationField] = destinationNode .getField (this [_destinationFieldName]);
|
|
67576
67434
|
|
|
67577
|
-
this [_destinationField] .addInputRoute (this);
|
|
67578
67435
|
}
|
|
67579
67436
|
catch (error)
|
|
67580
67437
|
{
|
|
@@ -67583,7 +67440,18 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
67583
67440
|
|
|
67584
67441
|
if (this [_sourceField] && this [_destinationField])
|
|
67585
67442
|
{
|
|
67586
|
-
this [_sourceField] .
|
|
67443
|
+
if (this [_sourceField] .getType () !== this [_destinationField] .getType ())
|
|
67444
|
+
throw new Error (`Bad ROUTE statement: Source field type must match destination field type of fields named "${this [_sourceField] .getName ()}" and "${this [_destinationField] .getName ()}".`);
|
|
67445
|
+
|
|
67446
|
+
if (!this [_sourceField] .isOutput ())
|
|
67447
|
+
throw new Error (`Bad ROUTE statement: Source field "${this [_sourceField] .getName ()}" must be an output.`);
|
|
67448
|
+
|
|
67449
|
+
if (!this [_destinationField] .isInput ())
|
|
67450
|
+
throw new Error (`Bad ROUTE statement: Destination field "${this [_destinationField] .getName ()}" must be an input.`);
|
|
67451
|
+
|
|
67452
|
+
this [_sourceField] .addOutputRoute (this);
|
|
67453
|
+
this [_destinationField] .addInputRoute (this);
|
|
67454
|
+
this [_sourceField] .addFieldInterest (this [_destinationField]);
|
|
67587
67455
|
}
|
|
67588
67456
|
else
|
|
67589
67457
|
{
|
|
@@ -70866,7 +70734,8 @@ Object .assign (Object .setPrototypeOf (ProximitySensor .prototype, Environmenta
|
|
|
70866
70734
|
if (this .layerNode)
|
|
70867
70735
|
{
|
|
70868
70736
|
const
|
|
70869
|
-
|
|
70737
|
+
browser = this .getBrowser (),
|
|
70738
|
+
pose = browser .getPose (),
|
|
70870
70739
|
viewpointNode = this .layerNode .getViewpoint (),
|
|
70871
70740
|
invModelMatrix = this .modelMatrix .inverse ()
|
|
70872
70741
|
|
|
@@ -70876,7 +70745,7 @@ Object .assign (Object .setPrototypeOf (ProximitySensor .prototype, Environmenta
|
|
|
70876
70745
|
.multRight (invModelMatrix)
|
|
70877
70746
|
.get (centerOfRotation);
|
|
70878
70747
|
|
|
70879
|
-
if (pose && this .layerNode .isActive ())
|
|
70748
|
+
if (pose && this .layerNode .isActive () && browser .getBrowserOption ("XRMovementControl") !== "VIEWPOINT")
|
|
70880
70749
|
invModelMatrix .multLeft (pose .cameraSpaceMatrix);
|
|
70881
70750
|
else
|
|
70882
70751
|
invModelMatrix .multLeft (viewpointNode .getCameraSpaceMatrix ());
|
|
@@ -70897,7 +70766,7 @@ Object .assign (Object .setPrototypeOf (ProximitySensor .prototype, Environmenta
|
|
|
70897
70766
|
else
|
|
70898
70767
|
{
|
|
70899
70768
|
this ._isActive = true;
|
|
70900
|
-
this ._enterTime =
|
|
70769
|
+
this ._enterTime = browser .getCurrentTime ();
|
|
70901
70770
|
this ._position_changed = position;
|
|
70902
70771
|
this ._orientation_changed = orientation;
|
|
70903
70772
|
this ._centerOfRotation_changed = centerOfRotation;
|
|
@@ -74030,17 +73899,18 @@ Object .assign (Object .setPrototypeOf (Box .prototype, Rendering_X3DGeometryNod
|
|
|
74030
73899
|
return function ()
|
|
74031
73900
|
{
|
|
74032
73901
|
const
|
|
74033
|
-
options
|
|
74034
|
-
geometry
|
|
74035
|
-
size
|
|
73902
|
+
options = this .getBrowser () .getBoxOptions (),
|
|
73903
|
+
geometry = options .getGeometry (),
|
|
73904
|
+
size = this ._size .getValue (),
|
|
73905
|
+
vertexArray = this .getVertices ();
|
|
74036
73906
|
|
|
74037
|
-
this .
|
|
74038
|
-
this .
|
|
74039
|
-
this .
|
|
73907
|
+
this .getMultiTexCoords () .push (... geometry .getMultiTexCoords ());
|
|
73908
|
+
this .getTangents () .assign (geometry .getTangents ());
|
|
73909
|
+
this .getNormals () .assign (geometry .getNormals ());
|
|
74040
73910
|
|
|
74041
73911
|
if (size .equals (defaultSize))
|
|
74042
73912
|
{
|
|
74043
|
-
|
|
73913
|
+
vertexArray .assign (geometry .getVertices ());
|
|
74044
73914
|
|
|
74045
73915
|
this .getMin () .assign (geometry .getMin ());
|
|
74046
73916
|
this .getMax () .assign (geometry .getMax ());
|
|
@@ -74051,8 +73921,7 @@ Object .assign (Object .setPrototypeOf (Box .prototype, Rendering_X3DGeometryNod
|
|
|
74051
73921
|
x = Math .abs (size .x / 2),
|
|
74052
73922
|
y = Math .abs (size .y / 2),
|
|
74053
73923
|
z = Math .abs (size .z / 2),
|
|
74054
|
-
defaultVertices = geometry .getVertices () .getValue ()
|
|
74055
|
-
vertexArray = this .getVertices ();
|
|
73924
|
+
defaultVertices = geometry .getVertices () .getValue ();
|
|
74056
73925
|
|
|
74057
73926
|
for (let i = 0, length = defaultVertices .length; i < length; i += 4)
|
|
74058
73927
|
{
|
|
@@ -75070,11 +74939,11 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75070
74939
|
SCPyAxis = new Numbers_Vector3 (),
|
|
75071
74940
|
SCPzAxis = new Numbers_Vector3 ();
|
|
75072
74941
|
|
|
75073
|
-
|
|
74942
|
+
const
|
|
75074
74943
|
SCPyAxisPrevious = new Numbers_Vector3 (),
|
|
75075
74944
|
SCPzAxisPrevious = new Numbers_Vector3 ();
|
|
75076
74945
|
|
|
75077
|
-
|
|
74946
|
+
const
|
|
75078
74947
|
vector3 = new Numbers_Vector3 (),
|
|
75079
74948
|
rotation = new Numbers_Rotation4 ();
|
|
75080
74949
|
|
|
@@ -75112,7 +74981,7 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75112
74981
|
.subtract (vector3 .assign (spine [length] .getValue ()) .subtract (s) .normalize ())
|
|
75113
74982
|
.normalize ();
|
|
75114
74983
|
|
|
75115
|
-
if (!
|
|
74984
|
+
if (!SCPyAxis .equals (Numbers_Vector3 .Zero))
|
|
75116
74985
|
break;
|
|
75117
74986
|
}
|
|
75118
74987
|
|
|
@@ -75120,10 +74989,10 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75120
74989
|
for (let i = 0, length = numSpines - 2; i < length; ++ i)
|
|
75121
74990
|
{
|
|
75122
74991
|
SCPzAxis .assign (spine [i + 1] .getValue ()) .subtract (spine [i] .getValue ())
|
|
75123
|
-
|
|
75124
|
-
|
|
74992
|
+
.cross (vector3 .assign (spine [length] .getValue ()) .subtract (spine [i] .getValue ()))
|
|
74993
|
+
.normalize ();
|
|
75125
74994
|
|
|
75126
|
-
if (!
|
|
74995
|
+
if (!SCPzAxis .equals (Numbers_Vector3 .Zero))
|
|
75127
74996
|
break;
|
|
75128
74997
|
}
|
|
75129
74998
|
}
|
|
@@ -75134,7 +75003,7 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75134
75003
|
{
|
|
75135
75004
|
SCPyAxis .assign (spine [i + 1] .getValue ()) .subtract (spine [i] .getValue ()) .normalize ();
|
|
75136
75005
|
|
|
75137
|
-
if (!
|
|
75006
|
+
if (!SCPyAxis .equals (Numbers_Vector3 .Zero))
|
|
75138
75007
|
break;
|
|
75139
75008
|
}
|
|
75140
75009
|
|
|
@@ -75142,10 +75011,10 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75142
75011
|
for (let i = 1, length = numSpines - 1; i < length; ++ i)
|
|
75143
75012
|
{
|
|
75144
75013
|
SCPzAxis .assign (spine [i + 1] .getValue ()) .subtract (spine [i] .getValue ())
|
|
75145
|
-
|
|
75146
|
-
|
|
75014
|
+
.cross (vector3 .assign (spine [i - 1] .getValue ()) .subtract (spine [i] .getValue ()))
|
|
75015
|
+
.normalize ();
|
|
75147
75016
|
|
|
75148
|
-
if (!
|
|
75017
|
+
if (!SCPzAxis .equals (Numbers_Vector3 .Zero))
|
|
75149
75018
|
break;
|
|
75150
75019
|
}
|
|
75151
75020
|
}
|
|
@@ -75179,11 +75048,11 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75179
75048
|
const s = spine [i] .getValue ();
|
|
75180
75049
|
|
|
75181
75050
|
SCPyAxis .assign (spine [i + 1] .getValue ()) .subtract (s) .normalize ()
|
|
75182
|
-
|
|
75183
|
-
|
|
75051
|
+
.subtract (vector3 .assign (spine [i - 1] .getValue ()) .subtract (s) .normalize ())
|
|
75052
|
+
.normalize ();
|
|
75184
75053
|
SCPzAxis .assign (spine [i + 1] .getValue ()) .subtract (s)
|
|
75185
|
-
|
|
75186
|
-
|
|
75054
|
+
.cross (vector3 .assign (spine [i - 1] .getValue ()) .subtract (s))
|
|
75055
|
+
.normalize ();
|
|
75187
75056
|
|
|
75188
75057
|
// g.
|
|
75189
75058
|
if (SCPzAxisPrevious .dot (SCPzAxis) < 0)
|
|
@@ -75225,8 +75094,8 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75225
75094
|
if (numSpines > 2)
|
|
75226
75095
|
{
|
|
75227
75096
|
SCPzAxis .assign (s) .subtract (spine [numSpines - 2] .getValue ())
|
|
75228
|
-
|
|
75229
|
-
|
|
75097
|
+
.cross (vector3 .assign (spine [numSpines - 3] .getValue ()) .subtract (spine [numSpines - 2] .getValue ()))
|
|
75098
|
+
.normalize ();
|
|
75230
75099
|
}
|
|
75231
75100
|
|
|
75232
75101
|
// g.
|
|
@@ -75263,7 +75132,7 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75263
75132
|
return function ()
|
|
75264
75133
|
{
|
|
75265
75134
|
const
|
|
75266
|
-
cw = !
|
|
75135
|
+
cw = !this ._ccw .getValue (),
|
|
75267
75136
|
crossSection = this ._crossSection,
|
|
75268
75137
|
spine = this ._spine,
|
|
75269
75138
|
numSpines = spine .length,
|
|
@@ -76520,26 +76389,25 @@ Object .assign (Object .setPrototypeOf (Sphere .prototype, Rendering_X3DGeometry
|
|
|
76520
76389
|
build ()
|
|
76521
76390
|
{
|
|
76522
76391
|
const
|
|
76523
|
-
options
|
|
76524
|
-
geometry
|
|
76525
|
-
radius
|
|
76392
|
+
options = this .getBrowser () .getSphereOptions (),
|
|
76393
|
+
geometry = options .getGeometry (),
|
|
76394
|
+
radius = Math .abs (this ._radius .getValue ()),
|
|
76395
|
+
vertexArray = this .getVertices ();
|
|
76526
76396
|
|
|
76527
|
-
this .
|
|
76528
|
-
this .
|
|
76529
|
-
this .
|
|
76397
|
+
this .getMultiTexCoords () .push (... geometry .getMultiTexCoords ());
|
|
76398
|
+
this .getTangents () .assign (geometry .getTangents ());
|
|
76399
|
+
this .getNormals () .assign (geometry .getNormals ());
|
|
76530
76400
|
|
|
76531
76401
|
if (radius === 1)
|
|
76532
76402
|
{
|
|
76533
|
-
|
|
76403
|
+
vertexArray .assign (geometry .getVertices ());
|
|
76534
76404
|
|
|
76535
76405
|
this .getMin () .assign (geometry .getMin ());
|
|
76536
76406
|
this .getMax () .assign (geometry .getMax ());
|
|
76537
76407
|
}
|
|
76538
76408
|
else
|
|
76539
76409
|
{
|
|
76540
|
-
const
|
|
76541
|
-
defaultVertices = geometry .getVertices () .getValue (),
|
|
76542
|
-
vertexArray = this .getVertices ();
|
|
76410
|
+
const defaultVertices = geometry .getVertices () .getValue ();
|
|
76543
76411
|
|
|
76544
76412
|
for (let i = 0, length = defaultVertices .length; i < length; i += 4)
|
|
76545
76413
|
{
|
|
@@ -77021,7 +76889,6 @@ function X3DPointGeometryNode (executionContext)
|
|
|
77021
76889
|
this .setGeometryType (0);
|
|
77022
76890
|
this .setPrimitiveMode (browser .getContext () .POINTS);
|
|
77023
76891
|
this .setSolid (false);
|
|
77024
|
-
this .setTransparent (true);
|
|
77025
76892
|
}
|
|
77026
76893
|
|
|
77027
76894
|
Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Rendering_X3DGeometryNode .prototype),
|
|
@@ -77045,6 +76912,9 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
77045
76912
|
attribNodes = this .getAttrib (),
|
|
77046
76913
|
attribBuffers = this .getAttribBuffers ();
|
|
77047
76914
|
|
|
76915
|
+
if (!renderContext .transparent)
|
|
76916
|
+
gl .enable (gl .SAMPLE_ALPHA_TO_COVERAGE);
|
|
76917
|
+
|
|
77048
76918
|
for (const node of renderModeNodes)
|
|
77049
76919
|
node .enable (gl);
|
|
77050
76920
|
|
|
@@ -77082,6 +76952,8 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
77082
76952
|
|
|
77083
76953
|
for (const node of renderModeNodes)
|
|
77084
76954
|
node .disable (gl);
|
|
76955
|
+
|
|
76956
|
+
gl .disable (gl .SAMPLE_ALPHA_TO_COVERAGE);
|
|
77085
76957
|
},
|
|
77086
76958
|
displayInstanced (gl, renderContext, shapeNode)
|
|
77087
76959
|
{
|
|
@@ -77092,6 +76964,9 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
77092
76964
|
attribNodes = this .getAttrib (),
|
|
77093
76965
|
attribBuffers = this .getAttribBuffers ();
|
|
77094
76966
|
|
|
76967
|
+
if (!renderContext .transparent)
|
|
76968
|
+
gl .enable (gl .SAMPLE_ALPHA_TO_COVERAGE);
|
|
76969
|
+
|
|
77095
76970
|
for (const node of renderModeNodes)
|
|
77096
76971
|
node .enable (gl);
|
|
77097
76972
|
|
|
@@ -77148,6 +77023,8 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
77148
77023
|
|
|
77149
77024
|
for (const node of renderModeNodes)
|
|
77150
77025
|
node .disable (gl);
|
|
77026
|
+
|
|
77027
|
+
gl .disable (gl .SAMPLE_ALPHA_TO_COVERAGE);
|
|
77151
77028
|
},
|
|
77152
77029
|
});
|
|
77153
77030
|
|
|
@@ -77617,7 +77494,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
77617
77494
|
renderObject = renderContext .renderObject,
|
|
77618
77495
|
viewport = renderObject .getViewVolume () .getViewport (),
|
|
77619
77496
|
projectionMatrix = renderObject .getProjectionMatrix () .get (),
|
|
77620
|
-
primitiveMode = browser .
|
|
77497
|
+
primitiveMode = browser .getPrimitiveMode (gl .TRIANGLES),
|
|
77621
77498
|
transformShaderNode = browser .getLineTransformShader ();
|
|
77622
77499
|
|
|
77623
77500
|
modelViewProjectionMatrixArray .set (matrix .assign (renderContext .modelViewMatrix) .multRight (projectionMatrix));
|
|
@@ -77835,7 +77712,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
77835
77712
|
renderObject = renderContext .renderObject,
|
|
77836
77713
|
viewport = renderObject .getViewVolume () .getViewport (),
|
|
77837
77714
|
projectionMatrix = renderObject .getProjectionMatrix () .get (),
|
|
77838
|
-
primitiveMode = browser .
|
|
77715
|
+
primitiveMode = browser .getPrimitiveMode (gl .TRIANGLES),
|
|
77839
77716
|
transformShaderNode = browser .getLineTransformInstancedShader ();
|
|
77840
77717
|
|
|
77841
77718
|
modelViewProjectionMatrixArray .set (matrix .assign (renderContext .modelViewMatrix) .multRight (projectionMatrix));
|
|
@@ -80189,7 +80066,9 @@ const TextureCoordinateGenerator_default_ = TextureCoordinateGenerator;
|
|
|
80189
80066
|
|
|
80190
80067
|
|
|
80191
80068
|
|
|
80192
|
-
|
|
80069
|
+
const CLONE_COUNT = 2; // Minimum number of shapes that must be cloned to become an InstancedShape.
|
|
80070
|
+
|
|
80071
|
+
// No support for X3DBindableNode nodes, local lights. X3DLocalFog, local ClipPlane nodes, LOD, Billboard node.
|
|
80193
80072
|
|
|
80194
80073
|
function StaticGroup (executionContext)
|
|
80195
80074
|
{
|
|
@@ -80243,35 +80122,43 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80243
80122
|
for (const visibleNode of this .visibleNodes)
|
|
80244
80123
|
visibleNode .traverse (type, renderObject);
|
|
80245
80124
|
},
|
|
80246
|
-
createStaticShapes
|
|
80125
|
+
createStaticShapes (renderObject)
|
|
80247
80126
|
{
|
|
80248
|
-
|
|
80249
|
-
|
|
80250
|
-
const viewVolume = new Geometry_ViewVolume ();
|
|
80127
|
+
// Check if scene is currently loading something.
|
|
80251
80128
|
|
|
80252
|
-
|
|
80129
|
+
const scene = this .getScene ();
|
|
80253
80130
|
|
|
80254
|
-
|
|
80131
|
+
if (scene ._loadCount .getValue ())
|
|
80255
80132
|
{
|
|
80256
|
-
|
|
80133
|
+
scene ._loadCount .addFieldCallback (this, () =>
|
|
80134
|
+
{
|
|
80135
|
+
if (scene ._loadCount .getValue ())
|
|
80136
|
+
return;
|
|
80257
80137
|
|
|
80258
|
-
|
|
80138
|
+
scene ._loadCount .removeFieldCallback (this);
|
|
80259
80139
|
|
|
80260
|
-
|
|
80261
|
-
|
|
80262
|
-
|
|
80263
|
-
|
|
80264
|
-
|
|
80265
|
-
|
|
80140
|
+
this .set_children__ ();
|
|
80141
|
+
});
|
|
80142
|
+
}
|
|
80143
|
+
else
|
|
80144
|
+
{
|
|
80145
|
+
// Create static shapes.
|
|
80266
80146
|
|
|
80267
|
-
|
|
80147
|
+
this .optimizeGroups (this .createGroups (renderObject));
|
|
80148
|
+
}
|
|
80268
80149
|
|
|
80269
|
-
|
|
80270
|
-
|
|
80150
|
+
return [this .groupNode];
|
|
80151
|
+
},
|
|
80152
|
+
createGroups: (() =>
|
|
80153
|
+
{
|
|
80154
|
+
const Statics = ["Opaque", "Transparent"];
|
|
80271
80155
|
|
|
80272
|
-
|
|
80273
|
-
|
|
80156
|
+
const viewVolume = new Geometry_ViewVolume ();
|
|
80157
|
+
|
|
80158
|
+
viewVolume .intersectsSphere = () => true;
|
|
80274
80159
|
|
|
80160
|
+
return function (renderObject)
|
|
80161
|
+
{
|
|
80275
80162
|
// Traverse Group node to get render contexts.
|
|
80276
80163
|
|
|
80277
80164
|
const
|
|
@@ -80317,6 +80204,7 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80317
80204
|
// Sort out TextureCoordinateGenerator nodes.
|
|
80318
80205
|
|
|
80319
80206
|
const
|
|
80207
|
+
clonesIndex = new Map (renderContexts .map (({shapeNode}) => [shapeNode, [ ]])),
|
|
80320
80208
|
groupsIndex = { },
|
|
80321
80209
|
singlesIndex = { };
|
|
80322
80210
|
|
|
@@ -80347,32 +80235,37 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80347
80235
|
key += shapeNode ._castShadow .getValue () ? 1 : 0;
|
|
80348
80236
|
key += shapeNode ._bboxDisplay .getValue () ? 1 : 0;
|
|
80349
80237
|
|
|
80350
|
-
const
|
|
80238
|
+
const
|
|
80239
|
+
clones = clonesIndex .get (shapeNode),
|
|
80240
|
+
group = groupsIndex [key] ??= [ ];
|
|
80351
80241
|
|
|
80352
|
-
|
|
80242
|
+
clones .push (renderContext);
|
|
80243
|
+
group .push (renderContext);
|
|
80353
80244
|
}
|
|
80354
80245
|
|
|
80355
|
-
|
|
80356
|
-
combineGroups = Object .values (groupsIndex),
|
|
80357
|
-
singlesGroups = Object .values (singlesIndex);
|
|
80246
|
+
// Sort out shapes that are not cloned.
|
|
80358
80247
|
|
|
80359
|
-
|
|
80248
|
+
for (const [id, group] of clonesIndex .entries ())
|
|
80360
80249
|
{
|
|
80361
|
-
|
|
80250
|
+
if (group .length < CLONE_COUNT)
|
|
80251
|
+
clonesIndex .delete (id);
|
|
80362
80252
|
}
|
|
80363
80253
|
|
|
80364
|
-
// Create
|
|
80365
|
-
|
|
80366
|
-
if (DEVELOPMENT)
|
|
80367
|
-
console .time ("StaticGroup");
|
|
80254
|
+
// Create arrays.
|
|
80368
80255
|
|
|
80369
|
-
const
|
|
80370
|
-
|
|
80256
|
+
const
|
|
80257
|
+
clonesGroups = Array .from (clonesIndex .values ()),
|
|
80258
|
+
combineGroups = Object .values (groupsIndex)
|
|
80259
|
+
.map (group => group .filter (({shapeNode}) => !clonesIndex .has (shapeNode)))
|
|
80260
|
+
.filter (group => group .length),
|
|
80261
|
+
singlesGroups = Object .values (singlesIndex);
|
|
80371
80262
|
|
|
80372
|
-
if (
|
|
80373
|
-
|
|
80263
|
+
if (browser .getBrowserOption ("Debug"))
|
|
80264
|
+
{
|
|
80265
|
+
console .info (`StaticGroup will create ${clonesGroups .length + combineGroups .length + singlesGroups .length} static nodes from the previous ${renderContexts .length} nodes.`);
|
|
80266
|
+
}
|
|
80374
80267
|
|
|
80375
|
-
return
|
|
80268
|
+
return { clonesGroups, combineGroups, singlesGroups };
|
|
80376
80269
|
};
|
|
80377
80270
|
})(),
|
|
80378
80271
|
hasTextureCoordinateGenerator (geometryNode)
|
|
@@ -80390,7 +80283,68 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80390
80283
|
|
|
80391
80284
|
return false;
|
|
80392
80285
|
},
|
|
80393
|
-
|
|
80286
|
+
async optimizeGroups ({ clonesGroups, combineGroups, singlesGroups })
|
|
80287
|
+
{
|
|
80288
|
+
if (clonesGroups .length)
|
|
80289
|
+
await this .getBrowser () .loadComponents ("X_ITE");
|
|
80290
|
+
|
|
80291
|
+
// Create static shapes.
|
|
80292
|
+
|
|
80293
|
+
if (DEVELOPMENT)
|
|
80294
|
+
console .time ("StaticGroup");
|
|
80295
|
+
|
|
80296
|
+
const visibleNodes = [ ];
|
|
80297
|
+
|
|
80298
|
+
clonesGroups .forEach (group => this .combineClones (group, visibleNodes));
|
|
80299
|
+
combineGroups .forEach (group => this .combineShapes (group, visibleNodes));
|
|
80300
|
+
singlesGroups .forEach (group => this .normalizeSingleShapes (group, visibleNodes));
|
|
80301
|
+
|
|
80302
|
+
this .visibleNodes = visibleNodes;
|
|
80303
|
+
|
|
80304
|
+
if (DEVELOPMENT)
|
|
80305
|
+
console .timeEnd ("StaticGroup");
|
|
80306
|
+
},
|
|
80307
|
+
combineClones: (function ()
|
|
80308
|
+
{
|
|
80309
|
+
const
|
|
80310
|
+
modelMatrix = new Numbers_Matrix4 (),
|
|
80311
|
+
t = new Numbers_Vector3 (),
|
|
80312
|
+
r = new Numbers_Rotation4 (),
|
|
80313
|
+
s = new Numbers_Vector3 (),
|
|
80314
|
+
so = new Numbers_Rotation4 ();
|
|
80315
|
+
|
|
80316
|
+
return function (group, visibleNodes)
|
|
80317
|
+
{
|
|
80318
|
+
const
|
|
80319
|
+
browser = this .getBrowser (),
|
|
80320
|
+
executionContext = this .getExecutionContext (),
|
|
80321
|
+
InstancedShape = browser .getConcreteNodes () .get ("InstancedShape"),
|
|
80322
|
+
instancedShape = new InstancedShape (executionContext),
|
|
80323
|
+
shapeNode0 = group [0] .shapeNode;
|
|
80324
|
+
|
|
80325
|
+
for (const { modelViewMatrix } of group)
|
|
80326
|
+
{
|
|
80327
|
+
modelMatrix .assign (modelViewMatrix) .get (t, r, s, so);
|
|
80328
|
+
|
|
80329
|
+
instancedShape ._translations .push (t);
|
|
80330
|
+
instancedShape ._rotations .push (r);
|
|
80331
|
+
instancedShape ._scales .push (s);
|
|
80332
|
+
instancedShape ._scaleOrientations .push (so);
|
|
80333
|
+
}
|
|
80334
|
+
|
|
80335
|
+
instancedShape ._pointerEvents = shapeNode0 ._pointerEvents;
|
|
80336
|
+
instancedShape ._castShadow = shapeNode0 ._castShadow;
|
|
80337
|
+
instancedShape ._bboxDisplay = shapeNode0 ._bboxDisplay;
|
|
80338
|
+
instancedShape ._appearance = shapeNode0 ._appearance;
|
|
80339
|
+
instancedShape ._geometry = shapeNode0 ._geometry;
|
|
80340
|
+
|
|
80341
|
+
instancedShape .setPrivate (true);
|
|
80342
|
+
instancedShape .setup ();
|
|
80343
|
+
|
|
80344
|
+
visibleNodes .push (instancedShape);
|
|
80345
|
+
};
|
|
80346
|
+
})(),
|
|
80347
|
+
combineShapes (group, visibleNodes)
|
|
80394
80348
|
{
|
|
80395
80349
|
const
|
|
80396
80350
|
executionContext = this .getExecutionContext (),
|
|
@@ -80597,7 +80551,7 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80597
80551
|
newShapeNode .setPrivate (true);
|
|
80598
80552
|
newShapeNode .setup ();
|
|
80599
80553
|
|
|
80600
|
-
|
|
80554
|
+
visibleNodes .push (newShapeNode);
|
|
80601
80555
|
},
|
|
80602
80556
|
normalizeGeometry: (function ()
|
|
80603
80557
|
{
|
|
@@ -80839,34 +80793,37 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80839
80793
|
return newGeometryNode;
|
|
80840
80794
|
};
|
|
80841
80795
|
})(),
|
|
80842
|
-
normalizeSingleShapes (
|
|
80796
|
+
normalizeSingleShapes: (function ()
|
|
80843
80797
|
{
|
|
80844
|
-
const
|
|
80845
|
-
executionContext = this .getExecutionContext (),
|
|
80846
|
-
newTransformNode = new Grouping_Transform (executionContext),
|
|
80847
|
-
modelMatrix = new Numbers_Matrix4 (... group [0] .modelViewMatrix);
|
|
80848
|
-
|
|
80849
80798
|
const
|
|
80850
80799
|
t = new Numbers_Vector3 (),
|
|
80851
80800
|
r = new Numbers_Rotation4 (),
|
|
80852
80801
|
s = new Numbers_Vector3 (),
|
|
80853
80802
|
so = new Numbers_Rotation4 ();
|
|
80854
80803
|
|
|
80855
|
-
|
|
80804
|
+
return function (group, visibleNodes)
|
|
80805
|
+
{
|
|
80806
|
+
const
|
|
80807
|
+
executionContext = this .getExecutionContext (),
|
|
80808
|
+
newTransformNode = new Grouping_Transform (executionContext),
|
|
80809
|
+
modelMatrix = new Numbers_Matrix4 (... group [0] .modelViewMatrix);
|
|
80856
80810
|
|
|
80857
|
-
|
|
80858
|
-
newTransformNode ._rotation = r;
|
|
80859
|
-
newTransformNode ._scale = s;
|
|
80860
|
-
newTransformNode ._scaleOrientation = so;
|
|
80811
|
+
modelMatrix .get (t, r, s, so);
|
|
80861
80812
|
|
|
80862
|
-
|
|
80863
|
-
newTransformNode .
|
|
80813
|
+
newTransformNode ._translation = t;
|
|
80814
|
+
newTransformNode ._rotation = r;
|
|
80815
|
+
newTransformNode ._scale = s;
|
|
80816
|
+
newTransformNode ._scaleOrientation = so;
|
|
80864
80817
|
|
|
80865
|
-
|
|
80866
|
-
|
|
80818
|
+
for (const { shapeNode } of group)
|
|
80819
|
+
newTransformNode ._children .push (shapeNode);
|
|
80867
80820
|
|
|
80868
|
-
|
|
80869
|
-
|
|
80821
|
+
newTransformNode .setPrivate (true);
|
|
80822
|
+
newTransformNode .setup ();
|
|
80823
|
+
|
|
80824
|
+
visibleNodes .push (newTransformNode);
|
|
80825
|
+
};
|
|
80826
|
+
})(),
|
|
80870
80827
|
dispose ()
|
|
80871
80828
|
{
|
|
80872
80829
|
Grouping_X3DBoundedObject .prototype .dispose .call (this);
|
|
@@ -83549,7 +83506,7 @@ Object .assign (Object .setPrototypeOf (X3DLightNode .prototype, Core_X3DChildNo
|
|
|
83549
83506
|
{
|
|
83550
83507
|
const lightContainer = renderObject .getLightContainer ();
|
|
83551
83508
|
|
|
83552
|
-
lightContainer .modelViewMatrix .
|
|
83509
|
+
lightContainer .modelViewMatrix .push (renderObject .getModelViewMatrix () .get ());
|
|
83553
83510
|
|
|
83554
83511
|
if (this ._global .getValue ())
|
|
83555
83512
|
{
|
|
@@ -83687,7 +83644,7 @@ Object .assign (DirectionalLightContainer .prototype,
|
|
|
83687
83644
|
this .groupNode = groupNode;
|
|
83688
83645
|
this .global = lightNode .getGlobal ();
|
|
83689
83646
|
|
|
83690
|
-
this .modelViewMatrix .
|
|
83647
|
+
this .modelViewMatrix .push (modelViewMatrix);
|
|
83691
83648
|
|
|
83692
83649
|
// Get shadow buffer from browser.
|
|
83693
83650
|
|
|
@@ -83723,8 +83680,8 @@ Object .assign (DirectionalLightContainer .prototype,
|
|
|
83723
83680
|
this .shadowBuffer .bind ();
|
|
83724
83681
|
|
|
83725
83682
|
renderObject .getViewVolumes () .push (this .viewVolume .set (projectionMatrix, viewport, viewport));
|
|
83726
|
-
renderObject .getProjectionMatrix () .
|
|
83727
|
-
renderObject .getModelViewMatrix () .
|
|
83683
|
+
renderObject .getProjectionMatrix () .push (projectionMatrix);
|
|
83684
|
+
renderObject .getModelViewMatrix () .push (invLightSpaceMatrix);
|
|
83728
83685
|
|
|
83729
83686
|
renderObject .render (Rendering_TraverseType .SHADOW, Grouping_X3DGroupingNode .prototype .traverse, this .groupNode);
|
|
83730
83687
|
|
|
@@ -83744,7 +83701,10 @@ Object .assign (DirectionalLightContainer .prototype,
|
|
|
83744
83701
|
if (!this .shadowBuffer)
|
|
83745
83702
|
return;
|
|
83746
83703
|
|
|
83747
|
-
this .shadowMatrix
|
|
83704
|
+
this .shadowMatrix
|
|
83705
|
+
.assign (renderObject .getCameraSpaceMatrixArray ())
|
|
83706
|
+
.multRight (this .invLightSpaceProjectionMatrix);
|
|
83707
|
+
|
|
83748
83708
|
this .shadowMatrixArray .set (this .shadowMatrix);
|
|
83749
83709
|
},
|
|
83750
83710
|
setShaderUniforms (gl, shaderObject)
|
|
@@ -83948,7 +83908,7 @@ Object .assign (EnvironmentLightContainer .prototype,
|
|
|
83948
83908
|
this .lightNode = lightNode;
|
|
83949
83909
|
this .global = lightNode .getGlobal ();
|
|
83950
83910
|
|
|
83951
|
-
this .modelViewMatrix .
|
|
83911
|
+
this .modelViewMatrix .push (modelViewMatrix);
|
|
83952
83912
|
},
|
|
83953
83913
|
renderShadowMap (renderObject)
|
|
83954
83914
|
{ },
|
|
@@ -84239,7 +84199,7 @@ Object .assign (PointLightContainer .prototype,
|
|
|
84239
84199
|
|
|
84240
84200
|
this .matrixArray .set (modelViewMatrix .submatrix .inverse ());
|
|
84241
84201
|
|
|
84242
|
-
this .modelViewMatrix .
|
|
84202
|
+
this .modelViewMatrix .push (modelViewMatrix);
|
|
84243
84203
|
|
|
84244
84204
|
// Get shadow buffer from browser.
|
|
84245
84205
|
|
|
@@ -84277,8 +84237,8 @@ Object .assign (PointLightContainer .prototype,
|
|
|
84277
84237
|
projectionMatrix = Geometry_Camera .perspective2 (Math_Algorithm .radians (90), 0.125, 10000, viewport [2], viewport [3], this .projectionMatrix); // Use higher far value for better precision.
|
|
84278
84238
|
|
|
84279
84239
|
renderObject .getViewVolumes () .push (this .viewVolume .set (projectionMatrix, viewport, viewport));
|
|
84280
|
-
renderObject .getProjectionMatrix () .
|
|
84281
|
-
renderObject .getModelViewMatrix () .
|
|
84240
|
+
renderObject .getProjectionMatrix () .push (this .projectionMatrix);
|
|
84241
|
+
renderObject .getModelViewMatrix () .push (orientationMatrices [i]);
|
|
84282
84242
|
renderObject .getModelViewMatrix () .multLeft (invLightSpaceMatrix);
|
|
84283
84243
|
|
|
84284
84244
|
renderObject .render (Rendering_TraverseType .SHADOW, Grouping_X3DGroupingNode .prototype .traverse, this .groupNode);
|
|
@@ -84300,7 +84260,10 @@ Object .assign (PointLightContainer .prototype,
|
|
|
84300
84260
|
if (!this .shadowBuffer)
|
|
84301
84261
|
return;
|
|
84302
84262
|
|
|
84303
|
-
this .shadowMatrix
|
|
84263
|
+
this .shadowMatrix
|
|
84264
|
+
.assign (renderObject .getCameraSpaceMatrixArray ())
|
|
84265
|
+
.multRight (this .invLightSpaceProjectionMatrix);
|
|
84266
|
+
|
|
84304
84267
|
this .shadowMatrixArray .set (this .shadowMatrix);
|
|
84305
84268
|
},
|
|
84306
84269
|
setShaderUniforms (gl, shaderObject)
|
|
@@ -84544,7 +84507,7 @@ Object .assign (SpotLightContainer .prototype,
|
|
|
84544
84507
|
|
|
84545
84508
|
this .matrixArray .set (modelViewMatrix .submatrix .inverse ());
|
|
84546
84509
|
|
|
84547
|
-
this .modelViewMatrix .
|
|
84510
|
+
this .modelViewMatrix .push (modelViewMatrix);
|
|
84548
84511
|
|
|
84549
84512
|
// Get shadow buffer from browser.
|
|
84550
84513
|
|
|
@@ -84585,8 +84548,8 @@ Object .assign (SpotLightContainer .prototype,
|
|
|
84585
84548
|
this .shadowBuffer .bind ();
|
|
84586
84549
|
|
|
84587
84550
|
renderObject .getViewVolumes () .push (this .viewVolume .set (projectionMatrix, viewport, viewport));
|
|
84588
|
-
renderObject .getProjectionMatrix () .
|
|
84589
|
-
renderObject .getModelViewMatrix () .
|
|
84551
|
+
renderObject .getProjectionMatrix () .push (projectionMatrix);
|
|
84552
|
+
renderObject .getModelViewMatrix () .push (invLightSpaceMatrix);
|
|
84590
84553
|
|
|
84591
84554
|
renderObject .render (Rendering_TraverseType .SHADOW, Grouping_X3DGroupingNode .prototype .traverse, this .groupNode);
|
|
84592
84555
|
|
|
@@ -84611,7 +84574,10 @@ Object .assign (SpotLightContainer .prototype,
|
|
|
84611
84574
|
if (!this .shadowBuffer)
|
|
84612
84575
|
return;
|
|
84613
84576
|
|
|
84614
|
-
this .shadowMatrix
|
|
84577
|
+
this .shadowMatrix
|
|
84578
|
+
.assign (renderObject .getCameraSpaceMatrixArray ())
|
|
84579
|
+
.multRight (this .invLightSpaceProjectionMatrix);
|
|
84580
|
+
|
|
84615
84581
|
this .shadowMatrixArray .set (this .shadowMatrix);
|
|
84616
84582
|
},
|
|
84617
84583
|
setShaderUniforms (gl, shaderObject)
|
|
@@ -90567,7 +90533,7 @@ mediump samplerCube textureCube;
|
|
|
90567
90533
|
|
|
90568
90534
|
/* harmony default export */ const MaterialTextures = (x_ite_Namespace .add ("MaterialTextures", MaterialTextures_default_));
|
|
90569
90535
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
|
|
90570
|
-
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(
|
|
90536
|
+
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(386);
|
|
90571
90537
|
/*******************************************************************************
|
|
90572
90538
|
*
|
|
90573
90539
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -90871,8 +90837,10 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
90871
90837
|
{
|
|
90872
90838
|
const uniform = gl .getUniformLocation (program, "x3d_TextureMatrix[" + i + "]");
|
|
90873
90839
|
|
|
90874
|
-
if (uniform
|
|
90875
|
-
|
|
90840
|
+
if (uniform === null)
|
|
90841
|
+
break;
|
|
90842
|
+
|
|
90843
|
+
this .x3d_TextureMatrix [i] = uniform;
|
|
90876
90844
|
}
|
|
90877
90845
|
|
|
90878
90846
|
for (let i = 0; i < maxTexCoords; ++ i)
|
|
@@ -91767,7 +91735,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91767
91735
|
if (location0 === -1)
|
|
91768
91736
|
return;
|
|
91769
91737
|
|
|
91770
|
-
stride
|
|
91738
|
+
stride ||= 36;
|
|
91771
91739
|
|
|
91772
91740
|
gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
|
|
91773
91741
|
|
|
@@ -91786,7 +91754,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91786
91754
|
if (location0 === -1)
|
|
91787
91755
|
return;
|
|
91788
91756
|
|
|
91789
|
-
stride
|
|
91757
|
+
stride ||= 64;
|
|
91790
91758
|
|
|
91791
91759
|
gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
|
|
91792
91760
|
|
|
@@ -91909,7 +91877,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91909
91877
|
{
|
|
91910
91878
|
const location0 = this .x3d_InstanceMatrix;
|
|
91911
91879
|
|
|
91912
|
-
stride
|
|
91880
|
+
stride ||= 64; // 4 Bytes * 16
|
|
91913
91881
|
|
|
91914
91882
|
gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
|
|
91915
91883
|
|
|
@@ -91926,7 +91894,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91926
91894
|
{
|
|
91927
91895
|
const location0 = this .x3d_InstanceNormalMatrix;
|
|
91928
91896
|
|
|
91929
|
-
stride
|
|
91897
|
+
stride ||= 36; // 4 Bytes * 9
|
|
91930
91898
|
|
|
91931
91899
|
gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
|
|
91932
91900
|
|
|
@@ -93395,12 +93363,6 @@ const ShaderSource_default_ = ShaderSource;
|
|
|
93395
93363
|
|
|
93396
93364
|
|
|
93397
93365
|
const Fragment1_glsl_default_ = /* glsl */ `
|
|
93398
|
-
#if defined(X3D_NORMAL_TEXTURE)
|
|
93399
|
-
#extension GL_OES_standard_derivatives:enable
|
|
93400
|
-
#endif
|
|
93401
|
-
#if defined(X3D_LOGARITHMIC_DEPTH_BUFFER)
|
|
93402
|
-
#extension GL_EXT_frag_depth:enable
|
|
93403
|
-
#endif
|
|
93404
93366
|
#if defined(X3D_ALPHA_MODE_MASK)
|
|
93405
93367
|
uniform float x3d_AlphaCutoff;
|
|
93406
93368
|
#endif
|
|
@@ -93462,6 +93424,12 @@ clip();
|
|
|
93462
93424
|
setPointTexCoords();
|
|
93463
93425
|
#endif
|
|
93464
93426
|
vec4 finalColor=getMaterialColor();
|
|
93427
|
+
#if defined(X3D_ALPHA_MODE_OPAQUE)
|
|
93428
|
+
finalColor.a=1.0;
|
|
93429
|
+
#endif
|
|
93430
|
+
#if defined(X3D_ALPHA_MODE_MASK)
|
|
93431
|
+
if(finalColor.a<x3d_AlphaCutoff)discard;finalColor.a=1.0;
|
|
93432
|
+
#endif
|
|
93465
93433
|
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93466
93434
|
finalColor=getPointColor(finalColor);
|
|
93467
93435
|
#endif
|
|
@@ -93471,12 +93439,6 @@ finalColor=getHatchColor(finalColor);
|
|
|
93471
93439
|
#if defined(X3D_FOG)
|
|
93472
93440
|
finalColor.rgb=getFogColor(finalColor.rgb);
|
|
93473
93441
|
#endif
|
|
93474
|
-
#if defined(X3D_ALPHA_MODE_OPAQUE)
|
|
93475
|
-
finalColor.a=1.0;
|
|
93476
|
-
#endif
|
|
93477
|
-
#if defined(X3D_ALPHA_MODE_MASK)
|
|
93478
|
-
if(finalColor.a<x3d_AlphaCutoff)discard;finalColor.a=1.0;
|
|
93479
|
-
#endif
|
|
93480
93442
|
finalColor.rgb=toneMap(finalColor.rgb);gl_FragColor=finalColor;
|
|
93481
93443
|
#if defined(X3D_LOGARITHMIC_DEPTH_BUFFER)
|
|
93482
93444
|
gl_FragDepthEXT=log2(depth)*x3d_LogarithmicFarFactor1_2;
|
|
@@ -93517,7 +93479,43 @@ return texCoord;
|
|
|
93517
93479
|
#else
|
|
93518
93480
|
return texCoord0;
|
|
93519
93481
|
#endif
|
|
93520
|
-
}vec4 getTexCoord(const in x3d_TextureCoordinateGeneratorParameters textureCoordinateGenerator,const in int textureTransformMapping,const in int textureCoordinateMapping){int mode=textureCoordinateGenerator.mode;if(mode==x3d_None){return getTextureMatrix(textureTransformMapping)*getTexCoord(textureCoordinateMapping);}else if(mode==x3d_Sphere){
|
|
93482
|
+
}vec4 getTexCoord(const in x3d_TextureCoordinateGeneratorParameters textureCoordinateGenerator,const in int textureTransformMapping,const in int textureCoordinateMapping){int mode=textureCoordinateGenerator.mode;if(mode==x3d_None){return getTextureMatrix(textureTransformMapping)*getTexCoord(textureCoordinateMapping);}else if(mode==x3d_Sphere){
|
|
93483
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93484
|
+
vec2 N=normalize(normal).xy;
|
|
93485
|
+
#else
|
|
93486
|
+
vec2 N=normalize(gl_FrontFacing?normal:-normal).xy;
|
|
93487
|
+
#endif
|
|
93488
|
+
return vec4(N*0.5+0.5,0.0,1.0);}else if(mode==x3d_CameraSpaceNormal){
|
|
93489
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93490
|
+
vec3 N=normalize(normal);
|
|
93491
|
+
#else
|
|
93492
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
93493
|
+
#endif
|
|
93494
|
+
return vec4(N,1.0);}else if(mode==x3d_CameraSpacePosition){return vec4(vertex,1.0);}else if(mode==x3d_CameraSpaceReflectionVector){
|
|
93495
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93496
|
+
vec3 N=normalize(normal);
|
|
93497
|
+
#else
|
|
93498
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
93499
|
+
#endif
|
|
93500
|
+
return vec4(reflect(normalize(vertex),-N),1.0);}else if(mode==x3d_SphereLocal){
|
|
93501
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93502
|
+
vec2 N=normalize(localNormal).xy;
|
|
93503
|
+
#else
|
|
93504
|
+
vec2 N=normalize(gl_FrontFacing?localNormal:-localNormal).xy;
|
|
93505
|
+
#endif
|
|
93506
|
+
return vec4(N*0.5+0.5,0.0,1.0);}else if(mode==x3d_Coord){return vec4(localVertex,1.0);}else if(mode==x3d_CoordEye){return vec4(vertex,1.0);}else if(mode==x3d_Noise){vec3 scale=vec3(textureCoordinateGenerator.parameter[0],textureCoordinateGenerator.parameter[1],textureCoordinateGenerator.parameter[2]);vec3 translation=vec3(textureCoordinateGenerator.parameter[3],textureCoordinateGenerator.parameter[4],textureCoordinateGenerator.parameter[5]);return vec4(perlin(localVertex*scale+translation),1.0);}else if(mode==x3d_NoiseEye){vec3 scale=vec3(textureCoordinateGenerator.parameter[0],textureCoordinateGenerator.parameter[1],textureCoordinateGenerator.parameter[2]);vec3 translation=vec3(textureCoordinateGenerator.parameter[3],textureCoordinateGenerator.parameter[4],textureCoordinateGenerator.parameter[5]);return vec4(perlin(vertex*scale+translation),1.0);}else if(mode==x3d_SphereReflect){
|
|
93507
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93508
|
+
vec3 N=normalize(normal);
|
|
93509
|
+
#else
|
|
93510
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
93511
|
+
#endif
|
|
93512
|
+
float eta=textureCoordinateGenerator.parameter[0];return vec4(refract(normalize(vertex),-N,eta),1.0);}else if(mode==x3d_SphereReflectLocal){
|
|
93513
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93514
|
+
vec3 N=normalize(localNormal);
|
|
93515
|
+
#else
|
|
93516
|
+
vec3 N=normalize(gl_FrontFacing?localNormal:-localNormal);
|
|
93517
|
+
#endif
|
|
93518
|
+
float eta=textureCoordinateGenerator.parameter[0];vec3 eye=vec3(textureCoordinateGenerator.parameter[1],textureCoordinateGenerator.parameter[2],textureCoordinateGenerator.parameter[3]);return vec4(refract(normalize(localVertex-eye),-N,eta),1.0);}return getTextureMatrix(textureTransformMapping)*getTexCoord(textureCoordinateMapping);}uniform x3d_TextureCoordinateGeneratorParameters x3d_TextureCoordinateGenerator[X3D_NUM_TEXTURE_COORDINATES];vec3 getTexCoord(const in int textureTransformMapping,const in int textureCoordinateMapping){vec4 texCoord;
|
|
93521
93519
|
${Array .from ({ length: maxTexCoords }, (_, i) => /* glsl */ `
|
|
93522
93520
|
#if X3D_NUM_TEXTURE_COORDINATES > ${i}
|
|
93523
93521
|
${i === 0 ? "" : "else"} if (textureCoordinateMapping == ${i})
|
|
@@ -93583,7 +93581,13 @@ textureColor = texture2D (x3d_TextureProjectorTexture [${i}], texCoord);
|
|
|
93583
93581
|
}
|
|
93584
93582
|
#endif
|
|
93585
93583
|
`) .join ("\n")}
|
|
93586
|
-
return textureColor;}vec3 getTextureProjectorColor(){vec3 currentColor=vec3(1.0);
|
|
93584
|
+
return textureColor;}vec3 getTextureProjectorColor(){vec3 currentColor=vec3(1.0);
|
|
93585
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93586
|
+
vec3 N=normal;
|
|
93587
|
+
#else
|
|
93588
|
+
vec3 N=gl_FrontFacing?normal:-normal;
|
|
93589
|
+
#endif
|
|
93590
|
+
for(int i=0;i<X3D_NUM_TEXTURE_PROJECTORS;++i){vec4 texCoord=x3d_TextureProjectorMatrix[i]*vec4(vertex,1.0);texCoord.stp/=texCoord.q;texCoord.p=clamp(texCoord.p,x3d_TextureProjectorParams[i].x,x3d_TextureProjectorParams[i].y);if(any(greaterThan(abs(texCoord.stp-0.5),vec3(0.5))))continue;vec3 p=x3d_TextureProjectorLocation[i]-vertex;if(dot(N,p)<0.0)continue;vec4 T=getTextureProjectorTexture(i,texCoord.st);
|
|
93587
93591
|
#if defined(X3D_COLORSPACE_SRGB)
|
|
93588
93592
|
if(bool(x3d_TextureProjectorParams[i].z))T=linearToSRGB(T);
|
|
93589
93593
|
#elif defined(X3D_COLORSPACE_LINEAR_WHEN_PHYSICAL_MATERIAL)
|
|
@@ -93804,6 +93808,12 @@ setPointTexCoords();
|
|
|
93804
93808
|
setTexCoords();
|
|
93805
93809
|
#endif
|
|
93806
93810
|
vec4 finalColor=getMaterialColor();
|
|
93811
|
+
#if defined(X3D_ALPHA_MODE_OPAQUE)
|
|
93812
|
+
finalColor.a=1.0;
|
|
93813
|
+
#endif
|
|
93814
|
+
#if defined(X3D_ALPHA_MODE_MASK)
|
|
93815
|
+
if(finalColor.a<x3d_AlphaCutoff)discard;finalColor.a=1.0;
|
|
93816
|
+
#endif
|
|
93807
93817
|
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93808
93818
|
finalColor=getPointColor(finalColor);
|
|
93809
93819
|
#endif
|
|
@@ -93813,12 +93823,6 @@ finalColor=getHatchColor(finalColor);
|
|
|
93813
93823
|
#if defined(X3D_FOG)
|
|
93814
93824
|
finalColor.rgb=getFogColor(finalColor.rgb);
|
|
93815
93825
|
#endif
|
|
93816
|
-
#if defined(X3D_ALPHA_MODE_OPAQUE)
|
|
93817
|
-
finalColor.a=1.0;
|
|
93818
|
-
#endif
|
|
93819
|
-
#if defined(X3D_ALPHA_MODE_MASK)
|
|
93820
|
-
if(finalColor.a<x3d_AlphaCutoff)discard;finalColor.a=1.0;
|
|
93821
|
-
#endif
|
|
93822
93826
|
finalColor.rgb=toneMap(finalColor.rgb);
|
|
93823
93827
|
#if defined(X3D_ORDER_INDEPENDENT_TRANSPARENCY)
|
|
93824
93828
|
float a=finalColor.a;float w=weight(gl_FragCoord.z,a);finalColor.rgb*=a;finalColor*=w;x3d_FragData0=vec4(finalColor.rgb,a);x3d_FragData1=vec4(finalColor.a);
|
|
@@ -93903,7 +93907,10 @@ t=normalize(TBN[0]);b=normalize(TBN[1]);ng=normalize(TBN[2]);
|
|
|
93903
93907
|
#else
|
|
93904
93908
|
vec2 uv_dx=dFdx(UV.st);vec2 uv_dy=dFdy(UV.st);if(length(uv_dx)<=1e-2)uv_dx=vec2(1.0,0.0);if(length(uv_dy)<=1e-2)uv_dy=vec2(0.0,1.0);vec3 t_=(uv_dy.t*dFdx(vertex)-uv_dx.t*dFdy(vertex))/(uv_dx.s*uv_dy.t-uv_dy.s*uv_dx.t);ng=normalize(normal);t=normalize(t_-ng*dot(ng,t_));b=cross(ng,t);
|
|
93905
93909
|
#endif
|
|
93906
|
-
if(
|
|
93910
|
+
#if defined(X3D_GEOMETRY_2D)||defined(X3D_GEOMETRY_3D)
|
|
93911
|
+
if(gl_FrontFacing==false){t=-t;b=-b;ng=-ng;}
|
|
93912
|
+
#endif
|
|
93913
|
+
NormalInfo info;info.ng=ng;
|
|
93907
93914
|
#if defined(X3D_NORMAL_TEXTURE)
|
|
93908
93915
|
#if __VERSION__==100
|
|
93909
93916
|
#if defined(X3D_NORMAL_TEXTURE_2D)
|
|
@@ -93963,6 +93970,7 @@ float rand(const in vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*4
|
|
|
93963
93970
|
const Point2_glsl_default_ = /* glsl */ `
|
|
93964
93971
|
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93965
93972
|
#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES)
|
|
93973
|
+
#if!defined(X3D_DEPTH_SHADER)
|
|
93966
93974
|
void setPointTexCoords(){vec4 texCoord=vec4(gl_PointCoord.x,1.0-gl_PointCoord.y,0.0,1.0);
|
|
93967
93975
|
${Array .from ({ length: maxTexCoords }, (_, i) => /* glsl */ `
|
|
93968
93976
|
#if X3D_NUM_TEXTURE_COORDINATES > ${i}
|
|
@@ -93974,14 +93982,15 @@ texCoords [${i}] = texCoord;
|
|
|
93974
93982
|
#endif
|
|
93975
93983
|
`) .join ("\n")}
|
|
93976
93984
|
}
|
|
93985
|
+
#endif
|
|
93977
93986
|
#define getPointColor(color)(color)
|
|
93978
93987
|
#else
|
|
93979
|
-
#define setPointTexCoords()
|
|
93980
93988
|
#if __VERSION__==100
|
|
93981
93989
|
varying float pointSize;
|
|
93982
93990
|
#else
|
|
93983
93991
|
in float pointSize;
|
|
93984
93992
|
#endif
|
|
93993
|
+
#define setPointTexCoords()
|
|
93985
93994
|
vec4 getPointColor(in vec4 color){if(pointSize>1.0)color.a*=clamp(pointSize*(0.5-distance(vec2(0.5),gl_PointCoord)),0.0,1.0);else color.a*=pointSize;return color;}
|
|
93986
93995
|
#endif
|
|
93987
93996
|
#endif
|
|
@@ -94011,63 +94020,29 @@ return pointSize+1.0-step(pointSize,1.0);
|
|
|
94011
94020
|
|
|
94012
94021
|
/* harmony default export */ const PointSize2_glsl = (x_ite_Namespace .add ("PointSize2.glsl", PointSize2_glsl_default_));
|
|
94013
94022
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Shadow2.glsl.js
|
|
94023
|
+
const maxLights = 8;
|
|
94024
|
+
|
|
94014
94025
|
const Shadow2_glsl_default_ = /* glsl */ `
|
|
94015
94026
|
#if defined(X3D_FRAGMENT_SHADER)&&defined(X3D_SHADOWS)
|
|
94016
94027
|
uniform sampler2D x3d_ShadowMap[X3D_NUM_LIGHTS];
|
|
94017
94028
|
#if __VERSION__==100
|
|
94018
94029
|
float getShadowDepth(const in int index,const in vec2 shadowCoord){
|
|
94019
|
-
|
|
94020
|
-
if
|
|
94021
|
-
|
|
94022
|
-
|
|
94023
|
-
if(index==1)return texture2D(x3d_ShadowMap[1],shadowCoord).r;
|
|
94024
|
-
#endif
|
|
94025
|
-
#if X3D_NUM_LIGHTS>2
|
|
94026
|
-
if(index==2)return texture2D(x3d_ShadowMap[2],shadowCoord).r;
|
|
94027
|
-
#endif
|
|
94028
|
-
#if X3D_NUM_LIGHTS>3
|
|
94029
|
-
if(index==3)return texture2D(x3d_ShadowMap[3],shadowCoord).r;
|
|
94030
|
-
#endif
|
|
94031
|
-
#if X3D_NUM_LIGHTS>4
|
|
94032
|
-
if(index==4)return texture2D(x3d_ShadowMap[4],shadowCoord).r;
|
|
94033
|
-
#endif
|
|
94034
|
-
#if X3D_NUM_LIGHTS>5
|
|
94035
|
-
if(index==5)return texture2D(x3d_ShadowMap[5],shadowCoord).r;
|
|
94036
|
-
#endif
|
|
94037
|
-
#if X3D_NUM_LIGHTS>6
|
|
94038
|
-
if(index==6)return texture2D(x3d_ShadowMap[6],shadowCoord).r;
|
|
94039
|
-
#endif
|
|
94040
|
-
#if X3D_NUM_LIGHTS>7
|
|
94041
|
-
if(index==7)return texture2D(x3d_ShadowMap[7],shadowCoord).r;
|
|
94030
|
+
${Array .from ({ length: maxLights }, (_, i) => /* glsl */ `
|
|
94031
|
+
#if X3D_NUM_LIGHTS > ${i}
|
|
94032
|
+
if (index == ${i})
|
|
94033
|
+
return texture2D (x3d_ShadowMap [${i}], shadowCoord) .r;
|
|
94042
94034
|
#endif
|
|
94035
|
+
`) .join ("\n")}
|
|
94043
94036
|
return 0.0;}
|
|
94044
94037
|
#else
|
|
94045
94038
|
float getShadowDepth(const in int index,const in vec2 shadowCoord){switch(index){
|
|
94046
|
-
|
|
94047
|
-
|
|
94048
|
-
|
|
94049
|
-
|
|
94050
|
-
case 1:{return texture(x3d_ShadowMap[1],shadowCoord).r;}
|
|
94051
|
-
#endif
|
|
94052
|
-
#if X3D_NUM_LIGHTS>2
|
|
94053
|
-
case 2:{return texture(x3d_ShadowMap[2],shadowCoord).r;}
|
|
94054
|
-
#endif
|
|
94055
|
-
#if X3D_NUM_LIGHTS>3
|
|
94056
|
-
case 3:{return texture(x3d_ShadowMap[3],shadowCoord).r;}
|
|
94057
|
-
#endif
|
|
94058
|
-
#if X3D_NUM_LIGHTS>4
|
|
94059
|
-
case 4:{return texture(x3d_ShadowMap[4],shadowCoord).r;}
|
|
94060
|
-
#endif
|
|
94061
|
-
#if X3D_NUM_LIGHTS>5
|
|
94062
|
-
case 5:{return texture(x3d_ShadowMap[5],shadowCoord).r;}
|
|
94063
|
-
#endif
|
|
94064
|
-
#if X3D_NUM_LIGHTS>6
|
|
94065
|
-
case 6:{return texture(x3d_ShadowMap[6],shadowCoord).r;}
|
|
94066
|
-
#endif
|
|
94067
|
-
#if X3D_NUM_LIGHTS>7
|
|
94068
|
-
case 7:{return texture(x3d_ShadowMap[7],shadowCoord).r;}
|
|
94039
|
+
${Array .from ({ length: maxLights }, (_, i) => /* glsl */ `
|
|
94040
|
+
#if X3D_NUM_LIGHTS > ${i}
|
|
94041
|
+
case ${i}:
|
|
94042
|
+
return texture (x3d_ShadowMap [${i}], shadowCoord) .r;
|
|
94069
94043
|
#endif
|
|
94070
|
-
|
|
94044
|
+
`) .join ("\n")}
|
|
94045
|
+
}return 0.0;}
|
|
94071
94046
|
#endif
|
|
94072
94047
|
float texture2DCompare(const in int index,const in vec2 texCoord,const in float compare){float shadowDepth=getShadowDepth(index,texCoord);return(1.0-step(1.0,shadowDepth))*step(shadowDepth,compare);}float texture2DShadowLerp(const in int index,const in vec2 texelSize,const in float shadowMapSize,const in vec2 texCoord,const in float compare){const vec2 offset=vec2(0.0,1.0);vec2 centroidTexCoord=floor(texCoord*shadowMapSize+0.5)/shadowMapSize;float lb=texture2DCompare(index,centroidTexCoord+texelSize*offset.xx,compare);float lt=texture2DCompare(index,centroidTexCoord+texelSize*offset.xy,compare);float rb=texture2DCompare(index,centroidTexCoord+texelSize*offset.yx,compare);float rt=texture2DCompare(index,centroidTexCoord+texelSize*offset.yy,compare);vec2 f=fract(texCoord*shadowMapSize+0.5);float a=mix(lb,lt,f.y);float b=mix(rb,rt,f.y);float c=mix(a,b,f.x);return c;}vec2 cubeToUVCompact(in vec3 v,const float texelSizeY){vec3 absV=abs(v);float scaleToCube=1.0/max(absV.x,max(absV.y,absV.z));absV*=scaleToCube;v*=scaleToCube*(1.0-2.0*texelSizeY);vec2 planar=v.xy;float almostATexel=1.5*texelSizeY;float almostOne=1.0-almostATexel;if(absV.z>=almostOne){if(v.z>0.0)planar.x=4.0-v.x;}else if(absV.x>=almostOne){float signX=sign(v.x);planar.x=v.z*signX+2.0*signX;}else if(absV.y>=almostOne){float signY=sign(v.y);planar.x=(v.x+0.5+signY)*2.0;planar.y=v.z*signY-2.0;}return vec2(0.125,0.25)*planar+vec2(0.375,0.75);}mat4 getPointLightRotations(const in vec3 vector){mat4 rotations[6];rotations[0]=mat4(0,0,1,0,0,1,0,0,-1,0,0,0,0,0,0,1);rotations[1]=mat4(0,0,-1,0,0,1,0,0,1,0,0,0,0,0,0,1);rotations[2]=mat4(-1,0,0,0,0,1,0,0,0,0,-1,0,0,0,0,1);rotations[3]=mat4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);rotations[4]=mat4(1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1);rotations[5]=mat4(1,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,1);vec3 a=abs(vector.xyz);if(a.x>a.y){if(a.x>a.z)return vector.x>0.0?rotations[1]:rotations[0];else return vector.z>0.0?rotations[2]:rotations[3];}else{if(a.y>a.z)return vector.y>0.0?rotations[5]:rotations[4];else return vector.z>0.0?rotations[2]:rotations[3];}return rotations[3];}float getShadowIntensity(const in int index,const in x3d_LightSourceParameters light){if(light.type==x3d_PointLight){const mat4 biasMatrix=mat4(0.5,0.0,0.0,0.0,0.0,0.5,0.0,0.0,0.0,0.0,0.5,0.0,0.5,0.5,0.5,1.0);const mat4 projectionMatrix=mat4(1.0,0.0,0.0,0.0,0.0,0.5,0.0,0.0,0.0,0.0,-1.000025000312504,-1.0,0,0.0,-0.25000312503906297,0.0);vec2 texelSize=vec2(1.0)/(float(light.shadowMapSize)*vec2(4.0,2.0));vec4 shadowCoord=light.shadowMatrix*vec4(vertex,1.0);vec3 lightToPosition=shadowCoord.xyz;shadowCoord=biasMatrix*(projectionMatrix*(getPointLightRotations(lightToPosition)*shadowCoord));shadowCoord.z-=light.shadowBias;shadowCoord.xyz/=shadowCoord.w;
|
|
94073
94048
|
#if defined(X3D_PCF_FILTERING)||defined(X3D_PCF_SOFT_FILTERING)
|
|
@@ -94168,7 +94143,43 @@ ${Array .from ({ length: maxTexCoords }, (_, i) => /* glsl */ `
|
|
|
94168
94143
|
texCoords [${i}] = texCoord${i};
|
|
94169
94144
|
#endif
|
|
94170
94145
|
`) .join ("\n")}
|
|
94171
|
-
}uniform mat4 x3d_TextureMatrix[X3D_NUM_TEXTURE_TRANSFORMS];vec4 getTexCoord(const in x3d_TextureCoordinateGeneratorParameters textureCoordinateGenerator,const in int textureTransformMapping,const in int textureCoordinateMapping){int mode=textureCoordinateGenerator.mode;switch(mode){case x3d_None:{return x3d_TextureMatrix[textureTransformMapping]*texCoords[textureCoordinateMapping];}case x3d_Sphere:{
|
|
94146
|
+
}uniform mat4 x3d_TextureMatrix[X3D_NUM_TEXTURE_TRANSFORMS];vec4 getTexCoord(const in x3d_TextureCoordinateGeneratorParameters textureCoordinateGenerator,const in int textureTransformMapping,const in int textureCoordinateMapping){int mode=textureCoordinateGenerator.mode;switch(mode){case x3d_None:{return x3d_TextureMatrix[textureTransformMapping]*texCoords[textureCoordinateMapping];}case x3d_Sphere:{
|
|
94147
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94148
|
+
vec2 N=normalize(normal).xy;
|
|
94149
|
+
#else
|
|
94150
|
+
vec2 N=normalize(gl_FrontFacing?normal:-normal).xy;
|
|
94151
|
+
#endif
|
|
94152
|
+
return vec4(N*0.5+0.5,0.0,1.0);}case x3d_CameraSpaceNormal:{
|
|
94153
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94154
|
+
vec3 N=normalize(normal);
|
|
94155
|
+
#else
|
|
94156
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
94157
|
+
#endif
|
|
94158
|
+
return vec4(N,1.0);}case x3d_CameraSpacePosition:{return vec4(vertex,1.0);}case x3d_CameraSpaceReflectionVector:{
|
|
94159
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94160
|
+
vec3 N=normalize(normal);
|
|
94161
|
+
#else
|
|
94162
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
94163
|
+
#endif
|
|
94164
|
+
return vec4(reflect(normalize(vertex),-N),1.0);}case x3d_SphereLocal:{
|
|
94165
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94166
|
+
vec2 N=normalize(localNormal).xy;
|
|
94167
|
+
#else
|
|
94168
|
+
vec2 N=normalize(gl_FrontFacing?localNormal:-localNormal).xy;
|
|
94169
|
+
#endif
|
|
94170
|
+
return vec4(N*0.5+0.5,0.0,1.0);}case x3d_Coord:{return vec4(localVertex,1.0);}case x3d_CoordEye:{return vec4(vertex,1.0);}case x3d_Noise:{vec3 scale=vec3(textureCoordinateGenerator.parameter[0],textureCoordinateGenerator.parameter[1],textureCoordinateGenerator.parameter[2]);vec3 translation=vec3(textureCoordinateGenerator.parameter[3],textureCoordinateGenerator.parameter[4],textureCoordinateGenerator.parameter[5]);return vec4(perlin(localVertex*scale+translation),1.0);}case x3d_NoiseEye:{vec3 scale=vec3(textureCoordinateGenerator.parameter[0],textureCoordinateGenerator.parameter[1],textureCoordinateGenerator.parameter[2]);vec3 translation=vec3(textureCoordinateGenerator.parameter[3],textureCoordinateGenerator.parameter[4],textureCoordinateGenerator.parameter[5]);return vec4(perlin(vertex*scale+translation),1.0);}case x3d_SphereReflect:{
|
|
94171
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94172
|
+
vec3 N=normalize(normal);
|
|
94173
|
+
#else
|
|
94174
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
94175
|
+
#endif
|
|
94176
|
+
float eta=textureCoordinateGenerator.parameter[0];return vec4(refract(normalize(vertex),-N,eta),1.0);}case x3d_SphereReflectLocal:{
|
|
94177
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94178
|
+
vec3 N=normalize(localNormal);
|
|
94179
|
+
#else
|
|
94180
|
+
vec3 N=normalize(gl_FrontFacing?localNormal:-localNormal);
|
|
94181
|
+
#endif
|
|
94182
|
+
float eta=textureCoordinateGenerator.parameter[0];vec3 eye=vec3(textureCoordinateGenerator.parameter[1],textureCoordinateGenerator.parameter[2],textureCoordinateGenerator.parameter[3]);return vec4(refract(normalize(localVertex-eye),-N,eta),1.0);}default:{return x3d_TextureMatrix[textureTransformMapping]*texCoords[textureCoordinateMapping];}}}uniform x3d_TextureCoordinateGeneratorParameters x3d_TextureCoordinateGenerator[X3D_NUM_TEXTURE_COORDINATES];vec3 getTexCoord(const in int textureTransformMapping,const in int textureCoordinateMapping){vec4 texCoord=getTexCoord(x3d_TextureCoordinateGenerator[textureCoordinateMapping],textureTransformMapping,textureCoordinateMapping);texCoord.stp/=texCoord.q;
|
|
94172
94183
|
#if defined(X3D_GEOMETRY_2D)
|
|
94173
94184
|
if(gl_FrontFacing==false)texCoord.s=1.0-texCoord.s;
|
|
94174
94185
|
#endif
|
|
@@ -94230,7 +94241,13 @@ textureColor = texture (x3d_TextureProjectorTexture [${i}], texCoord);
|
|
|
94230
94241
|
break;
|
|
94231
94242
|
#endif
|
|
94232
94243
|
`) .join ("\n")}
|
|
94233
|
-
}return textureColor;}vec3 getTextureProjectorColor(){vec3 currentColor=vec3(1.0);
|
|
94244
|
+
}return textureColor;}vec3 getTextureProjectorColor(){vec3 currentColor=vec3(1.0);
|
|
94245
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94246
|
+
vec3 N=normal;
|
|
94247
|
+
#else
|
|
94248
|
+
vec3 N=gl_FrontFacing?normal:-normal;
|
|
94249
|
+
#endif
|
|
94250
|
+
for(int i=0;i<X3D_NUM_TEXTURE_PROJECTORS;++i){vec4 texCoord=x3d_TextureProjectorMatrix[i]*vec4(vertex,1.0);texCoord.stp/=texCoord.q;texCoord.p=clamp(texCoord.p,x3d_TextureProjectorParams[i].x,x3d_TextureProjectorParams[i].y);if(any(greaterThan(abs(texCoord.stp-0.5),vec3(0.5))))continue;vec3 p=x3d_TextureProjectorLocation[i]-vertex;if(dot(N,p)<0.0)continue;vec4 T=getTextureProjectorTexture(i,texCoord.st);
|
|
94234
94251
|
#if defined(X3D_COLORSPACE_SRGB)
|
|
94235
94252
|
if(bool(x3d_TextureProjectorParams[i].z))T=linearToSRGB(T);
|
|
94236
94253
|
#elif defined(X3D_COLORSPACE_LINEAR_WHEN_PHYSICAL_MATERIAL)
|
|
@@ -94398,8 +94415,10 @@ void main(){
|
|
|
94398
94415
|
clip();
|
|
94399
94416
|
#endif
|
|
94400
94417
|
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
94418
|
+
#if!(defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES))
|
|
94401
94419
|
if(getPointColor(vec4(1.0)).a<0.5)discard;
|
|
94402
94420
|
#endif
|
|
94421
|
+
#endif
|
|
94403
94422
|
gl_FragColor=vec4(gl_FragCoord.z);}`
|
|
94404
94423
|
;
|
|
94405
94424
|
|
|
@@ -94659,8 +94678,10 @@ void main(){
|
|
|
94659
94678
|
clip();
|
|
94660
94679
|
#endif
|
|
94661
94680
|
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
94681
|
+
#if!(defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES))
|
|
94662
94682
|
if(getPointColor(vec4(1.0)).a<0.5)discard;
|
|
94663
94683
|
#endif
|
|
94684
|
+
#endif
|
|
94664
94685
|
x3d_FragColor=vec4(gl_FragCoord.z);}`
|
|
94665
94686
|
;
|
|
94666
94687
|
|
|
@@ -95770,7 +95791,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
95770
95791
|
|
|
95771
95792
|
/* harmony default export */ const Shaders_ShaderCompiler = (x_ite_Namespace .add ("ShaderCompiler", ShaderCompiler_default_));
|
|
95772
95793
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
95773
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
95794
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(386);
|
|
95774
95795
|
/*******************************************************************************
|
|
95775
95796
|
*
|
|
95776
95797
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -96368,7 +96389,7 @@ const X3DAppearanceNode_default_ = X3DAppearanceNode;
|
|
|
96368
96389
|
|
|
96369
96390
|
/* harmony default export */ const Shape_X3DAppearanceNode = (x_ite_Namespace .add ("X3DAppearanceNode", X3DAppearanceNode_default_));
|
|
96370
96391
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/Appearance.js
|
|
96371
|
-
/* provided dependency */ var Appearance_$ = __webpack_require__(
|
|
96392
|
+
/* provided dependency */ var Appearance_$ = __webpack_require__(386);
|
|
96372
96393
|
/*******************************************************************************
|
|
96373
96394
|
*
|
|
96374
96395
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -96556,7 +96577,7 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96556
96577
|
},
|
|
96557
96578
|
set_alphaMode__ ()
|
|
96558
96579
|
{
|
|
96559
|
-
this .alphaMode = Appearance_$.enum (Shape_AlphaMode, this ._alphaMode .getValue ()
|
|
96580
|
+
this .alphaMode = Appearance_$.enum (Shape_AlphaMode, this ._alphaMode .getValue ()) ?? Shape_AlphaMode .AUTO;
|
|
96560
96581
|
|
|
96561
96582
|
this .set_alphaCutoff__ ();
|
|
96562
96583
|
},
|
|
@@ -96568,29 +96589,27 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96568
96589
|
{
|
|
96569
96590
|
this .stylePropertiesNode [0] = Base_X3DCast (Base_X3DConstants .PointProperties, this ._pointProperties);
|
|
96570
96591
|
|
|
96571
|
-
if (
|
|
96572
|
-
|
|
96573
|
-
const browser = this .getBrowser ();
|
|
96592
|
+
if (this .stylePropertiesNode [0])
|
|
96593
|
+
return;
|
|
96574
96594
|
|
|
96575
|
-
|
|
96576
|
-
|
|
96577
|
-
|
|
96595
|
+
const browser = this .getBrowser ();
|
|
96596
|
+
|
|
96597
|
+
if (browser .getRenderingProperty ("ContentScale") !== 1)
|
|
96598
|
+
this .stylePropertiesNode [0] = browser .getDefaultPointProperties ();
|
|
96578
96599
|
},
|
|
96579
96600
|
set_lineProperties__ ()
|
|
96580
96601
|
{
|
|
96581
|
-
|
|
96582
|
-
this .linePropertiesNode ._applied .removeInterest ("set_applied__", this);
|
|
96602
|
+
this .linePropertiesNode ?._applied .removeInterest ("set_applied__", this);
|
|
96583
96603
|
|
|
96584
96604
|
this .linePropertiesNode = Base_X3DCast (Base_X3DConstants .LineProperties, this ._lineProperties);
|
|
96585
96605
|
|
|
96586
|
-
|
|
96587
|
-
this .linePropertiesNode ._applied .addInterest ("set_applied__", this);
|
|
96606
|
+
this .linePropertiesNode ?._applied .addInterest ("set_applied__", this);
|
|
96588
96607
|
|
|
96589
96608
|
this .set_applied__ ();
|
|
96590
96609
|
},
|
|
96591
96610
|
set_applied__ ()
|
|
96592
96611
|
{
|
|
96593
|
-
if (this .linePropertiesNode
|
|
96612
|
+
if (this .linePropertiesNode ?._applied .getValue ())
|
|
96594
96613
|
{
|
|
96595
96614
|
this .stylePropertiesNode [1] = this .linePropertiesNode;
|
|
96596
96615
|
}
|
|
@@ -96606,13 +96625,11 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96606
96625
|
},
|
|
96607
96626
|
set_fillProperties__ ()
|
|
96608
96627
|
{
|
|
96609
|
-
|
|
96610
|
-
this .stylePropertiesNode [2] ._transparent .removeInterest ("set_transparent__", this);
|
|
96628
|
+
this .stylePropertiesNode [2] ?._transparent .removeInterest ("set_transparent__", this);
|
|
96611
96629
|
|
|
96612
96630
|
this .stylePropertiesNode [2] = Base_X3DCast (Base_X3DConstants .FillProperties, this ._fillProperties);
|
|
96613
96631
|
|
|
96614
|
-
|
|
96615
|
-
this .stylePropertiesNode [2] ._transparent .addInterest ("set_transparent__", this);
|
|
96632
|
+
this .stylePropertiesNode [2] ?._transparent .addInterest ("set_transparent__", this);
|
|
96616
96633
|
|
|
96617
96634
|
this .stylePropertiesNode [3] = this .stylePropertiesNode [2];
|
|
96618
96635
|
},
|
|
@@ -96624,16 +96641,11 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96624
96641
|
this .materialNode ._transmission .removeInterest ("set_transmission__", this);
|
|
96625
96642
|
}
|
|
96626
96643
|
|
|
96627
|
-
this .materialNode = Base_X3DCast (Base_X3DConstants .X3DMaterialNode, this ._material)
|
|
96644
|
+
this .materialNode = Base_X3DCast (Base_X3DConstants .X3DMaterialNode, this ._material)
|
|
96645
|
+
?? this .getBrowser () .getDefaultMaterial ();
|
|
96628
96646
|
|
|
96629
|
-
|
|
96630
|
-
|
|
96631
|
-
|
|
96632
|
-
if (this .materialNode)
|
|
96633
|
-
{
|
|
96634
|
-
this .materialNode ._transparent .addInterest ("set_transparent__", this);
|
|
96635
|
-
this .materialNode ._transmission .addInterest ("set_transmission__", this);
|
|
96636
|
-
}
|
|
96647
|
+
this .materialNode ._transparent .addInterest ("set_transparent__", this);
|
|
96648
|
+
this .materialNode ._transmission .addInterest ("set_transmission__", this);
|
|
96637
96649
|
|
|
96638
96650
|
// Depreciated TwoSidedMaterial handling.
|
|
96639
96651
|
|
|
@@ -96642,13 +96654,11 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96642
96654
|
},
|
|
96643
96655
|
set_backMaterial__ ()
|
|
96644
96656
|
{
|
|
96645
|
-
|
|
96646
|
-
this .backMaterialNode ._transparent .removeInterest ("set_transparent__", this);
|
|
96657
|
+
this .backMaterialNode ?._transparent .removeInterest ("set_transparent__", this);
|
|
96647
96658
|
|
|
96648
96659
|
this .backMaterialNode = Base_X3DCast (Base_X3DConstants .X3DOneSidedMaterialNode, this ._backMaterial);
|
|
96649
96660
|
|
|
96650
|
-
|
|
96651
|
-
this .backMaterialNode ._transparent .addInterest ("set_transparent__", this);
|
|
96661
|
+
this .backMaterialNode ?._transparent .addInterest ("set_transparent__", this);
|
|
96652
96662
|
|
|
96653
96663
|
// Depreciated TwoSidedMaterial handling.
|
|
96654
96664
|
|
|
@@ -96679,13 +96689,10 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96679
96689
|
},
|
|
96680
96690
|
set_textureTransform__ ()
|
|
96681
96691
|
{
|
|
96682
|
-
|
|
96683
|
-
this .textureTransformNode .removeInterest ("updateTextureTransformMapping", this);
|
|
96684
|
-
|
|
96685
|
-
this .textureTransformNode = Base_X3DCast (Base_X3DConstants .X3DTextureTransformNode, this ._textureTransform);
|
|
96692
|
+
this .textureTransformNode ?.removeInterest ("updateTextureTransformMapping", this);
|
|
96686
96693
|
|
|
96687
|
-
|
|
96688
|
-
|
|
96694
|
+
this .textureTransformNode = Base_X3DCast (Base_X3DConstants .X3DTextureTransformNode, this ._textureTransform)
|
|
96695
|
+
?? this .getBrowser () .getDefaultTextureTransform ();
|
|
96689
96696
|
|
|
96690
96697
|
this .textureTransformNode .addInterest ("updateTextureTransformMapping", this);
|
|
96691
96698
|
|
|
@@ -98753,18 +98760,12 @@ Object .assign (Object .setPrototypeOf (X3DShapeNode .prototype, Core_X3DChildNo
|
|
|
98753
98760
|
this .appearanceNode ._transmission .removeInterest ("set_transmission__", this);
|
|
98754
98761
|
}
|
|
98755
98762
|
|
|
98756
|
-
this .appearanceNode = Base_X3DCast (Base_X3DConstants .X3DAppearanceNode, this ._appearance)
|
|
98763
|
+
this .appearanceNode = Base_X3DCast (Base_X3DConstants .X3DAppearanceNode, this ._appearance)
|
|
98764
|
+
?? this .getBrowser () .getDefaultAppearance ();
|
|
98757
98765
|
|
|
98758
|
-
|
|
98759
|
-
|
|
98760
|
-
|
|
98761
|
-
this .appearanceNode ._transparent .addInterest ("set_transparent__", this);
|
|
98762
|
-
this .appearanceNode ._transmission .addInterest ("set_transmission__", this);
|
|
98763
|
-
}
|
|
98764
|
-
else
|
|
98765
|
-
{
|
|
98766
|
-
this .appearanceNode = this .getBrowser () .getDefaultAppearance ();
|
|
98767
|
-
}
|
|
98766
|
+
this .appearanceNode ._alphaMode .addInterest ("set_transparent__", this);
|
|
98767
|
+
this .appearanceNode ._transparent .addInterest ("set_transparent__", this);
|
|
98768
|
+
this .appearanceNode ._transmission .addInterest ("set_transmission__", this);
|
|
98768
98769
|
|
|
98769
98770
|
this .set_transparent__ ();
|
|
98770
98771
|
this .set_transmission__ ();
|
|
@@ -104623,8 +104624,8 @@ const GifMedia_default_ = GifMedia;
|
|
|
104623
104624
|
|
|
104624
104625
|
/* harmony default export */ const Texturing_GifMedia = (x_ite_Namespace .add ("GifMedia", GifMedia_default_));
|
|
104625
104626
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
104626
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
104627
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
104627
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(386);
|
|
104628
|
+
/* provided dependency */ var SuperGif = __webpack_require__(141);
|
|
104628
104629
|
/*******************************************************************************
|
|
104629
104630
|
*
|
|
104630
104631
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -107092,7 +107093,7 @@ const gettext_default_ = (string) => locale .get (string) || string;
|
|
|
107092
107093
|
|
|
107093
107094
|
/* harmony default export */ const gettext = (x_ite_Namespace .add ("gettext", gettext_default_));
|
|
107094
107095
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
|
|
107095
|
-
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(
|
|
107096
|
+
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(386);
|
|
107096
107097
|
/*******************************************************************************
|
|
107097
107098
|
*
|
|
107098
107099
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -107722,7 +107723,7 @@ const TextCompression_default_ = TextCompression;
|
|
|
107722
107723
|
|
|
107723
107724
|
/* harmony default export */ const Core_TextCompression = (x_ite_Namespace .add ("TextCompression", TextCompression_default_));
|
|
107724
107725
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserOptions.js
|
|
107725
|
-
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(
|
|
107726
|
+
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(386);
|
|
107726
107727
|
/*******************************************************************************
|
|
107727
107728
|
*
|
|
107728
107729
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -107955,7 +107956,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
107955
107956
|
primitiveQuality = value .getValue () .toUpperCase ();
|
|
107956
107957
|
|
|
107957
107958
|
this .localStorage .PrimitiveQuality = primitiveQuality;
|
|
107958
|
-
this .primitiveQuality = BrowserOptions_$.enum (Core_PrimitiveQuality, primitiveQuality
|
|
107959
|
+
this .primitiveQuality = BrowserOptions_$.enum (Core_PrimitiveQuality, primitiveQuality) ?? Core_PrimitiveQuality .MEDIUM;
|
|
107959
107960
|
|
|
107960
107961
|
if (typeof browser .setPrimitiveQuality2D === "function")
|
|
107961
107962
|
browser .setPrimitiveQuality2D (this .primitiveQuality);
|
|
@@ -107970,7 +107971,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
107970
107971
|
textureQuality = value .getValue () .toUpperCase ();
|
|
107971
107972
|
|
|
107972
107973
|
this .localStorage .TextureQuality = textureQuality;
|
|
107973
|
-
this .textureQuality = BrowserOptions_$.enum (Core_TextureQuality, textureQuality
|
|
107974
|
+
this .textureQuality = BrowserOptions_$.enum (Core_TextureQuality, textureQuality) ?? Core_TextureQuality .MEDIUM;
|
|
107974
107975
|
|
|
107975
107976
|
if (typeof browser .setTextureQuality === "function")
|
|
107976
107977
|
browser .setTextureQuality (this .textureQuality);
|
|
@@ -107991,7 +107992,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
107991
107992
|
browser = this .getBrowser (),
|
|
107992
107993
|
shading = value .getValue () .toUpperCase () .replace ("POINTSET", "POINT");
|
|
107993
107994
|
|
|
107994
|
-
this .shading = BrowserOptions_$.enum (Core_Shading, shading
|
|
107995
|
+
this .shading = BrowserOptions_$.enum (Core_Shading, shading) ?? Core_Shading .GOURAUD;
|
|
107995
107996
|
|
|
107996
107997
|
browser .getRenderingProperties () ._Shading = strings [this .shading];
|
|
107997
107998
|
browser .setShading (this .shading);
|
|
@@ -108369,7 +108370,7 @@ const RenderingProperties_default_ = RenderingProperties;
|
|
|
108369
108370
|
|
|
108370
108371
|
/* harmony default export */ const Core_RenderingProperties = (x_ite_Namespace .add ("RenderingProperties", RenderingProperties_default_));
|
|
108371
108372
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
|
|
108372
|
-
/* provided dependency */ var Notification_$ = __webpack_require__(
|
|
108373
|
+
/* provided dependency */ var Notification_$ = __webpack_require__(386);
|
|
108373
108374
|
/*******************************************************************************
|
|
108374
108375
|
*
|
|
108375
108376
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -108491,8 +108492,8 @@ const Notification_default_ = Notification;
|
|
|
108491
108492
|
|
|
108492
108493
|
/* harmony default export */ const Core_Notification = (x_ite_Namespace .add ("Notification", Notification_default_));
|
|
108493
108494
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
|
|
108494
|
-
/* provided dependency */ var jquery_fullscreen = __webpack_require__(
|
|
108495
|
-
/* provided dependency */ var ContextMenu_$ = __webpack_require__(
|
|
108495
|
+
/* provided dependency */ var jquery_fullscreen = __webpack_require__(306);
|
|
108496
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(386);
|
|
108496
108497
|
/*******************************************************************************
|
|
108497
108498
|
*
|
|
108498
108499
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -111227,7 +111228,7 @@ const DataStorage_default_ = DataStorage;
|
|
|
111227
111228
|
|
|
111228
111229
|
/* harmony default export */ const Utility_DataStorage = (x_ite_Namespace .add ("DataStorage", DataStorage_default_));
|
|
111229
111230
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
111230
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
111231
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(386);
|
|
111231
111232
|
/*******************************************************************************
|
|
111232
111233
|
*
|
|
111233
111234
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -113838,8 +113839,8 @@ const X3DViewer_default_ = X3DViewer;
|
|
|
113838
113839
|
|
|
113839
113840
|
/* harmony default export */ const Navigation_X3DViewer = (x_ite_Namespace .add ("X3DViewer", X3DViewer_default_));
|
|
113840
113841
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
113841
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
113842
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
113842
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(336);
|
|
113843
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(386);
|
|
113843
113844
|
/*******************************************************************************
|
|
113844
113845
|
*
|
|
113845
113846
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -114754,8 +114755,8 @@ const ExamineViewer_default_ = ExamineViewer;
|
|
|
114754
114755
|
|
|
114755
114756
|
/* harmony default export */ const Navigation_ExamineViewer = (x_ite_Namespace .add ("ExamineViewer", ExamineViewer_default_));
|
|
114756
114757
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
114757
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
114758
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
114758
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(336);
|
|
114759
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(386);
|
|
114759
114760
|
/*******************************************************************************
|
|
114760
114761
|
*
|
|
114761
114762
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -115770,8 +115771,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
115770
115771
|
|
|
115771
115772
|
/* harmony default export */ const Navigation_FlyViewer = (x_ite_Namespace .add ("FlyViewer", FlyViewer_default_));
|
|
115772
115773
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
115773
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
115774
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
115774
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(336);
|
|
115775
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(386);
|
|
115775
115776
|
/*******************************************************************************
|
|
115776
115777
|
*
|
|
115777
115778
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -116100,8 +116101,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
116100
116101
|
|
|
116101
116102
|
/* harmony default export */ const Navigation_NoneViewer = (x_ite_Namespace .add ("NoneViewer", NoneViewer_default_));
|
|
116102
116103
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
116103
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
116104
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
116104
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(336);
|
|
116105
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(386);
|
|
116105
116106
|
/*******************************************************************************
|
|
116106
116107
|
*
|
|
116107
116108
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -117246,8 +117247,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
117246
117247
|
|
|
117247
117248
|
/* harmony default export */ const Picking_X3DPickingContext = (x_ite_Namespace .add ("X3DPickingContext", X3DPickingContext_default_));
|
|
117248
117249
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
117249
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
117250
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
117250
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(336);
|
|
117251
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(386);
|
|
117251
117252
|
/*******************************************************************************
|
|
117252
117253
|
*
|
|
117253
117254
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118100,6 +118101,8 @@ Object .assign (X3DPointingDeviceSensorContext .prototype,
|
|
|
118100
118101
|
geometryContext = shapeNode .getGeometryContext (),
|
|
118101
118102
|
options = [ ];
|
|
118102
118103
|
|
|
118104
|
+
options .push ("X3D_DEPTH_SHADER");
|
|
118105
|
+
|
|
118103
118106
|
if (geometryContext .hasNormals)
|
|
118104
118107
|
options .push ("X3D_NORMALS");
|
|
118105
118108
|
|
|
@@ -118125,6 +118128,12 @@ Object .assign (X3DPointingDeviceSensorContext .prototype,
|
|
|
118125
118128
|
if (appearanceNode .getStyleProperties (geometryContext .geometryType))
|
|
118126
118129
|
options .push ("X3D_STYLE_PROPERTIES");
|
|
118127
118130
|
|
|
118131
|
+
if (+appearanceNode .getMaterial () .getTextureBits ())
|
|
118132
|
+
options .push ("X3D_MATERIAL_TEXTURES");
|
|
118133
|
+
|
|
118134
|
+
if (+appearanceNode .getTextureBits ())
|
|
118135
|
+
options .push ("X3D_TEXTURE");
|
|
118136
|
+
|
|
118128
118137
|
if (humanoidNode)
|
|
118129
118138
|
{
|
|
118130
118139
|
options .push ("X3D_SKINNING");
|
|
@@ -118656,10 +118665,16 @@ class Lock
|
|
|
118656
118665
|
|
|
118657
118666
|
const p = new Promise (async (resolve, reject) =>
|
|
118658
118667
|
{
|
|
118659
|
-
|
|
118668
|
+
try
|
|
118669
|
+
{
|
|
118660
118670
|
await Promise .allSettled (current);
|
|
118661
118671
|
|
|
118662
|
-
|
|
118672
|
+
resolve (await callback ());
|
|
118673
|
+
}
|
|
118674
|
+
catch (error)
|
|
118675
|
+
{
|
|
118676
|
+
reject (error);
|
|
118677
|
+
}
|
|
118663
118678
|
})
|
|
118664
118679
|
.finally (() =>
|
|
118665
118680
|
{
|
|
@@ -118680,7 +118695,7 @@ const Lock_default_ = Lock;
|
|
|
118680
118695
|
|
|
118681
118696
|
/* harmony default export */ const Utility_Lock = (x_ite_Namespace .add ("Lock", Lock_default_));
|
|
118682
118697
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
118683
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
118698
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(386);
|
|
118684
118699
|
/*******************************************************************************
|
|
118685
118700
|
*
|
|
118686
118701
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118794,6 +118809,7 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
118794
118809
|
gl .enable (gl .DEPTH_TEST);
|
|
118795
118810
|
gl .depthFunc (gl .LEQUAL);
|
|
118796
118811
|
gl .clearDepth (1);
|
|
118812
|
+
gl .sampleCoverage (1.0, false);
|
|
118797
118813
|
|
|
118798
118814
|
gl .blendFuncSeparate (gl .SRC_ALPHA, gl .ONE_MINUS_SRC_ALPHA, gl .ONE, gl .ONE_MINUS_SRC_ALPHA);
|
|
118799
118815
|
gl .blendEquationSeparate (gl .FUNC_ADD, gl .FUNC_ADD);
|
|
@@ -119213,23 +119229,29 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
119213
119229
|
if (this [_session] === window)
|
|
119214
119230
|
return;
|
|
119215
119231
|
|
|
119216
|
-
|
|
119217
|
-
|
|
119218
|
-
|
|
119219
|
-
|
|
119220
|
-
|
|
119221
|
-
|
|
119232
|
+
try
|
|
119233
|
+
{
|
|
119234
|
+
await this [_session] .end ();
|
|
119235
|
+
}
|
|
119236
|
+
catch
|
|
119237
|
+
{ }
|
|
119238
|
+
finally
|
|
119239
|
+
{
|
|
119240
|
+
this .endEvents () .removeInterest ("endFrame", this);
|
|
119222
119241
|
|
|
119223
|
-
|
|
119242
|
+
for (const frameBuffer of this [_frameBuffers])
|
|
119243
|
+
frameBuffer .dispose ();
|
|
119224
119244
|
|
|
119225
|
-
|
|
119226
|
-
|
|
119227
|
-
|
|
119228
|
-
|
|
119229
|
-
|
|
119230
|
-
|
|
119245
|
+
this [_frameBuffers] = [ ];
|
|
119246
|
+
this [_session] = window;
|
|
119247
|
+
this [_baseReferenceSpace] = null;
|
|
119248
|
+
this [_referenceSpace] = null;
|
|
119249
|
+
this [_baseLayer] = null;
|
|
119250
|
+
this [_defaultFrameBuffer] = null;
|
|
119251
|
+
this [_pose] = null;
|
|
119231
119252
|
|
|
119232
|
-
|
|
119253
|
+
this .reshape ();
|
|
119254
|
+
}
|
|
119233
119255
|
});
|
|
119234
119256
|
},
|
|
119235
119257
|
getSession ()
|
|
@@ -119290,12 +119312,14 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
119290
119312
|
cameraSpaceMatrix: new Numbers_Matrix4 (),
|
|
119291
119313
|
viewMatrix: new Numbers_Matrix4 (),
|
|
119292
119314
|
matrix: new Numbers_Matrix4 (),
|
|
119315
|
+
inverse: new Numbers_Matrix4 (),
|
|
119293
119316
|
};
|
|
119294
119317
|
|
|
119295
119318
|
pv .projectionMatrix .assign (view .projectionMatrix);
|
|
119296
119319
|
pv .cameraSpaceMatrix .assign (view .transform .matrix);
|
|
119297
119320
|
pv .viewMatrix .assign (view .transform .inverse .matrix);
|
|
119298
119321
|
pv .matrix .assign (pose .transform .matrix) .multRight (view .transform .inverse .matrix);
|
|
119322
|
+
pv .inverse .assign (pv .matrix) .inverse ();
|
|
119299
119323
|
|
|
119300
119324
|
++ v;
|
|
119301
119325
|
}
|
|
@@ -119456,13 +119480,12 @@ const X3DScriptingContext_default_ = X3DScriptingContext;
|
|
|
119456
119480
|
|
|
119457
119481
|
|
|
119458
119482
|
const
|
|
119459
|
-
_wireframe = Symbol (),
|
|
119460
119483
|
_primitiveModes = Symbol (),
|
|
119461
|
-
_shaderNodes = Symbol ()
|
|
119484
|
+
_shaderNodes = Symbol (),
|
|
119485
|
+
_wireframe = Symbol ();
|
|
119462
119486
|
|
|
119463
119487
|
function X3DShadersContext ()
|
|
119464
119488
|
{
|
|
119465
|
-
this [_wireframe] = false;
|
|
119466
119489
|
this [_primitiveModes] = new Map ();
|
|
119467
119490
|
this [_shaderNodes] = new Map ();
|
|
119468
119491
|
}
|
|
@@ -119503,10 +119526,6 @@ Object .assign (X3DShadersContext .prototype,
|
|
|
119503
119526
|
|
|
119504
119527
|
return gl .getParameter (gl .MAX_VARYING_VECTORS);
|
|
119505
119528
|
},
|
|
119506
|
-
getWireframe ()
|
|
119507
|
-
{
|
|
119508
|
-
return this [_wireframe];
|
|
119509
|
-
},
|
|
119510
119529
|
getPrimitiveMode (primitiveMode)
|
|
119511
119530
|
{
|
|
119512
119531
|
return this [_primitiveModes] .get (primitiveMode);
|
|
@@ -119517,26 +119536,43 @@ Object .assign (X3DShadersContext .prototype,
|
|
|
119517
119536
|
},
|
|
119518
119537
|
setShading (type)
|
|
119519
119538
|
{
|
|
119520
|
-
const
|
|
119539
|
+
const
|
|
119540
|
+
gl = this .getContext (),
|
|
119541
|
+
primitiveModes = this [_primitiveModes];
|
|
119542
|
+
|
|
119543
|
+
if (this [_wireframe])
|
|
119544
|
+
{
|
|
119545
|
+
this [_wireframe] = false;
|
|
119546
|
+
|
|
119547
|
+
const ext = gl .getExtension ("WEBGL_polygon_mode");
|
|
119548
|
+
|
|
119549
|
+
ext ?.polygonModeWEBGL (gl .FRONT_AND_BACK, ext .FILL_WEBGL);
|
|
119550
|
+
}
|
|
119521
119551
|
|
|
119522
119552
|
switch (type)
|
|
119523
119553
|
{
|
|
119524
119554
|
case Core_Shading .POINT:
|
|
119525
119555
|
{
|
|
119526
|
-
|
|
119556
|
+
primitiveModes
|
|
119557
|
+
.set (gl .POINTS, gl .POINTS)
|
|
119558
|
+
.set (gl .LINES, gl .POINTS)
|
|
119559
|
+
.set (gl .TRIANGLES, gl .POINTS);
|
|
119527
119560
|
|
|
119528
|
-
this [_primitiveModes] .set (gl .POINTS, gl .POINTS);
|
|
119529
|
-
this [_primitiveModes] .set (gl .LINES, gl .POINTS);
|
|
119530
|
-
this [_primitiveModes] .set (gl .TRIANGLES, gl .POINTS);
|
|
119531
119561
|
break;
|
|
119532
119562
|
}
|
|
119533
119563
|
case Core_Shading .WIREFRAME:
|
|
119534
119564
|
{
|
|
119535
119565
|
this [_wireframe] = true;
|
|
119536
119566
|
|
|
119537
|
-
|
|
119538
|
-
|
|
119539
|
-
|
|
119567
|
+
const ext = gl .getExtension ("WEBGL_polygon_mode");
|
|
119568
|
+
|
|
119569
|
+
ext ?.polygonModeWEBGL (gl .FRONT_AND_BACK, ext .LINE_WEBGL);
|
|
119570
|
+
|
|
119571
|
+
primitiveModes
|
|
119572
|
+
.set (gl .POINTS, gl .POINTS)
|
|
119573
|
+
.set (gl .LINES, gl .LINES)
|
|
119574
|
+
.set (gl .TRIANGLES, gl .TRIANGLES);
|
|
119575
|
+
|
|
119540
119576
|
break;
|
|
119541
119577
|
}
|
|
119542
119578
|
default:
|
|
@@ -119545,15 +119581,19 @@ Object .assign (X3DShadersContext .prototype,
|
|
|
119545
119581
|
// case Shading .GOURAUD:
|
|
119546
119582
|
// case Shading .PHONG:
|
|
119547
119583
|
|
|
119548
|
-
|
|
119549
|
-
|
|
119550
|
-
|
|
119551
|
-
|
|
119552
|
-
|
|
119584
|
+
primitiveModes
|
|
119585
|
+
.set (gl .POINTS, gl .POINTS)
|
|
119586
|
+
.set (gl .LINES, gl .LINES)
|
|
119587
|
+
.set (gl .TRIANGLES, gl .TRIANGLES);
|
|
119588
|
+
|
|
119553
119589
|
break;
|
|
119554
119590
|
}
|
|
119555
119591
|
}
|
|
119556
119592
|
},
|
|
119593
|
+
getWireframe ()
|
|
119594
|
+
{
|
|
119595
|
+
return this [_wireframe];
|
|
119596
|
+
},
|
|
119557
119597
|
createShader (name, vs, fs = vs, options = [ ], uniformNames = [ ], transformFeedbackVaryings = [ ])
|
|
119558
119598
|
{
|
|
119559
119599
|
if (DEVELOPMENT)
|
|
@@ -119978,7 +120018,7 @@ const X3DSoundContext_default_ = X3DSoundContext;
|
|
|
119978
120018
|
|
|
119979
120019
|
/* harmony default export */ const Sound_X3DSoundContext = (x_ite_Namespace .add ("X3DSoundContext", X3DSoundContext_default_));
|
|
119980
120020
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/KTXDecoder.js
|
|
119981
|
-
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(
|
|
120021
|
+
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(386);
|
|
119982
120022
|
const KTXDecoder_default_ = class KTXDecoder
|
|
119983
120023
|
{
|
|
119984
120024
|
constructor (gl, externalKtxlib, scriptDir)
|
|
@@ -121555,7 +121595,7 @@ const Components_default_ = Components;
|
|
|
121555
121595
|
|
|
121556
121596
|
/* harmony default export */ const x_ite_Components = (x_ite_Namespace .add ("Components", Components_default_));
|
|
121557
121597
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
|
|
121558
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
121598
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(386);
|
|
121559
121599
|
/*******************************************************************************
|
|
121560
121600
|
* MIT License
|
|
121561
121601
|
*
|
|
@@ -122821,7 +122861,7 @@ const FieldTypes_default_ = new Configuration_FieldTypesArray (Object .values (x
|
|
|
122821
122861
|
|
|
122822
122862
|
/* harmony default export */ const FieldTypes = (x_ite_Namespace .add ("FieldTypes", FieldTypes_default_));
|
|
122823
122863
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
|
|
122824
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
122864
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(386);
|
|
122825
122865
|
/*******************************************************************************
|
|
122826
122866
|
*
|
|
122827
122867
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -123888,7 +123928,7 @@ const X3DBrowser_default_ = X3DBrowser;
|
|
|
123888
123928
|
|
|
123889
123929
|
/* harmony default export */ const Browser_X3DBrowser = (x_ite_Namespace .add ("X3DBrowser", X3DBrowser_default_));
|
|
123890
123930
|
;// CONCATENATED MODULE: ./src/x_ite/X3DCanvasElement.js
|
|
123891
|
-
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(
|
|
123931
|
+
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(386);
|
|
123892
123932
|
/*******************************************************************************
|
|
123893
123933
|
*
|
|
123894
123934
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -124155,8 +124195,8 @@ const QuickSort_default_ = QuickSort;
|
|
|
124155
124195
|
|
|
124156
124196
|
/* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
|
|
124157
124197
|
;// CONCATENATED MODULE: ./src/lib/jquery.js
|
|
124158
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
124159
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
124198
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(386);
|
|
124199
|
+
/* provided dependency */ var pako = __webpack_require__(514);
|
|
124160
124200
|
Object .assign (jquery_$,
|
|
124161
124201
|
{
|
|
124162
124202
|
decodeText (input)
|
|
@@ -124193,9 +124233,10 @@ Object .assign (jquery_$,
|
|
|
124193
124233
|
console .error (error .message);
|
|
124194
124234
|
}
|
|
124195
124235
|
},
|
|
124196
|
-
enum (object, property
|
|
124236
|
+
enum (object, property)
|
|
124197
124237
|
{
|
|
124198
|
-
|
|
124238
|
+
if (object .hasOwnProperty (property))
|
|
124239
|
+
return object [property];
|
|
124199
124240
|
},
|
|
124200
124241
|
});
|
|
124201
124242
|
|
|
@@ -124232,13 +124273,13 @@ const jquery_default_ = jquery_$;
|
|
|
124232
124273
|
|
|
124233
124274
|
/* harmony default export */ const jquery = (x_ite_Namespace .add ("jquery", jquery_default_));
|
|
124234
124275
|
;// CONCATENATED MODULE: ./src/lib/libtess.js
|
|
124235
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
124276
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(475);
|
|
124236
124277
|
const libtess_default_ = libtess_libtess;
|
|
124237
124278
|
;
|
|
124238
124279
|
|
|
124239
124280
|
/* harmony default export */ const lib_libtess = (x_ite_Namespace .add ("libtess", libtess_default_));
|
|
124240
124281
|
;// CONCATENATED MODULE: ./src/x_ite/X3D.js
|
|
124241
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
124282
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(386);
|
|
124242
124283
|
/*******************************************************************************
|
|
124243
124284
|
*
|
|
124244
124285
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -124542,7 +124583,7 @@ x_ite_Namespace, x_ite_Namespace .Fields,
|
|
|
124542
124583
|
|
|
124543
124584
|
// Assign X3D to global namespace.
|
|
124544
124585
|
|
|
124545
|
-
window [Symbol .for ("X_ITE.X3D-10.
|
|
124586
|
+
window [Symbol .for ("X_ITE.X3D-10.5.0")] = x_ite_X3D;
|
|
124546
124587
|
|
|
124547
124588
|
customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
|
|
124548
124589
|
|