x_ite 10.0.5 → 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 +26 -23
- 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 +61 -46
- 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 +287 -215
- 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 +1006 -683
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.min.mjs +1 -1
- package/dist/x_ite.mjs +1006 -683
- 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.0
|
|
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.0
|
|
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;
|
|
@@ -30135,6 +30118,7 @@ x_ite_Namespace .add ("SFVec3", "x_ite/Fields/SFVec3", SFVec3_default_);
|
|
|
30135
30118
|
|
|
30136
30119
|
|
|
30137
30120
|
|
|
30121
|
+
|
|
30138
30122
|
const
|
|
30139
30123
|
SFVec3d = Fields_SFVec3 .SFVec3d,
|
|
30140
30124
|
SFVec3f = Fields_SFVec3 .SFVec3f,
|
|
@@ -30222,6 +30206,25 @@ Object .assign (Object .setPrototypeOf (SFRotation .prototype, Base_X3DField .pr
|
|
|
30222
30206
|
{
|
|
30223
30207
|
return new SFMatrix3f (this .getValue () .getMatrix ());
|
|
30224
30208
|
},
|
|
30209
|
+
setQuaternion: (function ()
|
|
30210
|
+
{
|
|
30211
|
+
const q = new Numbers_Quaternion ();
|
|
30212
|
+
|
|
30213
|
+
return function (x, y, z, w)
|
|
30214
|
+
{
|
|
30215
|
+
this .getValue () .setQuaternion (q .set (x, y, z, w));
|
|
30216
|
+
this .addEvent ();
|
|
30217
|
+
};
|
|
30218
|
+
})(),
|
|
30219
|
+
getQuaternion: (function ()
|
|
30220
|
+
{
|
|
30221
|
+
const q = new Numbers_Quaternion ();
|
|
30222
|
+
|
|
30223
|
+
return function ()
|
|
30224
|
+
{
|
|
30225
|
+
return [... this .getValue () .getQuaternion (q)];
|
|
30226
|
+
};
|
|
30227
|
+
})(),
|
|
30225
30228
|
inverse ()
|
|
30226
30229
|
{
|
|
30227
30230
|
return new SFRotation (this .getValue () .copy () .inverse ());
|
|
@@ -34263,7 +34266,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
|
|
|
34263
34266
|
x_ite_Namespace .add ("X3DBaseNode", "x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
|
|
34264
34267
|
/* harmony default export */ const Base_X3DBaseNode = (X3DBaseNode_default_);
|
|
34265
34268
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Legacy.js
|
|
34266
|
-
/* provided dependency */ var $ = __webpack_require__(
|
|
34269
|
+
/* provided dependency */ var $ = __webpack_require__(812);
|
|
34267
34270
|
/*******************************************************************************
|
|
34268
34271
|
*
|
|
34269
34272
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -34400,7 +34403,7 @@ x_ite_Namespace .add ("Legacy", "x_ite/Browser/Legacy", Legacy_default_);
|
|
|
34400
34403
|
*
|
|
34401
34404
|
******************************************************************************/
|
|
34402
34405
|
|
|
34403
|
-
const BROWSER_VERSION_default_ = "10.0
|
|
34406
|
+
const BROWSER_VERSION_default_ = "10.2.0";
|
|
34404
34407
|
;
|
|
34405
34408
|
|
|
34406
34409
|
x_ite_Namespace .add ("BROWSER_VERSION", "x_ite/BROWSER_VERSION", BROWSER_VERSION_default_);
|
|
@@ -37586,7 +37589,7 @@ const X3DBindableNode_default_ = X3DBindableNode;
|
|
|
37586
37589
|
x_ite_Namespace .add ("X3DBindableNode", "x_ite/Components/Core/X3DBindableNode", X3DBindableNode_default_);
|
|
37587
37590
|
/* harmony default export */ const Core_X3DBindableNode = (X3DBindableNode_default_);
|
|
37588
37591
|
;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
|
|
37589
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
37592
|
+
/* provided dependency */ var libtess = __webpack_require__(193);
|
|
37590
37593
|
/*******************************************************************************
|
|
37591
37594
|
*
|
|
37592
37595
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -40156,7 +40159,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
|
|
|
40156
40159
|
x_ite_Namespace .add ("X3DProtoDeclaration", "x_ite/Prototype/X3DProtoDeclaration", X3DProtoDeclaration_default_);
|
|
40157
40160
|
/* harmony default export */ const Prototype_X3DProtoDeclaration = (X3DProtoDeclaration_default_);
|
|
40158
40161
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
|
|
40159
|
-
/* provided dependency */ var X3DParser_$ = __webpack_require__(
|
|
40162
|
+
/* provided dependency */ var X3DParser_$ = __webpack_require__(812);
|
|
40160
40163
|
/*******************************************************************************
|
|
40161
40164
|
*
|
|
40162
40165
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -40414,7 +40417,7 @@ const Expressions_default_ = Expressions;
|
|
|
40414
40417
|
x_ite_Namespace .add ("Expressions", "x_ite/Parser/Expressions", Expressions_default_);
|
|
40415
40418
|
/* harmony default export */ const Parser_Expressions = (Expressions_default_);
|
|
40416
40419
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/VRMLParser.js
|
|
40417
|
-
/* provided dependency */ var VRMLParser_$ = __webpack_require__(
|
|
40420
|
+
/* provided dependency */ var VRMLParser_$ = __webpack_require__(812);
|
|
40418
40421
|
/*******************************************************************************
|
|
40419
40422
|
*
|
|
40420
40423
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -43114,7 +43117,7 @@ const VRMLParser_default_ = VRMLParser;
|
|
|
43114
43117
|
x_ite_Namespace .add ("VRMLParser", "x_ite/Parser/VRMLParser", VRMLParser_default_);
|
|
43115
43118
|
/* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
|
|
43116
43119
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
|
|
43117
|
-
/* provided dependency */ var XMLParser_$ = __webpack_require__(
|
|
43120
|
+
/* provided dependency */ var XMLParser_$ = __webpack_require__(812);
|
|
43118
43121
|
/*******************************************************************************
|
|
43119
43122
|
*
|
|
43120
43123
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -45290,7 +45293,7 @@ const URLs_default_ = URLs;
|
|
|
45290
45293
|
x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
|
|
45291
45294
|
/* harmony default export */ const Networking_URLs = (URLs_default_);
|
|
45292
45295
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
|
|
45293
|
-
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(
|
|
45296
|
+
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(812);
|
|
45294
45297
|
/*******************************************************************************
|
|
45295
45298
|
*
|
|
45296
45299
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -45351,9 +45354,8 @@ x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
|
|
|
45351
45354
|
|
|
45352
45355
|
|
|
45353
45356
|
|
|
45354
|
-
|
|
45355
45357
|
// https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html
|
|
45356
|
-
// https://github.com/KhronosGroup/glTF-Sample-
|
|
45358
|
+
// https://github.com/KhronosGroup/glTF-Sample-Assets
|
|
45357
45359
|
|
|
45358
45360
|
const SAMPLES_PER_SECOND = 30; // in 1/s
|
|
45359
45361
|
|
|
@@ -45373,7 +45375,6 @@ function GLTF2Parser (scene)
|
|
|
45373
45375
|
this .extensions = new Set ();
|
|
45374
45376
|
this .envLights = [ ];
|
|
45375
45377
|
this .lights = [ ];
|
|
45376
|
-
this .usedLights = 0;
|
|
45377
45378
|
this .materialVariants = [ ];
|
|
45378
45379
|
this .materialVariantNodes = [ ];
|
|
45379
45380
|
this .buffers = [ ];
|
|
@@ -45384,11 +45385,9 @@ function GLTF2Parser (scene)
|
|
|
45384
45385
|
this .textureTransformNodes = [ ];
|
|
45385
45386
|
this .meshes = [ ];
|
|
45386
45387
|
this .cameras = [ ];
|
|
45387
|
-
this .viewpointNodes = [ ];
|
|
45388
45388
|
this .nodes = [ ];
|
|
45389
45389
|
this .skins = [ ];
|
|
45390
45390
|
this .joints = new Set ();
|
|
45391
|
-
this .animations = 0;
|
|
45392
45391
|
}
|
|
45393
45392
|
|
|
45394
45393
|
Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser .prototype),
|
|
@@ -45509,7 +45508,12 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45509
45508
|
|
|
45510
45509
|
this .viewpointsCenterOfRotation (this .getScene ());
|
|
45511
45510
|
this .optimizeSceneGraph (this .getScene () .getRootNodes ());
|
|
45512
|
-
|
|
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
|
+
|
|
45513
45517
|
this .materialVariantsSwitch ();
|
|
45514
45518
|
|
|
45515
45519
|
return this .getScene ();
|
|
@@ -45588,6 +45592,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45588
45592
|
case "KHR_materials_pbrSpecularGlossiness":
|
|
45589
45593
|
case "KHR_materials_anisotropy":
|
|
45590
45594
|
case "KHR_materials_clearcoat":
|
|
45595
|
+
case "KHR_materials_diffuse_transmission":
|
|
45591
45596
|
case "KHR_materials_dispersion":
|
|
45592
45597
|
case "KHR_materials_emissive_strength":
|
|
45593
45598
|
case "KHR_materials_ior":
|
|
@@ -45666,7 +45671,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45666
45671
|
const
|
|
45667
45672
|
scene = this .getScene (),
|
|
45668
45673
|
lightNode = scene .createNode ("EnvironmentLight", false),
|
|
45669
|
-
name = `EnvironmentLight${id}`,
|
|
45674
|
+
name = `EnvironmentLight${id + 1}`,
|
|
45670
45675
|
quaternion = new Numbers_Quaternion ();
|
|
45671
45676
|
|
|
45672
45677
|
scene .addNamedNode (scene .getUniqueName (name), lightNode);
|
|
@@ -45756,7 +45761,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45756
45761
|
|
|
45757
45762
|
const
|
|
45758
45763
|
scene = this .getScene (),
|
|
45759
|
-
name = this .sanitizeName (light .name) || `Light${id}`;
|
|
45764
|
+
name = this .sanitizeName (light .name) || `Light${id + 1}`;
|
|
45760
45765
|
|
|
45761
45766
|
const color = new Numbers_Color3 (1, 1, 1);
|
|
45762
45767
|
|
|
@@ -45930,66 +45935,13 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45930
45935
|
length = Math .min (stride * count, (bufferView .byteLength - byteOffset) / TypedArray .BYTES_PER_ELEMENT),
|
|
45931
45936
|
array = new TypedArray (bufferView .buffer, byteOffset, length);
|
|
45932
45937
|
|
|
45933
|
-
|
|
45934
|
-
{
|
|
45935
|
-
const value = this .sparseObject (accessor .sparse, array, components);
|
|
45936
|
-
|
|
45937
|
-
Object .defineProperty (accessor, "array", { value: value });
|
|
45938
|
-
|
|
45939
|
-
return value;
|
|
45940
|
-
}
|
|
45941
|
-
else
|
|
45942
|
-
{
|
|
45943
|
-
const
|
|
45944
|
-
length = count * components,
|
|
45945
|
-
dense = new TypedArray (length);
|
|
45946
|
-
|
|
45947
|
-
for (let i = 0, j = 0; i < length; j += stride)
|
|
45948
|
-
{
|
|
45949
|
-
for (let c = 0; c < components; ++ c, ++ i)
|
|
45950
|
-
dense [i] = array [j + c];
|
|
45951
|
-
}
|
|
45952
|
-
|
|
45953
|
-
const value = this .sparseObject (accessor .sparse, dense, components);
|
|
45938
|
+
let value;
|
|
45954
45939
|
|
|
45955
|
-
|
|
45940
|
+
value = this .denseArray (TypedArray, components, count, stride, array);
|
|
45941
|
+
value = this .sparseObject (accessor, components, value);
|
|
45942
|
+
value = this .normalizedArray (accessor, value);
|
|
45956
45943
|
|
|
45957
|
-
|
|
45958
|
-
}
|
|
45959
|
-
},
|
|
45960
|
-
configurable: true,
|
|
45961
|
-
});
|
|
45962
|
-
|
|
45963
|
-
Object .defineProperty (accessor, "normalizedArray",
|
|
45964
|
-
{
|
|
45965
|
-
get: () =>
|
|
45966
|
-
{
|
|
45967
|
-
switch (accessor .componentType)
|
|
45968
|
-
{
|
|
45969
|
-
case 5120: // Int8Array
|
|
45970
|
-
var value = Float32Array .from (accessor .array, v => Math .max (v / 127, -1));
|
|
45971
|
-
break;
|
|
45972
|
-
case 5121: // Uint8Array
|
|
45973
|
-
var value = Float32Array .from (accessor .array, v => v / 255);
|
|
45974
|
-
break;
|
|
45975
|
-
case 5122: // Int16Array
|
|
45976
|
-
var value = Float32Array .from (accessor .array, v => Math .max (v / 32767, -1));
|
|
45977
|
-
break;
|
|
45978
|
-
case 5123: // Uint16Array
|
|
45979
|
-
var value = Float32Array .from (accessor .array, v => v / 65535);
|
|
45980
|
-
break;
|
|
45981
|
-
case 5124: // Int32Array
|
|
45982
|
-
var value = Float32Array .from (accessor .array, v => Math .max (v / 2147483647, -1));
|
|
45983
|
-
break;
|
|
45984
|
-
case 5125: // Uint32Array
|
|
45985
|
-
var value = Float32Array .from (accessor .array, v => v / 4294967295);
|
|
45986
|
-
break;
|
|
45987
|
-
case 5126: // Float32Array
|
|
45988
|
-
var value = accessor .array;
|
|
45989
|
-
break;
|
|
45990
|
-
}
|
|
45991
|
-
|
|
45992
|
-
Object .defineProperty (accessor, "normalizedArray", { value: value });
|
|
45944
|
+
Object .defineProperty (accessor, "array", { value });
|
|
45993
45945
|
|
|
45994
45946
|
return value;
|
|
45995
45947
|
},
|
|
@@ -45997,6 +45949,23 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45997
45949
|
});
|
|
45998
45950
|
};
|
|
45999
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
|
+
},
|
|
46000
45969
|
sparseObject: (() =>
|
|
46001
45970
|
{
|
|
46002
45971
|
const TypedArrays = new Map ([
|
|
@@ -46005,7 +45974,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46005
45974
|
[5125, Uint32Array],
|
|
46006
45975
|
]);
|
|
46007
45976
|
|
|
46008
|
-
return function (sparse,
|
|
45977
|
+
return function ({ sparse }, components, array)
|
|
46009
45978
|
{
|
|
46010
45979
|
if (!(sparse instanceof Object))
|
|
46011
45980
|
return array;
|
|
@@ -46041,6 +46010,29 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46041
46010
|
return array;
|
|
46042
46011
|
};
|
|
46043
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
|
+
},
|
|
46044
46036
|
samplersArray (samplers)
|
|
46045
46037
|
{
|
|
46046
46038
|
if (!(samplers instanceof Array))
|
|
@@ -46231,9 +46223,9 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46231
46223
|
if (material .appearanceNode)
|
|
46232
46224
|
return material .appearanceNode;
|
|
46233
46225
|
|
|
46234
|
-
const texCoordIndices = this .
|
|
46226
|
+
const texCoordIndices = this .getTexCoordIndices ("", material);
|
|
46235
46227
|
|
|
46236
|
-
this .texCoordIndex = Array .from (texCoordIndices) .reduce (Math .max, -1);
|
|
46228
|
+
this .texCoordIndex = Array .from (texCoordIndices) .reduce ((p, c) => Math .max (p, c), -1);
|
|
46237
46229
|
this .textureTransformNodes = [ ];
|
|
46238
46230
|
this .texCoordMappings = new Map ();
|
|
46239
46231
|
this .texCoordOfNode = new Map ();
|
|
@@ -46290,13 +46282,13 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46290
46282
|
appearanceNode ._alphaMode = this .stringValue (material .alphaMode, "OPAQUE");
|
|
46291
46283
|
appearanceNode ._alphaCutoff = this .numberValue (material .alphaCutoff, 0.5);
|
|
46292
46284
|
appearanceNode ._material = this .khrMaterialsUnlitObject (material .extensions ?.KHR_materials_unlit, materialNode);
|
|
46293
|
-
appearanceNode ._textureTransform = this .createMultiTextureTransform (
|
|
46285
|
+
appearanceNode ._textureTransform = this .createMultiTextureTransform (appearanceNode ._material .getValue ());
|
|
46294
46286
|
|
|
46295
46287
|
appearanceNode .setup ();
|
|
46296
46288
|
|
|
46297
46289
|
return material .appearanceNode = appearanceNode;
|
|
46298
46290
|
},
|
|
46299
|
-
|
|
46291
|
+
getTexCoordIndices (key, object, indices = new Set ())
|
|
46300
46292
|
{
|
|
46301
46293
|
if (!(object instanceof Object))
|
|
46302
46294
|
return indices;
|
|
@@ -46305,7 +46297,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46305
46297
|
indices .add (object .texCoord || 0);
|
|
46306
46298
|
|
|
46307
46299
|
for (const [key, value] of Object .entries (object))
|
|
46308
|
-
this .
|
|
46300
|
+
this .getTexCoordIndices (key, value, indices);
|
|
46309
46301
|
|
|
46310
46302
|
return indices;
|
|
46311
46303
|
},
|
|
@@ -46441,6 +46433,9 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46441
46433
|
case "KHR_materials_clearcoat":
|
|
46442
46434
|
this .khrMaterialsClearcoatObject (value, materialNode);
|
|
46443
46435
|
break;
|
|
46436
|
+
case "KHR_materials_diffuse_transmission":
|
|
46437
|
+
this .khrMaterialsDiffuseTransmissionObject (value, materialNode);
|
|
46438
|
+
break;
|
|
46444
46439
|
case "KHR_materials_dispersion":
|
|
46445
46440
|
this .khrMaterialsDispersionObject (value, materialNode);
|
|
46446
46441
|
break;
|
|
@@ -46506,6 +46501,29 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46506
46501
|
|
|
46507
46502
|
materialNode ._extensions .push (extension);
|
|
46508
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
|
+
},
|
|
46509
46527
|
khrMaterialsDispersionObject (KHR_materials_dispersion, materialNode)
|
|
46510
46528
|
{
|
|
46511
46529
|
if (!(KHR_materials_dispersion instanceof Object))
|
|
@@ -46701,8 +46719,8 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46701
46719
|
textureTransformNode = scene .createNode ("TextureTransformMatrix3D", false),
|
|
46702
46720
|
mapping = `TEXCOORD_${this .texCoordIndex + this .textureTransformNodes .length + 1}`;
|
|
46703
46721
|
|
|
46704
|
-
textureTransformNode ._mapping
|
|
46705
|
-
textureTransformNode ._matrix
|
|
46722
|
+
textureTransformNode ._mapping = mapping;
|
|
46723
|
+
textureTransformNode ._matrix = matrix;
|
|
46706
46724
|
|
|
46707
46725
|
textureTransformNode .setup ();
|
|
46708
46726
|
|
|
@@ -46782,9 +46800,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46782
46800
|
shapeNode = this .createShape (primitive, weights, skin, EXT_mesh_gpu_instancing),
|
|
46783
46801
|
variantsNode = this .khrMaterialsVariantsExtension (primitive .extensions, shapeNode);
|
|
46784
46802
|
|
|
46785
|
-
if (variantsNode)
|
|
46786
|
-
variantsNode ._children [this .materialVariants .length] = shapeNode;
|
|
46787
|
-
|
|
46788
46803
|
shapeNodes .push (primitive .shapeNode = variantsNode ?? shapeNode);
|
|
46789
46804
|
},
|
|
46790
46805
|
attributesObject (attributes)
|
|
@@ -46840,15 +46855,15 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46840
46855
|
if (!this .draco)
|
|
46841
46856
|
return;
|
|
46842
46857
|
|
|
46843
|
-
function indicesCallback (
|
|
46858
|
+
function indicesCallback (value)
|
|
46844
46859
|
{
|
|
46845
|
-
Object .defineProperty (primitive .indices, "array", { value
|
|
46860
|
+
Object .defineProperty (primitive .indices, "array", { value });
|
|
46846
46861
|
}
|
|
46847
46862
|
|
|
46848
|
-
function attributeCallback (key,
|
|
46863
|
+
function attributeCallback (key, value)
|
|
46849
46864
|
{
|
|
46850
46865
|
if (attributes [key])
|
|
46851
|
-
Object .defineProperty (attributes [key], "array", { value
|
|
46866
|
+
Object .defineProperty (attributes [key], "array", { value });
|
|
46852
46867
|
}
|
|
46853
46868
|
|
|
46854
46869
|
const
|
|
@@ -46987,16 +47002,26 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46987
47002
|
scene = this .getScene (),
|
|
46988
47003
|
variantsNode = scene .createNode ("Switch", false);
|
|
46989
47004
|
|
|
46990
|
-
variantsNode ._whichChoice = 0;
|
|
46991
|
-
|
|
46992
47005
|
for (const mapping of mappings)
|
|
46993
47006
|
this .khrMaterialsVariantsObjectMapping (mapping, shapeNode, variantsNode);
|
|
46994
47007
|
|
|
46995
|
-
variantsNode .
|
|
47008
|
+
variantsNode ._whichChoice = this .materialVariants .length;
|
|
46996
47009
|
|
|
46997
47010
|
if (!variantsNode ._children .length)
|
|
46998
47011
|
return;
|
|
46999
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
|
+
|
|
47000
47025
|
this .materialVariantNodes .push (variantsNode);
|
|
47001
47026
|
|
|
47002
47027
|
return variantsNode;
|
|
@@ -47035,18 +47060,18 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47035
47060
|
|
|
47036
47061
|
this .cameras = cameras;
|
|
47037
47062
|
},
|
|
47038
|
-
cameraObject (camera)
|
|
47063
|
+
cameraObject (id, camera)
|
|
47039
47064
|
{
|
|
47040
47065
|
if (!(camera instanceof Object))
|
|
47041
47066
|
return null;
|
|
47042
47067
|
|
|
47043
|
-
if (camera .
|
|
47044
|
-
return camera .
|
|
47068
|
+
if (camera .node !== undefined)
|
|
47069
|
+
return camera .node;
|
|
47045
47070
|
|
|
47046
47071
|
const viewpointNode = this .cameraType (camera);
|
|
47047
47072
|
|
|
47048
47073
|
if (!viewpointNode)
|
|
47049
|
-
return camera .
|
|
47074
|
+
return camera .node = null;
|
|
47050
47075
|
|
|
47051
47076
|
const
|
|
47052
47077
|
scene = this .getScene (),
|
|
@@ -47060,12 +47085,10 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47060
47085
|
scene .addExportedNode (scene .getUniqueExportName (name), viewpointNode);
|
|
47061
47086
|
}
|
|
47062
47087
|
|
|
47063
|
-
this .
|
|
47064
|
-
|
|
47065
|
-
viewpointNode ._description = this .description (camera .name || `Viewpoint ${this .viewpointNodes .length}`);
|
|
47088
|
+
viewpointNode ._description = this .description (camera .name || `Viewpoint ${id + 1}`);
|
|
47066
47089
|
viewpointNode ._position = Numbers_Vector3 .Zero;
|
|
47067
47090
|
|
|
47068
|
-
return camera .
|
|
47091
|
+
return camera .node = viewpointNode;
|
|
47069
47092
|
},
|
|
47070
47093
|
cameraType (camera)
|
|
47071
47094
|
{
|
|
@@ -47254,7 +47277,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47254
47277
|
|
|
47255
47278
|
// Add camera.
|
|
47256
47279
|
|
|
47257
|
-
const viewpointNode = this .cameraObject (this .cameras [node .camera]);
|
|
47280
|
+
const viewpointNode = this .cameraObject (node .camera, this .cameras [node .camera]);
|
|
47258
47281
|
|
|
47259
47282
|
if (viewpointNode)
|
|
47260
47283
|
transformNode ._children .push (viewpointNode);
|
|
@@ -47335,8 +47358,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47335
47358
|
if (!lightNode)
|
|
47336
47359
|
return;
|
|
47337
47360
|
|
|
47338
|
-
++ this .usedLights;
|
|
47339
|
-
|
|
47340
47361
|
transformNode ._children .push (lightNode);
|
|
47341
47362
|
},
|
|
47342
47363
|
nodeChildrenArray (children)
|
|
@@ -47438,9 +47459,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47438
47459
|
{
|
|
47439
47460
|
if (sceneNumber === 0)
|
|
47440
47461
|
{
|
|
47441
|
-
if (this .usedLights)
|
|
47442
|
-
scene .getRootNodes () .push (this .createNavigationInfo ());
|
|
47443
|
-
|
|
47444
47462
|
scene .getRootNodes () .push (children [0]);
|
|
47445
47463
|
return;
|
|
47446
47464
|
}
|
|
@@ -47451,9 +47469,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47451
47469
|
{
|
|
47452
47470
|
// Root
|
|
47453
47471
|
|
|
47454
|
-
if (this .usedLights)
|
|
47455
|
-
scene .getRootNodes () .push (this .createNavigationInfo ());
|
|
47456
|
-
|
|
47457
47472
|
const switchNode = scene .createNode ("Switch", false);
|
|
47458
47473
|
|
|
47459
47474
|
scene .addNamedNode (scene .getUniqueName ("Scenes"), switchNode);
|
|
@@ -47515,20 +47530,25 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47515
47530
|
{
|
|
47516
47531
|
return this .nodeChildrenArray (nodes);
|
|
47517
47532
|
},
|
|
47518
|
-
|
|
47533
|
+
exportGroup (name, array)
|
|
47519
47534
|
{
|
|
47520
|
-
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)
|
|
47521
47541
|
return;
|
|
47522
47542
|
|
|
47523
47543
|
const
|
|
47524
47544
|
scene = this .getScene (),
|
|
47525
47545
|
groupNode = scene .createNode ("Group", false);
|
|
47526
47546
|
|
|
47527
|
-
scene .addNamedNode (scene .getUniqueName (
|
|
47528
|
-
scene .addExportedNode (scene .getUniqueExportName (
|
|
47547
|
+
scene .addNamedNode (scene .getUniqueName (name), groupNode);
|
|
47548
|
+
scene .addExportedNode (scene .getUniqueExportName (name), groupNode);
|
|
47529
47549
|
|
|
47530
47550
|
groupNode ._visible = false;
|
|
47531
|
-
groupNode ._children =
|
|
47551
|
+
groupNode ._children = nodes;
|
|
47532
47552
|
|
|
47533
47553
|
groupNode .setup ();
|
|
47534
47554
|
|
|
@@ -47564,28 +47584,10 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47564
47584
|
if (!(animations instanceof Array))
|
|
47565
47585
|
return;
|
|
47566
47586
|
|
|
47567
|
-
const
|
|
47568
|
-
|
|
47569
|
-
.filter (node => node);
|
|
47570
|
-
|
|
47571
|
-
if (!animationNodes .length)
|
|
47572
|
-
return;
|
|
47573
|
-
|
|
47574
|
-
const
|
|
47575
|
-
scene = this .getScene (),
|
|
47576
|
-
groupNode = scene .createNode ("Group", false);
|
|
47577
|
-
|
|
47578
|
-
scene .addNamedNode (scene .getUniqueName ("Animations"), groupNode);
|
|
47579
|
-
scene .addExportedNode (scene .getUniqueExportName ("Animations"), groupNode);
|
|
47580
|
-
|
|
47581
|
-
groupNode ._visible = false;
|
|
47582
|
-
groupNode ._children = animationNodes;
|
|
47583
|
-
|
|
47584
|
-
groupNode .setup ();
|
|
47585
|
-
|
|
47586
|
-
scene .getRootNodes () .push (groupNode);
|
|
47587
|
+
for (const [i, animation] of animations .entries ())
|
|
47588
|
+
this .animationObject (i, animation);
|
|
47587
47589
|
},
|
|
47588
|
-
animationObject (animation)
|
|
47590
|
+
animationObject (id, animation)
|
|
47589
47591
|
{
|
|
47590
47592
|
if (!(animation instanceof Object))
|
|
47591
47593
|
return null;
|
|
@@ -47596,27 +47598,25 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47596
47598
|
channelNodes = this .animationChannelsArray (animation .channels, animation .samplers, timeSensorNode);
|
|
47597
47599
|
|
|
47598
47600
|
if (!channelNodes .length)
|
|
47599
|
-
return
|
|
47601
|
+
return;
|
|
47600
47602
|
|
|
47601
47603
|
const
|
|
47602
47604
|
groupNode = scene .createNode ("Group", false),
|
|
47603
47605
|
name = this .sanitizeName (animation .name);
|
|
47604
47606
|
|
|
47605
|
-
|
|
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);
|
|
47606
47611
|
|
|
47607
|
-
|
|
47608
|
-
scene .addNamedNode (scene .getUniqueName (`Timer${this .animations}`), timeSensorNode);
|
|
47609
|
-
scene .addExportedNode (scene .getUniqueExportName (name || `Animation${this .animations}`), groupNode);
|
|
47610
|
-
scene .addExportedNode (scene .getUniqueExportName (`Timer${this .animations}`), timeSensorNode);
|
|
47611
|
-
|
|
47612
|
-
timeSensorNode ._description = this .description (animation .name) || `Animation ${this .animations}`;
|
|
47612
|
+
timeSensorNode ._description = this .description (animation .name) || `Animation ${id + 1}`;
|
|
47613
47613
|
groupNode ._visible = false;
|
|
47614
47614
|
groupNode ._children .push (timeSensorNode, ... channelNodes);
|
|
47615
47615
|
|
|
47616
47616
|
timeSensorNode .setup ();
|
|
47617
47617
|
groupNode .setup ();
|
|
47618
47618
|
|
|
47619
|
-
|
|
47619
|
+
animation .node = groupNode;
|
|
47620
47620
|
},
|
|
47621
47621
|
animationChannelsArray (channels, samplers, timeSensorNode)
|
|
47622
47622
|
{
|
|
@@ -47648,7 +47648,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47648
47648
|
|
|
47649
47649
|
const node = this .nodes [target .node] ?.transformNode;
|
|
47650
47650
|
|
|
47651
|
-
if (!node)
|
|
47651
|
+
if (!node && target .path !== "pointer")
|
|
47652
47652
|
return [ ];
|
|
47653
47653
|
|
|
47654
47654
|
const sampler = samplers [channel .sampler];
|
|
@@ -47674,18 +47674,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47674
47674
|
|
|
47675
47675
|
return this .createInterpolator (timeSensorNode, node, target, sampler .interpolation, input .array, output, timeSensorNode ._cycleInterval .getValue ());
|
|
47676
47676
|
},
|
|
47677
|
-
createNavigationInfo ()
|
|
47678
|
-
{
|
|
47679
|
-
const
|
|
47680
|
-
scene = this .getScene (),
|
|
47681
|
-
navigationInfoNode = scene .createNode ("NavigationInfo", false);
|
|
47682
|
-
|
|
47683
|
-
navigationInfoNode ._headlight = false;
|
|
47684
|
-
|
|
47685
|
-
navigationInfoNode .setup ();
|
|
47686
|
-
|
|
47687
|
-
return navigationInfoNode;
|
|
47688
|
-
},
|
|
47689
47677
|
createShape (primitive, weights, skin, EXT_mesh_gpu_instancing)
|
|
47690
47678
|
{
|
|
47691
47679
|
const
|
|
@@ -47729,7 +47717,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47729
47717
|
scene = this .getScene (),
|
|
47730
47718
|
instancedShapeNode = scene .createNode ("InstancedShape", false),
|
|
47731
47719
|
translationArray = translation ?.array,
|
|
47732
|
-
rotationArray = rotation ?.
|
|
47720
|
+
rotationArray = rotation ?.array,
|
|
47733
47721
|
scaleArray = scale ?.array;
|
|
47734
47722
|
|
|
47735
47723
|
if (translationArray)
|
|
@@ -48173,8 +48161,8 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48173
48161
|
colorNode = scene .createNode (opaque ? "Color" : typeName, false);
|
|
48174
48162
|
|
|
48175
48163
|
colorNode ._color = opaque && typeName !== "Color"
|
|
48176
|
-
? color .
|
|
48177
|
-
: color .
|
|
48164
|
+
? color .array .filter ((_, i) => (i + 1) % 4)
|
|
48165
|
+
: color .array;
|
|
48178
48166
|
|
|
48179
48167
|
colorNode .setup ();
|
|
48180
48168
|
|
|
@@ -48205,9 +48193,10 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48205
48193
|
}
|
|
48206
48194
|
default:
|
|
48207
48195
|
{
|
|
48208
|
-
const textureCoordinateNodes = Array .from (material .texCoordMappings .entries ()
|
|
48209
|
-
.
|
|
48210
|
-
.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));
|
|
48211
48200
|
|
|
48212
48201
|
if (!textureCoordinateNodes .length)
|
|
48213
48202
|
return null;
|
|
@@ -48237,7 +48226,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48237
48226
|
textureCoordinateNode = scene .createNode ("TextureCoordinate", false);
|
|
48238
48227
|
|
|
48239
48228
|
textureCoordinateNode ._mapping = mapping;
|
|
48240
|
-
textureCoordinateNode ._point = texCoord .
|
|
48229
|
+
textureCoordinateNode ._point = texCoord .array;
|
|
48241
48230
|
|
|
48242
48231
|
textureCoordinateNode .setup ();
|
|
48243
48232
|
|
|
@@ -48255,7 +48244,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48255
48244
|
scene = this .getScene (),
|
|
48256
48245
|
normalNode = scene .createNode ("Normal", false);
|
|
48257
48246
|
|
|
48258
|
-
normalNode ._vector = normal .
|
|
48247
|
+
normalNode ._vector = normal .array;
|
|
48259
48248
|
|
|
48260
48249
|
if ((targets instanceof Array) && (weights instanceof Array))
|
|
48261
48250
|
{
|
|
@@ -48354,7 +48343,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48354
48343
|
const
|
|
48355
48344
|
start = skin .coordinateNode ._point .length,
|
|
48356
48345
|
jointsArray = joints .array,
|
|
48357
|
-
weightsArray = weights .
|
|
48346
|
+
weightsArray = weights .array,
|
|
48358
48347
|
numVertices = jointsArray .length / 4;
|
|
48359
48348
|
|
|
48360
48349
|
for (let v = 0; v < numVertices; ++ v)
|
|
@@ -48483,7 +48472,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48483
48472
|
}
|
|
48484
48473
|
case "rotation":
|
|
48485
48474
|
{
|
|
48486
|
-
const interpolatorNode = this .createOrientationInterpolator (interpolation, times, keyValues .
|
|
48475
|
+
const interpolatorNode = this .createOrientationInterpolator (interpolation, times, keyValues .array, cycleInterval);
|
|
48487
48476
|
|
|
48488
48477
|
scene .addNamedNode (scene .getUniqueName ("RotationInterpolator"), interpolatorNode);
|
|
48489
48478
|
|
|
@@ -48521,7 +48510,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48521
48510
|
if (!geometryNode)
|
|
48522
48511
|
continue;
|
|
48523
48512
|
|
|
48524
|
-
const coordinateInterpolatorNode = this .createArrayInterpolator ("CoordinateInterpolator", interpolation, times, keyValues .
|
|
48513
|
+
const coordinateInterpolatorNode = this .createArrayInterpolator ("CoordinateInterpolator", interpolation, times, keyValues .array, cycleInterval, targets, attributes, "POSITION");
|
|
48525
48514
|
|
|
48526
48515
|
if (coordinateInterpolatorNode)
|
|
48527
48516
|
{
|
|
@@ -48531,7 +48520,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48531
48520
|
scene .addRoute (coordinateInterpolatorNode, "value_changed", geometryNode ._coord, "set_point");
|
|
48532
48521
|
}
|
|
48533
48522
|
|
|
48534
|
-
const normalInterpolatorNode = this .createArrayInterpolator ("NormalInterpolator", interpolation, times, keyValues .
|
|
48523
|
+
const normalInterpolatorNode = this .createArrayInterpolator ("NormalInterpolator", interpolation, times, keyValues .array, cycleInterval, targets, attributes, "NORMAL");
|
|
48535
48524
|
|
|
48536
48525
|
if (normalInterpolatorNode)
|
|
48537
48526
|
{
|
|
@@ -48544,6 +48533,22 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48544
48533
|
|
|
48545
48534
|
return interpolatorNodes;
|
|
48546
48535
|
}
|
|
48536
|
+
case "pointer":
|
|
48537
|
+
{
|
|
48538
|
+
// const
|
|
48539
|
+
// pointer = target .extensions ?.KHR_animation_pointer ?.pointer ?? "",
|
|
48540
|
+
// path = pointer .split ("/") .filter (p => p)
|
|
48541
|
+
// name = path .pop ();
|
|
48542
|
+
|
|
48543
|
+
// let glTF = this .input;
|
|
48544
|
+
|
|
48545
|
+
// for (const property of path)
|
|
48546
|
+
// glTF = glTF [property]
|
|
48547
|
+
|
|
48548
|
+
// console .log (glTF)
|
|
48549
|
+
|
|
48550
|
+
return [ ];
|
|
48551
|
+
}
|
|
48547
48552
|
default:
|
|
48548
48553
|
{
|
|
48549
48554
|
return [ ];
|
|
@@ -48717,7 +48722,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48717
48722
|
}
|
|
48718
48723
|
}
|
|
48719
48724
|
},
|
|
48720
|
-
createArrayInterpolator (typeName, interpolation, times, weights, cycleInterval, targets, accessors, key
|
|
48725
|
+
createArrayInterpolator (typeName, interpolation, times, weights, cycleInterval, targets, accessors, key)
|
|
48721
48726
|
{
|
|
48722
48727
|
const
|
|
48723
48728
|
scene = this .getScene (),
|
|
@@ -48743,14 +48748,14 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48743
48748
|
|
|
48744
48749
|
const w = Array .from (targets .keys (), i => weights [i]);
|
|
48745
48750
|
|
|
48746
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w
|
|
48751
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
48747
48752
|
interpolatorNode ._keyValue .push (value);
|
|
48748
48753
|
|
|
48749
48754
|
for (let t = 1, length = times .length; t < length; ++ t)
|
|
48750
48755
|
{
|
|
48751
48756
|
const
|
|
48752
48757
|
w = Array .from (targets .keys (), i => weights [t * targets .length + i]),
|
|
48753
|
-
values = this .applyMorphTargets (accessor .field, targets, key, w
|
|
48758
|
+
values = this .applyMorphTargets (accessor .field, targets, key, w);
|
|
48754
48759
|
|
|
48755
48760
|
for (const value of values)
|
|
48756
48761
|
interpolatorNode ._keyValue .push (value);
|
|
@@ -48780,7 +48785,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48780
48785
|
{
|
|
48781
48786
|
const w = Array .from (targets .keys (), i => weights [t * targets .length + i]);
|
|
48782
48787
|
|
|
48783
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w
|
|
48788
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
48784
48789
|
interpolatorNode ._keyValue .push (value);
|
|
48785
48790
|
}
|
|
48786
48791
|
|
|
@@ -48808,7 +48813,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48808
48813
|
|
|
48809
48814
|
const w = Array .from (targets .keys (), i => this .cubicSplineScalarArray (t, times, weights, targets .length, i));
|
|
48810
48815
|
|
|
48811
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w
|
|
48816
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
48812
48817
|
interpolatorNode ._keyValue .push (value);
|
|
48813
48818
|
}
|
|
48814
48819
|
|
|
@@ -48824,7 +48829,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48824
48829
|
{
|
|
48825
48830
|
const value = new Numbers_Vector3 ();
|
|
48826
48831
|
|
|
48827
|
-
return function (array, targets, key, weights
|
|
48832
|
+
return function (array, targets, key, weights)
|
|
48828
48833
|
{
|
|
48829
48834
|
const vectors = Array .from (array, v => v .getValue () .copy ());
|
|
48830
48835
|
|
|
@@ -48841,7 +48846,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48841
48846
|
continue;
|
|
48842
48847
|
|
|
48843
48848
|
const
|
|
48844
|
-
array = accessor
|
|
48849
|
+
array = accessor .array,
|
|
48845
48850
|
length = array .length;
|
|
48846
48851
|
|
|
48847
48852
|
for (let a = 0, p = 0; a < length; a += 3, ++ p)
|
|
@@ -48933,7 +48938,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
|
|
|
48933
48938
|
x_ite_Namespace .add ("GLTF2Parser", "x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
|
|
48934
48939
|
/* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
|
|
48935
48940
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
|
|
48936
|
-
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(
|
|
48941
|
+
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(812);
|
|
48937
48942
|
/*******************************************************************************
|
|
48938
48943
|
*
|
|
48939
48944
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -49085,7 +49090,7 @@ const GLB2Parser_default_ = GLB2Parser;
|
|
|
49085
49090
|
x_ite_Namespace .add ("GLB2Parser", "x_ite/Parser/GLB2Parser", GLB2Parser_default_);
|
|
49086
49091
|
/* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
|
|
49087
49092
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
|
|
49088
|
-
/* provided dependency */ var OBJParser_$ = __webpack_require__(
|
|
49093
|
+
/* provided dependency */ var OBJParser_$ = __webpack_require__(812);
|
|
49089
49094
|
/*******************************************************************************
|
|
49090
49095
|
*
|
|
49091
49096
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -52430,8 +52435,8 @@ const MatrixStack_default_ = MatrixStack;
|
|
|
52430
52435
|
x_ite_Namespace .add ("MatrixStack", "standard/Math/Utility/MatrixStack", MatrixStack_default_);
|
|
52431
52436
|
/* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
|
|
52432
52437
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
|
|
52433
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
52434
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
52438
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(812);
|
|
52439
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(193);
|
|
52435
52440
|
/*******************************************************************************
|
|
52436
52441
|
*
|
|
52437
52442
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -55202,7 +55207,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
55202
55207
|
x_ite_Namespace .add ("SVGParser", "x_ite/Parser/SVGParser", SVGParser_default_);
|
|
55203
55208
|
/* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
|
|
55204
55209
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
|
|
55205
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
55210
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(812);
|
|
55206
55211
|
/*******************************************************************************
|
|
55207
55212
|
*
|
|
55208
55213
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -58018,9 +58023,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
58018
58023
|
for (const light of lights)
|
|
58019
58024
|
light .setGlobalVariables (this);
|
|
58020
58025
|
|
|
58021
|
-
for (const light of globalLights)
|
|
58022
|
-
globalLightsKeys .push (light .lightNode .getLightKey ());
|
|
58023
|
-
|
|
58024
58026
|
this .renderAndGlobalLightsKey = `.${this .renderKey}.${globalLightsKeys .sort () .join ("")}.`;
|
|
58025
58027
|
this .globalShadow = globalShadows .at (-1);
|
|
58026
58028
|
|
|
@@ -59692,8 +59694,13 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59692
59694
|
if (type !== Rendering_TraverseType .DISPLAY)
|
|
59693
59695
|
return;
|
|
59694
59696
|
|
|
59695
|
-
if (this ._headlight .getValue ())
|
|
59696
|
-
|
|
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 ());
|
|
59697
59704
|
},
|
|
59698
59705
|
traverse (type, renderObject)
|
|
59699
59706
|
{
|
|
@@ -60252,6 +60259,213 @@ const VertexArray_default_ = VertexArray;
|
|
|
60252
60259
|
|
|
60253
60260
|
x_ite_Namespace .add ("VertexArray", "x_ite/Rendering/VertexArray", VertexArray_default_);
|
|
60254
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_);
|
|
60255
60469
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Shading.js
|
|
60256
60470
|
/*******************************************************************************
|
|
60257
60471
|
*
|
|
@@ -60377,6 +60591,7 @@ x_ite_Namespace .add ("Shading", "x_ite/Browser/Core/Shading", Shading_default_)
|
|
|
60377
60591
|
|
|
60378
60592
|
|
|
60379
60593
|
|
|
60594
|
+
|
|
60380
60595
|
// Box normals for bbox / line intersection.
|
|
60381
60596
|
const boxNormals = [
|
|
60382
60597
|
new Numbers_Vector3 (0, 0, 1), // front
|
|
@@ -60417,9 +60632,9 @@ function X3DGeometryNode (executionContext)
|
|
|
60417
60632
|
this .texCoords = X3DGeometryNode .createArray ();
|
|
60418
60633
|
this .fogDepths = X3DGeometryNode .createArray ();
|
|
60419
60634
|
this .colors = X3DGeometryNode .createArray ();
|
|
60635
|
+
this .tangents = X3DGeometryNode .createArray ();
|
|
60420
60636
|
this .normals = X3DGeometryNode .createArray ();
|
|
60421
60637
|
this .flatNormals = X3DGeometryNode .createArray ();
|
|
60422
|
-
this .tangents = X3DGeometryNode .createArray ();
|
|
60423
60638
|
this .vertices = X3DGeometryNode .createArray ();
|
|
60424
60639
|
this .hasFogCoords = false;
|
|
60425
60640
|
this .hasNormals = false;
|
|
@@ -60499,8 +60714,8 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60499
60714
|
this .texCoordBuffers = Array .from ({length: browser .getMaxTexCoords ()}, () => gl .createBuffer ());
|
|
60500
60715
|
this .fogDepthBuffer = gl .createBuffer ();
|
|
60501
60716
|
this .colorBuffer = gl .createBuffer ();
|
|
60502
|
-
this .normalBuffer = gl .createBuffer ();
|
|
60503
60717
|
this .tangentBuffer = gl .createBuffer ();
|
|
60718
|
+
this .normalBuffer = gl .createBuffer ();
|
|
60504
60719
|
this .vertexBuffer = gl .createBuffer ();
|
|
60505
60720
|
this .vertexArrayObject = new Rendering_VertexArray (gl);
|
|
60506
60721
|
|
|
@@ -60649,14 +60864,6 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60649
60864
|
|
|
60650
60865
|
this .textureCoordinateNode .getTextureCoordinateMapping (this .textureCoordinateMapping);
|
|
60651
60866
|
},
|
|
60652
|
-
setNormals (value)
|
|
60653
|
-
{
|
|
60654
|
-
this .normals .assign (value);
|
|
60655
|
-
},
|
|
60656
|
-
getNormals ()
|
|
60657
|
-
{
|
|
60658
|
-
return this .normals;
|
|
60659
|
-
},
|
|
60660
60867
|
setTangents (value)
|
|
60661
60868
|
{
|
|
60662
60869
|
this .tangents .assign (value);
|
|
@@ -60665,6 +60872,14 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60665
60872
|
{
|
|
60666
60873
|
return this .tangents;
|
|
60667
60874
|
},
|
|
60875
|
+
setNormals (value)
|
|
60876
|
+
{
|
|
60877
|
+
this .normals .assign (value);
|
|
60878
|
+
},
|
|
60879
|
+
getNormals ()
|
|
60880
|
+
{
|
|
60881
|
+
return this .normals;
|
|
60882
|
+
},
|
|
60668
60883
|
setVertices (value)
|
|
60669
60884
|
{
|
|
60670
60885
|
this .vertices .assign (value);
|
|
@@ -60679,7 +60894,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60679
60894
|
|
|
60680
60895
|
this .updateInstances = true;
|
|
60681
60896
|
},
|
|
60682
|
-
|
|
60897
|
+
generateTexCoords ()
|
|
60683
60898
|
{
|
|
60684
60899
|
const texCoords = this .texCoords;
|
|
60685
60900
|
|
|
@@ -60760,6 +60975,31 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60760
60975
|
return texCoordParams;
|
|
60761
60976
|
};
|
|
60762
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
|
+
},
|
|
60763
61003
|
refineNormals (normalIndex, normals, creaseAngle)
|
|
60764
61004
|
{
|
|
60765
61005
|
if (creaseAngle === 0)
|
|
@@ -61100,7 +61340,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61100
61340
|
{
|
|
61101
61341
|
const point = new Numbers_Vector3 ();
|
|
61102
61342
|
|
|
61103
|
-
return function ()
|
|
61343
|
+
return async function ()
|
|
61104
61344
|
{
|
|
61105
61345
|
this .clear ();
|
|
61106
61346
|
this .build ();
|
|
@@ -61116,8 +61356,8 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61116
61356
|
this .coordIndices .shrinkToFit ();
|
|
61117
61357
|
this .fogDepths .shrinkToFit ();
|
|
61118
61358
|
this .colors .shrinkToFit ();
|
|
61119
|
-
this .normals .shrinkToFit ();
|
|
61120
61359
|
this .tangents .shrinkToFit ();
|
|
61360
|
+
this .normals .shrinkToFit ();
|
|
61121
61361
|
this .vertices .shrinkToFit ();
|
|
61122
61362
|
|
|
61123
61363
|
// Determine bbox.
|
|
@@ -61154,8 +61394,12 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61154
61394
|
|
|
61155
61395
|
// Generate texCoord if needed.
|
|
61156
61396
|
|
|
61157
|
-
if (this .multiTexCoords .length
|
|
61158
|
-
this .
|
|
61397
|
+
if (!this .multiTexCoords .length)
|
|
61398
|
+
this .generateTexCoords ();
|
|
61399
|
+
|
|
61400
|
+
// Generate tangents if needed.
|
|
61401
|
+
if (!this .tangents .length)
|
|
61402
|
+
this .generateTangents ();
|
|
61159
61403
|
|
|
61160
61404
|
// Transfer arrays and update.
|
|
61161
61405
|
|
|
@@ -61195,8 +61439,8 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61195
61439
|
this .colors .length = 0;
|
|
61196
61440
|
this .multiTexCoords .length = 0;
|
|
61197
61441
|
this .texCoords .length = 0;
|
|
61198
|
-
this .normals .length = 0;
|
|
61199
61442
|
this .tangents .length = 0;
|
|
61443
|
+
this .normals .length = 0;
|
|
61200
61444
|
this .flatNormals .length = 0;
|
|
61201
61445
|
this .vertices .length = 0;
|
|
61202
61446
|
},
|
|
@@ -61252,17 +61496,6 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61252
61496
|
gl .bufferData (gl .ARRAY_BUFFER, this .multiTexCoords [i] .getValue (), gl .DYNAMIC_DRAW);
|
|
61253
61497
|
}
|
|
61254
61498
|
|
|
61255
|
-
// Transfer normals or flat normals.
|
|
61256
|
-
|
|
61257
|
-
const lastHasNormals = this .hasNormals;
|
|
61258
|
-
|
|
61259
|
-
this .set_shading__ (this .getBrowser () .getBrowserOptions () ._Shading);
|
|
61260
|
-
|
|
61261
|
-
this .hasNormals = !! this .normals .length;
|
|
61262
|
-
|
|
61263
|
-
if (this .hasNormals !== lastHasNormals)
|
|
61264
|
-
this .updateVertexArrays ();
|
|
61265
|
-
|
|
61266
61499
|
// Transfer tangents.
|
|
61267
61500
|
|
|
61268
61501
|
const lastHasTangents = this .hasTangents;
|
|
@@ -61275,6 +61508,17 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61275
61508
|
if (this .hasTangents !== lastHasTangents)
|
|
61276
61509
|
this .updateVertexArrays ();
|
|
61277
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
|
+
|
|
61278
61522
|
// Transfer vertices.
|
|
61279
61523
|
|
|
61280
61524
|
gl .bindBuffer (gl .ARRAY_BUFFER, this .vertexBuffer);
|
|
@@ -62423,6 +62667,7 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62423
62667
|
gl .uniform3f (shaderNode .x3d_EmissiveColor, 1, 1, 1)
|
|
62424
62668
|
gl .uniform1f (shaderNode .x3d_Transparency, transparency)
|
|
62425
62669
|
gl .uniform1i (shaderNode .x3d_TextureCoordinateGeneratorMode [0], 0);
|
|
62670
|
+
gl .uniform1f (shaderNode .x3d_Exposure, 1);
|
|
62426
62671
|
|
|
62427
62672
|
// Enable vertex attribute arrays.
|
|
62428
62673
|
|
|
@@ -62440,6 +62685,8 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62440
62685
|
gl .disable (gl .BLEND);
|
|
62441
62686
|
|
|
62442
62687
|
gl .drawArrays (gl .TRIANGLES, 0, this .sphereCount);
|
|
62688
|
+
|
|
62689
|
+
gl .uniform1f (shaderNode .x3d_Exposure, browser .getBrowserOption ("Exposure"));
|
|
62443
62690
|
},
|
|
62444
62691
|
drawCube: (() =>
|
|
62445
62692
|
{
|
|
@@ -62476,8 +62723,11 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62476
62723
|
gl .uniform3f (shaderNode .x3d_EmissiveColor, 1, 1, 1);
|
|
62477
62724
|
gl .uniform1f (shaderNode .x3d_Transparency, 0);
|
|
62478
62725
|
gl .uniform1i (shaderNode .x3d_TextureCoordinateGeneratorMode [0], 0);
|
|
62726
|
+
gl .uniform1f (shaderNode .x3d_Exposure, 1);
|
|
62479
62727
|
|
|
62480
62728
|
this .drawRectangle (gl, browser, shaderNode, renderObject, textureNode, this .textureBuffers [i], this .textureArrayObjects [i]);
|
|
62729
|
+
|
|
62730
|
+
gl .uniform1f (shaderNode .x3d_Exposure, browser .getBrowserOption ("Exposure"));
|
|
62481
62731
|
}
|
|
62482
62732
|
};
|
|
62483
62733
|
})(),
|
|
@@ -62820,7 +63070,7 @@ Object .assign (Object .setPrototypeOf (X3DSingleTextureNode .prototype, Texturi
|
|
|
62820
63070
|
if (value !== this ._linear .getValue ())
|
|
62821
63071
|
this ._linear = value;
|
|
62822
63072
|
},
|
|
62823
|
-
|
|
63073
|
+
canMipMaps ()
|
|
62824
63074
|
{
|
|
62825
63075
|
return this .mipMaps;
|
|
62826
63076
|
},
|
|
@@ -62872,7 +63122,7 @@ Object .assign (Object .setPrototypeOf (X3DSingleTextureNode .prototype, Texturi
|
|
|
62872
63122
|
gl .texParameteri (target, gl .TEXTURE_MIN_FILTER, gl .NEAREST);
|
|
62873
63123
|
gl .texParameteri (target, gl .TEXTURE_MAG_FILTER, gl .NEAREST);
|
|
62874
63124
|
}
|
|
62875
|
-
else if (this .
|
|
63125
|
+
else if (this .canMipMaps () && textureProperties ._generateMipMaps .getValue ())
|
|
62876
63126
|
{
|
|
62877
63127
|
// Can MipMaps and wants MipMaps.
|
|
62878
63128
|
gl .generateMipmap (target);
|
|
@@ -63170,7 +63420,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
63170
63420
|
x_ite_Namespace .add ("X3DTexture2DNode", "x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
|
|
63171
63421
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
|
|
63172
63422
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
63173
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
63423
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(812);
|
|
63174
63424
|
/*******************************************************************************
|
|
63175
63425
|
*
|
|
63176
63426
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -63829,8 +64079,14 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63829
64079
|
},
|
|
63830
64080
|
getUserViewpoints ()
|
|
63831
64081
|
{
|
|
63832
|
-
|
|
63833
|
-
|
|
64082
|
+
const
|
|
64083
|
+
browser = this .getBrowser (),
|
|
64084
|
+
enableInlineViewpoints = browser .getBrowserOption ("EnableInlineViewpoints"),
|
|
64085
|
+
currentScene = browser .currentScene;
|
|
64086
|
+
|
|
64087
|
+
return Array .from (new Set (this .viewpoints .get ()
|
|
64088
|
+
.filter (viewpointNode => viewpointNode ._description .length)
|
|
64089
|
+
.filter (viewpointNode => enableInlineViewpoints || viewpointNode .getScene () === currentScene)));
|
|
63834
64090
|
},
|
|
63835
64091
|
getBackgroundStack ()
|
|
63836
64092
|
{
|
|
@@ -66754,7 +67010,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
66754
67010
|
x_ite_Namespace .add ("X3DWorld", "x_ite/Execution/X3DWorld", X3DWorld_default_);
|
|
66755
67011
|
/* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
|
|
66756
67012
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
|
|
66757
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
67013
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(812);
|
|
66758
67014
|
/*******************************************************************************
|
|
66759
67015
|
*
|
|
66760
67016
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -67688,7 +67944,7 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
|
|
|
67688
67944
|
x_ite_Namespace .add ("ProtoDeclarationArray", "x_ite/Prototype/ProtoDeclarationArray", ProtoDeclarationArray_default_);
|
|
67689
67945
|
/* harmony default export */ const Prototype_ProtoDeclarationArray = (ProtoDeclarationArray_default_);
|
|
67690
67946
|
;// CONCATENATED MODULE: ./src/x_ite/Routing/X3DRoute.js
|
|
67691
|
-
/* provided dependency */ var X3DRoute_$ = __webpack_require__(
|
|
67947
|
+
/* provided dependency */ var X3DRoute_$ = __webpack_require__(812);
|
|
67692
67948
|
/*******************************************************************************
|
|
67693
67949
|
*
|
|
67694
67950
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -74797,6 +75053,7 @@ Object .assign (Object .setPrototypeOf (Box .prototype, Rendering_X3DGeometryNod
|
|
|
74797
75053
|
size = this ._size .getValue ();
|
|
74798
75054
|
|
|
74799
75055
|
this .setMultiTexCoords (geometry .getMultiTexCoords ());
|
|
75056
|
+
this .setTangents (geometry .getTangents ());
|
|
74800
75057
|
this .setNormals (geometry .getNormals ());
|
|
74801
75058
|
|
|
74802
75059
|
if (size .equals (defaultSize))
|
|
@@ -75166,6 +75423,7 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75166
75423
|
height1_2 = Math .abs (this ._height .getValue ()) / 2,
|
|
75167
75424
|
radius = Math .abs (this ._radius .getValue ()),
|
|
75168
75425
|
texCoordArray = this .getTexCoords (),
|
|
75426
|
+
tangentArray = this .getTangents (),
|
|
75169
75427
|
normalArray = this .getNormals (),
|
|
75170
75428
|
vertexArray = this .getVertices ();
|
|
75171
75429
|
|
|
@@ -75180,6 +75438,9 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75180
75438
|
for (const t of geometry .getMultiTexCoords () [0])
|
|
75181
75439
|
texCoordArray .push (t);
|
|
75182
75440
|
|
|
75441
|
+
for (const t of geometry .getTangents ())
|
|
75442
|
+
tangentArray .push (t);
|
|
75443
|
+
|
|
75183
75444
|
for (const n of geometry .getNormals ())
|
|
75184
75445
|
normalArray .push (n);
|
|
75185
75446
|
|
|
@@ -75201,6 +75462,9 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75201
75462
|
for (const t of geometry .getMultiTexCoords () [0])
|
|
75202
75463
|
texCoordArray .push (t);
|
|
75203
75464
|
|
|
75465
|
+
for (const t of geometry .getTangents ())
|
|
75466
|
+
tangentArray .push (t);
|
|
75467
|
+
|
|
75204
75468
|
for (const n of geometry .getNormals ())
|
|
75205
75469
|
normalArray .push (n);
|
|
75206
75470
|
|
|
@@ -75222,6 +75486,9 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75222
75486
|
for (const t of geometry .getMultiTexCoords () [0])
|
|
75223
75487
|
texCoordArray .push (t);
|
|
75224
75488
|
|
|
75489
|
+
for (const t of geometry .getTangents ())
|
|
75490
|
+
tangentArray .push (t);
|
|
75491
|
+
|
|
75225
75492
|
for (const n of geometry .getNormals ())
|
|
75226
75493
|
normalArray .push (n);
|
|
75227
75494
|
|
|
@@ -75737,8 +76004,8 @@ Object .defineProperties (ElevationGrid,
|
|
|
75737
76004
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
75738
76005
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
75739
76006
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
75740
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
75741
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 ()),
|
|
75742
76009
|
new Base_X3DFieldDefinition (Base_X3DConstants .initializeOnly, "height", new x_ite_Fields .MFFloat ()),
|
|
75743
76010
|
]),
|
|
75744
76011
|
enumerable: true,
|
|
@@ -76745,12 +77012,12 @@ Object .assign (Object .setPrototypeOf (X3DComposedGeometryNode .prototype, Rend
|
|
|
76745
77012
|
// Autogenerate normal if not specified.
|
|
76746
77013
|
|
|
76747
77014
|
if (!this .getNormal ())
|
|
76748
|
-
this .
|
|
77015
|
+
this .generateNormals (verticesPerPolygon, polygonsSize, trianglesSize);
|
|
76749
77016
|
|
|
76750
77017
|
this .setSolid (this ._solid .getValue ());
|
|
76751
77018
|
this .setCCW (this ._ccw .getValue ());
|
|
76752
77019
|
},
|
|
76753
|
-
|
|
77020
|
+
generateNormals (verticesPerPolygon, polygonsSize, trianglesSize)
|
|
76754
77021
|
{
|
|
76755
77022
|
const
|
|
76756
77023
|
normals = this .createNormals (verticesPerPolygon, polygonsSize),
|
|
@@ -77032,7 +77299,7 @@ Object .assign (Object .setPrototypeOf (IndexedFaceSet .prototype, Rendering_X3D
|
|
|
77032
77299
|
// Autogenerate normals if not specified.
|
|
77033
77300
|
|
|
77034
77301
|
if (!this .getNormal ())
|
|
77035
|
-
this .
|
|
77302
|
+
this .generateNormals (polygons);
|
|
77036
77303
|
|
|
77037
77304
|
this .setSolid (this ._solid .getValue ());
|
|
77038
77305
|
this .setCCW (this ._ccw .getValue ());
|
|
@@ -77152,7 +77419,7 @@ Object .assign (Object .setPrototypeOf (IndexedFaceSet .prototype, Rendering_X3D
|
|
|
77152
77419
|
Geometry_Triangle3 .triangulatePolygon (polygon, triangles);
|
|
77153
77420
|
};
|
|
77154
77421
|
})(),
|
|
77155
|
-
|
|
77422
|
+
generateNormals (polygons)
|
|
77156
77423
|
{
|
|
77157
77424
|
const
|
|
77158
77425
|
normals = this .createNormals (polygons),
|
|
@@ -77305,8 +77572,8 @@ Object .defineProperties (IndexedFaceSet,
|
|
|
77305
77572
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
77306
77573
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
77307
77574
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
77308
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
77309
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 ()),
|
|
77310
77577
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
77311
77578
|
]),
|
|
77312
77579
|
enumerable: true,
|
|
@@ -77402,6 +77669,7 @@ Object .assign (Object .setPrototypeOf (Sphere .prototype, Rendering_X3DGeometry
|
|
|
77402
77669
|
radius = Math .abs (this ._radius .getValue ());
|
|
77403
77670
|
|
|
77404
77671
|
this .setMultiTexCoords (geometry .getMultiTexCoords ());
|
|
77672
|
+
this .setTangents (geometry .getTangents ());
|
|
77405
77673
|
this .setNormals (geometry .getNormals ());
|
|
77406
77674
|
|
|
77407
77675
|
if (radius === 1)
|
|
@@ -81014,6 +81282,7 @@ Object .assign (Object .setPrototypeOf (X3DLightNode .prototype, Core_X3DChildNo
|
|
|
81014
81282
|
renderObject .getLights () .push (lightContainer);
|
|
81015
81283
|
|
|
81016
81284
|
renderObject .pushGlobalShadows (!! this .getShadowIntensity ());
|
|
81285
|
+
renderObject .getGlobalLightsKeys () .push (this .getLightKey ());
|
|
81017
81286
|
}
|
|
81018
81287
|
else
|
|
81019
81288
|
{
|
|
@@ -81040,6 +81309,7 @@ Object .assign (Object .setPrototypeOf (X3DLightNode .prototype, Core_X3DChildNo
|
|
|
81040
81309
|
renderObject .getLights () .push (lightContainer);
|
|
81041
81310
|
|
|
81042
81311
|
renderObject .pushGlobalShadows (!! this .getShadowIntensity ());
|
|
81312
|
+
renderObject .getGlobalLightsKeys () .push (this .getLightKey ());
|
|
81043
81313
|
}
|
|
81044
81314
|
else
|
|
81045
81315
|
{
|
|
@@ -81495,17 +81765,13 @@ Object .assign (EnvironmentLightContainer .prototype,
|
|
|
81495
81765
|
? this .GGXLUTTextureUnit = this .GGXLUTTextureUnit ?? browser .popTexture2DUnit ()
|
|
81496
81766
|
: browser .getTexture2DUnit ();
|
|
81497
81767
|
|
|
81498
|
-
// https://stackoverflow.com/a/25640078/1818915
|
|
81499
|
-
// The system will automatically clamp the specified parameter appropriately.
|
|
81500
|
-
// In GLSL 4 there is a textureQueryLevels function.
|
|
81501
|
-
const specularTextureLevels = 1 + Math .floor (Math .log2 (specularTexture ?.getSize () ?? 1));
|
|
81502
|
-
|
|
81503
81768
|
gl .uniform3f (shaderObject .x3d_EnvironmentLightColor, color .r, color .g, color .b);
|
|
81504
81769
|
gl .uniform1f (shaderObject .x3d_EnvironmentLightIntensity, lightNode .getIntensity ());
|
|
81505
81770
|
gl .uniformMatrix3fv (shaderObject .x3d_EnvironmentLightRotation, false, this .rotationMatrix);
|
|
81506
81771
|
gl .uniform1i (shaderObject .x3d_EnvironmentLightDiffuseTextureLinear, diffuseTexture ?.isLinear ());
|
|
81772
|
+
gl .uniform1i (shaderObject .x3d_EnvironmentLightDiffuseTextureLevels, diffuseTexture ?.getLevels () ?? 0);
|
|
81507
81773
|
gl .uniform1i (shaderObject .x3d_EnvironmentLightSpecularTextureLinear, specularTexture ?.isLinear ());
|
|
81508
|
-
gl .uniform1i (shaderObject .x3d_EnvironmentLightSpecularTextureLevels,
|
|
81774
|
+
gl .uniform1i (shaderObject .x3d_EnvironmentLightSpecularTextureLevels, specularTexture ?.getLevels () ?? 0);
|
|
81509
81775
|
|
|
81510
81776
|
gl .activeTexture (gl .TEXTURE0 + diffuseTextureUnit);
|
|
81511
81777
|
gl .bindTexture (gl .TEXTURE_CUBE_MAP, diffuseTexture ?.getTexture () ?? browser .getDefaultTextureCube ());
|
|
@@ -87899,7 +88165,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87899
88165
|
|
|
87900
88166
|
this .thickLinesVertexArrayObject .update ();
|
|
87901
88167
|
},
|
|
87902
|
-
|
|
88168
|
+
generateTexCoords ()
|
|
87903
88169
|
{
|
|
87904
88170
|
// Line stipple support.
|
|
87905
88171
|
|
|
@@ -88833,8 +89099,8 @@ Object .defineProperties (IndexedLineSet,
|
|
|
88833
89099
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "attrib", new x_ite_Fields .MFNode ()),
|
|
88834
89100
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
88835
89101
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
88836
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
88837
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 ()),
|
|
88838
89104
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
88839
89105
|
]),
|
|
88840
89106
|
enumerable: true,
|
|
@@ -89012,8 +89278,8 @@ Object .defineProperties (IndexedTriangleFanSet,
|
|
|
89012
89278
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89013
89279
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89014
89280
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
89015
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89016
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 ()),
|
|
89017
89283
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89018
89284
|
]),
|
|
89019
89285
|
enumerable: true,
|
|
@@ -89148,8 +89414,8 @@ Object .defineProperties (IndexedTriangleSet,
|
|
|
89148
89414
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89149
89415
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89150
89416
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
89151
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89152
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 ()),
|
|
89153
89419
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89154
89420
|
]),
|
|
89155
89421
|
enumerable: true,
|
|
@@ -89335,8 +89601,8 @@ Object .defineProperties (IndexedTriangleStripSet,
|
|
|
89335
89601
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89336
89602
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89337
89603
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
89338
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89339
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 ()),
|
|
89340
89606
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89341
89607
|
]),
|
|
89342
89608
|
enumerable: true,
|
|
@@ -89594,8 +89860,8 @@ Object .defineProperties (LineSet,
|
|
|
89594
89860
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "attrib", new x_ite_Fields .MFNode ()),
|
|
89595
89861
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89596
89862
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89597
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89598
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 ()),
|
|
89599
89865
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89600
89866
|
]),
|
|
89601
89867
|
enumerable: true,
|
|
@@ -89911,7 +90177,7 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
89911
90177
|
{
|
|
89912
90178
|
return false;
|
|
89913
90179
|
},
|
|
89914
|
-
|
|
90180
|
+
generateTexCoords ()
|
|
89915
90181
|
{ },
|
|
89916
90182
|
display (gl, renderContext)
|
|
89917
90183
|
{
|
|
@@ -90275,8 +90541,8 @@ Object .defineProperties (PointSet,
|
|
|
90275
90541
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "attrib", new x_ite_Fields .MFNode ()),
|
|
90276
90542
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90277
90543
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90278
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90279
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 ()),
|
|
90280
90546
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90281
90547
|
]),
|
|
90282
90548
|
enumerable: true,
|
|
@@ -90593,8 +90859,8 @@ Object .defineProperties (TriangleFanSet,
|
|
|
90593
90859
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90594
90860
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90595
90861
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
90596
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90597
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 ()),
|
|
90598
90864
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90599
90865
|
]),
|
|
90600
90866
|
enumerable: true,
|
|
@@ -90724,8 +90990,8 @@ Object .defineProperties (TriangleSet,
|
|
|
90724
90990
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90725
90991
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90726
90992
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
90727
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90728
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 ()),
|
|
90729
90995
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90730
90996
|
]),
|
|
90731
90997
|
enumerable: true,
|
|
@@ -90889,8 +91155,8 @@ Object .defineProperties (TriangleStripSet,
|
|
|
90889
91155
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90890
91156
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90891
91157
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
90892
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90893
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 ()),
|
|
90894
91160
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90895
91161
|
]),
|
|
90896
91162
|
enumerable: true,
|
|
@@ -91130,18 +91396,21 @@ const MaterialTextures_default_ = {
|
|
|
91130
91396
|
"x3d_SpecularGlossinessTexture",
|
|
91131
91397
|
"x3d_OcclusionTexture",
|
|
91132
91398
|
"x3d_NormalTexture",
|
|
91399
|
+
|
|
91133
91400
|
"x3d_AnisotropyTextureEXT",
|
|
91134
|
-
"x3d_ClearcoatTextureEXT",
|
|
91135
|
-
"x3d_ClearcoatRoughnessTextureEXT",
|
|
91136
91401
|
"x3d_ClearcoatNormalTextureEXT",
|
|
91402
|
+
"x3d_ClearcoatRoughnessTextureEXT",
|
|
91403
|
+
"x3d_ClearcoatTextureEXT",
|
|
91404
|
+
"x3d_DiffuseTransmissionColorTextureEXT",
|
|
91405
|
+
"x3d_DiffuseTransmissionTextureEXT",
|
|
91137
91406
|
"x3d_IridescenceTextureEXT",
|
|
91138
91407
|
"x3d_IridescenceThicknessTextureEXT",
|
|
91139
91408
|
"x3d_SheenColorTextureEXT",
|
|
91140
91409
|
"x3d_SheenRoughnessTextureEXT",
|
|
91141
|
-
"x3d_SpecularTextureEXT",
|
|
91142
91410
|
"x3d_SpecularColorTextureEXT",
|
|
91143
|
-
"
|
|
91411
|
+
"x3d_SpecularTextureEXT",
|
|
91144
91412
|
"x3d_ThicknessTextureEXT",
|
|
91413
|
+
"x3d_TransmissionTextureEXT",
|
|
91145
91414
|
],
|
|
91146
91415
|
texture (name, components = "rgba", colorSpace = "")
|
|
91147
91416
|
{
|
|
@@ -91238,7 +91507,7 @@ mediump samplerCube textureCube;
|
|
|
91238
91507
|
x_ite_Namespace .add ("MaterialTextures", "assets/shaders/MaterialTextures", MaterialTextures_default_);
|
|
91239
91508
|
/* harmony default export */ const MaterialTextures = (MaterialTextures_default_);
|
|
91240
91509
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
|
|
91241
|
-
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(
|
|
91510
|
+
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(812);
|
|
91242
91511
|
/*******************************************************************************
|
|
91243
91512
|
*
|
|
91244
91513
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -91434,6 +91703,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91434
91703
|
this .x3d_EnvironmentLightRotation = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.rotation");
|
|
91435
91704
|
this .x3d_EnvironmentLightDiffuseTexture = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.diffuseTexture");
|
|
91436
91705
|
this .x3d_EnvironmentLightDiffuseTextureLinear = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.diffuseTextureLinear");
|
|
91706
|
+
this .x3d_EnvironmentLightDiffuseTextureLevels = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.diffuseTextureLevels");
|
|
91437
91707
|
this .x3d_EnvironmentLightSpecularTexture = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.specularTexture");
|
|
91438
91708
|
this .x3d_EnvironmentLightSpecularTextureLinear = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.specularTextureLinear");
|
|
91439
91709
|
this .x3d_EnvironmentLightSpecularTextureLevels = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.specularTextureLevels");
|
|
@@ -91474,26 +91744,28 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91474
91744
|
"x3d_MultiTextureColor",
|
|
91475
91745
|
// Extensions
|
|
91476
91746
|
"x3d_AnisotropyEXT",
|
|
91747
|
+
"x3d_AttenuationColorEXT",
|
|
91748
|
+
"x3d_AttenuationDistanceEXT",
|
|
91477
91749
|
"x3d_ClearcoatEXT",
|
|
91478
91750
|
"x3d_ClearcoatRoughnessEXT",
|
|
91751
|
+
"x3d_DiffuseTransmissionColorEXT",
|
|
91752
|
+
"x3d_DiffuseTransmissionEXT",
|
|
91479
91753
|
"x3d_DispersionEXT",
|
|
91480
91754
|
"x3d_EmissiveStrengthEXT",
|
|
91481
91755
|
"x3d_IorEXT",
|
|
91482
91756
|
"x3d_IridescenceEXT",
|
|
91483
91757
|
"x3d_IridescenceIndexOfRefractionEXT",
|
|
91484
|
-
"x3d_IridescenceThicknessMinimumEXT",
|
|
91485
91758
|
"x3d_IridescenceThicknessMaximumEXT",
|
|
91759
|
+
"x3d_IridescenceThicknessMinimumEXT",
|
|
91486
91760
|
"x3d_SheenColorEXT",
|
|
91487
|
-
"x3d_SheenRoughnessEXT",
|
|
91488
91761
|
"x3d_SheenELUTTextureEXT",
|
|
91489
|
-
"
|
|
91762
|
+
"x3d_SheenRoughnessEXT",
|
|
91490
91763
|
"x3d_SpecularColorEXT",
|
|
91764
|
+
"x3d_SpecularEXT",
|
|
91765
|
+
"x3d_ThicknessEXT",
|
|
91491
91766
|
"x3d_TransmissionEXT",
|
|
91492
91767
|
"x3d_TransmissionFramebufferSamplerEXT",
|
|
91493
91768
|
"x3d_TransmissionFramebufferSizeEXT",
|
|
91494
|
-
"x3d_ThicknessEXT",
|
|
91495
|
-
"x3d_AttenuationDistanceEXT",
|
|
91496
|
-
"x3d_AttenuationColorEXT",
|
|
91497
91769
|
];
|
|
91498
91770
|
|
|
91499
91771
|
for (const name of commonUniforms)
|
|
@@ -93715,71 +93987,6 @@ const ProgramShader_default_ = ProgramShader;
|
|
|
93715
93987
|
|
|
93716
93988
|
x_ite_Namespace .add ("ProgramShader", "x_ite/Components/Shaders/ProgramShader", ProgramShader_default_);
|
|
93717
93989
|
/* harmony default export */ const Shaders_ProgramShader = (ProgramShader_default_);
|
|
93718
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/Types.glsl.js
|
|
93719
|
-
|
|
93720
|
-
|
|
93721
|
-
const Types_glsl_default_ = /* glsl */ `
|
|
93722
|
-
#if defined(X3D_FOG)
|
|
93723
|
-
struct x3d_FogParameters{mediump int type;mediump vec3 color;mediump float visibilityRange;mediump mat3 matrix;};
|
|
93724
|
-
#endif
|
|
93725
|
-
#if defined(X3D_LIGHTING)
|
|
93726
|
-
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;
|
|
93727
|
-
#if defined(X3D_SHADOWS)
|
|
93728
|
-
mediump vec3 shadowColor;mediump float shadowIntensity;mediump float shadowBias;mediump mat4 shadowMatrix;mediump int shadowMapSize;
|
|
93729
|
-
#endif
|
|
93730
|
-
};
|
|
93731
|
-
#endif
|
|
93732
|
-
#if defined(X3D_USE_IBL)
|
|
93733
|
-
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;
|
|
93734
|
-
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
93735
|
-
mediump sampler2D CharlieLUTTexture;
|
|
93736
|
-
#endif
|
|
93737
|
-
};
|
|
93738
|
-
#endif
|
|
93739
|
-
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93740
|
-
struct x3d_PointPropertiesParameters{mediump float pointSizeScaleFactor;mediump float pointSizeMinValue;mediump float pointSizeMaxValue;mediump vec3 attenuation;};
|
|
93741
|
-
#endif
|
|
93742
|
-
#if defined(X3D_GEOMETRY_1D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93743
|
-
struct x3d_LinePropertiesParameters{mediump int linetype;mediump float lineStippleScale;
|
|
93744
|
-
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
93745
|
-
sampler2D texture;
|
|
93746
|
-
#endif
|
|
93747
|
-
};
|
|
93748
|
-
#endif
|
|
93749
|
-
#if(defined(X3D_GEOMETRY_2D)||defined(X3D_GEOMETRY_3D))&&defined(X3D_STYLE_PROPERTIES)
|
|
93750
|
-
struct x3d_FillPropertiesParameters{bool filled;bool hatched;mediump vec3 hatchColor;
|
|
93751
|
-
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
93752
|
-
sampler2D texture;
|
|
93753
|
-
#endif
|
|
93754
|
-
mediump float scale;};
|
|
93755
|
-
#endif
|
|
93756
|
-
#if defined(X3D_UNLIT_MATERIAL)
|
|
93757
|
-
struct x3d_UnlitMaterialParameters{mediump vec3 emissiveColor;mediump float normalScale;mediump float transparency;};
|
|
93758
|
-
#endif
|
|
93759
|
-
#if defined(X3D_MATERIAL)
|
|
93760
|
-
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;};
|
|
93761
|
-
#endif
|
|
93762
|
-
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
93763
|
-
struct x3d_PhysicalMaterialParameters{
|
|
93764
|
-
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
93765
|
-
mediump vec3 diffuseColor;mediump vec3 specularColor;mediump float glossiness;
|
|
93766
|
-
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93767
|
-
mediump vec3 baseColor;mediump float metallic;mediump float roughness;
|
|
93768
|
-
#endif
|
|
93769
|
-
mediump vec3 emissiveColor;mediump float occlusionStrength;mediump float normalScale;mediump float transparency;};
|
|
93770
|
-
#endif
|
|
93771
|
-
${MaterialTextures .structs ()}
|
|
93772
|
-
#if defined(X3D_MULTI_TEXTURING)
|
|
93773
|
-
struct x3d_MultiTextureParameters{mediump int mode;mediump int alphaMode;mediump int source;mediump int function;};
|
|
93774
|
-
#endif
|
|
93775
|
-
#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES)
|
|
93776
|
-
struct x3d_TextureCoordinateGeneratorParameters{mediump int mode;mediump float parameter[6];};
|
|
93777
|
-
#endif
|
|
93778
|
-
`
|
|
93779
|
-
;
|
|
93780
|
-
|
|
93781
|
-
x_ite_Namespace .add ("Types.glsl", "assets/shaders/Types.glsl", Types_glsl_default_);
|
|
93782
|
-
/* harmony default export */ const Types_glsl = (Types_glsl_default_);
|
|
93783
93990
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/ModeType.js
|
|
93784
93991
|
/*******************************************************************************
|
|
93785
93992
|
*
|
|
@@ -94055,6 +94262,150 @@ const TextureCoordinateGeneratorModeType_default_ = TextureCoordinateGeneratorMo
|
|
|
94055
94262
|
|
|
94056
94263
|
x_ite_Namespace .add ("TextureCoordinateGeneratorModeType", "x_ite/Browser/Texturing/TextureCoordinateGeneratorModeType", TextureCoordinateGeneratorModeType_default_);
|
|
94057
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_);
|
|
94058
94409
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Shaders/ShaderSource.js
|
|
94059
94410
|
/*******************************************************************************
|
|
94060
94411
|
*
|
|
@@ -94105,33 +94456,29 @@ x_ite_Namespace .add ("TextureCoordinateGeneratorModeType", "x_ite/Browser/Textu
|
|
|
94105
94456
|
|
|
94106
94457
|
|
|
94107
94458
|
|
|
94108
|
-
|
|
94109
|
-
|
|
94110
|
-
|
|
94111
|
-
|
|
94112
94459
|
const ShaderSource =
|
|
94113
94460
|
{
|
|
94114
94461
|
getSource (gl, browser, source, options)
|
|
94115
94462
|
{
|
|
94116
|
-
|
|
94117
|
-
|
|
94118
|
-
|
|
94119
|
-
|
|
94120
|
-
|
|
94121
|
-
|
|
94122
|
-
|
|
94123
|
-
|
|
94124
|
-
|
|
94125
|
-
|
|
94126
|
-
|
|
94127
|
-
|
|
94128
|
-
|
|
94129
|
-
|
|
94130
|
-
|
|
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";
|
|
94131
94478
|
|
|
94132
|
-
|
|
94133
|
-
|
|
94134
|
-
|
|
94479
|
+
const
|
|
94480
|
+
GLSL = new RegExp (`^((?:${COMMENTS}|${PREPROCESSOR})*(?:${VERSION})?(?:${COMMENTS}|${PREPROCESSOR}|${EXTENSION})*)`, "s"),
|
|
94481
|
+
match = source .match (GLSL);
|
|
94135
94482
|
|
|
94136
94483
|
// const
|
|
94137
94484
|
// COMMENTS = "\\s+|/\\*.*?\\*/|//.*?\\n",
|
|
@@ -94147,90 +94494,10 @@ const ShaderSource =
|
|
|
94147
94494
|
|
|
94148
94495
|
// Constants
|
|
94149
94496
|
|
|
94150
|
-
|
|
94151
|
-
|
|
94152
|
-
|
|
94153
|
-
|
|
94154
|
-
if (gl .HAS_FEATURE_DEPTH_TEXTURE)
|
|
94155
|
-
constants += "#define X3D_DEPTH_TEXTURE\n";
|
|
94156
|
-
|
|
94157
|
-
for (const option of options)
|
|
94158
|
-
constants += "#define " + option + "\n";
|
|
94159
|
-
|
|
94160
|
-
// Definitions
|
|
94161
|
-
|
|
94162
|
-
let definitions = "";
|
|
94163
|
-
|
|
94164
|
-
definitions += "#define x3d_None 0\n";
|
|
94165
|
-
|
|
94166
|
-
definitions += "#define x3d_Points 0\n";
|
|
94167
|
-
definitions += "#define x3d_Lines 1\n";
|
|
94168
|
-
definitions += "#define x3d_Geometry2D 2\n";
|
|
94169
|
-
definitions += "#define x3d_Geometry3D 3\n";
|
|
94170
|
-
|
|
94171
|
-
definitions += "#define x3d_MaxClipPlanes " + browser .getMaxClipPlanes () + "\n";
|
|
94172
|
-
|
|
94173
|
-
definitions += "#define x3d_LinearFog 1\n";
|
|
94174
|
-
definitions += "#define x3d_ExponentialFog 2\n";
|
|
94175
|
-
definitions += "#define x3d_Exponential2Fog 3\n";
|
|
94176
|
-
|
|
94177
|
-
definitions += "#define x3d_MaxLights " + browser .getMaxLights () + "\n";
|
|
94178
|
-
definitions += "#define x3d_DirectionalLight 1\n";
|
|
94179
|
-
definitions += "#define x3d_PointLight 2\n";
|
|
94180
|
-
definitions += "#define x3d_SpotLight 3\n";
|
|
94181
|
-
|
|
94182
|
-
definitions += "#define x3d_MaxTextures " + browser .getMaxTextures () + "\n";
|
|
94183
|
-
definitions += "#define x3d_TextureType2D 2\n";
|
|
94184
|
-
definitions += "#define x3d_TextureType3D 3\n";
|
|
94185
|
-
definitions += "#define x3d_TextureTypeCube 4\n";
|
|
94186
|
-
|
|
94187
|
-
definitions += "#define x3d_Replace " + Texturing_ModeType .REPLACE + "\n";
|
|
94188
|
-
definitions += "#define x3d_Modulate " + Texturing_ModeType .MODULATE + "\n";
|
|
94189
|
-
definitions += "#define x3d_Modulate2X " + Texturing_ModeType .MODULATE2X + "\n";
|
|
94190
|
-
definitions += "#define x3d_Modulate4X " + Texturing_ModeType .MODULATE4X + "\n";
|
|
94191
|
-
definitions += "#define x3d_Add " + Texturing_ModeType .ADD + "\n";
|
|
94192
|
-
definitions += "#define x3d_AddSigned " + Texturing_ModeType .ADDSIGNED + "\n";
|
|
94193
|
-
definitions += "#define x3d_AddSigned2X " + Texturing_ModeType .ADDSIGNED2X + "\n";
|
|
94194
|
-
definitions += "#define x3d_AddSmooth " + Texturing_ModeType .ADDSMOOTH + "\n";
|
|
94195
|
-
definitions += "#define x3d_Subtract " + Texturing_ModeType .SUBTRACT + "\n";
|
|
94196
|
-
definitions += "#define x3d_BlendDiffuseAlpha " + Texturing_ModeType .BLENDDIFFUSEALPHA + "\n";
|
|
94197
|
-
definitions += "#define x3d_BlendTextureAlpha " + Texturing_ModeType .BLENDTEXTUREALPHA + "\n";
|
|
94198
|
-
definitions += "#define x3d_BlendFactorAlpha " + Texturing_ModeType .BLENDFACTORALPHA + "\n";
|
|
94199
|
-
definitions += "#define x3d_BlendCurrentAlpha " + Texturing_ModeType .BLENDCURRENTALPHA + "\n";
|
|
94200
|
-
definitions += "#define x3d_ModulateAlphaAddColor " + Texturing_ModeType .MODULATEALPHA_ADDCOLOR + "\n";
|
|
94201
|
-
definitions += "#define x3d_ModulateInvAlphaAddColor " + Texturing_ModeType .MODULATEINVALPHA_ADDCOLOR + "\n";
|
|
94202
|
-
definitions += "#define x3d_ModulateInvColorAddAlpha " + Texturing_ModeType .MODULATEINVCOLOR_ADDALPHA + "\n";
|
|
94203
|
-
definitions += "#define x3d_DotProduct3 " + Texturing_ModeType .DOTPRODUCT3 + "\n";
|
|
94204
|
-
definitions += "#define x3d_SelectArg1 " + Texturing_ModeType .SELECTARG1 + "\n";
|
|
94205
|
-
definitions += "#define x3d_SelectArg2 " + Texturing_ModeType .SELECTARG2 + "\n";
|
|
94206
|
-
definitions += "#define x3d_Off " + Texturing_ModeType .OFF + "\n";
|
|
94207
|
-
|
|
94208
|
-
definitions += "#define x3d_Diffuse " + Texturing_SourceType .DIFFUSE + "\n";
|
|
94209
|
-
definitions += "#define x3d_Specular " + Texturing_SourceType .SPECULAR + "\n";
|
|
94210
|
-
definitions += "#define x3d_Factor " + Texturing_SourceType .FACTOR + "\n";
|
|
94211
|
-
|
|
94212
|
-
definitions += "#define x3d_Complement " + Texturing_FunctionType .COMPLEMENT + "\n";
|
|
94213
|
-
definitions += "#define x3d_AlphaReplicate " + Texturing_FunctionType .ALPHAREPLICATE + "\n";
|
|
94214
|
-
|
|
94215
|
-
definitions += "#define x3d_Sphere " + TextureCoordinateGeneratorModeType .SPHERE + "\n";
|
|
94216
|
-
definitions += "#define x3d_CameraSpaceNormal " + TextureCoordinateGeneratorModeType .CAMERASPACENORMAL + "\n";
|
|
94217
|
-
definitions += "#define x3d_CameraSpacePosition " + TextureCoordinateGeneratorModeType .CAMERASPACEPOSITION + "\n";
|
|
94218
|
-
definitions += "#define x3d_CameraSpaceReflectionVector " + TextureCoordinateGeneratorModeType .CAMERASPACEREFLECTIONVECTOR + "\n";
|
|
94219
|
-
definitions += "#define x3d_SphereLocal " + TextureCoordinateGeneratorModeType .SPHERE_LOCAL + "\n";
|
|
94220
|
-
definitions += "#define x3d_Coord " + TextureCoordinateGeneratorModeType .COORD + "\n";
|
|
94221
|
-
definitions += "#define x3d_CoordEye " + TextureCoordinateGeneratorModeType .COORD_EYE + "\n";
|
|
94222
|
-
definitions += "#define x3d_Noise " + TextureCoordinateGeneratorModeType .NOISE + "\n";
|
|
94223
|
-
definitions += "#define x3d_NoiseEye " + TextureCoordinateGeneratorModeType .NOISE_EYE + "\n";
|
|
94224
|
-
definitions += "#define x3d_SphereReflect " + TextureCoordinateGeneratorModeType .SPHERE_REFLECT + "\n";
|
|
94225
|
-
definitions += "#define x3d_SphereReflectLocal " + TextureCoordinateGeneratorModeType .SPHERE_REFLECT_LOCAL + "\n";
|
|
94226
|
-
|
|
94227
|
-
// Legacy
|
|
94228
|
-
definitions += "#define x3d_GeometryPoints 0\n";
|
|
94229
|
-
definitions += "#define x3d_GeometryLines 1\n";
|
|
94230
|
-
definitions += "#define x3d_NoneClipPlane vec4 (88.0, 51.0, 68.0, 33.0)\n";
|
|
94231
|
-
definitions += "#define x3d_NoneFog 0\n";
|
|
94232
|
-
definitions += "#define x3d_NoneLight 0\n";
|
|
94233
|
-
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
|
+
`
|
|
94234
94501
|
|
|
94235
94502
|
// Adjust precision of struct types;
|
|
94236
94503
|
|
|
@@ -94241,12 +94508,12 @@ const ShaderSource =
|
|
|
94241
94508
|
precisionInt = matchInt ?.[1] ?? "mediump";
|
|
94242
94509
|
|
|
94243
94510
|
const types = Types_glsl
|
|
94244
|
-
.replace (/mediump\s+(float|vec2|vec3|mat3|mat4)/g, precisionFloat
|
|
94245
|
-
.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`);
|
|
94246
94513
|
|
|
94247
|
-
const lines = (match [1] .match (/\n/g)
|
|
94514
|
+
const lines = (match [1] .match (/\n/g) ?.length ?? 0) + 1;
|
|
94248
94515
|
|
|
94249
|
-
return `${match [1]}${
|
|
94516
|
+
return `${match [1]}${defines}${types}#line ${lines + 1} -1\n${source .substring (match [0] .length)}`;
|
|
94250
94517
|
},
|
|
94251
94518
|
};
|
|
94252
94519
|
|
|
@@ -94263,14 +94530,6 @@ const ShaderSource_default_ = ShaderSource;
|
|
|
94263
94530
|
|
|
94264
94531
|
x_ite_Namespace .add ("ShaderSource", "x_ite/Browser/Shaders/ShaderSource", ShaderSource_default_);
|
|
94265
94532
|
/* harmony default export */ const Shaders_ShaderSource = (ShaderSource_default_);
|
|
94266
|
-
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/TexturingConfiguration.js
|
|
94267
|
-
// The numbers must remain in single digits, otherwise the number base must
|
|
94268
|
-
// be increased in the number output for the material shader key.
|
|
94269
|
-
|
|
94270
|
-
const maxTextureTransforms = 4;
|
|
94271
|
-
const maxTexCoords = 4;
|
|
94272
|
-
const maxTextures = 4;
|
|
94273
|
-
|
|
94274
94533
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Fragment1.glsl.js
|
|
94275
94534
|
|
|
94276
94535
|
|
|
@@ -94781,19 +95040,19 @@ uniform x3d_NormalTextureParameters x3d_NormalTexture;
|
|
|
94781
95040
|
NormalInfo getNormalInfo(const in float normalScale){
|
|
94782
95041
|
#if defined(X3D_NORMAL_TEXTURE)
|
|
94783
95042
|
vec3 UV=getTexCoord(x3d_NormalTexture.textureTransformMapping,x3d_NormalTexture.textureCoordinateMapping);
|
|
94784
|
-
#else
|
|
94785
|
-
vec3 UV=vec3(0.0);
|
|
94786
|
-
#endif
|
|
94787
95043
|
#if defined(X3D_NORMAL_TEXTURE_FLIP_Y)
|
|
94788
95044
|
UV.t=1.0-UV.t;
|
|
94789
95045
|
#endif
|
|
95046
|
+
#else
|
|
95047
|
+
vec3 UV=vertex;
|
|
95048
|
+
#endif
|
|
94790
95049
|
vec3 n,t,b,ng;
|
|
94791
95050
|
#if defined(X3D_TANGENTS)
|
|
94792
95051
|
t=normalize(TBN[0]);b=normalize(TBN[1]);ng=normalize(TBN[2]);
|
|
94793
95052
|
#else
|
|
94794
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);
|
|
94795
95054
|
#endif
|
|
94796
|
-
if(gl_FrontFacing==false){t
|
|
95055
|
+
if(gl_FrontFacing==false){t=-t;b=-b;ng=-ng;}NormalInfo info;info.ng=ng;
|
|
94797
95056
|
#if defined(X3D_NORMAL_TEXTURE)
|
|
94798
95057
|
#if __VERSION__==100
|
|
94799
95058
|
#if defined(X3D_NORMAL_TEXTURE_2D)
|
|
@@ -95867,14 +96126,14 @@ x_ite_Namespace .add ("Unlit2.fs", "assets/shaders/webgl2/Unlit2.fs", Unlit2_fs_
|
|
|
95867
96126
|
/* harmony default export */ const Unlit2_fs = (Unlit2_fs_default_);
|
|
95868
96127
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/BRDF2.glsl.js
|
|
95869
96128
|
const BRDF2_glsl_default_ = /* glsl */ `
|
|
95870
|
-
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);}
|
|
95871
96130
|
#if defined(X3D_LIGHTING)
|
|
95872
|
-
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);}
|
|
95873
96132
|
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95874
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;}
|
|
95875
96134
|
#endif
|
|
95876
96135
|
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
95877
|
-
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);}
|
|
95878
96137
|
#endif
|
|
95879
96138
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95880
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;}
|
|
@@ -95912,36 +96171,26 @@ if(!x3d_EnvironmentLightSource.specularTextureLinear)textureColor=sRGBToLinear(t
|
|
|
95912
96171
|
#endif
|
|
95913
96172
|
return textureColor*x3d_EnvironmentLightSource.color*x3d_EnvironmentLightSource.intensity;}
|
|
95914
96173
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95915
|
-
vec3 getSheenLight(const in vec3 reflection,const in float lod){
|
|
95916
|
-
#endif
|
|
95917
|
-
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);
|
|
95918
96175
|
#if __VERSION__==100
|
|
95919
|
-
|
|
96176
|
+
vec3 textureColor=textureCubeLodEXT(x3d_EnvironmentLightSource.diffuseTexture,texCoord,lod).rgb;
|
|
95920
96177
|
#else
|
|
95921
|
-
|
|
96178
|
+
vec3 textureColor=textureLod(x3d_EnvironmentLightSource.diffuseTexture,texCoord,lod).rgb;
|
|
95922
96179
|
#endif
|
|
95923
|
-
|
|
95924
|
-
|
|
95925
|
-
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
96180
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
96181
|
+
if(x3d_EnvironmentLightSource.diffuseTextureLinear)textureColor=linearToSRGB(textureColor);
|
|
95926
96182
|
#else
|
|
95927
|
-
|
|
96183
|
+
if(!x3d_EnvironmentLightSource.diffuseTextureLinear)textureColor=sRGBToLinear(textureColor);
|
|
95928
96184
|
#endif
|
|
95929
|
-
|
|
95930
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95931
|
-
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));
|
|
95932
|
-
#if __VERSION__==100
|
|
95933
|
-
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95934
|
-
#else
|
|
95935
|
-
vec2 f_ab=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
96185
|
+
return textureColor*x3d_EnvironmentLightSource.color*x3d_EnvironmentLightSource.intensity;}
|
|
95936
96186
|
#endif
|
|
95937
|
-
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));
|
|
95938
96188
|
#if __VERSION__==100
|
|
95939
96189
|
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95940
96190
|
#else
|
|
95941
96191
|
vec2 f_ab=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95942
96192
|
#endif
|
|
95943
|
-
vec3
|
|
95944
|
-
#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;}
|
|
95945
96194
|
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95946
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);
|
|
95947
96196
|
#if __VERSION__==100
|
|
@@ -95969,16 +96218,10 @@ vec2 brdf=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
|
95969
96218
|
vec3 specularColor=f0*brdf.x+f90*brdf.y;return(1.0-specularColor)*attenuatedColor*baseColor;}
|
|
95970
96219
|
#endif
|
|
95971
96220
|
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
95972
|
-
vec3 getIBLRadianceAnisotropy(const in vec3 n,const in vec3 v,const in float roughness,const in float anisotropy,const in vec3 anisotropyDirection
|
|
95973
|
-
#if __VERSION__==100
|
|
95974
|
-
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95975
|
-
#else
|
|
95976
|
-
vec2 f_ab=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95977
|
-
#endif
|
|
95978
|
-
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;}
|
|
95979
96222
|
#endif
|
|
95980
96223
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95981
|
-
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));
|
|
95982
96225
|
#if __VERSION__==100
|
|
95983
96226
|
float brdf=texture2D(x3d_EnvironmentLightSource.CharlieLUTTexture,brdfSamplePoint).b;
|
|
95984
96227
|
#else
|
|
@@ -96006,7 +96249,7 @@ x_ite_Namespace .add ("Iridescence2.glsl", "assets/shaders/webgl2/pbr/Iridescenc
|
|
|
96006
96249
|
|
|
96007
96250
|
|
|
96008
96251
|
const MaterialInfo2_glsl_default_ = /* glsl */ `
|
|
96009
|
-
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;};
|
|
96010
96253
|
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
96011
96254
|
${MaterialTextures .texture ("x3d_DiffuseTexture", "rgba", "linear")}
|
|
96012
96255
|
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
@@ -96037,11 +96280,11 @@ baseColor=getTextureColor(baseColor,vec4(vec3(1.0),alpha));
|
|
|
96037
96280
|
return baseColor;}
|
|
96038
96281
|
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
96039
96282
|
${MaterialTextures .texture ("x3d_SpecularGlossinessTexture", "rgba", "linear")}
|
|
96040
|
-
MaterialInfo getSpecularGlossinessInfo(in MaterialInfo info){info.
|
|
96283
|
+
MaterialInfo getSpecularGlossinessInfo(in MaterialInfo info){info.f0_dielectric=x3d_Material.specularColor;info.perceptualRoughness=x3d_Material.glossiness;
|
|
96041
96284
|
#if defined(X3D_SPECULAR_GLOSSINESS_TEXTURE)
|
|
96042
|
-
vec4 sgSample=getSpecularGlossinessTexture();info.perceptualRoughness*=sgSample.a;info.
|
|
96285
|
+
vec4 sgSample=getSpecularGlossinessTexture();info.perceptualRoughness*=sgSample.a;info.f0_dielectric*=sgSample.rgb;
|
|
96043
96286
|
#endif
|
|
96044
|
-
info.perceptualRoughness=1.0-info.perceptualRoughness;
|
|
96287
|
+
info.perceptualRoughness=1.0-info.perceptualRoughness;return info;}
|
|
96045
96288
|
#endif
|
|
96046
96289
|
#if defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
96047
96290
|
${MaterialTextures .texture ("x3d_MetallicRoughnessTexture")}
|
|
@@ -96049,7 +96292,7 @@ MaterialInfo getMetallicRoughnessInfo(in MaterialInfo info){info.metallic=x3d_Ma
|
|
|
96049
96292
|
#if defined(X3D_METALLIC_ROUGHNESS_TEXTURE)
|
|
96050
96293
|
vec4 mrSample=getMetallicRoughnessTexture();info.metallic*=mrSample.b;info.perceptualRoughness*=mrSample.g;
|
|
96051
96294
|
#endif
|
|
96052
|
-
|
|
96295
|
+
return info;}
|
|
96053
96296
|
#endif
|
|
96054
96297
|
${MaterialTextures .texture ("x3d_EmissiveTexture", "rgb", "linear")}
|
|
96055
96298
|
#if defined(X3D_EMISSIVE_STRENGTH_MATERIAL_EXT)
|
|
@@ -96072,7 +96315,7 @@ return 1.0;
|
|
|
96072
96315
|
#endif
|
|
96073
96316
|
}
|
|
96074
96317
|
#if defined(X3D_IOR_MATERIAL_EXT)
|
|
96075
|
-
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;}
|
|
96076
96319
|
#endif
|
|
96077
96320
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96078
96321
|
${MaterialTextures .texture ("x3d_SheenColorTextureEXT",
|
|
@@ -96093,6 +96336,19 @@ return texture(x3d_SheenELUTTextureEXT,vec2(NdotV,sheenRoughnessFactor)).r;
|
|
|
96093
96336
|
#endif
|
|
96094
96337
|
}
|
|
96095
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
|
|
96096
96352
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96097
96353
|
${MaterialTextures .texture ("x3d_ClearcoatTextureEXT",
|
|
96098
96354
|
"r")}
|
|
@@ -96128,7 +96384,7 @@ specularTexture.a=getSpecularTextureEXT();
|
|
|
96128
96384
|
#if defined(X3D_SPECULAR_COLOR_TEXTURE_EXT)
|
|
96129
96385
|
specularTexture.rgb=getSpecularColorTextureEXT();
|
|
96130
96386
|
#endif
|
|
96131
|
-
|
|
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;}
|
|
96132
96388
|
#endif
|
|
96133
96389
|
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96134
96390
|
${MaterialTextures .texture ("x3d_ThicknessTextureEXT", "g")}
|
|
@@ -96202,12 +96458,11 @@ vec4 getMaterialColor(){vec4 baseColor=getBaseColor();
|
|
|
96202
96458
|
#if defined(X3D_TEXTURE_PROJECTION)
|
|
96203
96459
|
baseColor.rgb*=getTextureProjectorColor();
|
|
96204
96460
|
#endif
|
|
96205
|
-
|
|
96206
|
-
vec3 v=normalize(-vertex);
|
|
96461
|
+
vec3 color=vec3(0.0);vec3 v=normalize(-vertex);
|
|
96207
96462
|
#if defined(X3D_USE_IBL)||defined(X3D_LIGHTING)||defined(X3D_ANISOTROPY_MATERIAL_EXT)||defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96208
96463
|
NormalInfo normalInfo=getNormalInfo(x3d_Material.normalScale);vec3 n=normalInfo.n;float NdotV=clamp(dot(n,v),0.0,1.0);
|
|
96209
96464
|
#endif
|
|
96210
|
-
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;
|
|
96211
96466
|
#if defined(X3D_IOR_MATERIAL_EXT)
|
|
96212
96467
|
materialInfo=getIorInfo(materialInfo);
|
|
96213
96468
|
#endif
|
|
@@ -96235,80 +96490,100 @@ materialInfo=getVolumeInfo(materialInfo);
|
|
|
96235
96490
|
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96236
96491
|
materialInfo=getIridescenceInfo(materialInfo);
|
|
96237
96492
|
#endif
|
|
96493
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
|
|
96494
|
+
materialInfo=getDiffuseTransmissionInfo(materialInfo);
|
|
96495
|
+
#endif
|
|
96238
96496
|
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96239
96497
|
materialInfo=getAnisotropyInfo(materialInfo,normalInfo);
|
|
96240
96498
|
#endif
|
|
96241
|
-
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;
|
|
96242
96500
|
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)&&(defined(X3D_USE_IBL)||defined(X3D_LIGHTING))
|
|
96243
|
-
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));
|
|
96244
96510
|
#endif
|
|
96245
96511
|
#if defined(X3D_USE_IBL)
|
|
96246
|
-
|
|
96247
|
-
|
|
96248
|
-
|
|
96249
|
-
|
|
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;
|
|
96250
96525
|
#else
|
|
96251
|
-
|
|
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);
|
|
96252
96531
|
#endif
|
|
96253
96532
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96254
|
-
|
|
96533
|
+
clearcoat_brdf=getIBLRadianceGGX(materialInfo.clearcoatNormal,v,materialInfo.clearcoatRoughness);
|
|
96255
96534
|
#endif
|
|
96256
96535
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96257
|
-
f_sheen
|
|
96536
|
+
f_sheen=getIBLRadianceCharlie(n,v,materialInfo.sheenRoughnessFactor,materialInfo.sheenColorFactor);albedoSheenScaling=1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor);
|
|
96258
96537
|
#endif
|
|
96259
|
-
|
|
96260
|
-
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);
|
|
96261
96539
|
#endif
|
|
96540
|
+
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
96541
|
+
float ao=getOcclusionFactor();color*=1.0+x3d_Material.occlusionStrength*(ao-1.0);
|
|
96262
96542
|
#endif
|
|
96263
|
-
|
|
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);
|
|
96264
96544
|
#if defined(X3D_LIGHTING)
|
|
96265
|
-
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);
|
|
96266
96546
|
#if defined(X3D_SHADOWS)
|
|
96267
|
-
|
|
96268
|
-
#endif
|
|
96269
|
-
vec3 l_diffuse=vec3(0.0);vec3 l_specular=vec3(0.0);
|
|
96270
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96271
|
-
l_diffuse+=intensity*NdotL*BRDF_lambertianIridescence(materialInfo.f0,materialInfo.f90,iridescenceFresnel,materialInfo.iridescenceFactor,materialInfo.c_diff,materialInfo.specularWeight,VdotH);l_specular+=intensity*NdotL*BRDF_specularGGXIridescence(materialInfo.f0,materialInfo.f90,iridescenceFresnel,materialInfo.alphaRoughness,materialInfo.iridescenceFactor,materialInfo.specularWeight,VdotH,NdotL,NdotV,NdotH);
|
|
96272
|
-
#elif defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96273
|
-
l_diffuse+=intensity*NdotL*BRDF_lambertian(materialInfo.f0,materialInfo.f90,materialInfo.c_diff,materialInfo.specularWeight,VdotH);l_specular+=intensity*NdotL*BRDF_specularGGXAnisotropy(materialInfo.f0,materialInfo.f90,materialInfo.alphaRoughness,materialInfo.anisotropyStrength,n,v,l,h,materialInfo.anisotropicT,materialInfo.anisotropicB);
|
|
96274
|
-
#else
|
|
96275
|
-
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);
|
|
96547
|
+
lightIntensity=mix(lightIntensity,light.shadowColor,getShadowIntensity(i,light));
|
|
96276
96548
|
#endif
|
|
96277
|
-
|
|
96278
|
-
|
|
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);
|
|
96279
96554
|
#endif
|
|
96280
|
-
|
|
96281
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96282
|
-
f_clearcoat+=intensity*getPunctualRadianceClearCoat(materialInfo.clearcoatNormal,v,l,h,VdotH,materialInfo.clearcoatF0,materialInfo.clearcoatF90,materialInfo.clearcoatRoughness);
|
|
96555
|
+
l_diffuse=mix(l_diffuse,diffuse_btdf,materialInfo.diffuseTransmissionFactor);
|
|
96283
96556
|
#endif
|
|
96284
|
-
}
|
|
96285
96557
|
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96286
|
-
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);
|
|
96287
96559
|
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96288
96560
|
transmittedLight=applyVolumeAttenuation(transmittedLight,length(transmissionRay),materialInfo.attenuationColor,materialInfo.attenuationDistance);
|
|
96289
96561
|
#endif
|
|
96290
|
-
|
|
96291
|
-
#endif
|
|
96292
|
-
}}
|
|
96562
|
+
l_diffuse=mix(l_diffuse,transmittedLight,materialInfo.transmissionFactor);
|
|
96293
96563
|
#endif
|
|
96294
|
-
|
|
96295
|
-
#if defined(
|
|
96296
|
-
|
|
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;
|
|
96297
96567
|
#else
|
|
96298
|
-
|
|
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);
|
|
96299
96573
|
#endif
|
|
96300
96574
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96301
|
-
|
|
96575
|
+
l_clearcoat_brdf=intensity*getPunctualRadianceClearCoat(materialInfo.clearcoatNormal,v,l,h,VdotH,materialInfo.clearcoatF0,materialInfo.clearcoatF90,materialInfo.clearcoatRoughness);
|
|
96302
96576
|
#endif
|
|
96303
|
-
#if defined(
|
|
96304
|
-
|
|
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));
|
|
96305
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;}}
|
|
96306
96581
|
#endif
|
|
96307
|
-
|
|
96582
|
+
f_emissive=getEmissiveColor();
|
|
96308
96583
|
#if defined(X3D_UNLIT_MATERIAL_EXT)
|
|
96309
96584
|
color=baseColor.rgb;
|
|
96310
96585
|
#else
|
|
96311
|
-
color=f_emissive
|
|
96586
|
+
color=f_emissive*(1.0-clearcoatFactor*clearcoatFresnel)+color;
|
|
96312
96587
|
#endif
|
|
96313
96588
|
return vec4(color,baseColor.a);}void main(){fragment_main();}`
|
|
96314
96589
|
;
|
|
@@ -96322,12 +96597,12 @@ float applyIorToRoughness(const in float roughness,const in float ior){return ro
|
|
|
96322
96597
|
#endif
|
|
96323
96598
|
#if defined(X3D_LIGHTING)
|
|
96324
96599
|
#pragma X3D include "../common/Lighting.glsl"
|
|
96325
|
-
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;}
|
|
96326
96601
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96327
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);}
|
|
96328
96603
|
#endif
|
|
96329
96604
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96330
|
-
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);}
|
|
96331
96606
|
#endif
|
|
96332
96607
|
#endif
|
|
96333
96608
|
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
@@ -96661,18 +96936,16 @@ Object .assign (ShaderCompiler .prototype,
|
|
|
96661
96936
|
|
|
96662
96937
|
source = "";
|
|
96663
96938
|
|
|
96664
|
-
for (
|
|
96939
|
+
for (const [i, line] of lines .entries ())
|
|
96665
96940
|
{
|
|
96666
|
-
const
|
|
96667
|
-
line = lines [i],
|
|
96668
|
-
match = line .match (include);
|
|
96941
|
+
const match = line .match (include);
|
|
96669
96942
|
|
|
96670
96943
|
if (match)
|
|
96671
96944
|
{
|
|
96672
|
-
source +=
|
|
96945
|
+
source += `#line 1 ${this .sourceFileNumbers [match [1]]}\n`;
|
|
96673
96946
|
source += this .process (this .includes [match [1]], this .sourceFileNumbers [match [1]]);
|
|
96674
96947
|
source += "\n";
|
|
96675
|
-
source +=
|
|
96948
|
+
source += `#line ${i + 2} ${parent}\n`;
|
|
96676
96949
|
}
|
|
96677
96950
|
else
|
|
96678
96951
|
{
|
|
@@ -96691,7 +96964,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
96691
96964
|
x_ite_Namespace .add ("ShaderCompiler", "x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
|
|
96692
96965
|
/* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
|
|
96693
96966
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
96694
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
96967
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(812);
|
|
96695
96968
|
/*******************************************************************************
|
|
96696
96969
|
*
|
|
96697
96970
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -97362,7 +97635,7 @@ const X3DAppearanceNode_default_ = X3DAppearanceNode;
|
|
|
97362
97635
|
x_ite_Namespace .add ("X3DAppearanceNode", "x_ite/Components/Shape/X3DAppearanceNode", X3DAppearanceNode_default_);
|
|
97363
97636
|
/* harmony default export */ const Shape_X3DAppearanceNode = (X3DAppearanceNode_default_);
|
|
97364
97637
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/Appearance.js
|
|
97365
|
-
/* provided dependency */ var Appearance_$ = __webpack_require__(
|
|
97638
|
+
/* provided dependency */ var Appearance_$ = __webpack_require__(812);
|
|
97366
97639
|
/*******************************************************************************
|
|
97367
97640
|
*
|
|
97368
97641
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -98464,6 +98737,7 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
|
|
|
98464
98737
|
|
|
98465
98738
|
if (numEnvironmentLights)
|
|
98466
98739
|
{
|
|
98740
|
+
// Although we count this kind of light here, only one is supported.
|
|
98467
98741
|
options .push ("X3D_USE_IBL")
|
|
98468
98742
|
options .push (`X3D_NUM_ENVIRONMENT_LIGHTS ${Math .min (numEnvironmentLights, browser .getMaxLights ())}`);
|
|
98469
98743
|
}
|
|
@@ -106286,8 +106560,8 @@ const GifMedia_default_ = GifMedia;
|
|
|
106286
106560
|
x_ite_Namespace .add ("GifMedia", "x_ite/Browser/Texturing/GifMedia", GifMedia_default_);
|
|
106287
106561
|
/* harmony default export */ const Texturing_GifMedia = (GifMedia_default_);
|
|
106288
106562
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
106289
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
106290
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
106563
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(812);
|
|
106564
|
+
/* provided dependency */ var SuperGif = __webpack_require__(807);
|
|
106291
106565
|
/*******************************************************************************
|
|
106292
106566
|
*
|
|
106293
106567
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -109594,6 +109868,7 @@ x_ite_Namespace .add ("fr", "locale/fr", fr_default_);
|
|
|
109594
109868
|
|
|
109595
109869
|
|
|
109596
109870
|
const locales = new Map ([
|
|
109871
|
+
["en", undefined], // default language
|
|
109597
109872
|
["de", de],
|
|
109598
109873
|
["fr", fr],
|
|
109599
109874
|
]);
|
|
@@ -109604,7 +109879,7 @@ function getLanguage ()
|
|
|
109604
109879
|
{
|
|
109605
109880
|
const language = value .split ("-") [0];
|
|
109606
109881
|
|
|
109607
|
-
if (locales .
|
|
109882
|
+
if (locales .has (language))
|
|
109608
109883
|
return language;
|
|
109609
109884
|
}
|
|
109610
109885
|
|
|
@@ -109619,7 +109894,7 @@ const gettext_default_ = (string) => locale .get (string) || string;
|
|
|
109619
109894
|
x_ite_Namespace .add ("gettext", "locale/gettext", gettext_default_);
|
|
109620
109895
|
/* harmony default export */ const gettext = (gettext_default_);
|
|
109621
109896
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
|
|
109622
|
-
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(
|
|
109897
|
+
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(812);
|
|
109623
109898
|
/*******************************************************************************
|
|
109624
109899
|
*
|
|
109625
109900
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -110191,8 +110466,69 @@ const TextureQuality_default_ = TextureQuality;
|
|
|
110191
110466
|
|
|
110192
110467
|
x_ite_Namespace .add ("TextureQuality", "x_ite/Browser/Core/TextureQuality", TextureQuality_default_);
|
|
110193
110468
|
/* harmony default export */ const Core_TextureQuality = (TextureQuality_default_);
|
|
110469
|
+
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/TextCompression.js
|
|
110470
|
+
/*******************************************************************************
|
|
110471
|
+
*
|
|
110472
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
110473
|
+
*
|
|
110474
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
110475
|
+
*
|
|
110476
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
110477
|
+
*
|
|
110478
|
+
* The copyright notice above does not evidence any actual of intended
|
|
110479
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
110480
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
110481
|
+
* create3000.
|
|
110482
|
+
*
|
|
110483
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
110484
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
110485
|
+
* permission of create3000.
|
|
110486
|
+
*
|
|
110487
|
+
* NON-MILITARY USE ONLY
|
|
110488
|
+
*
|
|
110489
|
+
* All create3000 software are effectively free software with a non-military use
|
|
110490
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
110491
|
+
* source in any way you please with the exception anything that uses it must be
|
|
110492
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
110493
|
+
*
|
|
110494
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
110495
|
+
*
|
|
110496
|
+
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
110497
|
+
*
|
|
110498
|
+
* This file is part of the X_ITE Project.
|
|
110499
|
+
*
|
|
110500
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
110501
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
110502
|
+
* Free Software Foundation.
|
|
110503
|
+
*
|
|
110504
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
110505
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
110506
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
110507
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
110508
|
+
*
|
|
110509
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
110510
|
+
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
110511
|
+
* copy of the GPLv3 License.
|
|
110512
|
+
*
|
|
110513
|
+
* For Silvio, Joy and Adi.
|
|
110514
|
+
*
|
|
110515
|
+
******************************************************************************/
|
|
110516
|
+
|
|
110517
|
+
let TextCompression_i = 0;
|
|
110518
|
+
|
|
110519
|
+
const TextCompression =
|
|
110520
|
+
{
|
|
110521
|
+
CHAR_SPACING: TextCompression_i ++,
|
|
110522
|
+
SCALING: TextCompression_i ++,
|
|
110523
|
+
};
|
|
110524
|
+
|
|
110525
|
+
const TextCompression_default_ = TextCompression;
|
|
110526
|
+
;
|
|
110527
|
+
|
|
110528
|
+
x_ite_Namespace .add ("TextCompression", "x_ite/Browser/Core/TextCompression", TextCompression_default_);
|
|
110529
|
+
/* harmony default export */ const Core_TextCompression = (TextCompression_default_);
|
|
110194
110530
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserOptions.js
|
|
110195
|
-
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(
|
|
110531
|
+
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(812);
|
|
110196
110532
|
/*******************************************************************************
|
|
110197
110533
|
*
|
|
110198
110534
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -110250,6 +110586,7 @@ x_ite_Namespace .add ("TextureQuality", "x_ite/Browser/Core/TextureQuality", Tex
|
|
|
110250
110586
|
|
|
110251
110587
|
|
|
110252
110588
|
|
|
110589
|
+
|
|
110253
110590
|
// https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/networking.html#BrowserProperties
|
|
110254
110591
|
|
|
110255
110592
|
function BrowserOptions (executionContext)
|
|
@@ -110320,6 +110657,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110320
110657
|
"Notifications",
|
|
110321
110658
|
"OrderIndependentTransparency",
|
|
110322
110659
|
"SplashScreen",
|
|
110660
|
+
"TextCompression",
|
|
110323
110661
|
"ToneMapping",
|
|
110324
110662
|
]);
|
|
110325
110663
|
|
|
@@ -110389,6 +110727,16 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110389
110727
|
{
|
|
110390
110728
|
return this .textureQuality;
|
|
110391
110729
|
},
|
|
110730
|
+
getTextCompression ()
|
|
110731
|
+
{
|
|
110732
|
+
switch (this ._TextCompression .getValue ())
|
|
110733
|
+
{
|
|
110734
|
+
default: // CHAR_SPACING
|
|
110735
|
+
return Core_TextCompression .CHAR_SPACING;
|
|
110736
|
+
case "SCALING":
|
|
110737
|
+
return Core_TextCompression .SCALING;
|
|
110738
|
+
}
|
|
110739
|
+
},
|
|
110392
110740
|
set_Rubberband__ (rubberband)
|
|
110393
110741
|
{
|
|
110394
110742
|
this .localStorage .Rubberband = rubberband .getValue ();
|
|
@@ -110600,6 +110948,7 @@ Object .defineProperties (BrowserOptions,
|
|
|
110600
110948
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Notifications", new x_ite_Fields .SFBool (true)),
|
|
110601
110949
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "OrderIndependentTransparency", new x_ite_Fields .SFBool ()),
|
|
110602
110950
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "StraightenHorizon", new x_ite_Fields .SFBool (true)),
|
|
110951
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "TextCompression", new x_ite_Fields .SFString ("CHAR_SPACING")),
|
|
110603
110952
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Timings", new x_ite_Fields .SFBool ()),
|
|
110604
110953
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "ToneMapping", new x_ite_Fields .SFString ("NONE")),
|
|
110605
110954
|
]),
|
|
@@ -110813,7 +111162,7 @@ const RenderingProperties_default_ = RenderingProperties;
|
|
|
110813
111162
|
x_ite_Namespace .add ("RenderingProperties", "x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
|
|
110814
111163
|
/* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
|
|
110815
111164
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
|
|
110816
|
-
/* provided dependency */ var Notification_$ = __webpack_require__(
|
|
111165
|
+
/* provided dependency */ var Notification_$ = __webpack_require__(812);
|
|
110817
111166
|
/*******************************************************************************
|
|
110818
111167
|
*
|
|
110819
111168
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -110936,8 +111285,8 @@ const Notification_default_ = Notification;
|
|
|
110936
111285
|
x_ite_Namespace .add ("Notification", "x_ite/Browser/Core/Notification", Notification_default_);
|
|
110937
111286
|
/* harmony default export */ const Core_Notification = (Notification_default_);
|
|
110938
111287
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
|
|
110939
|
-
/* provided dependency */ var jquery_fullscreen = __webpack_require__(
|
|
110940
|
-
/* provided dependency */ var ContextMenu_$ = __webpack_require__(
|
|
111288
|
+
/* provided dependency */ var jquery_fullscreen = __webpack_require__(48);
|
|
111289
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(812);
|
|
110941
111290
|
/*******************************************************************************
|
|
110942
111291
|
*
|
|
110943
111292
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -111045,7 +111394,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111045
111394
|
browser = this .getBrowser (),
|
|
111046
111395
|
fullscreen = browser .getElement () .fullScreen ();
|
|
111047
111396
|
|
|
111048
|
-
if (!
|
|
111397
|
+
if (!browser .getBrowserOption ("ContextMenu"))
|
|
111049
111398
|
return;
|
|
111050
111399
|
|
|
111051
111400
|
const menu = {
|
|
@@ -111341,19 +111690,19 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111341
111690
|
delete menu .items ["available-viewers"];
|
|
111342
111691
|
}
|
|
111343
111692
|
|
|
111344
|
-
if (!
|
|
111693
|
+
if (!browser .getCurrentViewer () .match (/^(?:EXAMINE|FLY)$/))
|
|
111345
111694
|
{
|
|
111346
111695
|
delete menu .items ["straighten-horizon"];
|
|
111347
111696
|
}
|
|
111348
111697
|
|
|
111349
|
-
if (!
|
|
111698
|
+
if (!browser .getBrowserOption ("Debug"))
|
|
111350
111699
|
{
|
|
111351
111700
|
delete menu .items ["shading"];
|
|
111352
111701
|
}
|
|
111353
111702
|
|
|
111354
111703
|
const worldInfo = browser .getExecutionContext () .getWorldInfos () [0];
|
|
111355
111704
|
|
|
111356
|
-
if (!
|
|
111705
|
+
if (!worldInfo || (worldInfo .title .length === 0 && worldInfo .info .length === 0))
|
|
111357
111706
|
{
|
|
111358
111707
|
delete menu .items ["world-info"];
|
|
111359
111708
|
}
|
|
@@ -111366,26 +111715,18 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111366
111715
|
browser = this .getBrowser (),
|
|
111367
111716
|
activeLayer = browser .getActiveLayer ();
|
|
111368
111717
|
|
|
111369
|
-
if (!
|
|
111718
|
+
if (!activeLayer)
|
|
111370
111719
|
return { };
|
|
111371
111720
|
|
|
111372
111721
|
const
|
|
111373
|
-
|
|
111374
|
-
|
|
111375
|
-
|
|
111376
|
-
currentViewpoint = activeLayer .getViewpoint (),
|
|
111377
|
-
menu = { };
|
|
111722
|
+
viewpoints = activeLayer .getUserViewpoints (),
|
|
111723
|
+
currentViewpoint = activeLayer .getViewpoint (),
|
|
111724
|
+
menu = { };
|
|
111378
111725
|
|
|
111379
111726
|
for (const viewpoint of viewpoints)
|
|
111380
111727
|
{
|
|
111381
111728
|
const description = viewpoint .getDescriptions () .join (" » ");
|
|
111382
111729
|
|
|
111383
|
-
if (description === "")
|
|
111384
|
-
continue;
|
|
111385
|
-
|
|
111386
|
-
if (! enableInlineViewpoints && viewpoint .getScene () !== currentScene)
|
|
111387
|
-
continue;
|
|
111388
|
-
|
|
111389
111730
|
const item = {
|
|
111390
111731
|
name: description,
|
|
111391
111732
|
callback: () =>
|
|
@@ -111398,7 +111739,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111398
111739
|
if (viewpoint === currentViewpoint)
|
|
111399
111740
|
item .className = "context-menu-selected";
|
|
111400
111741
|
|
|
111401
|
-
menu [
|
|
111742
|
+
menu [`Viewpoint-${viewpoint .getId ()}`] = item;
|
|
111402
111743
|
}
|
|
111403
111744
|
|
|
111404
111745
|
return menu;
|
|
@@ -111464,7 +111805,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111464
111805
|
menu = options .build (event),
|
|
111465
111806
|
level = 1;
|
|
111466
111807
|
|
|
111467
|
-
if (!
|
|
111808
|
+
if (!menu) return;
|
|
111468
111809
|
|
|
111469
111810
|
// Layer
|
|
111470
111811
|
|
|
@@ -111543,7 +111884,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111543
111884
|
t = ContextMenu_$(event .target) .closest ("li"),
|
|
111544
111885
|
e = t .children ("ul");
|
|
111545
111886
|
|
|
111546
|
-
if (!
|
|
111887
|
+
if (!e .length)
|
|
111547
111888
|
return;
|
|
111548
111889
|
|
|
111549
111890
|
e .css ("top", "");
|
|
@@ -113690,7 +114031,7 @@ const DataStorage_default_ = DataStorage;
|
|
|
113690
114031
|
x_ite_Namespace .add ("DataStorage", "standard/Utility/DataStorage", DataStorage_default_);
|
|
113691
114032
|
/* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
|
|
113692
114033
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
113693
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
114034
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(812);
|
|
113694
114035
|
/*******************************************************************************
|
|
113695
114036
|
*
|
|
113696
114037
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -114087,6 +114428,12 @@ Object .assign (X3DCoreContext .prototype,
|
|
|
114087
114428
|
|
|
114088
114429
|
break;
|
|
114089
114430
|
}
|
|
114431
|
+
case "textCompression":
|
|
114432
|
+
case "textcompression":
|
|
114433
|
+
{
|
|
114434
|
+
this .setBrowserOption ("TextCompression", newValue);
|
|
114435
|
+
break;
|
|
114436
|
+
}
|
|
114090
114437
|
case "timings":
|
|
114091
114438
|
{
|
|
114092
114439
|
this .setBrowserOption ("Timings", this .parseBooleanAttribute (newValue, false));
|
|
@@ -114788,14 +115135,14 @@ Object .assign (Object .setPrototypeOf (ConeOptions .prototype, Base_X3DBaseNode
|
|
|
114788
115135
|
getSideGeometry ()
|
|
114789
115136
|
{
|
|
114790
115137
|
if (!this .sideGeometry)
|
|
114791
|
-
this .
|
|
115138
|
+
this .build ();
|
|
114792
115139
|
|
|
114793
115140
|
return this .sideGeometry;
|
|
114794
115141
|
},
|
|
114795
115142
|
getBottomGeometry ()
|
|
114796
115143
|
{
|
|
114797
115144
|
if (!this .bottomGeometry)
|
|
114798
|
-
this .
|
|
115145
|
+
this .build ();
|
|
114799
115146
|
|
|
114800
115147
|
return this .bottomGeometry;
|
|
114801
115148
|
},
|
|
@@ -114945,7 +115292,7 @@ Object .assign (Object .setPrototypeOf (ConeOptions .prototype, Base_X3DBaseNode
|
|
|
114945
115292
|
|
|
114946
115293
|
point .push (new Numbers_Vector3 (0, 1, 0));
|
|
114947
115294
|
},
|
|
114948
|
-
|
|
115295
|
+
build ()
|
|
114949
115296
|
{
|
|
114950
115297
|
this .sideGeometry = new Geometry3D_IndexedFaceSet (this .getExecutionContext ());
|
|
114951
115298
|
this .sideGeometry ._texCoord = new Texturing_TextureCoordinate (this .getExecutionContext ());
|
|
@@ -114977,6 +115324,11 @@ Object .assign (Object .setPrototypeOf (ConeOptions .prototype, Base_X3DBaseNode
|
|
|
114977
115324
|
sideGeometry .setup ();
|
|
114978
115325
|
bottomGeometry .setup ();
|
|
114979
115326
|
},
|
|
115327
|
+
eventsProcessed ()
|
|
115328
|
+
{
|
|
115329
|
+
this .sideGeometry = null;
|
|
115330
|
+
this .bottomGeometry = null;
|
|
115331
|
+
},
|
|
114980
115332
|
});
|
|
114981
115333
|
|
|
114982
115334
|
Object .defineProperties (ConeOptions,
|
|
@@ -115070,21 +115422,21 @@ Object .assign (Object .setPrototypeOf (CylinderOptions .prototype, Base_X3DBase
|
|
|
115070
115422
|
getSideGeometry ()
|
|
115071
115423
|
{
|
|
115072
115424
|
if (!this .sideGeometry)
|
|
115073
|
-
this .
|
|
115425
|
+
this .build ();
|
|
115074
115426
|
|
|
115075
115427
|
return this .sideGeometry;
|
|
115076
115428
|
},
|
|
115077
115429
|
getTopGeometry ()
|
|
115078
115430
|
{
|
|
115079
115431
|
if (!this .topGeometry)
|
|
115080
|
-
this .
|
|
115432
|
+
this .build ();
|
|
115081
115433
|
|
|
115082
115434
|
return this .topGeometry;
|
|
115083
115435
|
},
|
|
115084
115436
|
getBottomGeometry ()
|
|
115085
115437
|
{
|
|
115086
115438
|
if (!this .bottomGeometry)
|
|
115087
|
-
this .
|
|
115439
|
+
this .build ();
|
|
115088
115440
|
|
|
115089
115441
|
return this .bottomGeometry;
|
|
115090
115442
|
},
|
|
@@ -115273,7 +115625,7 @@ Object .assign (Object .setPrototypeOf (CylinderOptions .prototype, Base_X3DBase
|
|
|
115273
115625
|
point .push (new Numbers_Vector3 (p .imag, 1, p .real));
|
|
115274
115626
|
}
|
|
115275
115627
|
},
|
|
115276
|
-
|
|
115628
|
+
build ()
|
|
115277
115629
|
{
|
|
115278
115630
|
this .sideGeometry = new Geometry3D_IndexedFaceSet (this .getExecutionContext ());
|
|
115279
115631
|
this .sideGeometry ._texCoord = new Texturing_TextureCoordinate (this .getExecutionContext ());
|
|
@@ -115312,6 +115664,12 @@ Object .assign (Object .setPrototypeOf (CylinderOptions .prototype, Base_X3DBase
|
|
|
115312
115664
|
bottomGeometry .setup ();
|
|
115313
115665
|
topGeometry .setup ();
|
|
115314
115666
|
},
|
|
115667
|
+
eventsProcessed ()
|
|
115668
|
+
{
|
|
115669
|
+
this .sideGeometry = null;
|
|
115670
|
+
this .bottomGeometry = null;
|
|
115671
|
+
this .topGeometry = null;
|
|
115672
|
+
},
|
|
115315
115673
|
});
|
|
115316
115674
|
|
|
115317
115675
|
Object .defineProperties (CylinderOptions,
|
|
@@ -115405,7 +115763,7 @@ Object .assign (Object .setPrototypeOf (QuadSphereOptions .prototype, Base_X3DBa
|
|
|
115405
115763
|
getGeometry ()
|
|
115406
115764
|
{
|
|
115407
115765
|
if (!this .geometry)
|
|
115408
|
-
this .
|
|
115766
|
+
this .build ();
|
|
115409
115767
|
|
|
115410
115768
|
return this .geometry;
|
|
115411
115769
|
},
|
|
@@ -115582,7 +115940,7 @@ Object .assign (Object .setPrototypeOf (QuadSphereOptions .prototype, Base_X3DBa
|
|
|
115582
115940
|
// South pole
|
|
115583
115941
|
point .push (new Numbers_Vector3 (0, -1, 0));
|
|
115584
115942
|
},
|
|
115585
|
-
|
|
115943
|
+
build ()
|
|
115586
115944
|
{
|
|
115587
115945
|
this .geometry = new Geometry3D_IndexedFaceSet (this .getExecutionContext ());
|
|
115588
115946
|
this .geometry ._texCoord = new Texturing_TextureCoordinate (this .getExecutionContext ());
|
|
@@ -115604,6 +115962,10 @@ Object .assign (Object .setPrototypeOf (QuadSphereOptions .prototype, Base_X3DBa
|
|
|
115604
115962
|
coord .setup ();
|
|
115605
115963
|
geometry .setup ();
|
|
115606
115964
|
},
|
|
115965
|
+
eventsProcessed ()
|
|
115966
|
+
{
|
|
115967
|
+
this .geometry = null;
|
|
115968
|
+
},
|
|
115607
115969
|
});
|
|
115608
115970
|
|
|
115609
115971
|
Object .defineProperties (QuadSphereOptions,
|
|
@@ -116252,14 +116614,14 @@ function tbProjectToSphere (r, x, y)
|
|
|
116252
116614
|
{
|
|
116253
116615
|
const d = Math .hypot (x, y);
|
|
116254
116616
|
|
|
116255
|
-
if (d < r * Math .
|
|
116617
|
+
if (d < r * Math .SQRT1_2) // Inside sphere
|
|
116256
116618
|
{
|
|
116257
116619
|
return Math .sqrt (r * r - d * d);
|
|
116258
116620
|
}
|
|
116259
116621
|
|
|
116260
116622
|
// On hyperbola
|
|
116261
116623
|
|
|
116262
|
-
const t = r / Math .
|
|
116624
|
+
const t = r / Math .SQRT2;
|
|
116263
116625
|
|
|
116264
116626
|
return t * t / d;
|
|
116265
116627
|
}
|
|
@@ -116270,8 +116632,8 @@ const X3DViewer_default_ = X3DViewer;
|
|
|
116270
116632
|
x_ite_Namespace .add ("X3DViewer", "x_ite/Browser/Navigation/X3DViewer", X3DViewer_default_);
|
|
116271
116633
|
/* harmony default export */ const Navigation_X3DViewer = (X3DViewer_default_);
|
|
116272
116634
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
116273
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
116274
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
116635
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(354);
|
|
116636
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(812);
|
|
116275
116637
|
/*******************************************************************************
|
|
116276
116638
|
*
|
|
116277
116639
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -117187,8 +117549,8 @@ const ExamineViewer_default_ = ExamineViewer;
|
|
|
117187
117549
|
x_ite_Namespace .add ("ExamineViewer", "x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
|
|
117188
117550
|
/* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
|
|
117189
117551
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
117190
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
117191
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
117552
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(354);
|
|
117553
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(812);
|
|
117192
117554
|
/*******************************************************************************
|
|
117193
117555
|
*
|
|
117194
117556
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118203,8 +118565,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
118203
118565
|
x_ite_Namespace .add ("FlyViewer", "x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
|
|
118204
118566
|
/* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
|
|
118205
118567
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
118206
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
118207
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
118568
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(354);
|
|
118569
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(812);
|
|
118208
118570
|
/*******************************************************************************
|
|
118209
118571
|
*
|
|
118210
118572
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118535,8 +118897,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
118535
118897
|
x_ite_Namespace .add ("NoneViewer", "x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
|
|
118536
118898
|
/* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
|
|
118537
118899
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
118538
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
118539
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
118900
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(354);
|
|
118901
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(812);
|
|
118540
118902
|
/*******************************************************************************
|
|
118541
118903
|
*
|
|
118542
118904
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119675,8 +120037,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
119675
120037
|
x_ite_Namespace .add ("X3DPickingContext", "x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
|
|
119676
120038
|
/* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
|
|
119677
120039
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
119678
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
119679
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
120040
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(354);
|
|
120041
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(812);
|
|
119680
120042
|
/*******************************************************************************
|
|
119681
120043
|
*
|
|
119682
120044
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -120977,7 +121339,7 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
|
|
|
120977
121339
|
x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
|
|
120978
121340
|
/* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
|
|
120979
121341
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
120980
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
121342
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(812);
|
|
120981
121343
|
/*******************************************************************************
|
|
120982
121344
|
*
|
|
120983
121345
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -121032,7 +121394,6 @@ x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFram
|
|
|
121032
121394
|
|
|
121033
121395
|
|
|
121034
121396
|
const
|
|
121035
|
-
_viewport = Symbol (),
|
|
121036
121397
|
_frameBuffer = Symbol (),
|
|
121037
121398
|
_transmissionBuffer = Symbol (),
|
|
121038
121399
|
_resizer = Symbol (),
|
|
@@ -121118,7 +121479,7 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
121118
121479
|
},
|
|
121119
121480
|
getMaxClipPlanes ()
|
|
121120
121481
|
{
|
|
121121
|
-
return
|
|
121482
|
+
return maxClipPlanes;
|
|
121122
121483
|
},
|
|
121123
121484
|
getDepthSize ()
|
|
121124
121485
|
{
|
|
@@ -121984,7 +122345,7 @@ const X3DSoundContext_default_ = X3DSoundContext;
|
|
|
121984
122345
|
x_ite_Namespace .add ("X3DSoundContext", "x_ite/Browser/Sound/X3DSoundContext", X3DSoundContext_default_);
|
|
121985
122346
|
/* harmony default export */ const Sound_X3DSoundContext = (X3DSoundContext_default_);
|
|
121986
122347
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/KTXDecoder.js
|
|
121987
|
-
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(
|
|
122348
|
+
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(812);
|
|
121988
122349
|
const KTXDecoder_default_ = class KTXDecoder
|
|
121989
122350
|
{
|
|
121990
122351
|
constructor (gl, externalKtxlib, scriptDir)
|
|
@@ -123598,7 +123959,7 @@ const Components_default_ = Components;
|
|
|
123598
123959
|
x_ite_Namespace .add ("Components", "x_ite/Components", Components_default_);
|
|
123599
123960
|
/* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
|
|
123600
123961
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
|
|
123601
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
123962
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(812);
|
|
123602
123963
|
/*******************************************************************************
|
|
123603
123964
|
* MIT License
|
|
123604
123965
|
*
|
|
@@ -124866,7 +125227,7 @@ const FieldTypes_default_ = new Configuration_FieldTypesArray (Object .values (x
|
|
|
124866
125227
|
x_ite_Namespace .add ("FieldTypes", "x_ite/Configuration/FieldTypes", FieldTypes_default_);
|
|
124867
125228
|
/* harmony default export */ const FieldTypes = (FieldTypes_default_);
|
|
124868
125229
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
|
|
124869
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
125230
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(812);
|
|
124870
125231
|
/*******************************************************************************
|
|
124871
125232
|
*
|
|
124872
125233
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -124937,6 +125298,7 @@ x_ite_Namespace .add ("FieldTypes", "x_ite/Configuration/FieldTypes", FieldTypes
|
|
|
124937
125298
|
|
|
124938
125299
|
|
|
124939
125300
|
|
|
125301
|
+
|
|
124940
125302
|
|
|
124941
125303
|
|
|
124942
125304
|
const
|
|
@@ -125135,7 +125497,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125135
125497
|
{
|
|
125136
125498
|
function loadComponents (components, seen)
|
|
125137
125499
|
{
|
|
125138
|
-
return Promise .all (components .map (component => loadComponent .call (this, component, seen)))
|
|
125500
|
+
return Promise .all (components .map (component => loadComponent .call (this, component, seen)));
|
|
125139
125501
|
}
|
|
125140
125502
|
|
|
125141
125503
|
async function loadComponent ({ name, providerURL, external, dependencies }, seen)
|
|
@@ -125151,7 +125513,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125151
125513
|
{
|
|
125152
125514
|
case "NODE":
|
|
125153
125515
|
{
|
|
125154
|
-
__webpack_require__.g .require (__webpack_require__.g .require ("url") .fileURLToPath (providerURL))
|
|
125516
|
+
__webpack_require__.g .require (__webpack_require__.g .require ("url") .fileURLToPath (providerURL));
|
|
125155
125517
|
break;
|
|
125156
125518
|
}
|
|
125157
125519
|
case "BROWSER":
|
|
@@ -125186,7 +125548,10 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125186
125548
|
}
|
|
125187
125549
|
|
|
125188
125550
|
// Load array of component names.
|
|
125189
|
-
return
|
|
125551
|
+
return Promise .all ([
|
|
125552
|
+
MikkTSpace .initialize (), // Required by Rendering component.
|
|
125553
|
+
loadComponents .call (this, component, new Set ()),
|
|
125554
|
+
]);
|
|
125190
125555
|
};
|
|
125191
125556
|
})(),
|
|
125192
125557
|
addConcreteNode (ConcreteNode)
|
|
@@ -125688,88 +126053,50 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125688
126053
|
|
|
125689
126054
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125690
126055
|
|
|
125691
|
-
|
|
125692
|
-
return;
|
|
125693
|
-
|
|
125694
|
-
layerNode .viewAll (transitionTime, 1, this .getBrowserOption ("StraightenHorizon"));
|
|
126056
|
+
layerNode ?.viewAll (transitionTime, 1, this .getBrowserOption ("StraightenHorizon"));
|
|
125695
126057
|
},
|
|
125696
126058
|
firstViewpoint (layerNode)
|
|
125697
126059
|
{
|
|
125698
126060
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125699
126061
|
|
|
125700
|
-
const viewpoints = layerNode
|
|
126062
|
+
const viewpoints = layerNode ?.getUserViewpoints ();
|
|
125701
126063
|
|
|
125702
|
-
if (viewpoints
|
|
125703
|
-
this .bindViewpoint (layerNode, viewpoints
|
|
126064
|
+
if (viewpoints ?.length)
|
|
126065
|
+
this .bindViewpoint (layerNode, viewpoints .at (0));
|
|
125704
126066
|
},
|
|
125705
126067
|
previousViewpoint (layerNode)
|
|
125706
126068
|
{
|
|
125707
126069
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125708
126070
|
|
|
125709
|
-
|
|
125710
|
-
return;
|
|
126071
|
+
const viewpoints = layerNode ?.getUserViewpoints ();
|
|
125711
126072
|
|
|
125712
|
-
|
|
125713
|
-
|
|
125714
|
-
if (viewpoints .length === 0)
|
|
126073
|
+
if (!viewpoints ?.length)
|
|
125715
126074
|
return;
|
|
125716
126075
|
|
|
125717
|
-
|
|
125718
|
-
{
|
|
125719
|
-
if (viewpoints [i] ._isBound .getValue ())
|
|
125720
|
-
break;
|
|
125721
|
-
}
|
|
126076
|
+
const i = viewpoints .findIndex (viewpointNode => viewpointNode ._isBound .getValue ());
|
|
125722
126077
|
|
|
125723
|
-
|
|
125724
|
-
{
|
|
125725
|
-
if (i === 0)
|
|
125726
|
-
this .bindViewpoint (layerNode, viewpoints .at (-1));
|
|
125727
|
-
|
|
125728
|
-
else
|
|
125729
|
-
this .bindViewpoint (layerNode, viewpoints [i - 1]);
|
|
125730
|
-
}
|
|
125731
|
-
else
|
|
125732
|
-
this .bindViewpoint (layerNode, viewpoints .at (-1));
|
|
126078
|
+
this .bindViewpoint (layerNode, viewpoints .at (i > -1 ? i - 1 : -1));
|
|
125733
126079
|
},
|
|
125734
126080
|
nextViewpoint (layerNode)
|
|
125735
126081
|
{
|
|
125736
126082
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125737
126083
|
|
|
125738
|
-
|
|
125739
|
-
return;
|
|
125740
|
-
|
|
125741
|
-
const viewpoints = layerNode .getUserViewpoints ();
|
|
126084
|
+
const viewpoints = layerNode ?.getUserViewpoints ();
|
|
125742
126085
|
|
|
125743
|
-
if (viewpoints
|
|
126086
|
+
if (!viewpoints ?.length)
|
|
125744
126087
|
return;
|
|
125745
126088
|
|
|
125746
|
-
|
|
125747
|
-
{
|
|
125748
|
-
if (viewpoints [i] ._isBound .getValue ())
|
|
125749
|
-
break;
|
|
125750
|
-
}
|
|
126089
|
+
const i = viewpoints .findIndex (viewpointNode => viewpointNode ._isBound .getValue ());
|
|
125751
126090
|
|
|
125752
|
-
|
|
125753
|
-
{
|
|
125754
|
-
if (i === viewpoints .length - 1)
|
|
125755
|
-
this .bindViewpoint (layerNode, viewpoints [0]);
|
|
125756
|
-
|
|
125757
|
-
else
|
|
125758
|
-
this .bindViewpoint (layerNode, viewpoints [i + 1]);
|
|
125759
|
-
}
|
|
125760
|
-
else
|
|
125761
|
-
this .bindViewpoint (layerNode, viewpoints [0]);
|
|
126091
|
+
this .bindViewpoint (layerNode, viewpoints .at ((i + 1) % viewpoints .length));
|
|
125762
126092
|
},
|
|
125763
126093
|
lastViewpoint (layerNode)
|
|
125764
126094
|
{
|
|
125765
126095
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125766
126096
|
|
|
125767
|
-
|
|
125768
|
-
return;
|
|
126097
|
+
const viewpoints = layerNode ?.getUserViewpoints ();
|
|
125769
126098
|
|
|
125770
|
-
|
|
125771
|
-
|
|
125772
|
-
if (viewpoints .length)
|
|
126099
|
+
if (viewpoints ?.length)
|
|
125773
126100
|
this .bindViewpoint (layerNode, viewpoints .at (-1));
|
|
125774
126101
|
},
|
|
125775
126102
|
changeViewpoint (layerNode, name)
|
|
@@ -125782,17 +126109,11 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125782
126109
|
|
|
125783
126110
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125784
126111
|
|
|
125785
|
-
|
|
125786
|
-
|
|
125787
|
-
|
|
125788
|
-
for (const viewpointNode of layerNode .getViewpoints () .get ())
|
|
125789
|
-
{
|
|
125790
|
-
if (viewpointNode .getName () !== name)
|
|
125791
|
-
continue;
|
|
126112
|
+
const viewpointNode = layerNode ?.getViewpoints () .get ()
|
|
126113
|
+
.find (viewpointNode => viewpointNode .getName () === name);
|
|
125792
126114
|
|
|
126115
|
+
if (viewpointNode)
|
|
125793
126116
|
this .bindViewpoint (layerNode, viewpointNode);
|
|
125794
|
-
break;
|
|
125795
|
-
}
|
|
125796
126117
|
},
|
|
125797
126118
|
bindViewpoint (layerNode, viewpointNode)
|
|
125798
126119
|
{
|
|
@@ -125968,7 +126289,7 @@ const X3DBrowser_default_ = X3DBrowser;
|
|
|
125968
126289
|
x_ite_Namespace .add ("X3DBrowser", "x_ite/Browser/X3DBrowser", X3DBrowser_default_);
|
|
125969
126290
|
/* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
|
|
125970
126291
|
;// CONCATENATED MODULE: ./src/x_ite/X3DCanvasElement.js
|
|
125971
|
-
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(
|
|
126292
|
+
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(812);
|
|
125972
126293
|
/*******************************************************************************
|
|
125973
126294
|
*
|
|
125974
126295
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -126075,6 +126396,8 @@ class X3DCanvasElement extends HTMLElement
|
|
|
126075
126396
|
"splashScreen",
|
|
126076
126397
|
"splashscreen",
|
|
126077
126398
|
"src",
|
|
126399
|
+
"textCompression",
|
|
126400
|
+
"textcompression",
|
|
126078
126401
|
"timings",
|
|
126079
126402
|
"toneMapping",
|
|
126080
126403
|
"tonemapping",
|
|
@@ -126118,8 +126441,8 @@ const X3DCanvasElement_default_ = X3DCanvasElement;
|
|
|
126118
126441
|
x_ite_Namespace .add ("X3DCanvasElement", "x_ite/X3DCanvasElement", X3DCanvasElement_default_);
|
|
126119
126442
|
/* harmony default export */ const x_ite_X3DCanvasElement = (X3DCanvasElement_default_);
|
|
126120
126443
|
;// CONCATENATED MODULE: ./src/lib/jquery.js
|
|
126121
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
126122
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
126444
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(812);
|
|
126445
|
+
/* provided dependency */ var pako = __webpack_require__(552);
|
|
126123
126446
|
Object .assign (jquery_$,
|
|
126124
126447
|
{
|
|
126125
126448
|
decodeText (input)
|
|
@@ -126196,14 +126519,14 @@ const jquery_default_ = jquery_$;
|
|
|
126196
126519
|
x_ite_Namespace .add ("jquery", "lib/jquery", jquery_default_);
|
|
126197
126520
|
/* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
|
|
126198
126521
|
;// CONCATENATED MODULE: ./src/lib/libtess.js
|
|
126199
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
126522
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(193);
|
|
126200
126523
|
const libtess_default_ = libtess_libtess;
|
|
126201
126524
|
;
|
|
126202
126525
|
|
|
126203
126526
|
x_ite_Namespace .add ("libtess", "lib/libtess", libtess_default_);
|
|
126204
126527
|
/* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
|
|
126205
126528
|
;// CONCATENATED MODULE: ./src/x_ite/X3D.js
|
|
126206
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
126529
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(812);
|
|
126207
126530
|
/*******************************************************************************
|
|
126208
126531
|
*
|
|
126209
126532
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -126511,7 +126834,7 @@ Object .assign (X3D,
|
|
|
126511
126834
|
|
|
126512
126835
|
// Assign X3D to global namespace.
|
|
126513
126836
|
|
|
126514
|
-
window [Symbol .for ("X_ITE.X3D-10.0
|
|
126837
|
+
window [Symbol .for ("X_ITE.X3D-10.2.0")] = x_ite_X3D;
|
|
126515
126838
|
|
|
126516
126839
|
customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
|
|
126517
126840
|
|