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.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* X_ITE v10.
|
|
1
|
+
/* X_ITE v10.5.0 */
|
|
2
2
|
var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 306:
|
|
5
5
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
6
6
|
|
|
7
|
-
/* provided dependency */ var jQuery = __webpack_require__(
|
|
7
|
+
/* provided dependency */ var jQuery = __webpack_require__(386);
|
|
8
8
|
/**
|
|
9
9
|
* @preserve jquery.fullscreen 1.1.5
|
|
10
10
|
* https://github.com/code-lts/jquery-fullscreen-plugin
|
|
@@ -200,7 +200,7 @@ installFullScreenHandlers();
|
|
|
200
200
|
|
|
201
201
|
/***/ }),
|
|
202
202
|
|
|
203
|
-
/***/
|
|
203
|
+
/***/ 336:
|
|
204
204
|
/***/ ((module, exports, __webpack_require__) => {
|
|
205
205
|
|
|
206
206
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -214,7 +214,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
214
214
|
(function (factory) {
|
|
215
215
|
if ( true ) {
|
|
216
216
|
// AMD. Register as an anonymous module.
|
|
217
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(
|
|
217
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(386)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
218
218
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
219
219
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
220
220
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
@@ -425,7 +425,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
425
425
|
|
|
426
426
|
/***/ }),
|
|
427
427
|
|
|
428
|
-
/***/
|
|
428
|
+
/***/ 386:
|
|
429
429
|
/***/ (function(module, exports) {
|
|
430
430
|
|
|
431
431
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -11149,7 +11149,7 @@ return jQuery;
|
|
|
11149
11149
|
|
|
11150
11150
|
/***/ }),
|
|
11151
11151
|
|
|
11152
|
-
/***/
|
|
11152
|
+
/***/ 475:
|
|
11153
11153
|
/***/ ((module) => {
|
|
11154
11154
|
|
|
11155
11155
|
/**
|
|
@@ -15928,7 +15928,7 @@ if (true) {
|
|
|
15928
15928
|
|
|
15929
15929
|
/***/ }),
|
|
15930
15930
|
|
|
15931
|
-
/***/
|
|
15931
|
+
/***/ 514:
|
|
15932
15932
|
/***/ (function(__unused_webpack_module, exports) {
|
|
15933
15933
|
|
|
15934
15934
|
|
|
@@ -19173,7 +19173,7 @@ if (true) {
|
|
|
19173
19173
|
|
|
19174
19174
|
/***/ }),
|
|
19175
19175
|
|
|
19176
|
-
/***/
|
|
19176
|
+
/***/ 141:
|
|
19177
19177
|
/***/ (function(module, exports) {
|
|
19178
19178
|
|
|
19179
19179
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -20297,7 +20297,7 @@ Object .defineProperty (Namespace, "add",
|
|
|
20297
20297
|
return module;
|
|
20298
20298
|
}
|
|
20299
20299
|
|
|
20300
|
-
const X3D = window [Symbol .for ("X_ITE.X3D-10.
|
|
20300
|
+
const X3D = window [Symbol .for ("X_ITE.X3D-10.5.0")];
|
|
20301
20301
|
|
|
20302
20302
|
if (X3D)
|
|
20303
20303
|
X3D [name] = module;
|
|
@@ -20553,6 +20553,10 @@ const Algorithm =
|
|
|
20553
20553
|
|
|
20554
20554
|
return value;
|
|
20555
20555
|
},
|
|
20556
|
+
project (value, fromLow, fromHigh, toLow, toHigh)
|
|
20557
|
+
{
|
|
20558
|
+
return toLow + ((value - fromLow) / (fromHigh - fromLow)) * (toHigh - toLow);
|
|
20559
|
+
},
|
|
20556
20560
|
roundToMultiple (value, multiple)
|
|
20557
20561
|
{
|
|
20558
20562
|
return Math .ceil (value / multiple) * multiple;
|
|
@@ -20857,37 +20861,10 @@ function Generator ({ style = "TIDY", indent = "", precision = 7, doublePrecisio
|
|
|
20857
20861
|
this .html = html;
|
|
20858
20862
|
this .closingTags = html || closingTags;
|
|
20859
20863
|
|
|
20860
|
-
this .floatFormat
|
|
20861
|
-
|
|
20862
|
-
|
|
20863
|
-
|
|
20864
|
-
useGrouping: false,
|
|
20865
|
-
})
|
|
20866
|
-
.format;
|
|
20867
|
-
|
|
20868
|
-
this .floatExponentialFormat = new Intl .NumberFormat ("en",
|
|
20869
|
-
{
|
|
20870
|
-
notation: "scientific",
|
|
20871
|
-
maximumSignificantDigits: this .precision,
|
|
20872
|
-
useGrouping: false,
|
|
20873
|
-
})
|
|
20874
|
-
.format;
|
|
20875
|
-
|
|
20876
|
-
this .doubleFormat = new Intl .NumberFormat ("en",
|
|
20877
|
-
{
|
|
20878
|
-
notation: "standard",
|
|
20879
|
-
maximumSignificantDigits: this .doublePrecision,
|
|
20880
|
-
useGrouping: false,
|
|
20881
|
-
})
|
|
20882
|
-
.format;
|
|
20883
|
-
|
|
20884
|
-
this .doubleExponentialFormat = new Intl .NumberFormat ("en",
|
|
20885
|
-
{
|
|
20886
|
-
notation: "scientific",
|
|
20887
|
-
maximumSignificantDigits: this .doublePrecision,
|
|
20888
|
-
useGrouping: false,
|
|
20889
|
-
})
|
|
20890
|
-
.format;
|
|
20864
|
+
this .floatFormat = this .createFloatFormat (this .precision);
|
|
20865
|
+
this .floatExponentialFormat = this .createFloatExponentialFormat (this .precision);
|
|
20866
|
+
this .doubleFormat = this .createFloatFormat (this .doublePrecision);
|
|
20867
|
+
this .doubleExponentialFormat = this .createFloatExponentialFormat (this .doublePrecision);
|
|
20891
20868
|
|
|
20892
20869
|
this .Style (style);
|
|
20893
20870
|
|
|
@@ -21034,6 +21011,26 @@ Object .assign (Generator .prototype,
|
|
|
21034
21011
|
|
|
21035
21012
|
return "";
|
|
21036
21013
|
},
|
|
21014
|
+
createFloatFormat (precision)
|
|
21015
|
+
{
|
|
21016
|
+
return new Intl .NumberFormat ("en",
|
|
21017
|
+
{
|
|
21018
|
+
notation: "standard",
|
|
21019
|
+
maximumSignificantDigits: precision,
|
|
21020
|
+
useGrouping: false,
|
|
21021
|
+
})
|
|
21022
|
+
.format;
|
|
21023
|
+
},
|
|
21024
|
+
createFloatExponentialFormat (precision)
|
|
21025
|
+
{
|
|
21026
|
+
return new Intl .NumberFormat ("en",
|
|
21027
|
+
{
|
|
21028
|
+
notation: "scientific",
|
|
21029
|
+
maximumSignificantDigits: precision,
|
|
21030
|
+
useGrouping: false,
|
|
21031
|
+
})
|
|
21032
|
+
.format;
|
|
21033
|
+
},
|
|
21037
21034
|
FloatFormat (value)
|
|
21038
21035
|
{
|
|
21039
21036
|
if (Number .isFinite (value))
|
|
@@ -24685,7 +24682,7 @@ const SFInt32_default_ = SFInt32;
|
|
|
24685
24682
|
|
|
24686
24683
|
|
|
24687
24684
|
|
|
24688
|
-
function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double)
|
|
24685
|
+
function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double, properties = { })
|
|
24689
24686
|
{
|
|
24690
24687
|
const _formatter = double ? "DoubleFormat" : "FloatFormat";
|
|
24691
24688
|
|
|
@@ -24698,7 +24695,7 @@ function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double)
|
|
|
24698
24695
|
},
|
|
24699
24696
|
});
|
|
24700
24697
|
|
|
24701
|
-
|
|
24698
|
+
Object .assign (Object .setPrototypeOf (Constructor .prototype, Base_X3DField .prototype),
|
|
24702
24699
|
{
|
|
24703
24700
|
*[Symbol .iterator] ()
|
|
24704
24701
|
{
|
|
@@ -24858,7 +24855,33 @@ function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double)
|
|
|
24858
24855
|
|
|
24859
24856
|
generator .string += generator .JSONNumber (generator [_formatter] (value [last]));
|
|
24860
24857
|
},
|
|
24861
|
-
}
|
|
24858
|
+
},
|
|
24859
|
+
properties);
|
|
24860
|
+
|
|
24861
|
+
for (const key of Object .keys (Constructor .prototype))
|
|
24862
|
+
Object .defineProperty (Constructor .prototype, key, { enumerable: false });
|
|
24863
|
+
|
|
24864
|
+
function defineProperty (i)
|
|
24865
|
+
{
|
|
24866
|
+
Object .defineProperty (Constructor .prototype, i,
|
|
24867
|
+
{
|
|
24868
|
+
get ()
|
|
24869
|
+
{
|
|
24870
|
+
return this .getValue () [i];
|
|
24871
|
+
},
|
|
24872
|
+
set (value)
|
|
24873
|
+
{
|
|
24874
|
+
this .getValue () [i] = value;
|
|
24875
|
+
this .addEvent ();
|
|
24876
|
+
},
|
|
24877
|
+
enumerable: true,
|
|
24878
|
+
});
|
|
24879
|
+
}
|
|
24880
|
+
|
|
24881
|
+
for (let i = 0; i < Matrix .prototype .length; ++ i)
|
|
24882
|
+
defineProperty (i);
|
|
24883
|
+
|
|
24884
|
+
return Constructor;
|
|
24862
24885
|
}
|
|
24863
24886
|
|
|
24864
24887
|
const SFMatrixPrototypeTemplate_default_ = SFMatrixPrototypeTemplate;
|
|
@@ -24913,6 +24936,8 @@ const SFMatrixPrototypeTemplate_default_ = SFMatrixPrototypeTemplate;
|
|
|
24913
24936
|
*
|
|
24914
24937
|
******************************************************************************/
|
|
24915
24938
|
|
|
24939
|
+
|
|
24940
|
+
|
|
24916
24941
|
function Vector2 (x = 0, y = 0)
|
|
24917
24942
|
{
|
|
24918
24943
|
this .x = x;
|
|
@@ -25073,6 +25098,11 @@ Object .assign (Vector2 .prototype,
|
|
|
25073
25098
|
this .y = y;
|
|
25074
25099
|
return this;
|
|
25075
25100
|
},
|
|
25101
|
+
clamp (min, max)
|
|
25102
|
+
{
|
|
25103
|
+
this .x = Math_Algorithm .clamp (this .x, min .x, max .x);
|
|
25104
|
+
this .y = Math_Algorithm .clamp (this .y, min .y, max .y);
|
|
25105
|
+
},
|
|
25076
25106
|
toString ()
|
|
25077
25107
|
{
|
|
25078
25108
|
return this .x + " " +
|
|
@@ -25365,6 +25395,12 @@ Object .assign (Vector3 .prototype,
|
|
|
25365
25395
|
this .z = z;
|
|
25366
25396
|
return this;
|
|
25367
25397
|
},
|
|
25398
|
+
clamp (min, max)
|
|
25399
|
+
{
|
|
25400
|
+
this .x = Math_Algorithm .clamp (this .x, min .x, max .x);
|
|
25401
|
+
this .y = Math_Algorithm .clamp (this .y, min .y, max .y);
|
|
25402
|
+
this .z = Math_Algorithm .clamp (this .z, min .z, max .z);
|
|
25403
|
+
},
|
|
25368
25404
|
toString ()
|
|
25369
25405
|
{
|
|
25370
25406
|
return this .x + " " +
|
|
@@ -26609,8 +26645,8 @@ function SFMatrix3Template (TypeName, double)
|
|
|
26609
26645
|
r2 = arguments [2];
|
|
26610
26646
|
|
|
26611
26647
|
Base_X3DField .call (this, new Numbers_Matrix3 (r0 .x, r0 .y, r0 .z,
|
|
26612
|
-
|
|
26613
|
-
|
|
26648
|
+
r1 .x, r1 .y, r1 .z,
|
|
26649
|
+
r2 .x, r2 .y, r2 .z));
|
|
26614
26650
|
|
|
26615
26651
|
break;
|
|
26616
26652
|
}
|
|
@@ -26627,7 +26663,7 @@ function SFMatrix3Template (TypeName, double)
|
|
|
26627
26663
|
}
|
|
26628
26664
|
}
|
|
26629
26665
|
|
|
26630
|
-
|
|
26666
|
+
return Fields_SFMatrixPrototypeTemplate (SFMatrix3, TypeName, Numbers_Matrix3, double,
|
|
26631
26667
|
{
|
|
26632
26668
|
setTransform: (function ()
|
|
26633
26669
|
{
|
|
@@ -26651,31 +26687,6 @@ function SFMatrix3Template (TypeName, double)
|
|
|
26651
26687
|
};
|
|
26652
26688
|
})(),
|
|
26653
26689
|
});
|
|
26654
|
-
|
|
26655
|
-
for (const key of Object .keys (SFMatrix3 .prototype))
|
|
26656
|
-
Object .defineProperty (SFMatrix3 .prototype, key, { enumerable: false });
|
|
26657
|
-
|
|
26658
|
-
function defineProperty (i)
|
|
26659
|
-
{
|
|
26660
|
-
Object .defineProperty (SFMatrix3 .prototype, i,
|
|
26661
|
-
{
|
|
26662
|
-
get ()
|
|
26663
|
-
{
|
|
26664
|
-
return this .getValue () [i];
|
|
26665
|
-
},
|
|
26666
|
-
set (value)
|
|
26667
|
-
{
|
|
26668
|
-
this .getValue () [i] = +value;
|
|
26669
|
-
this .addEvent ();
|
|
26670
|
-
},
|
|
26671
|
-
enumerable: true,
|
|
26672
|
-
});
|
|
26673
|
-
}
|
|
26674
|
-
|
|
26675
|
-
for (let i = 0, length = Numbers_Matrix3 .prototype .length; i < length; ++ i)
|
|
26676
|
-
defineProperty (i);
|
|
26677
|
-
|
|
26678
|
-
return SFMatrix3;
|
|
26679
26690
|
}
|
|
26680
26691
|
|
|
26681
26692
|
const SFMatrix3 = {
|
|
@@ -26735,6 +26746,8 @@ const SFMatrix3_default_ = SFMatrix3;
|
|
|
26735
26746
|
*
|
|
26736
26747
|
******************************************************************************/
|
|
26737
26748
|
|
|
26749
|
+
|
|
26750
|
+
|
|
26738
26751
|
function Vector4 (x = 0, y = 0, z = 0, w = 0)
|
|
26739
26752
|
{
|
|
26740
26753
|
this .x = x;
|
|
@@ -26950,6 +26963,13 @@ Object .assign (Vector4 .prototype,
|
|
|
26950
26963
|
this .w = w;
|
|
26951
26964
|
return this;
|
|
26952
26965
|
},
|
|
26966
|
+
clamp (min, max)
|
|
26967
|
+
{
|
|
26968
|
+
this .x = Math_Algorithm .clamp (this .x, min .x, max .x);
|
|
26969
|
+
this .y = Math_Algorithm .clamp (this .y, min .y, max .y);
|
|
26970
|
+
this .z = Math_Algorithm .clamp (this .z, min .z, max .z);
|
|
26971
|
+
this .w = Math_Algorithm .clamp (this .w, min .w, max .w);
|
|
26972
|
+
},
|
|
26953
26973
|
toString ()
|
|
26954
26974
|
{
|
|
26955
26975
|
return this .x + " " +
|
|
@@ -29044,9 +29064,9 @@ function SFMatrix4Template (TypeName, double)
|
|
|
29044
29064
|
r3 = arguments [3];
|
|
29045
29065
|
|
|
29046
29066
|
Base_X3DField .call (this, new Numbers_Matrix4 (r0 .x, r0 .y, r0 .z, r0 .w,
|
|
29047
|
-
|
|
29048
|
-
|
|
29049
|
-
|
|
29067
|
+
r1 .x, r1 .y, r1 .z, r1 .w,
|
|
29068
|
+
r2 .x, r2 .y, r2 .z, r2 .w,
|
|
29069
|
+
r3 .x, r3 .y, r3 .z, r3 .w));
|
|
29050
29070
|
|
|
29051
29071
|
break;
|
|
29052
29072
|
}
|
|
@@ -29064,32 +29084,7 @@ function SFMatrix4Template (TypeName, double)
|
|
|
29064
29084
|
}
|
|
29065
29085
|
}
|
|
29066
29086
|
|
|
29067
|
-
Fields_SFMatrixPrototypeTemplate (SFMatrix4, TypeName, Numbers_Matrix4, double);
|
|
29068
|
-
|
|
29069
|
-
for (const key of Object .keys (SFMatrix4 .prototype))
|
|
29070
|
-
Object .defineProperty (SFMatrix4 .prototype, key, { enumerable: false });
|
|
29071
|
-
|
|
29072
|
-
function defineProperty (i)
|
|
29073
|
-
{
|
|
29074
|
-
Object .defineProperty (SFMatrix4 .prototype, i,
|
|
29075
|
-
{
|
|
29076
|
-
get ()
|
|
29077
|
-
{
|
|
29078
|
-
return this .getValue () [i];
|
|
29079
|
-
},
|
|
29080
|
-
set (value)
|
|
29081
|
-
{
|
|
29082
|
-
this .getValue () [i] = value;
|
|
29083
|
-
this .addEvent ();
|
|
29084
|
-
},
|
|
29085
|
-
enumerable: true,
|
|
29086
|
-
});
|
|
29087
|
-
}
|
|
29088
|
-
|
|
29089
|
-
for (let i = 0, length = Numbers_Matrix4 .prototype .length; i < length; ++ i)
|
|
29090
|
-
defineProperty (i);
|
|
29091
|
-
|
|
29092
|
-
return SFMatrix4;
|
|
29087
|
+
return Fields_SFMatrixPrototypeTemplate (SFMatrix4, TypeName, Numbers_Matrix4, double);
|
|
29093
29088
|
}
|
|
29094
29089
|
|
|
29095
29090
|
const SFMatrix4 = {
|
|
@@ -29724,7 +29719,7 @@ const SFNode_default_ = SFNode;
|
|
|
29724
29719
|
|
|
29725
29720
|
|
|
29726
29721
|
|
|
29727
|
-
function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double)
|
|
29722
|
+
function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double, properties = { })
|
|
29728
29723
|
{
|
|
29729
29724
|
const _formatter = double ? "DoubleFormat" : "FloatFormat";
|
|
29730
29725
|
|
|
@@ -29737,7 +29732,7 @@ function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double)
|
|
|
29737
29732
|
},
|
|
29738
29733
|
});
|
|
29739
29734
|
|
|
29740
|
-
|
|
29735
|
+
Object .assign (Object .setPrototypeOf (Constructor .prototype, Base_X3DField .prototype),
|
|
29741
29736
|
{
|
|
29742
29737
|
*[Symbol .iterator] ()
|
|
29743
29738
|
{
|
|
@@ -29872,7 +29867,80 @@ function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double)
|
|
|
29872
29867
|
|
|
29873
29868
|
generator .string += generator .JSONNumber (generator [_formatter] (generator .ToUnit (category, value [last])));
|
|
29874
29869
|
},
|
|
29875
|
-
}
|
|
29870
|
+
},
|
|
29871
|
+
properties);
|
|
29872
|
+
|
|
29873
|
+
for (const key of Object .keys (Constructor .prototype))
|
|
29874
|
+
Object .defineProperty (Constructor .prototype, key, { enumerable: false });
|
|
29875
|
+
|
|
29876
|
+
const x = {
|
|
29877
|
+
get ()
|
|
29878
|
+
{
|
|
29879
|
+
return this .getValue () .x;
|
|
29880
|
+
},
|
|
29881
|
+
set (value)
|
|
29882
|
+
{
|
|
29883
|
+
this .getValue () .x = +value;
|
|
29884
|
+
this .addEvent ();
|
|
29885
|
+
},
|
|
29886
|
+
};
|
|
29887
|
+
|
|
29888
|
+
const y = {
|
|
29889
|
+
get ()
|
|
29890
|
+
{
|
|
29891
|
+
return this .getValue () .y;
|
|
29892
|
+
},
|
|
29893
|
+
set (value)
|
|
29894
|
+
{
|
|
29895
|
+
this .getValue () .y = +value;
|
|
29896
|
+
this .addEvent ();
|
|
29897
|
+
},
|
|
29898
|
+
};
|
|
29899
|
+
|
|
29900
|
+
const z = {
|
|
29901
|
+
get ()
|
|
29902
|
+
{
|
|
29903
|
+
return this .getValue () .z;
|
|
29904
|
+
},
|
|
29905
|
+
set (value)
|
|
29906
|
+
{
|
|
29907
|
+
this .getValue () .z = +value;
|
|
29908
|
+
this .addEvent ();
|
|
29909
|
+
},
|
|
29910
|
+
};
|
|
29911
|
+
|
|
29912
|
+
const w = {
|
|
29913
|
+
get ()
|
|
29914
|
+
{
|
|
29915
|
+
return this .getValue () .w;
|
|
29916
|
+
},
|
|
29917
|
+
set (value)
|
|
29918
|
+
{
|
|
29919
|
+
this .getValue () .w = +value;
|
|
29920
|
+
this .addEvent ();
|
|
29921
|
+
},
|
|
29922
|
+
};
|
|
29923
|
+
|
|
29924
|
+
const indices = [
|
|
29925
|
+
[0, x],
|
|
29926
|
+
[1, y],
|
|
29927
|
+
[2, z],
|
|
29928
|
+
[3, w],
|
|
29929
|
+
];
|
|
29930
|
+
|
|
29931
|
+
const props = [
|
|
29932
|
+
["x", Object .assign ({ enumerable: true }, x)],
|
|
29933
|
+
["y", Object .assign ({ enumerable: true }, y)],
|
|
29934
|
+
["z", Object .assign ({ enumerable: true }, z)],
|
|
29935
|
+
["w", Object .assign ({ enumerable: true }, w)],
|
|
29936
|
+
];
|
|
29937
|
+
|
|
29938
|
+
indices .length = Vector .prototype .length;
|
|
29939
|
+
props .length = Vector .prototype .length;
|
|
29940
|
+
|
|
29941
|
+
Object .defineProperties (Constructor .prototype, Object .fromEntries (indices .concat (props)));
|
|
29942
|
+
|
|
29943
|
+
return Constructor;
|
|
29876
29944
|
}
|
|
29877
29945
|
|
|
29878
29946
|
const SFVecPrototypeTemplate_default_ = SFVecPrototypeTemplate;
|
|
@@ -29954,64 +30022,13 @@ function SFVec3Template (TypeName, double)
|
|
|
29954
30022
|
}
|
|
29955
30023
|
}
|
|
29956
30024
|
|
|
29957
|
-
|
|
30025
|
+
return Fields_SFVecPrototypeTemplate (SFVec3, TypeName, Numbers_Vector3, double,
|
|
29958
30026
|
{
|
|
29959
30027
|
cross (vector)
|
|
29960
30028
|
{
|
|
29961
30029
|
return new (this .constructor) (this .getValue () .copy () .cross (vector .getValue ()));
|
|
29962
30030
|
},
|
|
29963
30031
|
});
|
|
29964
|
-
|
|
29965
|
-
for (const key of Object .keys (SFVec3 .prototype))
|
|
29966
|
-
Object .defineProperty (SFVec3 .prototype, key, { enumerable: false });
|
|
29967
|
-
|
|
29968
|
-
const x = {
|
|
29969
|
-
get ()
|
|
29970
|
-
{
|
|
29971
|
-
return this .getValue () .x;
|
|
29972
|
-
},
|
|
29973
|
-
set (value)
|
|
29974
|
-
{
|
|
29975
|
-
this .getValue () .x = +value;
|
|
29976
|
-
this .addEvent ();
|
|
29977
|
-
},
|
|
29978
|
-
};
|
|
29979
|
-
|
|
29980
|
-
const y = {
|
|
29981
|
-
get ()
|
|
29982
|
-
{
|
|
29983
|
-
return this .getValue () .y;
|
|
29984
|
-
},
|
|
29985
|
-
set (value)
|
|
29986
|
-
{
|
|
29987
|
-
this .getValue () .y = +value;
|
|
29988
|
-
this .addEvent ();
|
|
29989
|
-
},
|
|
29990
|
-
};
|
|
29991
|
-
|
|
29992
|
-
const z = {
|
|
29993
|
-
get ()
|
|
29994
|
-
{
|
|
29995
|
-
return this .getValue () .z;
|
|
29996
|
-
},
|
|
29997
|
-
set (value)
|
|
29998
|
-
{
|
|
29999
|
-
this .getValue () .z = +value;
|
|
30000
|
-
this .addEvent ();
|
|
30001
|
-
},
|
|
30002
|
-
};
|
|
30003
|
-
|
|
30004
|
-
Object .defineProperties (SFVec3 .prototype,
|
|
30005
|
-
{
|
|
30006
|
-
0: x,
|
|
30007
|
-
1: y,
|
|
30008
|
-
2: z,
|
|
30009
|
-
x: Object .assign ({ enumerable: true }, x),
|
|
30010
|
-
y: Object .assign ({ enumerable: true }, y),
|
|
30011
|
-
z: Object .assign ({ enumerable: true }, z),
|
|
30012
|
-
});
|
|
30013
|
-
|
|
30014
|
-
return SFVec3;
|
|
30015
30032
|
}
|
|
30016
30033
|
|
|
30017
30034
|
const SFVec3 = {
|
|
@@ -30647,44 +30664,7 @@ function SFVec2Template (TypeName, double)
|
|
|
30647
30664
|
}
|
|
30648
30665
|
}
|
|
30649
30666
|
|
|
30650
|
-
Fields_SFVecPrototypeTemplate (SFVec2, TypeName, Numbers_Vector2, double);
|
|
30651
|
-
|
|
30652
|
-
for (const key of Object .keys (SFVec2 .prototype))
|
|
30653
|
-
Object .defineProperty (SFVec2 .prototype, key, { enumerable: false });
|
|
30654
|
-
|
|
30655
|
-
const x = {
|
|
30656
|
-
get ()
|
|
30657
|
-
{
|
|
30658
|
-
return this .getValue () .x;
|
|
30659
|
-
},
|
|
30660
|
-
set (value)
|
|
30661
|
-
{
|
|
30662
|
-
this .getValue () .x = +value;
|
|
30663
|
-
this .addEvent ();
|
|
30664
|
-
},
|
|
30665
|
-
};
|
|
30666
|
-
|
|
30667
|
-
const y = {
|
|
30668
|
-
get ()
|
|
30669
|
-
{
|
|
30670
|
-
return this .getValue () .y;
|
|
30671
|
-
},
|
|
30672
|
-
set (value)
|
|
30673
|
-
{
|
|
30674
|
-
this .getValue () .y = +value;
|
|
30675
|
-
this .addEvent ();
|
|
30676
|
-
},
|
|
30677
|
-
};
|
|
30678
|
-
|
|
30679
|
-
Object .defineProperties (SFVec2 .prototype,
|
|
30680
|
-
{
|
|
30681
|
-
0: x,
|
|
30682
|
-
1: y,
|
|
30683
|
-
x: Object .assign ({ enumerable: true }, x),
|
|
30684
|
-
y: Object .assign ({ enumerable: true }, y),
|
|
30685
|
-
});
|
|
30686
|
-
|
|
30687
|
-
return SFVec2;
|
|
30667
|
+
return Fields_SFVecPrototypeTemplate (SFVec2, TypeName, Numbers_Vector2, double);
|
|
30688
30668
|
}
|
|
30689
30669
|
|
|
30690
30670
|
const SFVec2 = {
|
|
@@ -30771,72 +30751,7 @@ function SFVec4Template (TypeName, double)
|
|
|
30771
30751
|
}
|
|
30772
30752
|
}
|
|
30773
30753
|
|
|
30774
|
-
Fields_SFVecPrototypeTemplate (SFVec4, TypeName, Numbers_Vector4, double);
|
|
30775
|
-
|
|
30776
|
-
for (const key of Object .keys (SFVec4 .prototype))
|
|
30777
|
-
Object .defineProperty (SFVec4 .prototype, key, { enumerable: false });
|
|
30778
|
-
|
|
30779
|
-
const x = {
|
|
30780
|
-
get ()
|
|
30781
|
-
{
|
|
30782
|
-
return this .getValue () .x;
|
|
30783
|
-
},
|
|
30784
|
-
set (value)
|
|
30785
|
-
{
|
|
30786
|
-
this .getValue () .x = +value;
|
|
30787
|
-
this .addEvent ();
|
|
30788
|
-
},
|
|
30789
|
-
};
|
|
30790
|
-
|
|
30791
|
-
const y = {
|
|
30792
|
-
get ()
|
|
30793
|
-
{
|
|
30794
|
-
return this .getValue () .y;
|
|
30795
|
-
},
|
|
30796
|
-
set (value)
|
|
30797
|
-
{
|
|
30798
|
-
this .getValue () .y = +value;
|
|
30799
|
-
this .addEvent ();
|
|
30800
|
-
},
|
|
30801
|
-
};
|
|
30802
|
-
|
|
30803
|
-
const z = {
|
|
30804
|
-
get ()
|
|
30805
|
-
{
|
|
30806
|
-
return this .getValue () .z;
|
|
30807
|
-
},
|
|
30808
|
-
set (value)
|
|
30809
|
-
{
|
|
30810
|
-
this .getValue () .z = +value;
|
|
30811
|
-
this .addEvent ();
|
|
30812
|
-
},
|
|
30813
|
-
};
|
|
30814
|
-
|
|
30815
|
-
const w = {
|
|
30816
|
-
get ()
|
|
30817
|
-
{
|
|
30818
|
-
return this .getValue () .w;
|
|
30819
|
-
},
|
|
30820
|
-
set (value)
|
|
30821
|
-
{
|
|
30822
|
-
this .getValue () .w = +value;
|
|
30823
|
-
this .addEvent ();
|
|
30824
|
-
},
|
|
30825
|
-
};
|
|
30826
|
-
|
|
30827
|
-
Object .defineProperties (SFVec4 .prototype,
|
|
30828
|
-
{
|
|
30829
|
-
0: x,
|
|
30830
|
-
1: y,
|
|
30831
|
-
2: z,
|
|
30832
|
-
3: w,
|
|
30833
|
-
x: Object .assign ({ enumerable: true }, x),
|
|
30834
|
-
y: Object .assign ({ enumerable: true }, y),
|
|
30835
|
-
z: Object .assign ({ enumerable: true }, z),
|
|
30836
|
-
w: Object .assign ({ enumerable: true }, w),
|
|
30837
|
-
});
|
|
30838
|
-
|
|
30839
|
-
return SFVec4;
|
|
30754
|
+
return Fields_SFVecPrototypeTemplate (SFVec4, TypeName, Numbers_Vector4, double);
|
|
30840
30755
|
}
|
|
30841
30756
|
|
|
30842
30757
|
const SFVec4 = {
|
|
@@ -34244,7 +34159,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
|
|
|
34244
34159
|
|
|
34245
34160
|
/* harmony default export */ const Base_X3DBaseNode = (x_ite_Namespace .add ("X3DBaseNode", X3DBaseNode_default_));
|
|
34246
34161
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Legacy.js
|
|
34247
|
-
/* provided dependency */ var $ = __webpack_require__(
|
|
34162
|
+
/* provided dependency */ var $ = __webpack_require__(386);
|
|
34248
34163
|
/*******************************************************************************
|
|
34249
34164
|
*
|
|
34250
34165
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -34380,7 +34295,7 @@ const Legacy_default_ = Legacy;
|
|
|
34380
34295
|
*
|
|
34381
34296
|
******************************************************************************/
|
|
34382
34297
|
|
|
34383
|
-
const BROWSER_VERSION_default_ = "10.
|
|
34298
|
+
const BROWSER_VERSION_default_ = "10.5.0";
|
|
34384
34299
|
;
|
|
34385
34300
|
|
|
34386
34301
|
/* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
|
|
@@ -35167,7 +35082,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
|
|
|
35167
35082
|
|
|
35168
35083
|
for (const reference of field .getReferences ())
|
|
35169
35084
|
{
|
|
35170
|
-
initializableReference
|
|
35085
|
+
initializableReference ||= reference .isInitializable ();
|
|
35171
35086
|
|
|
35172
35087
|
// Output user defined reference field
|
|
35173
35088
|
|
|
@@ -35230,7 +35145,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
|
|
|
35230
35145
|
|
|
35231
35146
|
for (const reference of field .getReferences ())
|
|
35232
35147
|
{
|
|
35233
|
-
initializableReference
|
|
35148
|
+
initializableReference ||= reference .isInitializable ();
|
|
35234
35149
|
|
|
35235
35150
|
// Output build in reference field
|
|
35236
35151
|
|
|
@@ -37405,7 +37320,7 @@ const X3DBindableNode_default_ = X3DBindableNode;
|
|
|
37405
37320
|
|
|
37406
37321
|
/* harmony default export */ const Core_X3DBindableNode = (x_ite_Namespace .add ("X3DBindableNode", X3DBindableNode_default_));
|
|
37407
37322
|
;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
|
|
37408
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
37323
|
+
/* provided dependency */ var libtess = __webpack_require__(475);
|
|
37409
37324
|
/*******************************************************************************
|
|
37410
37325
|
*
|
|
37411
37326
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -37447,7 +37362,7 @@ const X3DBindableNode_default_ = X3DBindableNode;
|
|
|
37447
37362
|
*
|
|
37448
37363
|
* You should have received a copy of the GNU General Public License version 3
|
|
37449
37364
|
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
37450
|
-
* copy of the
|
|
37365
|
+
* copy of the GPLc License.
|
|
37451
37366
|
*
|
|
37452
37367
|
* For Silvio, Joy and Adi.
|
|
37453
37368
|
*
|
|
@@ -37457,6 +37372,13 @@ const X3DBindableNode_default_ = X3DBindableNode;
|
|
|
37457
37372
|
|
|
37458
37373
|
const Triangle3 =
|
|
37459
37374
|
{
|
|
37375
|
+
/**
|
|
37376
|
+
*
|
|
37377
|
+
* @param {Vector3} a first point of triangle
|
|
37378
|
+
* @param {Vector3} b second point of triangle
|
|
37379
|
+
* @param {Vector3} c third point of triangle
|
|
37380
|
+
* @returns
|
|
37381
|
+
*/
|
|
37460
37382
|
area: (() =>
|
|
37461
37383
|
{
|
|
37462
37384
|
const
|
|
@@ -37468,15 +37390,23 @@ const Triangle3 =
|
|
|
37468
37390
|
return B .assign (b) .subtract (a) .cross (C .assign (c) .subtract (a)) .magnitude () / 2;
|
|
37469
37391
|
};
|
|
37470
37392
|
})(),
|
|
37471
|
-
|
|
37393
|
+
/**
|
|
37394
|
+
*
|
|
37395
|
+
* @param {Vector3} a first point of triangle
|
|
37396
|
+
* @param {Vector3} b second point of triangle
|
|
37397
|
+
* @param {Vector3} c third point of triangle
|
|
37398
|
+
* @param {Vector3} normal resulting normal
|
|
37399
|
+
* @returns
|
|
37400
|
+
*/
|
|
37401
|
+
normal (a, b, c, normal)
|
|
37472
37402
|
{
|
|
37473
37403
|
const
|
|
37474
|
-
x1 =
|
|
37475
|
-
y1 =
|
|
37476
|
-
z1 =
|
|
37477
|
-
x2 =
|
|
37478
|
-
y2 =
|
|
37479
|
-
z2 =
|
|
37404
|
+
x1 = c .x - b .x,
|
|
37405
|
+
y1 = c .y - b .y,
|
|
37406
|
+
z1 = c .z - b .z,
|
|
37407
|
+
x2 = a .x - b .x,
|
|
37408
|
+
y2 = a .y - b .y,
|
|
37409
|
+
z2 = a .z - b .z;
|
|
37480
37410
|
|
|
37481
37411
|
normal .set (y1 * z2 - z1 * y2,
|
|
37482
37412
|
z1 * x2 - x1 * z2,
|
|
@@ -37484,15 +37414,24 @@ const Triangle3 =
|
|
|
37484
37414
|
|
|
37485
37415
|
return normal .normalize ();
|
|
37486
37416
|
},
|
|
37487
|
-
|
|
37417
|
+
/**
|
|
37418
|
+
*
|
|
37419
|
+
* @param {Vector3} a first point of quad
|
|
37420
|
+
* @param {Vector3} b second point of quad
|
|
37421
|
+
* @param {Vector3} c third point of quad
|
|
37422
|
+
* @param {Vector3} d third point of quad
|
|
37423
|
+
* @param {Vector3} normal resulting normal
|
|
37424
|
+
* @returns
|
|
37425
|
+
*/
|
|
37426
|
+
quadNormal (a, b, c, d, normal)
|
|
37488
37427
|
{
|
|
37489
37428
|
const
|
|
37490
|
-
x1 =
|
|
37491
|
-
y1 =
|
|
37492
|
-
z1 =
|
|
37493
|
-
x2 =
|
|
37494
|
-
y2 =
|
|
37495
|
-
z2 =
|
|
37429
|
+
x1 = c .x - a .x,
|
|
37430
|
+
y1 = c .y - a .y,
|
|
37431
|
+
z1 = c .z - a .z,
|
|
37432
|
+
x2 = d .x - b .x,
|
|
37433
|
+
y2 = d .y - b .y,
|
|
37434
|
+
z2 = d .z - b .z;
|
|
37496
37435
|
|
|
37497
37436
|
normal .set (y1 * z2 - z1 * y2,
|
|
37498
37437
|
z1 * x2 - x1 * z2,
|
|
@@ -39943,7 +39882,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
|
|
|
39943
39882
|
|
|
39944
39883
|
/* harmony default export */ const Prototype_X3DProtoDeclaration = (x_ite_Namespace .add ("X3DProtoDeclaration", X3DProtoDeclaration_default_));
|
|
39945
39884
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
|
|
39946
|
-
/* provided dependency */ var X3DParser_$ = __webpack_require__(
|
|
39885
|
+
/* provided dependency */ var X3DParser_$ = __webpack_require__(386);
|
|
39947
39886
|
/*******************************************************************************
|
|
39948
39887
|
*
|
|
39949
39888
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -40157,39 +40096,38 @@ const X3DParser_default_ = X3DParser;
|
|
|
40157
40096
|
*
|
|
40158
40097
|
******************************************************************************/
|
|
40159
40098
|
|
|
40160
|
-
|
|
40099
|
+
const functions =
|
|
40161
40100
|
{
|
|
40162
|
-
|
|
40163
|
-
|
|
40164
|
-
parser .result = this .exec (parser .input);
|
|
40165
|
-
|
|
40166
|
-
if (parser .result)
|
|
40101
|
+
parse (parser)
|
|
40167
40102
|
{
|
|
40168
|
-
|
|
40169
|
-
return true;
|
|
40170
|
-
}
|
|
40103
|
+
this .lastIndex = parser .lastIndex;
|
|
40171
40104
|
|
|
40172
|
-
|
|
40173
|
-
}
|
|
40105
|
+
parser .result = this .exec (parser .input);
|
|
40174
40106
|
|
|
40175
|
-
|
|
40176
|
-
{
|
|
40177
|
-
|
|
40178
|
-
|
|
40179
|
-
|
|
40107
|
+
if (parser .result)
|
|
40108
|
+
{
|
|
40109
|
+
parser .lastIndex = this .lastIndex;
|
|
40110
|
+
return true;
|
|
40111
|
+
}
|
|
40180
40112
|
|
|
40181
|
-
|
|
40113
|
+
return false;
|
|
40114
|
+
},
|
|
40115
|
+
lookahead (parser)
|
|
40116
|
+
{
|
|
40117
|
+
const
|
|
40118
|
+
lastIndex = parser .lastIndex,
|
|
40119
|
+
result = this .parse (parser);
|
|
40182
40120
|
|
|
40183
|
-
|
|
40184
|
-
|
|
40121
|
+
parser .lastIndex = lastIndex;
|
|
40122
|
+
|
|
40123
|
+
return result;
|
|
40124
|
+
},
|
|
40125
|
+
};
|
|
40185
40126
|
|
|
40186
40127
|
function Expressions (Grammar)
|
|
40187
40128
|
{
|
|
40188
40129
|
for (const value of Object .values (Grammar))
|
|
40189
|
-
|
|
40190
|
-
value .parse = parse;
|
|
40191
|
-
value .lookahead = lookahead;
|
|
40192
|
-
}
|
|
40130
|
+
Object .assign (value, functions);
|
|
40193
40131
|
|
|
40194
40132
|
return Grammar;
|
|
40195
40133
|
}
|
|
@@ -40199,7 +40137,7 @@ const Expressions_default_ = Expressions;
|
|
|
40199
40137
|
|
|
40200
40138
|
/* harmony default export */ const Parser_Expressions = (x_ite_Namespace .add ("Expressions", Expressions_default_));
|
|
40201
40139
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/VRMLParser.js
|
|
40202
|
-
/* provided dependency */ var VRMLParser_$ = __webpack_require__(
|
|
40140
|
+
/* provided dependency */ var VRMLParser_$ = __webpack_require__(386);
|
|
40203
40141
|
/*******************************************************************************
|
|
40204
40142
|
*
|
|
40205
40143
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -42898,7 +42836,7 @@ const VRMLParser_default_ = VRMLParser;
|
|
|
42898
42836
|
|
|
42899
42837
|
/* harmony default export */ const Parser_VRMLParser = (x_ite_Namespace .add ("VRMLParser", VRMLParser_default_));
|
|
42900
42838
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
|
|
42901
|
-
/* provided dependency */ var XMLParser_$ = __webpack_require__(
|
|
42839
|
+
/* provided dependency */ var XMLParser_$ = __webpack_require__(386);
|
|
42902
42840
|
/*******************************************************************************
|
|
42903
42841
|
*
|
|
42904
42842
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -45071,7 +45009,7 @@ const URLs_default_ = URLs;
|
|
|
45071
45009
|
|
|
45072
45010
|
/* harmony default export */ const Networking_URLs = (x_ite_Namespace .add ("URLs", URLs_default_));
|
|
45073
45011
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
|
|
45074
|
-
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(
|
|
45012
|
+
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(386);
|
|
45075
45013
|
/*******************************************************************************
|
|
45076
45014
|
*
|
|
45077
45015
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -48715,7 +48653,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
|
|
|
48715
48653
|
|
|
48716
48654
|
/* harmony default export */ const Parser_GLTF2Parser = (x_ite_Namespace .add ("GLTF2Parser", GLTF2Parser_default_));
|
|
48717
48655
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
|
|
48718
|
-
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(
|
|
48656
|
+
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(386);
|
|
48719
48657
|
/*******************************************************************************
|
|
48720
48658
|
*
|
|
48721
48659
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -48866,7 +48804,7 @@ const GLB2Parser_default_ = GLB2Parser;
|
|
|
48866
48804
|
|
|
48867
48805
|
/* harmony default export */ const Parser_GLB2Parser = (x_ite_Namespace .add ("GLB2Parser", GLB2Parser_default_));
|
|
48868
48806
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
|
|
48869
|
-
/* provided dependency */ var OBJParser_$ = __webpack_require__(
|
|
48807
|
+
/* provided dependency */ var OBJParser_$ = __webpack_require__(386);
|
|
48870
48808
|
/*******************************************************************************
|
|
48871
48809
|
*
|
|
48872
48810
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -52131,70 +52069,76 @@ const Bezier_default_ = Bezier;
|
|
|
52131
52069
|
*
|
|
52132
52070
|
******************************************************************************/
|
|
52133
52071
|
|
|
52134
|
-
|
|
52072
|
+
class MatrixStack extends Array
|
|
52135
52073
|
{
|
|
52136
|
-
|
|
52074
|
+
#top = 0;
|
|
52075
|
+
|
|
52076
|
+
constructor (Type)
|
|
52137
52077
|
{
|
|
52138
|
-
|
|
52139
|
-
set (matrix)
|
|
52140
|
-
{
|
|
52141
|
-
this [this .top] .assign (matrix);
|
|
52142
|
-
},
|
|
52143
|
-
get ()
|
|
52144
|
-
{
|
|
52145
|
-
return this [this .top];
|
|
52146
|
-
},
|
|
52147
|
-
push ()
|
|
52148
|
-
{
|
|
52149
|
-
const top = ++ this .top;
|
|
52078
|
+
super ();
|
|
52150
52079
|
|
|
52151
|
-
|
|
52152
|
-
|
|
52153
|
-
else
|
|
52154
|
-
this [top] = this [top - 1] .copy ();
|
|
52155
|
-
},
|
|
52156
|
-
pushMatrix (matrix)
|
|
52157
|
-
{
|
|
52158
|
-
const top = ++ this .top;
|
|
52080
|
+
this .push (new Type ());
|
|
52081
|
+
}
|
|
52159
52082
|
|
|
52160
|
-
|
|
52161
|
-
|
|
52162
|
-
|
|
52163
|
-
|
|
52164
|
-
|
|
52165
|
-
|
|
52166
|
-
|
|
52167
|
-
|
|
52168
|
-
|
|
52169
|
-
|
|
52170
|
-
|
|
52171
|
-
|
|
52172
|
-
|
|
52173
|
-
|
|
52174
|
-
|
|
52175
|
-
|
|
52176
|
-
|
|
52177
|
-
|
|
52178
|
-
|
|
52179
|
-
|
|
52180
|
-
|
|
52181
|
-
|
|
52182
|
-
|
|
52183
|
-
|
|
52184
|
-
|
|
52185
|
-
|
|
52186
|
-
|
|
52187
|
-
|
|
52188
|
-
|
|
52189
|
-
|
|
52190
|
-
|
|
52191
|
-
|
|
52192
|
-
|
|
52193
|
-
|
|
52194
|
-
|
|
52195
|
-
|
|
52196
|
-
|
|
52197
|
-
|
|
52083
|
+
set (matrix)
|
|
52084
|
+
{
|
|
52085
|
+
this [this .#top] .assign (matrix);
|
|
52086
|
+
}
|
|
52087
|
+
|
|
52088
|
+
get ()
|
|
52089
|
+
{
|
|
52090
|
+
return this [this .#top];
|
|
52091
|
+
}
|
|
52092
|
+
|
|
52093
|
+
push (matrix = this [this .#top])
|
|
52094
|
+
{
|
|
52095
|
+
const top = ++ this .#top;
|
|
52096
|
+
|
|
52097
|
+
if (top < this .length)
|
|
52098
|
+
this [top] .assign (matrix);
|
|
52099
|
+
else
|
|
52100
|
+
this [top] = matrix .copy ();
|
|
52101
|
+
}
|
|
52102
|
+
|
|
52103
|
+
pop ()
|
|
52104
|
+
{
|
|
52105
|
+
-- this .#top;
|
|
52106
|
+
}
|
|
52107
|
+
|
|
52108
|
+
clear ()
|
|
52109
|
+
{
|
|
52110
|
+
this .#top = 0;
|
|
52111
|
+
}
|
|
52112
|
+
|
|
52113
|
+
size ()
|
|
52114
|
+
{
|
|
52115
|
+
return this .#top + 1;
|
|
52116
|
+
}
|
|
52117
|
+
|
|
52118
|
+
identity ()
|
|
52119
|
+
{
|
|
52120
|
+
this [this .#top] .identity ();
|
|
52121
|
+
}
|
|
52122
|
+
|
|
52123
|
+
multLeft (matrix)
|
|
52124
|
+
{
|
|
52125
|
+
this [this .#top] .multLeft (matrix);
|
|
52126
|
+
}
|
|
52127
|
+
|
|
52128
|
+
translate (vector)
|
|
52129
|
+
{
|
|
52130
|
+
this [this .#top] .translate (vector);
|
|
52131
|
+
}
|
|
52132
|
+
|
|
52133
|
+
rotate (rotation)
|
|
52134
|
+
{
|
|
52135
|
+
this [this .#top] .rotate (rotation);
|
|
52136
|
+
}
|
|
52137
|
+
|
|
52138
|
+
scale (vector)
|
|
52139
|
+
{
|
|
52140
|
+
this [this .#top] .scale (vector);
|
|
52141
|
+
}
|
|
52198
52142
|
}
|
|
52199
52143
|
|
|
52200
52144
|
const MatrixStack_default_ = MatrixStack;
|
|
@@ -52202,8 +52146,8 @@ const MatrixStack_default_ = MatrixStack;
|
|
|
52202
52146
|
|
|
52203
52147
|
/* harmony default export */ const Utility_MatrixStack = (x_ite_Namespace .add ("MatrixStack", MatrixStack_default_));
|
|
52204
52148
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
|
|
52205
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
52206
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
52149
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(386);
|
|
52150
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(475);
|
|
52207
52151
|
/*******************************************************************************
|
|
52208
52152
|
*
|
|
52209
52153
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -54973,7 +54917,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
54973
54917
|
|
|
54974
54918
|
/* harmony default export */ const Parser_SVGParser = (x_ite_Namespace .add ("SVGParser", SVGParser_default_));
|
|
54975
54919
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
|
|
54976
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
54920
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(386);
|
|
54977
54921
|
/*******************************************************************************
|
|
54978
54922
|
*
|
|
54979
54923
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -55405,55 +55349,20 @@ const Plane3_default_ = Plane3;
|
|
|
55405
55349
|
* p0 -------- p1 near plane
|
|
55406
55350
|
*/
|
|
55407
55351
|
|
|
55408
|
-
function ViewVolume (
|
|
55352
|
+
function ViewVolume (... args)
|
|
55409
55353
|
{
|
|
55410
55354
|
this .viewport = new Numbers_Vector4 ();
|
|
55411
55355
|
this .scissor = new Numbers_Vector4 ();
|
|
55412
55356
|
|
|
55413
|
-
this .points
|
|
55414
|
-
|
|
55415
|
-
|
|
55416
|
-
|
|
55417
|
-
|
|
55418
|
-
|
|
55419
|
-
new Numbers_Vector3 (),
|
|
55420
|
-
new Numbers_Vector3 (),
|
|
55421
|
-
new Numbers_Vector3 (),
|
|
55422
|
-
new Numbers_Vector3 (),
|
|
55423
|
-
];
|
|
55424
|
-
|
|
55425
|
-
this .normals = [
|
|
55426
|
-
new Numbers_Vector3 (), // front
|
|
55427
|
-
new Numbers_Vector3 (), // left
|
|
55428
|
-
new Numbers_Vector3 (), // right
|
|
55429
|
-
new Numbers_Vector3 (), // top
|
|
55430
|
-
new Numbers_Vector3 (), // bottom
|
|
55431
|
-
new Numbers_Vector3 (), // back
|
|
55432
|
-
];
|
|
55433
|
-
|
|
55434
|
-
this .edges = [
|
|
55435
|
-
new Numbers_Vector3 (),
|
|
55436
|
-
new Numbers_Vector3 (),
|
|
55437
|
-
new Numbers_Vector3 (),
|
|
55438
|
-
new Numbers_Vector3 (),
|
|
55439
|
-
|
|
55440
|
-
new Numbers_Vector3 (),
|
|
55441
|
-
new Numbers_Vector3 (),
|
|
55442
|
-
new Numbers_Vector3 (),
|
|
55443
|
-
new Numbers_Vector3 (),
|
|
55444
|
-
];
|
|
55445
|
-
|
|
55446
|
-
this .planes = [
|
|
55447
|
-
new Geometry_Plane3 (), // front
|
|
55448
|
-
new Geometry_Plane3 (), // left
|
|
55449
|
-
new Geometry_Plane3 (), // right
|
|
55450
|
-
new Geometry_Plane3 (), // top
|
|
55451
|
-
new Geometry_Plane3 (), // bottom
|
|
55452
|
-
new Geometry_Plane3 (), // back
|
|
55453
|
-
];
|
|
55357
|
+
this .points = Array .from ({ length: 8 }, () => new Numbers_Vector3 ());
|
|
55358
|
+
// front, left, right, top, bottom, back
|
|
55359
|
+
this .normals = Array .from ({ length: 6 }, () => new Numbers_Vector3 ());
|
|
55360
|
+
this .edges = Array .from ({ length: 8 }, () => new Numbers_Vector3 ());
|
|
55361
|
+
// front, left, right, top, bottom, back
|
|
55362
|
+
this .planes = Array .from ({ length: 6 }, () => new Geometry_Plane3 ());
|
|
55454
55363
|
|
|
55455
|
-
if (
|
|
55456
|
-
this .set (
|
|
55364
|
+
if (args .length)
|
|
55365
|
+
this .set (... args);
|
|
55457
55366
|
}
|
|
55458
55367
|
|
|
55459
55368
|
Object .assign (ViewVolume .prototype,
|
|
@@ -55546,58 +55455,21 @@ Object .assign (ViewVolume .prototype,
|
|
|
55546
55455
|
},
|
|
55547
55456
|
intersectsSphere (radius, center)
|
|
55548
55457
|
{
|
|
55549
|
-
const
|
|
55550
|
-
|
|
55551
|
-
|
|
55552
|
-
|
|
55553
|
-
|
|
55554
|
-
if (p1 .getDistanceToPoint (center) > radius)
|
|
55555
|
-
return false;
|
|
55556
|
-
|
|
55557
|
-
if (p2 .getDistanceToPoint (center) > radius)
|
|
55558
|
-
return false;
|
|
55559
|
-
|
|
55560
|
-
if (p3 .getDistanceToPoint (center) > radius)
|
|
55561
|
-
return false;
|
|
55562
|
-
|
|
55563
|
-
if (p4 .getDistanceToPoint (center) > radius)
|
|
55564
|
-
return false;
|
|
55565
|
-
|
|
55566
|
-
if (p5 .getDistanceToPoint (center) > radius)
|
|
55567
|
-
return false;
|
|
55458
|
+
for (const plane of this .planes)
|
|
55459
|
+
{
|
|
55460
|
+
if (plane .getDistanceToPoint (center) > radius)
|
|
55461
|
+
return false;
|
|
55462
|
+
}
|
|
55568
55463
|
|
|
55569
55464
|
return true;
|
|
55570
55465
|
},
|
|
55571
55466
|
intersectsBox: (() =>
|
|
55572
55467
|
{
|
|
55573
|
-
const
|
|
55574
|
-
new Numbers_Vector3 (),
|
|
55575
|
-
new Numbers_Vector3 (),
|
|
55576
|
-
new Numbers_Vector3 (),
|
|
55577
|
-
new Numbers_Vector3 ()
|
|
55578
|
-
|
|
55579
|
-
new Numbers_Vector3 (),
|
|
55580
|
-
new Numbers_Vector3 (),
|
|
55581
|
-
new Numbers_Vector3 (),
|
|
55582
|
-
new Numbers_Vector3 (),
|
|
55583
|
-
];
|
|
55584
|
-
|
|
55585
|
-
const normals1 = [
|
|
55586
|
-
new Numbers_Vector3 (),
|
|
55587
|
-
new Numbers_Vector3 (),
|
|
55588
|
-
new Numbers_Vector3 (),
|
|
55589
|
-
];
|
|
55590
|
-
|
|
55591
|
-
const axes1 = [
|
|
55592
|
-
new Numbers_Vector3 (),
|
|
55593
|
-
new Numbers_Vector3 (),
|
|
55594
|
-
new Numbers_Vector3 (),
|
|
55595
|
-
];
|
|
55596
|
-
|
|
55597
|
-
const axes = [ ];
|
|
55598
|
-
|
|
55599
|
-
for (let i = 0; i < 3 * 8; ++ i)
|
|
55600
|
-
axes .push (new Numbers_Vector3 ());
|
|
55468
|
+
const
|
|
55469
|
+
points1 = Array .from ({ length: 8 }, () => new Numbers_Vector3 ()),
|
|
55470
|
+
normals1 = Array .from ({ length: 3 }, () => new Numbers_Vector3 ()),
|
|
55471
|
+
axes1 = Array .from ({ length: 3 }, () => new Numbers_Vector3 ()),
|
|
55472
|
+
axes = Array .from ({ length: 3 * 8 }, () => new Numbers_Vector3 ());
|
|
55601
55473
|
|
|
55602
55474
|
return function (box)
|
|
55603
55475
|
{
|
|
@@ -55645,21 +55517,21 @@ Object .assign (ViewVolume,
|
|
|
55645
55517
|
{
|
|
55646
55518
|
const invModelViewProjectionMatrix = new Numbers_Matrix4 ();
|
|
55647
55519
|
|
|
55648
|
-
return function (
|
|
55520
|
+
return function (winX, winY, winZ, modelViewMatrix, projectionMatrix, viewport, point)
|
|
55649
55521
|
{
|
|
55650
|
-
return this .unProjectPointMatrix (
|
|
55522
|
+
return this .unProjectPointMatrix (winX, winY, winZ, invModelViewProjectionMatrix .assign (modelViewMatrix) .multRight (projectionMatrix) .inverse (), viewport, point);
|
|
55651
55523
|
};
|
|
55652
55524
|
})(),
|
|
55653
55525
|
unProjectPointMatrix: (() =>
|
|
55654
55526
|
{
|
|
55655
55527
|
const vin = new Numbers_Vector4 ();
|
|
55656
55528
|
|
|
55657
|
-
return function (
|
|
55529
|
+
return function (winX, winY, winZ, invModelViewProjectionMatrix, viewport, point)
|
|
55658
55530
|
{
|
|
55659
55531
|
// Transformation of normalized coordinates between -1 and 1
|
|
55660
|
-
vin .set ((
|
|
55661
|
-
(
|
|
55662
|
-
|
|
55532
|
+
vin .set ((winX - viewport [0]) / viewport [2] * 2 - 1,
|
|
55533
|
+
(winY - viewport [1]) / viewport [3] * 2 - 1,
|
|
55534
|
+
winZ * 2 - 1,
|
|
55663
55535
|
1);
|
|
55664
55536
|
|
|
55665
55537
|
//Objects coordinates
|
|
@@ -55674,9 +55546,9 @@ Object .assign (ViewVolume,
|
|
|
55674
55546
|
{
|
|
55675
55547
|
const invModelViewProjectionMatrix = new Numbers_Matrix4 ();
|
|
55676
55548
|
|
|
55677
|
-
return function (
|
|
55549
|
+
return function (winX, winY, modelViewMatrix, projectionMatrix, viewport, result)
|
|
55678
55550
|
{
|
|
55679
|
-
return this .unProjectRayMatrix (
|
|
55551
|
+
return this .unProjectRayMatrix (winX, winY, invModelViewProjectionMatrix .assign (modelViewMatrix) .multRight (projectionMatrix) .inverse (), viewport, result);
|
|
55680
55552
|
};
|
|
55681
55553
|
})(),
|
|
55682
55554
|
unProjectRayMatrix: (() =>
|
|
@@ -55685,10 +55557,10 @@ Object .assign (ViewVolume,
|
|
|
55685
55557
|
near = new Numbers_Vector3 (),
|
|
55686
55558
|
far = new Numbers_Vector3 ();
|
|
55687
55559
|
|
|
55688
|
-
return function (
|
|
55560
|
+
return function (winX, winY, invModelViewProjectionMatrix, viewport, result)
|
|
55689
55561
|
{
|
|
55690
|
-
ViewVolume .unProjectPointMatrix (
|
|
55691
|
-
ViewVolume .unProjectPointMatrix (
|
|
55562
|
+
ViewVolume .unProjectPointMatrix (winX, winY, 0.0, invModelViewProjectionMatrix, viewport, near);
|
|
55563
|
+
ViewVolume .unProjectPointMatrix (winX, winY, 0.9, invModelViewProjectionMatrix, viewport, far);
|
|
55692
55564
|
|
|
55693
55565
|
return result .setPoints (near, far);
|
|
55694
55566
|
};
|
|
@@ -55697,7 +55569,7 @@ Object .assign (ViewVolume,
|
|
|
55697
55569
|
{
|
|
55698
55570
|
const vin = new Numbers_Vector4 ();
|
|
55699
55571
|
|
|
55700
|
-
return function (point, modelViewMatrix, projectionMatrix, viewport,
|
|
55572
|
+
return function (point, modelViewMatrix, projectionMatrix, viewport, vOut)
|
|
55701
55573
|
{
|
|
55702
55574
|
if (point .length === 4)
|
|
55703
55575
|
vin .assign (point);
|
|
@@ -55708,7 +55580,7 @@ Object .assign (ViewVolume,
|
|
|
55708
55580
|
|
|
55709
55581
|
const d = 1 / (2 * vin .w);
|
|
55710
55582
|
|
|
55711
|
-
return
|
|
55583
|
+
return vOut .set ((vin .x * d + 0.5) * viewport [2] + viewport [0],
|
|
55712
55584
|
(vin .y * d + 0.5) * viewport [3] + viewport [1],
|
|
55713
55585
|
(vin .z * d + 0.5));
|
|
55714
55586
|
};
|
|
@@ -55717,7 +55589,7 @@ Object .assign (ViewVolume,
|
|
|
55717
55589
|
{
|
|
55718
55590
|
const vin = new Numbers_Vector4 ();
|
|
55719
55591
|
|
|
55720
|
-
return function (point, modelViewProjectionMatrix, viewport,
|
|
55592
|
+
return function (point, modelViewProjectionMatrix, viewport, vOut)
|
|
55721
55593
|
{
|
|
55722
55594
|
if (point .length === 4)
|
|
55723
55595
|
vin .assign (point);
|
|
@@ -55728,7 +55600,7 @@ Object .assign (ViewVolume,
|
|
|
55728
55600
|
|
|
55729
55601
|
const d = 1 / (2 * vin .w);
|
|
55730
55602
|
|
|
55731
|
-
return
|
|
55603
|
+
return vOut .set ((vin .x * d + 0.5) * viewport [2] + viewport [0],
|
|
55732
55604
|
(vin .y * d + 0.5) * viewport [3] + viewport [1],
|
|
55733
55605
|
(vin .z * d + 0.5));
|
|
55734
55606
|
};
|
|
@@ -56510,11 +56382,11 @@ Object .assign (Line3 .prototype,
|
|
|
56510
56382
|
if (v < 0 || u + v > 1)
|
|
56511
56383
|
return false;
|
|
56512
56384
|
|
|
56513
|
-
//let
|
|
56385
|
+
//let u = edge2 .dot (qvec) * inv_det;
|
|
56514
56386
|
|
|
56515
|
-
uvt .u = u;
|
|
56516
|
-
uvt .v =
|
|
56517
|
-
uvt .t =
|
|
56387
|
+
uvt .u = 1 - u - v;
|
|
56388
|
+
uvt .v = u;
|
|
56389
|
+
uvt .t = v;
|
|
56518
56390
|
|
|
56519
56391
|
return true;
|
|
56520
56392
|
};
|
|
@@ -56696,53 +56568,51 @@ function X3DRenderObject (executionContext)
|
|
|
56696
56568
|
{
|
|
56697
56569
|
const browser = executionContext .getBrowser ();
|
|
56698
56570
|
|
|
56699
|
-
this .renderKey
|
|
56700
|
-
this .renderAndGlobalLightsKey
|
|
56701
|
-
this .renderCount
|
|
56702
|
-
this .view
|
|
56703
|
-
this .viewVolumes
|
|
56704
|
-
this .projectionMatrix
|
|
56705
|
-
this .modelViewMatrix
|
|
56706
|
-
this .viewMatrix
|
|
56707
|
-
this .cameraSpaceMatrix
|
|
56708
|
-
this .viewportArray
|
|
56709
|
-
this .projectionMatrixArray
|
|
56710
|
-
this .viewMatrixArray
|
|
56711
|
-
this .cameraSpaceMatrixArray
|
|
56712
|
-
this .hitRay
|
|
56713
|
-
this .sensors
|
|
56714
|
-
this .viewpointGroups
|
|
56715
|
-
this .lights
|
|
56716
|
-
this .globalLightsKeys
|
|
56717
|
-
this .globalLights
|
|
56718
|
-
this .localObjectsKeys
|
|
56719
|
-
this .localObjects
|
|
56720
|
-
this .globalShadows
|
|
56721
|
-
this .globalShadow
|
|
56722
|
-
this .localShadows
|
|
56723
|
-
this .localFogs
|
|
56724
|
-
this .layouts
|
|
56725
|
-
this .humanoids
|
|
56726
|
-
this .generatedCubeMapTextures
|
|
56727
|
-
this .collisions
|
|
56728
|
-
this .collisionTime
|
|
56729
|
-
this .numPointingShapes
|
|
56730
|
-
this .numCollisionShapes
|
|
56731
|
-
this .numShadowShapes
|
|
56732
|
-
this .numOpaqueShapes
|
|
56733
|
-
this .numTransparentShapes
|
|
56734
|
-
this .pointingShapes
|
|
56735
|
-
this .collisionShapes
|
|
56736
|
-
this .activeCollisions
|
|
56737
|
-
this .shadowShapes
|
|
56738
|
-
this .opaqueShapes
|
|
56739
|
-
this .transparentShapes
|
|
56740
|
-
this .
|
|
56741
|
-
this .
|
|
56742
|
-
this .
|
|
56743
|
-
this .
|
|
56744
|
-
this .speed = 0;
|
|
56745
|
-
this .depthBuffer = new Rendering_TextureBuffer (browser, DEPTH_BUFFER_SIZE, DEPTH_BUFFER_SIZE, true);
|
|
56571
|
+
this .renderKey = "";
|
|
56572
|
+
this .renderAndGlobalLightsKey = "";
|
|
56573
|
+
this .renderCount = 0;
|
|
56574
|
+
this .view = null;
|
|
56575
|
+
this .viewVolumes = [ ];
|
|
56576
|
+
this .projectionMatrix = new Utility_MatrixStack (Numbers_Matrix4);
|
|
56577
|
+
this .modelViewMatrix = new Utility_MatrixStack (Numbers_Matrix4);
|
|
56578
|
+
this .viewMatrix = new Utility_MatrixStack (Numbers_Matrix4);
|
|
56579
|
+
this .cameraSpaceMatrix = new Utility_MatrixStack (Numbers_Matrix4);
|
|
56580
|
+
this .viewportArray = new Int32Array (4);
|
|
56581
|
+
this .projectionMatrixArray = new Float32Array (16);
|
|
56582
|
+
this .viewMatrixArray = new Float32Array (16);
|
|
56583
|
+
this .cameraSpaceMatrixArray = new Float32Array (16);
|
|
56584
|
+
this .hitRay = new Geometry_Line3 (Numbers_Vector3 .Zero, Numbers_Vector3 .Zero);
|
|
56585
|
+
this .sensors = [[ ]];
|
|
56586
|
+
this .viewpointGroups = [ ];
|
|
56587
|
+
this .lights = [ ];
|
|
56588
|
+
this .globalLightsKeys = [ ];
|
|
56589
|
+
this .globalLights = [ ];
|
|
56590
|
+
this .localObjectsKeys = [ ];
|
|
56591
|
+
this .localObjects = [ ];
|
|
56592
|
+
this .globalShadows = [ false ];
|
|
56593
|
+
this .globalShadow = false;
|
|
56594
|
+
this .localShadows = [ false ];
|
|
56595
|
+
this .localFogs = [ null ];
|
|
56596
|
+
this .layouts = [ ];
|
|
56597
|
+
this .humanoids = [ null ];
|
|
56598
|
+
this .generatedCubeMapTextures = [ ];
|
|
56599
|
+
this .collisions = [ ];
|
|
56600
|
+
this .collisionTime = new Time_StopWatch ();
|
|
56601
|
+
this .numPointingShapes = 0;
|
|
56602
|
+
this .numCollisionShapes = 0;
|
|
56603
|
+
this .numShadowShapes = 0;
|
|
56604
|
+
this .numOpaqueShapes = 0;
|
|
56605
|
+
this .numTransparentShapes = 0;
|
|
56606
|
+
this .pointingShapes = [ ];
|
|
56607
|
+
this .collisionShapes = [ ];
|
|
56608
|
+
this .activeCollisions = [ ];
|
|
56609
|
+
this .shadowShapes = [ ];
|
|
56610
|
+
this .opaqueShapes = [ ];
|
|
56611
|
+
this .transparentShapes = [ ];
|
|
56612
|
+
this .transparencySorter = new Algorithms_MergeSort (this .transparentShapes, (a, b) => a .distance < b .distance);
|
|
56613
|
+
this .transmission = false;
|
|
56614
|
+
this .speed = 0;
|
|
56615
|
+
this .depthBuffer = new Rendering_TextureBuffer (browser, DEPTH_BUFFER_SIZE, DEPTH_BUFFER_SIZE, true);
|
|
56746
56616
|
}
|
|
56747
56617
|
|
|
56748
56618
|
Object .assign (X3DRenderObject .prototype,
|
|
@@ -56841,7 +56711,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
56841
56711
|
|
|
56842
56712
|
return function ()
|
|
56843
56713
|
{
|
|
56844
|
-
renderCount >>>= 0; //
|
|
56714
|
+
renderCount >>>= 0; // convert to uint
|
|
56845
56715
|
this .renderCount = ++ renderCount;
|
|
56846
56716
|
}
|
|
56847
56717
|
})(),
|
|
@@ -57060,31 +56930,9 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57060
56930
|
{
|
|
57061
56931
|
return this .transparentShapes;
|
|
57062
56932
|
},
|
|
57063
|
-
|
|
57064
|
-
{
|
|
57065
|
-
return this .transmissionOpaqueShapes .length;
|
|
57066
|
-
},
|
|
57067
|
-
setNumTransmissionOpaqueShapes (value)
|
|
57068
|
-
{
|
|
57069
|
-
// Needed for StaticGroup.
|
|
57070
|
-
this .transmissionOpaqueShapes .length = value;
|
|
57071
|
-
},
|
|
57072
|
-
getTransmissionOpaqueShapes ()
|
|
57073
|
-
{
|
|
57074
|
-
return this .transmissionOpaqueShapes;
|
|
57075
|
-
},
|
|
57076
|
-
getNumTransmissionTransparentShapes ()
|
|
57077
|
-
{
|
|
57078
|
-
return this .transmissionTransparentShapes .length;
|
|
57079
|
-
},
|
|
57080
|
-
setNumTransmissionTransparentShapes (value)
|
|
57081
|
-
{
|
|
57082
|
-
// Needed for StaticGroup.
|
|
57083
|
-
this .transmissionTransparentShapes .length = value;
|
|
57084
|
-
},
|
|
57085
|
-
getTransmissionTransparentShapes ()
|
|
56933
|
+
isTransmission ()
|
|
57086
56934
|
{
|
|
57087
|
-
return this .
|
|
56935
|
+
return this .transmission;
|
|
57088
56936
|
},
|
|
57089
56937
|
constrainTranslation (translation, stepBack)
|
|
57090
56938
|
{
|
|
@@ -57170,7 +57018,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57170
57018
|
cameraSpaceProjectionMatrix .multRight (projectionMatrix);
|
|
57171
57019
|
cameraSpaceProjectionMatrix .multLeft (viewpoint .getCameraSpaceMatrix ());
|
|
57172
57020
|
|
|
57173
|
-
this .getProjectionMatrix () .
|
|
57021
|
+
this .getProjectionMatrix () .push (cameraSpaceProjectionMatrix);
|
|
57174
57022
|
|
|
57175
57023
|
const depth = this .getDepth (projectionMatrix);
|
|
57176
57024
|
|
|
@@ -57218,12 +57066,12 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57218
57066
|
}
|
|
57219
57067
|
case Rendering_TraverseType .COLLISION:
|
|
57220
57068
|
{
|
|
57221
|
-
// Collect for collide and
|
|
57069
|
+
// Collect for collide and gravitate
|
|
57222
57070
|
this .numCollisionShapes = 0;
|
|
57223
57071
|
|
|
57224
57072
|
callback .call (group, type, this);
|
|
57225
57073
|
this .collide ();
|
|
57226
|
-
this .
|
|
57074
|
+
this .gravitate ();
|
|
57227
57075
|
break;
|
|
57228
57076
|
}
|
|
57229
57077
|
case Rendering_TraverseType .SHADOW:
|
|
@@ -57240,10 +57088,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57240
57088
|
this .numOpaqueShapes = 0;
|
|
57241
57089
|
this .numTransparentShapes = 0;
|
|
57242
57090
|
|
|
57243
|
-
this .transmission = false;
|
|
57244
|
-
this .transmissionOpaqueShapes .length = 0;
|
|
57245
|
-
this .transmissionTransparentShapes .length = 0;
|
|
57246
|
-
|
|
57247
57091
|
this .setGlobalFog (this .getFog ());
|
|
57248
57092
|
|
|
57249
57093
|
callback .call (group, type, this);
|
|
@@ -57290,9 +57134,9 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57290
57134
|
const pointingContext = this .pointingShapes [num];
|
|
57291
57135
|
|
|
57292
57136
|
pointingContext .modelViewMatrix .set (modelViewMatrix);
|
|
57293
|
-
pointingContext .shapeNode = shapeNode;
|
|
57294
57137
|
pointingContext .scissor = viewVolume .getScissor ();
|
|
57295
57138
|
pointingContext .humanoidNode = this .humanoids .at (-1);
|
|
57139
|
+
pointingContext .shapeNode = shapeNode;
|
|
57296
57140
|
|
|
57297
57141
|
// Clip planes & sensors
|
|
57298
57142
|
|
|
@@ -57389,9 +57233,9 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57389
57233
|
const depthContext = this .shadowShapes [num];
|
|
57390
57234
|
|
|
57391
57235
|
depthContext .modelViewMatrix .set (modelViewMatrix);
|
|
57392
|
-
depthContext .shapeNode = shapeNode;
|
|
57393
57236
|
depthContext .scissor = viewVolume .getScissor ();
|
|
57394
57237
|
depthContext .humanoidNode = this .humanoids .at (-1);
|
|
57238
|
+
depthContext .shapeNode = shapeNode;
|
|
57395
57239
|
|
|
57396
57240
|
// Clip planes
|
|
57397
57241
|
|
|
@@ -57432,11 +57276,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57432
57276
|
var renderContext = this .transparentShapes [num];
|
|
57433
57277
|
|
|
57434
57278
|
renderContext .distance = bboxCenter .z;
|
|
57435
|
-
|
|
57436
|
-
if (shapeNode .isTransmission ())
|
|
57437
|
-
this .transmission = true;
|
|
57438
|
-
else
|
|
57439
|
-
this .transmissionTransparentShapes .push (renderContext);
|
|
57440
57279
|
}
|
|
57441
57280
|
else
|
|
57442
57281
|
{
|
|
@@ -57446,20 +57285,17 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57446
57285
|
this .opaqueShapes .push (this .createRenderContext (false));
|
|
57447
57286
|
|
|
57448
57287
|
var renderContext = this .opaqueShapes [num];
|
|
57449
|
-
|
|
57450
|
-
if (shapeNode .isTransmission ())
|
|
57451
|
-
this .transmission = true;
|
|
57452
|
-
else
|
|
57453
|
-
this .transmissionOpaqueShapes .push (renderContext);
|
|
57454
57288
|
}
|
|
57455
57289
|
|
|
57290
|
+
this .transmission ||= shapeNode .isTransmission ();
|
|
57291
|
+
|
|
57456
57292
|
renderContext .modelViewMatrix .set (modelViewMatrix);
|
|
57457
57293
|
renderContext .scissor .assign (viewVolume .getScissor ());
|
|
57458
|
-
renderContext .shadows
|
|
57459
|
-
renderContext .fogNode
|
|
57460
|
-
renderContext .
|
|
57461
|
-
renderContext .
|
|
57462
|
-
renderContext .
|
|
57294
|
+
renderContext .shadows = this .localShadows .at (-1);
|
|
57295
|
+
renderContext .fogNode = this .localFogs .at (-1);
|
|
57296
|
+
renderContext .humanoidNode = this .humanoids .at (-1);
|
|
57297
|
+
renderContext .shapeNode = shapeNode;
|
|
57298
|
+
renderContext .appearanceNode = shapeNode .getAppearance ();
|
|
57463
57299
|
|
|
57464
57300
|
// Clip planes and local lights
|
|
57465
57301
|
|
|
@@ -57492,7 +57328,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57492
57328
|
const
|
|
57493
57329
|
browser = this .getBrowser (),
|
|
57494
57330
|
gl = browser .getContext (),
|
|
57495
|
-
viewport = this .
|
|
57331
|
+
viewport = this .viewVolumes .at (-1) .getViewport (),
|
|
57496
57332
|
[x, y] = browser .getPointer ();
|
|
57497
57333
|
|
|
57498
57334
|
// Configure depth shaders.
|
|
@@ -57607,7 +57443,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57607
57443
|
collision .set_active (true);
|
|
57608
57444
|
};
|
|
57609
57445
|
})(),
|
|
57610
|
-
|
|
57446
|
+
gravitate: (() =>
|
|
57611
57447
|
{
|
|
57612
57448
|
const
|
|
57613
57449
|
projectionMatrix = new Numbers_Matrix4 (),
|
|
@@ -57641,14 +57477,14 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57641
57477
|
avatarHeight = navigationInfo .getAvatarHeight (),
|
|
57642
57478
|
stepHeight = navigationInfo .getStepHeight ();
|
|
57643
57479
|
|
|
57644
|
-
// Reshape viewpoint for
|
|
57480
|
+
// Reshape viewpoint for gravitate.
|
|
57645
57481
|
|
|
57646
57482
|
Geometry_Camera .ortho (-collisionRadius,
|
|
57647
57483
|
collisionRadius,
|
|
57648
57484
|
-collisionRadius,
|
|
57649
57485
|
collisionRadius,
|
|
57650
57486
|
nearValue,
|
|
57651
|
-
Math .max (collisionRadius
|
|
57487
|
+
Math .max (collisionRadius, avatarHeight) * 2,
|
|
57652
57488
|
projectionMatrix);
|
|
57653
57489
|
|
|
57654
57490
|
// Transform viewpoint to look down the up vector.
|
|
@@ -57665,13 +57501,13 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57665
57501
|
cameraSpaceProjectionMatrix .multRight (projectionMatrix);
|
|
57666
57502
|
cameraSpaceProjectionMatrix .multLeft (viewpoint .getCameraSpaceMatrix ());
|
|
57667
57503
|
|
|
57668
|
-
this .getProjectionMatrix () .
|
|
57504
|
+
this .getProjectionMatrix () .push (cameraSpaceProjectionMatrix);
|
|
57669
57505
|
|
|
57670
57506
|
let distance = -this .getDepth (projectionMatrix);
|
|
57671
57507
|
|
|
57672
57508
|
this .getProjectionMatrix () .pop ();
|
|
57673
57509
|
|
|
57674
|
-
//
|
|
57510
|
+
// gravitate or step up.
|
|
57675
57511
|
|
|
57676
57512
|
distance -= avatarHeight;
|
|
57677
57513
|
|
|
@@ -57679,7 +57515,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57679
57515
|
|
|
57680
57516
|
if (distance > 0)
|
|
57681
57517
|
{
|
|
57682
|
-
//
|
|
57518
|
+
// gravitate and fall down the to the floor.
|
|
57683
57519
|
|
|
57684
57520
|
const currentFrameRate = this .speed ? browser .getCurrentFrameRate () : 1000000;
|
|
57685
57521
|
|
|
@@ -57735,7 +57571,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57735
57571
|
const
|
|
57736
57572
|
browser = this .getBrowser (),
|
|
57737
57573
|
gl = browser .getContext (),
|
|
57738
|
-
viewport = this .
|
|
57574
|
+
viewport = this .viewVolumes .at (-1) .getViewport ();
|
|
57739
57575
|
|
|
57740
57576
|
// Configure depth shaders.
|
|
57741
57577
|
|
|
@@ -57789,7 +57625,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57789
57625
|
gl = browser .getContext (),
|
|
57790
57626
|
frameBuffers = this .getFrameBuffers (),
|
|
57791
57627
|
numFrameBuffers = frameBuffers .length,
|
|
57792
|
-
viewport = this .
|
|
57628
|
+
viewport = this .viewVolumes .at (-1) .getViewport (),
|
|
57793
57629
|
lights = this .lights,
|
|
57794
57630
|
globalLightsKeys = this .globalLightsKeys,
|
|
57795
57631
|
globalLights = this .globalLights,
|
|
@@ -57812,14 +57648,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57812
57648
|
generatedCubeMapTexture .renderTexture (this);
|
|
57813
57649
|
}
|
|
57814
57650
|
|
|
57815
|
-
// Set up shadow matrix for all lights, and matrix for all projective textures.
|
|
57816
|
-
|
|
57817
|
-
if (headlight)
|
|
57818
|
-
browser .getHeadlight () .setGlobalVariables (this);
|
|
57819
|
-
|
|
57820
|
-
for (const light of lights)
|
|
57821
|
-
light .setGlobalVariables (this);
|
|
57822
|
-
|
|
57823
57651
|
this .renderAndGlobalLightsKey = `.${this .renderKey}.${globalLightsKeys .sort () .join ("")}.`;
|
|
57824
57652
|
this .globalShadow = globalShadows .at (-1);
|
|
57825
57653
|
|
|
@@ -57837,14 +57665,23 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57837
57665
|
|
|
57838
57666
|
this .viewportArray .set (viewport);
|
|
57839
57667
|
|
|
57840
|
-
if (this .view)
|
|
57668
|
+
if (this .view && this .isActive ())
|
|
57841
57669
|
{
|
|
57842
|
-
this .projectionMatrixArray
|
|
57843
|
-
|
|
57844
|
-
|
|
57670
|
+
this .projectionMatrixArray .set (this .view .projectionMatrix);
|
|
57671
|
+
|
|
57672
|
+
if (browser .getBrowserOption ("XRMovementControl") === "VIEWPOINT")
|
|
57673
|
+
{
|
|
57674
|
+
this .cameraSpaceMatrixArray .set (this .getCameraSpaceMatrix () .get ());
|
|
57675
|
+
this .viewMatrixArray .set (this .getViewMatrix () .get ());
|
|
57845
57676
|
|
|
57846
|
-
|
|
57847
|
-
|
|
57677
|
+
Numbers_Matrix4 .prototype .multLeft (this .cameraSpaceMatrixArray, this .view .inverse);
|
|
57678
|
+
Numbers_Matrix4 .prototype .multRight (this .viewMatrixArray, this .view .matrix);
|
|
57679
|
+
}
|
|
57680
|
+
else
|
|
57681
|
+
{
|
|
57682
|
+
this .cameraSpaceMatrixArray .set (this .view .cameraSpaceMatrix);
|
|
57683
|
+
this .viewMatrixArray .set (this .view .viewMatrix);
|
|
57684
|
+
}
|
|
57848
57685
|
}
|
|
57849
57686
|
else
|
|
57850
57687
|
{
|
|
@@ -57853,22 +57690,29 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57853
57690
|
this .viewMatrixArray .set (this .getViewMatrix () .get ());
|
|
57854
57691
|
}
|
|
57855
57692
|
|
|
57693
|
+
// Set up shadow matrix for all lights, and matrix for all projective textures.
|
|
57694
|
+
|
|
57695
|
+
if (headlight)
|
|
57696
|
+
browser .getHeadlight () .setGlobalVariables (this);
|
|
57697
|
+
|
|
57698
|
+
for (const light of lights)
|
|
57699
|
+
light .setGlobalVariables (this);
|
|
57700
|
+
|
|
57701
|
+
// Draw shapes.
|
|
57702
|
+
|
|
57856
57703
|
if (independent && this .transmission)
|
|
57857
57704
|
{
|
|
57858
57705
|
// Transmission
|
|
57859
57706
|
|
|
57860
|
-
const
|
|
57861
|
-
transmissionBuffer = browser .getTransmissionBuffer (),
|
|
57862
|
-
transmissionOpaqueShapes = this .transmissionOpaqueShapes,
|
|
57863
|
-
transmissionTransparentShapes = this .transmissionTransparentShapes,
|
|
57864
|
-
numTransmissionOpaqueShapes = transmissionOpaqueShapes .length,
|
|
57865
|
-
numTransmissionTransparentShapes = transmissionTransparentShapes .length;
|
|
57707
|
+
const transmissionBuffer = browser .getTransmissionBuffer ();
|
|
57866
57708
|
|
|
57867
|
-
this .drawShapes (gl, browser, transmissionBuffer, gl .COLOR_BUFFER_BIT, false, viewport,
|
|
57709
|
+
this .drawShapes (gl, browser, transmissionBuffer, gl .COLOR_BUFFER_BIT, false, viewport, this .opaqueShapes, this .numOpaqueShapes, this .transparentShapes, this .numTransparentShapes, this .transparencySorter);
|
|
57868
57710
|
|
|
57869
57711
|
gl .bindTexture (gl .TEXTURE_2D, transmissionBuffer .getColorTexture ());
|
|
57870
57712
|
gl .generateMipmap (gl .TEXTURE_2D);
|
|
57871
57713
|
|
|
57714
|
+
this .transmission = false;
|
|
57715
|
+
|
|
57872
57716
|
// Draw with sorted blend or OIT.
|
|
57873
57717
|
|
|
57874
57718
|
this .drawShapes (gl, browser, frameBuffer, 0, frameBuffer .getOIT (), viewport, this .opaqueShapes, this .numOpaqueShapes, this .transparentShapes, this .numTransparentShapes, this .transparencySorter);
|
|
@@ -57908,7 +57752,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57908
57752
|
globalShadows .length = 1;
|
|
57909
57753
|
generatedCubeMapTextures .length = 0;
|
|
57910
57754
|
},
|
|
57911
|
-
drawShapes (gl, browser, frameBuffer,
|
|
57755
|
+
drawShapes (gl, browser, frameBuffer, clearBits, oit, viewport, opaqueShapes, numOpaqueShapes, transparentShapes, numTransparentShapes, transparencySorter)
|
|
57912
57756
|
{
|
|
57913
57757
|
frameBuffer .bind ();
|
|
57914
57758
|
|
|
@@ -57922,7 +57766,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57922
57766
|
this .advanceRenderCount ();
|
|
57923
57767
|
|
|
57924
57768
|
gl .clearColor (0, 0, 0, 0);
|
|
57925
|
-
gl .clear (gl .DEPTH_BUFFER_BIT |
|
|
57769
|
+
gl .clear (gl .DEPTH_BUFFER_BIT | clearBits);
|
|
57926
57770
|
gl .blendFuncSeparate (gl .SRC_ALPHA, gl .ONE_MINUS_SRC_ALPHA, gl .ONE, gl .ONE_MINUS_SRC_ALPHA);
|
|
57927
57771
|
|
|
57928
57772
|
this .getBackground () .display (gl, this);
|
|
@@ -57973,7 +57817,9 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57973
57817
|
|
|
57974
57818
|
function X3DRenderObject_assign (lhs, rhs)
|
|
57975
57819
|
{
|
|
57976
|
-
|
|
57820
|
+
const length = rhs .length;
|
|
57821
|
+
|
|
57822
|
+
for (let i = 0; i < length; ++ i)
|
|
57977
57823
|
lhs [i] = rhs [i];
|
|
57978
57824
|
|
|
57979
57825
|
lhs .length = length;
|
|
@@ -59249,12 +59095,7 @@ const Group_default_ = Group;
|
|
|
59249
59095
|
|
|
59250
59096
|
|
|
59251
59097
|
|
|
59252
|
-
|
|
59253
|
-
{
|
|
59254
|
-
TELEPORT: true,
|
|
59255
|
-
LINEAR: true,
|
|
59256
|
-
ANIMATE: true,
|
|
59257
|
-
};
|
|
59098
|
+
|
|
59258
59099
|
|
|
59259
59100
|
function NavigationInfo (executionContext)
|
|
59260
59101
|
{
|
|
@@ -59269,7 +59110,7 @@ function NavigationInfo (executionContext)
|
|
|
59269
59110
|
|
|
59270
59111
|
this ._avatarSize .setUnit ("length");
|
|
59271
59112
|
this ._speed .setUnit ("speed");
|
|
59272
|
-
this ._visibilityLimit .setUnit ("
|
|
59113
|
+
this ._visibilityLimit .setUnit ("length");
|
|
59273
59114
|
}
|
|
59274
59115
|
|
|
59275
59116
|
Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBindableNode .prototype),
|
|
@@ -59280,12 +59121,14 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59280
59121
|
|
|
59281
59122
|
this ._type .addInterest ("set_type__", this);
|
|
59282
59123
|
this ._headlight .addInterest ("set_headlight__", this);
|
|
59124
|
+
this ._visibilityLimit .addInterest ("set_visibilityLimit__", this);
|
|
59283
59125
|
this ._transitionStart .addInterest ("set_transitionStart__", this);
|
|
59284
59126
|
this ._transitionComplete .addInterest ("set_transitionComplete__", this);
|
|
59285
59127
|
this ._isBound .addInterest ("set_isBound__", this);
|
|
59286
59128
|
|
|
59287
59129
|
this .set_type__ ();
|
|
59288
59130
|
this .set_headlight__ ();
|
|
59131
|
+
this .set_visibilityLimit__ ();
|
|
59289
59132
|
},
|
|
59290
59133
|
getViewer ()
|
|
59291
59134
|
{
|
|
@@ -59319,30 +59162,31 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59319
59162
|
{
|
|
59320
59163
|
const nearValue = this .getCollisionRadius ();
|
|
59321
59164
|
|
|
59322
|
-
|
|
59323
|
-
return 1e-5;
|
|
59324
|
-
|
|
59325
|
-
else
|
|
59326
|
-
return nearValue / 2;
|
|
59165
|
+
return nearValue === 0 ? 1e-5 : nearValue / 2;
|
|
59327
59166
|
},
|
|
59328
59167
|
getFarValue (viewpoint)
|
|
59329
59168
|
{
|
|
59330
|
-
return this .
|
|
59331
|
-
? this ._visibilityLimit .getValue ()
|
|
59332
|
-
: viewpoint .getMaxFarValue ();
|
|
59169
|
+
return this .visibilityLimit || viewpoint .getMaxFarValue ();
|
|
59333
59170
|
},
|
|
59334
|
-
getTransitionType ()
|
|
59171
|
+
getTransitionType: (function ()
|
|
59335
59172
|
{
|
|
59336
|
-
|
|
59337
|
-
|
|
59338
|
-
|
|
59173
|
+
const TransitionTypes = new Set ([
|
|
59174
|
+
"TELEPORT",
|
|
59175
|
+
"LINEAR",
|
|
59176
|
+
"ANIMATE",
|
|
59177
|
+
]);
|
|
59339
59178
|
|
|
59340
|
-
|
|
59341
|
-
|
|
59342
|
-
|
|
59179
|
+
return function ()
|
|
59180
|
+
{
|
|
59181
|
+
for (const value of this ._transitionType)
|
|
59182
|
+
{
|
|
59183
|
+
if (TransitionTypes .has (value))
|
|
59184
|
+
return value;
|
|
59185
|
+
}
|
|
59343
59186
|
|
|
59344
|
-
|
|
59345
|
-
|
|
59187
|
+
return "LINEAR";
|
|
59188
|
+
};
|
|
59189
|
+
})(),
|
|
59346
59190
|
set_type__ ()
|
|
59347
59191
|
{
|
|
59348
59192
|
// Determine active viewer.
|
|
@@ -59383,7 +59227,7 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59383
59227
|
noneViewer = false,
|
|
59384
59228
|
lookAt = false;
|
|
59385
59229
|
|
|
59386
|
-
if (!
|
|
59230
|
+
if (!this ._type .length)
|
|
59387
59231
|
{
|
|
59388
59232
|
examineViewer = true;
|
|
59389
59233
|
walkViewer = true;
|
|
@@ -59425,7 +59269,7 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59425
59269
|
lookAt = true;
|
|
59426
59270
|
break;
|
|
59427
59271
|
default:
|
|
59428
|
-
// Some
|
|
59272
|
+
// Some strings lead to:
|
|
59429
59273
|
examineViewer = true;
|
|
59430
59274
|
continue;
|
|
59431
59275
|
}
|
|
@@ -59461,9 +59305,13 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59461
59305
|
else
|
|
59462
59306
|
this .enable = Function .prototype;
|
|
59463
59307
|
},
|
|
59308
|
+
set_visibilityLimit__ ()
|
|
59309
|
+
{
|
|
59310
|
+
this .visibilityLimit = Math .max (this ._visibilityLimit .getValue (), 0);
|
|
59311
|
+
},
|
|
59464
59312
|
set_transitionStart__ ()
|
|
59465
59313
|
{
|
|
59466
|
-
if (!
|
|
59314
|
+
if (!this ._transitionActive .getValue ())
|
|
59467
59315
|
this ._transitionActive = true;
|
|
59468
59316
|
},
|
|
59469
59317
|
set_transitionComplete__ ()
|
|
@@ -59489,7 +59337,7 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59489
59337
|
|
|
59490
59338
|
const headlight = this .getBrowser () .getHeadlight ();
|
|
59491
59339
|
|
|
59492
|
-
renderObject .getGlobalLights ()
|
|
59340
|
+
renderObject .getGlobalLights () .push (headlight);
|
|
59493
59341
|
renderObject .getGlobalLightsKeys () .push (headlight .lightNode .getLightKey ());
|
|
59494
59342
|
},
|
|
59495
59343
|
traverse (type, renderObject)
|
|
@@ -60385,42 +60233,43 @@ function X3DGeometryNode (executionContext)
|
|
|
60385
60233
|
this .planes [i] = new Geometry_Plane3 ();
|
|
60386
60234
|
}
|
|
60387
60235
|
|
|
60388
|
-
|
|
60236
|
+
class GeometryArray extends Array
|
|
60389
60237
|
{
|
|
60390
|
-
|
|
60391
|
-
// Array version runs faster, see BeyondGermany and TreasureIsland.
|
|
60392
|
-
value ()
|
|
60393
|
-
{
|
|
60394
|
-
// return new Fields .MFFloat ();
|
|
60238
|
+
#typedArray = new Float32Array ();
|
|
60395
60239
|
|
|
60396
|
-
|
|
60397
|
-
|
|
60398
|
-
|
|
60240
|
+
assign (value)
|
|
60241
|
+
{
|
|
60242
|
+
const length = value .length;
|
|
60399
60243
|
|
|
60400
|
-
|
|
60401
|
-
|
|
60402
|
-
const length = value .length;
|
|
60244
|
+
for (let i = 0; i < length; ++ i)
|
|
60245
|
+
this [i] = value [i];
|
|
60403
60246
|
|
|
60404
|
-
|
|
60405
|
-
|
|
60247
|
+
this .length = length;
|
|
60248
|
+
}
|
|
60406
60249
|
|
|
60407
|
-
|
|
60408
|
-
|
|
60250
|
+
getValue ()
|
|
60251
|
+
{
|
|
60252
|
+
return this .#typedArray;
|
|
60253
|
+
}
|
|
60409
60254
|
|
|
60410
|
-
|
|
60411
|
-
|
|
60412
|
-
|
|
60413
|
-
|
|
60255
|
+
shrinkToFit ()
|
|
60256
|
+
{
|
|
60257
|
+
if (this .length === this .#typedArray .length)
|
|
60258
|
+
this .#typedArray .set (this);
|
|
60259
|
+
else
|
|
60260
|
+
this .#typedArray = new Float32Array (this);
|
|
60261
|
+
}
|
|
60262
|
+
}
|
|
60414
60263
|
|
|
60415
|
-
|
|
60416
|
-
|
|
60417
|
-
|
|
60418
|
-
|
|
60419
|
-
|
|
60420
|
-
|
|
60421
|
-
|
|
60264
|
+
Object .defineProperty (X3DGeometryNode, "createArray",
|
|
60265
|
+
{
|
|
60266
|
+
// Function to select ether Array or MFFloat for color/normal/vertex arrays.
|
|
60267
|
+
// Array version runs faster, see BeyondGermany and TreasureIsland.
|
|
60268
|
+
value ()
|
|
60269
|
+
{
|
|
60270
|
+
// return new Fields .MFFloat ();
|
|
60422
60271
|
|
|
60423
|
-
return
|
|
60272
|
+
return new GeometryArray ();
|
|
60424
60273
|
},
|
|
60425
60274
|
})
|
|
60426
60275
|
|
|
@@ -60460,14 +60309,14 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60460
60309
|
|
|
60461
60310
|
this .set_live__ ();
|
|
60462
60311
|
},
|
|
60463
|
-
setGeometryType (value)
|
|
60464
|
-
{
|
|
60465
|
-
this .geometryType = value;
|
|
60466
|
-
},
|
|
60467
60312
|
getGeometryType ()
|
|
60468
60313
|
{
|
|
60469
60314
|
return this .geometryType;
|
|
60470
60315
|
},
|
|
60316
|
+
setGeometryType (value)
|
|
60317
|
+
{
|
|
60318
|
+
this .geometryType = value;
|
|
60319
|
+
},
|
|
60471
60320
|
setTransparent (value)
|
|
60472
60321
|
{
|
|
60473
60322
|
if (!!value !== this ._transparent .getValue ())
|
|
@@ -60510,22 +60359,22 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60510
60359
|
{
|
|
60511
60360
|
return Numbers_Matrix4 .Identity;
|
|
60512
60361
|
},
|
|
60513
|
-
setPrimitiveMode (value)
|
|
60514
|
-
{
|
|
60515
|
-
this .primitiveMode = value;
|
|
60516
|
-
},
|
|
60517
60362
|
getPrimitiveMode ()
|
|
60518
60363
|
{
|
|
60519
60364
|
return this .primitiveMode;
|
|
60520
60365
|
},
|
|
60521
|
-
|
|
60366
|
+
setPrimitiveMode (value)
|
|
60522
60367
|
{
|
|
60523
|
-
|
|
60368
|
+
this .primitiveMode = value;
|
|
60524
60369
|
},
|
|
60525
60370
|
setSolid (value)
|
|
60526
60371
|
{
|
|
60527
60372
|
this .solid = value;
|
|
60528
60373
|
},
|
|
60374
|
+
isSolid ()
|
|
60375
|
+
{
|
|
60376
|
+
return this .solid;
|
|
60377
|
+
},
|
|
60529
60378
|
setCCW (value)
|
|
60530
60379
|
{
|
|
60531
60380
|
const gl = this .getBrowser () .getContext ();
|
|
@@ -60548,33 +60397,14 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60548
60397
|
{
|
|
60549
60398
|
return this .attribBuffers;
|
|
60550
60399
|
},
|
|
60551
|
-
setFogDepths (value)
|
|
60552
|
-
{
|
|
60553
|
-
this .fogDepths .assign (value);
|
|
60554
|
-
},
|
|
60555
60400
|
getFogDepths ()
|
|
60556
60401
|
{
|
|
60557
60402
|
return this .fogDepths;
|
|
60558
60403
|
},
|
|
60559
|
-
setColors (value)
|
|
60560
|
-
{
|
|
60561
|
-
this .colors .assign (value);
|
|
60562
|
-
},
|
|
60563
60404
|
getColors ()
|
|
60564
60405
|
{
|
|
60565
60406
|
return this .colors;
|
|
60566
60407
|
},
|
|
60567
|
-
setMultiTexCoords (value)
|
|
60568
|
-
{
|
|
60569
|
-
const
|
|
60570
|
-
multiTexCoords = this .multiTexCoords,
|
|
60571
|
-
length = value .length;
|
|
60572
|
-
|
|
60573
|
-
for (let i = 0; i < length; ++ i)
|
|
60574
|
-
multiTexCoords [i] = value [i];
|
|
60575
|
-
|
|
60576
|
-
multiTexCoords .length = length;
|
|
60577
|
-
},
|
|
60578
60408
|
getMultiTexCoords ()
|
|
60579
60409
|
{
|
|
60580
60410
|
return this .multiTexCoords;
|
|
@@ -60607,26 +60437,14 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60607
60437
|
|
|
60608
60438
|
this .textureCoordinateNode .getTextureCoordinateMapping (this .textureCoordinateMapping);
|
|
60609
60439
|
},
|
|
60610
|
-
setTangents (value)
|
|
60611
|
-
{
|
|
60612
|
-
this .tangents .assign (value);
|
|
60613
|
-
},
|
|
60614
60440
|
getTangents ()
|
|
60615
60441
|
{
|
|
60616
60442
|
return this .tangents;
|
|
60617
60443
|
},
|
|
60618
|
-
setNormals (value)
|
|
60619
|
-
{
|
|
60620
|
-
this .normals .assign (value);
|
|
60621
|
-
},
|
|
60622
60444
|
getNormals ()
|
|
60623
60445
|
{
|
|
60624
60446
|
return this .normals;
|
|
60625
60447
|
},
|
|
60626
|
-
setVertices (value)
|
|
60627
|
-
{
|
|
60628
|
-
this .vertices .assign (value);
|
|
60629
|
-
},
|
|
60630
60448
|
getVertices ()
|
|
60631
60449
|
{
|
|
60632
60450
|
return this .vertices;
|
|
@@ -60720,28 +60538,35 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60720
60538
|
})(),
|
|
60721
60539
|
generateTangents ()
|
|
60722
60540
|
{
|
|
60723
|
-
|
|
60724
|
-
|
|
60541
|
+
try
|
|
60542
|
+
{
|
|
60543
|
+
if (this .geometryType < 2)
|
|
60544
|
+
return;
|
|
60725
60545
|
|
|
60726
|
-
|
|
60727
|
-
|
|
60546
|
+
if (!this .vertices .length)
|
|
60547
|
+
return;
|
|
60728
60548
|
|
|
60729
|
-
|
|
60730
|
-
|
|
60549
|
+
if (!MikkTSpace .isInitialized ())
|
|
60550
|
+
return void (MikkTSpace .initialize () .then (() => this .requestRebuild ()));
|
|
60731
60551
|
|
|
60732
|
-
|
|
60733
|
-
|
|
60734
|
-
|
|
60735
|
-
|
|
60736
|
-
|
|
60737
|
-
|
|
60552
|
+
const
|
|
60553
|
+
vertices = this .vertices .getValue () .filter ((v, i) => i % 4 < 3),
|
|
60554
|
+
normals = this .normals .getValue (),
|
|
60555
|
+
texCoords = this .multiTexCoords [0] .getValue () .filter ((v, i) => i % 4 < 2),
|
|
60556
|
+
tangents = MikkTSpace .generateTangents (vertices, normals, texCoords),
|
|
60557
|
+
length = tangents .length;
|
|
60738
60558
|
|
|
60739
|
-
|
|
60740
|
-
|
|
60741
|
-
|
|
60559
|
+
// Convert coordinate system handedness to respect output format of MikkTSpace.
|
|
60560
|
+
for (let i = 3; i < length; i += 4)
|
|
60561
|
+
tangents [i] = -tangents [i]; // Flip w-channel.
|
|
60742
60562
|
|
|
60743
|
-
|
|
60744
|
-
|
|
60563
|
+
this .tangents .assign (tangents);
|
|
60564
|
+
this .tangents .shrinkToFit ();
|
|
60565
|
+
}
|
|
60566
|
+
catch (error)
|
|
60567
|
+
{
|
|
60568
|
+
console .error (error);
|
|
60569
|
+
}
|
|
60745
60570
|
},
|
|
60746
60571
|
refineNormals (normalIndex, normals, creaseAngle)
|
|
60747
60572
|
{
|
|
@@ -60821,16 +60646,13 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60821
60646
|
{
|
|
60822
60647
|
// Get barycentric coordinates.
|
|
60823
60648
|
|
|
60824
|
-
const
|
|
60825
|
-
u = uvt .u,
|
|
60826
|
-
v = uvt .v,
|
|
60827
|
-
t = uvt .t;
|
|
60649
|
+
const { u, v, t } = uvt;
|
|
60828
60650
|
|
|
60829
60651
|
// Determine vectors for X3DPointingDeviceSensors.
|
|
60830
60652
|
|
|
60831
|
-
const point = new Numbers_Vector3 (
|
|
60832
|
-
|
|
60833
|
-
|
|
60653
|
+
const point = new Numbers_Vector3 (u * vertices [i4] + v * vertices [i4 + 4] + t * vertices [i4 + 8],
|
|
60654
|
+
u * vertices [i4 + 1] + v * vertices [i4 + 5] + t * vertices [i4 + 9],
|
|
60655
|
+
u * vertices [i4 + 2] + v * vertices [i4 + 6] + t * vertices [i4 + 10]);
|
|
60834
60656
|
|
|
60835
60657
|
if (clipPlanes .length)
|
|
60836
60658
|
{
|
|
@@ -60838,16 +60660,16 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60838
60660
|
continue;
|
|
60839
60661
|
}
|
|
60840
60662
|
|
|
60841
|
-
const texCoord = new Numbers_Vector2 (
|
|
60842
|
-
|
|
60663
|
+
const texCoord = new Numbers_Vector2 (u * texCoords [i4] + v * texCoords [i4 + 4] + t * texCoords [i4 + 8],
|
|
60664
|
+
u * texCoords [i4 + 1] + v * texCoords [i4 + 5] + t * texCoords [i4 + 9]);
|
|
60843
60665
|
|
|
60844
60666
|
const i3 = i * 3;
|
|
60845
60667
|
|
|
60846
|
-
const normal = new Numbers_Vector3 (
|
|
60847
|
-
|
|
60848
|
-
|
|
60668
|
+
const normal = new Numbers_Vector3 (u * normals [i3] + v * normals [i3 + 3] + t * normals [i3 + 6],
|
|
60669
|
+
u * normals [i3 + 1] + v * normals [i3 + 4] + t * normals [i3 + 7],
|
|
60670
|
+
u * normals [i3 + 2] + v * normals [i3 + 5] + t * normals [i3 + 8]);
|
|
60849
60671
|
|
|
60850
|
-
intersections .push ({ texCoord
|
|
60672
|
+
intersections .push ({ texCoord, normal, point: this .getMatrix () .multVecMatrix (point) });
|
|
60851
60673
|
}
|
|
60852
60674
|
}
|
|
60853
60675
|
}
|
|
@@ -61162,17 +60984,20 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61162
60984
|
// Determine bbox.
|
|
61163
60985
|
|
|
61164
60986
|
const
|
|
61165
|
-
vertices
|
|
61166
|
-
|
|
61167
|
-
|
|
60987
|
+
vertices = this .vertices .getValue (),
|
|
60988
|
+
numVertices = vertices .length,
|
|
60989
|
+
min = this .min,
|
|
60990
|
+
max = this .max;
|
|
61168
60991
|
|
|
61169
|
-
if (
|
|
60992
|
+
if (numVertices)
|
|
61170
60993
|
{
|
|
61171
60994
|
if (min .x === Number .POSITIVE_INFINITY)
|
|
61172
60995
|
{
|
|
61173
|
-
for (let i = 0
|
|
60996
|
+
for (let i = 0; i < numVertices; i += 4)
|
|
61174
60997
|
{
|
|
61175
|
-
|
|
60998
|
+
const { [i]: v1, [i + 1]: v2, [i + 2]: v3 } = vertices;
|
|
60999
|
+
|
|
61000
|
+
point .set (v1, v2, v3);
|
|
61176
61001
|
|
|
61177
61002
|
min .min (point);
|
|
61178
61003
|
max .max (point);
|
|
@@ -61331,7 +61156,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61331
61156
|
appearanceNode = renderContext .appearanceNode,
|
|
61332
61157
|
shaderNode = appearanceNode .getShader (this, renderContext);
|
|
61333
61158
|
|
|
61334
|
-
if (this .solid || !appearanceNode .getBackMaterial ()
|
|
61159
|
+
if (this .solid || !appearanceNode .getBackMaterial ())
|
|
61335
61160
|
{
|
|
61336
61161
|
this .displayGeometry (gl, renderContext, appearanceNode, shaderNode, true, true);
|
|
61337
61162
|
}
|
|
@@ -61384,51 +61209,43 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61384
61209
|
|
|
61385
61210
|
// Draw depending on wireframe, solid and transparent.
|
|
61386
61211
|
|
|
61387
|
-
|
|
61388
|
-
{
|
|
61389
|
-
for (let i = 0, length = this .vertexCount; i < length; i += 3)
|
|
61390
|
-
gl .drawArrays (primitiveMode, i, 3);
|
|
61391
|
-
}
|
|
61392
|
-
else
|
|
61393
|
-
{
|
|
61394
|
-
const positiveScale = Numbers_Matrix4 .prototype .determinant3 .call (renderContext .modelViewMatrix) > 0;
|
|
61395
|
-
|
|
61396
|
-
gl .frontFace (positiveScale ? this .frontFace : this .backFace .get (this .frontFace));
|
|
61397
|
-
|
|
61398
|
-
if (renderContext .transparent || back !== front)
|
|
61399
|
-
{
|
|
61400
|
-
// Render transparent or back or front.
|
|
61212
|
+
const positiveScale = Numbers_Matrix4 .prototype .determinant3 .call (renderContext .modelViewMatrix) > 0;
|
|
61401
61213
|
|
|
61402
|
-
|
|
61214
|
+
gl .frontFace (positiveScale ? this .frontFace : this .backFace .get (this .frontFace));
|
|
61403
61215
|
|
|
61404
|
-
|
|
61216
|
+
if (renderContext .transparent || back !== front)
|
|
61217
|
+
{
|
|
61218
|
+
// Render transparent or back or front.
|
|
61405
61219
|
|
|
61406
|
-
|
|
61407
|
-
{
|
|
61408
|
-
gl .cullFace (gl .FRONT);
|
|
61409
|
-
gl .drawArrays (primitiveMode, 0, this .vertexCount);
|
|
61410
|
-
}
|
|
61220
|
+
gl .enable (gl .CULL_FACE);
|
|
61411
61221
|
|
|
61412
|
-
|
|
61222
|
+
// Render back.
|
|
61413
61223
|
|
|
61414
|
-
|
|
61415
|
-
{
|
|
61416
|
-
gl .cullFace (gl .BACK);
|
|
61417
|
-
gl .drawArrays (primitiveMode, 0, this .vertexCount);
|
|
61418
|
-
}
|
|
61419
|
-
}
|
|
61420
|
-
else
|
|
61224
|
+
if (back && !this .solid)
|
|
61421
61225
|
{
|
|
61422
|
-
|
|
61226
|
+
gl .cullFace (gl .FRONT);
|
|
61227
|
+
gl .drawArrays (primitiveMode, 0, this .vertexCount);
|
|
61228
|
+
}
|
|
61423
61229
|
|
|
61424
|
-
|
|
61425
|
-
gl .enable (gl .CULL_FACE);
|
|
61426
|
-
else
|
|
61427
|
-
gl .disable (gl .CULL_FACE);
|
|
61230
|
+
// Render front.
|
|
61428
61231
|
|
|
61232
|
+
if (front)
|
|
61233
|
+
{
|
|
61234
|
+
gl .cullFace (gl .BACK);
|
|
61429
61235
|
gl .drawArrays (primitiveMode, 0, this .vertexCount);
|
|
61430
61236
|
}
|
|
61431
61237
|
}
|
|
61238
|
+
else
|
|
61239
|
+
{
|
|
61240
|
+
// Render solid or both sides.
|
|
61241
|
+
|
|
61242
|
+
if (this .solid)
|
|
61243
|
+
gl .enable (gl .CULL_FACE);
|
|
61244
|
+
else
|
|
61245
|
+
gl .disable (gl .CULL_FACE);
|
|
61246
|
+
|
|
61247
|
+
gl .drawArrays (primitiveMode, 0, this .vertexCount);
|
|
61248
|
+
}
|
|
61432
61249
|
|
|
61433
61250
|
for (const node of renderModeNodes)
|
|
61434
61251
|
node .disable (gl);
|
|
@@ -61471,7 +61288,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61471
61288
|
appearanceNode = renderContext .appearanceNode,
|
|
61472
61289
|
shaderNode = appearanceNode .getShader (this, renderContext);
|
|
61473
61290
|
|
|
61474
|
-
if (this .solid || !appearanceNode .getBackMaterial ()
|
|
61291
|
+
if (this .solid || !appearanceNode .getBackMaterial ())
|
|
61475
61292
|
{
|
|
61476
61293
|
this .displayInstancedGeometry (gl, renderContext, appearanceNode, shaderNode, true, true, shapeNode);
|
|
61477
61294
|
}
|
|
@@ -62332,6 +62149,17 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62332
62149
|
if (this ._hidden .getValue ())
|
|
62333
62150
|
return;
|
|
62334
62151
|
|
|
62152
|
+
const browser = this .getBrowser ();
|
|
62153
|
+
|
|
62154
|
+
// Always fill background.
|
|
62155
|
+
|
|
62156
|
+
if (browser .getWireframe ())
|
|
62157
|
+
{
|
|
62158
|
+
const ext = gl .getExtension ("WEBGL_polygon_mode");
|
|
62159
|
+
|
|
62160
|
+
ext ?.polygonModeWEBGL (gl .FRONT_AND_BACK, ext .FILL_WEBGL);
|
|
62161
|
+
}
|
|
62162
|
+
|
|
62335
62163
|
// Setup context.
|
|
62336
62164
|
|
|
62337
62165
|
gl .disable (gl .DEPTH_TEST);
|
|
@@ -62368,6 +62196,15 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62368
62196
|
gl .depthMask (true);
|
|
62369
62197
|
gl .enable (gl .DEPTH_TEST);
|
|
62370
62198
|
gl .disable (gl .BLEND);
|
|
62199
|
+
|
|
62200
|
+
// Restore polygon mode.
|
|
62201
|
+
|
|
62202
|
+
if (browser .getWireframe ())
|
|
62203
|
+
{
|
|
62204
|
+
const ext = gl .getExtension ("WEBGL_polygon_mode");
|
|
62205
|
+
|
|
62206
|
+
ext ?.polygonModeWEBGL (gl .FRONT_AND_BACK, ext .LINE_WEBGL);
|
|
62207
|
+
}
|
|
62371
62208
|
};
|
|
62372
62209
|
})(),
|
|
62373
62210
|
drawSphere (renderObject, modelViewMatrixArray, projectionMatrixArray)
|
|
@@ -63089,7 +62926,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
63089
62926
|
|
|
63090
62927
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (x_ite_Namespace .add ("X3DTexture2DNode", X3DTexture2DNode_default_));
|
|
63091
62928
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
63092
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
62929
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(386);
|
|
63093
62930
|
/*******************************************************************************
|
|
63094
62931
|
*
|
|
63095
62932
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -63569,6 +63406,7 @@ const Background_default_ = Background;
|
|
|
63569
63406
|
|
|
63570
63407
|
|
|
63571
63408
|
|
|
63409
|
+
|
|
63572
63410
|
function X3DLayerNode (executionContext, defaultViewpoint, groupNode)
|
|
63573
63411
|
{
|
|
63574
63412
|
Core_X3DNode .call (this, executionContext);
|
|
@@ -63759,6 +63597,9 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63759
63597
|
viewpointNode = this .getViewpoint (),
|
|
63760
63598
|
bbox = this .getBBox (new Geometry_Box3 ()) .multRight (viewpointNode .getModelMatrix () .copy () .inverse ());
|
|
63761
63599
|
|
|
63600
|
+
if (bbox .size .equals (Numbers_Vector3 .Zero))
|
|
63601
|
+
return;
|
|
63602
|
+
|
|
63762
63603
|
viewpointNode .lookAt (this, bbox .center, viewpointNode .getLookAtDistance (bbox), transitionTime, factor, straighten);
|
|
63763
63604
|
},
|
|
63764
63605
|
straightenView ()
|
|
@@ -63776,10 +63617,8 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63776
63617
|
},
|
|
63777
63618
|
set_viewport__ ()
|
|
63778
63619
|
{
|
|
63779
|
-
this .viewportNode = Base_X3DCast (Base_X3DConstants .X3DViewportNode, this ._viewport)
|
|
63780
|
-
|
|
63781
|
-
if (!this .viewportNode)
|
|
63782
|
-
this .viewportNode = this .getBrowser () .getDefaultViewport ();
|
|
63620
|
+
this .viewportNode = Base_X3DCast (Base_X3DConstants .X3DViewportNode, this ._viewport)
|
|
63621
|
+
?? this .getBrowser () .getDefaultViewport ();
|
|
63783
63622
|
},
|
|
63784
63623
|
bindBindables (viewpointName)
|
|
63785
63624
|
{
|
|
@@ -63805,21 +63644,31 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63805
63644
|
},
|
|
63806
63645
|
traverse (type, renderObject = this)
|
|
63807
63646
|
{
|
|
63808
|
-
const
|
|
63647
|
+
const
|
|
63648
|
+
browser = this .getBrowser (),
|
|
63649
|
+
viewpointNode = this .getViewpoint (),
|
|
63650
|
+
pose = browser .getPose ();
|
|
63809
63651
|
|
|
63810
63652
|
if (pose && this .active)
|
|
63811
63653
|
{
|
|
63812
|
-
this .getProjectionMatrix ()
|
|
63813
|
-
|
|
63814
|
-
|
|
63654
|
+
this .getProjectionMatrix () .push (pose .views [0] .projectionMatrix);
|
|
63655
|
+
|
|
63656
|
+
if (browser .getBrowserOption ("XRMovementControl") === "VIEWPOINT")
|
|
63657
|
+
{
|
|
63658
|
+
this .getCameraSpaceMatrix () .push (viewpointNode .getCameraSpaceMatrix ());
|
|
63659
|
+
this .getViewMatrix () .push (viewpointNode .getViewMatrix ());
|
|
63660
|
+
}
|
|
63661
|
+
else
|
|
63662
|
+
{
|
|
63663
|
+
this .getCameraSpaceMatrix () .push (pose .cameraSpaceMatrix);
|
|
63664
|
+
this .getViewMatrix () .push (pose .viewMatrix);
|
|
63665
|
+
}
|
|
63815
63666
|
}
|
|
63816
63667
|
else
|
|
63817
63668
|
{
|
|
63818
|
-
|
|
63819
|
-
|
|
63820
|
-
this .
|
|
63821
|
-
this .getCameraSpaceMatrix () .pushMatrix (viewpointNode .getCameraSpaceMatrix ());
|
|
63822
|
-
this .getViewMatrix () .pushMatrix (viewpointNode .getViewMatrix ());
|
|
63669
|
+
this .getProjectionMatrix () .push (viewpointNode .getProjectionMatrix (this));
|
|
63670
|
+
this .getCameraSpaceMatrix () .push (viewpointNode .getCameraSpaceMatrix ());
|
|
63671
|
+
this .getViewMatrix () .push (viewpointNode .getViewMatrix ());
|
|
63823
63672
|
}
|
|
63824
63673
|
|
|
63825
63674
|
switch (type)
|
|
@@ -63865,7 +63714,7 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63865
63714
|
|
|
63866
63715
|
this .setHitRay (this .getProjectionMatrix () .get (), viewport, browser .getPointer ());
|
|
63867
63716
|
this .getNavigationInfo () .enable (type, renderObject);
|
|
63868
|
-
this .getModelViewMatrix () .
|
|
63717
|
+
this .getModelViewMatrix () .push (this .getViewMatrix () .get ());
|
|
63869
63718
|
|
|
63870
63719
|
this .viewportNode .push (this);
|
|
63871
63720
|
renderObject .render (type, this .groupNodes .traverse, this .groupNodes);
|
|
@@ -63877,7 +63726,7 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63877
63726
|
{
|
|
63878
63727
|
if (this ._display .getValue ())
|
|
63879
63728
|
{
|
|
63880
|
-
this .getModelViewMatrix () .
|
|
63729
|
+
this .getModelViewMatrix () .push (Numbers_Matrix4 .Identity);
|
|
63881
63730
|
|
|
63882
63731
|
this .viewportNode .push (this);
|
|
63883
63732
|
this .groupNodes .traverse (type, renderObject);
|
|
@@ -63897,7 +63746,7 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63897
63746
|
{
|
|
63898
63747
|
if (this ._pickable .getValue ())
|
|
63899
63748
|
{
|
|
63900
|
-
this .getModelViewMatrix () .
|
|
63749
|
+
this .getModelViewMatrix () .push (Numbers_Matrix4 .Identity);
|
|
63901
63750
|
|
|
63902
63751
|
this .viewportNode .push (this);
|
|
63903
63752
|
this .groupNodes .traverse (type, renderObject);
|
|
@@ -63926,8 +63775,8 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63926
63775
|
|
|
63927
63776
|
Geometry_Camera .ortho (-size, size, -size, size, -size, size, projectionMatrix);
|
|
63928
63777
|
|
|
63929
|
-
this .getProjectionMatrix () .
|
|
63930
|
-
this .getModelViewMatrix () .
|
|
63778
|
+
this .getProjectionMatrix () .push (projectionMatrix);
|
|
63779
|
+
this .getModelViewMatrix () .push (this .getViewMatrix () .get ());
|
|
63931
63780
|
|
|
63932
63781
|
// Render
|
|
63933
63782
|
this .viewportNode .push (this);
|
|
@@ -63944,7 +63793,7 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63944
63793
|
if (this ._display .getValue ())
|
|
63945
63794
|
{
|
|
63946
63795
|
this .getNavigationInfo () .enable (type, renderObject);
|
|
63947
|
-
this .getModelViewMatrix () .
|
|
63796
|
+
this .getModelViewMatrix () .push (this .getViewMatrix () .get ());
|
|
63948
63797
|
|
|
63949
63798
|
this .viewportNode .push (this);
|
|
63950
63799
|
renderObject .render (type, this .groupNodes .traverse, this .groupNodes);
|
|
@@ -65461,7 +65310,7 @@ Object .assign (Object .setPrototypeOf (X3DViewpointNode .prototype, Core_X3DBin
|
|
|
65461
65310
|
getUpVector ()
|
|
65462
65311
|
{
|
|
65463
65312
|
// Local y-axis,
|
|
65464
|
-
// see https://www.web3d.org/documents/specifications/19775-1/
|
|
65313
|
+
// see https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/navigation.html#NavigationInfo.
|
|
65465
65314
|
return Numbers_Vector3 .yAxis;
|
|
65466
65315
|
},
|
|
65467
65316
|
getSpeedFactor ()
|
|
@@ -65648,8 +65497,11 @@ Object .assign (Object .setPrototypeOf (X3DViewpointNode .prototype, Core_X3DBin
|
|
|
65648
65497
|
|
|
65649
65498
|
this .lookAt (layerNode, point, minDistance, transitionTime, factor, straighten);
|
|
65650
65499
|
},
|
|
65651
|
-
lookAtBBox (layerNode, bbox, transitionTime = 1, factor, straighten)
|
|
65500
|
+
lookAtBBox (layerNode, bbox, transitionTime = 1, factor = 1, straighten = false)
|
|
65652
65501
|
{
|
|
65502
|
+
if (bbox .size .equals (Numbers_Vector3 .Zero))
|
|
65503
|
+
return;
|
|
65504
|
+
|
|
65653
65505
|
bbox = bbox .copy () .multRight (this .getModelMatrix () .copy () .inverse ());
|
|
65654
65506
|
|
|
65655
65507
|
this .lookAt (layerNode, bbox .center, this .getLookAtDistance (bbox), transitionTime, factor, straighten);
|
|
@@ -65727,18 +65579,26 @@ Object .assign (Object .setPrototypeOf (X3DViewpointNode .prototype, Core_X3DBin
|
|
|
65727
65579
|
{
|
|
65728
65580
|
bbox .copy () .multRight (this .modelMatrix .copy () .inverse ());
|
|
65729
65581
|
|
|
65730
|
-
|
|
65731
|
-
|
|
65732
|
-
|
|
65733
|
-
|
|
65734
|
-
|
|
65582
|
+
if (bbox .size .equals (Numbers_Vector3 .Zero))
|
|
65583
|
+
{
|
|
65584
|
+
this .set_nearDistance__ ();
|
|
65585
|
+
this .set_farDistance__ ();
|
|
65586
|
+
}
|
|
65587
|
+
else
|
|
65588
|
+
{
|
|
65589
|
+
const
|
|
65590
|
+
direction = this .getUserPosition () .copy () .subtract (bbox .center) .normalize (),
|
|
65591
|
+
distance = this .getLookAtDistance (bbox),
|
|
65592
|
+
userPosition = bbox .center .copy () .add (direction .multiply (distance)),
|
|
65593
|
+
userOrientation = this .getLookAtRotation (userPosition, bbox .center);
|
|
65735
65594
|
|
|
65736
|
-
|
|
65737
|
-
|
|
65738
|
-
|
|
65739
|
-
|
|
65740
|
-
|
|
65741
|
-
|
|
65595
|
+
this ._positionOffset = userPosition .subtract (this .getPosition ());
|
|
65596
|
+
this ._orientationOffset = this .getOrientation () .copy () .inverse () .multRight (userOrientation);
|
|
65597
|
+
this ._centerOfRotationOffset = bbox .center .copy () .subtract (this .getCenterOfRotation ());
|
|
65598
|
+
this ._fieldOfViewScale = 1;
|
|
65599
|
+
this .nearDistance = distance * (0.125 / 10);
|
|
65600
|
+
this .farDistance = this .nearDistance * this .getMaxFarValue () / 0.125;
|
|
65601
|
+
}
|
|
65742
65602
|
},
|
|
65743
65603
|
traverse (type, renderObject)
|
|
65744
65604
|
{
|
|
@@ -66450,7 +66310,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
66450
66310
|
|
|
66451
66311
|
/* harmony default export */ const Execution_X3DWorld = (x_ite_Namespace .add ("X3DWorld", X3DWorld_default_));
|
|
66452
66312
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
|
|
66453
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
66313
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(386);
|
|
66454
66314
|
/*******************************************************************************
|
|
66455
66315
|
*
|
|
66456
66316
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -67380,7 +67240,7 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
|
|
|
67380
67240
|
|
|
67381
67241
|
/* harmony default export */ const Prototype_ProtoDeclarationArray = (x_ite_Namespace .add ("ProtoDeclarationArray", ProtoDeclarationArray_default_));
|
|
67382
67242
|
;// CONCATENATED MODULE: ./src/x_ite/Routing/X3DRoute.js
|
|
67383
|
-
/* provided dependency */ var X3DRoute_$ = __webpack_require__(
|
|
67243
|
+
/* provided dependency */ var X3DRoute_$ = __webpack_require__(386);
|
|
67384
67244
|
/*******************************************************************************
|
|
67385
67245
|
*
|
|
67386
67246
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -67544,8 +67404,6 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
67544
67404
|
: this [_sourceNode] .getExportedNode ();
|
|
67545
67405
|
|
|
67546
67406
|
this [_sourceField] = sourceNode .getField (this [_sourceFieldName]);
|
|
67547
|
-
|
|
67548
|
-
this [_sourceField] .addOutputRoute (this);
|
|
67549
67407
|
}
|
|
67550
67408
|
catch (error)
|
|
67551
67409
|
{
|
|
@@ -67560,7 +67418,6 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
67560
67418
|
|
|
67561
67419
|
this [_destinationField] = destinationNode .getField (this [_destinationFieldName]);
|
|
67562
67420
|
|
|
67563
|
-
this [_destinationField] .addInputRoute (this);
|
|
67564
67421
|
}
|
|
67565
67422
|
catch (error)
|
|
67566
67423
|
{
|
|
@@ -67569,7 +67426,18 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
67569
67426
|
|
|
67570
67427
|
if (this [_sourceField] && this [_destinationField])
|
|
67571
67428
|
{
|
|
67572
|
-
this [_sourceField] .
|
|
67429
|
+
if (this [_sourceField] .getType () !== this [_destinationField] .getType ())
|
|
67430
|
+
throw new Error (`Bad ROUTE statement: Source field type must match destination field type of fields named "${this [_sourceField] .getName ()}" and "${this [_destinationField] .getName ()}".`);
|
|
67431
|
+
|
|
67432
|
+
if (!this [_sourceField] .isOutput ())
|
|
67433
|
+
throw new Error (`Bad ROUTE statement: Source field "${this [_sourceField] .getName ()}" must be an output.`);
|
|
67434
|
+
|
|
67435
|
+
if (!this [_destinationField] .isInput ())
|
|
67436
|
+
throw new Error (`Bad ROUTE statement: Destination field "${this [_destinationField] .getName ()}" must be an input.`);
|
|
67437
|
+
|
|
67438
|
+
this [_sourceField] .addOutputRoute (this);
|
|
67439
|
+
this [_destinationField] .addInputRoute (this);
|
|
67440
|
+
this [_sourceField] .addFieldInterest (this [_destinationField]);
|
|
67573
67441
|
}
|
|
67574
67442
|
else
|
|
67575
67443
|
{
|
|
@@ -70852,7 +70720,8 @@ Object .assign (Object .setPrototypeOf (ProximitySensor .prototype, Environmenta
|
|
|
70852
70720
|
if (this .layerNode)
|
|
70853
70721
|
{
|
|
70854
70722
|
const
|
|
70855
|
-
|
|
70723
|
+
browser = this .getBrowser (),
|
|
70724
|
+
pose = browser .getPose (),
|
|
70856
70725
|
viewpointNode = this .layerNode .getViewpoint (),
|
|
70857
70726
|
invModelMatrix = this .modelMatrix .inverse ()
|
|
70858
70727
|
|
|
@@ -70862,7 +70731,7 @@ Object .assign (Object .setPrototypeOf (ProximitySensor .prototype, Environmenta
|
|
|
70862
70731
|
.multRight (invModelMatrix)
|
|
70863
70732
|
.get (centerOfRotation);
|
|
70864
70733
|
|
|
70865
|
-
if (pose && this .layerNode .isActive ())
|
|
70734
|
+
if (pose && this .layerNode .isActive () && browser .getBrowserOption ("XRMovementControl") !== "VIEWPOINT")
|
|
70866
70735
|
invModelMatrix .multLeft (pose .cameraSpaceMatrix);
|
|
70867
70736
|
else
|
|
70868
70737
|
invModelMatrix .multLeft (viewpointNode .getCameraSpaceMatrix ());
|
|
@@ -70883,7 +70752,7 @@ Object .assign (Object .setPrototypeOf (ProximitySensor .prototype, Environmenta
|
|
|
70883
70752
|
else
|
|
70884
70753
|
{
|
|
70885
70754
|
this ._isActive = true;
|
|
70886
|
-
this ._enterTime =
|
|
70755
|
+
this ._enterTime = browser .getCurrentTime ();
|
|
70887
70756
|
this ._position_changed = position;
|
|
70888
70757
|
this ._orientation_changed = orientation;
|
|
70889
70758
|
this ._centerOfRotation_changed = centerOfRotation;
|
|
@@ -74016,17 +73885,18 @@ Object .assign (Object .setPrototypeOf (Box .prototype, Rendering_X3DGeometryNod
|
|
|
74016
73885
|
return function ()
|
|
74017
73886
|
{
|
|
74018
73887
|
const
|
|
74019
|
-
options
|
|
74020
|
-
geometry
|
|
74021
|
-
size
|
|
73888
|
+
options = this .getBrowser () .getBoxOptions (),
|
|
73889
|
+
geometry = options .getGeometry (),
|
|
73890
|
+
size = this ._size .getValue (),
|
|
73891
|
+
vertexArray = this .getVertices ();
|
|
74022
73892
|
|
|
74023
|
-
this .
|
|
74024
|
-
this .
|
|
74025
|
-
this .
|
|
73893
|
+
this .getMultiTexCoords () .push (... geometry .getMultiTexCoords ());
|
|
73894
|
+
this .getTangents () .assign (geometry .getTangents ());
|
|
73895
|
+
this .getNormals () .assign (geometry .getNormals ());
|
|
74026
73896
|
|
|
74027
73897
|
if (size .equals (defaultSize))
|
|
74028
73898
|
{
|
|
74029
|
-
|
|
73899
|
+
vertexArray .assign (geometry .getVertices ());
|
|
74030
73900
|
|
|
74031
73901
|
this .getMin () .assign (geometry .getMin ());
|
|
74032
73902
|
this .getMax () .assign (geometry .getMax ());
|
|
@@ -74037,8 +73907,7 @@ Object .assign (Object .setPrototypeOf (Box .prototype, Rendering_X3DGeometryNod
|
|
|
74037
73907
|
x = Math .abs (size .x / 2),
|
|
74038
73908
|
y = Math .abs (size .y / 2),
|
|
74039
73909
|
z = Math .abs (size .z / 2),
|
|
74040
|
-
defaultVertices = geometry .getVertices () .getValue ()
|
|
74041
|
-
vertexArray = this .getVertices ();
|
|
73910
|
+
defaultVertices = geometry .getVertices () .getValue ();
|
|
74042
73911
|
|
|
74043
73912
|
for (let i = 0, length = defaultVertices .length; i < length; i += 4)
|
|
74044
73913
|
{
|
|
@@ -75056,11 +74925,11 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75056
74925
|
SCPyAxis = new Numbers_Vector3 (),
|
|
75057
74926
|
SCPzAxis = new Numbers_Vector3 ();
|
|
75058
74927
|
|
|
75059
|
-
|
|
74928
|
+
const
|
|
75060
74929
|
SCPyAxisPrevious = new Numbers_Vector3 (),
|
|
75061
74930
|
SCPzAxisPrevious = new Numbers_Vector3 ();
|
|
75062
74931
|
|
|
75063
|
-
|
|
74932
|
+
const
|
|
75064
74933
|
vector3 = new Numbers_Vector3 (),
|
|
75065
74934
|
rotation = new Numbers_Rotation4 ();
|
|
75066
74935
|
|
|
@@ -75098,7 +74967,7 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75098
74967
|
.subtract (vector3 .assign (spine [length] .getValue ()) .subtract (s) .normalize ())
|
|
75099
74968
|
.normalize ();
|
|
75100
74969
|
|
|
75101
|
-
if (!
|
|
74970
|
+
if (!SCPyAxis .equals (Numbers_Vector3 .Zero))
|
|
75102
74971
|
break;
|
|
75103
74972
|
}
|
|
75104
74973
|
|
|
@@ -75106,10 +74975,10 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75106
74975
|
for (let i = 0, length = numSpines - 2; i < length; ++ i)
|
|
75107
74976
|
{
|
|
75108
74977
|
SCPzAxis .assign (spine [i + 1] .getValue ()) .subtract (spine [i] .getValue ())
|
|
75109
|
-
|
|
75110
|
-
|
|
74978
|
+
.cross (vector3 .assign (spine [length] .getValue ()) .subtract (spine [i] .getValue ()))
|
|
74979
|
+
.normalize ();
|
|
75111
74980
|
|
|
75112
|
-
if (!
|
|
74981
|
+
if (!SCPzAxis .equals (Numbers_Vector3 .Zero))
|
|
75113
74982
|
break;
|
|
75114
74983
|
}
|
|
75115
74984
|
}
|
|
@@ -75120,7 +74989,7 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75120
74989
|
{
|
|
75121
74990
|
SCPyAxis .assign (spine [i + 1] .getValue ()) .subtract (spine [i] .getValue ()) .normalize ();
|
|
75122
74991
|
|
|
75123
|
-
if (!
|
|
74992
|
+
if (!SCPyAxis .equals (Numbers_Vector3 .Zero))
|
|
75124
74993
|
break;
|
|
75125
74994
|
}
|
|
75126
74995
|
|
|
@@ -75128,10 +74997,10 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75128
74997
|
for (let i = 1, length = numSpines - 1; i < length; ++ i)
|
|
75129
74998
|
{
|
|
75130
74999
|
SCPzAxis .assign (spine [i + 1] .getValue ()) .subtract (spine [i] .getValue ())
|
|
75131
|
-
|
|
75132
|
-
|
|
75000
|
+
.cross (vector3 .assign (spine [i - 1] .getValue ()) .subtract (spine [i] .getValue ()))
|
|
75001
|
+
.normalize ();
|
|
75133
75002
|
|
|
75134
|
-
if (!
|
|
75003
|
+
if (!SCPzAxis .equals (Numbers_Vector3 .Zero))
|
|
75135
75004
|
break;
|
|
75136
75005
|
}
|
|
75137
75006
|
}
|
|
@@ -75165,11 +75034,11 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75165
75034
|
const s = spine [i] .getValue ();
|
|
75166
75035
|
|
|
75167
75036
|
SCPyAxis .assign (spine [i + 1] .getValue ()) .subtract (s) .normalize ()
|
|
75168
|
-
|
|
75169
|
-
|
|
75037
|
+
.subtract (vector3 .assign (spine [i - 1] .getValue ()) .subtract (s) .normalize ())
|
|
75038
|
+
.normalize ();
|
|
75170
75039
|
SCPzAxis .assign (spine [i + 1] .getValue ()) .subtract (s)
|
|
75171
|
-
|
|
75172
|
-
|
|
75040
|
+
.cross (vector3 .assign (spine [i - 1] .getValue ()) .subtract (s))
|
|
75041
|
+
.normalize ();
|
|
75173
75042
|
|
|
75174
75043
|
// g.
|
|
75175
75044
|
if (SCPzAxisPrevious .dot (SCPzAxis) < 0)
|
|
@@ -75211,8 +75080,8 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75211
75080
|
if (numSpines > 2)
|
|
75212
75081
|
{
|
|
75213
75082
|
SCPzAxis .assign (s) .subtract (spine [numSpines - 2] .getValue ())
|
|
75214
|
-
|
|
75215
|
-
|
|
75083
|
+
.cross (vector3 .assign (spine [numSpines - 3] .getValue ()) .subtract (spine [numSpines - 2] .getValue ()))
|
|
75084
|
+
.normalize ();
|
|
75216
75085
|
}
|
|
75217
75086
|
|
|
75218
75087
|
// g.
|
|
@@ -75249,7 +75118,7 @@ Object .assign (Object .setPrototypeOf (Extrusion .prototype, Rendering_X3DGeome
|
|
|
75249
75118
|
return function ()
|
|
75250
75119
|
{
|
|
75251
75120
|
const
|
|
75252
|
-
cw = !
|
|
75121
|
+
cw = !this ._ccw .getValue (),
|
|
75253
75122
|
crossSection = this ._crossSection,
|
|
75254
75123
|
spine = this ._spine,
|
|
75255
75124
|
numSpines = spine .length,
|
|
@@ -76506,26 +76375,25 @@ Object .assign (Object .setPrototypeOf (Sphere .prototype, Rendering_X3DGeometry
|
|
|
76506
76375
|
build ()
|
|
76507
76376
|
{
|
|
76508
76377
|
const
|
|
76509
|
-
options
|
|
76510
|
-
geometry
|
|
76511
|
-
radius
|
|
76378
|
+
options = this .getBrowser () .getSphereOptions (),
|
|
76379
|
+
geometry = options .getGeometry (),
|
|
76380
|
+
radius = Math .abs (this ._radius .getValue ()),
|
|
76381
|
+
vertexArray = this .getVertices ();
|
|
76512
76382
|
|
|
76513
|
-
this .
|
|
76514
|
-
this .
|
|
76515
|
-
this .
|
|
76383
|
+
this .getMultiTexCoords () .push (... geometry .getMultiTexCoords ());
|
|
76384
|
+
this .getTangents () .assign (geometry .getTangents ());
|
|
76385
|
+
this .getNormals () .assign (geometry .getNormals ());
|
|
76516
76386
|
|
|
76517
76387
|
if (radius === 1)
|
|
76518
76388
|
{
|
|
76519
|
-
|
|
76389
|
+
vertexArray .assign (geometry .getVertices ());
|
|
76520
76390
|
|
|
76521
76391
|
this .getMin () .assign (geometry .getMin ());
|
|
76522
76392
|
this .getMax () .assign (geometry .getMax ());
|
|
76523
76393
|
}
|
|
76524
76394
|
else
|
|
76525
76395
|
{
|
|
76526
|
-
const
|
|
76527
|
-
defaultVertices = geometry .getVertices () .getValue (),
|
|
76528
|
-
vertexArray = this .getVertices ();
|
|
76396
|
+
const defaultVertices = geometry .getVertices () .getValue ();
|
|
76529
76397
|
|
|
76530
76398
|
for (let i = 0, length = defaultVertices .length; i < length; i += 4)
|
|
76531
76399
|
{
|
|
@@ -77007,7 +76875,6 @@ function X3DPointGeometryNode (executionContext)
|
|
|
77007
76875
|
this .setGeometryType (0);
|
|
77008
76876
|
this .setPrimitiveMode (browser .getContext () .POINTS);
|
|
77009
76877
|
this .setSolid (false);
|
|
77010
|
-
this .setTransparent (true);
|
|
77011
76878
|
}
|
|
77012
76879
|
|
|
77013
76880
|
Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Rendering_X3DGeometryNode .prototype),
|
|
@@ -77031,6 +76898,9 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
77031
76898
|
attribNodes = this .getAttrib (),
|
|
77032
76899
|
attribBuffers = this .getAttribBuffers ();
|
|
77033
76900
|
|
|
76901
|
+
if (!renderContext .transparent)
|
|
76902
|
+
gl .enable (gl .SAMPLE_ALPHA_TO_COVERAGE);
|
|
76903
|
+
|
|
77034
76904
|
for (const node of renderModeNodes)
|
|
77035
76905
|
node .enable (gl);
|
|
77036
76906
|
|
|
@@ -77068,6 +76938,8 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
77068
76938
|
|
|
77069
76939
|
for (const node of renderModeNodes)
|
|
77070
76940
|
node .disable (gl);
|
|
76941
|
+
|
|
76942
|
+
gl .disable (gl .SAMPLE_ALPHA_TO_COVERAGE);
|
|
77071
76943
|
},
|
|
77072
76944
|
displayInstanced (gl, renderContext, shapeNode)
|
|
77073
76945
|
{
|
|
@@ -77078,6 +76950,9 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
77078
76950
|
attribNodes = this .getAttrib (),
|
|
77079
76951
|
attribBuffers = this .getAttribBuffers ();
|
|
77080
76952
|
|
|
76953
|
+
if (!renderContext .transparent)
|
|
76954
|
+
gl .enable (gl .SAMPLE_ALPHA_TO_COVERAGE);
|
|
76955
|
+
|
|
77081
76956
|
for (const node of renderModeNodes)
|
|
77082
76957
|
node .enable (gl);
|
|
77083
76958
|
|
|
@@ -77134,6 +77009,8 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
77134
77009
|
|
|
77135
77010
|
for (const node of renderModeNodes)
|
|
77136
77011
|
node .disable (gl);
|
|
77012
|
+
|
|
77013
|
+
gl .disable (gl .SAMPLE_ALPHA_TO_COVERAGE);
|
|
77137
77014
|
},
|
|
77138
77015
|
});
|
|
77139
77016
|
|
|
@@ -77603,7 +77480,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
77603
77480
|
renderObject = renderContext .renderObject,
|
|
77604
77481
|
viewport = renderObject .getViewVolume () .getViewport (),
|
|
77605
77482
|
projectionMatrix = renderObject .getProjectionMatrix () .get (),
|
|
77606
|
-
primitiveMode = browser .
|
|
77483
|
+
primitiveMode = browser .getPrimitiveMode (gl .TRIANGLES),
|
|
77607
77484
|
transformShaderNode = browser .getLineTransformShader ();
|
|
77608
77485
|
|
|
77609
77486
|
modelViewProjectionMatrixArray .set (matrix .assign (renderContext .modelViewMatrix) .multRight (projectionMatrix));
|
|
@@ -77821,7 +77698,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
77821
77698
|
renderObject = renderContext .renderObject,
|
|
77822
77699
|
viewport = renderObject .getViewVolume () .getViewport (),
|
|
77823
77700
|
projectionMatrix = renderObject .getProjectionMatrix () .get (),
|
|
77824
|
-
primitiveMode = browser .
|
|
77701
|
+
primitiveMode = browser .getPrimitiveMode (gl .TRIANGLES),
|
|
77825
77702
|
transformShaderNode = browser .getLineTransformInstancedShader ();
|
|
77826
77703
|
|
|
77827
77704
|
modelViewProjectionMatrixArray .set (matrix .assign (renderContext .modelViewMatrix) .multRight (projectionMatrix));
|
|
@@ -80175,7 +80052,9 @@ const TextureCoordinateGenerator_default_ = TextureCoordinateGenerator;
|
|
|
80175
80052
|
|
|
80176
80053
|
|
|
80177
80054
|
|
|
80178
|
-
|
|
80055
|
+
const CLONE_COUNT = 2; // Minimum number of shapes that must be cloned to become an InstancedShape.
|
|
80056
|
+
|
|
80057
|
+
// No support for X3DBindableNode nodes, local lights. X3DLocalFog, local ClipPlane nodes, LOD, Billboard node.
|
|
80179
80058
|
|
|
80180
80059
|
function StaticGroup (executionContext)
|
|
80181
80060
|
{
|
|
@@ -80229,35 +80108,43 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80229
80108
|
for (const visibleNode of this .visibleNodes)
|
|
80230
80109
|
visibleNode .traverse (type, renderObject);
|
|
80231
80110
|
},
|
|
80232
|
-
createStaticShapes
|
|
80111
|
+
createStaticShapes (renderObject)
|
|
80233
80112
|
{
|
|
80234
|
-
|
|
80235
|
-
|
|
80236
|
-
const viewVolume = new Geometry_ViewVolume ();
|
|
80113
|
+
// Check if scene is currently loading something.
|
|
80237
80114
|
|
|
80238
|
-
|
|
80115
|
+
const scene = this .getScene ();
|
|
80239
80116
|
|
|
80240
|
-
|
|
80117
|
+
if (scene ._loadCount .getValue ())
|
|
80241
80118
|
{
|
|
80242
|
-
|
|
80119
|
+
scene ._loadCount .addFieldCallback (this, () =>
|
|
80120
|
+
{
|
|
80121
|
+
if (scene ._loadCount .getValue ())
|
|
80122
|
+
return;
|
|
80243
80123
|
|
|
80244
|
-
|
|
80124
|
+
scene ._loadCount .removeFieldCallback (this);
|
|
80245
80125
|
|
|
80246
|
-
|
|
80247
|
-
|
|
80248
|
-
|
|
80249
|
-
|
|
80250
|
-
|
|
80251
|
-
|
|
80126
|
+
this .set_children__ ();
|
|
80127
|
+
});
|
|
80128
|
+
}
|
|
80129
|
+
else
|
|
80130
|
+
{
|
|
80131
|
+
// Create static shapes.
|
|
80252
80132
|
|
|
80253
|
-
|
|
80133
|
+
this .optimizeGroups (this .createGroups (renderObject));
|
|
80134
|
+
}
|
|
80254
80135
|
|
|
80255
|
-
|
|
80256
|
-
|
|
80136
|
+
return [this .groupNode];
|
|
80137
|
+
},
|
|
80138
|
+
createGroups: (() =>
|
|
80139
|
+
{
|
|
80140
|
+
const Statics = ["Opaque", "Transparent"];
|
|
80257
80141
|
|
|
80258
|
-
|
|
80259
|
-
|
|
80142
|
+
const viewVolume = new Geometry_ViewVolume ();
|
|
80143
|
+
|
|
80144
|
+
viewVolume .intersectsSphere = () => true;
|
|
80260
80145
|
|
|
80146
|
+
return function (renderObject)
|
|
80147
|
+
{
|
|
80261
80148
|
// Traverse Group node to get render contexts.
|
|
80262
80149
|
|
|
80263
80150
|
const
|
|
@@ -80303,6 +80190,7 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80303
80190
|
// Sort out TextureCoordinateGenerator nodes.
|
|
80304
80191
|
|
|
80305
80192
|
const
|
|
80193
|
+
clonesIndex = new Map (renderContexts .map (({shapeNode}) => [shapeNode, [ ]])),
|
|
80306
80194
|
groupsIndex = { },
|
|
80307
80195
|
singlesIndex = { };
|
|
80308
80196
|
|
|
@@ -80333,32 +80221,37 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80333
80221
|
key += shapeNode ._castShadow .getValue () ? 1 : 0;
|
|
80334
80222
|
key += shapeNode ._bboxDisplay .getValue () ? 1 : 0;
|
|
80335
80223
|
|
|
80336
|
-
const
|
|
80224
|
+
const
|
|
80225
|
+
clones = clonesIndex .get (shapeNode),
|
|
80226
|
+
group = groupsIndex [key] ??= [ ];
|
|
80337
80227
|
|
|
80338
|
-
|
|
80228
|
+
clones .push (renderContext);
|
|
80229
|
+
group .push (renderContext);
|
|
80339
80230
|
}
|
|
80340
80231
|
|
|
80341
|
-
|
|
80342
|
-
combineGroups = Object .values (groupsIndex),
|
|
80343
|
-
singlesGroups = Object .values (singlesIndex);
|
|
80232
|
+
// Sort out shapes that are not cloned.
|
|
80344
80233
|
|
|
80345
|
-
|
|
80234
|
+
for (const [id, group] of clonesIndex .entries ())
|
|
80346
80235
|
{
|
|
80347
|
-
|
|
80236
|
+
if (group .length < CLONE_COUNT)
|
|
80237
|
+
clonesIndex .delete (id);
|
|
80348
80238
|
}
|
|
80349
80239
|
|
|
80350
|
-
// Create
|
|
80351
|
-
|
|
80352
|
-
if (DEVELOPMENT)
|
|
80353
|
-
console .time ("StaticGroup");
|
|
80240
|
+
// Create arrays.
|
|
80354
80241
|
|
|
80355
|
-
const
|
|
80356
|
-
|
|
80242
|
+
const
|
|
80243
|
+
clonesGroups = Array .from (clonesIndex .values ()),
|
|
80244
|
+
combineGroups = Object .values (groupsIndex)
|
|
80245
|
+
.map (group => group .filter (({shapeNode}) => !clonesIndex .has (shapeNode)))
|
|
80246
|
+
.filter (group => group .length),
|
|
80247
|
+
singlesGroups = Object .values (singlesIndex);
|
|
80357
80248
|
|
|
80358
|
-
if (
|
|
80359
|
-
|
|
80249
|
+
if (browser .getBrowserOption ("Debug"))
|
|
80250
|
+
{
|
|
80251
|
+
console .info (`StaticGroup will create ${clonesGroups .length + combineGroups .length + singlesGroups .length} static nodes from the previous ${renderContexts .length} nodes.`);
|
|
80252
|
+
}
|
|
80360
80253
|
|
|
80361
|
-
return
|
|
80254
|
+
return { clonesGroups, combineGroups, singlesGroups };
|
|
80362
80255
|
};
|
|
80363
80256
|
})(),
|
|
80364
80257
|
hasTextureCoordinateGenerator (geometryNode)
|
|
@@ -80376,7 +80269,68 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80376
80269
|
|
|
80377
80270
|
return false;
|
|
80378
80271
|
},
|
|
80379
|
-
|
|
80272
|
+
async optimizeGroups ({ clonesGroups, combineGroups, singlesGroups })
|
|
80273
|
+
{
|
|
80274
|
+
if (clonesGroups .length)
|
|
80275
|
+
await this .getBrowser () .loadComponents ("X_ITE");
|
|
80276
|
+
|
|
80277
|
+
// Create static shapes.
|
|
80278
|
+
|
|
80279
|
+
if (DEVELOPMENT)
|
|
80280
|
+
console .time ("StaticGroup");
|
|
80281
|
+
|
|
80282
|
+
const visibleNodes = [ ];
|
|
80283
|
+
|
|
80284
|
+
clonesGroups .forEach (group => this .combineClones (group, visibleNodes));
|
|
80285
|
+
combineGroups .forEach (group => this .combineShapes (group, visibleNodes));
|
|
80286
|
+
singlesGroups .forEach (group => this .normalizeSingleShapes (group, visibleNodes));
|
|
80287
|
+
|
|
80288
|
+
this .visibleNodes = visibleNodes;
|
|
80289
|
+
|
|
80290
|
+
if (DEVELOPMENT)
|
|
80291
|
+
console .timeEnd ("StaticGroup");
|
|
80292
|
+
},
|
|
80293
|
+
combineClones: (function ()
|
|
80294
|
+
{
|
|
80295
|
+
const
|
|
80296
|
+
modelMatrix = new Numbers_Matrix4 (),
|
|
80297
|
+
t = new Numbers_Vector3 (),
|
|
80298
|
+
r = new Numbers_Rotation4 (),
|
|
80299
|
+
s = new Numbers_Vector3 (),
|
|
80300
|
+
so = new Numbers_Rotation4 ();
|
|
80301
|
+
|
|
80302
|
+
return function (group, visibleNodes)
|
|
80303
|
+
{
|
|
80304
|
+
const
|
|
80305
|
+
browser = this .getBrowser (),
|
|
80306
|
+
executionContext = this .getExecutionContext (),
|
|
80307
|
+
InstancedShape = browser .getConcreteNodes () .get ("InstancedShape"),
|
|
80308
|
+
instancedShape = new InstancedShape (executionContext),
|
|
80309
|
+
shapeNode0 = group [0] .shapeNode;
|
|
80310
|
+
|
|
80311
|
+
for (const { modelViewMatrix } of group)
|
|
80312
|
+
{
|
|
80313
|
+
modelMatrix .assign (modelViewMatrix) .get (t, r, s, so);
|
|
80314
|
+
|
|
80315
|
+
instancedShape ._translations .push (t);
|
|
80316
|
+
instancedShape ._rotations .push (r);
|
|
80317
|
+
instancedShape ._scales .push (s);
|
|
80318
|
+
instancedShape ._scaleOrientations .push (so);
|
|
80319
|
+
}
|
|
80320
|
+
|
|
80321
|
+
instancedShape ._pointerEvents = shapeNode0 ._pointerEvents;
|
|
80322
|
+
instancedShape ._castShadow = shapeNode0 ._castShadow;
|
|
80323
|
+
instancedShape ._bboxDisplay = shapeNode0 ._bboxDisplay;
|
|
80324
|
+
instancedShape ._appearance = shapeNode0 ._appearance;
|
|
80325
|
+
instancedShape ._geometry = shapeNode0 ._geometry;
|
|
80326
|
+
|
|
80327
|
+
instancedShape .setPrivate (true);
|
|
80328
|
+
instancedShape .setup ();
|
|
80329
|
+
|
|
80330
|
+
visibleNodes .push (instancedShape);
|
|
80331
|
+
};
|
|
80332
|
+
})(),
|
|
80333
|
+
combineShapes (group, visibleNodes)
|
|
80380
80334
|
{
|
|
80381
80335
|
const
|
|
80382
80336
|
executionContext = this .getExecutionContext (),
|
|
@@ -80583,7 +80537,7 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80583
80537
|
newShapeNode .setPrivate (true);
|
|
80584
80538
|
newShapeNode .setup ();
|
|
80585
80539
|
|
|
80586
|
-
|
|
80540
|
+
visibleNodes .push (newShapeNode);
|
|
80587
80541
|
},
|
|
80588
80542
|
normalizeGeometry: (function ()
|
|
80589
80543
|
{
|
|
@@ -80825,34 +80779,37 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, Core_X3DChildNod
|
|
|
80825
80779
|
return newGeometryNode;
|
|
80826
80780
|
};
|
|
80827
80781
|
})(),
|
|
80828
|
-
normalizeSingleShapes (
|
|
80782
|
+
normalizeSingleShapes: (function ()
|
|
80829
80783
|
{
|
|
80830
|
-
const
|
|
80831
|
-
executionContext = this .getExecutionContext (),
|
|
80832
|
-
newTransformNode = new Grouping_Transform (executionContext),
|
|
80833
|
-
modelMatrix = new Numbers_Matrix4 (... group [0] .modelViewMatrix);
|
|
80834
|
-
|
|
80835
80784
|
const
|
|
80836
80785
|
t = new Numbers_Vector3 (),
|
|
80837
80786
|
r = new Numbers_Rotation4 (),
|
|
80838
80787
|
s = new Numbers_Vector3 (),
|
|
80839
80788
|
so = new Numbers_Rotation4 ();
|
|
80840
80789
|
|
|
80841
|
-
|
|
80790
|
+
return function (group, visibleNodes)
|
|
80791
|
+
{
|
|
80792
|
+
const
|
|
80793
|
+
executionContext = this .getExecutionContext (),
|
|
80794
|
+
newTransformNode = new Grouping_Transform (executionContext),
|
|
80795
|
+
modelMatrix = new Numbers_Matrix4 (... group [0] .modelViewMatrix);
|
|
80842
80796
|
|
|
80843
|
-
|
|
80844
|
-
newTransformNode ._rotation = r;
|
|
80845
|
-
newTransformNode ._scale = s;
|
|
80846
|
-
newTransformNode ._scaleOrientation = so;
|
|
80797
|
+
modelMatrix .get (t, r, s, so);
|
|
80847
80798
|
|
|
80848
|
-
|
|
80849
|
-
newTransformNode .
|
|
80799
|
+
newTransformNode ._translation = t;
|
|
80800
|
+
newTransformNode ._rotation = r;
|
|
80801
|
+
newTransformNode ._scale = s;
|
|
80802
|
+
newTransformNode ._scaleOrientation = so;
|
|
80850
80803
|
|
|
80851
|
-
|
|
80852
|
-
|
|
80804
|
+
for (const { shapeNode } of group)
|
|
80805
|
+
newTransformNode ._children .push (shapeNode);
|
|
80853
80806
|
|
|
80854
|
-
|
|
80855
|
-
|
|
80807
|
+
newTransformNode .setPrivate (true);
|
|
80808
|
+
newTransformNode .setup ();
|
|
80809
|
+
|
|
80810
|
+
visibleNodes .push (newTransformNode);
|
|
80811
|
+
};
|
|
80812
|
+
})(),
|
|
80856
80813
|
dispose ()
|
|
80857
80814
|
{
|
|
80858
80815
|
Grouping_X3DBoundedObject .prototype .dispose .call (this);
|
|
@@ -83535,7 +83492,7 @@ Object .assign (Object .setPrototypeOf (X3DLightNode .prototype, Core_X3DChildNo
|
|
|
83535
83492
|
{
|
|
83536
83493
|
const lightContainer = renderObject .getLightContainer ();
|
|
83537
83494
|
|
|
83538
|
-
lightContainer .modelViewMatrix .
|
|
83495
|
+
lightContainer .modelViewMatrix .push (renderObject .getModelViewMatrix () .get ());
|
|
83539
83496
|
|
|
83540
83497
|
if (this ._global .getValue ())
|
|
83541
83498
|
{
|
|
@@ -83673,7 +83630,7 @@ Object .assign (DirectionalLightContainer .prototype,
|
|
|
83673
83630
|
this .groupNode = groupNode;
|
|
83674
83631
|
this .global = lightNode .getGlobal ();
|
|
83675
83632
|
|
|
83676
|
-
this .modelViewMatrix .
|
|
83633
|
+
this .modelViewMatrix .push (modelViewMatrix);
|
|
83677
83634
|
|
|
83678
83635
|
// Get shadow buffer from browser.
|
|
83679
83636
|
|
|
@@ -83709,8 +83666,8 @@ Object .assign (DirectionalLightContainer .prototype,
|
|
|
83709
83666
|
this .shadowBuffer .bind ();
|
|
83710
83667
|
|
|
83711
83668
|
renderObject .getViewVolumes () .push (this .viewVolume .set (projectionMatrix, viewport, viewport));
|
|
83712
|
-
renderObject .getProjectionMatrix () .
|
|
83713
|
-
renderObject .getModelViewMatrix () .
|
|
83669
|
+
renderObject .getProjectionMatrix () .push (projectionMatrix);
|
|
83670
|
+
renderObject .getModelViewMatrix () .push (invLightSpaceMatrix);
|
|
83714
83671
|
|
|
83715
83672
|
renderObject .render (Rendering_TraverseType .SHADOW, Grouping_X3DGroupingNode .prototype .traverse, this .groupNode);
|
|
83716
83673
|
|
|
@@ -83730,7 +83687,10 @@ Object .assign (DirectionalLightContainer .prototype,
|
|
|
83730
83687
|
if (!this .shadowBuffer)
|
|
83731
83688
|
return;
|
|
83732
83689
|
|
|
83733
|
-
this .shadowMatrix
|
|
83690
|
+
this .shadowMatrix
|
|
83691
|
+
.assign (renderObject .getCameraSpaceMatrixArray ())
|
|
83692
|
+
.multRight (this .invLightSpaceProjectionMatrix);
|
|
83693
|
+
|
|
83734
83694
|
this .shadowMatrixArray .set (this .shadowMatrix);
|
|
83735
83695
|
},
|
|
83736
83696
|
setShaderUniforms (gl, shaderObject)
|
|
@@ -83934,7 +83894,7 @@ Object .assign (EnvironmentLightContainer .prototype,
|
|
|
83934
83894
|
this .lightNode = lightNode;
|
|
83935
83895
|
this .global = lightNode .getGlobal ();
|
|
83936
83896
|
|
|
83937
|
-
this .modelViewMatrix .
|
|
83897
|
+
this .modelViewMatrix .push (modelViewMatrix);
|
|
83938
83898
|
},
|
|
83939
83899
|
renderShadowMap (renderObject)
|
|
83940
83900
|
{ },
|
|
@@ -84225,7 +84185,7 @@ Object .assign (PointLightContainer .prototype,
|
|
|
84225
84185
|
|
|
84226
84186
|
this .matrixArray .set (modelViewMatrix .submatrix .inverse ());
|
|
84227
84187
|
|
|
84228
|
-
this .modelViewMatrix .
|
|
84188
|
+
this .modelViewMatrix .push (modelViewMatrix);
|
|
84229
84189
|
|
|
84230
84190
|
// Get shadow buffer from browser.
|
|
84231
84191
|
|
|
@@ -84263,8 +84223,8 @@ Object .assign (PointLightContainer .prototype,
|
|
|
84263
84223
|
projectionMatrix = Geometry_Camera .perspective2 (Math_Algorithm .radians (90), 0.125, 10000, viewport [2], viewport [3], this .projectionMatrix); // Use higher far value for better precision.
|
|
84264
84224
|
|
|
84265
84225
|
renderObject .getViewVolumes () .push (this .viewVolume .set (projectionMatrix, viewport, viewport));
|
|
84266
|
-
renderObject .getProjectionMatrix () .
|
|
84267
|
-
renderObject .getModelViewMatrix () .
|
|
84226
|
+
renderObject .getProjectionMatrix () .push (this .projectionMatrix);
|
|
84227
|
+
renderObject .getModelViewMatrix () .push (orientationMatrices [i]);
|
|
84268
84228
|
renderObject .getModelViewMatrix () .multLeft (invLightSpaceMatrix);
|
|
84269
84229
|
|
|
84270
84230
|
renderObject .render (Rendering_TraverseType .SHADOW, Grouping_X3DGroupingNode .prototype .traverse, this .groupNode);
|
|
@@ -84286,7 +84246,10 @@ Object .assign (PointLightContainer .prototype,
|
|
|
84286
84246
|
if (!this .shadowBuffer)
|
|
84287
84247
|
return;
|
|
84288
84248
|
|
|
84289
|
-
this .shadowMatrix
|
|
84249
|
+
this .shadowMatrix
|
|
84250
|
+
.assign (renderObject .getCameraSpaceMatrixArray ())
|
|
84251
|
+
.multRight (this .invLightSpaceProjectionMatrix);
|
|
84252
|
+
|
|
84290
84253
|
this .shadowMatrixArray .set (this .shadowMatrix);
|
|
84291
84254
|
},
|
|
84292
84255
|
setShaderUniforms (gl, shaderObject)
|
|
@@ -84530,7 +84493,7 @@ Object .assign (SpotLightContainer .prototype,
|
|
|
84530
84493
|
|
|
84531
84494
|
this .matrixArray .set (modelViewMatrix .submatrix .inverse ());
|
|
84532
84495
|
|
|
84533
|
-
this .modelViewMatrix .
|
|
84496
|
+
this .modelViewMatrix .push (modelViewMatrix);
|
|
84534
84497
|
|
|
84535
84498
|
// Get shadow buffer from browser.
|
|
84536
84499
|
|
|
@@ -84571,8 +84534,8 @@ Object .assign (SpotLightContainer .prototype,
|
|
|
84571
84534
|
this .shadowBuffer .bind ();
|
|
84572
84535
|
|
|
84573
84536
|
renderObject .getViewVolumes () .push (this .viewVolume .set (projectionMatrix, viewport, viewport));
|
|
84574
|
-
renderObject .getProjectionMatrix () .
|
|
84575
|
-
renderObject .getModelViewMatrix () .
|
|
84537
|
+
renderObject .getProjectionMatrix () .push (projectionMatrix);
|
|
84538
|
+
renderObject .getModelViewMatrix () .push (invLightSpaceMatrix);
|
|
84576
84539
|
|
|
84577
84540
|
renderObject .render (Rendering_TraverseType .SHADOW, Grouping_X3DGroupingNode .prototype .traverse, this .groupNode);
|
|
84578
84541
|
|
|
@@ -84597,7 +84560,10 @@ Object .assign (SpotLightContainer .prototype,
|
|
|
84597
84560
|
if (!this .shadowBuffer)
|
|
84598
84561
|
return;
|
|
84599
84562
|
|
|
84600
|
-
this .shadowMatrix
|
|
84563
|
+
this .shadowMatrix
|
|
84564
|
+
.assign (renderObject .getCameraSpaceMatrixArray ())
|
|
84565
|
+
.multRight (this .invLightSpaceProjectionMatrix);
|
|
84566
|
+
|
|
84601
84567
|
this .shadowMatrixArray .set (this .shadowMatrix);
|
|
84602
84568
|
},
|
|
84603
84569
|
setShaderUniforms (gl, shaderObject)
|
|
@@ -90553,7 +90519,7 @@ mediump samplerCube textureCube;
|
|
|
90553
90519
|
|
|
90554
90520
|
/* harmony default export */ const MaterialTextures = (x_ite_Namespace .add ("MaterialTextures", MaterialTextures_default_));
|
|
90555
90521
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
|
|
90556
|
-
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(
|
|
90522
|
+
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(386);
|
|
90557
90523
|
/*******************************************************************************
|
|
90558
90524
|
*
|
|
90559
90525
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -90857,8 +90823,10 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
90857
90823
|
{
|
|
90858
90824
|
const uniform = gl .getUniformLocation (program, "x3d_TextureMatrix[" + i + "]");
|
|
90859
90825
|
|
|
90860
|
-
if (uniform
|
|
90861
|
-
|
|
90826
|
+
if (uniform === null)
|
|
90827
|
+
break;
|
|
90828
|
+
|
|
90829
|
+
this .x3d_TextureMatrix [i] = uniform;
|
|
90862
90830
|
}
|
|
90863
90831
|
|
|
90864
90832
|
for (let i = 0; i < maxTexCoords; ++ i)
|
|
@@ -91753,7 +91721,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91753
91721
|
if (location0 === -1)
|
|
91754
91722
|
return;
|
|
91755
91723
|
|
|
91756
|
-
stride
|
|
91724
|
+
stride ||= 36;
|
|
91757
91725
|
|
|
91758
91726
|
gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
|
|
91759
91727
|
|
|
@@ -91772,7 +91740,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91772
91740
|
if (location0 === -1)
|
|
91773
91741
|
return;
|
|
91774
91742
|
|
|
91775
|
-
stride
|
|
91743
|
+
stride ||= 64;
|
|
91776
91744
|
|
|
91777
91745
|
gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
|
|
91778
91746
|
|
|
@@ -91895,7 +91863,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91895
91863
|
{
|
|
91896
91864
|
const location0 = this .x3d_InstanceMatrix;
|
|
91897
91865
|
|
|
91898
|
-
stride
|
|
91866
|
+
stride ||= 64; // 4 Bytes * 16
|
|
91899
91867
|
|
|
91900
91868
|
gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
|
|
91901
91869
|
|
|
@@ -91912,7 +91880,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91912
91880
|
{
|
|
91913
91881
|
const location0 = this .x3d_InstanceNormalMatrix;
|
|
91914
91882
|
|
|
91915
|
-
stride
|
|
91883
|
+
stride ||= 36; // 4 Bytes * 9
|
|
91916
91884
|
|
|
91917
91885
|
gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
|
|
91918
91886
|
|
|
@@ -93381,12 +93349,6 @@ const ShaderSource_default_ = ShaderSource;
|
|
|
93381
93349
|
|
|
93382
93350
|
|
|
93383
93351
|
const Fragment1_glsl_default_ = /* glsl */ `
|
|
93384
|
-
#if defined(X3D_NORMAL_TEXTURE)
|
|
93385
|
-
#extension GL_OES_standard_derivatives:enable
|
|
93386
|
-
#endif
|
|
93387
|
-
#if defined(X3D_LOGARITHMIC_DEPTH_BUFFER)
|
|
93388
|
-
#extension GL_EXT_frag_depth:enable
|
|
93389
|
-
#endif
|
|
93390
93352
|
#if defined(X3D_ALPHA_MODE_MASK)
|
|
93391
93353
|
uniform float x3d_AlphaCutoff;
|
|
93392
93354
|
#endif
|
|
@@ -93448,6 +93410,12 @@ clip();
|
|
|
93448
93410
|
setPointTexCoords();
|
|
93449
93411
|
#endif
|
|
93450
93412
|
vec4 finalColor=getMaterialColor();
|
|
93413
|
+
#if defined(X3D_ALPHA_MODE_OPAQUE)
|
|
93414
|
+
finalColor.a=1.0;
|
|
93415
|
+
#endif
|
|
93416
|
+
#if defined(X3D_ALPHA_MODE_MASK)
|
|
93417
|
+
if(finalColor.a<x3d_AlphaCutoff)discard;finalColor.a=1.0;
|
|
93418
|
+
#endif
|
|
93451
93419
|
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93452
93420
|
finalColor=getPointColor(finalColor);
|
|
93453
93421
|
#endif
|
|
@@ -93457,12 +93425,6 @@ finalColor=getHatchColor(finalColor);
|
|
|
93457
93425
|
#if defined(X3D_FOG)
|
|
93458
93426
|
finalColor.rgb=getFogColor(finalColor.rgb);
|
|
93459
93427
|
#endif
|
|
93460
|
-
#if defined(X3D_ALPHA_MODE_OPAQUE)
|
|
93461
|
-
finalColor.a=1.0;
|
|
93462
|
-
#endif
|
|
93463
|
-
#if defined(X3D_ALPHA_MODE_MASK)
|
|
93464
|
-
if(finalColor.a<x3d_AlphaCutoff)discard;finalColor.a=1.0;
|
|
93465
|
-
#endif
|
|
93466
93428
|
finalColor.rgb=toneMap(finalColor.rgb);gl_FragColor=finalColor;
|
|
93467
93429
|
#if defined(X3D_LOGARITHMIC_DEPTH_BUFFER)
|
|
93468
93430
|
gl_FragDepthEXT=log2(depth)*x3d_LogarithmicFarFactor1_2;
|
|
@@ -93503,7 +93465,43 @@ return texCoord;
|
|
|
93503
93465
|
#else
|
|
93504
93466
|
return texCoord0;
|
|
93505
93467
|
#endif
|
|
93506
|
-
}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){
|
|
93468
|
+
}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){
|
|
93469
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93470
|
+
vec2 N=normalize(normal).xy;
|
|
93471
|
+
#else
|
|
93472
|
+
vec2 N=normalize(gl_FrontFacing?normal:-normal).xy;
|
|
93473
|
+
#endif
|
|
93474
|
+
return vec4(N*0.5+0.5,0.0,1.0);}else if(mode==x3d_CameraSpaceNormal){
|
|
93475
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93476
|
+
vec3 N=normalize(normal);
|
|
93477
|
+
#else
|
|
93478
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
93479
|
+
#endif
|
|
93480
|
+
return vec4(N,1.0);}else if(mode==x3d_CameraSpacePosition){return vec4(vertex,1.0);}else if(mode==x3d_CameraSpaceReflectionVector){
|
|
93481
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93482
|
+
vec3 N=normalize(normal);
|
|
93483
|
+
#else
|
|
93484
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
93485
|
+
#endif
|
|
93486
|
+
return vec4(reflect(normalize(vertex),-N),1.0);}else if(mode==x3d_SphereLocal){
|
|
93487
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93488
|
+
vec2 N=normalize(localNormal).xy;
|
|
93489
|
+
#else
|
|
93490
|
+
vec2 N=normalize(gl_FrontFacing?localNormal:-localNormal).xy;
|
|
93491
|
+
#endif
|
|
93492
|
+
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){
|
|
93493
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93494
|
+
vec3 N=normalize(normal);
|
|
93495
|
+
#else
|
|
93496
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
93497
|
+
#endif
|
|
93498
|
+
float eta=textureCoordinateGenerator.parameter[0];return vec4(refract(normalize(vertex),-N,eta),1.0);}else if(mode==x3d_SphereReflectLocal){
|
|
93499
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93500
|
+
vec3 N=normalize(localNormal);
|
|
93501
|
+
#else
|
|
93502
|
+
vec3 N=normalize(gl_FrontFacing?localNormal:-localNormal);
|
|
93503
|
+
#endif
|
|
93504
|
+
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;
|
|
93507
93505
|
${Array .from ({ length: maxTexCoords }, (_, i) => /* glsl */ `
|
|
93508
93506
|
#if X3D_NUM_TEXTURE_COORDINATES > ${i}
|
|
93509
93507
|
${i === 0 ? "" : "else"} if (textureCoordinateMapping == ${i})
|
|
@@ -93569,7 +93567,13 @@ textureColor = texture2D (x3d_TextureProjectorTexture [${i}], texCoord);
|
|
|
93569
93567
|
}
|
|
93570
93568
|
#endif
|
|
93571
93569
|
`) .join ("\n")}
|
|
93572
|
-
return textureColor;}vec3 getTextureProjectorColor(){vec3 currentColor=vec3(1.0);
|
|
93570
|
+
return textureColor;}vec3 getTextureProjectorColor(){vec3 currentColor=vec3(1.0);
|
|
93571
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
93572
|
+
vec3 N=normal;
|
|
93573
|
+
#else
|
|
93574
|
+
vec3 N=gl_FrontFacing?normal:-normal;
|
|
93575
|
+
#endif
|
|
93576
|
+
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);
|
|
93573
93577
|
#if defined(X3D_COLORSPACE_SRGB)
|
|
93574
93578
|
if(bool(x3d_TextureProjectorParams[i].z))T=linearToSRGB(T);
|
|
93575
93579
|
#elif defined(X3D_COLORSPACE_LINEAR_WHEN_PHYSICAL_MATERIAL)
|
|
@@ -93790,6 +93794,12 @@ setPointTexCoords();
|
|
|
93790
93794
|
setTexCoords();
|
|
93791
93795
|
#endif
|
|
93792
93796
|
vec4 finalColor=getMaterialColor();
|
|
93797
|
+
#if defined(X3D_ALPHA_MODE_OPAQUE)
|
|
93798
|
+
finalColor.a=1.0;
|
|
93799
|
+
#endif
|
|
93800
|
+
#if defined(X3D_ALPHA_MODE_MASK)
|
|
93801
|
+
if(finalColor.a<x3d_AlphaCutoff)discard;finalColor.a=1.0;
|
|
93802
|
+
#endif
|
|
93793
93803
|
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93794
93804
|
finalColor=getPointColor(finalColor);
|
|
93795
93805
|
#endif
|
|
@@ -93799,12 +93809,6 @@ finalColor=getHatchColor(finalColor);
|
|
|
93799
93809
|
#if defined(X3D_FOG)
|
|
93800
93810
|
finalColor.rgb=getFogColor(finalColor.rgb);
|
|
93801
93811
|
#endif
|
|
93802
|
-
#if defined(X3D_ALPHA_MODE_OPAQUE)
|
|
93803
|
-
finalColor.a=1.0;
|
|
93804
|
-
#endif
|
|
93805
|
-
#if defined(X3D_ALPHA_MODE_MASK)
|
|
93806
|
-
if(finalColor.a<x3d_AlphaCutoff)discard;finalColor.a=1.0;
|
|
93807
|
-
#endif
|
|
93808
93812
|
finalColor.rgb=toneMap(finalColor.rgb);
|
|
93809
93813
|
#if defined(X3D_ORDER_INDEPENDENT_TRANSPARENCY)
|
|
93810
93814
|
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);
|
|
@@ -93889,7 +93893,10 @@ t=normalize(TBN[0]);b=normalize(TBN[1]);ng=normalize(TBN[2]);
|
|
|
93889
93893
|
#else
|
|
93890
93894
|
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);
|
|
93891
93895
|
#endif
|
|
93892
|
-
if(
|
|
93896
|
+
#if defined(X3D_GEOMETRY_2D)||defined(X3D_GEOMETRY_3D)
|
|
93897
|
+
if(gl_FrontFacing==false){t=-t;b=-b;ng=-ng;}
|
|
93898
|
+
#endif
|
|
93899
|
+
NormalInfo info;info.ng=ng;
|
|
93893
93900
|
#if defined(X3D_NORMAL_TEXTURE)
|
|
93894
93901
|
#if __VERSION__==100
|
|
93895
93902
|
#if defined(X3D_NORMAL_TEXTURE_2D)
|
|
@@ -93949,6 +93956,7 @@ float rand(const in vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*4
|
|
|
93949
93956
|
const Point2_glsl_default_ = /* glsl */ `
|
|
93950
93957
|
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93951
93958
|
#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES)
|
|
93959
|
+
#if!defined(X3D_DEPTH_SHADER)
|
|
93952
93960
|
void setPointTexCoords(){vec4 texCoord=vec4(gl_PointCoord.x,1.0-gl_PointCoord.y,0.0,1.0);
|
|
93953
93961
|
${Array .from ({ length: maxTexCoords }, (_, i) => /* glsl */ `
|
|
93954
93962
|
#if X3D_NUM_TEXTURE_COORDINATES > ${i}
|
|
@@ -93960,14 +93968,15 @@ texCoords [${i}] = texCoord;
|
|
|
93960
93968
|
#endif
|
|
93961
93969
|
`) .join ("\n")}
|
|
93962
93970
|
}
|
|
93971
|
+
#endif
|
|
93963
93972
|
#define getPointColor(color)(color)
|
|
93964
93973
|
#else
|
|
93965
|
-
#define setPointTexCoords()
|
|
93966
93974
|
#if __VERSION__==100
|
|
93967
93975
|
varying float pointSize;
|
|
93968
93976
|
#else
|
|
93969
93977
|
in float pointSize;
|
|
93970
93978
|
#endif
|
|
93979
|
+
#define setPointTexCoords()
|
|
93971
93980
|
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;}
|
|
93972
93981
|
#endif
|
|
93973
93982
|
#endif
|
|
@@ -93997,63 +94006,29 @@ return pointSize+1.0-step(pointSize,1.0);
|
|
|
93997
94006
|
|
|
93998
94007
|
/* harmony default export */ const PointSize2_glsl = (x_ite_Namespace .add ("PointSize2.glsl", PointSize2_glsl_default_));
|
|
93999
94008
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Shadow2.glsl.js
|
|
94009
|
+
const maxLights = 8;
|
|
94010
|
+
|
|
94000
94011
|
const Shadow2_glsl_default_ = /* glsl */ `
|
|
94001
94012
|
#if defined(X3D_FRAGMENT_SHADER)&&defined(X3D_SHADOWS)
|
|
94002
94013
|
uniform sampler2D x3d_ShadowMap[X3D_NUM_LIGHTS];
|
|
94003
94014
|
#if __VERSION__==100
|
|
94004
94015
|
float getShadowDepth(const in int index,const in vec2 shadowCoord){
|
|
94005
|
-
|
|
94006
|
-
if
|
|
94007
|
-
|
|
94008
|
-
|
|
94009
|
-
if(index==1)return texture2D(x3d_ShadowMap[1],shadowCoord).r;
|
|
94010
|
-
#endif
|
|
94011
|
-
#if X3D_NUM_LIGHTS>2
|
|
94012
|
-
if(index==2)return texture2D(x3d_ShadowMap[2],shadowCoord).r;
|
|
94013
|
-
#endif
|
|
94014
|
-
#if X3D_NUM_LIGHTS>3
|
|
94015
|
-
if(index==3)return texture2D(x3d_ShadowMap[3],shadowCoord).r;
|
|
94016
|
-
#endif
|
|
94017
|
-
#if X3D_NUM_LIGHTS>4
|
|
94018
|
-
if(index==4)return texture2D(x3d_ShadowMap[4],shadowCoord).r;
|
|
94019
|
-
#endif
|
|
94020
|
-
#if X3D_NUM_LIGHTS>5
|
|
94021
|
-
if(index==5)return texture2D(x3d_ShadowMap[5],shadowCoord).r;
|
|
94022
|
-
#endif
|
|
94023
|
-
#if X3D_NUM_LIGHTS>6
|
|
94024
|
-
if(index==6)return texture2D(x3d_ShadowMap[6],shadowCoord).r;
|
|
94025
|
-
#endif
|
|
94026
|
-
#if X3D_NUM_LIGHTS>7
|
|
94027
|
-
if(index==7)return texture2D(x3d_ShadowMap[7],shadowCoord).r;
|
|
94016
|
+
${Array .from ({ length: maxLights }, (_, i) => /* glsl */ `
|
|
94017
|
+
#if X3D_NUM_LIGHTS > ${i}
|
|
94018
|
+
if (index == ${i})
|
|
94019
|
+
return texture2D (x3d_ShadowMap [${i}], shadowCoord) .r;
|
|
94028
94020
|
#endif
|
|
94021
|
+
`) .join ("\n")}
|
|
94029
94022
|
return 0.0;}
|
|
94030
94023
|
#else
|
|
94031
94024
|
float getShadowDepth(const in int index,const in vec2 shadowCoord){switch(index){
|
|
94032
|
-
|
|
94033
|
-
|
|
94034
|
-
|
|
94035
|
-
|
|
94036
|
-
case 1:{return texture(x3d_ShadowMap[1],shadowCoord).r;}
|
|
94037
|
-
#endif
|
|
94038
|
-
#if X3D_NUM_LIGHTS>2
|
|
94039
|
-
case 2:{return texture(x3d_ShadowMap[2],shadowCoord).r;}
|
|
94040
|
-
#endif
|
|
94041
|
-
#if X3D_NUM_LIGHTS>3
|
|
94042
|
-
case 3:{return texture(x3d_ShadowMap[3],shadowCoord).r;}
|
|
94043
|
-
#endif
|
|
94044
|
-
#if X3D_NUM_LIGHTS>4
|
|
94045
|
-
case 4:{return texture(x3d_ShadowMap[4],shadowCoord).r;}
|
|
94046
|
-
#endif
|
|
94047
|
-
#if X3D_NUM_LIGHTS>5
|
|
94048
|
-
case 5:{return texture(x3d_ShadowMap[5],shadowCoord).r;}
|
|
94049
|
-
#endif
|
|
94050
|
-
#if X3D_NUM_LIGHTS>6
|
|
94051
|
-
case 6:{return texture(x3d_ShadowMap[6],shadowCoord).r;}
|
|
94052
|
-
#endif
|
|
94053
|
-
#if X3D_NUM_LIGHTS>7
|
|
94054
|
-
case 7:{return texture(x3d_ShadowMap[7],shadowCoord).r;}
|
|
94025
|
+
${Array .from ({ length: maxLights }, (_, i) => /* glsl */ `
|
|
94026
|
+
#if X3D_NUM_LIGHTS > ${i}
|
|
94027
|
+
case ${i}:
|
|
94028
|
+
return texture (x3d_ShadowMap [${i}], shadowCoord) .r;
|
|
94055
94029
|
#endif
|
|
94056
|
-
|
|
94030
|
+
`) .join ("\n")}
|
|
94031
|
+
}return 0.0;}
|
|
94057
94032
|
#endif
|
|
94058
94033
|
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;
|
|
94059
94034
|
#if defined(X3D_PCF_FILTERING)||defined(X3D_PCF_SOFT_FILTERING)
|
|
@@ -94154,7 +94129,43 @@ ${Array .from ({ length: maxTexCoords }, (_, i) => /* glsl */ `
|
|
|
94154
94129
|
texCoords [${i}] = texCoord${i};
|
|
94155
94130
|
#endif
|
|
94156
94131
|
`) .join ("\n")}
|
|
94157
|
-
}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:{
|
|
94132
|
+
}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:{
|
|
94133
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94134
|
+
vec2 N=normalize(normal).xy;
|
|
94135
|
+
#else
|
|
94136
|
+
vec2 N=normalize(gl_FrontFacing?normal:-normal).xy;
|
|
94137
|
+
#endif
|
|
94138
|
+
return vec4(N*0.5+0.5,0.0,1.0);}case x3d_CameraSpaceNormal:{
|
|
94139
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94140
|
+
vec3 N=normalize(normal);
|
|
94141
|
+
#else
|
|
94142
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
94143
|
+
#endif
|
|
94144
|
+
return vec4(N,1.0);}case x3d_CameraSpacePosition:{return vec4(vertex,1.0);}case x3d_CameraSpaceReflectionVector:{
|
|
94145
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94146
|
+
vec3 N=normalize(normal);
|
|
94147
|
+
#else
|
|
94148
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
94149
|
+
#endif
|
|
94150
|
+
return vec4(reflect(normalize(vertex),-N),1.0);}case x3d_SphereLocal:{
|
|
94151
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94152
|
+
vec2 N=normalize(localNormal).xy;
|
|
94153
|
+
#else
|
|
94154
|
+
vec2 N=normalize(gl_FrontFacing?localNormal:-localNormal).xy;
|
|
94155
|
+
#endif
|
|
94156
|
+
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:{
|
|
94157
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94158
|
+
vec3 N=normalize(normal);
|
|
94159
|
+
#else
|
|
94160
|
+
vec3 N=normalize(gl_FrontFacing?normal:-normal);
|
|
94161
|
+
#endif
|
|
94162
|
+
float eta=textureCoordinateGenerator.parameter[0];return vec4(refract(normalize(vertex),-N,eta),1.0);}case x3d_SphereReflectLocal:{
|
|
94163
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94164
|
+
vec3 N=normalize(localNormal);
|
|
94165
|
+
#else
|
|
94166
|
+
vec3 N=normalize(gl_FrontFacing?localNormal:-localNormal);
|
|
94167
|
+
#endif
|
|
94168
|
+
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;
|
|
94158
94169
|
#if defined(X3D_GEOMETRY_2D)
|
|
94159
94170
|
if(gl_FrontFacing==false)texCoord.s=1.0-texCoord.s;
|
|
94160
94171
|
#endif
|
|
@@ -94216,7 +94227,13 @@ textureColor = texture (x3d_TextureProjectorTexture [${i}], texCoord);
|
|
|
94216
94227
|
break;
|
|
94217
94228
|
#endif
|
|
94218
94229
|
`) .join ("\n")}
|
|
94219
|
-
}return textureColor;}vec3 getTextureProjectorColor(){vec3 currentColor=vec3(1.0);
|
|
94230
|
+
}return textureColor;}vec3 getTextureProjectorColor(){vec3 currentColor=vec3(1.0);
|
|
94231
|
+
#if defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D)
|
|
94232
|
+
vec3 N=normal;
|
|
94233
|
+
#else
|
|
94234
|
+
vec3 N=gl_FrontFacing?normal:-normal;
|
|
94235
|
+
#endif
|
|
94236
|
+
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);
|
|
94220
94237
|
#if defined(X3D_COLORSPACE_SRGB)
|
|
94221
94238
|
if(bool(x3d_TextureProjectorParams[i].z))T=linearToSRGB(T);
|
|
94222
94239
|
#elif defined(X3D_COLORSPACE_LINEAR_WHEN_PHYSICAL_MATERIAL)
|
|
@@ -94384,8 +94401,10 @@ void main(){
|
|
|
94384
94401
|
clip();
|
|
94385
94402
|
#endif
|
|
94386
94403
|
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
94404
|
+
#if!(defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES))
|
|
94387
94405
|
if(getPointColor(vec4(1.0)).a<0.5)discard;
|
|
94388
94406
|
#endif
|
|
94407
|
+
#endif
|
|
94389
94408
|
gl_FragColor=vec4(gl_FragCoord.z);}`
|
|
94390
94409
|
;
|
|
94391
94410
|
|
|
@@ -94645,8 +94664,10 @@ void main(){
|
|
|
94645
94664
|
clip();
|
|
94646
94665
|
#endif
|
|
94647
94666
|
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
94667
|
+
#if!(defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES))
|
|
94648
94668
|
if(getPointColor(vec4(1.0)).a<0.5)discard;
|
|
94649
94669
|
#endif
|
|
94670
|
+
#endif
|
|
94650
94671
|
x3d_FragColor=vec4(gl_FragCoord.z);}`
|
|
94651
94672
|
;
|
|
94652
94673
|
|
|
@@ -95756,7 +95777,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
95756
95777
|
|
|
95757
95778
|
/* harmony default export */ const Shaders_ShaderCompiler = (x_ite_Namespace .add ("ShaderCompiler", ShaderCompiler_default_));
|
|
95758
95779
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
95759
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
95780
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(386);
|
|
95760
95781
|
/*******************************************************************************
|
|
95761
95782
|
*
|
|
95762
95783
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -96354,7 +96375,7 @@ const X3DAppearanceNode_default_ = X3DAppearanceNode;
|
|
|
96354
96375
|
|
|
96355
96376
|
/* harmony default export */ const Shape_X3DAppearanceNode = (x_ite_Namespace .add ("X3DAppearanceNode", X3DAppearanceNode_default_));
|
|
96356
96377
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/Appearance.js
|
|
96357
|
-
/* provided dependency */ var Appearance_$ = __webpack_require__(
|
|
96378
|
+
/* provided dependency */ var Appearance_$ = __webpack_require__(386);
|
|
96358
96379
|
/*******************************************************************************
|
|
96359
96380
|
*
|
|
96360
96381
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -96542,7 +96563,7 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96542
96563
|
},
|
|
96543
96564
|
set_alphaMode__ ()
|
|
96544
96565
|
{
|
|
96545
|
-
this .alphaMode = Appearance_$.enum (Shape_AlphaMode, this ._alphaMode .getValue ()
|
|
96566
|
+
this .alphaMode = Appearance_$.enum (Shape_AlphaMode, this ._alphaMode .getValue ()) ?? Shape_AlphaMode .AUTO;
|
|
96546
96567
|
|
|
96547
96568
|
this .set_alphaCutoff__ ();
|
|
96548
96569
|
},
|
|
@@ -96554,29 +96575,27 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96554
96575
|
{
|
|
96555
96576
|
this .stylePropertiesNode [0] = Base_X3DCast (Base_X3DConstants .PointProperties, this ._pointProperties);
|
|
96556
96577
|
|
|
96557
|
-
if (
|
|
96558
|
-
|
|
96559
|
-
const browser = this .getBrowser ();
|
|
96578
|
+
if (this .stylePropertiesNode [0])
|
|
96579
|
+
return;
|
|
96560
96580
|
|
|
96561
|
-
|
|
96562
|
-
|
|
96563
|
-
|
|
96581
|
+
const browser = this .getBrowser ();
|
|
96582
|
+
|
|
96583
|
+
if (browser .getRenderingProperty ("ContentScale") !== 1)
|
|
96584
|
+
this .stylePropertiesNode [0] = browser .getDefaultPointProperties ();
|
|
96564
96585
|
},
|
|
96565
96586
|
set_lineProperties__ ()
|
|
96566
96587
|
{
|
|
96567
|
-
|
|
96568
|
-
this .linePropertiesNode ._applied .removeInterest ("set_applied__", this);
|
|
96588
|
+
this .linePropertiesNode ?._applied .removeInterest ("set_applied__", this);
|
|
96569
96589
|
|
|
96570
96590
|
this .linePropertiesNode = Base_X3DCast (Base_X3DConstants .LineProperties, this ._lineProperties);
|
|
96571
96591
|
|
|
96572
|
-
|
|
96573
|
-
this .linePropertiesNode ._applied .addInterest ("set_applied__", this);
|
|
96592
|
+
this .linePropertiesNode ?._applied .addInterest ("set_applied__", this);
|
|
96574
96593
|
|
|
96575
96594
|
this .set_applied__ ();
|
|
96576
96595
|
},
|
|
96577
96596
|
set_applied__ ()
|
|
96578
96597
|
{
|
|
96579
|
-
if (this .linePropertiesNode
|
|
96598
|
+
if (this .linePropertiesNode ?._applied .getValue ())
|
|
96580
96599
|
{
|
|
96581
96600
|
this .stylePropertiesNode [1] = this .linePropertiesNode;
|
|
96582
96601
|
}
|
|
@@ -96592,13 +96611,11 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96592
96611
|
},
|
|
96593
96612
|
set_fillProperties__ ()
|
|
96594
96613
|
{
|
|
96595
|
-
|
|
96596
|
-
this .stylePropertiesNode [2] ._transparent .removeInterest ("set_transparent__", this);
|
|
96614
|
+
this .stylePropertiesNode [2] ?._transparent .removeInterest ("set_transparent__", this);
|
|
96597
96615
|
|
|
96598
96616
|
this .stylePropertiesNode [2] = Base_X3DCast (Base_X3DConstants .FillProperties, this ._fillProperties);
|
|
96599
96617
|
|
|
96600
|
-
|
|
96601
|
-
this .stylePropertiesNode [2] ._transparent .addInterest ("set_transparent__", this);
|
|
96618
|
+
this .stylePropertiesNode [2] ?._transparent .addInterest ("set_transparent__", this);
|
|
96602
96619
|
|
|
96603
96620
|
this .stylePropertiesNode [3] = this .stylePropertiesNode [2];
|
|
96604
96621
|
},
|
|
@@ -96610,16 +96627,11 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96610
96627
|
this .materialNode ._transmission .removeInterest ("set_transmission__", this);
|
|
96611
96628
|
}
|
|
96612
96629
|
|
|
96613
|
-
this .materialNode = Base_X3DCast (Base_X3DConstants .X3DMaterialNode, this ._material)
|
|
96630
|
+
this .materialNode = Base_X3DCast (Base_X3DConstants .X3DMaterialNode, this ._material)
|
|
96631
|
+
?? this .getBrowser () .getDefaultMaterial ();
|
|
96614
96632
|
|
|
96615
|
-
|
|
96616
|
-
|
|
96617
|
-
|
|
96618
|
-
if (this .materialNode)
|
|
96619
|
-
{
|
|
96620
|
-
this .materialNode ._transparent .addInterest ("set_transparent__", this);
|
|
96621
|
-
this .materialNode ._transmission .addInterest ("set_transmission__", this);
|
|
96622
|
-
}
|
|
96633
|
+
this .materialNode ._transparent .addInterest ("set_transparent__", this);
|
|
96634
|
+
this .materialNode ._transmission .addInterest ("set_transmission__", this);
|
|
96623
96635
|
|
|
96624
96636
|
// Depreciated TwoSidedMaterial handling.
|
|
96625
96637
|
|
|
@@ -96628,13 +96640,11 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96628
96640
|
},
|
|
96629
96641
|
set_backMaterial__ ()
|
|
96630
96642
|
{
|
|
96631
|
-
|
|
96632
|
-
this .backMaterialNode ._transparent .removeInterest ("set_transparent__", this);
|
|
96643
|
+
this .backMaterialNode ?._transparent .removeInterest ("set_transparent__", this);
|
|
96633
96644
|
|
|
96634
96645
|
this .backMaterialNode = Base_X3DCast (Base_X3DConstants .X3DOneSidedMaterialNode, this ._backMaterial);
|
|
96635
96646
|
|
|
96636
|
-
|
|
96637
|
-
this .backMaterialNode ._transparent .addInterest ("set_transparent__", this);
|
|
96647
|
+
this .backMaterialNode ?._transparent .addInterest ("set_transparent__", this);
|
|
96638
96648
|
|
|
96639
96649
|
// Depreciated TwoSidedMaterial handling.
|
|
96640
96650
|
|
|
@@ -96665,13 +96675,10 @@ Object .assign (Object .setPrototypeOf (Appearance .prototype, Shape_X3DAppearan
|
|
|
96665
96675
|
},
|
|
96666
96676
|
set_textureTransform__ ()
|
|
96667
96677
|
{
|
|
96668
|
-
|
|
96669
|
-
this .textureTransformNode .removeInterest ("updateTextureTransformMapping", this);
|
|
96670
|
-
|
|
96671
|
-
this .textureTransformNode = Base_X3DCast (Base_X3DConstants .X3DTextureTransformNode, this ._textureTransform);
|
|
96678
|
+
this .textureTransformNode ?.removeInterest ("updateTextureTransformMapping", this);
|
|
96672
96679
|
|
|
96673
|
-
|
|
96674
|
-
|
|
96680
|
+
this .textureTransformNode = Base_X3DCast (Base_X3DConstants .X3DTextureTransformNode, this ._textureTransform)
|
|
96681
|
+
?? this .getBrowser () .getDefaultTextureTransform ();
|
|
96675
96682
|
|
|
96676
96683
|
this .textureTransformNode .addInterest ("updateTextureTransformMapping", this);
|
|
96677
96684
|
|
|
@@ -98739,18 +98746,12 @@ Object .assign (Object .setPrototypeOf (X3DShapeNode .prototype, Core_X3DChildNo
|
|
|
98739
98746
|
this .appearanceNode ._transmission .removeInterest ("set_transmission__", this);
|
|
98740
98747
|
}
|
|
98741
98748
|
|
|
98742
|
-
this .appearanceNode = Base_X3DCast (Base_X3DConstants .X3DAppearanceNode, this ._appearance)
|
|
98749
|
+
this .appearanceNode = Base_X3DCast (Base_X3DConstants .X3DAppearanceNode, this ._appearance)
|
|
98750
|
+
?? this .getBrowser () .getDefaultAppearance ();
|
|
98743
98751
|
|
|
98744
|
-
|
|
98745
|
-
|
|
98746
|
-
|
|
98747
|
-
this .appearanceNode ._transparent .addInterest ("set_transparent__", this);
|
|
98748
|
-
this .appearanceNode ._transmission .addInterest ("set_transmission__", this);
|
|
98749
|
-
}
|
|
98750
|
-
else
|
|
98751
|
-
{
|
|
98752
|
-
this .appearanceNode = this .getBrowser () .getDefaultAppearance ();
|
|
98753
|
-
}
|
|
98752
|
+
this .appearanceNode ._alphaMode .addInterest ("set_transparent__", this);
|
|
98753
|
+
this .appearanceNode ._transparent .addInterest ("set_transparent__", this);
|
|
98754
|
+
this .appearanceNode ._transmission .addInterest ("set_transmission__", this);
|
|
98754
98755
|
|
|
98755
98756
|
this .set_transparent__ ();
|
|
98756
98757
|
this .set_transmission__ ();
|
|
@@ -104609,8 +104610,8 @@ const GifMedia_default_ = GifMedia;
|
|
|
104609
104610
|
|
|
104610
104611
|
/* harmony default export */ const Texturing_GifMedia = (x_ite_Namespace .add ("GifMedia", GifMedia_default_));
|
|
104611
104612
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
104612
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
104613
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
104613
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(386);
|
|
104614
|
+
/* provided dependency */ var SuperGif = __webpack_require__(141);
|
|
104614
104615
|
/*******************************************************************************
|
|
104615
104616
|
*
|
|
104616
104617
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -107078,7 +107079,7 @@ const gettext_default_ = (string) => locale .get (string) || string;
|
|
|
107078
107079
|
|
|
107079
107080
|
/* harmony default export */ const gettext = (x_ite_Namespace .add ("gettext", gettext_default_));
|
|
107080
107081
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
|
|
107081
|
-
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(
|
|
107082
|
+
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(386);
|
|
107082
107083
|
/*******************************************************************************
|
|
107083
107084
|
*
|
|
107084
107085
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -107708,7 +107709,7 @@ const TextCompression_default_ = TextCompression;
|
|
|
107708
107709
|
|
|
107709
107710
|
/* harmony default export */ const Core_TextCompression = (x_ite_Namespace .add ("TextCompression", TextCompression_default_));
|
|
107710
107711
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserOptions.js
|
|
107711
|
-
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(
|
|
107712
|
+
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(386);
|
|
107712
107713
|
/*******************************************************************************
|
|
107713
107714
|
*
|
|
107714
107715
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -107941,7 +107942,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
107941
107942
|
primitiveQuality = value .getValue () .toUpperCase ();
|
|
107942
107943
|
|
|
107943
107944
|
this .localStorage .PrimitiveQuality = primitiveQuality;
|
|
107944
|
-
this .primitiveQuality = BrowserOptions_$.enum (Core_PrimitiveQuality, primitiveQuality
|
|
107945
|
+
this .primitiveQuality = BrowserOptions_$.enum (Core_PrimitiveQuality, primitiveQuality) ?? Core_PrimitiveQuality .MEDIUM;
|
|
107945
107946
|
|
|
107946
107947
|
if (typeof browser .setPrimitiveQuality2D === "function")
|
|
107947
107948
|
browser .setPrimitiveQuality2D (this .primitiveQuality);
|
|
@@ -107956,7 +107957,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
107956
107957
|
textureQuality = value .getValue () .toUpperCase ();
|
|
107957
107958
|
|
|
107958
107959
|
this .localStorage .TextureQuality = textureQuality;
|
|
107959
|
-
this .textureQuality = BrowserOptions_$.enum (Core_TextureQuality, textureQuality
|
|
107960
|
+
this .textureQuality = BrowserOptions_$.enum (Core_TextureQuality, textureQuality) ?? Core_TextureQuality .MEDIUM;
|
|
107960
107961
|
|
|
107961
107962
|
if (typeof browser .setTextureQuality === "function")
|
|
107962
107963
|
browser .setTextureQuality (this .textureQuality);
|
|
@@ -107977,7 +107978,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
107977
107978
|
browser = this .getBrowser (),
|
|
107978
107979
|
shading = value .getValue () .toUpperCase () .replace ("POINTSET", "POINT");
|
|
107979
107980
|
|
|
107980
|
-
this .shading = BrowserOptions_$.enum (Core_Shading, shading
|
|
107981
|
+
this .shading = BrowserOptions_$.enum (Core_Shading, shading) ?? Core_Shading .GOURAUD;
|
|
107981
107982
|
|
|
107982
107983
|
browser .getRenderingProperties () ._Shading = strings [this .shading];
|
|
107983
107984
|
browser .setShading (this .shading);
|
|
@@ -108355,7 +108356,7 @@ const RenderingProperties_default_ = RenderingProperties;
|
|
|
108355
108356
|
|
|
108356
108357
|
/* harmony default export */ const Core_RenderingProperties = (x_ite_Namespace .add ("RenderingProperties", RenderingProperties_default_));
|
|
108357
108358
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
|
|
108358
|
-
/* provided dependency */ var Notification_$ = __webpack_require__(
|
|
108359
|
+
/* provided dependency */ var Notification_$ = __webpack_require__(386);
|
|
108359
108360
|
/*******************************************************************************
|
|
108360
108361
|
*
|
|
108361
108362
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -108477,8 +108478,8 @@ const Notification_default_ = Notification;
|
|
|
108477
108478
|
|
|
108478
108479
|
/* harmony default export */ const Core_Notification = (x_ite_Namespace .add ("Notification", Notification_default_));
|
|
108479
108480
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
|
|
108480
|
-
/* provided dependency */ var jquery_fullscreen = __webpack_require__(
|
|
108481
|
-
/* provided dependency */ var ContextMenu_$ = __webpack_require__(
|
|
108481
|
+
/* provided dependency */ var jquery_fullscreen = __webpack_require__(306);
|
|
108482
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(386);
|
|
108482
108483
|
/*******************************************************************************
|
|
108483
108484
|
*
|
|
108484
108485
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -111213,7 +111214,7 @@ const DataStorage_default_ = DataStorage;
|
|
|
111213
111214
|
|
|
111214
111215
|
/* harmony default export */ const Utility_DataStorage = (x_ite_Namespace .add ("DataStorage", DataStorage_default_));
|
|
111215
111216
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
111216
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
111217
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(386);
|
|
111217
111218
|
/*******************************************************************************
|
|
111218
111219
|
*
|
|
111219
111220
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -113824,8 +113825,8 @@ const X3DViewer_default_ = X3DViewer;
|
|
|
113824
113825
|
|
|
113825
113826
|
/* harmony default export */ const Navigation_X3DViewer = (x_ite_Namespace .add ("X3DViewer", X3DViewer_default_));
|
|
113826
113827
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
113827
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
113828
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
113828
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(336);
|
|
113829
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(386);
|
|
113829
113830
|
/*******************************************************************************
|
|
113830
113831
|
*
|
|
113831
113832
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -114740,8 +114741,8 @@ const ExamineViewer_default_ = ExamineViewer;
|
|
|
114740
114741
|
|
|
114741
114742
|
/* harmony default export */ const Navigation_ExamineViewer = (x_ite_Namespace .add ("ExamineViewer", ExamineViewer_default_));
|
|
114742
114743
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
114743
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
114744
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
114744
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(336);
|
|
114745
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(386);
|
|
114745
114746
|
/*******************************************************************************
|
|
114746
114747
|
*
|
|
114747
114748
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -115756,8 +115757,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
115756
115757
|
|
|
115757
115758
|
/* harmony default export */ const Navigation_FlyViewer = (x_ite_Namespace .add ("FlyViewer", FlyViewer_default_));
|
|
115758
115759
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
115759
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
115760
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
115760
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(336);
|
|
115761
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(386);
|
|
115761
115762
|
/*******************************************************************************
|
|
115762
115763
|
*
|
|
115763
115764
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -116086,8 +116087,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
116086
116087
|
|
|
116087
116088
|
/* harmony default export */ const Navigation_NoneViewer = (x_ite_Namespace .add ("NoneViewer", NoneViewer_default_));
|
|
116088
116089
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
116089
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
116090
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
116090
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(336);
|
|
116091
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(386);
|
|
116091
116092
|
/*******************************************************************************
|
|
116092
116093
|
*
|
|
116093
116094
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -117232,8 +117233,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
117232
117233
|
|
|
117233
117234
|
/* harmony default export */ const Picking_X3DPickingContext = (x_ite_Namespace .add ("X3DPickingContext", X3DPickingContext_default_));
|
|
117234
117235
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
117235
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
117236
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
117236
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(336);
|
|
117237
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(386);
|
|
117237
117238
|
/*******************************************************************************
|
|
117238
117239
|
*
|
|
117239
117240
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118086,6 +118087,8 @@ Object .assign (X3DPointingDeviceSensorContext .prototype,
|
|
|
118086
118087
|
geometryContext = shapeNode .getGeometryContext (),
|
|
118087
118088
|
options = [ ];
|
|
118088
118089
|
|
|
118090
|
+
options .push ("X3D_DEPTH_SHADER");
|
|
118091
|
+
|
|
118089
118092
|
if (geometryContext .hasNormals)
|
|
118090
118093
|
options .push ("X3D_NORMALS");
|
|
118091
118094
|
|
|
@@ -118111,6 +118114,12 @@ Object .assign (X3DPointingDeviceSensorContext .prototype,
|
|
|
118111
118114
|
if (appearanceNode .getStyleProperties (geometryContext .geometryType))
|
|
118112
118115
|
options .push ("X3D_STYLE_PROPERTIES");
|
|
118113
118116
|
|
|
118117
|
+
if (+appearanceNode .getMaterial () .getTextureBits ())
|
|
118118
|
+
options .push ("X3D_MATERIAL_TEXTURES");
|
|
118119
|
+
|
|
118120
|
+
if (+appearanceNode .getTextureBits ())
|
|
118121
|
+
options .push ("X3D_TEXTURE");
|
|
118122
|
+
|
|
118114
118123
|
if (humanoidNode)
|
|
118115
118124
|
{
|
|
118116
118125
|
options .push ("X3D_SKINNING");
|
|
@@ -118642,10 +118651,16 @@ class Lock
|
|
|
118642
118651
|
|
|
118643
118652
|
const p = new Promise (async (resolve, reject) =>
|
|
118644
118653
|
{
|
|
118645
|
-
|
|
118654
|
+
try
|
|
118655
|
+
{
|
|
118646
118656
|
await Promise .allSettled (current);
|
|
118647
118657
|
|
|
118648
|
-
|
|
118658
|
+
resolve (await callback ());
|
|
118659
|
+
}
|
|
118660
|
+
catch (error)
|
|
118661
|
+
{
|
|
118662
|
+
reject (error);
|
|
118663
|
+
}
|
|
118649
118664
|
})
|
|
118650
118665
|
.finally (() =>
|
|
118651
118666
|
{
|
|
@@ -118666,7 +118681,7 @@ const Lock_default_ = Lock;
|
|
|
118666
118681
|
|
|
118667
118682
|
/* harmony default export */ const Utility_Lock = (x_ite_Namespace .add ("Lock", Lock_default_));
|
|
118668
118683
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
118669
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
118684
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(386);
|
|
118670
118685
|
/*******************************************************************************
|
|
118671
118686
|
*
|
|
118672
118687
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118780,6 +118795,7 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
118780
118795
|
gl .enable (gl .DEPTH_TEST);
|
|
118781
118796
|
gl .depthFunc (gl .LEQUAL);
|
|
118782
118797
|
gl .clearDepth (1);
|
|
118798
|
+
gl .sampleCoverage (1.0, false);
|
|
118783
118799
|
|
|
118784
118800
|
gl .blendFuncSeparate (gl .SRC_ALPHA, gl .ONE_MINUS_SRC_ALPHA, gl .ONE, gl .ONE_MINUS_SRC_ALPHA);
|
|
118785
118801
|
gl .blendEquationSeparate (gl .FUNC_ADD, gl .FUNC_ADD);
|
|
@@ -119199,23 +119215,29 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
119199
119215
|
if (this [_session] === window)
|
|
119200
119216
|
return;
|
|
119201
119217
|
|
|
119202
|
-
|
|
119203
|
-
|
|
119204
|
-
|
|
119205
|
-
|
|
119206
|
-
|
|
119207
|
-
|
|
119218
|
+
try
|
|
119219
|
+
{
|
|
119220
|
+
await this [_session] .end ();
|
|
119221
|
+
}
|
|
119222
|
+
catch
|
|
119223
|
+
{ }
|
|
119224
|
+
finally
|
|
119225
|
+
{
|
|
119226
|
+
this .endEvents () .removeInterest ("endFrame", this);
|
|
119208
119227
|
|
|
119209
|
-
|
|
119228
|
+
for (const frameBuffer of this [_frameBuffers])
|
|
119229
|
+
frameBuffer .dispose ();
|
|
119210
119230
|
|
|
119211
|
-
|
|
119212
|
-
|
|
119213
|
-
|
|
119214
|
-
|
|
119215
|
-
|
|
119216
|
-
|
|
119231
|
+
this [_frameBuffers] = [ ];
|
|
119232
|
+
this [_session] = window;
|
|
119233
|
+
this [_baseReferenceSpace] = null;
|
|
119234
|
+
this [_referenceSpace] = null;
|
|
119235
|
+
this [_baseLayer] = null;
|
|
119236
|
+
this [_defaultFrameBuffer] = null;
|
|
119237
|
+
this [_pose] = null;
|
|
119217
119238
|
|
|
119218
|
-
|
|
119239
|
+
this .reshape ();
|
|
119240
|
+
}
|
|
119219
119241
|
});
|
|
119220
119242
|
},
|
|
119221
119243
|
getSession ()
|
|
@@ -119276,12 +119298,14 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
119276
119298
|
cameraSpaceMatrix: new Numbers_Matrix4 (),
|
|
119277
119299
|
viewMatrix: new Numbers_Matrix4 (),
|
|
119278
119300
|
matrix: new Numbers_Matrix4 (),
|
|
119301
|
+
inverse: new Numbers_Matrix4 (),
|
|
119279
119302
|
};
|
|
119280
119303
|
|
|
119281
119304
|
pv .projectionMatrix .assign (view .projectionMatrix);
|
|
119282
119305
|
pv .cameraSpaceMatrix .assign (view .transform .matrix);
|
|
119283
119306
|
pv .viewMatrix .assign (view .transform .inverse .matrix);
|
|
119284
119307
|
pv .matrix .assign (pose .transform .matrix) .multRight (view .transform .inverse .matrix);
|
|
119308
|
+
pv .inverse .assign (pv .matrix) .inverse ();
|
|
119285
119309
|
|
|
119286
119310
|
++ v;
|
|
119287
119311
|
}
|
|
@@ -119442,13 +119466,12 @@ const X3DScriptingContext_default_ = X3DScriptingContext;
|
|
|
119442
119466
|
|
|
119443
119467
|
|
|
119444
119468
|
const
|
|
119445
|
-
_wireframe = Symbol (),
|
|
119446
119469
|
_primitiveModes = Symbol (),
|
|
119447
|
-
_shaderNodes = Symbol ()
|
|
119470
|
+
_shaderNodes = Symbol (),
|
|
119471
|
+
_wireframe = Symbol ();
|
|
119448
119472
|
|
|
119449
119473
|
function X3DShadersContext ()
|
|
119450
119474
|
{
|
|
119451
|
-
this [_wireframe] = false;
|
|
119452
119475
|
this [_primitiveModes] = new Map ();
|
|
119453
119476
|
this [_shaderNodes] = new Map ();
|
|
119454
119477
|
}
|
|
@@ -119489,10 +119512,6 @@ Object .assign (X3DShadersContext .prototype,
|
|
|
119489
119512
|
|
|
119490
119513
|
return gl .getParameter (gl .MAX_VARYING_VECTORS);
|
|
119491
119514
|
},
|
|
119492
|
-
getWireframe ()
|
|
119493
|
-
{
|
|
119494
|
-
return this [_wireframe];
|
|
119495
|
-
},
|
|
119496
119515
|
getPrimitiveMode (primitiveMode)
|
|
119497
119516
|
{
|
|
119498
119517
|
return this [_primitiveModes] .get (primitiveMode);
|
|
@@ -119503,26 +119522,43 @@ Object .assign (X3DShadersContext .prototype,
|
|
|
119503
119522
|
},
|
|
119504
119523
|
setShading (type)
|
|
119505
119524
|
{
|
|
119506
|
-
const
|
|
119525
|
+
const
|
|
119526
|
+
gl = this .getContext (),
|
|
119527
|
+
primitiveModes = this [_primitiveModes];
|
|
119528
|
+
|
|
119529
|
+
if (this [_wireframe])
|
|
119530
|
+
{
|
|
119531
|
+
this [_wireframe] = false;
|
|
119532
|
+
|
|
119533
|
+
const ext = gl .getExtension ("WEBGL_polygon_mode");
|
|
119534
|
+
|
|
119535
|
+
ext ?.polygonModeWEBGL (gl .FRONT_AND_BACK, ext .FILL_WEBGL);
|
|
119536
|
+
}
|
|
119507
119537
|
|
|
119508
119538
|
switch (type)
|
|
119509
119539
|
{
|
|
119510
119540
|
case Core_Shading .POINT:
|
|
119511
119541
|
{
|
|
119512
|
-
|
|
119542
|
+
primitiveModes
|
|
119543
|
+
.set (gl .POINTS, gl .POINTS)
|
|
119544
|
+
.set (gl .LINES, gl .POINTS)
|
|
119545
|
+
.set (gl .TRIANGLES, gl .POINTS);
|
|
119513
119546
|
|
|
119514
|
-
this [_primitiveModes] .set (gl .POINTS, gl .POINTS);
|
|
119515
|
-
this [_primitiveModes] .set (gl .LINES, gl .POINTS);
|
|
119516
|
-
this [_primitiveModes] .set (gl .TRIANGLES, gl .POINTS);
|
|
119517
119547
|
break;
|
|
119518
119548
|
}
|
|
119519
119549
|
case Core_Shading .WIREFRAME:
|
|
119520
119550
|
{
|
|
119521
119551
|
this [_wireframe] = true;
|
|
119522
119552
|
|
|
119523
|
-
|
|
119524
|
-
|
|
119525
|
-
|
|
119553
|
+
const ext = gl .getExtension ("WEBGL_polygon_mode");
|
|
119554
|
+
|
|
119555
|
+
ext ?.polygonModeWEBGL (gl .FRONT_AND_BACK, ext .LINE_WEBGL);
|
|
119556
|
+
|
|
119557
|
+
primitiveModes
|
|
119558
|
+
.set (gl .POINTS, gl .POINTS)
|
|
119559
|
+
.set (gl .LINES, gl .LINES)
|
|
119560
|
+
.set (gl .TRIANGLES, gl .TRIANGLES);
|
|
119561
|
+
|
|
119526
119562
|
break;
|
|
119527
119563
|
}
|
|
119528
119564
|
default:
|
|
@@ -119531,15 +119567,19 @@ Object .assign (X3DShadersContext .prototype,
|
|
|
119531
119567
|
// case Shading .GOURAUD:
|
|
119532
119568
|
// case Shading .PHONG:
|
|
119533
119569
|
|
|
119534
|
-
|
|
119535
|
-
|
|
119536
|
-
|
|
119537
|
-
|
|
119538
|
-
|
|
119570
|
+
primitiveModes
|
|
119571
|
+
.set (gl .POINTS, gl .POINTS)
|
|
119572
|
+
.set (gl .LINES, gl .LINES)
|
|
119573
|
+
.set (gl .TRIANGLES, gl .TRIANGLES);
|
|
119574
|
+
|
|
119539
119575
|
break;
|
|
119540
119576
|
}
|
|
119541
119577
|
}
|
|
119542
119578
|
},
|
|
119579
|
+
getWireframe ()
|
|
119580
|
+
{
|
|
119581
|
+
return this [_wireframe];
|
|
119582
|
+
},
|
|
119543
119583
|
createShader (name, vs, fs = vs, options = [ ], uniformNames = [ ], transformFeedbackVaryings = [ ])
|
|
119544
119584
|
{
|
|
119545
119585
|
if (DEVELOPMENT)
|
|
@@ -119964,7 +120004,7 @@ const X3DSoundContext_default_ = X3DSoundContext;
|
|
|
119964
120004
|
|
|
119965
120005
|
/* harmony default export */ const Sound_X3DSoundContext = (x_ite_Namespace .add ("X3DSoundContext", X3DSoundContext_default_));
|
|
119966
120006
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/KTXDecoder.js
|
|
119967
|
-
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(
|
|
120007
|
+
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(386);
|
|
119968
120008
|
const KTXDecoder_default_ = class KTXDecoder
|
|
119969
120009
|
{
|
|
119970
120010
|
constructor (gl, externalKtxlib, scriptDir)
|
|
@@ -121541,7 +121581,7 @@ const Components_default_ = Components;
|
|
|
121541
121581
|
|
|
121542
121582
|
/* harmony default export */ const x_ite_Components = (x_ite_Namespace .add ("Components", Components_default_));
|
|
121543
121583
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
|
|
121544
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
121584
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(386);
|
|
121545
121585
|
/*******************************************************************************
|
|
121546
121586
|
* MIT License
|
|
121547
121587
|
*
|
|
@@ -122807,7 +122847,7 @@ const FieldTypes_default_ = new Configuration_FieldTypesArray (Object .values (x
|
|
|
122807
122847
|
|
|
122808
122848
|
/* harmony default export */ const FieldTypes = (x_ite_Namespace .add ("FieldTypes", FieldTypes_default_));
|
|
122809
122849
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
|
|
122810
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
122850
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(386);
|
|
122811
122851
|
/*******************************************************************************
|
|
122812
122852
|
*
|
|
122813
122853
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -123874,7 +123914,7 @@ const X3DBrowser_default_ = X3DBrowser;
|
|
|
123874
123914
|
|
|
123875
123915
|
/* harmony default export */ const Browser_X3DBrowser = (x_ite_Namespace .add ("X3DBrowser", X3DBrowser_default_));
|
|
123876
123916
|
;// CONCATENATED MODULE: ./src/x_ite/X3DCanvasElement.js
|
|
123877
|
-
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(
|
|
123917
|
+
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(386);
|
|
123878
123918
|
/*******************************************************************************
|
|
123879
123919
|
*
|
|
123880
123920
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -124141,8 +124181,8 @@ const QuickSort_default_ = QuickSort;
|
|
|
124141
124181
|
|
|
124142
124182
|
/* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
|
|
124143
124183
|
;// CONCATENATED MODULE: ./src/lib/jquery.js
|
|
124144
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
124145
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
124184
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(386);
|
|
124185
|
+
/* provided dependency */ var pako = __webpack_require__(514);
|
|
124146
124186
|
Object .assign (jquery_$,
|
|
124147
124187
|
{
|
|
124148
124188
|
decodeText (input)
|
|
@@ -124179,9 +124219,10 @@ Object .assign (jquery_$,
|
|
|
124179
124219
|
console .error (error .message);
|
|
124180
124220
|
}
|
|
124181
124221
|
},
|
|
124182
|
-
enum (object, property
|
|
124222
|
+
enum (object, property)
|
|
124183
124223
|
{
|
|
124184
|
-
|
|
124224
|
+
if (object .hasOwnProperty (property))
|
|
124225
|
+
return object [property];
|
|
124185
124226
|
},
|
|
124186
124227
|
});
|
|
124187
124228
|
|
|
@@ -124218,13 +124259,13 @@ const jquery_default_ = jquery_$;
|
|
|
124218
124259
|
|
|
124219
124260
|
/* harmony default export */ const jquery = (x_ite_Namespace .add ("jquery", jquery_default_));
|
|
124220
124261
|
;// CONCATENATED MODULE: ./src/lib/libtess.js
|
|
124221
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
124262
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(475);
|
|
124222
124263
|
const libtess_default_ = libtess_libtess;
|
|
124223
124264
|
;
|
|
124224
124265
|
|
|
124225
124266
|
/* harmony default export */ const lib_libtess = (x_ite_Namespace .add ("libtess", libtess_default_));
|
|
124226
124267
|
;// CONCATENATED MODULE: ./src/x_ite/X3D.js
|
|
124227
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
124268
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(386);
|
|
124228
124269
|
/*******************************************************************************
|
|
124229
124270
|
*
|
|
124230
124271
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -124528,7 +124569,7 @@ x_ite_Namespace, x_ite_Namespace .Fields,
|
|
|
124528
124569
|
|
|
124529
124570
|
// Assign X3D to global namespace.
|
|
124530
124571
|
|
|
124531
|
-
window [Symbol .for ("X_ITE.X3D-10.
|
|
124572
|
+
window [Symbol .for ("X_ITE.X3D-10.5.0")] = x_ite_X3D;
|
|
124532
124573
|
|
|
124533
124574
|
customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
|
|
124534
124575
|
|