x_ite 10.1.0 → 10.2.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 +18 -18
- package/dist/X3DUOM.xml +69 -11
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +16 -16
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +39 -27
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -13
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +51 -35
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +34 -34
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +23 -23
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +27 -27
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +25 -25
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +26 -26
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +18 -18
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +17 -17
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +38 -38
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +40 -42
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjection.js +15 -15
- package/dist/assets/components/TextureProjection.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +28 -28
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +19 -19
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +1254 -1053
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/assets/fonts/PT_Sans/OFL.txt +94 -0
- package/dist/assets/fonts/PT_Sans/PTSans-Bold.ttf +0 -0
- package/dist/assets/fonts/PT_Sans/PTSans-BoldItalic.ttf +0 -0
- package/dist/assets/fonts/PT_Sans/PTSans-Italic.ttf +0 -0
- package/dist/assets/fonts/PT_Sans/PTSans-Regular.ttf +0 -0
- package/dist/assets/lib/mikktspace_bg.wasm +0 -0
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.d.ts +60 -11
- package/dist/x_ite.js +851 -600
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.min.mjs +1 -1
- package/dist/x_ite.mjs +851 -600
- package/dist/x_ite.zip +0 -0
- package/package.json +1 -1
- /package/dist/assets/fonts/{DroidSerif Apache License.txt → Droid/DroidSerif Apache License.txt} +0 -0
- /package/dist/assets/fonts/{DroidSerif-Bold.ttf → Droid/DroidSerif-Bold.ttf} +0 -0
- /package/dist/assets/fonts/{DroidSerif-BoldItalic.ttf → Droid/DroidSerif-BoldItalic.ttf} +0 -0
- /package/dist/assets/fonts/{DroidSerif-Italic.ttf → Droid/DroidSerif-Italic.ttf} +0 -0
- /package/dist/assets/fonts/{DroidSerif-Regular.ttf → Droid/DroidSerif-Regular.ttf} +0 -0
- /package/dist/assets/fonts/{Ubuntu LICENCE.txt → Ubuntu/Ubuntu LICENCE.txt} +0 -0
- /package/dist/assets/fonts/{Ubuntu-B.ttf → Ubuntu/Ubuntu-B.ttf} +0 -0
- /package/dist/assets/fonts/{Ubuntu-BI.ttf → Ubuntu/Ubuntu-BI.ttf} +0 -0
- /package/dist/assets/fonts/{Ubuntu-R.ttf → Ubuntu/Ubuntu-R.ttf} +0 -0
- /package/dist/assets/fonts/{Ubuntu-RI.ttf → Ubuntu/Ubuntu-RI.ttf} +0 -0
- /package/dist/assets/fonts/{UbuntuMono-B.ttf → Ubuntu/UbuntuMono-B.ttf} +0 -0
- /package/dist/assets/fonts/{UbuntuMono-BI.ttf → Ubuntu/UbuntuMono-BI.ttf} +0 -0
- /package/dist/assets/fonts/{UbuntuMono-R.ttf → Ubuntu/UbuntuMono-R.ttf} +0 -0
- /package/dist/assets/fonts/{UbuntuMono-RI.ttf → Ubuntu/UbuntuMono-RI.ttf} +0 -0
package/dist/x_ite.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* X_ITE v10.
|
|
1
|
+
/* X_ITE v10.2.0 */var __webpack_modules__ = ({
|
|
2
2
|
|
|
3
|
-
/***/
|
|
3
|
+
/***/ 48:
|
|
4
4
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
5
5
|
|
|
6
|
-
/* provided dependency */ var jQuery = __webpack_require__(
|
|
6
|
+
/* provided dependency */ var jQuery = __webpack_require__(812);
|
|
7
7
|
/**
|
|
8
8
|
* @preserve jquery.fullscreen 1.1.5
|
|
9
9
|
* https://github.com/code-lts/jquery-fullscreen-plugin
|
|
@@ -199,7 +199,7 @@ installFullScreenHandlers();
|
|
|
199
199
|
|
|
200
200
|
/***/ }),
|
|
201
201
|
|
|
202
|
-
/***/
|
|
202
|
+
/***/ 354:
|
|
203
203
|
/***/ ((module, exports, __webpack_require__) => {
|
|
204
204
|
|
|
205
205
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -213,7 +213,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
213
213
|
(function (factory) {
|
|
214
214
|
if ( true ) {
|
|
215
215
|
// AMD. Register as an anonymous module.
|
|
216
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(
|
|
216
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(812)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
217
217
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
218
218
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
219
219
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
@@ -424,7 +424,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
424
424
|
|
|
425
425
|
/***/ }),
|
|
426
426
|
|
|
427
|
-
/***/
|
|
427
|
+
/***/ 812:
|
|
428
428
|
/***/ (function(module, exports) {
|
|
429
429
|
|
|
430
430
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -11148,7 +11148,7 @@ return jQuery;
|
|
|
11148
11148
|
|
|
11149
11149
|
/***/ }),
|
|
11150
11150
|
|
|
11151
|
-
/***/
|
|
11151
|
+
/***/ 193:
|
|
11152
11152
|
/***/ ((module) => {
|
|
11153
11153
|
|
|
11154
11154
|
/**
|
|
@@ -15927,7 +15927,7 @@ if (true) {
|
|
|
15927
15927
|
|
|
15928
15928
|
/***/ }),
|
|
15929
15929
|
|
|
15930
|
-
/***/
|
|
15930
|
+
/***/ 552:
|
|
15931
15931
|
/***/ (function(__unused_webpack_module, exports) {
|
|
15932
15932
|
|
|
15933
15933
|
|
|
@@ -19172,7 +19172,7 @@ if (true) {
|
|
|
19172
19172
|
|
|
19173
19173
|
/***/ }),
|
|
19174
19174
|
|
|
19175
|
-
/***/
|
|
19175
|
+
/***/ 807:
|
|
19176
19176
|
/***/ (function(module, exports) {
|
|
19177
19177
|
|
|
19178
19178
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -20297,7 +20297,7 @@ Object .defineProperty (Namespace, "add",
|
|
|
20297
20297
|
}
|
|
20298
20298
|
else
|
|
20299
20299
|
{
|
|
20300
|
-
const X3D = window [Symbol .for ("X_ITE.X3D-10.
|
|
20300
|
+
const X3D = window [Symbol .for ("X_ITE.X3D-10.2.0")];
|
|
20301
20301
|
|
|
20302
20302
|
if (X3D)
|
|
20303
20303
|
X3D [name] = module;
|
|
@@ -20640,23 +20640,6 @@ const Algorithm =
|
|
|
20640
20640
|
{
|
|
20641
20641
|
return lhs > rhs ? 1 : lhs < rhs ? -1 : 0;
|
|
20642
20642
|
},
|
|
20643
|
-
// lexicographicallyCompare (lhs, rhs)
|
|
20644
|
-
// {
|
|
20645
|
-
// const
|
|
20646
|
-
// length1 = lhs .length,
|
|
20647
|
-
// length2 = rhs .length;
|
|
20648
|
-
|
|
20649
|
-
// for (let i = 0; i < length1 && i < length2; ++ i)
|
|
20650
|
-
// {
|
|
20651
|
-
// if (lhs [i] < rhs [i])
|
|
20652
|
-
// return -1;
|
|
20653
|
-
|
|
20654
|
-
// if (rhs [i] < lhs [i])
|
|
20655
|
-
// return 1;
|
|
20656
|
-
// }
|
|
20657
|
-
|
|
20658
|
-
// return Algorithm .cmp (length1, length2);
|
|
20659
|
-
// },
|
|
20660
20643
|
less (lhs, rhs)
|
|
20661
20644
|
{
|
|
20662
20645
|
return lhs < rhs;
|
|
@@ -34283,7 +34266,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
|
|
|
34283
34266
|
x_ite_Namespace .add ("X3DBaseNode", "x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
|
|
34284
34267
|
/* harmony default export */ const Base_X3DBaseNode = (X3DBaseNode_default_);
|
|
34285
34268
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Legacy.js
|
|
34286
|
-
/* provided dependency */ var $ = __webpack_require__(
|
|
34269
|
+
/* provided dependency */ var $ = __webpack_require__(812);
|
|
34287
34270
|
/*******************************************************************************
|
|
34288
34271
|
*
|
|
34289
34272
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -34420,7 +34403,7 @@ x_ite_Namespace .add ("Legacy", "x_ite/Browser/Legacy", Legacy_default_);
|
|
|
34420
34403
|
*
|
|
34421
34404
|
******************************************************************************/
|
|
34422
34405
|
|
|
34423
|
-
const BROWSER_VERSION_default_ = "10.
|
|
34406
|
+
const BROWSER_VERSION_default_ = "10.2.0";
|
|
34424
34407
|
;
|
|
34425
34408
|
|
|
34426
34409
|
x_ite_Namespace .add ("BROWSER_VERSION", "x_ite/BROWSER_VERSION", BROWSER_VERSION_default_);
|
|
@@ -37606,7 +37589,7 @@ const X3DBindableNode_default_ = X3DBindableNode;
|
|
|
37606
37589
|
x_ite_Namespace .add ("X3DBindableNode", "x_ite/Components/Core/X3DBindableNode", X3DBindableNode_default_);
|
|
37607
37590
|
/* harmony default export */ const Core_X3DBindableNode = (X3DBindableNode_default_);
|
|
37608
37591
|
;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
|
|
37609
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
37592
|
+
/* provided dependency */ var libtess = __webpack_require__(193);
|
|
37610
37593
|
/*******************************************************************************
|
|
37611
37594
|
*
|
|
37612
37595
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -40176,7 +40159,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
|
|
|
40176
40159
|
x_ite_Namespace .add ("X3DProtoDeclaration", "x_ite/Prototype/X3DProtoDeclaration", X3DProtoDeclaration_default_);
|
|
40177
40160
|
/* harmony default export */ const Prototype_X3DProtoDeclaration = (X3DProtoDeclaration_default_);
|
|
40178
40161
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
|
|
40179
|
-
/* provided dependency */ var X3DParser_$ = __webpack_require__(
|
|
40162
|
+
/* provided dependency */ var X3DParser_$ = __webpack_require__(812);
|
|
40180
40163
|
/*******************************************************************************
|
|
40181
40164
|
*
|
|
40182
40165
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -40434,7 +40417,7 @@ const Expressions_default_ = Expressions;
|
|
|
40434
40417
|
x_ite_Namespace .add ("Expressions", "x_ite/Parser/Expressions", Expressions_default_);
|
|
40435
40418
|
/* harmony default export */ const Parser_Expressions = (Expressions_default_);
|
|
40436
40419
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/VRMLParser.js
|
|
40437
|
-
/* provided dependency */ var VRMLParser_$ = __webpack_require__(
|
|
40420
|
+
/* provided dependency */ var VRMLParser_$ = __webpack_require__(812);
|
|
40438
40421
|
/*******************************************************************************
|
|
40439
40422
|
*
|
|
40440
40423
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -43134,7 +43117,7 @@ const VRMLParser_default_ = VRMLParser;
|
|
|
43134
43117
|
x_ite_Namespace .add ("VRMLParser", "x_ite/Parser/VRMLParser", VRMLParser_default_);
|
|
43135
43118
|
/* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
|
|
43136
43119
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
|
|
43137
|
-
/* provided dependency */ var XMLParser_$ = __webpack_require__(
|
|
43120
|
+
/* provided dependency */ var XMLParser_$ = __webpack_require__(812);
|
|
43138
43121
|
/*******************************************************************************
|
|
43139
43122
|
*
|
|
43140
43123
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -45310,7 +45293,7 @@ const URLs_default_ = URLs;
|
|
|
45310
45293
|
x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
|
|
45311
45294
|
/* harmony default export */ const Networking_URLs = (URLs_default_);
|
|
45312
45295
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
|
|
45313
|
-
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(
|
|
45296
|
+
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(812);
|
|
45314
45297
|
/*******************************************************************************
|
|
45315
45298
|
*
|
|
45316
45299
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -45371,9 +45354,8 @@ x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
|
|
|
45371
45354
|
|
|
45372
45355
|
|
|
45373
45356
|
|
|
45374
|
-
|
|
45375
45357
|
// https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html
|
|
45376
|
-
// https://github.com/KhronosGroup/glTF-Sample-
|
|
45358
|
+
// https://github.com/KhronosGroup/glTF-Sample-Assets
|
|
45377
45359
|
|
|
45378
45360
|
const SAMPLES_PER_SECOND = 30; // in 1/s
|
|
45379
45361
|
|
|
@@ -45393,7 +45375,6 @@ function GLTF2Parser (scene)
|
|
|
45393
45375
|
this .extensions = new Set ();
|
|
45394
45376
|
this .envLights = [ ];
|
|
45395
45377
|
this .lights = [ ];
|
|
45396
|
-
this .usedLights = 0;
|
|
45397
45378
|
this .materialVariants = [ ];
|
|
45398
45379
|
this .materialVariantNodes = [ ];
|
|
45399
45380
|
this .buffers = [ ];
|
|
@@ -45404,11 +45385,9 @@ function GLTF2Parser (scene)
|
|
|
45404
45385
|
this .textureTransformNodes = [ ];
|
|
45405
45386
|
this .meshes = [ ];
|
|
45406
45387
|
this .cameras = [ ];
|
|
45407
|
-
this .viewpointNodes = [ ];
|
|
45408
45388
|
this .nodes = [ ];
|
|
45409
45389
|
this .skins = [ ];
|
|
45410
45390
|
this .joints = new Set ();
|
|
45411
|
-
this .animations = 0;
|
|
45412
45391
|
}
|
|
45413
45392
|
|
|
45414
45393
|
Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser .prototype),
|
|
@@ -45529,7 +45508,12 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45529
45508
|
|
|
45530
45509
|
this .viewpointsCenterOfRotation (this .getScene ());
|
|
45531
45510
|
this .optimizeSceneGraph (this .getScene () .getRootNodes ());
|
|
45532
|
-
|
|
45511
|
+
|
|
45512
|
+
this .exportGroup ("Viewpoints", this .cameras);
|
|
45513
|
+
this .exportGroup ("EnvironmentLights", this .envLights);
|
|
45514
|
+
this .exportGroup ("Lights", this .lights);
|
|
45515
|
+
this .exportGroup ("Animations", glTF .animations);
|
|
45516
|
+
|
|
45533
45517
|
this .materialVariantsSwitch ();
|
|
45534
45518
|
|
|
45535
45519
|
return this .getScene ();
|
|
@@ -45608,6 +45592,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45608
45592
|
case "KHR_materials_pbrSpecularGlossiness":
|
|
45609
45593
|
case "KHR_materials_anisotropy":
|
|
45610
45594
|
case "KHR_materials_clearcoat":
|
|
45595
|
+
case "KHR_materials_diffuse_transmission":
|
|
45611
45596
|
case "KHR_materials_dispersion":
|
|
45612
45597
|
case "KHR_materials_emissive_strength":
|
|
45613
45598
|
case "KHR_materials_ior":
|
|
@@ -45686,7 +45671,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45686
45671
|
const
|
|
45687
45672
|
scene = this .getScene (),
|
|
45688
45673
|
lightNode = scene .createNode ("EnvironmentLight", false),
|
|
45689
|
-
name = `EnvironmentLight${id}`,
|
|
45674
|
+
name = `EnvironmentLight${id + 1}`,
|
|
45690
45675
|
quaternion = new Numbers_Quaternion ();
|
|
45691
45676
|
|
|
45692
45677
|
scene .addNamedNode (scene .getUniqueName (name), lightNode);
|
|
@@ -45776,7 +45761,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45776
45761
|
|
|
45777
45762
|
const
|
|
45778
45763
|
scene = this .getScene (),
|
|
45779
|
-
name = this .sanitizeName (light .name) || `Light${id}`;
|
|
45764
|
+
name = this .sanitizeName (light .name) || `Light${id + 1}`;
|
|
45780
45765
|
|
|
45781
45766
|
const color = new Numbers_Color3 (1, 1, 1);
|
|
45782
45767
|
|
|
@@ -45950,66 +45935,13 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45950
45935
|
length = Math .min (stride * count, (bufferView .byteLength - byteOffset) / TypedArray .BYTES_PER_ELEMENT),
|
|
45951
45936
|
array = new TypedArray (bufferView .buffer, byteOffset, length);
|
|
45952
45937
|
|
|
45953
|
-
|
|
45954
|
-
{
|
|
45955
|
-
const value = this .sparseObject (accessor .sparse, array, components);
|
|
45938
|
+
let value;
|
|
45956
45939
|
|
|
45957
|
-
|
|
45940
|
+
value = this .denseArray (TypedArray, components, count, stride, array);
|
|
45941
|
+
value = this .sparseObject (accessor, components, value);
|
|
45942
|
+
value = this .normalizedArray (accessor, value);
|
|
45958
45943
|
|
|
45959
|
-
|
|
45960
|
-
}
|
|
45961
|
-
else
|
|
45962
|
-
{
|
|
45963
|
-
const
|
|
45964
|
-
length = count * components,
|
|
45965
|
-
dense = new TypedArray (length);
|
|
45966
|
-
|
|
45967
|
-
for (let i = 0, j = 0; i < length; j += stride)
|
|
45968
|
-
{
|
|
45969
|
-
for (let c = 0; c < components; ++ c, ++ i)
|
|
45970
|
-
dense [i] = array [j + c];
|
|
45971
|
-
}
|
|
45972
|
-
|
|
45973
|
-
const value = this .sparseObject (accessor .sparse, dense, components);
|
|
45974
|
-
|
|
45975
|
-
Object .defineProperty (accessor, "array", { value: value });
|
|
45976
|
-
|
|
45977
|
-
return value;
|
|
45978
|
-
}
|
|
45979
|
-
},
|
|
45980
|
-
configurable: true,
|
|
45981
|
-
});
|
|
45982
|
-
|
|
45983
|
-
Object .defineProperty (accessor, "normalizedArray",
|
|
45984
|
-
{
|
|
45985
|
-
get: () =>
|
|
45986
|
-
{
|
|
45987
|
-
switch (accessor .componentType)
|
|
45988
|
-
{
|
|
45989
|
-
case 5120: // Int8Array
|
|
45990
|
-
var value = Float32Array .from (accessor .array, v => Math .max (v / 127, -1));
|
|
45991
|
-
break;
|
|
45992
|
-
case 5121: // Uint8Array
|
|
45993
|
-
var value = Float32Array .from (accessor .array, v => v / 255);
|
|
45994
|
-
break;
|
|
45995
|
-
case 5122: // Int16Array
|
|
45996
|
-
var value = Float32Array .from (accessor .array, v => Math .max (v / 32767, -1));
|
|
45997
|
-
break;
|
|
45998
|
-
case 5123: // Uint16Array
|
|
45999
|
-
var value = Float32Array .from (accessor .array, v => v / 65535);
|
|
46000
|
-
break;
|
|
46001
|
-
case 5124: // Int32Array
|
|
46002
|
-
var value = Float32Array .from (accessor .array, v => Math .max (v / 2147483647, -1));
|
|
46003
|
-
break;
|
|
46004
|
-
case 5125: // Uint32Array
|
|
46005
|
-
var value = Float32Array .from (accessor .array, v => v / 4294967295);
|
|
46006
|
-
break;
|
|
46007
|
-
case 5126: // Float32Array
|
|
46008
|
-
var value = accessor .array;
|
|
46009
|
-
break;
|
|
46010
|
-
}
|
|
46011
|
-
|
|
46012
|
-
Object .defineProperty (accessor, "normalizedArray", { value: value });
|
|
45944
|
+
Object .defineProperty (accessor, "array", { value });
|
|
46013
45945
|
|
|
46014
45946
|
return value;
|
|
46015
45947
|
},
|
|
@@ -46017,6 +45949,23 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46017
45949
|
});
|
|
46018
45950
|
};
|
|
46019
45951
|
})(),
|
|
45952
|
+
denseArray (TypedArray, components, count, stride, array)
|
|
45953
|
+
{
|
|
45954
|
+
if (stride === components)
|
|
45955
|
+
return array;
|
|
45956
|
+
|
|
45957
|
+
const
|
|
45958
|
+
length = count * components,
|
|
45959
|
+
dense = new TypedArray (length);
|
|
45960
|
+
|
|
45961
|
+
for (let i = 0, j = 0; i < length; j += stride)
|
|
45962
|
+
{
|
|
45963
|
+
for (let c = 0; c < components; ++ c, ++ i)
|
|
45964
|
+
dense [i] = array [j + c];
|
|
45965
|
+
}
|
|
45966
|
+
|
|
45967
|
+
return dense;
|
|
45968
|
+
},
|
|
46020
45969
|
sparseObject: (() =>
|
|
46021
45970
|
{
|
|
46022
45971
|
const TypedArrays = new Map ([
|
|
@@ -46025,7 +45974,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46025
45974
|
[5125, Uint32Array],
|
|
46026
45975
|
]);
|
|
46027
45976
|
|
|
46028
|
-
return function (sparse,
|
|
45977
|
+
return function ({ sparse }, components, array)
|
|
46029
45978
|
{
|
|
46030
45979
|
if (!(sparse instanceof Object))
|
|
46031
45980
|
return array;
|
|
@@ -46061,6 +46010,29 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46061
46010
|
return array;
|
|
46062
46011
|
};
|
|
46063
46012
|
})(),
|
|
46013
|
+
normalizedArray ({ normalized, componentType }, array)
|
|
46014
|
+
{
|
|
46015
|
+
if (!normalized)
|
|
46016
|
+
return array;
|
|
46017
|
+
|
|
46018
|
+
switch (componentType)
|
|
46019
|
+
{
|
|
46020
|
+
case 5120: // Int8Array
|
|
46021
|
+
return Float32Array .from (array, v => Math .max (v / 127, -1));
|
|
46022
|
+
case 5121: // Uint8Array
|
|
46023
|
+
return Float32Array .from (array, v => v / 255);
|
|
46024
|
+
case 5122: // Int16Array
|
|
46025
|
+
return Float32Array .from (array, v => Math .max (v / 32767, -1));
|
|
46026
|
+
case 5123: // Uint16Array
|
|
46027
|
+
return Float32Array .from (array, v => v / 65535);
|
|
46028
|
+
case 5124: // Int32Array
|
|
46029
|
+
return Float32Array .from (array, v => Math .max (v / 2147483647, -1));
|
|
46030
|
+
case 5125: // Uint32Array
|
|
46031
|
+
return Float32Array .from (array, v => v / 4294967295);
|
|
46032
|
+
case 5126: // Float32Array
|
|
46033
|
+
return array;
|
|
46034
|
+
}
|
|
46035
|
+
},
|
|
46064
46036
|
samplersArray (samplers)
|
|
46065
46037
|
{
|
|
46066
46038
|
if (!(samplers instanceof Array))
|
|
@@ -46251,9 +46223,9 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46251
46223
|
if (material .appearanceNode)
|
|
46252
46224
|
return material .appearanceNode;
|
|
46253
46225
|
|
|
46254
|
-
const texCoordIndices = this .
|
|
46226
|
+
const texCoordIndices = this .getTexCoordIndices ("", material);
|
|
46255
46227
|
|
|
46256
|
-
this .texCoordIndex = Array .from (texCoordIndices) .reduce (Math .max, -1);
|
|
46228
|
+
this .texCoordIndex = Array .from (texCoordIndices) .reduce ((p, c) => Math .max (p, c), -1);
|
|
46257
46229
|
this .textureTransformNodes = [ ];
|
|
46258
46230
|
this .texCoordMappings = new Map ();
|
|
46259
46231
|
this .texCoordOfNode = new Map ();
|
|
@@ -46310,13 +46282,13 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46310
46282
|
appearanceNode ._alphaMode = this .stringValue (material .alphaMode, "OPAQUE");
|
|
46311
46283
|
appearanceNode ._alphaCutoff = this .numberValue (material .alphaCutoff, 0.5);
|
|
46312
46284
|
appearanceNode ._material = this .khrMaterialsUnlitObject (material .extensions ?.KHR_materials_unlit, materialNode);
|
|
46313
|
-
appearanceNode ._textureTransform = this .createMultiTextureTransform (
|
|
46285
|
+
appearanceNode ._textureTransform = this .createMultiTextureTransform (appearanceNode ._material .getValue ());
|
|
46314
46286
|
|
|
46315
46287
|
appearanceNode .setup ();
|
|
46316
46288
|
|
|
46317
46289
|
return material .appearanceNode = appearanceNode;
|
|
46318
46290
|
},
|
|
46319
|
-
|
|
46291
|
+
getTexCoordIndices (key, object, indices = new Set ())
|
|
46320
46292
|
{
|
|
46321
46293
|
if (!(object instanceof Object))
|
|
46322
46294
|
return indices;
|
|
@@ -46325,7 +46297,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46325
46297
|
indices .add (object .texCoord || 0);
|
|
46326
46298
|
|
|
46327
46299
|
for (const [key, value] of Object .entries (object))
|
|
46328
|
-
this .
|
|
46300
|
+
this .getTexCoordIndices (key, value, indices);
|
|
46329
46301
|
|
|
46330
46302
|
return indices;
|
|
46331
46303
|
},
|
|
@@ -46461,6 +46433,9 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46461
46433
|
case "KHR_materials_clearcoat":
|
|
46462
46434
|
this .khrMaterialsClearcoatObject (value, materialNode);
|
|
46463
46435
|
break;
|
|
46436
|
+
case "KHR_materials_diffuse_transmission":
|
|
46437
|
+
this .khrMaterialsDiffuseTransmissionObject (value, materialNode);
|
|
46438
|
+
break;
|
|
46464
46439
|
case "KHR_materials_dispersion":
|
|
46465
46440
|
this .khrMaterialsDispersionObject (value, materialNode);
|
|
46466
46441
|
break;
|
|
@@ -46526,6 +46501,29 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46526
46501
|
|
|
46527
46502
|
materialNode ._extensions .push (extension);
|
|
46528
46503
|
},
|
|
46504
|
+
khrMaterialsDiffuseTransmissionObject (KHR_materials_diffuse_transmission, materialNode)
|
|
46505
|
+
{
|
|
46506
|
+
if (!(KHR_materials_diffuse_transmission instanceof Object))
|
|
46507
|
+
return;
|
|
46508
|
+
|
|
46509
|
+
const extension = this .getScene () .createNode ("DiffuseTransmissionMaterialExtension", false);
|
|
46510
|
+
|
|
46511
|
+
extension ._diffuseTransmission = this .numberValue (KHR_materials_diffuse_transmission .diffuseTransmissionFactor, 0);
|
|
46512
|
+
extension ._diffuseTransmissionTexture = this .textureInfo (KHR_materials_diffuse_transmission .diffuseTransmissionTexture);
|
|
46513
|
+
extension ._diffuseTransmissionTextureMapping = this .textureMapping (KHR_materials_diffuse_transmission .diffuseTransmissionTexture);
|
|
46514
|
+
|
|
46515
|
+
const diffuseTransmissionColorFactor = new Numbers_Color3 ();
|
|
46516
|
+
|
|
46517
|
+
if (this .vectorValue (KHR_materials_diffuse_transmission .diffuseTransmissionColorFactor, diffuseTransmissionColorFactor))
|
|
46518
|
+
extension ._diffuseTransmissionColor = diffuseTransmissionColorFactor;
|
|
46519
|
+
|
|
46520
|
+
extension ._diffuseTransmissionColorTexture = this .textureInfo (KHR_materials_diffuse_transmission .diffuseTransmissionColorTexture);
|
|
46521
|
+
extension ._diffuseTransmissionColorTextureMapping = this .textureMapping (KHR_materials_diffuse_transmission .diffuseTransmissionColorTexture);
|
|
46522
|
+
|
|
46523
|
+
extension .setup ();
|
|
46524
|
+
|
|
46525
|
+
materialNode ._extensions .push (extension);
|
|
46526
|
+
},
|
|
46529
46527
|
khrMaterialsDispersionObject (KHR_materials_dispersion, materialNode)
|
|
46530
46528
|
{
|
|
46531
46529
|
if (!(KHR_materials_dispersion instanceof Object))
|
|
@@ -46721,8 +46719,8 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46721
46719
|
textureTransformNode = scene .createNode ("TextureTransformMatrix3D", false),
|
|
46722
46720
|
mapping = `TEXCOORD_${this .texCoordIndex + this .textureTransformNodes .length + 1}`;
|
|
46723
46721
|
|
|
46724
|
-
textureTransformNode ._mapping
|
|
46725
|
-
textureTransformNode ._matrix
|
|
46722
|
+
textureTransformNode ._mapping = mapping;
|
|
46723
|
+
textureTransformNode ._matrix = matrix;
|
|
46726
46724
|
|
|
46727
46725
|
textureTransformNode .setup ();
|
|
46728
46726
|
|
|
@@ -46802,9 +46800,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46802
46800
|
shapeNode = this .createShape (primitive, weights, skin, EXT_mesh_gpu_instancing),
|
|
46803
46801
|
variantsNode = this .khrMaterialsVariantsExtension (primitive .extensions, shapeNode);
|
|
46804
46802
|
|
|
46805
|
-
if (variantsNode)
|
|
46806
|
-
variantsNode ._children [this .materialVariants .length] = shapeNode;
|
|
46807
|
-
|
|
46808
46803
|
shapeNodes .push (primitive .shapeNode = variantsNode ?? shapeNode);
|
|
46809
46804
|
},
|
|
46810
46805
|
attributesObject (attributes)
|
|
@@ -46860,15 +46855,15 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46860
46855
|
if (!this .draco)
|
|
46861
46856
|
return;
|
|
46862
46857
|
|
|
46863
|
-
function indicesCallback (
|
|
46858
|
+
function indicesCallback (value)
|
|
46864
46859
|
{
|
|
46865
|
-
Object .defineProperty (primitive .indices, "array", { value
|
|
46860
|
+
Object .defineProperty (primitive .indices, "array", { value });
|
|
46866
46861
|
}
|
|
46867
46862
|
|
|
46868
|
-
function attributeCallback (key,
|
|
46863
|
+
function attributeCallback (key, value)
|
|
46869
46864
|
{
|
|
46870
46865
|
if (attributes [key])
|
|
46871
|
-
Object .defineProperty (attributes [key], "array", { value
|
|
46866
|
+
Object .defineProperty (attributes [key], "array", { value });
|
|
46872
46867
|
}
|
|
46873
46868
|
|
|
46874
46869
|
const
|
|
@@ -47007,16 +47002,26 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47007
47002
|
scene = this .getScene (),
|
|
47008
47003
|
variantsNode = scene .createNode ("Switch", false);
|
|
47009
47004
|
|
|
47010
|
-
variantsNode ._whichChoice = 0;
|
|
47011
|
-
|
|
47012
47005
|
for (const mapping of mappings)
|
|
47013
47006
|
this .khrMaterialsVariantsObjectMapping (mapping, shapeNode, variantsNode);
|
|
47014
47007
|
|
|
47015
|
-
variantsNode .
|
|
47008
|
+
variantsNode ._whichChoice = this .materialVariants .length;
|
|
47016
47009
|
|
|
47017
47010
|
if (!variantsNode ._children .length)
|
|
47018
47011
|
return;
|
|
47019
47012
|
|
|
47013
|
+
// Last child ist default material.
|
|
47014
|
+
variantsNode ._children [this .materialVariants .length] = shapeNode;
|
|
47015
|
+
|
|
47016
|
+
// Fall back to default material if no active variant.
|
|
47017
|
+
for (const i of variantsNode ._children .keys ())
|
|
47018
|
+
{
|
|
47019
|
+
if (!variantsNode ._children [i])
|
|
47020
|
+
variantsNode ._children [i] = shapeNode;
|
|
47021
|
+
}
|
|
47022
|
+
|
|
47023
|
+
variantsNode .setup ();
|
|
47024
|
+
|
|
47020
47025
|
this .materialVariantNodes .push (variantsNode);
|
|
47021
47026
|
|
|
47022
47027
|
return variantsNode;
|
|
@@ -47055,18 +47060,18 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47055
47060
|
|
|
47056
47061
|
this .cameras = cameras;
|
|
47057
47062
|
},
|
|
47058
|
-
cameraObject (camera)
|
|
47063
|
+
cameraObject (id, camera)
|
|
47059
47064
|
{
|
|
47060
47065
|
if (!(camera instanceof Object))
|
|
47061
47066
|
return null;
|
|
47062
47067
|
|
|
47063
|
-
if (camera .
|
|
47064
|
-
return camera .
|
|
47068
|
+
if (camera .node !== undefined)
|
|
47069
|
+
return camera .node;
|
|
47065
47070
|
|
|
47066
47071
|
const viewpointNode = this .cameraType (camera);
|
|
47067
47072
|
|
|
47068
47073
|
if (!viewpointNode)
|
|
47069
|
-
return camera .
|
|
47074
|
+
return camera .node = null;
|
|
47070
47075
|
|
|
47071
47076
|
const
|
|
47072
47077
|
scene = this .getScene (),
|
|
@@ -47080,12 +47085,10 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47080
47085
|
scene .addExportedNode (scene .getUniqueExportName (name), viewpointNode);
|
|
47081
47086
|
}
|
|
47082
47087
|
|
|
47083
|
-
this .
|
|
47084
|
-
|
|
47085
|
-
viewpointNode ._description = this .description (camera .name || `Viewpoint ${this .viewpointNodes .length}`);
|
|
47088
|
+
viewpointNode ._description = this .description (camera .name || `Viewpoint ${id + 1}`);
|
|
47086
47089
|
viewpointNode ._position = Numbers_Vector3 .Zero;
|
|
47087
47090
|
|
|
47088
|
-
return camera .
|
|
47091
|
+
return camera .node = viewpointNode;
|
|
47089
47092
|
},
|
|
47090
47093
|
cameraType (camera)
|
|
47091
47094
|
{
|
|
@@ -47274,7 +47277,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47274
47277
|
|
|
47275
47278
|
// Add camera.
|
|
47276
47279
|
|
|
47277
|
-
const viewpointNode = this .cameraObject (this .cameras [node .camera]);
|
|
47280
|
+
const viewpointNode = this .cameraObject (node .camera, this .cameras [node .camera]);
|
|
47278
47281
|
|
|
47279
47282
|
if (viewpointNode)
|
|
47280
47283
|
transformNode ._children .push (viewpointNode);
|
|
@@ -47355,8 +47358,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47355
47358
|
if (!lightNode)
|
|
47356
47359
|
return;
|
|
47357
47360
|
|
|
47358
|
-
++ this .usedLights;
|
|
47359
|
-
|
|
47360
47361
|
transformNode ._children .push (lightNode);
|
|
47361
47362
|
},
|
|
47362
47363
|
nodeChildrenArray (children)
|
|
@@ -47458,9 +47459,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47458
47459
|
{
|
|
47459
47460
|
if (sceneNumber === 0)
|
|
47460
47461
|
{
|
|
47461
|
-
if (this .usedLights)
|
|
47462
|
-
scene .getRootNodes () .push (this .createNavigationInfo ());
|
|
47463
|
-
|
|
47464
47462
|
scene .getRootNodes () .push (children [0]);
|
|
47465
47463
|
return;
|
|
47466
47464
|
}
|
|
@@ -47471,9 +47469,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47471
47469
|
{
|
|
47472
47470
|
// Root
|
|
47473
47471
|
|
|
47474
|
-
if (this .usedLights)
|
|
47475
|
-
scene .getRootNodes () .push (this .createNavigationInfo ());
|
|
47476
|
-
|
|
47477
47472
|
const switchNode = scene .createNode ("Switch", false);
|
|
47478
47473
|
|
|
47479
47474
|
scene .addNamedNode (scene .getUniqueName ("Scenes"), switchNode);
|
|
@@ -47535,20 +47530,25 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47535
47530
|
{
|
|
47536
47531
|
return this .nodeChildrenArray (nodes);
|
|
47537
47532
|
},
|
|
47538
|
-
|
|
47533
|
+
exportGroup (name, array)
|
|
47539
47534
|
{
|
|
47540
|
-
if (!
|
|
47535
|
+
if (!(array instanceof Array))
|
|
47536
|
+
return;
|
|
47537
|
+
|
|
47538
|
+
const nodes = array .map (object => object .node) .filter (node => node);
|
|
47539
|
+
|
|
47540
|
+
if (!nodes .length)
|
|
47541
47541
|
return;
|
|
47542
47542
|
|
|
47543
47543
|
const
|
|
47544
47544
|
scene = this .getScene (),
|
|
47545
47545
|
groupNode = scene .createNode ("Group", false);
|
|
47546
47546
|
|
|
47547
|
-
scene .addNamedNode (scene .getUniqueName (
|
|
47548
|
-
scene .addExportedNode (scene .getUniqueExportName (
|
|
47547
|
+
scene .addNamedNode (scene .getUniqueName (name), groupNode);
|
|
47548
|
+
scene .addExportedNode (scene .getUniqueExportName (name), groupNode);
|
|
47549
47549
|
|
|
47550
47550
|
groupNode ._visible = false;
|
|
47551
|
-
groupNode ._children =
|
|
47551
|
+
groupNode ._children = nodes;
|
|
47552
47552
|
|
|
47553
47553
|
groupNode .setup ();
|
|
47554
47554
|
|
|
@@ -47584,28 +47584,10 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47584
47584
|
if (!(animations instanceof Array))
|
|
47585
47585
|
return;
|
|
47586
47586
|
|
|
47587
|
-
const
|
|
47588
|
-
|
|
47589
|
-
.filter (node => node);
|
|
47590
|
-
|
|
47591
|
-
if (!animationNodes .length)
|
|
47592
|
-
return;
|
|
47593
|
-
|
|
47594
|
-
const
|
|
47595
|
-
scene = this .getScene (),
|
|
47596
|
-
groupNode = scene .createNode ("Group", false);
|
|
47597
|
-
|
|
47598
|
-
scene .addNamedNode (scene .getUniqueName ("Animations"), groupNode);
|
|
47599
|
-
scene .addExportedNode (scene .getUniqueExportName ("Animations"), groupNode);
|
|
47600
|
-
|
|
47601
|
-
groupNode ._visible = false;
|
|
47602
|
-
groupNode ._children = animationNodes;
|
|
47603
|
-
|
|
47604
|
-
groupNode .setup ();
|
|
47605
|
-
|
|
47606
|
-
scene .getRootNodes () .push (groupNode);
|
|
47587
|
+
for (const [i, animation] of animations .entries ())
|
|
47588
|
+
this .animationObject (i, animation);
|
|
47607
47589
|
},
|
|
47608
|
-
animationObject (animation)
|
|
47590
|
+
animationObject (id, animation)
|
|
47609
47591
|
{
|
|
47610
47592
|
if (!(animation instanceof Object))
|
|
47611
47593
|
return null;
|
|
@@ -47616,27 +47598,25 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47616
47598
|
channelNodes = this .animationChannelsArray (animation .channels, animation .samplers, timeSensorNode);
|
|
47617
47599
|
|
|
47618
47600
|
if (!channelNodes .length)
|
|
47619
|
-
return
|
|
47601
|
+
return;
|
|
47620
47602
|
|
|
47621
47603
|
const
|
|
47622
47604
|
groupNode = scene .createNode ("Group", false),
|
|
47623
47605
|
name = this .sanitizeName (animation .name);
|
|
47624
47606
|
|
|
47625
|
-
|
|
47607
|
+
scene .addNamedNode (scene .getUniqueName (name || `Animation${id + 1}`), groupNode);
|
|
47608
|
+
scene .addNamedNode (scene .getUniqueName (`Timer${id + 1}`), timeSensorNode);
|
|
47609
|
+
scene .addExportedNode (scene .getUniqueExportName (name || `Animation${id + 1}`), groupNode);
|
|
47610
|
+
scene .addExportedNode (scene .getUniqueExportName (`Timer${id + 1}`), timeSensorNode);
|
|
47626
47611
|
|
|
47627
|
-
|
|
47628
|
-
scene .addNamedNode (scene .getUniqueName (`Timer${this .animations}`), timeSensorNode);
|
|
47629
|
-
scene .addExportedNode (scene .getUniqueExportName (name || `Animation${this .animations}`), groupNode);
|
|
47630
|
-
scene .addExportedNode (scene .getUniqueExportName (`Timer${this .animations}`), timeSensorNode);
|
|
47631
|
-
|
|
47632
|
-
timeSensorNode ._description = this .description (animation .name) || `Animation ${this .animations}`;
|
|
47612
|
+
timeSensorNode ._description = this .description (animation .name) || `Animation ${id + 1}`;
|
|
47633
47613
|
groupNode ._visible = false;
|
|
47634
47614
|
groupNode ._children .push (timeSensorNode, ... channelNodes);
|
|
47635
47615
|
|
|
47636
47616
|
timeSensorNode .setup ();
|
|
47637
47617
|
groupNode .setup ();
|
|
47638
47618
|
|
|
47639
|
-
|
|
47619
|
+
animation .node = groupNode;
|
|
47640
47620
|
},
|
|
47641
47621
|
animationChannelsArray (channels, samplers, timeSensorNode)
|
|
47642
47622
|
{
|
|
@@ -47694,18 +47674,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47694
47674
|
|
|
47695
47675
|
return this .createInterpolator (timeSensorNode, node, target, sampler .interpolation, input .array, output, timeSensorNode ._cycleInterval .getValue ());
|
|
47696
47676
|
},
|
|
47697
|
-
createNavigationInfo ()
|
|
47698
|
-
{
|
|
47699
|
-
const
|
|
47700
|
-
scene = this .getScene (),
|
|
47701
|
-
navigationInfoNode = scene .createNode ("NavigationInfo", false);
|
|
47702
|
-
|
|
47703
|
-
navigationInfoNode ._headlight = false;
|
|
47704
|
-
|
|
47705
|
-
navigationInfoNode .setup ();
|
|
47706
|
-
|
|
47707
|
-
return navigationInfoNode;
|
|
47708
|
-
},
|
|
47709
47677
|
createShape (primitive, weights, skin, EXT_mesh_gpu_instancing)
|
|
47710
47678
|
{
|
|
47711
47679
|
const
|
|
@@ -47749,7 +47717,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47749
47717
|
scene = this .getScene (),
|
|
47750
47718
|
instancedShapeNode = scene .createNode ("InstancedShape", false),
|
|
47751
47719
|
translationArray = translation ?.array,
|
|
47752
|
-
rotationArray = rotation ?.
|
|
47720
|
+
rotationArray = rotation ?.array,
|
|
47753
47721
|
scaleArray = scale ?.array;
|
|
47754
47722
|
|
|
47755
47723
|
if (translationArray)
|
|
@@ -48193,8 +48161,8 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48193
48161
|
colorNode = scene .createNode (opaque ? "Color" : typeName, false);
|
|
48194
48162
|
|
|
48195
48163
|
colorNode ._color = opaque && typeName !== "Color"
|
|
48196
|
-
? color .
|
|
48197
|
-
: color .
|
|
48164
|
+
? color .array .filter ((_, i) => (i + 1) % 4)
|
|
48165
|
+
: color .array;
|
|
48198
48166
|
|
|
48199
48167
|
colorNode .setup ();
|
|
48200
48168
|
|
|
@@ -48225,9 +48193,10 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48225
48193
|
}
|
|
48226
48194
|
default:
|
|
48227
48195
|
{
|
|
48228
|
-
const textureCoordinateNodes = Array .from (material .texCoordMappings .entries ()
|
|
48229
|
-
.
|
|
48230
|
-
.sort ((a, b) =>
|
|
48196
|
+
const textureCoordinateNodes = Array .from (material .texCoordMappings .entries ())
|
|
48197
|
+
.sort ((a, b) => Math_Algorithm .cmp (a [0], b [0]))
|
|
48198
|
+
.sort ((a, b) => a [1] - b [1])
|
|
48199
|
+
.map (([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping));
|
|
48231
48200
|
|
|
48232
48201
|
if (!textureCoordinateNodes .length)
|
|
48233
48202
|
return null;
|
|
@@ -48257,7 +48226,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48257
48226
|
textureCoordinateNode = scene .createNode ("TextureCoordinate", false);
|
|
48258
48227
|
|
|
48259
48228
|
textureCoordinateNode ._mapping = mapping;
|
|
48260
|
-
textureCoordinateNode ._point = texCoord .
|
|
48229
|
+
textureCoordinateNode ._point = texCoord .array;
|
|
48261
48230
|
|
|
48262
48231
|
textureCoordinateNode .setup ();
|
|
48263
48232
|
|
|
@@ -48275,7 +48244,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48275
48244
|
scene = this .getScene (),
|
|
48276
48245
|
normalNode = scene .createNode ("Normal", false);
|
|
48277
48246
|
|
|
48278
|
-
normalNode ._vector = normal .
|
|
48247
|
+
normalNode ._vector = normal .array;
|
|
48279
48248
|
|
|
48280
48249
|
if ((targets instanceof Array) && (weights instanceof Array))
|
|
48281
48250
|
{
|
|
@@ -48374,7 +48343,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48374
48343
|
const
|
|
48375
48344
|
start = skin .coordinateNode ._point .length,
|
|
48376
48345
|
jointsArray = joints .array,
|
|
48377
|
-
weightsArray = weights .
|
|
48346
|
+
weightsArray = weights .array,
|
|
48378
48347
|
numVertices = jointsArray .length / 4;
|
|
48379
48348
|
|
|
48380
48349
|
for (let v = 0; v < numVertices; ++ v)
|
|
@@ -48503,7 +48472,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48503
48472
|
}
|
|
48504
48473
|
case "rotation":
|
|
48505
48474
|
{
|
|
48506
|
-
const interpolatorNode = this .createOrientationInterpolator (interpolation, times, keyValues .
|
|
48475
|
+
const interpolatorNode = this .createOrientationInterpolator (interpolation, times, keyValues .array, cycleInterval);
|
|
48507
48476
|
|
|
48508
48477
|
scene .addNamedNode (scene .getUniqueName ("RotationInterpolator"), interpolatorNode);
|
|
48509
48478
|
|
|
@@ -48541,7 +48510,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48541
48510
|
if (!geometryNode)
|
|
48542
48511
|
continue;
|
|
48543
48512
|
|
|
48544
|
-
const coordinateInterpolatorNode = this .createArrayInterpolator ("CoordinateInterpolator", interpolation, times, keyValues .
|
|
48513
|
+
const coordinateInterpolatorNode = this .createArrayInterpolator ("CoordinateInterpolator", interpolation, times, keyValues .array, cycleInterval, targets, attributes, "POSITION");
|
|
48545
48514
|
|
|
48546
48515
|
if (coordinateInterpolatorNode)
|
|
48547
48516
|
{
|
|
@@ -48551,7 +48520,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48551
48520
|
scene .addRoute (coordinateInterpolatorNode, "value_changed", geometryNode ._coord, "set_point");
|
|
48552
48521
|
}
|
|
48553
48522
|
|
|
48554
|
-
const normalInterpolatorNode = this .createArrayInterpolator ("NormalInterpolator", interpolation, times, keyValues .
|
|
48523
|
+
const normalInterpolatorNode = this .createArrayInterpolator ("NormalInterpolator", interpolation, times, keyValues .array, cycleInterval, targets, attributes, "NORMAL");
|
|
48555
48524
|
|
|
48556
48525
|
if (normalInterpolatorNode)
|
|
48557
48526
|
{
|
|
@@ -48753,7 +48722,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48753
48722
|
}
|
|
48754
48723
|
}
|
|
48755
48724
|
},
|
|
48756
|
-
createArrayInterpolator (typeName, interpolation, times, weights, cycleInterval, targets, accessors, key
|
|
48725
|
+
createArrayInterpolator (typeName, interpolation, times, weights, cycleInterval, targets, accessors, key)
|
|
48757
48726
|
{
|
|
48758
48727
|
const
|
|
48759
48728
|
scene = this .getScene (),
|
|
@@ -48779,14 +48748,14 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48779
48748
|
|
|
48780
48749
|
const w = Array .from (targets .keys (), i => weights [i]);
|
|
48781
48750
|
|
|
48782
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w
|
|
48751
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
48783
48752
|
interpolatorNode ._keyValue .push (value);
|
|
48784
48753
|
|
|
48785
48754
|
for (let t = 1, length = times .length; t < length; ++ t)
|
|
48786
48755
|
{
|
|
48787
48756
|
const
|
|
48788
48757
|
w = Array .from (targets .keys (), i => weights [t * targets .length + i]),
|
|
48789
|
-
values = this .applyMorphTargets (accessor .field, targets, key, w
|
|
48758
|
+
values = this .applyMorphTargets (accessor .field, targets, key, w);
|
|
48790
48759
|
|
|
48791
48760
|
for (const value of values)
|
|
48792
48761
|
interpolatorNode ._keyValue .push (value);
|
|
@@ -48816,7 +48785,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48816
48785
|
{
|
|
48817
48786
|
const w = Array .from (targets .keys (), i => weights [t * targets .length + i]);
|
|
48818
48787
|
|
|
48819
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w
|
|
48788
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
48820
48789
|
interpolatorNode ._keyValue .push (value);
|
|
48821
48790
|
}
|
|
48822
48791
|
|
|
@@ -48844,7 +48813,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48844
48813
|
|
|
48845
48814
|
const w = Array .from (targets .keys (), i => this .cubicSplineScalarArray (t, times, weights, targets .length, i));
|
|
48846
48815
|
|
|
48847
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w
|
|
48816
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
48848
48817
|
interpolatorNode ._keyValue .push (value);
|
|
48849
48818
|
}
|
|
48850
48819
|
|
|
@@ -48860,7 +48829,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48860
48829
|
{
|
|
48861
48830
|
const value = new Numbers_Vector3 ();
|
|
48862
48831
|
|
|
48863
|
-
return function (array, targets, key, weights
|
|
48832
|
+
return function (array, targets, key, weights)
|
|
48864
48833
|
{
|
|
48865
48834
|
const vectors = Array .from (array, v => v .getValue () .copy ());
|
|
48866
48835
|
|
|
@@ -48877,7 +48846,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48877
48846
|
continue;
|
|
48878
48847
|
|
|
48879
48848
|
const
|
|
48880
|
-
array = accessor
|
|
48849
|
+
array = accessor .array,
|
|
48881
48850
|
length = array .length;
|
|
48882
48851
|
|
|
48883
48852
|
for (let a = 0, p = 0; a < length; a += 3, ++ p)
|
|
@@ -48969,7 +48938,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
|
|
|
48969
48938
|
x_ite_Namespace .add ("GLTF2Parser", "x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
|
|
48970
48939
|
/* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
|
|
48971
48940
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
|
|
48972
|
-
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(
|
|
48941
|
+
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(812);
|
|
48973
48942
|
/*******************************************************************************
|
|
48974
48943
|
*
|
|
48975
48944
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -49121,7 +49090,7 @@ const GLB2Parser_default_ = GLB2Parser;
|
|
|
49121
49090
|
x_ite_Namespace .add ("GLB2Parser", "x_ite/Parser/GLB2Parser", GLB2Parser_default_);
|
|
49122
49091
|
/* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
|
|
49123
49092
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
|
|
49124
|
-
/* provided dependency */ var OBJParser_$ = __webpack_require__(
|
|
49093
|
+
/* provided dependency */ var OBJParser_$ = __webpack_require__(812);
|
|
49125
49094
|
/*******************************************************************************
|
|
49126
49095
|
*
|
|
49127
49096
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -52466,8 +52435,8 @@ const MatrixStack_default_ = MatrixStack;
|
|
|
52466
52435
|
x_ite_Namespace .add ("MatrixStack", "standard/Math/Utility/MatrixStack", MatrixStack_default_);
|
|
52467
52436
|
/* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
|
|
52468
52437
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
|
|
52469
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
52470
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
52438
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(812);
|
|
52439
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(193);
|
|
52471
52440
|
/*******************************************************************************
|
|
52472
52441
|
*
|
|
52473
52442
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -55238,7 +55207,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
55238
55207
|
x_ite_Namespace .add ("SVGParser", "x_ite/Parser/SVGParser", SVGParser_default_);
|
|
55239
55208
|
/* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
|
|
55240
55209
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
|
|
55241
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
55210
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(812);
|
|
55242
55211
|
/*******************************************************************************
|
|
55243
55212
|
*
|
|
55244
55213
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -58054,9 +58023,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
58054
58023
|
for (const light of lights)
|
|
58055
58024
|
light .setGlobalVariables (this);
|
|
58056
58025
|
|
|
58057
|
-
for (const light of globalLights)
|
|
58058
|
-
globalLightsKeys .push (light .lightNode .getLightKey ());
|
|
58059
|
-
|
|
58060
58026
|
this .renderAndGlobalLightsKey = `.${this .renderKey}.${globalLightsKeys .sort () .join ("")}.`;
|
|
58061
58027
|
this .globalShadow = globalShadows .at (-1);
|
|
58062
58028
|
|
|
@@ -59728,8 +59694,13 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59728
59694
|
if (type !== Rendering_TraverseType .DISPLAY)
|
|
59729
59695
|
return;
|
|
59730
59696
|
|
|
59731
|
-
if (this ._headlight .getValue ())
|
|
59732
|
-
|
|
59697
|
+
if (!this ._headlight .getValue ())
|
|
59698
|
+
return;
|
|
59699
|
+
|
|
59700
|
+
const headlight = this .getBrowser () .getHeadlight ();
|
|
59701
|
+
|
|
59702
|
+
renderObject .getGlobalLights () .push (headlight);
|
|
59703
|
+
renderObject .getGlobalLightsKeys () .push (headlight .lightNode .getLightKey ());
|
|
59733
59704
|
},
|
|
59734
59705
|
traverse (type, renderObject)
|
|
59735
59706
|
{
|
|
@@ -60288,6 +60259,213 @@ const VertexArray_default_ = VertexArray;
|
|
|
60288
60259
|
|
|
60289
60260
|
x_ite_Namespace .add ("VertexArray", "x_ite/Rendering/VertexArray", VertexArray_default_);
|
|
60290
60261
|
/* harmony default export */ const Rendering_VertexArray = (VertexArray_default_);
|
|
60262
|
+
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/MikkTSpace.js
|
|
60263
|
+
|
|
60264
|
+
|
|
60265
|
+
// See: https://github.com/donmccurdy/mikktspace-wasm
|
|
60266
|
+
|
|
60267
|
+
const MikkTSpace_default_ = new class MikkTSpace
|
|
60268
|
+
{
|
|
60269
|
+
#promise;
|
|
60270
|
+
|
|
60271
|
+
async initialize ()
|
|
60272
|
+
{
|
|
60273
|
+
return this .#promise = this .#promise ?? new Promise (async resolve =>
|
|
60274
|
+
{
|
|
60275
|
+
const imports =
|
|
60276
|
+
{
|
|
60277
|
+
wbg:
|
|
60278
|
+
{
|
|
60279
|
+
__wbindgen_string_new: (arg0, arg1) =>
|
|
60280
|
+
{
|
|
60281
|
+
const ret = this .#getStringFromWasm0 (arg0, arg1);
|
|
60282
|
+
|
|
60283
|
+
return this .#addHeapObject (ret);
|
|
60284
|
+
},
|
|
60285
|
+
__wbindgen_rethrow: (arg0) =>
|
|
60286
|
+
{
|
|
60287
|
+
throw this .#takeObject (arg0);
|
|
60288
|
+
},
|
|
60289
|
+
},
|
|
60290
|
+
};
|
|
60291
|
+
|
|
60292
|
+
const input = await fetch (Networking_URLs .getLibraryURL ("mikktspace_bg.wasm"));
|
|
60293
|
+
|
|
60294
|
+
const { instance } = await this .#load (input, imports);
|
|
60295
|
+
|
|
60296
|
+
this .#wasm = instance .exports;
|
|
60297
|
+
|
|
60298
|
+
resolve ();
|
|
60299
|
+
});
|
|
60300
|
+
}
|
|
60301
|
+
|
|
60302
|
+
isInitialized ()
|
|
60303
|
+
{
|
|
60304
|
+
return !! this .#wasm;
|
|
60305
|
+
}
|
|
60306
|
+
|
|
60307
|
+
async #load (response, imports)
|
|
60308
|
+
{
|
|
60309
|
+
if (typeof WebAssembly .instantiateStreaming === "function")
|
|
60310
|
+
{
|
|
60311
|
+
try
|
|
60312
|
+
{
|
|
60313
|
+
return await WebAssembly .instantiateStreaming (response, imports);
|
|
60314
|
+
}
|
|
60315
|
+
catch (error)
|
|
60316
|
+
{
|
|
60317
|
+
if (response .headers .get ("Content-Type") !== "application/wasm")
|
|
60318
|
+
{
|
|
60319
|
+
console .warn ("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", error);
|
|
60320
|
+
}
|
|
60321
|
+
else
|
|
60322
|
+
{
|
|
60323
|
+
throw error;
|
|
60324
|
+
}
|
|
60325
|
+
}
|
|
60326
|
+
}
|
|
60327
|
+
|
|
60328
|
+
const bytes = await response .arrayBuffer ();
|
|
60329
|
+
|
|
60330
|
+
return await WebAssembly .instantiate (bytes, imports);
|
|
60331
|
+
}
|
|
60332
|
+
|
|
60333
|
+
/**
|
|
60334
|
+
* Generates vertex tangents for the given position/normal/texcoord attributes.
|
|
60335
|
+
* @param {Float32Array} position vec3
|
|
60336
|
+
* @param {Float32Array} normal vec3
|
|
60337
|
+
* @param {Float32Array} texcoord vec2
|
|
60338
|
+
* @returns {Float32Array} vec4
|
|
60339
|
+
*/
|
|
60340
|
+
generateTangents (position, normal, texcoord)
|
|
60341
|
+
{
|
|
60342
|
+
try
|
|
60343
|
+
{
|
|
60344
|
+
const
|
|
60345
|
+
retptr = this .#wasm .__wbindgen_add_to_stack_pointer (-16),
|
|
60346
|
+
ptr0 = this .#passArrayF32ToWasm0 (position, this .#wasm .__wbindgen_malloc),
|
|
60347
|
+
len0 = this .#WASM_VECTOR_LEN,
|
|
60348
|
+
ptr1 = this .#passArrayF32ToWasm0 (normal, this .#wasm .__wbindgen_malloc),
|
|
60349
|
+
len1 = this .#WASM_VECTOR_LEN,
|
|
60350
|
+
ptr2 = this .#passArrayF32ToWasm0 (texcoord, this .#wasm .__wbindgen_malloc),
|
|
60351
|
+
len2 = this .#WASM_VECTOR_LEN;
|
|
60352
|
+
|
|
60353
|
+
this .#wasm .generateTangents (retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
60354
|
+
|
|
60355
|
+
const
|
|
60356
|
+
r0 = this .#getInt32Memory0 () [retptr / 4 + 0],
|
|
60357
|
+
r1 = this .#getInt32Memory0 () [retptr / 4 + 1],
|
|
60358
|
+
v3 = this .#getArrayF32FromWasm0 (r0, r1) .slice ();
|
|
60359
|
+
|
|
60360
|
+
this .#wasm .__wbindgen_free (r0, r1 * 4);
|
|
60361
|
+
|
|
60362
|
+
return v3;
|
|
60363
|
+
}
|
|
60364
|
+
finally
|
|
60365
|
+
{
|
|
60366
|
+
this .#wasm .__wbindgen_add_to_stack_pointer (16);
|
|
60367
|
+
}
|
|
60368
|
+
}
|
|
60369
|
+
|
|
60370
|
+
#wasm;
|
|
60371
|
+
#textDecoder = new TextDecoder ("utf-8", { ignoreBOM: true, fatal: true });
|
|
60372
|
+
#uint8Memory0;
|
|
60373
|
+
|
|
60374
|
+
#getUint8Memory0 ()
|
|
60375
|
+
{
|
|
60376
|
+
if (this .#uint8Memory0 ?.buffer !== this .#wasm .memory .buffer)
|
|
60377
|
+
this .#uint8Memory0 = new Uint8Array (this .#wasm .memory .buffer);
|
|
60378
|
+
|
|
60379
|
+
return this .#uint8Memory0;
|
|
60380
|
+
}
|
|
60381
|
+
|
|
60382
|
+
#getStringFromWasm0 (ptr, len)
|
|
60383
|
+
{
|
|
60384
|
+
return this .#textDecoder .decode (this .#getUint8Memory0 () .subarray (ptr, ptr + len));
|
|
60385
|
+
}
|
|
60386
|
+
|
|
60387
|
+
#heap = new Array (32) .fill (undefined) .toSpliced (32, 0, undefined, null, true, false);
|
|
60388
|
+
#heap_next = this .#heap .length;
|
|
60389
|
+
|
|
60390
|
+
#addHeapObject (obj)
|
|
60391
|
+
{
|
|
60392
|
+
if (this .#heap_next === this .#heap .length)
|
|
60393
|
+
this .#heap .push (this .#heap .length + 1);
|
|
60394
|
+
|
|
60395
|
+
const i = this .#heap_next;
|
|
60396
|
+
|
|
60397
|
+
this .#heap_next = this .#heap [i];
|
|
60398
|
+
this .#heap [i] = obj;
|
|
60399
|
+
|
|
60400
|
+
return i;
|
|
60401
|
+
}
|
|
60402
|
+
|
|
60403
|
+
#getObject (i)
|
|
60404
|
+
{
|
|
60405
|
+
return this .#heap [i];
|
|
60406
|
+
}
|
|
60407
|
+
|
|
60408
|
+
#dropObject (i)
|
|
60409
|
+
{
|
|
60410
|
+
if (i < 36)
|
|
60411
|
+
return;
|
|
60412
|
+
|
|
60413
|
+
this .#heap [i] = this .#heap_next;
|
|
60414
|
+
|
|
60415
|
+
this .#heap_next = i;
|
|
60416
|
+
}
|
|
60417
|
+
|
|
60418
|
+
#takeObject (i)
|
|
60419
|
+
{
|
|
60420
|
+
const ret = this .#getObject (i);
|
|
60421
|
+
|
|
60422
|
+
this .#dropObject (i);
|
|
60423
|
+
|
|
60424
|
+
return ret;
|
|
60425
|
+
}
|
|
60426
|
+
|
|
60427
|
+
#float32Memory0;
|
|
60428
|
+
|
|
60429
|
+
#getFloat32Memory0 ()
|
|
60430
|
+
{
|
|
60431
|
+
if (this .#float32Memory0 ?.buffer !== this .#wasm .memory .buffer)
|
|
60432
|
+
this .#float32Memory0 = new Float32Array (this .#wasm .memory .buffer);
|
|
60433
|
+
|
|
60434
|
+
return this .#float32Memory0;
|
|
60435
|
+
}
|
|
60436
|
+
|
|
60437
|
+
#WASM_VECTOR_LEN = 0;
|
|
60438
|
+
|
|
60439
|
+
#passArrayF32ToWasm0 (arg, malloc)
|
|
60440
|
+
{
|
|
60441
|
+
const ptr = malloc (arg .length * 4);
|
|
60442
|
+
|
|
60443
|
+
this .#getFloat32Memory0 () .set (arg, ptr / 4);
|
|
60444
|
+
|
|
60445
|
+
this .#WASM_VECTOR_LEN = arg .length;
|
|
60446
|
+
|
|
60447
|
+
return ptr;
|
|
60448
|
+
}
|
|
60449
|
+
|
|
60450
|
+
#int32Memory0;
|
|
60451
|
+
|
|
60452
|
+
#getInt32Memory0 ()
|
|
60453
|
+
{
|
|
60454
|
+
if (this .#int32Memory0 ?.buffer !== this .#wasm .memory .buffer)
|
|
60455
|
+
this .#int32Memory0 = new Int32Array (this .#wasm .memory .buffer);
|
|
60456
|
+
|
|
60457
|
+
return this .#int32Memory0;
|
|
60458
|
+
}
|
|
60459
|
+
|
|
60460
|
+
#getArrayF32FromWasm0 (ptr, len)
|
|
60461
|
+
{
|
|
60462
|
+
return this .#getFloat32Memory0 () .subarray (ptr / 4, ptr / 4 + len);
|
|
60463
|
+
}
|
|
60464
|
+
};
|
|
60465
|
+
;
|
|
60466
|
+
|
|
60467
|
+
x_ite_Namespace .add ("MikkTSpace", "x_ite/Browser/Rendering/MikkTSpace", MikkTSpace_default_);
|
|
60468
|
+
/* harmony default export */ const MikkTSpace = (MikkTSpace_default_);
|
|
60291
60469
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Shading.js
|
|
60292
60470
|
/*******************************************************************************
|
|
60293
60471
|
*
|
|
@@ -60413,6 +60591,7 @@ x_ite_Namespace .add ("Shading", "x_ite/Browser/Core/Shading", Shading_default_)
|
|
|
60413
60591
|
|
|
60414
60592
|
|
|
60415
60593
|
|
|
60594
|
+
|
|
60416
60595
|
// Box normals for bbox / line intersection.
|
|
60417
60596
|
const boxNormals = [
|
|
60418
60597
|
new Numbers_Vector3 (0, 0, 1), // front
|
|
@@ -60453,9 +60632,9 @@ function X3DGeometryNode (executionContext)
|
|
|
60453
60632
|
this .texCoords = X3DGeometryNode .createArray ();
|
|
60454
60633
|
this .fogDepths = X3DGeometryNode .createArray ();
|
|
60455
60634
|
this .colors = X3DGeometryNode .createArray ();
|
|
60635
|
+
this .tangents = X3DGeometryNode .createArray ();
|
|
60456
60636
|
this .normals = X3DGeometryNode .createArray ();
|
|
60457
60637
|
this .flatNormals = X3DGeometryNode .createArray ();
|
|
60458
|
-
this .tangents = X3DGeometryNode .createArray ();
|
|
60459
60638
|
this .vertices = X3DGeometryNode .createArray ();
|
|
60460
60639
|
this .hasFogCoords = false;
|
|
60461
60640
|
this .hasNormals = false;
|
|
@@ -60535,8 +60714,8 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60535
60714
|
this .texCoordBuffers = Array .from ({length: browser .getMaxTexCoords ()}, () => gl .createBuffer ());
|
|
60536
60715
|
this .fogDepthBuffer = gl .createBuffer ();
|
|
60537
60716
|
this .colorBuffer = gl .createBuffer ();
|
|
60538
|
-
this .normalBuffer = gl .createBuffer ();
|
|
60539
60717
|
this .tangentBuffer = gl .createBuffer ();
|
|
60718
|
+
this .normalBuffer = gl .createBuffer ();
|
|
60540
60719
|
this .vertexBuffer = gl .createBuffer ();
|
|
60541
60720
|
this .vertexArrayObject = new Rendering_VertexArray (gl);
|
|
60542
60721
|
|
|
@@ -60685,14 +60864,6 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60685
60864
|
|
|
60686
60865
|
this .textureCoordinateNode .getTextureCoordinateMapping (this .textureCoordinateMapping);
|
|
60687
60866
|
},
|
|
60688
|
-
setNormals (value)
|
|
60689
|
-
{
|
|
60690
|
-
this .normals .assign (value);
|
|
60691
|
-
},
|
|
60692
|
-
getNormals ()
|
|
60693
|
-
{
|
|
60694
|
-
return this .normals;
|
|
60695
|
-
},
|
|
60696
60867
|
setTangents (value)
|
|
60697
60868
|
{
|
|
60698
60869
|
this .tangents .assign (value);
|
|
@@ -60701,6 +60872,14 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60701
60872
|
{
|
|
60702
60873
|
return this .tangents;
|
|
60703
60874
|
},
|
|
60875
|
+
setNormals (value)
|
|
60876
|
+
{
|
|
60877
|
+
this .normals .assign (value);
|
|
60878
|
+
},
|
|
60879
|
+
getNormals ()
|
|
60880
|
+
{
|
|
60881
|
+
return this .normals;
|
|
60882
|
+
},
|
|
60704
60883
|
setVertices (value)
|
|
60705
60884
|
{
|
|
60706
60885
|
this .vertices .assign (value);
|
|
@@ -60715,7 +60894,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60715
60894
|
|
|
60716
60895
|
this .updateInstances = true;
|
|
60717
60896
|
},
|
|
60718
|
-
|
|
60897
|
+
generateTexCoords ()
|
|
60719
60898
|
{
|
|
60720
60899
|
const texCoords = this .texCoords;
|
|
60721
60900
|
|
|
@@ -60796,6 +60975,31 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60796
60975
|
return texCoordParams;
|
|
60797
60976
|
};
|
|
60798
60977
|
})(),
|
|
60978
|
+
generateTangents ()
|
|
60979
|
+
{
|
|
60980
|
+
if (this .geometryType < 2)
|
|
60981
|
+
return;
|
|
60982
|
+
|
|
60983
|
+
if (!this .vertices .length)
|
|
60984
|
+
return;
|
|
60985
|
+
|
|
60986
|
+
if (!MikkTSpace .isInitialized ())
|
|
60987
|
+
return void (MikkTSpace .initialize () .then (() => this .requestRebuild ()));
|
|
60988
|
+
|
|
60989
|
+
const
|
|
60990
|
+
vertices = this .vertices .getValue () .filter ((v, i) => i % 4 < 3),
|
|
60991
|
+
normals = this .normals .getValue (),
|
|
60992
|
+
texCoords = this .multiTexCoords [0] .getValue () .filter ((v, i) => i % 4 < 2),
|
|
60993
|
+
tangents = MikkTSpace .generateTangents (vertices, normals, texCoords),
|
|
60994
|
+
length = tangents .length;
|
|
60995
|
+
|
|
60996
|
+
// Convert coordinate system handedness to respect output format of MikkTSpace.
|
|
60997
|
+
for (let i = 3; i < length; i += 4)
|
|
60998
|
+
tangents [i] = -tangents [i]; // Flip w-channel.
|
|
60999
|
+
|
|
61000
|
+
this .tangents .assign (tangents);
|
|
61001
|
+
this .tangents .shrinkToFit ();
|
|
61002
|
+
},
|
|
60799
61003
|
refineNormals (normalIndex, normals, creaseAngle)
|
|
60800
61004
|
{
|
|
60801
61005
|
if (creaseAngle === 0)
|
|
@@ -61136,7 +61340,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61136
61340
|
{
|
|
61137
61341
|
const point = new Numbers_Vector3 ();
|
|
61138
61342
|
|
|
61139
|
-
return function ()
|
|
61343
|
+
return async function ()
|
|
61140
61344
|
{
|
|
61141
61345
|
this .clear ();
|
|
61142
61346
|
this .build ();
|
|
@@ -61152,8 +61356,8 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61152
61356
|
this .coordIndices .shrinkToFit ();
|
|
61153
61357
|
this .fogDepths .shrinkToFit ();
|
|
61154
61358
|
this .colors .shrinkToFit ();
|
|
61155
|
-
this .normals .shrinkToFit ();
|
|
61156
61359
|
this .tangents .shrinkToFit ();
|
|
61360
|
+
this .normals .shrinkToFit ();
|
|
61157
61361
|
this .vertices .shrinkToFit ();
|
|
61158
61362
|
|
|
61159
61363
|
// Determine bbox.
|
|
@@ -61190,8 +61394,12 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61190
61394
|
|
|
61191
61395
|
// Generate texCoord if needed.
|
|
61192
61396
|
|
|
61193
|
-
if (this .multiTexCoords .length
|
|
61194
|
-
this .
|
|
61397
|
+
if (!this .multiTexCoords .length)
|
|
61398
|
+
this .generateTexCoords ();
|
|
61399
|
+
|
|
61400
|
+
// Generate tangents if needed.
|
|
61401
|
+
if (!this .tangents .length)
|
|
61402
|
+
this .generateTangents ();
|
|
61195
61403
|
|
|
61196
61404
|
// Transfer arrays and update.
|
|
61197
61405
|
|
|
@@ -61231,8 +61439,8 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61231
61439
|
this .colors .length = 0;
|
|
61232
61440
|
this .multiTexCoords .length = 0;
|
|
61233
61441
|
this .texCoords .length = 0;
|
|
61234
|
-
this .normals .length = 0;
|
|
61235
61442
|
this .tangents .length = 0;
|
|
61443
|
+
this .normals .length = 0;
|
|
61236
61444
|
this .flatNormals .length = 0;
|
|
61237
61445
|
this .vertices .length = 0;
|
|
61238
61446
|
},
|
|
@@ -61288,17 +61496,6 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61288
61496
|
gl .bufferData (gl .ARRAY_BUFFER, this .multiTexCoords [i] .getValue (), gl .DYNAMIC_DRAW);
|
|
61289
61497
|
}
|
|
61290
61498
|
|
|
61291
|
-
// Transfer normals or flat normals.
|
|
61292
|
-
|
|
61293
|
-
const lastHasNormals = this .hasNormals;
|
|
61294
|
-
|
|
61295
|
-
this .set_shading__ (this .getBrowser () .getBrowserOptions () ._Shading);
|
|
61296
|
-
|
|
61297
|
-
this .hasNormals = !! this .normals .length;
|
|
61298
|
-
|
|
61299
|
-
if (this .hasNormals !== lastHasNormals)
|
|
61300
|
-
this .updateVertexArrays ();
|
|
61301
|
-
|
|
61302
61499
|
// Transfer tangents.
|
|
61303
61500
|
|
|
61304
61501
|
const lastHasTangents = this .hasTangents;
|
|
@@ -61311,6 +61508,17 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61311
61508
|
if (this .hasTangents !== lastHasTangents)
|
|
61312
61509
|
this .updateVertexArrays ();
|
|
61313
61510
|
|
|
61511
|
+
// Transfer normals or flat normals.
|
|
61512
|
+
|
|
61513
|
+
const lastHasNormals = this .hasNormals;
|
|
61514
|
+
|
|
61515
|
+
this .set_shading__ (this .getBrowser () .getBrowserOptions () ._Shading);
|
|
61516
|
+
|
|
61517
|
+
this .hasNormals = !! this .normals .length;
|
|
61518
|
+
|
|
61519
|
+
if (this .hasNormals !== lastHasNormals)
|
|
61520
|
+
this .updateVertexArrays ();
|
|
61521
|
+
|
|
61314
61522
|
// Transfer vertices.
|
|
61315
61523
|
|
|
61316
61524
|
gl .bindBuffer (gl .ARRAY_BUFFER, this .vertexBuffer);
|
|
@@ -62459,6 +62667,7 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62459
62667
|
gl .uniform3f (shaderNode .x3d_EmissiveColor, 1, 1, 1)
|
|
62460
62668
|
gl .uniform1f (shaderNode .x3d_Transparency, transparency)
|
|
62461
62669
|
gl .uniform1i (shaderNode .x3d_TextureCoordinateGeneratorMode [0], 0);
|
|
62670
|
+
gl .uniform1f (shaderNode .x3d_Exposure, 1);
|
|
62462
62671
|
|
|
62463
62672
|
// Enable vertex attribute arrays.
|
|
62464
62673
|
|
|
@@ -62476,6 +62685,8 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62476
62685
|
gl .disable (gl .BLEND);
|
|
62477
62686
|
|
|
62478
62687
|
gl .drawArrays (gl .TRIANGLES, 0, this .sphereCount);
|
|
62688
|
+
|
|
62689
|
+
gl .uniform1f (shaderNode .x3d_Exposure, browser .getBrowserOption ("Exposure"));
|
|
62479
62690
|
},
|
|
62480
62691
|
drawCube: (() =>
|
|
62481
62692
|
{
|
|
@@ -62512,8 +62723,11 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62512
62723
|
gl .uniform3f (shaderNode .x3d_EmissiveColor, 1, 1, 1);
|
|
62513
62724
|
gl .uniform1f (shaderNode .x3d_Transparency, 0);
|
|
62514
62725
|
gl .uniform1i (shaderNode .x3d_TextureCoordinateGeneratorMode [0], 0);
|
|
62726
|
+
gl .uniform1f (shaderNode .x3d_Exposure, 1);
|
|
62515
62727
|
|
|
62516
62728
|
this .drawRectangle (gl, browser, shaderNode, renderObject, textureNode, this .textureBuffers [i], this .textureArrayObjects [i]);
|
|
62729
|
+
|
|
62730
|
+
gl .uniform1f (shaderNode .x3d_Exposure, browser .getBrowserOption ("Exposure"));
|
|
62517
62731
|
}
|
|
62518
62732
|
};
|
|
62519
62733
|
})(),
|
|
@@ -62856,7 +63070,7 @@ Object .assign (Object .setPrototypeOf (X3DSingleTextureNode .prototype, Texturi
|
|
|
62856
63070
|
if (value !== this ._linear .getValue ())
|
|
62857
63071
|
this ._linear = value;
|
|
62858
63072
|
},
|
|
62859
|
-
|
|
63073
|
+
canMipMaps ()
|
|
62860
63074
|
{
|
|
62861
63075
|
return this .mipMaps;
|
|
62862
63076
|
},
|
|
@@ -62908,7 +63122,7 @@ Object .assign (Object .setPrototypeOf (X3DSingleTextureNode .prototype, Texturi
|
|
|
62908
63122
|
gl .texParameteri (target, gl .TEXTURE_MIN_FILTER, gl .NEAREST);
|
|
62909
63123
|
gl .texParameteri (target, gl .TEXTURE_MAG_FILTER, gl .NEAREST);
|
|
62910
63124
|
}
|
|
62911
|
-
else if (this .
|
|
63125
|
+
else if (this .canMipMaps () && textureProperties ._generateMipMaps .getValue ())
|
|
62912
63126
|
{
|
|
62913
63127
|
// Can MipMaps and wants MipMaps.
|
|
62914
63128
|
gl .generateMipmap (target);
|
|
@@ -63206,7 +63420,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
63206
63420
|
x_ite_Namespace .add ("X3DTexture2DNode", "x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
|
|
63207
63421
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
|
|
63208
63422
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
63209
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
63423
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(812);
|
|
63210
63424
|
/*******************************************************************************
|
|
63211
63425
|
*
|
|
63212
63426
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -66796,7 +67010,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
66796
67010
|
x_ite_Namespace .add ("X3DWorld", "x_ite/Execution/X3DWorld", X3DWorld_default_);
|
|
66797
67011
|
/* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
|
|
66798
67012
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
|
|
66799
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
67013
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(812);
|
|
66800
67014
|
/*******************************************************************************
|
|
66801
67015
|
*
|
|
66802
67016
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -67730,7 +67944,7 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
|
|
|
67730
67944
|
x_ite_Namespace .add ("ProtoDeclarationArray", "x_ite/Prototype/ProtoDeclarationArray", ProtoDeclarationArray_default_);
|
|
67731
67945
|
/* harmony default export */ const Prototype_ProtoDeclarationArray = (ProtoDeclarationArray_default_);
|
|
67732
67946
|
;// CONCATENATED MODULE: ./src/x_ite/Routing/X3DRoute.js
|
|
67733
|
-
/* provided dependency */ var X3DRoute_$ = __webpack_require__(
|
|
67947
|
+
/* provided dependency */ var X3DRoute_$ = __webpack_require__(812);
|
|
67734
67948
|
/*******************************************************************************
|
|
67735
67949
|
*
|
|
67736
67950
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -74839,6 +75053,7 @@ Object .assign (Object .setPrototypeOf (Box .prototype, Rendering_X3DGeometryNod
|
|
|
74839
75053
|
size = this ._size .getValue ();
|
|
74840
75054
|
|
|
74841
75055
|
this .setMultiTexCoords (geometry .getMultiTexCoords ());
|
|
75056
|
+
this .setTangents (geometry .getTangents ());
|
|
74842
75057
|
this .setNormals (geometry .getNormals ());
|
|
74843
75058
|
|
|
74844
75059
|
if (size .equals (defaultSize))
|
|
@@ -75208,6 +75423,7 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75208
75423
|
height1_2 = Math .abs (this ._height .getValue ()) / 2,
|
|
75209
75424
|
radius = Math .abs (this ._radius .getValue ()),
|
|
75210
75425
|
texCoordArray = this .getTexCoords (),
|
|
75426
|
+
tangentArray = this .getTangents (),
|
|
75211
75427
|
normalArray = this .getNormals (),
|
|
75212
75428
|
vertexArray = this .getVertices ();
|
|
75213
75429
|
|
|
@@ -75222,6 +75438,9 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75222
75438
|
for (const t of geometry .getMultiTexCoords () [0])
|
|
75223
75439
|
texCoordArray .push (t);
|
|
75224
75440
|
|
|
75441
|
+
for (const t of geometry .getTangents ())
|
|
75442
|
+
tangentArray .push (t);
|
|
75443
|
+
|
|
75225
75444
|
for (const n of geometry .getNormals ())
|
|
75226
75445
|
normalArray .push (n);
|
|
75227
75446
|
|
|
@@ -75243,6 +75462,9 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75243
75462
|
for (const t of geometry .getMultiTexCoords () [0])
|
|
75244
75463
|
texCoordArray .push (t);
|
|
75245
75464
|
|
|
75465
|
+
for (const t of geometry .getTangents ())
|
|
75466
|
+
tangentArray .push (t);
|
|
75467
|
+
|
|
75246
75468
|
for (const n of geometry .getNormals ())
|
|
75247
75469
|
normalArray .push (n);
|
|
75248
75470
|
|
|
@@ -75264,6 +75486,9 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75264
75486
|
for (const t of geometry .getMultiTexCoords () [0])
|
|
75265
75487
|
texCoordArray .push (t);
|
|
75266
75488
|
|
|
75489
|
+
for (const t of geometry .getTangents ())
|
|
75490
|
+
tangentArray .push (t);
|
|
75491
|
+
|
|
75267
75492
|
for (const n of geometry .getNormals ())
|
|
75268
75493
|
normalArray .push (n);
|
|
75269
75494
|
|
|
@@ -75779,8 +76004,8 @@ Object .defineProperties (ElevationGrid,
|
|
|
75779
76004
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
75780
76005
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
75781
76006
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
75782
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
75783
76007
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
76008
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
75784
76009
|
new Base_X3DFieldDefinition (Base_X3DConstants .initializeOnly, "height", new x_ite_Fields .MFFloat ()),
|
|
75785
76010
|
]),
|
|
75786
76011
|
enumerable: true,
|
|
@@ -76787,12 +77012,12 @@ Object .assign (Object .setPrototypeOf (X3DComposedGeometryNode .prototype, Rend
|
|
|
76787
77012
|
// Autogenerate normal if not specified.
|
|
76788
77013
|
|
|
76789
77014
|
if (!this .getNormal ())
|
|
76790
|
-
this .
|
|
77015
|
+
this .generateNormals (verticesPerPolygon, polygonsSize, trianglesSize);
|
|
76791
77016
|
|
|
76792
77017
|
this .setSolid (this ._solid .getValue ());
|
|
76793
77018
|
this .setCCW (this ._ccw .getValue ());
|
|
76794
77019
|
},
|
|
76795
|
-
|
|
77020
|
+
generateNormals (verticesPerPolygon, polygonsSize, trianglesSize)
|
|
76796
77021
|
{
|
|
76797
77022
|
const
|
|
76798
77023
|
normals = this .createNormals (verticesPerPolygon, polygonsSize),
|
|
@@ -77074,7 +77299,7 @@ Object .assign (Object .setPrototypeOf (IndexedFaceSet .prototype, Rendering_X3D
|
|
|
77074
77299
|
// Autogenerate normals if not specified.
|
|
77075
77300
|
|
|
77076
77301
|
if (!this .getNormal ())
|
|
77077
|
-
this .
|
|
77302
|
+
this .generateNormals (polygons);
|
|
77078
77303
|
|
|
77079
77304
|
this .setSolid (this ._solid .getValue ());
|
|
77080
77305
|
this .setCCW (this ._ccw .getValue ());
|
|
@@ -77194,7 +77419,7 @@ Object .assign (Object .setPrototypeOf (IndexedFaceSet .prototype, Rendering_X3D
|
|
|
77194
77419
|
Geometry_Triangle3 .triangulatePolygon (polygon, triangles);
|
|
77195
77420
|
};
|
|
77196
77421
|
})(),
|
|
77197
|
-
|
|
77422
|
+
generateNormals (polygons)
|
|
77198
77423
|
{
|
|
77199
77424
|
const
|
|
77200
77425
|
normals = this .createNormals (polygons),
|
|
@@ -77347,8 +77572,8 @@ Object .defineProperties (IndexedFaceSet,
|
|
|
77347
77572
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
77348
77573
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
77349
77574
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
77350
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
77351
77575
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
77576
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
77352
77577
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
77353
77578
|
]),
|
|
77354
77579
|
enumerable: true,
|
|
@@ -77444,6 +77669,7 @@ Object .assign (Object .setPrototypeOf (Sphere .prototype, Rendering_X3DGeometry
|
|
|
77444
77669
|
radius = Math .abs (this ._radius .getValue ());
|
|
77445
77670
|
|
|
77446
77671
|
this .setMultiTexCoords (geometry .getMultiTexCoords ());
|
|
77672
|
+
this .setTangents (geometry .getTangents ());
|
|
77447
77673
|
this .setNormals (geometry .getNormals ());
|
|
77448
77674
|
|
|
77449
77675
|
if (radius === 1)
|
|
@@ -81056,6 +81282,7 @@ Object .assign (Object .setPrototypeOf (X3DLightNode .prototype, Core_X3DChildNo
|
|
|
81056
81282
|
renderObject .getLights () .push (lightContainer);
|
|
81057
81283
|
|
|
81058
81284
|
renderObject .pushGlobalShadows (!! this .getShadowIntensity ());
|
|
81285
|
+
renderObject .getGlobalLightsKeys () .push (this .getLightKey ());
|
|
81059
81286
|
}
|
|
81060
81287
|
else
|
|
81061
81288
|
{
|
|
@@ -81082,6 +81309,7 @@ Object .assign (Object .setPrototypeOf (X3DLightNode .prototype, Core_X3DChildNo
|
|
|
81082
81309
|
renderObject .getLights () .push (lightContainer);
|
|
81083
81310
|
|
|
81084
81311
|
renderObject .pushGlobalShadows (!! this .getShadowIntensity ());
|
|
81312
|
+
renderObject .getGlobalLightsKeys () .push (this .getLightKey ());
|
|
81085
81313
|
}
|
|
81086
81314
|
else
|
|
81087
81315
|
{
|
|
@@ -81537,17 +81765,13 @@ Object .assign (EnvironmentLightContainer .prototype,
|
|
|
81537
81765
|
? this .GGXLUTTextureUnit = this .GGXLUTTextureUnit ?? browser .popTexture2DUnit ()
|
|
81538
81766
|
: browser .getTexture2DUnit ();
|
|
81539
81767
|
|
|
81540
|
-
// https://stackoverflow.com/a/25640078/1818915
|
|
81541
|
-
// The system will automatically clamp the specified parameter appropriately.
|
|
81542
|
-
// In GLSL 4 there is a textureQueryLevels function.
|
|
81543
|
-
const specularTextureLevels = 1 + Math .floor (Math .log2 (specularTexture ?.getSize () ?? 1));
|
|
81544
|
-
|
|
81545
81768
|
gl .uniform3f (shaderObject .x3d_EnvironmentLightColor, color .r, color .g, color .b);
|
|
81546
81769
|
gl .uniform1f (shaderObject .x3d_EnvironmentLightIntensity, lightNode .getIntensity ());
|
|
81547
81770
|
gl .uniformMatrix3fv (shaderObject .x3d_EnvironmentLightRotation, false, this .rotationMatrix);
|
|
81548
81771
|
gl .uniform1i (shaderObject .x3d_EnvironmentLightDiffuseTextureLinear, diffuseTexture ?.isLinear ());
|
|
81772
|
+
gl .uniform1i (shaderObject .x3d_EnvironmentLightDiffuseTextureLevels, diffuseTexture ?.getLevels () ?? 0);
|
|
81549
81773
|
gl .uniform1i (shaderObject .x3d_EnvironmentLightSpecularTextureLinear, specularTexture ?.isLinear ());
|
|
81550
|
-
gl .uniform1i (shaderObject .x3d_EnvironmentLightSpecularTextureLevels,
|
|
81774
|
+
gl .uniform1i (shaderObject .x3d_EnvironmentLightSpecularTextureLevels, specularTexture ?.getLevels () ?? 0);
|
|
81551
81775
|
|
|
81552
81776
|
gl .activeTexture (gl .TEXTURE0 + diffuseTextureUnit);
|
|
81553
81777
|
gl .bindTexture (gl .TEXTURE_CUBE_MAP, diffuseTexture ?.getTexture () ?? browser .getDefaultTextureCube ());
|
|
@@ -87941,7 +88165,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87941
88165
|
|
|
87942
88166
|
this .thickLinesVertexArrayObject .update ();
|
|
87943
88167
|
},
|
|
87944
|
-
|
|
88168
|
+
generateTexCoords ()
|
|
87945
88169
|
{
|
|
87946
88170
|
// Line stipple support.
|
|
87947
88171
|
|
|
@@ -88875,8 +89099,8 @@ Object .defineProperties (IndexedLineSet,
|
|
|
88875
89099
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "attrib", new x_ite_Fields .MFNode ()),
|
|
88876
89100
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
88877
89101
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
88878
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
88879
89102
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
89103
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
88880
89104
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
88881
89105
|
]),
|
|
88882
89106
|
enumerable: true,
|
|
@@ -89054,8 +89278,8 @@ Object .defineProperties (IndexedTriangleFanSet,
|
|
|
89054
89278
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89055
89279
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89056
89280
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
89057
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89058
89281
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
89282
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89059
89283
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89060
89284
|
]),
|
|
89061
89285
|
enumerable: true,
|
|
@@ -89190,8 +89414,8 @@ Object .defineProperties (IndexedTriangleSet,
|
|
|
89190
89414
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89191
89415
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89192
89416
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
89193
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89194
89417
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
89418
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89195
89419
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89196
89420
|
]),
|
|
89197
89421
|
enumerable: true,
|
|
@@ -89377,8 +89601,8 @@ Object .defineProperties (IndexedTriangleStripSet,
|
|
|
89377
89601
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89378
89602
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89379
89603
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
89380
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89381
89604
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
89605
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89382
89606
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89383
89607
|
]),
|
|
89384
89608
|
enumerable: true,
|
|
@@ -89636,8 +89860,8 @@ Object .defineProperties (LineSet,
|
|
|
89636
89860
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "attrib", new x_ite_Fields .MFNode ()),
|
|
89637
89861
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89638
89862
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89639
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89640
89863
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
89864
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89641
89865
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89642
89866
|
]),
|
|
89643
89867
|
enumerable: true,
|
|
@@ -89953,7 +90177,7 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
89953
90177
|
{
|
|
89954
90178
|
return false;
|
|
89955
90179
|
},
|
|
89956
|
-
|
|
90180
|
+
generateTexCoords ()
|
|
89957
90181
|
{ },
|
|
89958
90182
|
display (gl, renderContext)
|
|
89959
90183
|
{
|
|
@@ -90317,8 +90541,8 @@ Object .defineProperties (PointSet,
|
|
|
90317
90541
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "attrib", new x_ite_Fields .MFNode ()),
|
|
90318
90542
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90319
90543
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90320
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90321
90544
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
90545
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90322
90546
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90323
90547
|
]),
|
|
90324
90548
|
enumerable: true,
|
|
@@ -90635,8 +90859,8 @@ Object .defineProperties (TriangleFanSet,
|
|
|
90635
90859
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90636
90860
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90637
90861
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
90638
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90639
90862
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
90863
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90640
90864
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90641
90865
|
]),
|
|
90642
90866
|
enumerable: true,
|
|
@@ -90766,8 +90990,8 @@ Object .defineProperties (TriangleSet,
|
|
|
90766
90990
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90767
90991
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90768
90992
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
90769
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90770
90993
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
90994
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90771
90995
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90772
90996
|
]),
|
|
90773
90997
|
enumerable: true,
|
|
@@ -90931,8 +91155,8 @@ Object .defineProperties (TriangleStripSet,
|
|
|
90931
91155
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90932
91156
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90933
91157
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
90934
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90935
91158
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
91159
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90936
91160
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90937
91161
|
]),
|
|
90938
91162
|
enumerable: true,
|
|
@@ -91172,18 +91396,21 @@ const MaterialTextures_default_ = {
|
|
|
91172
91396
|
"x3d_SpecularGlossinessTexture",
|
|
91173
91397
|
"x3d_OcclusionTexture",
|
|
91174
91398
|
"x3d_NormalTexture",
|
|
91399
|
+
|
|
91175
91400
|
"x3d_AnisotropyTextureEXT",
|
|
91176
|
-
"x3d_ClearcoatTextureEXT",
|
|
91177
|
-
"x3d_ClearcoatRoughnessTextureEXT",
|
|
91178
91401
|
"x3d_ClearcoatNormalTextureEXT",
|
|
91402
|
+
"x3d_ClearcoatRoughnessTextureEXT",
|
|
91403
|
+
"x3d_ClearcoatTextureEXT",
|
|
91404
|
+
"x3d_DiffuseTransmissionColorTextureEXT",
|
|
91405
|
+
"x3d_DiffuseTransmissionTextureEXT",
|
|
91179
91406
|
"x3d_IridescenceTextureEXT",
|
|
91180
91407
|
"x3d_IridescenceThicknessTextureEXT",
|
|
91181
91408
|
"x3d_SheenColorTextureEXT",
|
|
91182
91409
|
"x3d_SheenRoughnessTextureEXT",
|
|
91183
|
-
"x3d_SpecularTextureEXT",
|
|
91184
91410
|
"x3d_SpecularColorTextureEXT",
|
|
91185
|
-
"
|
|
91411
|
+
"x3d_SpecularTextureEXT",
|
|
91186
91412
|
"x3d_ThicknessTextureEXT",
|
|
91413
|
+
"x3d_TransmissionTextureEXT",
|
|
91187
91414
|
],
|
|
91188
91415
|
texture (name, components = "rgba", colorSpace = "")
|
|
91189
91416
|
{
|
|
@@ -91280,7 +91507,7 @@ mediump samplerCube textureCube;
|
|
|
91280
91507
|
x_ite_Namespace .add ("MaterialTextures", "assets/shaders/MaterialTextures", MaterialTextures_default_);
|
|
91281
91508
|
/* harmony default export */ const MaterialTextures = (MaterialTextures_default_);
|
|
91282
91509
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
|
|
91283
|
-
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(
|
|
91510
|
+
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(812);
|
|
91284
91511
|
/*******************************************************************************
|
|
91285
91512
|
*
|
|
91286
91513
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -91476,6 +91703,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91476
91703
|
this .x3d_EnvironmentLightRotation = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.rotation");
|
|
91477
91704
|
this .x3d_EnvironmentLightDiffuseTexture = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.diffuseTexture");
|
|
91478
91705
|
this .x3d_EnvironmentLightDiffuseTextureLinear = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.diffuseTextureLinear");
|
|
91706
|
+
this .x3d_EnvironmentLightDiffuseTextureLevels = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.diffuseTextureLevels");
|
|
91479
91707
|
this .x3d_EnvironmentLightSpecularTexture = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.specularTexture");
|
|
91480
91708
|
this .x3d_EnvironmentLightSpecularTextureLinear = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.specularTextureLinear");
|
|
91481
91709
|
this .x3d_EnvironmentLightSpecularTextureLevels = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.specularTextureLevels");
|
|
@@ -91516,26 +91744,28 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91516
91744
|
"x3d_MultiTextureColor",
|
|
91517
91745
|
// Extensions
|
|
91518
91746
|
"x3d_AnisotropyEXT",
|
|
91747
|
+
"x3d_AttenuationColorEXT",
|
|
91748
|
+
"x3d_AttenuationDistanceEXT",
|
|
91519
91749
|
"x3d_ClearcoatEXT",
|
|
91520
91750
|
"x3d_ClearcoatRoughnessEXT",
|
|
91751
|
+
"x3d_DiffuseTransmissionColorEXT",
|
|
91752
|
+
"x3d_DiffuseTransmissionEXT",
|
|
91521
91753
|
"x3d_DispersionEXT",
|
|
91522
91754
|
"x3d_EmissiveStrengthEXT",
|
|
91523
91755
|
"x3d_IorEXT",
|
|
91524
91756
|
"x3d_IridescenceEXT",
|
|
91525
91757
|
"x3d_IridescenceIndexOfRefractionEXT",
|
|
91526
|
-
"x3d_IridescenceThicknessMinimumEXT",
|
|
91527
91758
|
"x3d_IridescenceThicknessMaximumEXT",
|
|
91759
|
+
"x3d_IridescenceThicknessMinimumEXT",
|
|
91528
91760
|
"x3d_SheenColorEXT",
|
|
91529
|
-
"x3d_SheenRoughnessEXT",
|
|
91530
91761
|
"x3d_SheenELUTTextureEXT",
|
|
91531
|
-
"
|
|
91762
|
+
"x3d_SheenRoughnessEXT",
|
|
91532
91763
|
"x3d_SpecularColorEXT",
|
|
91764
|
+
"x3d_SpecularEXT",
|
|
91765
|
+
"x3d_ThicknessEXT",
|
|
91533
91766
|
"x3d_TransmissionEXT",
|
|
91534
91767
|
"x3d_TransmissionFramebufferSamplerEXT",
|
|
91535
91768
|
"x3d_TransmissionFramebufferSizeEXT",
|
|
91536
|
-
"x3d_ThicknessEXT",
|
|
91537
|
-
"x3d_AttenuationDistanceEXT",
|
|
91538
|
-
"x3d_AttenuationColorEXT",
|
|
91539
91769
|
];
|
|
91540
91770
|
|
|
91541
91771
|
for (const name of commonUniforms)
|
|
@@ -93757,71 +93987,6 @@ const ProgramShader_default_ = ProgramShader;
|
|
|
93757
93987
|
|
|
93758
93988
|
x_ite_Namespace .add ("ProgramShader", "x_ite/Components/Shaders/ProgramShader", ProgramShader_default_);
|
|
93759
93989
|
/* harmony default export */ const Shaders_ProgramShader = (ProgramShader_default_);
|
|
93760
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/Types.glsl.js
|
|
93761
|
-
|
|
93762
|
-
|
|
93763
|
-
const Types_glsl_default_ = /* glsl */ `
|
|
93764
|
-
#if defined(X3D_FOG)
|
|
93765
|
-
struct x3d_FogParameters{mediump int type;mediump vec3 color;mediump float visibilityRange;mediump mat3 matrix;};
|
|
93766
|
-
#endif
|
|
93767
|
-
#if defined(X3D_LIGHTING)
|
|
93768
|
-
struct x3d_LightSourceParameters{mediump int type;mediump vec3 color;mediump float intensity;mediump float ambientIntensity;mediump vec3 attenuation;mediump vec3 location;mediump vec3 direction;mediump float radius;mediump float beamWidth;mediump float cutOffAngle;mediump mat3 matrix;
|
|
93769
|
-
#if defined(X3D_SHADOWS)
|
|
93770
|
-
mediump vec3 shadowColor;mediump float shadowIntensity;mediump float shadowBias;mediump mat4 shadowMatrix;mediump int shadowMapSize;
|
|
93771
|
-
#endif
|
|
93772
|
-
};
|
|
93773
|
-
#endif
|
|
93774
|
-
#if defined(X3D_USE_IBL)
|
|
93775
|
-
struct x3d_EnvironmentLightSourceParameters{mediump vec3 color;mediump float intensity;mediump float ambientIntensity;mediump mat3 rotation;mediump samplerCube diffuseTexture;bool diffuseTextureLinear;mediump samplerCube specularTexture;bool specularTextureLinear;mediump int specularTextureLevels;mediump sampler2D GGXLUTTexture;
|
|
93776
|
-
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
93777
|
-
mediump sampler2D CharlieLUTTexture;
|
|
93778
|
-
#endif
|
|
93779
|
-
};
|
|
93780
|
-
#endif
|
|
93781
|
-
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93782
|
-
struct x3d_PointPropertiesParameters{mediump float pointSizeScaleFactor;mediump float pointSizeMinValue;mediump float pointSizeMaxValue;mediump vec3 attenuation;};
|
|
93783
|
-
#endif
|
|
93784
|
-
#if defined(X3D_GEOMETRY_1D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93785
|
-
struct x3d_LinePropertiesParameters{mediump int linetype;mediump float lineStippleScale;
|
|
93786
|
-
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
93787
|
-
sampler2D texture;
|
|
93788
|
-
#endif
|
|
93789
|
-
};
|
|
93790
|
-
#endif
|
|
93791
|
-
#if(defined(X3D_GEOMETRY_2D)||defined(X3D_GEOMETRY_3D))&&defined(X3D_STYLE_PROPERTIES)
|
|
93792
|
-
struct x3d_FillPropertiesParameters{bool filled;bool hatched;mediump vec3 hatchColor;
|
|
93793
|
-
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
93794
|
-
sampler2D texture;
|
|
93795
|
-
#endif
|
|
93796
|
-
mediump float scale;};
|
|
93797
|
-
#endif
|
|
93798
|
-
#if defined(X3D_UNLIT_MATERIAL)
|
|
93799
|
-
struct x3d_UnlitMaterialParameters{mediump vec3 emissiveColor;mediump float normalScale;mediump float transparency;};
|
|
93800
|
-
#endif
|
|
93801
|
-
#if defined(X3D_MATERIAL)
|
|
93802
|
-
struct x3d_MaterialParameters{mediump float ambientIntensity;mediump vec3 diffuseColor;mediump vec3 specularColor;mediump vec3 emissiveColor;mediump float shininess;mediump float occlusionStrength;mediump float normalScale;mediump float transparency;};
|
|
93803
|
-
#endif
|
|
93804
|
-
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
93805
|
-
struct x3d_PhysicalMaterialParameters{
|
|
93806
|
-
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
93807
|
-
mediump vec3 diffuseColor;mediump vec3 specularColor;mediump float glossiness;
|
|
93808
|
-
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93809
|
-
mediump vec3 baseColor;mediump float metallic;mediump float roughness;
|
|
93810
|
-
#endif
|
|
93811
|
-
mediump vec3 emissiveColor;mediump float occlusionStrength;mediump float normalScale;mediump float transparency;};
|
|
93812
|
-
#endif
|
|
93813
|
-
${MaterialTextures .structs ()}
|
|
93814
|
-
#if defined(X3D_MULTI_TEXTURING)
|
|
93815
|
-
struct x3d_MultiTextureParameters{mediump int mode;mediump int alphaMode;mediump int source;mediump int function;};
|
|
93816
|
-
#endif
|
|
93817
|
-
#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES)
|
|
93818
|
-
struct x3d_TextureCoordinateGeneratorParameters{mediump int mode;mediump float parameter[6];};
|
|
93819
|
-
#endif
|
|
93820
|
-
`
|
|
93821
|
-
;
|
|
93822
|
-
|
|
93823
|
-
x_ite_Namespace .add ("Types.glsl", "assets/shaders/Types.glsl", Types_glsl_default_);
|
|
93824
|
-
/* harmony default export */ const Types_glsl = (Types_glsl_default_);
|
|
93825
93990
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/ModeType.js
|
|
93826
93991
|
/*******************************************************************************
|
|
93827
93992
|
*
|
|
@@ -94097,6 +94262,150 @@ const TextureCoordinateGeneratorModeType_default_ = TextureCoordinateGeneratorMo
|
|
|
94097
94262
|
|
|
94098
94263
|
x_ite_Namespace .add ("TextureCoordinateGeneratorModeType", "x_ite/Browser/Texturing/TextureCoordinateGeneratorModeType", TextureCoordinateGeneratorModeType_default_);
|
|
94099
94264
|
/* harmony default export */ const TextureCoordinateGeneratorModeType = (TextureCoordinateGeneratorModeType_default_);
|
|
94265
|
+
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/RenderingConfiguration.js
|
|
94266
|
+
// The numbers must remain in single digits, otherwise the number base must
|
|
94267
|
+
// be increased in the number output for the material shader key.
|
|
94268
|
+
|
|
94269
|
+
const maxClipPlanes = 6;
|
|
94270
|
+
|
|
94271
|
+
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/TexturingConfiguration.js
|
|
94272
|
+
// The numbers must remain in single digits, otherwise the number base must
|
|
94273
|
+
// be increased in the number output for the material shader key.
|
|
94274
|
+
|
|
94275
|
+
const maxTextureTransforms = 4;
|
|
94276
|
+
const maxTexCoords = 4;
|
|
94277
|
+
const maxTextures = 4;
|
|
94278
|
+
|
|
94279
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/Types.glsl.js
|
|
94280
|
+
|
|
94281
|
+
|
|
94282
|
+
|
|
94283
|
+
|
|
94284
|
+
|
|
94285
|
+
|
|
94286
|
+
|
|
94287
|
+
|
|
94288
|
+
const Types_glsl_default_ = /* glsl */ `
|
|
94289
|
+
#define X_ITE
|
|
94290
|
+
#define x3d_None 0
|
|
94291
|
+
#define x3d_Points 0
|
|
94292
|
+
#define x3d_Lines 1
|
|
94293
|
+
#define x3d_Geometry2D 2
|
|
94294
|
+
#define x3d_Geometry3D 3
|
|
94295
|
+
#define x3d_MaxClipPlanes ${maxClipPlanes}
|
|
94296
|
+
#define x3d_LinearFog 1
|
|
94297
|
+
#define x3d_ExponentialFog 2
|
|
94298
|
+
#define x3d_Exponential2Fog 3
|
|
94299
|
+
#define x3d_DirectionalLight 1
|
|
94300
|
+
#define x3d_PointLight 2
|
|
94301
|
+
#define x3d_SpotLight 3
|
|
94302
|
+
#define x3d_MaxTextures ${maxTextures}
|
|
94303
|
+
#define x3d_TextureType2D 2
|
|
94304
|
+
#define x3d_TextureType3D 3
|
|
94305
|
+
#define x3d_TextureTypeCube 4
|
|
94306
|
+
#define x3d_Replace ${Texturing_ModeType .REPLACE}
|
|
94307
|
+
#define x3d_Modulate ${Texturing_ModeType .MODULATE}
|
|
94308
|
+
#define x3d_Modulate2X ${Texturing_ModeType .MODULATE2X}
|
|
94309
|
+
#define x3d_Modulate4X ${Texturing_ModeType .MODULATE4X}
|
|
94310
|
+
#define x3d_Add ${Texturing_ModeType .ADD}
|
|
94311
|
+
#define x3d_AddSigned ${Texturing_ModeType .ADDSIGNED}
|
|
94312
|
+
#define x3d_AddSigned2X ${Texturing_ModeType .ADDSIGNED2X}
|
|
94313
|
+
#define x3d_AddSmooth ${Texturing_ModeType .ADDSMOOTH}
|
|
94314
|
+
#define x3d_Subtract ${Texturing_ModeType .SUBTRACT}
|
|
94315
|
+
#define x3d_BlendDiffuseAlpha ${Texturing_ModeType .BLENDDIFFUSEALPHA}
|
|
94316
|
+
#define x3d_BlendTextureAlpha ${Texturing_ModeType .BLENDTEXTUREALPHA}
|
|
94317
|
+
#define x3d_BlendFactorAlpha ${Texturing_ModeType .BLENDFACTORALPHA}
|
|
94318
|
+
#define x3d_BlendCurrentAlpha ${Texturing_ModeType .BLENDCURRENTALPHA}
|
|
94319
|
+
#define x3d_ModulateAlphaAddColor ${Texturing_ModeType .MODULATEALPHA_ADDCOLOR}
|
|
94320
|
+
#define x3d_ModulateInvAlphaAddColor ${Texturing_ModeType .MODULATEINVALPHA_ADDCOLOR}
|
|
94321
|
+
#define x3d_ModulateInvColorAddAlpha ${Texturing_ModeType .MODULATEINVCOLOR_ADDALPHA}
|
|
94322
|
+
#define x3d_DotProduct3 ${Texturing_ModeType .DOTPRODUCT3}
|
|
94323
|
+
#define x3d_SelectArg1 ${Texturing_ModeType .SELECTARG1}
|
|
94324
|
+
#define x3d_SelectArg2 ${Texturing_ModeType .SELECTARG2}
|
|
94325
|
+
#define x3d_Off ${Texturing_ModeType .OFF}
|
|
94326
|
+
#define x3d_Diffuse ${Texturing_SourceType .DIFFUSE}
|
|
94327
|
+
#define x3d_Specular ${Texturing_SourceType .SPECULAR}
|
|
94328
|
+
#define x3d_Factor ${Texturing_SourceType .FACTOR}
|
|
94329
|
+
#define x3d_Complement ${Texturing_FunctionType .COMPLEMENT}
|
|
94330
|
+
#define x3d_AlphaReplicate ${Texturing_FunctionType .ALPHAREPLICATE}
|
|
94331
|
+
#define x3d_Sphere ${TextureCoordinateGeneratorModeType .SPHERE}
|
|
94332
|
+
#define x3d_CameraSpaceNormal ${TextureCoordinateGeneratorModeType .CAMERASPACENORMAL}
|
|
94333
|
+
#define x3d_CameraSpacePosition ${TextureCoordinateGeneratorModeType .CAMERASPACEPOSITION}
|
|
94334
|
+
#define x3d_CameraSpaceReflectionVector ${TextureCoordinateGeneratorModeType .CAMERASPACEREFLECTIONVECTOR}
|
|
94335
|
+
#define x3d_SphereLocal ${TextureCoordinateGeneratorModeType .SPHERE_LOCAL}
|
|
94336
|
+
#define x3d_Coord ${TextureCoordinateGeneratorModeType .COORD}
|
|
94337
|
+
#define x3d_CoordEye ${TextureCoordinateGeneratorModeType .COORD_EYE}
|
|
94338
|
+
#define x3d_Noise ${TextureCoordinateGeneratorModeType .NOISE}
|
|
94339
|
+
#define x3d_NoiseEye ${TextureCoordinateGeneratorModeType .NOISE_EYE}
|
|
94340
|
+
#define x3d_SphereReflect ${TextureCoordinateGeneratorModeType .SPHERE_REFLECT}
|
|
94341
|
+
#define x3d_SphereReflectLocal ${TextureCoordinateGeneratorModeType .SPHERE_REFLECT_LOCAL}
|
|
94342
|
+
#define x3d_GeometryPoints 0
|
|
94343
|
+
#define x3d_GeometryLines 1
|
|
94344
|
+
#define x3d_NoneClipPlane vec4(88.0,51.0,68.0,33.0)
|
|
94345
|
+
#define x3d_NoneFog 0
|
|
94346
|
+
#define x3d_NoneLight 0
|
|
94347
|
+
#define x3d_NoneTexture 0
|
|
94348
|
+
#if defined(X3D_FOG)
|
|
94349
|
+
struct x3d_FogParameters{mediump int type;mediump vec3 color;mediump float visibilityRange;mediump mat3 matrix;};
|
|
94350
|
+
#endif
|
|
94351
|
+
#if defined(X3D_LIGHTING)
|
|
94352
|
+
struct x3d_LightSourceParameters{mediump int type;mediump vec3 color;mediump float intensity;mediump float ambientIntensity;mediump vec3 attenuation;mediump vec3 location;mediump vec3 direction;mediump float radius;mediump float beamWidth;mediump float cutOffAngle;mediump mat3 matrix;
|
|
94353
|
+
#if defined(X3D_SHADOWS)
|
|
94354
|
+
mediump vec3 shadowColor;mediump float shadowIntensity;mediump float shadowBias;mediump mat4 shadowMatrix;mediump int shadowMapSize;
|
|
94355
|
+
#endif
|
|
94356
|
+
};
|
|
94357
|
+
#endif
|
|
94358
|
+
#if defined(X3D_USE_IBL)
|
|
94359
|
+
struct x3d_EnvironmentLightSourceParameters{mediump vec3 color;mediump float intensity;mediump float ambientIntensity;mediump mat3 rotation;mediump samplerCube diffuseTexture;bool diffuseTextureLinear;mediump int diffuseTextureLevels;mediump samplerCube specularTexture;bool specularTextureLinear;mediump int specularTextureLevels;mediump sampler2D GGXLUTTexture;
|
|
94360
|
+
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
94361
|
+
mediump sampler2D CharlieLUTTexture;
|
|
94362
|
+
#endif
|
|
94363
|
+
};
|
|
94364
|
+
#endif
|
|
94365
|
+
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
94366
|
+
struct x3d_PointPropertiesParameters{mediump float pointSizeScaleFactor;mediump float pointSizeMinValue;mediump float pointSizeMaxValue;mediump vec3 attenuation;};
|
|
94367
|
+
#endif
|
|
94368
|
+
#if defined(X3D_GEOMETRY_1D)&&defined(X3D_STYLE_PROPERTIES)
|
|
94369
|
+
struct x3d_LinePropertiesParameters{mediump int linetype;mediump float lineStippleScale;
|
|
94370
|
+
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
94371
|
+
sampler2D texture;
|
|
94372
|
+
#endif
|
|
94373
|
+
};
|
|
94374
|
+
#endif
|
|
94375
|
+
#if(defined(X3D_GEOMETRY_2D)||defined(X3D_GEOMETRY_3D))&&defined(X3D_STYLE_PROPERTIES)
|
|
94376
|
+
struct x3d_FillPropertiesParameters{bool filled;bool hatched;mediump vec3 hatchColor;
|
|
94377
|
+
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
94378
|
+
sampler2D texture;
|
|
94379
|
+
#endif
|
|
94380
|
+
mediump float scale;};
|
|
94381
|
+
#endif
|
|
94382
|
+
#if defined(X3D_UNLIT_MATERIAL)
|
|
94383
|
+
struct x3d_UnlitMaterialParameters{mediump vec3 emissiveColor;mediump float normalScale;mediump float transparency;};
|
|
94384
|
+
#endif
|
|
94385
|
+
#if defined(X3D_MATERIAL)
|
|
94386
|
+
struct x3d_MaterialParameters{mediump float ambientIntensity;mediump vec3 diffuseColor;mediump vec3 specularColor;mediump vec3 emissiveColor;mediump float shininess;mediump float occlusionStrength;mediump float normalScale;mediump float transparency;};
|
|
94387
|
+
#endif
|
|
94388
|
+
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
94389
|
+
struct x3d_PhysicalMaterialParameters{
|
|
94390
|
+
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
94391
|
+
mediump vec3 diffuseColor;mediump vec3 specularColor;mediump float glossiness;
|
|
94392
|
+
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
94393
|
+
mediump vec3 baseColor;mediump float metallic;mediump float roughness;
|
|
94394
|
+
#endif
|
|
94395
|
+
mediump vec3 emissiveColor;mediump float occlusionStrength;mediump float normalScale;mediump float transparency;};
|
|
94396
|
+
#endif
|
|
94397
|
+
${MaterialTextures .structs ()}
|
|
94398
|
+
#if defined(X3D_MULTI_TEXTURING)
|
|
94399
|
+
struct x3d_MultiTextureParameters{mediump int mode;mediump int alphaMode;mediump int source;mediump int function;};
|
|
94400
|
+
#endif
|
|
94401
|
+
#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES)
|
|
94402
|
+
struct x3d_TextureCoordinateGeneratorParameters{mediump int mode;mediump float parameter[6];};
|
|
94403
|
+
#endif
|
|
94404
|
+
`
|
|
94405
|
+
;
|
|
94406
|
+
|
|
94407
|
+
x_ite_Namespace .add ("Types.glsl", "assets/shaders/Types.glsl", Types_glsl_default_);
|
|
94408
|
+
/* harmony default export */ const Types_glsl = (Types_glsl_default_);
|
|
94100
94409
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Shaders/ShaderSource.js
|
|
94101
94410
|
/*******************************************************************************
|
|
94102
94411
|
*
|
|
@@ -94147,33 +94456,29 @@ x_ite_Namespace .add ("TextureCoordinateGeneratorModeType", "x_ite/Browser/Textu
|
|
|
94147
94456
|
|
|
94148
94457
|
|
|
94149
94458
|
|
|
94150
|
-
|
|
94151
|
-
|
|
94152
|
-
|
|
94153
|
-
|
|
94154
94459
|
const ShaderSource =
|
|
94155
94460
|
{
|
|
94156
94461
|
getSource (gl, browser, source, options)
|
|
94157
94462
|
{
|
|
94158
|
-
|
|
94159
|
-
|
|
94160
|
-
|
|
94161
|
-
|
|
94162
|
-
|
|
94163
|
-
|
|
94164
|
-
|
|
94165
|
-
|
|
94166
|
-
|
|
94167
|
-
|
|
94168
|
-
|
|
94169
|
-
|
|
94170
|
-
|
|
94171
|
-
|
|
94172
|
-
|
|
94463
|
+
const
|
|
94464
|
+
COMMENTS = "\\s+|/\\*[\\s\\S]*?\\*/|//.*?\\n",
|
|
94465
|
+
LINE = "#line\\s+.*?\\n",
|
|
94466
|
+
IF = "#if\\s+.*?\\n",
|
|
94467
|
+
ELIF = "#elif\\s+.*?\\n",
|
|
94468
|
+
IFDEF = "#ifdef\\s+.*?\\n",
|
|
94469
|
+
IFNDEF = "#ifndef\\s+.*?\\n",
|
|
94470
|
+
ELSE = "#else.*?\\n",
|
|
94471
|
+
ENDIF = "#endif.*?\\n",
|
|
94472
|
+
DEFINE = "#define\\s+(?:[^\\n\\\\]|\\\\[^\\r\\n]|\\\\\\r?\\n)*\\n",
|
|
94473
|
+
UNDEF = "#undef\\s+.*?\\n",
|
|
94474
|
+
PRAGMA = "#pragma\\s+.*?\\n",
|
|
94475
|
+
PREPROCESSOR = `${LINE}|${IF}|${ELIF}|${IFDEF}|${IFNDEF}|${ELSE}|${ENDIF}|${DEFINE}|${UNDEF}|${PRAGMA}`,
|
|
94476
|
+
VERSION = "#version\\s+.*?\\n",
|
|
94477
|
+
EXTENSION = "#extension\\s+.*?\\n";
|
|
94173
94478
|
|
|
94174
|
-
|
|
94175
|
-
|
|
94176
|
-
|
|
94479
|
+
const
|
|
94480
|
+
GLSL = new RegExp (`^((?:${COMMENTS}|${PREPROCESSOR})*(?:${VERSION})?(?:${COMMENTS}|${PREPROCESSOR}|${EXTENSION})*)`, "s"),
|
|
94481
|
+
match = source .match (GLSL);
|
|
94177
94482
|
|
|
94178
94483
|
// const
|
|
94179
94484
|
// COMMENTS = "\\s+|/\\*.*?\\*/|//.*?\\n",
|
|
@@ -94189,90 +94494,10 @@ const ShaderSource =
|
|
|
94189
94494
|
|
|
94190
94495
|
// Constants
|
|
94191
94496
|
|
|
94192
|
-
|
|
94193
|
-
|
|
94194
|
-
|
|
94195
|
-
|
|
94196
|
-
if (gl .HAS_FEATURE_DEPTH_TEXTURE)
|
|
94197
|
-
constants += "#define X3D_DEPTH_TEXTURE\n";
|
|
94198
|
-
|
|
94199
|
-
for (const option of options)
|
|
94200
|
-
constants += "#define " + option + "\n";
|
|
94201
|
-
|
|
94202
|
-
// Definitions
|
|
94203
|
-
|
|
94204
|
-
let definitions = "";
|
|
94205
|
-
|
|
94206
|
-
definitions += "#define x3d_None 0\n";
|
|
94207
|
-
|
|
94208
|
-
definitions += "#define x3d_Points 0\n";
|
|
94209
|
-
definitions += "#define x3d_Lines 1\n";
|
|
94210
|
-
definitions += "#define x3d_Geometry2D 2\n";
|
|
94211
|
-
definitions += "#define x3d_Geometry3D 3\n";
|
|
94212
|
-
|
|
94213
|
-
definitions += "#define x3d_MaxClipPlanes " + browser .getMaxClipPlanes () + "\n";
|
|
94214
|
-
|
|
94215
|
-
definitions += "#define x3d_LinearFog 1\n";
|
|
94216
|
-
definitions += "#define x3d_ExponentialFog 2\n";
|
|
94217
|
-
definitions += "#define x3d_Exponential2Fog 3\n";
|
|
94218
|
-
|
|
94219
|
-
definitions += "#define x3d_MaxLights " + browser .getMaxLights () + "\n";
|
|
94220
|
-
definitions += "#define x3d_DirectionalLight 1\n";
|
|
94221
|
-
definitions += "#define x3d_PointLight 2\n";
|
|
94222
|
-
definitions += "#define x3d_SpotLight 3\n";
|
|
94223
|
-
|
|
94224
|
-
definitions += "#define x3d_MaxTextures " + browser .getMaxTextures () + "\n";
|
|
94225
|
-
definitions += "#define x3d_TextureType2D 2\n";
|
|
94226
|
-
definitions += "#define x3d_TextureType3D 3\n";
|
|
94227
|
-
definitions += "#define x3d_TextureTypeCube 4\n";
|
|
94228
|
-
|
|
94229
|
-
definitions += "#define x3d_Replace " + Texturing_ModeType .REPLACE + "\n";
|
|
94230
|
-
definitions += "#define x3d_Modulate " + Texturing_ModeType .MODULATE + "\n";
|
|
94231
|
-
definitions += "#define x3d_Modulate2X " + Texturing_ModeType .MODULATE2X + "\n";
|
|
94232
|
-
definitions += "#define x3d_Modulate4X " + Texturing_ModeType .MODULATE4X + "\n";
|
|
94233
|
-
definitions += "#define x3d_Add " + Texturing_ModeType .ADD + "\n";
|
|
94234
|
-
definitions += "#define x3d_AddSigned " + Texturing_ModeType .ADDSIGNED + "\n";
|
|
94235
|
-
definitions += "#define x3d_AddSigned2X " + Texturing_ModeType .ADDSIGNED2X + "\n";
|
|
94236
|
-
definitions += "#define x3d_AddSmooth " + Texturing_ModeType .ADDSMOOTH + "\n";
|
|
94237
|
-
definitions += "#define x3d_Subtract " + Texturing_ModeType .SUBTRACT + "\n";
|
|
94238
|
-
definitions += "#define x3d_BlendDiffuseAlpha " + Texturing_ModeType .BLENDDIFFUSEALPHA + "\n";
|
|
94239
|
-
definitions += "#define x3d_BlendTextureAlpha " + Texturing_ModeType .BLENDTEXTUREALPHA + "\n";
|
|
94240
|
-
definitions += "#define x3d_BlendFactorAlpha " + Texturing_ModeType .BLENDFACTORALPHA + "\n";
|
|
94241
|
-
definitions += "#define x3d_BlendCurrentAlpha " + Texturing_ModeType .BLENDCURRENTALPHA + "\n";
|
|
94242
|
-
definitions += "#define x3d_ModulateAlphaAddColor " + Texturing_ModeType .MODULATEALPHA_ADDCOLOR + "\n";
|
|
94243
|
-
definitions += "#define x3d_ModulateInvAlphaAddColor " + Texturing_ModeType .MODULATEINVALPHA_ADDCOLOR + "\n";
|
|
94244
|
-
definitions += "#define x3d_ModulateInvColorAddAlpha " + Texturing_ModeType .MODULATEINVCOLOR_ADDALPHA + "\n";
|
|
94245
|
-
definitions += "#define x3d_DotProduct3 " + Texturing_ModeType .DOTPRODUCT3 + "\n";
|
|
94246
|
-
definitions += "#define x3d_SelectArg1 " + Texturing_ModeType .SELECTARG1 + "\n";
|
|
94247
|
-
definitions += "#define x3d_SelectArg2 " + Texturing_ModeType .SELECTARG2 + "\n";
|
|
94248
|
-
definitions += "#define x3d_Off " + Texturing_ModeType .OFF + "\n";
|
|
94249
|
-
|
|
94250
|
-
definitions += "#define x3d_Diffuse " + Texturing_SourceType .DIFFUSE + "\n";
|
|
94251
|
-
definitions += "#define x3d_Specular " + Texturing_SourceType .SPECULAR + "\n";
|
|
94252
|
-
definitions += "#define x3d_Factor " + Texturing_SourceType .FACTOR + "\n";
|
|
94253
|
-
|
|
94254
|
-
definitions += "#define x3d_Complement " + Texturing_FunctionType .COMPLEMENT + "\n";
|
|
94255
|
-
definitions += "#define x3d_AlphaReplicate " + Texturing_FunctionType .ALPHAREPLICATE + "\n";
|
|
94256
|
-
|
|
94257
|
-
definitions += "#define x3d_Sphere " + TextureCoordinateGeneratorModeType .SPHERE + "\n";
|
|
94258
|
-
definitions += "#define x3d_CameraSpaceNormal " + TextureCoordinateGeneratorModeType .CAMERASPACENORMAL + "\n";
|
|
94259
|
-
definitions += "#define x3d_CameraSpacePosition " + TextureCoordinateGeneratorModeType .CAMERASPACEPOSITION + "\n";
|
|
94260
|
-
definitions += "#define x3d_CameraSpaceReflectionVector " + TextureCoordinateGeneratorModeType .CAMERASPACEREFLECTIONVECTOR + "\n";
|
|
94261
|
-
definitions += "#define x3d_SphereLocal " + TextureCoordinateGeneratorModeType .SPHERE_LOCAL + "\n";
|
|
94262
|
-
definitions += "#define x3d_Coord " + TextureCoordinateGeneratorModeType .COORD + "\n";
|
|
94263
|
-
definitions += "#define x3d_CoordEye " + TextureCoordinateGeneratorModeType .COORD_EYE + "\n";
|
|
94264
|
-
definitions += "#define x3d_Noise " + TextureCoordinateGeneratorModeType .NOISE + "\n";
|
|
94265
|
-
definitions += "#define x3d_NoiseEye " + TextureCoordinateGeneratorModeType .NOISE_EYE + "\n";
|
|
94266
|
-
definitions += "#define x3d_SphereReflect " + TextureCoordinateGeneratorModeType .SPHERE_REFLECT + "\n";
|
|
94267
|
-
definitions += "#define x3d_SphereReflectLocal " + TextureCoordinateGeneratorModeType .SPHERE_REFLECT_LOCAL + "\n";
|
|
94268
|
-
|
|
94269
|
-
// Legacy
|
|
94270
|
-
definitions += "#define x3d_GeometryPoints 0\n";
|
|
94271
|
-
definitions += "#define x3d_GeometryLines 1\n";
|
|
94272
|
-
definitions += "#define x3d_NoneClipPlane vec4 (88.0, 51.0, 68.0, 33.0)\n";
|
|
94273
|
-
definitions += "#define x3d_NoneFog 0\n";
|
|
94274
|
-
definitions += "#define x3d_NoneLight 0\n";
|
|
94275
|
-
definitions += "#define x3d_NoneTexture 0\n";
|
|
94497
|
+
const defines = /* glsl */ `
|
|
94498
|
+
${options .map (option => `#define ${option}`) .join ("\n")}
|
|
94499
|
+
#define x3d_MaxLights ${browser .getMaxLights ()}
|
|
94500
|
+
`
|
|
94276
94501
|
|
|
94277
94502
|
// Adjust precision of struct types;
|
|
94278
94503
|
|
|
@@ -94283,12 +94508,12 @@ const ShaderSource =
|
|
|
94283
94508
|
precisionInt = matchInt ?.[1] ?? "mediump";
|
|
94284
94509
|
|
|
94285
94510
|
const types = Types_glsl
|
|
94286
|
-
.replace (/mediump\s+(float|vec2|vec3|mat3|mat4)/g, precisionFloat
|
|
94287
|
-
.replace (/mediump\s+(int)/g, precisionInt
|
|
94511
|
+
.replace (/mediump\s+(float|vec2|vec3|mat3|mat4)/g, `${precisionFloat} \$1`)
|
|
94512
|
+
.replace (/mediump\s+(int)/g, `${precisionInt} \$1`);
|
|
94288
94513
|
|
|
94289
|
-
const lines = (match [1] .match (/\n/g)
|
|
94514
|
+
const lines = (match [1] .match (/\n/g) ?.length ?? 0) + 1;
|
|
94290
94515
|
|
|
94291
|
-
return `${match [1]}${
|
|
94516
|
+
return `${match [1]}${defines}${types}#line ${lines + 1} -1\n${source .substring (match [0] .length)}`;
|
|
94292
94517
|
},
|
|
94293
94518
|
};
|
|
94294
94519
|
|
|
@@ -94305,14 +94530,6 @@ const ShaderSource_default_ = ShaderSource;
|
|
|
94305
94530
|
|
|
94306
94531
|
x_ite_Namespace .add ("ShaderSource", "x_ite/Browser/Shaders/ShaderSource", ShaderSource_default_);
|
|
94307
94532
|
/* harmony default export */ const Shaders_ShaderSource = (ShaderSource_default_);
|
|
94308
|
-
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/TexturingConfiguration.js
|
|
94309
|
-
// The numbers must remain in single digits, otherwise the number base must
|
|
94310
|
-
// be increased in the number output for the material shader key.
|
|
94311
|
-
|
|
94312
|
-
const maxTextureTransforms = 4;
|
|
94313
|
-
const maxTexCoords = 4;
|
|
94314
|
-
const maxTextures = 4;
|
|
94315
|
-
|
|
94316
94533
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Fragment1.glsl.js
|
|
94317
94534
|
|
|
94318
94535
|
|
|
@@ -94823,19 +95040,19 @@ uniform x3d_NormalTextureParameters x3d_NormalTexture;
|
|
|
94823
95040
|
NormalInfo getNormalInfo(const in float normalScale){
|
|
94824
95041
|
#if defined(X3D_NORMAL_TEXTURE)
|
|
94825
95042
|
vec3 UV=getTexCoord(x3d_NormalTexture.textureTransformMapping,x3d_NormalTexture.textureCoordinateMapping);
|
|
94826
|
-
#else
|
|
94827
|
-
vec3 UV=vec3(0.0);
|
|
94828
|
-
#endif
|
|
94829
95043
|
#if defined(X3D_NORMAL_TEXTURE_FLIP_Y)
|
|
94830
95044
|
UV.t=1.0-UV.t;
|
|
94831
95045
|
#endif
|
|
95046
|
+
#else
|
|
95047
|
+
vec3 UV=vertex;
|
|
95048
|
+
#endif
|
|
94832
95049
|
vec3 n,t,b,ng;
|
|
94833
95050
|
#if defined(X3D_TANGENTS)
|
|
94834
95051
|
t=normalize(TBN[0]);b=normalize(TBN[1]);ng=normalize(TBN[2]);
|
|
94835
95052
|
#else
|
|
94836
95053
|
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);
|
|
94837
95054
|
#endif
|
|
94838
|
-
if(gl_FrontFacing==false){t
|
|
95055
|
+
if(gl_FrontFacing==false){t=-t;b=-b;ng=-ng;}NormalInfo info;info.ng=ng;
|
|
94839
95056
|
#if defined(X3D_NORMAL_TEXTURE)
|
|
94840
95057
|
#if __VERSION__==100
|
|
94841
95058
|
#if defined(X3D_NORMAL_TEXTURE_2D)
|
|
@@ -95909,14 +96126,14 @@ x_ite_Namespace .add ("Unlit2.fs", "assets/shaders/webgl2/Unlit2.fs", Unlit2_fs_
|
|
|
95909
96126
|
/* harmony default export */ const Unlit2_fs = (Unlit2_fs_default_);
|
|
95910
96127
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/BRDF2.glsl.js
|
|
95911
96128
|
const BRDF2_glsl_default_ = /* glsl */ `
|
|
95912
|
-
const float M_PI=3.1415926535897932384626433832795;float max3(const in vec3 value){return max(max(value.x,value.y),value.z);}vec3 F_Schlick(const in vec3 f0,const in vec3 f90,const in float VdotH){return f0+(f90-f0)*pow(clamp(1.0-VdotH,0.0,1.0),5.0);}float F_Schlick(const in float f0,const in float f90,const in float VdotH){float x=clamp(1.0-VdotH,0.0,1.0);float x2=x*x;float x5=x*x2*x2;return f0+(f90-f0)*x5;}float F_Schlick(const in float f0,const in float VdotH){float f90=1.0;return F_Schlick(f0,f90,VdotH);}vec3 F_Schlick(const in vec3 f0,const in float f90,const in float VdotH){float x=clamp(1.0-VdotH,0.0,1.0);float x2=x*x;float x5=x*x2*x2;return f0+(f90-f0)*x5;}vec3 F_Schlick(const in vec3 f0,const in float VdotH){float f90=1.0;return F_Schlick(f0,f90,VdotH);}vec3 Schlick_to_F0(const in vec3 f,const in vec3 f90,const in float VdotH){float x=clamp(1.0-VdotH,0.0,1.0);float x2=x*x;float x5=clamp(x*x2*x2,0.0,0.9999);return(f-f90*x5)/(1.0-x5);}float Schlick_to_F0(const in float f,const in float f90,const in float VdotH){float x=clamp(1.0-VdotH,0.0,1.0);float x2=x*x;float x5=clamp(x*x2*x2,0.0,0.9999);return(f-f90*x5)/(1.0-x5);}vec3 Schlick_to_F0(const in vec3 f,const in float VdotH){return Schlick_to_F0(f,vec3(1.0),VdotH);}float Schlick_to_F0(const in float f,const in float VdotH){return Schlick_to_F0(f,1.0,VdotH);}float V_GGX(const in float NdotL,const in float NdotV,const in float alphaRoughness){float alphaRoughnessSq=alphaRoughness*alphaRoughness;float GGXV=NdotL*sqrt(NdotV*NdotV*(1.0-alphaRoughnessSq)+alphaRoughnessSq);float GGXL=NdotV*sqrt(NdotL*NdotL*(1.0-alphaRoughnessSq)+alphaRoughnessSq);float GGX=GGXV+GGXL;if(GGX>0.0){return 0.5/GGX;}return 0.0;}float D_GGX(const in float NdotH,const in float alphaRoughness){float alphaRoughnessSq=alphaRoughness*alphaRoughness;float f=(NdotH*NdotH)*(alphaRoughnessSq-1.0)+1.0;return alphaRoughnessSq/(M_PI*f*f);}
|
|
96129
|
+
const float M_PI=3.1415926535897932384626433832795;float max3(const in vec3 value){return max(max(value.x,value.y),value.z);}vec3 rgb_mix(const in vec3 base,const in vec3 layer,const in vec3 rgb_alpha){float rgb_alpha_max=max(rgb_alpha.r,max(rgb_alpha.g,rgb_alpha.b));return(1.0-rgb_alpha_max)*base+rgb_alpha*layer;}vec3 F_Schlick(const in vec3 f0,const in vec3 f90,const in float VdotH){return f0+(f90-f0)*pow(clamp(1.0-VdotH,0.0,1.0),5.0);}float F_Schlick(const in float f0,const in float f90,const in float VdotH){float x=clamp(1.0-VdotH,0.0,1.0);float x2=x*x;float x5=x*x2*x2;return f0+(f90-f0)*x5;}float F_Schlick(const in float f0,const in float VdotH){float f90=1.0;return F_Schlick(f0,f90,VdotH);}vec3 F_Schlick(const in vec3 f0,const in float f90,const in float VdotH){float x=clamp(1.0-VdotH,0.0,1.0);float x2=x*x;float x5=x*x2*x2;return f0+(f90-f0)*x5;}vec3 F_Schlick(const in vec3 f0,const in float VdotH){float f90=1.0;return F_Schlick(f0,f90,VdotH);}vec3 Schlick_to_F0(const in vec3 f,const in vec3 f90,const in float VdotH){float x=clamp(1.0-VdotH,0.0,1.0);float x2=x*x;float x5=clamp(x*x2*x2,0.0,0.9999);return(f-f90*x5)/(1.0-x5);}float Schlick_to_F0(const in float f,const in float f90,const in float VdotH){float x=clamp(1.0-VdotH,0.0,1.0);float x2=x*x;float x5=clamp(x*x2*x2,0.0,0.9999);return(f-f90*x5)/(1.0-x5);}vec3 Schlick_to_F0(const in vec3 f,const in float VdotH){return Schlick_to_F0(f,vec3(1.0),VdotH);}float Schlick_to_F0(const in float f,const in float VdotH){return Schlick_to_F0(f,1.0,VdotH);}float V_GGX(const in float NdotL,const in float NdotV,const in float alphaRoughness){float alphaRoughnessSq=alphaRoughness*alphaRoughness;float GGXV=NdotL*sqrt(NdotV*NdotV*(1.0-alphaRoughnessSq)+alphaRoughnessSq);float GGXL=NdotV*sqrt(NdotL*NdotL*(1.0-alphaRoughnessSq)+alphaRoughnessSq);float GGX=GGXV+GGXL;if(GGX>0.0){return 0.5/GGX;}return 0.0;}float D_GGX(const in float NdotH,const in float alphaRoughness){float alphaRoughnessSq=alphaRoughness*alphaRoughness;float f=(NdotH*NdotH)*(alphaRoughnessSq-1.0)+1.0;return alphaRoughnessSq/(M_PI*f*f);}
|
|
95913
96130
|
#if defined(X3D_LIGHTING)
|
|
95914
|
-
vec3 BRDF_lambertian(const in vec3
|
|
96131
|
+
vec3 BRDF_lambertian(const in vec3 diffuseColor){return diffuseColor/M_PI;}vec3 BRDF_specularGGX(const in float alphaRoughness,const in float NdotL,const in float NdotV,const in float NdotH){float Vis=V_GGX(NdotL,NdotV,alphaRoughness);float D=D_GGX(NdotH,alphaRoughness);return vec3(Vis*D);}
|
|
95915
96132
|
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95916
96133
|
vec3 BRDF_lambertianIridescence(const in vec3 f0,const in vec3 f90,const in vec3 iridescenceFresnel,const in float iridescenceFactor,const in vec3 diffuseColor,const in float specularWeight,const in float VdotH){vec3 iridescenceFresnelMax=vec3(max(max(iridescenceFresnel.r,iridescenceFresnel.g),iridescenceFresnel.b));vec3 schlickFresnel=F_Schlick(f0,f90,VdotH);vec3 F=mix(schlickFresnel,iridescenceFresnelMax,iridescenceFactor);return(1.0-specularWeight*F)*(diffuseColor/M_PI);}vec3 BRDF_specularGGXIridescence(const in vec3 f0,const in vec3 f90,const in vec3 iridescenceFresnel,const in float alphaRoughness,const in float iridescenceFactor,const in float specularWeight,const in float VdotH,const in float NdotL,const in float NdotV,const in float NdotH){vec3 F=mix(F_Schlick(f0,f90,VdotH),iridescenceFresnel,iridescenceFactor);float Vis=V_GGX(NdotL,NdotV,alphaRoughness);float D=D_GGX(NdotH,alphaRoughness);return specularWeight*F*Vis*D;}
|
|
95917
96134
|
#endif
|
|
95918
96135
|
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
95919
|
-
float D_GGX_anisotropic(const in float NdotH,const in float TdotH,const in float BdotH,const in float anisotropy,const in float at,const in float ab){float a2=at*ab;vec3 f=vec3(ab*TdotH,at*BdotH,a2*NdotH);float w2=a2/dot(f,f);return a2*w2*w2/M_PI;}float V_GGX_anisotropic(const in float NdotL,const in float NdotV,const in float BdotV,const in float TdotV,const in float TdotL,const in float BdotL,const in float at,const in float ab){float GGXV=NdotL*length(vec3(at*TdotV,ab*BdotV,NdotV));float GGXL=NdotV*length(vec3(at*TdotL,ab*BdotL,NdotL));float v=0.5/(GGXV+GGXL);return clamp(v,0.0,1.0);}vec3 BRDF_specularGGXAnisotropy(const in
|
|
96136
|
+
float D_GGX_anisotropic(const in float NdotH,const in float TdotH,const in float BdotH,const in float anisotropy,const in float at,const in float ab){float a2=at*ab;vec3 f=vec3(ab*TdotH,at*BdotH,a2*NdotH);float w2=a2/dot(f,f);return a2*w2*w2/M_PI;}float V_GGX_anisotropic(const in float NdotL,const in float NdotV,const in float BdotV,const in float TdotV,const in float TdotL,const in float BdotL,const in float at,const in float ab){float GGXV=NdotL*length(vec3(at*TdotV,ab*BdotV,NdotV));float GGXL=NdotV*length(vec3(at*TdotL,ab*BdotL,NdotL));float v=0.5/(GGXV+GGXL);return clamp(v,0.0,1.0);}vec3 BRDF_specularGGXAnisotropy(const in float alphaRoughness,const in float anisotropy,const in vec3 n,const in vec3 v,const in vec3 l,const in vec3 h,const in vec3 t,const in vec3 b){float at=mix(alphaRoughness,1.0,anisotropy*anisotropy);float ab=clamp(alphaRoughness,0.001,1.0);float NdotL=clamp(dot(n,l),0.0,1.0);float NdotH=clamp(dot(n,h),0.001,1.0);float NdotV=dot(n,v);float V=V_GGX_anisotropic(NdotL,NdotV,dot(b,v),dot(t,v),dot(t,l),dot(b,l),at,ab);float D=D_GGX_anisotropic(NdotH,dot(t,h),dot(b,h),anisotropy,at,ab);return vec3(V*D);}
|
|
95920
96137
|
#endif
|
|
95921
96138
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95922
96139
|
float lambdaSheenNumericHelper(const in float x,const in float alphaG){float oneMinusAlphaSq=(1.0-alphaG)*(1.0-alphaG);float a=mix(21.5473,25.3245,oneMinusAlphaSq);float b=mix(3.82987,3.32435,oneMinusAlphaSq);float c=mix(0.19823,0.16801,oneMinusAlphaSq);float d=mix(-1.97760,-1.27393,oneMinusAlphaSq);float e=mix(-4.32054,-4.85967,oneMinusAlphaSq);return a/(1.0+b*pow(x,c))+d*x+e;}float lambdaSheen(const in float cosTheta,const in float alphaG){if(abs(cosTheta)<0.5)return exp(lambdaSheenNumericHelper(cosTheta,alphaG));else return exp(2.0*lambdaSheenNumericHelper(0.5,alphaG)-lambdaSheenNumericHelper(1.0-cosTheta,alphaG));}float V_Sheen(const in float NdotL,const in float NdotV,in float sheenRoughness){sheenRoughness=max(sheenRoughness,0.000001);float alphaG=sheenRoughness*sheenRoughness;return clamp(1.0/((1.0+lambdaSheen(NdotV,alphaG)+lambdaSheen(NdotL,alphaG))*(4.0*NdotV*NdotL)),0.0,1.0);}float D_Charlie(in float sheenRoughness,const in float NdotH){sheenRoughness=max(sheenRoughness,0.000001);float alphaG=sheenRoughness*sheenRoughness;float invR=1.0/alphaG;float cos2h=NdotH*NdotH;float sin2h=1.0-cos2h;return(2.0+invR)*pow(sin2h,invR*0.5)/(2.0*M_PI);}vec3 BRDF_specularSheen(const in vec3 sheenColor,const in float sheenRoughness,const in float NdotL,const in float NdotV,const in float NdotH){float sheenDistribution=D_Charlie(sheenRoughness,NdotH);float sheenVisibility=V_Sheen(NdotL,NdotV,sheenRoughness);return sheenColor*sheenDistribution*sheenVisibility;}
|
|
@@ -95954,36 +96171,26 @@ if(!x3d_EnvironmentLightSource.specularTextureLinear)textureColor=sRGBToLinear(t
|
|
|
95954
96171
|
#endif
|
|
95955
96172
|
return textureColor*x3d_EnvironmentLightSource.color*x3d_EnvironmentLightSource.intensity;}
|
|
95956
96173
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95957
|
-
vec3 getSheenLight(const in vec3 reflection,const in float lod){
|
|
95958
|
-
#endif
|
|
95959
|
-
vec3 getIBLRadianceGGX(const in vec3 n,const in vec3 v,const in float roughness,const in vec3 F0,const in float specularWeight){float NdotV=clamp(dot(n,v),0.0,1.0);float lod=roughness*float(x3d_EnvironmentLightSource.specularTextureLevels);vec3 reflection=normalize(reflect(-v,n));vec2 brdfSamplePoint=clamp(vec2(NdotV,roughness),vec2(0.0),vec2(1.0));
|
|
96174
|
+
vec3 getSheenLight(const in vec3 reflection,const in float lod){vec3 texCoord=x3d_EnvironmentLightSource.rotation*reflection*vec3(-1.0,1.0,1.0);
|
|
95960
96175
|
#if __VERSION__==100
|
|
95961
|
-
|
|
96176
|
+
vec3 textureColor=textureCubeLodEXT(x3d_EnvironmentLightSource.diffuseTexture,texCoord,lod).rgb;
|
|
95962
96177
|
#else
|
|
95963
|
-
|
|
96178
|
+
vec3 textureColor=textureLod(x3d_EnvironmentLightSource.diffuseTexture,texCoord,lod).rgb;
|
|
95964
96179
|
#endif
|
|
95965
|
-
|
|
95966
|
-
|
|
95967
|
-
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
96180
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
96181
|
+
if(x3d_EnvironmentLightSource.diffuseTextureLinear)textureColor=linearToSRGB(textureColor);
|
|
95968
96182
|
#else
|
|
95969
|
-
|
|
96183
|
+
if(!x3d_EnvironmentLightSource.diffuseTextureLinear)textureColor=sRGBToLinear(textureColor);
|
|
95970
96184
|
#endif
|
|
95971
|
-
|
|
95972
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95973
|
-
vec3 getIBLRadianceGGXIridescence(const in vec3 n,const in vec3 v,const in float roughness,const in vec3 F0,const in vec3 iridescenceFresnel,const in float iridescenceFactor,const in float specularWeight){float NdotV=clamp(dot(n,v),0.0,1.0);float lod=roughness*float(x3d_EnvironmentLightSource.specularTextureLevels);vec3 reflection=normalize(reflect(-v,n));vec2 brdfSamplePoint=clamp(vec2(NdotV,roughness),vec2(0.0),vec2(1.0));
|
|
95974
|
-
#if __VERSION__==100
|
|
95975
|
-
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95976
|
-
#else
|
|
95977
|
-
vec2 f_ab=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
96185
|
+
return textureColor*x3d_EnvironmentLightSource.color*x3d_EnvironmentLightSource.intensity;}
|
|
95978
96186
|
#endif
|
|
95979
|
-
vec3
|
|
96187
|
+
vec3 getIBLGGXFresnel(const in vec3 n,const in vec3 v,const in float roughness,const in vec3 F0,const in float specularWeight){float NdotV=clamp(dot(n,v),0.0,1.0);vec2 brdfSamplePoint=clamp(vec2(NdotV,roughness),vec2(0.0),vec2(1.0));
|
|
95980
96188
|
#if __VERSION__==100
|
|
95981
96189
|
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95982
96190
|
#else
|
|
95983
96191
|
vec2 f_ab=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95984
96192
|
#endif
|
|
95985
|
-
vec3
|
|
95986
|
-
#endif
|
|
96193
|
+
vec3 Fr=max(vec3(1.0-roughness),F0)-F0;vec3 k_S=F0+Fr*pow(1.0-NdotV,5.0);vec3 FssEss=specularWeight*(k_S*f_ab.x+f_ab.y);float Ems=(1.0-(f_ab.x+f_ab.y));vec3 F_avg=specularWeight*(F0+(1.0-F0)/21.0);vec3 FmsEms=Ems*FssEss*F_avg/(1.0-F_avg*Ems);return FssEss+FmsEms;}vec3 getIBLRadianceGGX(const in vec3 n,const in vec3 v,const in float roughness){float NdotV=clamp(dot(n,v),0.0,1.0);float lod=sqrt(roughness)*float(x3d_EnvironmentLightSource.specularTextureLevels);vec3 reflection=normalize(reflect(-v,n));vec3 specularLight=getSpecularLight(reflection,lod);return specularLight;}
|
|
95987
96194
|
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95988
96195
|
uniform sampler2D x3d_TransmissionFramebufferSamplerEXT;uniform ivec2 x3d_TransmissionFramebufferSizeEXT;uniform ivec4 x3d_Viewport;vec3 getTransmissionSample(in vec2 fragCoord,const in float roughness,const in float ior){fragCoord=fragCoord*vec2(x3d_Viewport.zw)/vec2(x3d_TransmissionFramebufferSizeEXT)+vec2(x3d_Viewport.xy)/vec2(x3d_Viewport.zw);
|
|
95989
96196
|
#if __VERSION__==100
|
|
@@ -96011,16 +96218,10 @@ vec2 brdf=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
|
96011
96218
|
vec3 specularColor=f0*brdf.x+f90*brdf.y;return(1.0-specularColor)*attenuatedColor*baseColor;}
|
|
96012
96219
|
#endif
|
|
96013
96220
|
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96014
|
-
vec3 getIBLRadianceAnisotropy(const in vec3 n,const in vec3 v,const in float roughness,const in float anisotropy,const in vec3 anisotropyDirection
|
|
96015
|
-
#if __VERSION__==100
|
|
96016
|
-
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
96017
|
-
#else
|
|
96018
|
-
vec2 f_ab=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
96019
|
-
#endif
|
|
96020
|
-
vec3 specularLight=getSpecularLight(reflection,lod);vec3 Fr=max(vec3(1.0-roughness),F0)-F0;vec3 k_S=F0+Fr*pow(1.0-NdotV,5.0);vec3 FssEss=k_S*f_ab.x+f_ab.y;return specularWeight*specularLight*FssEss;}
|
|
96221
|
+
vec3 getIBLRadianceAnisotropy(const in vec3 n,const in vec3 v,const in float roughness,const in float anisotropy,const in vec3 anisotropyDirection){float NdotV=clamp(dot(n,v),0.0,1.0);float tangentRoughness=mix(roughness,1.0,anisotropy*anisotropy);vec3 anisotropicTangent=cross(anisotropyDirection,v);vec3 anisotropicNormal=cross(anisotropicTangent,anisotropyDirection);float bendFactor=1.0-anisotropy*(1.0-roughness);float bendFactorPow4=bendFactor*bendFactor*bendFactor*bendFactor;vec3 bentNormal=normalize(mix(anisotropicNormal,n,bendFactorPow4));float lod=sqrt(roughness)*float(x3d_EnvironmentLightSource.specularTextureLevels);vec3 reflection=normalize(reflect(-v,bentNormal));vec3 specularLight=getSpecularLight(reflection,lod);return specularLight;}
|
|
96021
96222
|
#endif
|
|
96022
96223
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96023
|
-
vec3 getIBLRadianceCharlie(const in vec3 n,const in vec3 v,const in float sheenRoughness,const in vec3 sheenColor){float NdotV=clamp(dot(n,v),0.0,1.0);float lod=sheenRoughness*float(x3d_EnvironmentLightSource.
|
|
96224
|
+
vec3 getIBLRadianceCharlie(const in vec3 n,const in vec3 v,const in float sheenRoughness,const in vec3 sheenColor){float NdotV=clamp(dot(n,v),0.0,1.0);float lod=sheenRoughness*float(x3d_EnvironmentLightSource.diffuseTextureLevels);vec3 reflection=normalize(reflect(-v,n));vec2 brdfSamplePoint=clamp(vec2(NdotV,sheenRoughness),vec2(0.0),vec2(1.0));
|
|
96024
96225
|
#if __VERSION__==100
|
|
96025
96226
|
float brdf=texture2D(x3d_EnvironmentLightSource.CharlieLUTTexture,brdfSamplePoint).b;
|
|
96026
96227
|
#else
|
|
@@ -96048,7 +96249,7 @@ x_ite_Namespace .add ("Iridescence2.glsl", "assets/shaders/webgl2/pbr/Iridescenc
|
|
|
96048
96249
|
|
|
96049
96250
|
|
|
96050
96251
|
const MaterialInfo2_glsl_default_ = /* glsl */ `
|
|
96051
|
-
struct MaterialInfo{float ior;float perceptualRoughness;vec3
|
|
96252
|
+
struct MaterialInfo{float ior;float perceptualRoughness;vec3 f0_dielectric;float alphaRoughness;float fresnel_w;vec3 f90;vec3 f90_dielectric;float metallic;vec3 baseColor;float sheenRoughnessFactor;vec3 sheenColorFactor;vec3 clearcoatF0;vec3 clearcoatF90;float clearcoatFactor;vec3 clearcoatNormal;float clearcoatRoughness;float specularWeight;float transmissionFactor;float thickness;vec3 attenuationColor;float attenuationDistance;float iridescenceFactor;float iridescenceIor;float iridescenceThickness;float diffuseTransmissionFactor;vec3 diffuseTransmissionColorFactor;vec3 anisotropicT;vec3 anisotropicB;float anisotropyStrength;float dispersion;};
|
|
96052
96253
|
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
96053
96254
|
${MaterialTextures .texture ("x3d_DiffuseTexture", "rgba", "linear")}
|
|
96054
96255
|
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
@@ -96079,11 +96280,11 @@ baseColor=getTextureColor(baseColor,vec4(vec3(1.0),alpha));
|
|
|
96079
96280
|
return baseColor;}
|
|
96080
96281
|
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
96081
96282
|
${MaterialTextures .texture ("x3d_SpecularGlossinessTexture", "rgba", "linear")}
|
|
96082
|
-
MaterialInfo getSpecularGlossinessInfo(in MaterialInfo info){info.
|
|
96283
|
+
MaterialInfo getSpecularGlossinessInfo(in MaterialInfo info){info.f0_dielectric=x3d_Material.specularColor;info.perceptualRoughness=x3d_Material.glossiness;
|
|
96083
96284
|
#if defined(X3D_SPECULAR_GLOSSINESS_TEXTURE)
|
|
96084
|
-
vec4 sgSample=getSpecularGlossinessTexture();info.perceptualRoughness*=sgSample.a;info.
|
|
96285
|
+
vec4 sgSample=getSpecularGlossinessTexture();info.perceptualRoughness*=sgSample.a;info.f0_dielectric*=sgSample.rgb;
|
|
96085
96286
|
#endif
|
|
96086
|
-
info.perceptualRoughness=1.0-info.perceptualRoughness;
|
|
96287
|
+
info.perceptualRoughness=1.0-info.perceptualRoughness;return info;}
|
|
96087
96288
|
#endif
|
|
96088
96289
|
#if defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
96089
96290
|
${MaterialTextures .texture ("x3d_MetallicRoughnessTexture")}
|
|
@@ -96091,7 +96292,7 @@ MaterialInfo getMetallicRoughnessInfo(in MaterialInfo info){info.metallic=x3d_Ma
|
|
|
96091
96292
|
#if defined(X3D_METALLIC_ROUGHNESS_TEXTURE)
|
|
96092
96293
|
vec4 mrSample=getMetallicRoughnessTexture();info.metallic*=mrSample.b;info.perceptualRoughness*=mrSample.g;
|
|
96093
96294
|
#endif
|
|
96094
|
-
|
|
96295
|
+
return info;}
|
|
96095
96296
|
#endif
|
|
96096
96297
|
${MaterialTextures .texture ("x3d_EmissiveTexture", "rgb", "linear")}
|
|
96097
96298
|
#if defined(X3D_EMISSIVE_STRENGTH_MATERIAL_EXT)
|
|
@@ -96114,7 +96315,7 @@ return 1.0;
|
|
|
96114
96315
|
#endif
|
|
96115
96316
|
}
|
|
96116
96317
|
#if defined(X3D_IOR_MATERIAL_EXT)
|
|
96117
|
-
uniform float x3d_IorEXT;MaterialInfo getIorInfo(in MaterialInfo info){info.
|
|
96318
|
+
uniform float x3d_IorEXT;MaterialInfo getIorInfo(in MaterialInfo info){info.f0_dielectric=vec3(pow((x3d_IorEXT-1.0)/(x3d_IorEXT+1.0),2.0));info.ior=x3d_IorEXT;return info;}
|
|
96118
96319
|
#endif
|
|
96119
96320
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96120
96321
|
${MaterialTextures .texture ("x3d_SheenColorTextureEXT",
|
|
@@ -96135,6 +96336,19 @@ return texture(x3d_SheenELUTTextureEXT,vec2(NdotV,sheenRoughnessFactor)).r;
|
|
|
96135
96336
|
#endif
|
|
96136
96337
|
}
|
|
96137
96338
|
#endif
|
|
96339
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
|
|
96340
|
+
${MaterialTextures .texture ("x3d_DiffuseTransmissionTextureEXT",
|
|
96341
|
+
"a")}
|
|
96342
|
+
${MaterialTextures .texture ("x3d_DiffuseTransmissionColorTextureEXT", "rgb", "linear")}
|
|
96343
|
+
uniform float x3d_DiffuseTransmissionEXT;uniform vec3 x3d_DiffuseTransmissionColorEXT;MaterialInfo getDiffuseTransmissionInfo(in MaterialInfo info){info.diffuseTransmissionFactor=x3d_DiffuseTransmissionEXT;info.diffuseTransmissionColorFactor=x3d_DiffuseTransmissionColorEXT;
|
|
96344
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_TEXTURE_EXT)
|
|
96345
|
+
info.diffuseTransmissionFactor*=getDiffuseTransmissionTextureEXT();
|
|
96346
|
+
#endif
|
|
96347
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_COLOR_TEXTURE_EXT)
|
|
96348
|
+
info.diffuseTransmissionColorFactor*=getDiffuseTransmissionColorTextureEXT();
|
|
96349
|
+
#endif
|
|
96350
|
+
return info;}
|
|
96351
|
+
#endif
|
|
96138
96352
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96139
96353
|
${MaterialTextures .texture ("x3d_ClearcoatTextureEXT",
|
|
96140
96354
|
"r")}
|
|
@@ -96170,7 +96384,7 @@ specularTexture.a=getSpecularTextureEXT();
|
|
|
96170
96384
|
#if defined(X3D_SPECULAR_COLOR_TEXTURE_EXT)
|
|
96171
96385
|
specularTexture.rgb=getSpecularColorTextureEXT();
|
|
96172
96386
|
#endif
|
|
96173
|
-
|
|
96387
|
+
info.f0_dielectric=min(info.f0_dielectric*x3d_SpecularColorEXT*specularTexture.rgb,vec3(1.0));info.specularWeight=x3d_SpecularEXT*specularTexture.a;info.f90_dielectric=vec3(info.specularWeight);return info;}
|
|
96174
96388
|
#endif
|
|
96175
96389
|
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96176
96390
|
${MaterialTextures .texture ("x3d_ThicknessTextureEXT", "g")}
|
|
@@ -96244,12 +96458,11 @@ vec4 getMaterialColor(){vec4 baseColor=getBaseColor();
|
|
|
96244
96458
|
#if defined(X3D_TEXTURE_PROJECTION)
|
|
96245
96459
|
baseColor.rgb*=getTextureProjectorColor();
|
|
96246
96460
|
#endif
|
|
96247
|
-
|
|
96248
|
-
vec3 v=normalize(-vertex);
|
|
96461
|
+
vec3 color=vec3(0.0);vec3 v=normalize(-vertex);
|
|
96249
96462
|
#if defined(X3D_USE_IBL)||defined(X3D_LIGHTING)||defined(X3D_ANISOTROPY_MATERIAL_EXT)||defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96250
96463
|
NormalInfo normalInfo=getNormalInfo(x3d_Material.normalScale);vec3 n=normalInfo.n;float NdotV=clamp(dot(n,v),0.0,1.0);
|
|
96251
96464
|
#endif
|
|
96252
|
-
MaterialInfo materialInfo;materialInfo.baseColor=baseColor.rgb;materialInfo.ior=1.5;materialInfo.
|
|
96465
|
+
MaterialInfo materialInfo;materialInfo.baseColor=baseColor.rgb;materialInfo.ior=1.5;materialInfo.f0_dielectric=vec3(0.04);materialInfo.specularWeight=1.0;materialInfo.f90=vec3(1.0);materialInfo.f90_dielectric=materialInfo.f90;
|
|
96253
96466
|
#if defined(X3D_IOR_MATERIAL_EXT)
|
|
96254
96467
|
materialInfo=getIorInfo(materialInfo);
|
|
96255
96468
|
#endif
|
|
@@ -96277,80 +96490,100 @@ materialInfo=getVolumeInfo(materialInfo);
|
|
|
96277
96490
|
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96278
96491
|
materialInfo=getIridescenceInfo(materialInfo);
|
|
96279
96492
|
#endif
|
|
96493
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
|
|
96494
|
+
materialInfo=getDiffuseTransmissionInfo(materialInfo);
|
|
96495
|
+
#endif
|
|
96280
96496
|
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96281
96497
|
materialInfo=getAnisotropyInfo(materialInfo,normalInfo);
|
|
96282
96498
|
#endif
|
|
96283
|
-
materialInfo.perceptualRoughness=clamp(materialInfo.perceptualRoughness,0.0,1.0);materialInfo.metallic=clamp(materialInfo.metallic,0.0,1.0);materialInfo.alphaRoughness=materialInfo.perceptualRoughness*materialInfo.perceptualRoughness;float reflectance=max3(materialInfo.
|
|
96499
|
+
materialInfo.perceptualRoughness=clamp(materialInfo.perceptualRoughness,0.0,1.0);materialInfo.metallic=clamp(materialInfo.metallic,0.0,1.0);materialInfo.alphaRoughness=materialInfo.perceptualRoughness*materialInfo.perceptualRoughness;float reflectance=max3(materialInfo.f0_dielectric);vec3 f_specular_dielectric=vec3(0.0);vec3 f_specular_metal=vec3(0.0);vec3 f_diffuse=vec3(0.0);vec3 f_dielectric_brdf_ibl=vec3(0.0);vec3 f_metal_brdf_ibl=vec3(0.0);vec3 f_emissive=vec3(0.0);vec3 clearcoat_brdf=vec3(0.0);vec3 f_sheen=vec3(0.0);vec3 f_specular_transmission=vec3(0.0);vec3 f_diffuse_transmission=vec3(0.0);float clearcoatFactor=0.0;vec3 clearcoatFresnel=vec3(0.0);float albedoSheenScaling=1.0;float diffuseTransmissionThickness=1.0;
|
|
96284
96500
|
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)&&(defined(X3D_USE_IBL)||defined(X3D_LIGHTING))
|
|
96285
|
-
vec3
|
|
96501
|
+
vec3 iridescenceFresnel_dielectric=evalIridescence(1.0,materialInfo.iridescenceIor,NdotV,materialInfo.iridescenceThickness,materialInfo.f0_dielectric);vec3 iridescenceFresnel_metallic=evalIridescence(1.0,materialInfo.iridescenceIor,NdotV,materialInfo.iridescenceThickness,baseColor.rgb);if(materialInfo.iridescenceThickness==0.0)materialInfo.iridescenceFactor=0.0;
|
|
96502
|
+
#endif
|
|
96503
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
|
|
96504
|
+
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96505
|
+
diffuseTransmissionThickness=materialInfo.thickness*(length(vec3(u_ModelMatrix[0].xyz))+length(vec3(u_ModelMatrix[1].xyz))+length(vec3(u_ModelMatrix[2].xyz)))/3.0;
|
|
96506
|
+
#endif
|
|
96507
|
+
#endif
|
|
96508
|
+
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96509
|
+
clearcoatFactor=materialInfo.clearcoatFactor;clearcoatFresnel=F_Schlick(materialInfo.clearcoatF0,materialInfo.clearcoatF90,clamp(dot(materialInfo.clearcoatNormal,v),0.0,1.0));
|
|
96286
96510
|
#endif
|
|
96287
96511
|
#if defined(X3D_USE_IBL)
|
|
96288
|
-
|
|
96289
|
-
|
|
96290
|
-
|
|
96291
|
-
|
|
96512
|
+
f_diffuse=getDiffuseLight(n)*baseColor.rgb;
|
|
96513
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
|
|
96514
|
+
vec3 diffuseTransmissionIBL=getDiffuseLight(-n)*materialInfo.diffuseTransmissionColorFactor;
|
|
96515
|
+
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96516
|
+
diffuseTransmissionIBL=applyVolumeAttenuation(diffuseTransmissionIBL,diffuseTransmissionThickness,materialInfo.attenuationColor,materialInfo.attenuationDistance);
|
|
96517
|
+
#endif
|
|
96518
|
+
f_diffuse=mix(f_diffuse,diffuseTransmissionIBL,materialInfo.diffuseTransmissionFactor);
|
|
96519
|
+
#endif
|
|
96520
|
+
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96521
|
+
f_specular_transmission+=getIBLVolumeRefraction(n,v,materialInfo.perceptualRoughness,baseColor.rgb,materialInfo.f0_dielectric,materialInfo.f90,vertex,x3d_ModelViewMatrix,x3d_ProjectionMatrix,materialInfo.ior,materialInfo.thickness,materialInfo.attenuationColor,materialInfo.attenuationDistance,materialInfo.dispersion);f_diffuse=mix(f_diffuse,f_specular_transmission,materialInfo.transmissionFactor);
|
|
96522
|
+
#endif
|
|
96523
|
+
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96524
|
+
f_specular_metal=getIBLRadianceAnisotropy(n,v,materialInfo.perceptualRoughness,materialInfo.anisotropyStrength,materialInfo.anisotropicB);f_specular_dielectric=f_specular_metal;
|
|
96292
96525
|
#else
|
|
96293
|
-
|
|
96526
|
+
f_specular_metal=getIBLRadianceGGX(n,v,materialInfo.perceptualRoughness);f_specular_dielectric=f_specular_metal;
|
|
96527
|
+
#endif
|
|
96528
|
+
vec3 f_metal_fresnel_ibl=getIBLGGXFresnel(n,v,materialInfo.perceptualRoughness,baseColor.rgb,1.0);f_metal_brdf_ibl=f_metal_fresnel_ibl*f_specular_metal;vec3 f_dielectric_fresnel_ibl=getIBLGGXFresnel(n,v,materialInfo.perceptualRoughness,materialInfo.f0_dielectric,materialInfo.specularWeight);f_dielectric_brdf_ibl=mix(f_diffuse,f_specular_dielectric,f_dielectric_fresnel_ibl);
|
|
96529
|
+
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96530
|
+
f_metal_brdf_ibl=mix(f_metal_brdf_ibl,f_specular_metal*iridescenceFresnel_metallic,materialInfo.iridescenceFactor);f_dielectric_brdf_ibl=mix(f_dielectric_brdf_ibl,rgb_mix(f_diffuse,f_specular_dielectric,iridescenceFresnel_dielectric),materialInfo.iridescenceFactor);
|
|
96294
96531
|
#endif
|
|
96295
96532
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96296
|
-
|
|
96533
|
+
clearcoat_brdf=getIBLRadianceGGX(materialInfo.clearcoatNormal,v,materialInfo.clearcoatRoughness);
|
|
96297
96534
|
#endif
|
|
96298
96535
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96299
|
-
f_sheen
|
|
96536
|
+
f_sheen=getIBLRadianceCharlie(n,v,materialInfo.sheenRoughnessFactor,materialInfo.sheenColorFactor);albedoSheenScaling=1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor);
|
|
96300
96537
|
#endif
|
|
96301
|
-
|
|
96302
|
-
f_transmission+=getIBLVolumeRefraction(n,v,materialInfo.perceptualRoughness,materialInfo.c_diff,materialInfo.f0,materialInfo.f90,vertex,x3d_ModelViewMatrix,x3d_ProjectionMatrix,materialInfo.ior,materialInfo.thickness,materialInfo.attenuationColor,materialInfo.attenuationDistance,materialInfo.dispersion);
|
|
96538
|
+
color=mix(f_dielectric_brdf_ibl,f_metal_brdf_ibl,materialInfo.metallic);color=f_sheen+color*albedoSheenScaling;color=mix(color,clearcoat_brdf,clearcoatFactor*clearcoatFresnel);
|
|
96303
96539
|
#endif
|
|
96540
|
+
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
96541
|
+
float ao=getOcclusionFactor();color*=1.0+x3d_Material.occlusionStrength*(ao-1.0);
|
|
96304
96542
|
#endif
|
|
96305
|
-
|
|
96543
|
+
f_diffuse=vec3(0.0);f_specular_dielectric=vec3(0.0);f_specular_metal=vec3(0.0);vec3 f_dielectric_brdf=vec3(0.0);vec3 f_metal_brdf=vec3(0.0);
|
|
96306
96544
|
#if defined(X3D_LIGHTING)
|
|
96307
|
-
for(int i=0;i<X3D_NUM_LIGHTS;++i){x3d_LightSourceParameters light=x3d_LightSource[i];vec3 pointToLight;float distanceToLight;if(light.type!=x3d_DirectionalLight){pointToLight=light.location-vertex;distanceToLight=length(light.matrix*pointToLight);}else{pointToLight=-light.direction;distanceToLight=-1.0;}if(distanceToLight<=light.radius||light.radius<0.0){vec3 l=normalize(pointToLight);vec3 h=normalize(l+v);float NdotL=clamp(dot(n,l),0.0,1.0);float NdotH=clamp(dot(n,h),0.0,1.0);float VdotH=clamp(dot(v,h),0.0,1.0);
|
|
96545
|
+
for(int i=0;i<X3D_NUM_LIGHTS;++i){x3d_LightSourceParameters light=x3d_LightSource[i];vec3 pointToLight;float distanceToLight;if(light.type!=x3d_DirectionalLight){pointToLight=light.location-vertex;distanceToLight=length(light.matrix*pointToLight);}else{pointToLight=-light.direction;distanceToLight=-1.0;}if(distanceToLight<=light.radius||light.radius<0.0){vec3 l=normalize(pointToLight);vec3 h=normalize(l+v);float NdotL=clamp(dot(n,l),0.0,1.0);float NdotH=clamp(dot(n,h),0.0,1.0);float VdotH=clamp(dot(v,h),0.0,1.0);vec3 dielectric_fresnel=F_Schlick(materialInfo.f0_dielectric*materialInfo.specularWeight,materialInfo.f90_dielectric,abs(VdotH));vec3 metal_fresnel=F_Schlick(baseColor.rgb,vec3(1.0),abs(VdotH));vec3 lightIntensity=getLightIntensity(light,l,distanceToLight);
|
|
96308
96546
|
#if defined(X3D_SHADOWS)
|
|
96309
|
-
|
|
96547
|
+
lightIntensity=mix(lightIntensity,light.shadowColor,getShadowIntensity(i,light));
|
|
96310
96548
|
#endif
|
|
96311
|
-
vec3 l_diffuse=vec3(0.0);vec3
|
|
96312
|
-
#if defined(
|
|
96313
|
-
|
|
96314
|
-
#
|
|
96315
|
-
|
|
96316
|
-
#else
|
|
96317
|
-
l_diffuse+=intensity*NdotL*BRDF_lambertian(materialInfo.f0,materialInfo.f90,materialInfo.c_diff,materialInfo.specularWeight,VdotH);l_specular+=intensity*NdotL*BRDF_specularGGX(materialInfo.f0,materialInfo.f90,materialInfo.alphaRoughness,materialInfo.specularWeight,VdotH,NdotL,NdotV,NdotH);
|
|
96549
|
+
vec3 l_diffuse=lightIntensity*NdotL*BRDF_lambertian(baseColor.rgb);vec3 l_specular_dielectric=vec3(0.0);vec3 l_specular_metal=vec3(0.0);vec3 l_dielectric_brdf=vec3(0.0);vec3 l_metal_brdf=vec3(0.0);vec3 l_clearcoat_brdf=vec3(0.0);vec3 l_sheen=vec3(0.0);float l_albedoSheenScaling=1.0;
|
|
96550
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
|
|
96551
|
+
vec3 diffuse_btdf=lightIntensity*clamp(dot(-n,l),0.0,1.0)*BRDF_lambertian(materialInfo.diffuseTransmissionColorFactor);
|
|
96552
|
+
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96553
|
+
diffuse_btdf=applyVolumeAttenuation(diffuse_btdf,diffuseTransmissionThickness,materialInfo.attenuationColor,materialInfo.attenuationDistance);
|
|
96318
96554
|
#endif
|
|
96319
|
-
|
|
96320
|
-
f_sheen+=intensity*getPunctualRadianceSheen(materialInfo.sheenColorFactor,materialInfo.sheenRoughnessFactor,NdotL,NdotV,NdotH);float l_albedoSheenScaling=min(1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor),1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotL,materialInfo.sheenRoughnessFactor));l_diffuse*=l_albedoSheenScaling;l_specular*=l_albedoSheenScaling;
|
|
96555
|
+
l_diffuse=mix(l_diffuse,diffuse_btdf,materialInfo.diffuseTransmissionFactor);
|
|
96321
96556
|
#endif
|
|
96322
|
-
f_diffuse+=l_diffuse;f_specular+=l_specular;
|
|
96323
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96324
|
-
f_clearcoat+=intensity*getPunctualRadianceClearCoat(materialInfo.clearcoatNormal,v,l,h,VdotH,materialInfo.clearcoatF0,materialInfo.clearcoatF90,materialInfo.clearcoatRoughness);
|
|
96325
|
-
#endif
|
|
96326
|
-
}
|
|
96327
96557
|
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96328
|
-
vec3 transmissionRay=getVolumeTransmissionRay(n,v,materialInfo.thickness,materialInfo.ior,x3d_ModelViewMatrix);pointToLight-=transmissionRay;l=normalize(pointToLight);vec3
|
|
96558
|
+
vec3 transmissionRay=getVolumeTransmissionRay(n,v,materialInfo.thickness,materialInfo.ior,x3d_ModelViewMatrix);pointToLight-=transmissionRay;l=normalize(pointToLight);vec3 transmittedLight=lightIntensity*getPunctualRadianceTransmission(n,v,l,materialInfo.alphaRoughness,materialInfo.f0_dielectric,materialInfo.f90,baseColor.rgb,materialInfo.ior);
|
|
96329
96559
|
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96330
96560
|
transmittedLight=applyVolumeAttenuation(transmittedLight,length(transmissionRay),materialInfo.attenuationColor,materialInfo.attenuationDistance);
|
|
96331
96561
|
#endif
|
|
96332
|
-
|
|
96562
|
+
l_diffuse=mix(l_diffuse,transmittedLight,materialInfo.transmissionFactor);
|
|
96333
96563
|
#endif
|
|
96334
|
-
|
|
96335
|
-
#
|
|
96336
|
-
|
|
96337
|
-
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
96338
|
-
float ao=getOcclusionFactor();float occlusionStrength=x3d_Material.occlusionStrength;diffuse=f_diffuse+mix(f_diffuse_ibl,f_diffuse_ibl*ao,occlusionStrength)*albedoSheenScaling;specular=f_specular+mix(f_specular_ibl,f_specular_ibl*ao,occlusionStrength)*albedoSheenScaling;sheen=f_sheen+mix(f_sheen_ibl,f_sheen_ibl*ao,occlusionStrength);clearcoat=f_clearcoat+mix(f_clearcoat_ibl,f_clearcoat_ibl*ao,occlusionStrength);
|
|
96564
|
+
vec3 intensity=getLightIntensity(light,l,length(light.matrix*pointToLight));
|
|
96565
|
+
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96566
|
+
l_specular_metal=intensity*NdotL*BRDF_specularGGXAnisotropy(materialInfo.alphaRoughness,materialInfo.anisotropyStrength,n,v,l,h,materialInfo.anisotropicT,materialInfo.anisotropicB);l_specular_dielectric=l_specular_metal;
|
|
96339
96567
|
#else
|
|
96340
|
-
|
|
96568
|
+
l_specular_metal=intensity*NdotL*BRDF_specularGGX(materialInfo.alphaRoughness,NdotL,NdotV,NdotH);l_specular_dielectric=l_specular_metal;
|
|
96569
|
+
#endif
|
|
96570
|
+
l_metal_brdf=metal_fresnel*l_specular_metal;l_dielectric_brdf=mix(l_diffuse,l_specular_dielectric,dielectric_fresnel);
|
|
96571
|
+
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96572
|
+
l_metal_brdf=mix(l_metal_brdf,l_specular_metal*iridescenceFresnel_metallic,materialInfo.iridescenceFactor);l_dielectric_brdf=mix(l_dielectric_brdf,rgb_mix(l_diffuse,l_specular_dielectric,iridescenceFresnel_dielectric),materialInfo.iridescenceFactor);
|
|
96341
96573
|
#endif
|
|
96342
96574
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96343
|
-
|
|
96575
|
+
l_clearcoat_brdf=intensity*getPunctualRadianceClearCoat(materialInfo.clearcoatNormal,v,l,h,VdotH,materialInfo.clearcoatF0,materialInfo.clearcoatF90,materialInfo.clearcoatRoughness);
|
|
96344
96576
|
#endif
|
|
96345
|
-
#if defined(
|
|
96346
|
-
|
|
96577
|
+
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96578
|
+
l_sheen=intensity*getPunctualRadianceSheen(materialInfo.sheenColorFactor,materialInfo.sheenRoughnessFactor,NdotL,NdotV,NdotH);l_albedoSheenScaling=min(1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor),1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotL,materialInfo.sheenRoughnessFactor));
|
|
96347
96579
|
#endif
|
|
96580
|
+
vec3 l_color=mix(l_dielectric_brdf,l_metal_brdf,materialInfo.metallic);l_color=l_sheen+l_color*l_albedoSheenScaling;l_color=mix(l_color,l_clearcoat_brdf,clearcoatFactor*clearcoatFresnel);color+=l_color;}}
|
|
96348
96581
|
#endif
|
|
96349
|
-
|
|
96582
|
+
f_emissive=getEmissiveColor();
|
|
96350
96583
|
#if defined(X3D_UNLIT_MATERIAL_EXT)
|
|
96351
96584
|
color=baseColor.rgb;
|
|
96352
96585
|
#else
|
|
96353
|
-
color=f_emissive
|
|
96586
|
+
color=f_emissive*(1.0-clearcoatFactor*clearcoatFresnel)+color;
|
|
96354
96587
|
#endif
|
|
96355
96588
|
return vec4(color,baseColor.a);}void main(){fragment_main();}`
|
|
96356
96589
|
;
|
|
@@ -96364,12 +96597,12 @@ float applyIorToRoughness(const in float roughness,const in float ior){return ro
|
|
|
96364
96597
|
#endif
|
|
96365
96598
|
#if defined(X3D_LIGHTING)
|
|
96366
96599
|
#pragma X3D include "../common/Lighting.glsl"
|
|
96367
|
-
vec3 getLightIntensity(const in x3d_LightSourceParameters light,const in vec3 pointToLight,const in float distanceToLight){float attenuationFactor=1.0;float spotFactor=1.0;if(light.type!=x3d_DirectionalLight){attenuationFactor=
|
|
96600
|
+
float getAttenuationPBR(const in vec3 attenuation,const in float distanceToLight,const in float radius){float d=dot(attenuation,vec3(1.0,distanceToLight,distanceToLight*distanceToLight));if(radius<=0.0)return 1.0/d;return max(min(1.0-pow(distanceToLight/radius,4.0),1.0),0.0)/d;}vec3 getLightIntensity(const in x3d_LightSourceParameters light,const in vec3 pointToLight,const in float distanceToLight){float attenuationFactor=1.0;float spotFactor=1.0;if(light.type!=x3d_DirectionalLight){attenuationFactor=getAttenuationPBR(light.attenuation,distanceToLight,light.radius);}if(light.type==x3d_SpotLight){spotFactor=getSpotFactor(pointToLight,light.direction,light.cutOffAngle,light.beamWidth);}return attenuationFactor*spotFactor*light.intensity*light.color;}
|
|
96368
96601
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96369
96602
|
vec3 getPunctualRadianceSheen(const in vec3 sheenColor,const in float sheenRoughness,const in float NdotL,const in float NdotV,const in float NdotH){return NdotL*BRDF_specularSheen(sheenColor,sheenRoughness,NdotL,NdotV,NdotH);}
|
|
96370
96603
|
#endif
|
|
96371
96604
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96372
|
-
vec3 getPunctualRadianceClearCoat(const in vec3 clearcoatNormal,const in vec3 v,const in vec3 l,const in vec3 h,const in float VdotH,const in vec3 f0,const in vec3 f90,const in float clearcoatRoughness){float NdotL=clamp(dot(clearcoatNormal,l),0.0,1.0);float NdotV=clamp(dot(clearcoatNormal,v),0.0,1.0);float NdotH=clamp(dot(clearcoatNormal,h),0.0,1.0);return NdotL*BRDF_specularGGX(
|
|
96605
|
+
vec3 getPunctualRadianceClearCoat(const in vec3 clearcoatNormal,const in vec3 v,const in vec3 l,const in vec3 h,const in float VdotH,const in vec3 f0,const in vec3 f90,const in float clearcoatRoughness){float NdotL=clamp(dot(clearcoatNormal,l),0.0,1.0);float NdotV=clamp(dot(clearcoatNormal,v),0.0,1.0);float NdotH=clamp(dot(clearcoatNormal,h),0.0,1.0);return NdotL*BRDF_specularGGX(clearcoatRoughness*clearcoatRoughness,NdotL,NdotV,NdotH);}
|
|
96373
96606
|
#endif
|
|
96374
96607
|
#endif
|
|
96375
96608
|
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
@@ -96703,18 +96936,16 @@ Object .assign (ShaderCompiler .prototype,
|
|
|
96703
96936
|
|
|
96704
96937
|
source = "";
|
|
96705
96938
|
|
|
96706
|
-
for (
|
|
96939
|
+
for (const [i, line] of lines .entries ())
|
|
96707
96940
|
{
|
|
96708
|
-
const
|
|
96709
|
-
line = lines [i],
|
|
96710
|
-
match = line .match (include);
|
|
96941
|
+
const match = line .match (include);
|
|
96711
96942
|
|
|
96712
96943
|
if (match)
|
|
96713
96944
|
{
|
|
96714
|
-
source +=
|
|
96945
|
+
source += `#line 1 ${this .sourceFileNumbers [match [1]]}\n`;
|
|
96715
96946
|
source += this .process (this .includes [match [1]], this .sourceFileNumbers [match [1]]);
|
|
96716
96947
|
source += "\n";
|
|
96717
|
-
source +=
|
|
96948
|
+
source += `#line ${i + 2} ${parent}\n`;
|
|
96718
96949
|
}
|
|
96719
96950
|
else
|
|
96720
96951
|
{
|
|
@@ -96733,7 +96964,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
96733
96964
|
x_ite_Namespace .add ("ShaderCompiler", "x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
|
|
96734
96965
|
/* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
|
|
96735
96966
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
96736
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
96967
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(812);
|
|
96737
96968
|
/*******************************************************************************
|
|
96738
96969
|
*
|
|
96739
96970
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -97404,7 +97635,7 @@ const X3DAppearanceNode_default_ = X3DAppearanceNode;
|
|
|
97404
97635
|
x_ite_Namespace .add ("X3DAppearanceNode", "x_ite/Components/Shape/X3DAppearanceNode", X3DAppearanceNode_default_);
|
|
97405
97636
|
/* harmony default export */ const Shape_X3DAppearanceNode = (X3DAppearanceNode_default_);
|
|
97406
97637
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/Appearance.js
|
|
97407
|
-
/* provided dependency */ var Appearance_$ = __webpack_require__(
|
|
97638
|
+
/* provided dependency */ var Appearance_$ = __webpack_require__(812);
|
|
97408
97639
|
/*******************************************************************************
|
|
97409
97640
|
*
|
|
97410
97641
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -98506,6 +98737,7 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
|
|
|
98506
98737
|
|
|
98507
98738
|
if (numEnvironmentLights)
|
|
98508
98739
|
{
|
|
98740
|
+
// Although we count this kind of light here, only one is supported.
|
|
98509
98741
|
options .push ("X3D_USE_IBL")
|
|
98510
98742
|
options .push (`X3D_NUM_ENVIRONMENT_LIGHTS ${Math .min (numEnvironmentLights, browser .getMaxLights ())}`);
|
|
98511
98743
|
}
|
|
@@ -106328,8 +106560,8 @@ const GifMedia_default_ = GifMedia;
|
|
|
106328
106560
|
x_ite_Namespace .add ("GifMedia", "x_ite/Browser/Texturing/GifMedia", GifMedia_default_);
|
|
106329
106561
|
/* harmony default export */ const Texturing_GifMedia = (GifMedia_default_);
|
|
106330
106562
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
106331
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
106332
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
106563
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(812);
|
|
106564
|
+
/* provided dependency */ var SuperGif = __webpack_require__(807);
|
|
106333
106565
|
/*******************************************************************************
|
|
106334
106566
|
*
|
|
106335
106567
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -109636,6 +109868,7 @@ x_ite_Namespace .add ("fr", "locale/fr", fr_default_);
|
|
|
109636
109868
|
|
|
109637
109869
|
|
|
109638
109870
|
const locales = new Map ([
|
|
109871
|
+
["en", undefined], // default language
|
|
109639
109872
|
["de", de],
|
|
109640
109873
|
["fr", fr],
|
|
109641
109874
|
]);
|
|
@@ -109646,7 +109879,7 @@ function getLanguage ()
|
|
|
109646
109879
|
{
|
|
109647
109880
|
const language = value .split ("-") [0];
|
|
109648
109881
|
|
|
109649
|
-
if (locales .
|
|
109882
|
+
if (locales .has (language))
|
|
109650
109883
|
return language;
|
|
109651
109884
|
}
|
|
109652
109885
|
|
|
@@ -109661,7 +109894,7 @@ const gettext_default_ = (string) => locale .get (string) || string;
|
|
|
109661
109894
|
x_ite_Namespace .add ("gettext", "locale/gettext", gettext_default_);
|
|
109662
109895
|
/* harmony default export */ const gettext = (gettext_default_);
|
|
109663
109896
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
|
|
109664
|
-
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(
|
|
109897
|
+
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(812);
|
|
109665
109898
|
/*******************************************************************************
|
|
109666
109899
|
*
|
|
109667
109900
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -110295,7 +110528,7 @@ const TextCompression_default_ = TextCompression;
|
|
|
110295
110528
|
x_ite_Namespace .add ("TextCompression", "x_ite/Browser/Core/TextCompression", TextCompression_default_);
|
|
110296
110529
|
/* harmony default export */ const Core_TextCompression = (TextCompression_default_);
|
|
110297
110530
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserOptions.js
|
|
110298
|
-
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(
|
|
110531
|
+
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(812);
|
|
110299
110532
|
/*******************************************************************************
|
|
110300
110533
|
*
|
|
110301
110534
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -110929,7 +111162,7 @@ const RenderingProperties_default_ = RenderingProperties;
|
|
|
110929
111162
|
x_ite_Namespace .add ("RenderingProperties", "x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
|
|
110930
111163
|
/* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
|
|
110931
111164
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
|
|
110932
|
-
/* provided dependency */ var Notification_$ = __webpack_require__(
|
|
111165
|
+
/* provided dependency */ var Notification_$ = __webpack_require__(812);
|
|
110933
111166
|
/*******************************************************************************
|
|
110934
111167
|
*
|
|
110935
111168
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -111052,8 +111285,8 @@ const Notification_default_ = Notification;
|
|
|
111052
111285
|
x_ite_Namespace .add ("Notification", "x_ite/Browser/Core/Notification", Notification_default_);
|
|
111053
111286
|
/* harmony default export */ const Core_Notification = (Notification_default_);
|
|
111054
111287
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
|
|
111055
|
-
/* provided dependency */ var jquery_fullscreen = __webpack_require__(
|
|
111056
|
-
/* provided dependency */ var ContextMenu_$ = __webpack_require__(
|
|
111288
|
+
/* provided dependency */ var jquery_fullscreen = __webpack_require__(48);
|
|
111289
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(812);
|
|
111057
111290
|
/*******************************************************************************
|
|
111058
111291
|
*
|
|
111059
111292
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -113798,7 +114031,7 @@ const DataStorage_default_ = DataStorage;
|
|
|
113798
114031
|
x_ite_Namespace .add ("DataStorage", "standard/Utility/DataStorage", DataStorage_default_);
|
|
113799
114032
|
/* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
|
|
113800
114033
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
113801
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
114034
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(812);
|
|
113802
114035
|
/*******************************************************************************
|
|
113803
114036
|
*
|
|
113804
114037
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -114902,14 +115135,14 @@ Object .assign (Object .setPrototypeOf (ConeOptions .prototype, Base_X3DBaseNode
|
|
|
114902
115135
|
getSideGeometry ()
|
|
114903
115136
|
{
|
|
114904
115137
|
if (!this .sideGeometry)
|
|
114905
|
-
this .
|
|
115138
|
+
this .build ();
|
|
114906
115139
|
|
|
114907
115140
|
return this .sideGeometry;
|
|
114908
115141
|
},
|
|
114909
115142
|
getBottomGeometry ()
|
|
114910
115143
|
{
|
|
114911
115144
|
if (!this .bottomGeometry)
|
|
114912
|
-
this .
|
|
115145
|
+
this .build ();
|
|
114913
115146
|
|
|
114914
115147
|
return this .bottomGeometry;
|
|
114915
115148
|
},
|
|
@@ -115059,7 +115292,7 @@ Object .assign (Object .setPrototypeOf (ConeOptions .prototype, Base_X3DBaseNode
|
|
|
115059
115292
|
|
|
115060
115293
|
point .push (new Numbers_Vector3 (0, 1, 0));
|
|
115061
115294
|
},
|
|
115062
|
-
|
|
115295
|
+
build ()
|
|
115063
115296
|
{
|
|
115064
115297
|
this .sideGeometry = new Geometry3D_IndexedFaceSet (this .getExecutionContext ());
|
|
115065
115298
|
this .sideGeometry ._texCoord = new Texturing_TextureCoordinate (this .getExecutionContext ());
|
|
@@ -115091,6 +115324,11 @@ Object .assign (Object .setPrototypeOf (ConeOptions .prototype, Base_X3DBaseNode
|
|
|
115091
115324
|
sideGeometry .setup ();
|
|
115092
115325
|
bottomGeometry .setup ();
|
|
115093
115326
|
},
|
|
115327
|
+
eventsProcessed ()
|
|
115328
|
+
{
|
|
115329
|
+
this .sideGeometry = null;
|
|
115330
|
+
this .bottomGeometry = null;
|
|
115331
|
+
},
|
|
115094
115332
|
});
|
|
115095
115333
|
|
|
115096
115334
|
Object .defineProperties (ConeOptions,
|
|
@@ -115184,21 +115422,21 @@ Object .assign (Object .setPrototypeOf (CylinderOptions .prototype, Base_X3DBase
|
|
|
115184
115422
|
getSideGeometry ()
|
|
115185
115423
|
{
|
|
115186
115424
|
if (!this .sideGeometry)
|
|
115187
|
-
this .
|
|
115425
|
+
this .build ();
|
|
115188
115426
|
|
|
115189
115427
|
return this .sideGeometry;
|
|
115190
115428
|
},
|
|
115191
115429
|
getTopGeometry ()
|
|
115192
115430
|
{
|
|
115193
115431
|
if (!this .topGeometry)
|
|
115194
|
-
this .
|
|
115432
|
+
this .build ();
|
|
115195
115433
|
|
|
115196
115434
|
return this .topGeometry;
|
|
115197
115435
|
},
|
|
115198
115436
|
getBottomGeometry ()
|
|
115199
115437
|
{
|
|
115200
115438
|
if (!this .bottomGeometry)
|
|
115201
|
-
this .
|
|
115439
|
+
this .build ();
|
|
115202
115440
|
|
|
115203
115441
|
return this .bottomGeometry;
|
|
115204
115442
|
},
|
|
@@ -115387,7 +115625,7 @@ Object .assign (Object .setPrototypeOf (CylinderOptions .prototype, Base_X3DBase
|
|
|
115387
115625
|
point .push (new Numbers_Vector3 (p .imag, 1, p .real));
|
|
115388
115626
|
}
|
|
115389
115627
|
},
|
|
115390
|
-
|
|
115628
|
+
build ()
|
|
115391
115629
|
{
|
|
115392
115630
|
this .sideGeometry = new Geometry3D_IndexedFaceSet (this .getExecutionContext ());
|
|
115393
115631
|
this .sideGeometry ._texCoord = new Texturing_TextureCoordinate (this .getExecutionContext ());
|
|
@@ -115426,6 +115664,12 @@ Object .assign (Object .setPrototypeOf (CylinderOptions .prototype, Base_X3DBase
|
|
|
115426
115664
|
bottomGeometry .setup ();
|
|
115427
115665
|
topGeometry .setup ();
|
|
115428
115666
|
},
|
|
115667
|
+
eventsProcessed ()
|
|
115668
|
+
{
|
|
115669
|
+
this .sideGeometry = null;
|
|
115670
|
+
this .bottomGeometry = null;
|
|
115671
|
+
this .topGeometry = null;
|
|
115672
|
+
},
|
|
115429
115673
|
});
|
|
115430
115674
|
|
|
115431
115675
|
Object .defineProperties (CylinderOptions,
|
|
@@ -115519,7 +115763,7 @@ Object .assign (Object .setPrototypeOf (QuadSphereOptions .prototype, Base_X3DBa
|
|
|
115519
115763
|
getGeometry ()
|
|
115520
115764
|
{
|
|
115521
115765
|
if (!this .geometry)
|
|
115522
|
-
this .
|
|
115766
|
+
this .build ();
|
|
115523
115767
|
|
|
115524
115768
|
return this .geometry;
|
|
115525
115769
|
},
|
|
@@ -115696,7 +115940,7 @@ Object .assign (Object .setPrototypeOf (QuadSphereOptions .prototype, Base_X3DBa
|
|
|
115696
115940
|
// South pole
|
|
115697
115941
|
point .push (new Numbers_Vector3 (0, -1, 0));
|
|
115698
115942
|
},
|
|
115699
|
-
|
|
115943
|
+
build ()
|
|
115700
115944
|
{
|
|
115701
115945
|
this .geometry = new Geometry3D_IndexedFaceSet (this .getExecutionContext ());
|
|
115702
115946
|
this .geometry ._texCoord = new Texturing_TextureCoordinate (this .getExecutionContext ());
|
|
@@ -115718,6 +115962,10 @@ Object .assign (Object .setPrototypeOf (QuadSphereOptions .prototype, Base_X3DBa
|
|
|
115718
115962
|
coord .setup ();
|
|
115719
115963
|
geometry .setup ();
|
|
115720
115964
|
},
|
|
115965
|
+
eventsProcessed ()
|
|
115966
|
+
{
|
|
115967
|
+
this .geometry = null;
|
|
115968
|
+
},
|
|
115721
115969
|
});
|
|
115722
115970
|
|
|
115723
115971
|
Object .defineProperties (QuadSphereOptions,
|
|
@@ -116366,14 +116614,14 @@ function tbProjectToSphere (r, x, y)
|
|
|
116366
116614
|
{
|
|
116367
116615
|
const d = Math .hypot (x, y);
|
|
116368
116616
|
|
|
116369
|
-
if (d < r * Math .
|
|
116617
|
+
if (d < r * Math .SQRT1_2) // Inside sphere
|
|
116370
116618
|
{
|
|
116371
116619
|
return Math .sqrt (r * r - d * d);
|
|
116372
116620
|
}
|
|
116373
116621
|
|
|
116374
116622
|
// On hyperbola
|
|
116375
116623
|
|
|
116376
|
-
const t = r / Math .
|
|
116624
|
+
const t = r / Math .SQRT2;
|
|
116377
116625
|
|
|
116378
116626
|
return t * t / d;
|
|
116379
116627
|
}
|
|
@@ -116384,8 +116632,8 @@ const X3DViewer_default_ = X3DViewer;
|
|
|
116384
116632
|
x_ite_Namespace .add ("X3DViewer", "x_ite/Browser/Navigation/X3DViewer", X3DViewer_default_);
|
|
116385
116633
|
/* harmony default export */ const Navigation_X3DViewer = (X3DViewer_default_);
|
|
116386
116634
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
116387
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
116388
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
116635
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(354);
|
|
116636
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(812);
|
|
116389
116637
|
/*******************************************************************************
|
|
116390
116638
|
*
|
|
116391
116639
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -117301,8 +117549,8 @@ const ExamineViewer_default_ = ExamineViewer;
|
|
|
117301
117549
|
x_ite_Namespace .add ("ExamineViewer", "x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
|
|
117302
117550
|
/* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
|
|
117303
117551
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
117304
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
117305
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
117552
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(354);
|
|
117553
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(812);
|
|
117306
117554
|
/*******************************************************************************
|
|
117307
117555
|
*
|
|
117308
117556
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118317,8 +118565,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
118317
118565
|
x_ite_Namespace .add ("FlyViewer", "x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
|
|
118318
118566
|
/* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
|
|
118319
118567
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
118320
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
118321
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
118568
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(354);
|
|
118569
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(812);
|
|
118322
118570
|
/*******************************************************************************
|
|
118323
118571
|
*
|
|
118324
118572
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118649,8 +118897,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
118649
118897
|
x_ite_Namespace .add ("NoneViewer", "x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
|
|
118650
118898
|
/* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
|
|
118651
118899
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
118652
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
118653
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
118900
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(354);
|
|
118901
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(812);
|
|
118654
118902
|
/*******************************************************************************
|
|
118655
118903
|
*
|
|
118656
118904
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119789,8 +120037,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
119789
120037
|
x_ite_Namespace .add ("X3DPickingContext", "x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
|
|
119790
120038
|
/* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
|
|
119791
120039
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
119792
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
119793
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
120040
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(354);
|
|
120041
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(812);
|
|
119794
120042
|
/*******************************************************************************
|
|
119795
120043
|
*
|
|
119796
120044
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -121091,7 +121339,7 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
|
|
|
121091
121339
|
x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
|
|
121092
121340
|
/* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
|
|
121093
121341
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
121094
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
121342
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(812);
|
|
121095
121343
|
/*******************************************************************************
|
|
121096
121344
|
*
|
|
121097
121345
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -121146,7 +121394,6 @@ x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFram
|
|
|
121146
121394
|
|
|
121147
121395
|
|
|
121148
121396
|
const
|
|
121149
|
-
_viewport = Symbol (),
|
|
121150
121397
|
_frameBuffer = Symbol (),
|
|
121151
121398
|
_transmissionBuffer = Symbol (),
|
|
121152
121399
|
_resizer = Symbol (),
|
|
@@ -121232,7 +121479,7 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
121232
121479
|
},
|
|
121233
121480
|
getMaxClipPlanes ()
|
|
121234
121481
|
{
|
|
121235
|
-
return
|
|
121482
|
+
return maxClipPlanes;
|
|
121236
121483
|
},
|
|
121237
121484
|
getDepthSize ()
|
|
121238
121485
|
{
|
|
@@ -122098,7 +122345,7 @@ const X3DSoundContext_default_ = X3DSoundContext;
|
|
|
122098
122345
|
x_ite_Namespace .add ("X3DSoundContext", "x_ite/Browser/Sound/X3DSoundContext", X3DSoundContext_default_);
|
|
122099
122346
|
/* harmony default export */ const Sound_X3DSoundContext = (X3DSoundContext_default_);
|
|
122100
122347
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/KTXDecoder.js
|
|
122101
|
-
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(
|
|
122348
|
+
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(812);
|
|
122102
122349
|
const KTXDecoder_default_ = class KTXDecoder
|
|
122103
122350
|
{
|
|
122104
122351
|
constructor (gl, externalKtxlib, scriptDir)
|
|
@@ -123712,7 +123959,7 @@ const Components_default_ = Components;
|
|
|
123712
123959
|
x_ite_Namespace .add ("Components", "x_ite/Components", Components_default_);
|
|
123713
123960
|
/* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
|
|
123714
123961
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
|
|
123715
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
123962
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(812);
|
|
123716
123963
|
/*******************************************************************************
|
|
123717
123964
|
* MIT License
|
|
123718
123965
|
*
|
|
@@ -124980,7 +125227,7 @@ const FieldTypes_default_ = new Configuration_FieldTypesArray (Object .values (x
|
|
|
124980
125227
|
x_ite_Namespace .add ("FieldTypes", "x_ite/Configuration/FieldTypes", FieldTypes_default_);
|
|
124981
125228
|
/* harmony default export */ const FieldTypes = (FieldTypes_default_);
|
|
124982
125229
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
|
|
124983
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
125230
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(812);
|
|
124984
125231
|
/*******************************************************************************
|
|
124985
125232
|
*
|
|
124986
125233
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -125051,6 +125298,7 @@ x_ite_Namespace .add ("FieldTypes", "x_ite/Configuration/FieldTypes", FieldTypes
|
|
|
125051
125298
|
|
|
125052
125299
|
|
|
125053
125300
|
|
|
125301
|
+
|
|
125054
125302
|
|
|
125055
125303
|
|
|
125056
125304
|
const
|
|
@@ -125249,7 +125497,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125249
125497
|
{
|
|
125250
125498
|
function loadComponents (components, seen)
|
|
125251
125499
|
{
|
|
125252
|
-
return Promise .all (components .map (component => loadComponent .call (this, component, seen)))
|
|
125500
|
+
return Promise .all (components .map (component => loadComponent .call (this, component, seen)));
|
|
125253
125501
|
}
|
|
125254
125502
|
|
|
125255
125503
|
async function loadComponent ({ name, providerURL, external, dependencies }, seen)
|
|
@@ -125265,7 +125513,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125265
125513
|
{
|
|
125266
125514
|
case "NODE":
|
|
125267
125515
|
{
|
|
125268
|
-
__webpack_require__.g .require (__webpack_require__.g .require ("url") .fileURLToPath (providerURL))
|
|
125516
|
+
__webpack_require__.g .require (__webpack_require__.g .require ("url") .fileURLToPath (providerURL));
|
|
125269
125517
|
break;
|
|
125270
125518
|
}
|
|
125271
125519
|
case "BROWSER":
|
|
@@ -125300,7 +125548,10 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125300
125548
|
}
|
|
125301
125549
|
|
|
125302
125550
|
// Load array of component names.
|
|
125303
|
-
return
|
|
125551
|
+
return Promise .all ([
|
|
125552
|
+
MikkTSpace .initialize (), // Required by Rendering component.
|
|
125553
|
+
loadComponents .call (this, component, new Set ()),
|
|
125554
|
+
]);
|
|
125304
125555
|
};
|
|
125305
125556
|
})(),
|
|
125306
125557
|
addConcreteNode (ConcreteNode)
|
|
@@ -126038,7 +126289,7 @@ const X3DBrowser_default_ = X3DBrowser;
|
|
|
126038
126289
|
x_ite_Namespace .add ("X3DBrowser", "x_ite/Browser/X3DBrowser", X3DBrowser_default_);
|
|
126039
126290
|
/* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
|
|
126040
126291
|
;// CONCATENATED MODULE: ./src/x_ite/X3DCanvasElement.js
|
|
126041
|
-
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(
|
|
126292
|
+
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(812);
|
|
126042
126293
|
/*******************************************************************************
|
|
126043
126294
|
*
|
|
126044
126295
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -126190,8 +126441,8 @@ const X3DCanvasElement_default_ = X3DCanvasElement;
|
|
|
126190
126441
|
x_ite_Namespace .add ("X3DCanvasElement", "x_ite/X3DCanvasElement", X3DCanvasElement_default_);
|
|
126191
126442
|
/* harmony default export */ const x_ite_X3DCanvasElement = (X3DCanvasElement_default_);
|
|
126192
126443
|
;// CONCATENATED MODULE: ./src/lib/jquery.js
|
|
126193
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
126194
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
126444
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(812);
|
|
126445
|
+
/* provided dependency */ var pako = __webpack_require__(552);
|
|
126195
126446
|
Object .assign (jquery_$,
|
|
126196
126447
|
{
|
|
126197
126448
|
decodeText (input)
|
|
@@ -126268,14 +126519,14 @@ const jquery_default_ = jquery_$;
|
|
|
126268
126519
|
x_ite_Namespace .add ("jquery", "lib/jquery", jquery_default_);
|
|
126269
126520
|
/* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
|
|
126270
126521
|
;// CONCATENATED MODULE: ./src/lib/libtess.js
|
|
126271
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
126522
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(193);
|
|
126272
126523
|
const libtess_default_ = libtess_libtess;
|
|
126273
126524
|
;
|
|
126274
126525
|
|
|
126275
126526
|
x_ite_Namespace .add ("libtess", "lib/libtess", libtess_default_);
|
|
126276
126527
|
/* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
|
|
126277
126528
|
;// CONCATENATED MODULE: ./src/x_ite/X3D.js
|
|
126278
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
126529
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(812);
|
|
126279
126530
|
/*******************************************************************************
|
|
126280
126531
|
*
|
|
126281
126532
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -126583,7 +126834,7 @@ Object .assign (X3D,
|
|
|
126583
126834
|
|
|
126584
126835
|
// Assign X3D to global namespace.
|
|
126585
126836
|
|
|
126586
|
-
window [Symbol .for ("X_ITE.X3D-10.
|
|
126837
|
+
window [Symbol .for ("X_ITE.X3D-10.2.0")] = x_ite_X3D;
|
|
126587
126838
|
|
|
126588
126839
|
customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
|
|
126589
126840
|
|