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.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* X_ITE v10.0
|
|
1
|
+
/* X_ITE v10.2.0 */(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
3
|
module.exports = factory();
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/
|
|
14
|
+
/***/ 48:
|
|
15
15
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
16
|
|
|
17
|
-
/* provided dependency */ var jQuery = __webpack_require__(
|
|
17
|
+
/* provided dependency */ var jQuery = __webpack_require__(812);
|
|
18
18
|
/**
|
|
19
19
|
* @preserve jquery.fullscreen 1.1.5
|
|
20
20
|
* https://github.com/code-lts/jquery-fullscreen-plugin
|
|
@@ -210,7 +210,7 @@ installFullScreenHandlers();
|
|
|
210
210
|
|
|
211
211
|
/***/ }),
|
|
212
212
|
|
|
213
|
-
/***/
|
|
213
|
+
/***/ 354:
|
|
214
214
|
/***/ ((module, exports, __webpack_require__) => {
|
|
215
215
|
|
|
216
216
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -224,7 +224,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
224
224
|
(function (factory) {
|
|
225
225
|
if ( true ) {
|
|
226
226
|
// AMD. Register as an anonymous module.
|
|
227
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(
|
|
227
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(812)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
228
228
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
229
229
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
230
230
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
@@ -435,7 +435,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
435
435
|
|
|
436
436
|
/***/ }),
|
|
437
437
|
|
|
438
|
-
/***/
|
|
438
|
+
/***/ 812:
|
|
439
439
|
/***/ (function(module, exports) {
|
|
440
440
|
|
|
441
441
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -11159,7 +11159,7 @@ return jQuery;
|
|
|
11159
11159
|
|
|
11160
11160
|
/***/ }),
|
|
11161
11161
|
|
|
11162
|
-
/***/
|
|
11162
|
+
/***/ 193:
|
|
11163
11163
|
/***/ ((module) => {
|
|
11164
11164
|
|
|
11165
11165
|
/**
|
|
@@ -15938,7 +15938,7 @@ if (true) {
|
|
|
15938
15938
|
|
|
15939
15939
|
/***/ }),
|
|
15940
15940
|
|
|
15941
|
-
/***/
|
|
15941
|
+
/***/ 552:
|
|
15942
15942
|
/***/ (function(__unused_webpack_module, exports) {
|
|
15943
15943
|
|
|
15944
15944
|
|
|
@@ -19183,7 +19183,7 @@ if (true) {
|
|
|
19183
19183
|
|
|
19184
19184
|
/***/ }),
|
|
19185
19185
|
|
|
19186
|
-
/***/
|
|
19186
|
+
/***/ 807:
|
|
19187
19187
|
/***/ (function(module, exports) {
|
|
19188
19188
|
|
|
19189
19189
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -20311,7 +20311,7 @@ Object .defineProperty (Namespace, "add",
|
|
|
20311
20311
|
}
|
|
20312
20312
|
else
|
|
20313
20313
|
{
|
|
20314
|
-
const X3D = window [Symbol .for ("X_ITE.X3D-10.0
|
|
20314
|
+
const X3D = window [Symbol .for ("X_ITE.X3D-10.2.0")];
|
|
20315
20315
|
|
|
20316
20316
|
if (X3D)
|
|
20317
20317
|
X3D [name] = module;
|
|
@@ -20654,23 +20654,6 @@ const Algorithm =
|
|
|
20654
20654
|
{
|
|
20655
20655
|
return lhs > rhs ? 1 : lhs < rhs ? -1 : 0;
|
|
20656
20656
|
},
|
|
20657
|
-
// lexicographicallyCompare (lhs, rhs)
|
|
20658
|
-
// {
|
|
20659
|
-
// const
|
|
20660
|
-
// length1 = lhs .length,
|
|
20661
|
-
// length2 = rhs .length;
|
|
20662
|
-
|
|
20663
|
-
// for (let i = 0; i < length1 && i < length2; ++ i)
|
|
20664
|
-
// {
|
|
20665
|
-
// if (lhs [i] < rhs [i])
|
|
20666
|
-
// return -1;
|
|
20667
|
-
|
|
20668
|
-
// if (rhs [i] < lhs [i])
|
|
20669
|
-
// return 1;
|
|
20670
|
-
// }
|
|
20671
|
-
|
|
20672
|
-
// return Algorithm .cmp (length1, length2);
|
|
20673
|
-
// },
|
|
20674
20657
|
less (lhs, rhs)
|
|
20675
20658
|
{
|
|
20676
20659
|
return lhs < rhs;
|
|
@@ -30149,6 +30132,7 @@ x_ite_Namespace .add ("SFVec3", "x_ite/Fields/SFVec3", SFVec3_default_);
|
|
|
30149
30132
|
|
|
30150
30133
|
|
|
30151
30134
|
|
|
30135
|
+
|
|
30152
30136
|
const
|
|
30153
30137
|
SFVec3d = Fields_SFVec3 .SFVec3d,
|
|
30154
30138
|
SFVec3f = Fields_SFVec3 .SFVec3f,
|
|
@@ -30236,6 +30220,25 @@ Object .assign (Object .setPrototypeOf (SFRotation .prototype, Base_X3DField .pr
|
|
|
30236
30220
|
{
|
|
30237
30221
|
return new SFMatrix3f (this .getValue () .getMatrix ());
|
|
30238
30222
|
},
|
|
30223
|
+
setQuaternion: (function ()
|
|
30224
|
+
{
|
|
30225
|
+
const q = new Numbers_Quaternion ();
|
|
30226
|
+
|
|
30227
|
+
return function (x, y, z, w)
|
|
30228
|
+
{
|
|
30229
|
+
this .getValue () .setQuaternion (q .set (x, y, z, w));
|
|
30230
|
+
this .addEvent ();
|
|
30231
|
+
};
|
|
30232
|
+
})(),
|
|
30233
|
+
getQuaternion: (function ()
|
|
30234
|
+
{
|
|
30235
|
+
const q = new Numbers_Quaternion ();
|
|
30236
|
+
|
|
30237
|
+
return function ()
|
|
30238
|
+
{
|
|
30239
|
+
return [... this .getValue () .getQuaternion (q)];
|
|
30240
|
+
};
|
|
30241
|
+
})(),
|
|
30239
30242
|
inverse ()
|
|
30240
30243
|
{
|
|
30241
30244
|
return new SFRotation (this .getValue () .copy () .inverse ());
|
|
@@ -34277,7 +34280,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
|
|
|
34277
34280
|
x_ite_Namespace .add ("X3DBaseNode", "x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
|
|
34278
34281
|
/* harmony default export */ const Base_X3DBaseNode = (X3DBaseNode_default_);
|
|
34279
34282
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Legacy.js
|
|
34280
|
-
/* provided dependency */ var $ = __webpack_require__(
|
|
34283
|
+
/* provided dependency */ var $ = __webpack_require__(812);
|
|
34281
34284
|
/*******************************************************************************
|
|
34282
34285
|
*
|
|
34283
34286
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -34414,7 +34417,7 @@ x_ite_Namespace .add ("Legacy", "x_ite/Browser/Legacy", Legacy_default_);
|
|
|
34414
34417
|
*
|
|
34415
34418
|
******************************************************************************/
|
|
34416
34419
|
|
|
34417
|
-
const BROWSER_VERSION_default_ = "10.0
|
|
34420
|
+
const BROWSER_VERSION_default_ = "10.2.0";
|
|
34418
34421
|
;
|
|
34419
34422
|
|
|
34420
34423
|
x_ite_Namespace .add ("BROWSER_VERSION", "x_ite/BROWSER_VERSION", BROWSER_VERSION_default_);
|
|
@@ -37600,7 +37603,7 @@ const X3DBindableNode_default_ = X3DBindableNode;
|
|
|
37600
37603
|
x_ite_Namespace .add ("X3DBindableNode", "x_ite/Components/Core/X3DBindableNode", X3DBindableNode_default_);
|
|
37601
37604
|
/* harmony default export */ const Core_X3DBindableNode = (X3DBindableNode_default_);
|
|
37602
37605
|
;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
|
|
37603
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
37606
|
+
/* provided dependency */ var libtess = __webpack_require__(193);
|
|
37604
37607
|
/*******************************************************************************
|
|
37605
37608
|
*
|
|
37606
37609
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -40170,7 +40173,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
|
|
|
40170
40173
|
x_ite_Namespace .add ("X3DProtoDeclaration", "x_ite/Prototype/X3DProtoDeclaration", X3DProtoDeclaration_default_);
|
|
40171
40174
|
/* harmony default export */ const Prototype_X3DProtoDeclaration = (X3DProtoDeclaration_default_);
|
|
40172
40175
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
|
|
40173
|
-
/* provided dependency */ var X3DParser_$ = __webpack_require__(
|
|
40176
|
+
/* provided dependency */ var X3DParser_$ = __webpack_require__(812);
|
|
40174
40177
|
/*******************************************************************************
|
|
40175
40178
|
*
|
|
40176
40179
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -40428,7 +40431,7 @@ const Expressions_default_ = Expressions;
|
|
|
40428
40431
|
x_ite_Namespace .add ("Expressions", "x_ite/Parser/Expressions", Expressions_default_);
|
|
40429
40432
|
/* harmony default export */ const Parser_Expressions = (Expressions_default_);
|
|
40430
40433
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/VRMLParser.js
|
|
40431
|
-
/* provided dependency */ var VRMLParser_$ = __webpack_require__(
|
|
40434
|
+
/* provided dependency */ var VRMLParser_$ = __webpack_require__(812);
|
|
40432
40435
|
/*******************************************************************************
|
|
40433
40436
|
*
|
|
40434
40437
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -43128,7 +43131,7 @@ const VRMLParser_default_ = VRMLParser;
|
|
|
43128
43131
|
x_ite_Namespace .add ("VRMLParser", "x_ite/Parser/VRMLParser", VRMLParser_default_);
|
|
43129
43132
|
/* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
|
|
43130
43133
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
|
|
43131
|
-
/* provided dependency */ var XMLParser_$ = __webpack_require__(
|
|
43134
|
+
/* provided dependency */ var XMLParser_$ = __webpack_require__(812);
|
|
43132
43135
|
/*******************************************************************************
|
|
43133
43136
|
*
|
|
43134
43137
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -45304,7 +45307,7 @@ const URLs_default_ = URLs;
|
|
|
45304
45307
|
x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
|
|
45305
45308
|
/* harmony default export */ const Networking_URLs = (URLs_default_);
|
|
45306
45309
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
|
|
45307
|
-
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(
|
|
45310
|
+
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(812);
|
|
45308
45311
|
/*******************************************************************************
|
|
45309
45312
|
*
|
|
45310
45313
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -45365,9 +45368,8 @@ x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
|
|
|
45365
45368
|
|
|
45366
45369
|
|
|
45367
45370
|
|
|
45368
|
-
|
|
45369
45371
|
// https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html
|
|
45370
|
-
// https://github.com/KhronosGroup/glTF-Sample-
|
|
45372
|
+
// https://github.com/KhronosGroup/glTF-Sample-Assets
|
|
45371
45373
|
|
|
45372
45374
|
const SAMPLES_PER_SECOND = 30; // in 1/s
|
|
45373
45375
|
|
|
@@ -45387,7 +45389,6 @@ function GLTF2Parser (scene)
|
|
|
45387
45389
|
this .extensions = new Set ();
|
|
45388
45390
|
this .envLights = [ ];
|
|
45389
45391
|
this .lights = [ ];
|
|
45390
|
-
this .usedLights = 0;
|
|
45391
45392
|
this .materialVariants = [ ];
|
|
45392
45393
|
this .materialVariantNodes = [ ];
|
|
45393
45394
|
this .buffers = [ ];
|
|
@@ -45398,11 +45399,9 @@ function GLTF2Parser (scene)
|
|
|
45398
45399
|
this .textureTransformNodes = [ ];
|
|
45399
45400
|
this .meshes = [ ];
|
|
45400
45401
|
this .cameras = [ ];
|
|
45401
|
-
this .viewpointNodes = [ ];
|
|
45402
45402
|
this .nodes = [ ];
|
|
45403
45403
|
this .skins = [ ];
|
|
45404
45404
|
this .joints = new Set ();
|
|
45405
|
-
this .animations = 0;
|
|
45406
45405
|
}
|
|
45407
45406
|
|
|
45408
45407
|
Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser .prototype),
|
|
@@ -45523,7 +45522,12 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45523
45522
|
|
|
45524
45523
|
this .viewpointsCenterOfRotation (this .getScene ());
|
|
45525
45524
|
this .optimizeSceneGraph (this .getScene () .getRootNodes ());
|
|
45526
|
-
|
|
45525
|
+
|
|
45526
|
+
this .exportGroup ("Viewpoints", this .cameras);
|
|
45527
|
+
this .exportGroup ("EnvironmentLights", this .envLights);
|
|
45528
|
+
this .exportGroup ("Lights", this .lights);
|
|
45529
|
+
this .exportGroup ("Animations", glTF .animations);
|
|
45530
|
+
|
|
45527
45531
|
this .materialVariantsSwitch ();
|
|
45528
45532
|
|
|
45529
45533
|
return this .getScene ();
|
|
@@ -45602,6 +45606,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45602
45606
|
case "KHR_materials_pbrSpecularGlossiness":
|
|
45603
45607
|
case "KHR_materials_anisotropy":
|
|
45604
45608
|
case "KHR_materials_clearcoat":
|
|
45609
|
+
case "KHR_materials_diffuse_transmission":
|
|
45605
45610
|
case "KHR_materials_dispersion":
|
|
45606
45611
|
case "KHR_materials_emissive_strength":
|
|
45607
45612
|
case "KHR_materials_ior":
|
|
@@ -45680,7 +45685,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45680
45685
|
const
|
|
45681
45686
|
scene = this .getScene (),
|
|
45682
45687
|
lightNode = scene .createNode ("EnvironmentLight", false),
|
|
45683
|
-
name = `EnvironmentLight${id}`,
|
|
45688
|
+
name = `EnvironmentLight${id + 1}`,
|
|
45684
45689
|
quaternion = new Numbers_Quaternion ();
|
|
45685
45690
|
|
|
45686
45691
|
scene .addNamedNode (scene .getUniqueName (name), lightNode);
|
|
@@ -45770,7 +45775,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45770
45775
|
|
|
45771
45776
|
const
|
|
45772
45777
|
scene = this .getScene (),
|
|
45773
|
-
name = this .sanitizeName (light .name) || `Light${id}`;
|
|
45778
|
+
name = this .sanitizeName (light .name) || `Light${id + 1}`;
|
|
45774
45779
|
|
|
45775
45780
|
const color = new Numbers_Color3 (1, 1, 1);
|
|
45776
45781
|
|
|
@@ -45944,66 +45949,13 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45944
45949
|
length = Math .min (stride * count, (bufferView .byteLength - byteOffset) / TypedArray .BYTES_PER_ELEMENT),
|
|
45945
45950
|
array = new TypedArray (bufferView .buffer, byteOffset, length);
|
|
45946
45951
|
|
|
45947
|
-
|
|
45948
|
-
{
|
|
45949
|
-
const value = this .sparseObject (accessor .sparse, array, components);
|
|
45950
|
-
|
|
45951
|
-
Object .defineProperty (accessor, "array", { value: value });
|
|
45952
|
-
|
|
45953
|
-
return value;
|
|
45954
|
-
}
|
|
45955
|
-
else
|
|
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
|
-
const value = this .sparseObject (accessor .sparse, dense, components);
|
|
45952
|
+
let value;
|
|
45968
45953
|
|
|
45969
|
-
|
|
45954
|
+
value = this .denseArray (TypedArray, components, count, stride, array);
|
|
45955
|
+
value = this .sparseObject (accessor, components, value);
|
|
45956
|
+
value = this .normalizedArray (accessor, value);
|
|
45970
45957
|
|
|
45971
|
-
|
|
45972
|
-
}
|
|
45973
|
-
},
|
|
45974
|
-
configurable: true,
|
|
45975
|
-
});
|
|
45976
|
-
|
|
45977
|
-
Object .defineProperty (accessor, "normalizedArray",
|
|
45978
|
-
{
|
|
45979
|
-
get: () =>
|
|
45980
|
-
{
|
|
45981
|
-
switch (accessor .componentType)
|
|
45982
|
-
{
|
|
45983
|
-
case 5120: // Int8Array
|
|
45984
|
-
var value = Float32Array .from (accessor .array, v => Math .max (v / 127, -1));
|
|
45985
|
-
break;
|
|
45986
|
-
case 5121: // Uint8Array
|
|
45987
|
-
var value = Float32Array .from (accessor .array, v => v / 255);
|
|
45988
|
-
break;
|
|
45989
|
-
case 5122: // Int16Array
|
|
45990
|
-
var value = Float32Array .from (accessor .array, v => Math .max (v / 32767, -1));
|
|
45991
|
-
break;
|
|
45992
|
-
case 5123: // Uint16Array
|
|
45993
|
-
var value = Float32Array .from (accessor .array, v => v / 65535);
|
|
45994
|
-
break;
|
|
45995
|
-
case 5124: // Int32Array
|
|
45996
|
-
var value = Float32Array .from (accessor .array, v => Math .max (v / 2147483647, -1));
|
|
45997
|
-
break;
|
|
45998
|
-
case 5125: // Uint32Array
|
|
45999
|
-
var value = Float32Array .from (accessor .array, v => v / 4294967295);
|
|
46000
|
-
break;
|
|
46001
|
-
case 5126: // Float32Array
|
|
46002
|
-
var value = accessor .array;
|
|
46003
|
-
break;
|
|
46004
|
-
}
|
|
46005
|
-
|
|
46006
|
-
Object .defineProperty (accessor, "normalizedArray", { value: value });
|
|
45958
|
+
Object .defineProperty (accessor, "array", { value });
|
|
46007
45959
|
|
|
46008
45960
|
return value;
|
|
46009
45961
|
},
|
|
@@ -46011,6 +45963,23 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46011
45963
|
});
|
|
46012
45964
|
};
|
|
46013
45965
|
})(),
|
|
45966
|
+
denseArray (TypedArray, components, count, stride, array)
|
|
45967
|
+
{
|
|
45968
|
+
if (stride === components)
|
|
45969
|
+
return array;
|
|
45970
|
+
|
|
45971
|
+
const
|
|
45972
|
+
length = count * components,
|
|
45973
|
+
dense = new TypedArray (length);
|
|
45974
|
+
|
|
45975
|
+
for (let i = 0, j = 0; i < length; j += stride)
|
|
45976
|
+
{
|
|
45977
|
+
for (let c = 0; c < components; ++ c, ++ i)
|
|
45978
|
+
dense [i] = array [j + c];
|
|
45979
|
+
}
|
|
45980
|
+
|
|
45981
|
+
return dense;
|
|
45982
|
+
},
|
|
46014
45983
|
sparseObject: (() =>
|
|
46015
45984
|
{
|
|
46016
45985
|
const TypedArrays = new Map ([
|
|
@@ -46019,7 +45988,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46019
45988
|
[5125, Uint32Array],
|
|
46020
45989
|
]);
|
|
46021
45990
|
|
|
46022
|
-
return function (sparse,
|
|
45991
|
+
return function ({ sparse }, components, array)
|
|
46023
45992
|
{
|
|
46024
45993
|
if (!(sparse instanceof Object))
|
|
46025
45994
|
return array;
|
|
@@ -46055,6 +46024,29 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46055
46024
|
return array;
|
|
46056
46025
|
};
|
|
46057
46026
|
})(),
|
|
46027
|
+
normalizedArray ({ normalized, componentType }, array)
|
|
46028
|
+
{
|
|
46029
|
+
if (!normalized)
|
|
46030
|
+
return array;
|
|
46031
|
+
|
|
46032
|
+
switch (componentType)
|
|
46033
|
+
{
|
|
46034
|
+
case 5120: // Int8Array
|
|
46035
|
+
return Float32Array .from (array, v => Math .max (v / 127, -1));
|
|
46036
|
+
case 5121: // Uint8Array
|
|
46037
|
+
return Float32Array .from (array, v => v / 255);
|
|
46038
|
+
case 5122: // Int16Array
|
|
46039
|
+
return Float32Array .from (array, v => Math .max (v / 32767, -1));
|
|
46040
|
+
case 5123: // Uint16Array
|
|
46041
|
+
return Float32Array .from (array, v => v / 65535);
|
|
46042
|
+
case 5124: // Int32Array
|
|
46043
|
+
return Float32Array .from (array, v => Math .max (v / 2147483647, -1));
|
|
46044
|
+
case 5125: // Uint32Array
|
|
46045
|
+
return Float32Array .from (array, v => v / 4294967295);
|
|
46046
|
+
case 5126: // Float32Array
|
|
46047
|
+
return array;
|
|
46048
|
+
}
|
|
46049
|
+
},
|
|
46058
46050
|
samplersArray (samplers)
|
|
46059
46051
|
{
|
|
46060
46052
|
if (!(samplers instanceof Array))
|
|
@@ -46245,9 +46237,9 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46245
46237
|
if (material .appearanceNode)
|
|
46246
46238
|
return material .appearanceNode;
|
|
46247
46239
|
|
|
46248
|
-
const texCoordIndices = this .
|
|
46240
|
+
const texCoordIndices = this .getTexCoordIndices ("", material);
|
|
46249
46241
|
|
|
46250
|
-
this .texCoordIndex = Array .from (texCoordIndices) .reduce (Math .max, -1);
|
|
46242
|
+
this .texCoordIndex = Array .from (texCoordIndices) .reduce ((p, c) => Math .max (p, c), -1);
|
|
46251
46243
|
this .textureTransformNodes = [ ];
|
|
46252
46244
|
this .texCoordMappings = new Map ();
|
|
46253
46245
|
this .texCoordOfNode = new Map ();
|
|
@@ -46304,13 +46296,13 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46304
46296
|
appearanceNode ._alphaMode = this .stringValue (material .alphaMode, "OPAQUE");
|
|
46305
46297
|
appearanceNode ._alphaCutoff = this .numberValue (material .alphaCutoff, 0.5);
|
|
46306
46298
|
appearanceNode ._material = this .khrMaterialsUnlitObject (material .extensions ?.KHR_materials_unlit, materialNode);
|
|
46307
|
-
appearanceNode ._textureTransform = this .createMultiTextureTransform (
|
|
46299
|
+
appearanceNode ._textureTransform = this .createMultiTextureTransform (appearanceNode ._material .getValue ());
|
|
46308
46300
|
|
|
46309
46301
|
appearanceNode .setup ();
|
|
46310
46302
|
|
|
46311
46303
|
return material .appearanceNode = appearanceNode;
|
|
46312
46304
|
},
|
|
46313
|
-
|
|
46305
|
+
getTexCoordIndices (key, object, indices = new Set ())
|
|
46314
46306
|
{
|
|
46315
46307
|
if (!(object instanceof Object))
|
|
46316
46308
|
return indices;
|
|
@@ -46319,7 +46311,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46319
46311
|
indices .add (object .texCoord || 0);
|
|
46320
46312
|
|
|
46321
46313
|
for (const [key, value] of Object .entries (object))
|
|
46322
|
-
this .
|
|
46314
|
+
this .getTexCoordIndices (key, value, indices);
|
|
46323
46315
|
|
|
46324
46316
|
return indices;
|
|
46325
46317
|
},
|
|
@@ -46455,6 +46447,9 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46455
46447
|
case "KHR_materials_clearcoat":
|
|
46456
46448
|
this .khrMaterialsClearcoatObject (value, materialNode);
|
|
46457
46449
|
break;
|
|
46450
|
+
case "KHR_materials_diffuse_transmission":
|
|
46451
|
+
this .khrMaterialsDiffuseTransmissionObject (value, materialNode);
|
|
46452
|
+
break;
|
|
46458
46453
|
case "KHR_materials_dispersion":
|
|
46459
46454
|
this .khrMaterialsDispersionObject (value, materialNode);
|
|
46460
46455
|
break;
|
|
@@ -46520,6 +46515,29 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46520
46515
|
|
|
46521
46516
|
materialNode ._extensions .push (extension);
|
|
46522
46517
|
},
|
|
46518
|
+
khrMaterialsDiffuseTransmissionObject (KHR_materials_diffuse_transmission, materialNode)
|
|
46519
|
+
{
|
|
46520
|
+
if (!(KHR_materials_diffuse_transmission instanceof Object))
|
|
46521
|
+
return;
|
|
46522
|
+
|
|
46523
|
+
const extension = this .getScene () .createNode ("DiffuseTransmissionMaterialExtension", false);
|
|
46524
|
+
|
|
46525
|
+
extension ._diffuseTransmission = this .numberValue (KHR_materials_diffuse_transmission .diffuseTransmissionFactor, 0);
|
|
46526
|
+
extension ._diffuseTransmissionTexture = this .textureInfo (KHR_materials_diffuse_transmission .diffuseTransmissionTexture);
|
|
46527
|
+
extension ._diffuseTransmissionTextureMapping = this .textureMapping (KHR_materials_diffuse_transmission .diffuseTransmissionTexture);
|
|
46528
|
+
|
|
46529
|
+
const diffuseTransmissionColorFactor = new Numbers_Color3 ();
|
|
46530
|
+
|
|
46531
|
+
if (this .vectorValue (KHR_materials_diffuse_transmission .diffuseTransmissionColorFactor, diffuseTransmissionColorFactor))
|
|
46532
|
+
extension ._diffuseTransmissionColor = diffuseTransmissionColorFactor;
|
|
46533
|
+
|
|
46534
|
+
extension ._diffuseTransmissionColorTexture = this .textureInfo (KHR_materials_diffuse_transmission .diffuseTransmissionColorTexture);
|
|
46535
|
+
extension ._diffuseTransmissionColorTextureMapping = this .textureMapping (KHR_materials_diffuse_transmission .diffuseTransmissionColorTexture);
|
|
46536
|
+
|
|
46537
|
+
extension .setup ();
|
|
46538
|
+
|
|
46539
|
+
materialNode ._extensions .push (extension);
|
|
46540
|
+
},
|
|
46523
46541
|
khrMaterialsDispersionObject (KHR_materials_dispersion, materialNode)
|
|
46524
46542
|
{
|
|
46525
46543
|
if (!(KHR_materials_dispersion instanceof Object))
|
|
@@ -46715,8 +46733,8 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46715
46733
|
textureTransformNode = scene .createNode ("TextureTransformMatrix3D", false),
|
|
46716
46734
|
mapping = `TEXCOORD_${this .texCoordIndex + this .textureTransformNodes .length + 1}`;
|
|
46717
46735
|
|
|
46718
|
-
textureTransformNode ._mapping
|
|
46719
|
-
textureTransformNode ._matrix
|
|
46736
|
+
textureTransformNode ._mapping = mapping;
|
|
46737
|
+
textureTransformNode ._matrix = matrix;
|
|
46720
46738
|
|
|
46721
46739
|
textureTransformNode .setup ();
|
|
46722
46740
|
|
|
@@ -46796,9 +46814,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46796
46814
|
shapeNode = this .createShape (primitive, weights, skin, EXT_mesh_gpu_instancing),
|
|
46797
46815
|
variantsNode = this .khrMaterialsVariantsExtension (primitive .extensions, shapeNode);
|
|
46798
46816
|
|
|
46799
|
-
if (variantsNode)
|
|
46800
|
-
variantsNode ._children [this .materialVariants .length] = shapeNode;
|
|
46801
|
-
|
|
46802
46817
|
shapeNodes .push (primitive .shapeNode = variantsNode ?? shapeNode);
|
|
46803
46818
|
},
|
|
46804
46819
|
attributesObject (attributes)
|
|
@@ -46854,15 +46869,15 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46854
46869
|
if (!this .draco)
|
|
46855
46870
|
return;
|
|
46856
46871
|
|
|
46857
|
-
function indicesCallback (
|
|
46872
|
+
function indicesCallback (value)
|
|
46858
46873
|
{
|
|
46859
|
-
Object .defineProperty (primitive .indices, "array", { value
|
|
46874
|
+
Object .defineProperty (primitive .indices, "array", { value });
|
|
46860
46875
|
}
|
|
46861
46876
|
|
|
46862
|
-
function attributeCallback (key,
|
|
46877
|
+
function attributeCallback (key, value)
|
|
46863
46878
|
{
|
|
46864
46879
|
if (attributes [key])
|
|
46865
|
-
Object .defineProperty (attributes [key], "array", { value
|
|
46880
|
+
Object .defineProperty (attributes [key], "array", { value });
|
|
46866
46881
|
}
|
|
46867
46882
|
|
|
46868
46883
|
const
|
|
@@ -47001,16 +47016,26 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47001
47016
|
scene = this .getScene (),
|
|
47002
47017
|
variantsNode = scene .createNode ("Switch", false);
|
|
47003
47018
|
|
|
47004
|
-
variantsNode ._whichChoice = 0;
|
|
47005
|
-
|
|
47006
47019
|
for (const mapping of mappings)
|
|
47007
47020
|
this .khrMaterialsVariantsObjectMapping (mapping, shapeNode, variantsNode);
|
|
47008
47021
|
|
|
47009
|
-
variantsNode .
|
|
47022
|
+
variantsNode ._whichChoice = this .materialVariants .length;
|
|
47010
47023
|
|
|
47011
47024
|
if (!variantsNode ._children .length)
|
|
47012
47025
|
return;
|
|
47013
47026
|
|
|
47027
|
+
// Last child ist default material.
|
|
47028
|
+
variantsNode ._children [this .materialVariants .length] = shapeNode;
|
|
47029
|
+
|
|
47030
|
+
// Fall back to default material if no active variant.
|
|
47031
|
+
for (const i of variantsNode ._children .keys ())
|
|
47032
|
+
{
|
|
47033
|
+
if (!variantsNode ._children [i])
|
|
47034
|
+
variantsNode ._children [i] = shapeNode;
|
|
47035
|
+
}
|
|
47036
|
+
|
|
47037
|
+
variantsNode .setup ();
|
|
47038
|
+
|
|
47014
47039
|
this .materialVariantNodes .push (variantsNode);
|
|
47015
47040
|
|
|
47016
47041
|
return variantsNode;
|
|
@@ -47049,18 +47074,18 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47049
47074
|
|
|
47050
47075
|
this .cameras = cameras;
|
|
47051
47076
|
},
|
|
47052
|
-
cameraObject (camera)
|
|
47077
|
+
cameraObject (id, camera)
|
|
47053
47078
|
{
|
|
47054
47079
|
if (!(camera instanceof Object))
|
|
47055
47080
|
return null;
|
|
47056
47081
|
|
|
47057
|
-
if (camera .
|
|
47058
|
-
return camera .
|
|
47082
|
+
if (camera .node !== undefined)
|
|
47083
|
+
return camera .node;
|
|
47059
47084
|
|
|
47060
47085
|
const viewpointNode = this .cameraType (camera);
|
|
47061
47086
|
|
|
47062
47087
|
if (!viewpointNode)
|
|
47063
|
-
return camera .
|
|
47088
|
+
return camera .node = null;
|
|
47064
47089
|
|
|
47065
47090
|
const
|
|
47066
47091
|
scene = this .getScene (),
|
|
@@ -47074,12 +47099,10 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47074
47099
|
scene .addExportedNode (scene .getUniqueExportName (name), viewpointNode);
|
|
47075
47100
|
}
|
|
47076
47101
|
|
|
47077
|
-
this .
|
|
47078
|
-
|
|
47079
|
-
viewpointNode ._description = this .description (camera .name || `Viewpoint ${this .viewpointNodes .length}`);
|
|
47102
|
+
viewpointNode ._description = this .description (camera .name || `Viewpoint ${id + 1}`);
|
|
47080
47103
|
viewpointNode ._position = Numbers_Vector3 .Zero;
|
|
47081
47104
|
|
|
47082
|
-
return camera .
|
|
47105
|
+
return camera .node = viewpointNode;
|
|
47083
47106
|
},
|
|
47084
47107
|
cameraType (camera)
|
|
47085
47108
|
{
|
|
@@ -47268,7 +47291,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47268
47291
|
|
|
47269
47292
|
// Add camera.
|
|
47270
47293
|
|
|
47271
|
-
const viewpointNode = this .cameraObject (this .cameras [node .camera]);
|
|
47294
|
+
const viewpointNode = this .cameraObject (node .camera, this .cameras [node .camera]);
|
|
47272
47295
|
|
|
47273
47296
|
if (viewpointNode)
|
|
47274
47297
|
transformNode ._children .push (viewpointNode);
|
|
@@ -47349,8 +47372,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47349
47372
|
if (!lightNode)
|
|
47350
47373
|
return;
|
|
47351
47374
|
|
|
47352
|
-
++ this .usedLights;
|
|
47353
|
-
|
|
47354
47375
|
transformNode ._children .push (lightNode);
|
|
47355
47376
|
},
|
|
47356
47377
|
nodeChildrenArray (children)
|
|
@@ -47452,9 +47473,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47452
47473
|
{
|
|
47453
47474
|
if (sceneNumber === 0)
|
|
47454
47475
|
{
|
|
47455
|
-
if (this .usedLights)
|
|
47456
|
-
scene .getRootNodes () .push (this .createNavigationInfo ());
|
|
47457
|
-
|
|
47458
47476
|
scene .getRootNodes () .push (children [0]);
|
|
47459
47477
|
return;
|
|
47460
47478
|
}
|
|
@@ -47465,9 +47483,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47465
47483
|
{
|
|
47466
47484
|
// Root
|
|
47467
47485
|
|
|
47468
|
-
if (this .usedLights)
|
|
47469
|
-
scene .getRootNodes () .push (this .createNavigationInfo ());
|
|
47470
|
-
|
|
47471
47486
|
const switchNode = scene .createNode ("Switch", false);
|
|
47472
47487
|
|
|
47473
47488
|
scene .addNamedNode (scene .getUniqueName ("Scenes"), switchNode);
|
|
@@ -47529,20 +47544,25 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47529
47544
|
{
|
|
47530
47545
|
return this .nodeChildrenArray (nodes);
|
|
47531
47546
|
},
|
|
47532
|
-
|
|
47547
|
+
exportGroup (name, array)
|
|
47533
47548
|
{
|
|
47534
|
-
if (!
|
|
47549
|
+
if (!(array instanceof Array))
|
|
47550
|
+
return;
|
|
47551
|
+
|
|
47552
|
+
const nodes = array .map (object => object .node) .filter (node => node);
|
|
47553
|
+
|
|
47554
|
+
if (!nodes .length)
|
|
47535
47555
|
return;
|
|
47536
47556
|
|
|
47537
47557
|
const
|
|
47538
47558
|
scene = this .getScene (),
|
|
47539
47559
|
groupNode = scene .createNode ("Group", false);
|
|
47540
47560
|
|
|
47541
|
-
scene .addNamedNode (scene .getUniqueName (
|
|
47542
|
-
scene .addExportedNode (scene .getUniqueExportName (
|
|
47561
|
+
scene .addNamedNode (scene .getUniqueName (name), groupNode);
|
|
47562
|
+
scene .addExportedNode (scene .getUniqueExportName (name), groupNode);
|
|
47543
47563
|
|
|
47544
47564
|
groupNode ._visible = false;
|
|
47545
|
-
groupNode ._children =
|
|
47565
|
+
groupNode ._children = nodes;
|
|
47546
47566
|
|
|
47547
47567
|
groupNode .setup ();
|
|
47548
47568
|
|
|
@@ -47578,28 +47598,10 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47578
47598
|
if (!(animations instanceof Array))
|
|
47579
47599
|
return;
|
|
47580
47600
|
|
|
47581
|
-
const
|
|
47582
|
-
|
|
47583
|
-
.filter (node => node);
|
|
47584
|
-
|
|
47585
|
-
if (!animationNodes .length)
|
|
47586
|
-
return;
|
|
47587
|
-
|
|
47588
|
-
const
|
|
47589
|
-
scene = this .getScene (),
|
|
47590
|
-
groupNode = scene .createNode ("Group", false);
|
|
47591
|
-
|
|
47592
|
-
scene .addNamedNode (scene .getUniqueName ("Animations"), groupNode);
|
|
47593
|
-
scene .addExportedNode (scene .getUniqueExportName ("Animations"), groupNode);
|
|
47594
|
-
|
|
47595
|
-
groupNode ._visible = false;
|
|
47596
|
-
groupNode ._children = animationNodes;
|
|
47597
|
-
|
|
47598
|
-
groupNode .setup ();
|
|
47599
|
-
|
|
47600
|
-
scene .getRootNodes () .push (groupNode);
|
|
47601
|
+
for (const [i, animation] of animations .entries ())
|
|
47602
|
+
this .animationObject (i, animation);
|
|
47601
47603
|
},
|
|
47602
|
-
animationObject (animation)
|
|
47604
|
+
animationObject (id, animation)
|
|
47603
47605
|
{
|
|
47604
47606
|
if (!(animation instanceof Object))
|
|
47605
47607
|
return null;
|
|
@@ -47610,27 +47612,25 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47610
47612
|
channelNodes = this .animationChannelsArray (animation .channels, animation .samplers, timeSensorNode);
|
|
47611
47613
|
|
|
47612
47614
|
if (!channelNodes .length)
|
|
47613
|
-
return
|
|
47615
|
+
return;
|
|
47614
47616
|
|
|
47615
47617
|
const
|
|
47616
47618
|
groupNode = scene .createNode ("Group", false),
|
|
47617
47619
|
name = this .sanitizeName (animation .name);
|
|
47618
47620
|
|
|
47619
|
-
|
|
47621
|
+
scene .addNamedNode (scene .getUniqueName (name || `Animation${id + 1}`), groupNode);
|
|
47622
|
+
scene .addNamedNode (scene .getUniqueName (`Timer${id + 1}`), timeSensorNode);
|
|
47623
|
+
scene .addExportedNode (scene .getUniqueExportName (name || `Animation${id + 1}`), groupNode);
|
|
47624
|
+
scene .addExportedNode (scene .getUniqueExportName (`Timer${id + 1}`), timeSensorNode);
|
|
47620
47625
|
|
|
47621
|
-
|
|
47622
|
-
scene .addNamedNode (scene .getUniqueName (`Timer${this .animations}`), timeSensorNode);
|
|
47623
|
-
scene .addExportedNode (scene .getUniqueExportName (name || `Animation${this .animations}`), groupNode);
|
|
47624
|
-
scene .addExportedNode (scene .getUniqueExportName (`Timer${this .animations}`), timeSensorNode);
|
|
47625
|
-
|
|
47626
|
-
timeSensorNode ._description = this .description (animation .name) || `Animation ${this .animations}`;
|
|
47626
|
+
timeSensorNode ._description = this .description (animation .name) || `Animation ${id + 1}`;
|
|
47627
47627
|
groupNode ._visible = false;
|
|
47628
47628
|
groupNode ._children .push (timeSensorNode, ... channelNodes);
|
|
47629
47629
|
|
|
47630
47630
|
timeSensorNode .setup ();
|
|
47631
47631
|
groupNode .setup ();
|
|
47632
47632
|
|
|
47633
|
-
|
|
47633
|
+
animation .node = groupNode;
|
|
47634
47634
|
},
|
|
47635
47635
|
animationChannelsArray (channels, samplers, timeSensorNode)
|
|
47636
47636
|
{
|
|
@@ -47662,7 +47662,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47662
47662
|
|
|
47663
47663
|
const node = this .nodes [target .node] ?.transformNode;
|
|
47664
47664
|
|
|
47665
|
-
if (!node)
|
|
47665
|
+
if (!node && target .path !== "pointer")
|
|
47666
47666
|
return [ ];
|
|
47667
47667
|
|
|
47668
47668
|
const sampler = samplers [channel .sampler];
|
|
@@ -47688,18 +47688,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47688
47688
|
|
|
47689
47689
|
return this .createInterpolator (timeSensorNode, node, target, sampler .interpolation, input .array, output, timeSensorNode ._cycleInterval .getValue ());
|
|
47690
47690
|
},
|
|
47691
|
-
createNavigationInfo ()
|
|
47692
|
-
{
|
|
47693
|
-
const
|
|
47694
|
-
scene = this .getScene (),
|
|
47695
|
-
navigationInfoNode = scene .createNode ("NavigationInfo", false);
|
|
47696
|
-
|
|
47697
|
-
navigationInfoNode ._headlight = false;
|
|
47698
|
-
|
|
47699
|
-
navigationInfoNode .setup ();
|
|
47700
|
-
|
|
47701
|
-
return navigationInfoNode;
|
|
47702
|
-
},
|
|
47703
47691
|
createShape (primitive, weights, skin, EXT_mesh_gpu_instancing)
|
|
47704
47692
|
{
|
|
47705
47693
|
const
|
|
@@ -47743,7 +47731,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47743
47731
|
scene = this .getScene (),
|
|
47744
47732
|
instancedShapeNode = scene .createNode ("InstancedShape", false),
|
|
47745
47733
|
translationArray = translation ?.array,
|
|
47746
|
-
rotationArray = rotation ?.
|
|
47734
|
+
rotationArray = rotation ?.array,
|
|
47747
47735
|
scaleArray = scale ?.array;
|
|
47748
47736
|
|
|
47749
47737
|
if (translationArray)
|
|
@@ -48187,8 +48175,8 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48187
48175
|
colorNode = scene .createNode (opaque ? "Color" : typeName, false);
|
|
48188
48176
|
|
|
48189
48177
|
colorNode ._color = opaque && typeName !== "Color"
|
|
48190
|
-
? color .
|
|
48191
|
-
: color .
|
|
48178
|
+
? color .array .filter ((_, i) => (i + 1) % 4)
|
|
48179
|
+
: color .array;
|
|
48192
48180
|
|
|
48193
48181
|
colorNode .setup ();
|
|
48194
48182
|
|
|
@@ -48219,9 +48207,10 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48219
48207
|
}
|
|
48220
48208
|
default:
|
|
48221
48209
|
{
|
|
48222
|
-
const textureCoordinateNodes = Array .from (material .texCoordMappings .entries ()
|
|
48223
|
-
.
|
|
48224
|
-
.sort ((a, b) =>
|
|
48210
|
+
const textureCoordinateNodes = Array .from (material .texCoordMappings .entries ())
|
|
48211
|
+
.sort ((a, b) => Math_Algorithm .cmp (a [0], b [0]))
|
|
48212
|
+
.sort ((a, b) => a [1] - b [1])
|
|
48213
|
+
.map (([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping));
|
|
48225
48214
|
|
|
48226
48215
|
if (!textureCoordinateNodes .length)
|
|
48227
48216
|
return null;
|
|
@@ -48251,7 +48240,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48251
48240
|
textureCoordinateNode = scene .createNode ("TextureCoordinate", false);
|
|
48252
48241
|
|
|
48253
48242
|
textureCoordinateNode ._mapping = mapping;
|
|
48254
|
-
textureCoordinateNode ._point = texCoord .
|
|
48243
|
+
textureCoordinateNode ._point = texCoord .array;
|
|
48255
48244
|
|
|
48256
48245
|
textureCoordinateNode .setup ();
|
|
48257
48246
|
|
|
@@ -48269,7 +48258,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48269
48258
|
scene = this .getScene (),
|
|
48270
48259
|
normalNode = scene .createNode ("Normal", false);
|
|
48271
48260
|
|
|
48272
|
-
normalNode ._vector = normal .
|
|
48261
|
+
normalNode ._vector = normal .array;
|
|
48273
48262
|
|
|
48274
48263
|
if ((targets instanceof Array) && (weights instanceof Array))
|
|
48275
48264
|
{
|
|
@@ -48368,7 +48357,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48368
48357
|
const
|
|
48369
48358
|
start = skin .coordinateNode ._point .length,
|
|
48370
48359
|
jointsArray = joints .array,
|
|
48371
|
-
weightsArray = weights .
|
|
48360
|
+
weightsArray = weights .array,
|
|
48372
48361
|
numVertices = jointsArray .length / 4;
|
|
48373
48362
|
|
|
48374
48363
|
for (let v = 0; v < numVertices; ++ v)
|
|
@@ -48497,7 +48486,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48497
48486
|
}
|
|
48498
48487
|
case "rotation":
|
|
48499
48488
|
{
|
|
48500
|
-
const interpolatorNode = this .createOrientationInterpolator (interpolation, times, keyValues .
|
|
48489
|
+
const interpolatorNode = this .createOrientationInterpolator (interpolation, times, keyValues .array, cycleInterval);
|
|
48501
48490
|
|
|
48502
48491
|
scene .addNamedNode (scene .getUniqueName ("RotationInterpolator"), interpolatorNode);
|
|
48503
48492
|
|
|
@@ -48535,7 +48524,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48535
48524
|
if (!geometryNode)
|
|
48536
48525
|
continue;
|
|
48537
48526
|
|
|
48538
|
-
const coordinateInterpolatorNode = this .createArrayInterpolator ("CoordinateInterpolator", interpolation, times, keyValues .
|
|
48527
|
+
const coordinateInterpolatorNode = this .createArrayInterpolator ("CoordinateInterpolator", interpolation, times, keyValues .array, cycleInterval, targets, attributes, "POSITION");
|
|
48539
48528
|
|
|
48540
48529
|
if (coordinateInterpolatorNode)
|
|
48541
48530
|
{
|
|
@@ -48545,7 +48534,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48545
48534
|
scene .addRoute (coordinateInterpolatorNode, "value_changed", geometryNode ._coord, "set_point");
|
|
48546
48535
|
}
|
|
48547
48536
|
|
|
48548
|
-
const normalInterpolatorNode = this .createArrayInterpolator ("NormalInterpolator", interpolation, times, keyValues .
|
|
48537
|
+
const normalInterpolatorNode = this .createArrayInterpolator ("NormalInterpolator", interpolation, times, keyValues .array, cycleInterval, targets, attributes, "NORMAL");
|
|
48549
48538
|
|
|
48550
48539
|
if (normalInterpolatorNode)
|
|
48551
48540
|
{
|
|
@@ -48558,6 +48547,22 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48558
48547
|
|
|
48559
48548
|
return interpolatorNodes;
|
|
48560
48549
|
}
|
|
48550
|
+
case "pointer":
|
|
48551
|
+
{
|
|
48552
|
+
// const
|
|
48553
|
+
// pointer = target .extensions ?.KHR_animation_pointer ?.pointer ?? "",
|
|
48554
|
+
// path = pointer .split ("/") .filter (p => p)
|
|
48555
|
+
// name = path .pop ();
|
|
48556
|
+
|
|
48557
|
+
// let glTF = this .input;
|
|
48558
|
+
|
|
48559
|
+
// for (const property of path)
|
|
48560
|
+
// glTF = glTF [property]
|
|
48561
|
+
|
|
48562
|
+
// console .log (glTF)
|
|
48563
|
+
|
|
48564
|
+
return [ ];
|
|
48565
|
+
}
|
|
48561
48566
|
default:
|
|
48562
48567
|
{
|
|
48563
48568
|
return [ ];
|
|
@@ -48731,7 +48736,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48731
48736
|
}
|
|
48732
48737
|
}
|
|
48733
48738
|
},
|
|
48734
|
-
createArrayInterpolator (typeName, interpolation, times, weights, cycleInterval, targets, accessors, key
|
|
48739
|
+
createArrayInterpolator (typeName, interpolation, times, weights, cycleInterval, targets, accessors, key)
|
|
48735
48740
|
{
|
|
48736
48741
|
const
|
|
48737
48742
|
scene = this .getScene (),
|
|
@@ -48757,14 +48762,14 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48757
48762
|
|
|
48758
48763
|
const w = Array .from (targets .keys (), i => weights [i]);
|
|
48759
48764
|
|
|
48760
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w
|
|
48765
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
48761
48766
|
interpolatorNode ._keyValue .push (value);
|
|
48762
48767
|
|
|
48763
48768
|
for (let t = 1, length = times .length; t < length; ++ t)
|
|
48764
48769
|
{
|
|
48765
48770
|
const
|
|
48766
48771
|
w = Array .from (targets .keys (), i => weights [t * targets .length + i]),
|
|
48767
|
-
values = this .applyMorphTargets (accessor .field, targets, key, w
|
|
48772
|
+
values = this .applyMorphTargets (accessor .field, targets, key, w);
|
|
48768
48773
|
|
|
48769
48774
|
for (const value of values)
|
|
48770
48775
|
interpolatorNode ._keyValue .push (value);
|
|
@@ -48794,7 +48799,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48794
48799
|
{
|
|
48795
48800
|
const w = Array .from (targets .keys (), i => weights [t * targets .length + i]);
|
|
48796
48801
|
|
|
48797
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w
|
|
48802
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
48798
48803
|
interpolatorNode ._keyValue .push (value);
|
|
48799
48804
|
}
|
|
48800
48805
|
|
|
@@ -48822,7 +48827,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48822
48827
|
|
|
48823
48828
|
const w = Array .from (targets .keys (), i => this .cubicSplineScalarArray (t, times, weights, targets .length, i));
|
|
48824
48829
|
|
|
48825
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w
|
|
48830
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
48826
48831
|
interpolatorNode ._keyValue .push (value);
|
|
48827
48832
|
}
|
|
48828
48833
|
|
|
@@ -48838,7 +48843,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48838
48843
|
{
|
|
48839
48844
|
const value = new Numbers_Vector3 ();
|
|
48840
48845
|
|
|
48841
|
-
return function (array, targets, key, weights
|
|
48846
|
+
return function (array, targets, key, weights)
|
|
48842
48847
|
{
|
|
48843
48848
|
const vectors = Array .from (array, v => v .getValue () .copy ());
|
|
48844
48849
|
|
|
@@ -48855,7 +48860,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
48855
48860
|
continue;
|
|
48856
48861
|
|
|
48857
48862
|
const
|
|
48858
|
-
array = accessor
|
|
48863
|
+
array = accessor .array,
|
|
48859
48864
|
length = array .length;
|
|
48860
48865
|
|
|
48861
48866
|
for (let a = 0, p = 0; a < length; a += 3, ++ p)
|
|
@@ -48947,7 +48952,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
|
|
|
48947
48952
|
x_ite_Namespace .add ("GLTF2Parser", "x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
|
|
48948
48953
|
/* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
|
|
48949
48954
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
|
|
48950
|
-
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(
|
|
48955
|
+
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(812);
|
|
48951
48956
|
/*******************************************************************************
|
|
48952
48957
|
*
|
|
48953
48958
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -49099,7 +49104,7 @@ const GLB2Parser_default_ = GLB2Parser;
|
|
|
49099
49104
|
x_ite_Namespace .add ("GLB2Parser", "x_ite/Parser/GLB2Parser", GLB2Parser_default_);
|
|
49100
49105
|
/* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
|
|
49101
49106
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
|
|
49102
|
-
/* provided dependency */ var OBJParser_$ = __webpack_require__(
|
|
49107
|
+
/* provided dependency */ var OBJParser_$ = __webpack_require__(812);
|
|
49103
49108
|
/*******************************************************************************
|
|
49104
49109
|
*
|
|
49105
49110
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -52444,8 +52449,8 @@ const MatrixStack_default_ = MatrixStack;
|
|
|
52444
52449
|
x_ite_Namespace .add ("MatrixStack", "standard/Math/Utility/MatrixStack", MatrixStack_default_);
|
|
52445
52450
|
/* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
|
|
52446
52451
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
|
|
52447
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
52448
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
52452
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(812);
|
|
52453
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(193);
|
|
52449
52454
|
/*******************************************************************************
|
|
52450
52455
|
*
|
|
52451
52456
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -55216,7 +55221,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
55216
55221
|
x_ite_Namespace .add ("SVGParser", "x_ite/Parser/SVGParser", SVGParser_default_);
|
|
55217
55222
|
/* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
|
|
55218
55223
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
|
|
55219
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
55224
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(812);
|
|
55220
55225
|
/*******************************************************************************
|
|
55221
55226
|
*
|
|
55222
55227
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -58032,9 +58037,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
58032
58037
|
for (const light of lights)
|
|
58033
58038
|
light .setGlobalVariables (this);
|
|
58034
58039
|
|
|
58035
|
-
for (const light of globalLights)
|
|
58036
|
-
globalLightsKeys .push (light .lightNode .getLightKey ());
|
|
58037
|
-
|
|
58038
58040
|
this .renderAndGlobalLightsKey = `.${this .renderKey}.${globalLightsKeys .sort () .join ("")}.`;
|
|
58039
58041
|
this .globalShadow = globalShadows .at (-1);
|
|
58040
58042
|
|
|
@@ -59706,8 +59708,13 @@ Object .assign (Object .setPrototypeOf (NavigationInfo .prototype, Core_X3DBinda
|
|
|
59706
59708
|
if (type !== Rendering_TraverseType .DISPLAY)
|
|
59707
59709
|
return;
|
|
59708
59710
|
|
|
59709
|
-
if (this ._headlight .getValue ())
|
|
59710
|
-
|
|
59711
|
+
if (!this ._headlight .getValue ())
|
|
59712
|
+
return;
|
|
59713
|
+
|
|
59714
|
+
const headlight = this .getBrowser () .getHeadlight ();
|
|
59715
|
+
|
|
59716
|
+
renderObject .getGlobalLights () .push (headlight);
|
|
59717
|
+
renderObject .getGlobalLightsKeys () .push (headlight .lightNode .getLightKey ());
|
|
59711
59718
|
},
|
|
59712
59719
|
traverse (type, renderObject)
|
|
59713
59720
|
{
|
|
@@ -60266,6 +60273,213 @@ const VertexArray_default_ = VertexArray;
|
|
|
60266
60273
|
|
|
60267
60274
|
x_ite_Namespace .add ("VertexArray", "x_ite/Rendering/VertexArray", VertexArray_default_);
|
|
60268
60275
|
/* harmony default export */ const Rendering_VertexArray = (VertexArray_default_);
|
|
60276
|
+
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/MikkTSpace.js
|
|
60277
|
+
|
|
60278
|
+
|
|
60279
|
+
// See: https://github.com/donmccurdy/mikktspace-wasm
|
|
60280
|
+
|
|
60281
|
+
const MikkTSpace_default_ = new class MikkTSpace
|
|
60282
|
+
{
|
|
60283
|
+
#promise;
|
|
60284
|
+
|
|
60285
|
+
async initialize ()
|
|
60286
|
+
{
|
|
60287
|
+
return this .#promise = this .#promise ?? new Promise (async resolve =>
|
|
60288
|
+
{
|
|
60289
|
+
const imports =
|
|
60290
|
+
{
|
|
60291
|
+
wbg:
|
|
60292
|
+
{
|
|
60293
|
+
__wbindgen_string_new: (arg0, arg1) =>
|
|
60294
|
+
{
|
|
60295
|
+
const ret = this .#getStringFromWasm0 (arg0, arg1);
|
|
60296
|
+
|
|
60297
|
+
return this .#addHeapObject (ret);
|
|
60298
|
+
},
|
|
60299
|
+
__wbindgen_rethrow: (arg0) =>
|
|
60300
|
+
{
|
|
60301
|
+
throw this .#takeObject (arg0);
|
|
60302
|
+
},
|
|
60303
|
+
},
|
|
60304
|
+
};
|
|
60305
|
+
|
|
60306
|
+
const input = await fetch (Networking_URLs .getLibraryURL ("mikktspace_bg.wasm"));
|
|
60307
|
+
|
|
60308
|
+
const { instance } = await this .#load (input, imports);
|
|
60309
|
+
|
|
60310
|
+
this .#wasm = instance .exports;
|
|
60311
|
+
|
|
60312
|
+
resolve ();
|
|
60313
|
+
});
|
|
60314
|
+
}
|
|
60315
|
+
|
|
60316
|
+
isInitialized ()
|
|
60317
|
+
{
|
|
60318
|
+
return !! this .#wasm;
|
|
60319
|
+
}
|
|
60320
|
+
|
|
60321
|
+
async #load (response, imports)
|
|
60322
|
+
{
|
|
60323
|
+
if (typeof WebAssembly .instantiateStreaming === "function")
|
|
60324
|
+
{
|
|
60325
|
+
try
|
|
60326
|
+
{
|
|
60327
|
+
return await WebAssembly .instantiateStreaming (response, imports);
|
|
60328
|
+
}
|
|
60329
|
+
catch (error)
|
|
60330
|
+
{
|
|
60331
|
+
if (response .headers .get ("Content-Type") !== "application/wasm")
|
|
60332
|
+
{
|
|
60333
|
+
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);
|
|
60334
|
+
}
|
|
60335
|
+
else
|
|
60336
|
+
{
|
|
60337
|
+
throw error;
|
|
60338
|
+
}
|
|
60339
|
+
}
|
|
60340
|
+
}
|
|
60341
|
+
|
|
60342
|
+
const bytes = await response .arrayBuffer ();
|
|
60343
|
+
|
|
60344
|
+
return await WebAssembly .instantiate (bytes, imports);
|
|
60345
|
+
}
|
|
60346
|
+
|
|
60347
|
+
/**
|
|
60348
|
+
* Generates vertex tangents for the given position/normal/texcoord attributes.
|
|
60349
|
+
* @param {Float32Array} position vec3
|
|
60350
|
+
* @param {Float32Array} normal vec3
|
|
60351
|
+
* @param {Float32Array} texcoord vec2
|
|
60352
|
+
* @returns {Float32Array} vec4
|
|
60353
|
+
*/
|
|
60354
|
+
generateTangents (position, normal, texcoord)
|
|
60355
|
+
{
|
|
60356
|
+
try
|
|
60357
|
+
{
|
|
60358
|
+
const
|
|
60359
|
+
retptr = this .#wasm .__wbindgen_add_to_stack_pointer (-16),
|
|
60360
|
+
ptr0 = this .#passArrayF32ToWasm0 (position, this .#wasm .__wbindgen_malloc),
|
|
60361
|
+
len0 = this .#WASM_VECTOR_LEN,
|
|
60362
|
+
ptr1 = this .#passArrayF32ToWasm0 (normal, this .#wasm .__wbindgen_malloc),
|
|
60363
|
+
len1 = this .#WASM_VECTOR_LEN,
|
|
60364
|
+
ptr2 = this .#passArrayF32ToWasm0 (texcoord, this .#wasm .__wbindgen_malloc),
|
|
60365
|
+
len2 = this .#WASM_VECTOR_LEN;
|
|
60366
|
+
|
|
60367
|
+
this .#wasm .generateTangents (retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
60368
|
+
|
|
60369
|
+
const
|
|
60370
|
+
r0 = this .#getInt32Memory0 () [retptr / 4 + 0],
|
|
60371
|
+
r1 = this .#getInt32Memory0 () [retptr / 4 + 1],
|
|
60372
|
+
v3 = this .#getArrayF32FromWasm0 (r0, r1) .slice ();
|
|
60373
|
+
|
|
60374
|
+
this .#wasm .__wbindgen_free (r0, r1 * 4);
|
|
60375
|
+
|
|
60376
|
+
return v3;
|
|
60377
|
+
}
|
|
60378
|
+
finally
|
|
60379
|
+
{
|
|
60380
|
+
this .#wasm .__wbindgen_add_to_stack_pointer (16);
|
|
60381
|
+
}
|
|
60382
|
+
}
|
|
60383
|
+
|
|
60384
|
+
#wasm;
|
|
60385
|
+
#textDecoder = new TextDecoder ("utf-8", { ignoreBOM: true, fatal: true });
|
|
60386
|
+
#uint8Memory0;
|
|
60387
|
+
|
|
60388
|
+
#getUint8Memory0 ()
|
|
60389
|
+
{
|
|
60390
|
+
if (this .#uint8Memory0 ?.buffer !== this .#wasm .memory .buffer)
|
|
60391
|
+
this .#uint8Memory0 = new Uint8Array (this .#wasm .memory .buffer);
|
|
60392
|
+
|
|
60393
|
+
return this .#uint8Memory0;
|
|
60394
|
+
}
|
|
60395
|
+
|
|
60396
|
+
#getStringFromWasm0 (ptr, len)
|
|
60397
|
+
{
|
|
60398
|
+
return this .#textDecoder .decode (this .#getUint8Memory0 () .subarray (ptr, ptr + len));
|
|
60399
|
+
}
|
|
60400
|
+
|
|
60401
|
+
#heap = new Array (32) .fill (undefined) .toSpliced (32, 0, undefined, null, true, false);
|
|
60402
|
+
#heap_next = this .#heap .length;
|
|
60403
|
+
|
|
60404
|
+
#addHeapObject (obj)
|
|
60405
|
+
{
|
|
60406
|
+
if (this .#heap_next === this .#heap .length)
|
|
60407
|
+
this .#heap .push (this .#heap .length + 1);
|
|
60408
|
+
|
|
60409
|
+
const i = this .#heap_next;
|
|
60410
|
+
|
|
60411
|
+
this .#heap_next = this .#heap [i];
|
|
60412
|
+
this .#heap [i] = obj;
|
|
60413
|
+
|
|
60414
|
+
return i;
|
|
60415
|
+
}
|
|
60416
|
+
|
|
60417
|
+
#getObject (i)
|
|
60418
|
+
{
|
|
60419
|
+
return this .#heap [i];
|
|
60420
|
+
}
|
|
60421
|
+
|
|
60422
|
+
#dropObject (i)
|
|
60423
|
+
{
|
|
60424
|
+
if (i < 36)
|
|
60425
|
+
return;
|
|
60426
|
+
|
|
60427
|
+
this .#heap [i] = this .#heap_next;
|
|
60428
|
+
|
|
60429
|
+
this .#heap_next = i;
|
|
60430
|
+
}
|
|
60431
|
+
|
|
60432
|
+
#takeObject (i)
|
|
60433
|
+
{
|
|
60434
|
+
const ret = this .#getObject (i);
|
|
60435
|
+
|
|
60436
|
+
this .#dropObject (i);
|
|
60437
|
+
|
|
60438
|
+
return ret;
|
|
60439
|
+
}
|
|
60440
|
+
|
|
60441
|
+
#float32Memory0;
|
|
60442
|
+
|
|
60443
|
+
#getFloat32Memory0 ()
|
|
60444
|
+
{
|
|
60445
|
+
if (this .#float32Memory0 ?.buffer !== this .#wasm .memory .buffer)
|
|
60446
|
+
this .#float32Memory0 = new Float32Array (this .#wasm .memory .buffer);
|
|
60447
|
+
|
|
60448
|
+
return this .#float32Memory0;
|
|
60449
|
+
}
|
|
60450
|
+
|
|
60451
|
+
#WASM_VECTOR_LEN = 0;
|
|
60452
|
+
|
|
60453
|
+
#passArrayF32ToWasm0 (arg, malloc)
|
|
60454
|
+
{
|
|
60455
|
+
const ptr = malloc (arg .length * 4);
|
|
60456
|
+
|
|
60457
|
+
this .#getFloat32Memory0 () .set (arg, ptr / 4);
|
|
60458
|
+
|
|
60459
|
+
this .#WASM_VECTOR_LEN = arg .length;
|
|
60460
|
+
|
|
60461
|
+
return ptr;
|
|
60462
|
+
}
|
|
60463
|
+
|
|
60464
|
+
#int32Memory0;
|
|
60465
|
+
|
|
60466
|
+
#getInt32Memory0 ()
|
|
60467
|
+
{
|
|
60468
|
+
if (this .#int32Memory0 ?.buffer !== this .#wasm .memory .buffer)
|
|
60469
|
+
this .#int32Memory0 = new Int32Array (this .#wasm .memory .buffer);
|
|
60470
|
+
|
|
60471
|
+
return this .#int32Memory0;
|
|
60472
|
+
}
|
|
60473
|
+
|
|
60474
|
+
#getArrayF32FromWasm0 (ptr, len)
|
|
60475
|
+
{
|
|
60476
|
+
return this .#getFloat32Memory0 () .subarray (ptr / 4, ptr / 4 + len);
|
|
60477
|
+
}
|
|
60478
|
+
};
|
|
60479
|
+
;
|
|
60480
|
+
|
|
60481
|
+
x_ite_Namespace .add ("MikkTSpace", "x_ite/Browser/Rendering/MikkTSpace", MikkTSpace_default_);
|
|
60482
|
+
/* harmony default export */ const MikkTSpace = (MikkTSpace_default_);
|
|
60269
60483
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Shading.js
|
|
60270
60484
|
/*******************************************************************************
|
|
60271
60485
|
*
|
|
@@ -60391,6 +60605,7 @@ x_ite_Namespace .add ("Shading", "x_ite/Browser/Core/Shading", Shading_default_)
|
|
|
60391
60605
|
|
|
60392
60606
|
|
|
60393
60607
|
|
|
60608
|
+
|
|
60394
60609
|
// Box normals for bbox / line intersection.
|
|
60395
60610
|
const boxNormals = [
|
|
60396
60611
|
new Numbers_Vector3 (0, 0, 1), // front
|
|
@@ -60431,9 +60646,9 @@ function X3DGeometryNode (executionContext)
|
|
|
60431
60646
|
this .texCoords = X3DGeometryNode .createArray ();
|
|
60432
60647
|
this .fogDepths = X3DGeometryNode .createArray ();
|
|
60433
60648
|
this .colors = X3DGeometryNode .createArray ();
|
|
60649
|
+
this .tangents = X3DGeometryNode .createArray ();
|
|
60434
60650
|
this .normals = X3DGeometryNode .createArray ();
|
|
60435
60651
|
this .flatNormals = X3DGeometryNode .createArray ();
|
|
60436
|
-
this .tangents = X3DGeometryNode .createArray ();
|
|
60437
60652
|
this .vertices = X3DGeometryNode .createArray ();
|
|
60438
60653
|
this .hasFogCoords = false;
|
|
60439
60654
|
this .hasNormals = false;
|
|
@@ -60513,8 +60728,8 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60513
60728
|
this .texCoordBuffers = Array .from ({length: browser .getMaxTexCoords ()}, () => gl .createBuffer ());
|
|
60514
60729
|
this .fogDepthBuffer = gl .createBuffer ();
|
|
60515
60730
|
this .colorBuffer = gl .createBuffer ();
|
|
60516
|
-
this .normalBuffer = gl .createBuffer ();
|
|
60517
60731
|
this .tangentBuffer = gl .createBuffer ();
|
|
60732
|
+
this .normalBuffer = gl .createBuffer ();
|
|
60518
60733
|
this .vertexBuffer = gl .createBuffer ();
|
|
60519
60734
|
this .vertexArrayObject = new Rendering_VertexArray (gl);
|
|
60520
60735
|
|
|
@@ -60663,14 +60878,6 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60663
60878
|
|
|
60664
60879
|
this .textureCoordinateNode .getTextureCoordinateMapping (this .textureCoordinateMapping);
|
|
60665
60880
|
},
|
|
60666
|
-
setNormals (value)
|
|
60667
|
-
{
|
|
60668
|
-
this .normals .assign (value);
|
|
60669
|
-
},
|
|
60670
|
-
getNormals ()
|
|
60671
|
-
{
|
|
60672
|
-
return this .normals;
|
|
60673
|
-
},
|
|
60674
60881
|
setTangents (value)
|
|
60675
60882
|
{
|
|
60676
60883
|
this .tangents .assign (value);
|
|
@@ -60679,6 +60886,14 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60679
60886
|
{
|
|
60680
60887
|
return this .tangents;
|
|
60681
60888
|
},
|
|
60889
|
+
setNormals (value)
|
|
60890
|
+
{
|
|
60891
|
+
this .normals .assign (value);
|
|
60892
|
+
},
|
|
60893
|
+
getNormals ()
|
|
60894
|
+
{
|
|
60895
|
+
return this .normals;
|
|
60896
|
+
},
|
|
60682
60897
|
setVertices (value)
|
|
60683
60898
|
{
|
|
60684
60899
|
this .vertices .assign (value);
|
|
@@ -60693,7 +60908,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60693
60908
|
|
|
60694
60909
|
this .updateInstances = true;
|
|
60695
60910
|
},
|
|
60696
|
-
|
|
60911
|
+
generateTexCoords ()
|
|
60697
60912
|
{
|
|
60698
60913
|
const texCoords = this .texCoords;
|
|
60699
60914
|
|
|
@@ -60774,6 +60989,31 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
60774
60989
|
return texCoordParams;
|
|
60775
60990
|
};
|
|
60776
60991
|
})(),
|
|
60992
|
+
generateTangents ()
|
|
60993
|
+
{
|
|
60994
|
+
if (this .geometryType < 2)
|
|
60995
|
+
return;
|
|
60996
|
+
|
|
60997
|
+
if (!this .vertices .length)
|
|
60998
|
+
return;
|
|
60999
|
+
|
|
61000
|
+
if (!MikkTSpace .isInitialized ())
|
|
61001
|
+
return void (MikkTSpace .initialize () .then (() => this .requestRebuild ()));
|
|
61002
|
+
|
|
61003
|
+
const
|
|
61004
|
+
vertices = this .vertices .getValue () .filter ((v, i) => i % 4 < 3),
|
|
61005
|
+
normals = this .normals .getValue (),
|
|
61006
|
+
texCoords = this .multiTexCoords [0] .getValue () .filter ((v, i) => i % 4 < 2),
|
|
61007
|
+
tangents = MikkTSpace .generateTangents (vertices, normals, texCoords),
|
|
61008
|
+
length = tangents .length;
|
|
61009
|
+
|
|
61010
|
+
// Convert coordinate system handedness to respect output format of MikkTSpace.
|
|
61011
|
+
for (let i = 3; i < length; i += 4)
|
|
61012
|
+
tangents [i] = -tangents [i]; // Flip w-channel.
|
|
61013
|
+
|
|
61014
|
+
this .tangents .assign (tangents);
|
|
61015
|
+
this .tangents .shrinkToFit ();
|
|
61016
|
+
},
|
|
60777
61017
|
refineNormals (normalIndex, normals, creaseAngle)
|
|
60778
61018
|
{
|
|
60779
61019
|
if (creaseAngle === 0)
|
|
@@ -61114,7 +61354,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61114
61354
|
{
|
|
61115
61355
|
const point = new Numbers_Vector3 ();
|
|
61116
61356
|
|
|
61117
|
-
return function ()
|
|
61357
|
+
return async function ()
|
|
61118
61358
|
{
|
|
61119
61359
|
this .clear ();
|
|
61120
61360
|
this .build ();
|
|
@@ -61130,8 +61370,8 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61130
61370
|
this .coordIndices .shrinkToFit ();
|
|
61131
61371
|
this .fogDepths .shrinkToFit ();
|
|
61132
61372
|
this .colors .shrinkToFit ();
|
|
61133
|
-
this .normals .shrinkToFit ();
|
|
61134
61373
|
this .tangents .shrinkToFit ();
|
|
61374
|
+
this .normals .shrinkToFit ();
|
|
61135
61375
|
this .vertices .shrinkToFit ();
|
|
61136
61376
|
|
|
61137
61377
|
// Determine bbox.
|
|
@@ -61168,8 +61408,12 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61168
61408
|
|
|
61169
61409
|
// Generate texCoord if needed.
|
|
61170
61410
|
|
|
61171
|
-
if (this .multiTexCoords .length
|
|
61172
|
-
this .
|
|
61411
|
+
if (!this .multiTexCoords .length)
|
|
61412
|
+
this .generateTexCoords ();
|
|
61413
|
+
|
|
61414
|
+
// Generate tangents if needed.
|
|
61415
|
+
if (!this .tangents .length)
|
|
61416
|
+
this .generateTangents ();
|
|
61173
61417
|
|
|
61174
61418
|
// Transfer arrays and update.
|
|
61175
61419
|
|
|
@@ -61209,8 +61453,8 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61209
61453
|
this .colors .length = 0;
|
|
61210
61454
|
this .multiTexCoords .length = 0;
|
|
61211
61455
|
this .texCoords .length = 0;
|
|
61212
|
-
this .normals .length = 0;
|
|
61213
61456
|
this .tangents .length = 0;
|
|
61457
|
+
this .normals .length = 0;
|
|
61214
61458
|
this .flatNormals .length = 0;
|
|
61215
61459
|
this .vertices .length = 0;
|
|
61216
61460
|
},
|
|
@@ -61266,17 +61510,6 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61266
61510
|
gl .bufferData (gl .ARRAY_BUFFER, this .multiTexCoords [i] .getValue (), gl .DYNAMIC_DRAW);
|
|
61267
61511
|
}
|
|
61268
61512
|
|
|
61269
|
-
// Transfer normals or flat normals.
|
|
61270
|
-
|
|
61271
|
-
const lastHasNormals = this .hasNormals;
|
|
61272
|
-
|
|
61273
|
-
this .set_shading__ (this .getBrowser () .getBrowserOptions () ._Shading);
|
|
61274
|
-
|
|
61275
|
-
this .hasNormals = !! this .normals .length;
|
|
61276
|
-
|
|
61277
|
-
if (this .hasNormals !== lastHasNormals)
|
|
61278
|
-
this .updateVertexArrays ();
|
|
61279
|
-
|
|
61280
61513
|
// Transfer tangents.
|
|
61281
61514
|
|
|
61282
61515
|
const lastHasTangents = this .hasTangents;
|
|
@@ -61289,6 +61522,17 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
|
|
|
61289
61522
|
if (this .hasTangents !== lastHasTangents)
|
|
61290
61523
|
this .updateVertexArrays ();
|
|
61291
61524
|
|
|
61525
|
+
// Transfer normals or flat normals.
|
|
61526
|
+
|
|
61527
|
+
const lastHasNormals = this .hasNormals;
|
|
61528
|
+
|
|
61529
|
+
this .set_shading__ (this .getBrowser () .getBrowserOptions () ._Shading);
|
|
61530
|
+
|
|
61531
|
+
this .hasNormals = !! this .normals .length;
|
|
61532
|
+
|
|
61533
|
+
if (this .hasNormals !== lastHasNormals)
|
|
61534
|
+
this .updateVertexArrays ();
|
|
61535
|
+
|
|
61292
61536
|
// Transfer vertices.
|
|
61293
61537
|
|
|
61294
61538
|
gl .bindBuffer (gl .ARRAY_BUFFER, this .vertexBuffer);
|
|
@@ -62437,6 +62681,7 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62437
62681
|
gl .uniform3f (shaderNode .x3d_EmissiveColor, 1, 1, 1)
|
|
62438
62682
|
gl .uniform1f (shaderNode .x3d_Transparency, transparency)
|
|
62439
62683
|
gl .uniform1i (shaderNode .x3d_TextureCoordinateGeneratorMode [0], 0);
|
|
62684
|
+
gl .uniform1f (shaderNode .x3d_Exposure, 1);
|
|
62440
62685
|
|
|
62441
62686
|
// Enable vertex attribute arrays.
|
|
62442
62687
|
|
|
@@ -62454,6 +62699,8 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62454
62699
|
gl .disable (gl .BLEND);
|
|
62455
62700
|
|
|
62456
62701
|
gl .drawArrays (gl .TRIANGLES, 0, this .sphereCount);
|
|
62702
|
+
|
|
62703
|
+
gl .uniform1f (shaderNode .x3d_Exposure, browser .getBrowserOption ("Exposure"));
|
|
62457
62704
|
},
|
|
62458
62705
|
drawCube: (() =>
|
|
62459
62706
|
{
|
|
@@ -62490,8 +62737,11 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62490
62737
|
gl .uniform3f (shaderNode .x3d_EmissiveColor, 1, 1, 1);
|
|
62491
62738
|
gl .uniform1f (shaderNode .x3d_Transparency, 0);
|
|
62492
62739
|
gl .uniform1i (shaderNode .x3d_TextureCoordinateGeneratorMode [0], 0);
|
|
62740
|
+
gl .uniform1f (shaderNode .x3d_Exposure, 1);
|
|
62493
62741
|
|
|
62494
62742
|
this .drawRectangle (gl, browser, shaderNode, renderObject, textureNode, this .textureBuffers [i], this .textureArrayObjects [i]);
|
|
62743
|
+
|
|
62744
|
+
gl .uniform1f (shaderNode .x3d_Exposure, browser .getBrowserOption ("Exposure"));
|
|
62495
62745
|
}
|
|
62496
62746
|
};
|
|
62497
62747
|
})(),
|
|
@@ -62834,7 +63084,7 @@ Object .assign (Object .setPrototypeOf (X3DSingleTextureNode .prototype, Texturi
|
|
|
62834
63084
|
if (value !== this ._linear .getValue ())
|
|
62835
63085
|
this ._linear = value;
|
|
62836
63086
|
},
|
|
62837
|
-
|
|
63087
|
+
canMipMaps ()
|
|
62838
63088
|
{
|
|
62839
63089
|
return this .mipMaps;
|
|
62840
63090
|
},
|
|
@@ -62886,7 +63136,7 @@ Object .assign (Object .setPrototypeOf (X3DSingleTextureNode .prototype, Texturi
|
|
|
62886
63136
|
gl .texParameteri (target, gl .TEXTURE_MIN_FILTER, gl .NEAREST);
|
|
62887
63137
|
gl .texParameteri (target, gl .TEXTURE_MAG_FILTER, gl .NEAREST);
|
|
62888
63138
|
}
|
|
62889
|
-
else if (this .
|
|
63139
|
+
else if (this .canMipMaps () && textureProperties ._generateMipMaps .getValue ())
|
|
62890
63140
|
{
|
|
62891
63141
|
// Can MipMaps and wants MipMaps.
|
|
62892
63142
|
gl .generateMipmap (target);
|
|
@@ -63184,7 +63434,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
63184
63434
|
x_ite_Namespace .add ("X3DTexture2DNode", "x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
|
|
63185
63435
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
|
|
63186
63436
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
63187
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
63437
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(812);
|
|
63188
63438
|
/*******************************************************************************
|
|
63189
63439
|
*
|
|
63190
63440
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -63843,8 +64093,14 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, Core_X3DNode .p
|
|
|
63843
64093
|
},
|
|
63844
64094
|
getUserViewpoints ()
|
|
63845
64095
|
{
|
|
63846
|
-
|
|
63847
|
-
|
|
64096
|
+
const
|
|
64097
|
+
browser = this .getBrowser (),
|
|
64098
|
+
enableInlineViewpoints = browser .getBrowserOption ("EnableInlineViewpoints"),
|
|
64099
|
+
currentScene = browser .currentScene;
|
|
64100
|
+
|
|
64101
|
+
return Array .from (new Set (this .viewpoints .get ()
|
|
64102
|
+
.filter (viewpointNode => viewpointNode ._description .length)
|
|
64103
|
+
.filter (viewpointNode => enableInlineViewpoints || viewpointNode .getScene () === currentScene)));
|
|
63848
64104
|
},
|
|
63849
64105
|
getBackgroundStack ()
|
|
63850
64106
|
{
|
|
@@ -66768,7 +67024,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
66768
67024
|
x_ite_Namespace .add ("X3DWorld", "x_ite/Execution/X3DWorld", X3DWorld_default_);
|
|
66769
67025
|
/* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
|
|
66770
67026
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
|
|
66771
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
67027
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(812);
|
|
66772
67028
|
/*******************************************************************************
|
|
66773
67029
|
*
|
|
66774
67030
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -67702,7 +67958,7 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
|
|
|
67702
67958
|
x_ite_Namespace .add ("ProtoDeclarationArray", "x_ite/Prototype/ProtoDeclarationArray", ProtoDeclarationArray_default_);
|
|
67703
67959
|
/* harmony default export */ const Prototype_ProtoDeclarationArray = (ProtoDeclarationArray_default_);
|
|
67704
67960
|
;// CONCATENATED MODULE: ./src/x_ite/Routing/X3DRoute.js
|
|
67705
|
-
/* provided dependency */ var X3DRoute_$ = __webpack_require__(
|
|
67961
|
+
/* provided dependency */ var X3DRoute_$ = __webpack_require__(812);
|
|
67706
67962
|
/*******************************************************************************
|
|
67707
67963
|
*
|
|
67708
67964
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -74811,6 +75067,7 @@ Object .assign (Object .setPrototypeOf (Box .prototype, Rendering_X3DGeometryNod
|
|
|
74811
75067
|
size = this ._size .getValue ();
|
|
74812
75068
|
|
|
74813
75069
|
this .setMultiTexCoords (geometry .getMultiTexCoords ());
|
|
75070
|
+
this .setTangents (geometry .getTangents ());
|
|
74814
75071
|
this .setNormals (geometry .getNormals ());
|
|
74815
75072
|
|
|
74816
75073
|
if (size .equals (defaultSize))
|
|
@@ -75180,6 +75437,7 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75180
75437
|
height1_2 = Math .abs (this ._height .getValue ()) / 2,
|
|
75181
75438
|
radius = Math .abs (this ._radius .getValue ()),
|
|
75182
75439
|
texCoordArray = this .getTexCoords (),
|
|
75440
|
+
tangentArray = this .getTangents (),
|
|
75183
75441
|
normalArray = this .getNormals (),
|
|
75184
75442
|
vertexArray = this .getVertices ();
|
|
75185
75443
|
|
|
@@ -75194,6 +75452,9 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75194
75452
|
for (const t of geometry .getMultiTexCoords () [0])
|
|
75195
75453
|
texCoordArray .push (t);
|
|
75196
75454
|
|
|
75455
|
+
for (const t of geometry .getTangents ())
|
|
75456
|
+
tangentArray .push (t);
|
|
75457
|
+
|
|
75197
75458
|
for (const n of geometry .getNormals ())
|
|
75198
75459
|
normalArray .push (n);
|
|
75199
75460
|
|
|
@@ -75215,6 +75476,9 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75215
75476
|
for (const t of geometry .getMultiTexCoords () [0])
|
|
75216
75477
|
texCoordArray .push (t);
|
|
75217
75478
|
|
|
75479
|
+
for (const t of geometry .getTangents ())
|
|
75480
|
+
tangentArray .push (t);
|
|
75481
|
+
|
|
75218
75482
|
for (const n of geometry .getNormals ())
|
|
75219
75483
|
normalArray .push (n);
|
|
75220
75484
|
|
|
@@ -75236,6 +75500,9 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
|
|
|
75236
75500
|
for (const t of geometry .getMultiTexCoords () [0])
|
|
75237
75501
|
texCoordArray .push (t);
|
|
75238
75502
|
|
|
75503
|
+
for (const t of geometry .getTangents ())
|
|
75504
|
+
tangentArray .push (t);
|
|
75505
|
+
|
|
75239
75506
|
for (const n of geometry .getNormals ())
|
|
75240
75507
|
normalArray .push (n);
|
|
75241
75508
|
|
|
@@ -75751,8 +76018,8 @@ Object .defineProperties (ElevationGrid,
|
|
|
75751
76018
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
75752
76019
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
75753
76020
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
75754
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
75755
76021
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
76022
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
75756
76023
|
new Base_X3DFieldDefinition (Base_X3DConstants .initializeOnly, "height", new x_ite_Fields .MFFloat ()),
|
|
75757
76024
|
]),
|
|
75758
76025
|
enumerable: true,
|
|
@@ -76759,12 +77026,12 @@ Object .assign (Object .setPrototypeOf (X3DComposedGeometryNode .prototype, Rend
|
|
|
76759
77026
|
// Autogenerate normal if not specified.
|
|
76760
77027
|
|
|
76761
77028
|
if (!this .getNormal ())
|
|
76762
|
-
this .
|
|
77029
|
+
this .generateNormals (verticesPerPolygon, polygonsSize, trianglesSize);
|
|
76763
77030
|
|
|
76764
77031
|
this .setSolid (this ._solid .getValue ());
|
|
76765
77032
|
this .setCCW (this ._ccw .getValue ());
|
|
76766
77033
|
},
|
|
76767
|
-
|
|
77034
|
+
generateNormals (verticesPerPolygon, polygonsSize, trianglesSize)
|
|
76768
77035
|
{
|
|
76769
77036
|
const
|
|
76770
77037
|
normals = this .createNormals (verticesPerPolygon, polygonsSize),
|
|
@@ -77046,7 +77313,7 @@ Object .assign (Object .setPrototypeOf (IndexedFaceSet .prototype, Rendering_X3D
|
|
|
77046
77313
|
// Autogenerate normals if not specified.
|
|
77047
77314
|
|
|
77048
77315
|
if (!this .getNormal ())
|
|
77049
|
-
this .
|
|
77316
|
+
this .generateNormals (polygons);
|
|
77050
77317
|
|
|
77051
77318
|
this .setSolid (this ._solid .getValue ());
|
|
77052
77319
|
this .setCCW (this ._ccw .getValue ());
|
|
@@ -77166,7 +77433,7 @@ Object .assign (Object .setPrototypeOf (IndexedFaceSet .prototype, Rendering_X3D
|
|
|
77166
77433
|
Geometry_Triangle3 .triangulatePolygon (polygon, triangles);
|
|
77167
77434
|
};
|
|
77168
77435
|
})(),
|
|
77169
|
-
|
|
77436
|
+
generateNormals (polygons)
|
|
77170
77437
|
{
|
|
77171
77438
|
const
|
|
77172
77439
|
normals = this .createNormals (polygons),
|
|
@@ -77319,8 +77586,8 @@ Object .defineProperties (IndexedFaceSet,
|
|
|
77319
77586
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
77320
77587
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
77321
77588
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
77322
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
77323
77589
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
77590
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
77324
77591
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
77325
77592
|
]),
|
|
77326
77593
|
enumerable: true,
|
|
@@ -77416,6 +77683,7 @@ Object .assign (Object .setPrototypeOf (Sphere .prototype, Rendering_X3DGeometry
|
|
|
77416
77683
|
radius = Math .abs (this ._radius .getValue ());
|
|
77417
77684
|
|
|
77418
77685
|
this .setMultiTexCoords (geometry .getMultiTexCoords ());
|
|
77686
|
+
this .setTangents (geometry .getTangents ());
|
|
77419
77687
|
this .setNormals (geometry .getNormals ());
|
|
77420
77688
|
|
|
77421
77689
|
if (radius === 1)
|
|
@@ -81028,6 +81296,7 @@ Object .assign (Object .setPrototypeOf (X3DLightNode .prototype, Core_X3DChildNo
|
|
|
81028
81296
|
renderObject .getLights () .push (lightContainer);
|
|
81029
81297
|
|
|
81030
81298
|
renderObject .pushGlobalShadows (!! this .getShadowIntensity ());
|
|
81299
|
+
renderObject .getGlobalLightsKeys () .push (this .getLightKey ());
|
|
81031
81300
|
}
|
|
81032
81301
|
else
|
|
81033
81302
|
{
|
|
@@ -81054,6 +81323,7 @@ Object .assign (Object .setPrototypeOf (X3DLightNode .prototype, Core_X3DChildNo
|
|
|
81054
81323
|
renderObject .getLights () .push (lightContainer);
|
|
81055
81324
|
|
|
81056
81325
|
renderObject .pushGlobalShadows (!! this .getShadowIntensity ());
|
|
81326
|
+
renderObject .getGlobalLightsKeys () .push (this .getLightKey ());
|
|
81057
81327
|
}
|
|
81058
81328
|
else
|
|
81059
81329
|
{
|
|
@@ -81509,17 +81779,13 @@ Object .assign (EnvironmentLightContainer .prototype,
|
|
|
81509
81779
|
? this .GGXLUTTextureUnit = this .GGXLUTTextureUnit ?? browser .popTexture2DUnit ()
|
|
81510
81780
|
: browser .getTexture2DUnit ();
|
|
81511
81781
|
|
|
81512
|
-
// https://stackoverflow.com/a/25640078/1818915
|
|
81513
|
-
// The system will automatically clamp the specified parameter appropriately.
|
|
81514
|
-
// In GLSL 4 there is a textureQueryLevels function.
|
|
81515
|
-
const specularTextureLevels = 1 + Math .floor (Math .log2 (specularTexture ?.getSize () ?? 1));
|
|
81516
|
-
|
|
81517
81782
|
gl .uniform3f (shaderObject .x3d_EnvironmentLightColor, color .r, color .g, color .b);
|
|
81518
81783
|
gl .uniform1f (shaderObject .x3d_EnvironmentLightIntensity, lightNode .getIntensity ());
|
|
81519
81784
|
gl .uniformMatrix3fv (shaderObject .x3d_EnvironmentLightRotation, false, this .rotationMatrix);
|
|
81520
81785
|
gl .uniform1i (shaderObject .x3d_EnvironmentLightDiffuseTextureLinear, diffuseTexture ?.isLinear ());
|
|
81786
|
+
gl .uniform1i (shaderObject .x3d_EnvironmentLightDiffuseTextureLevels, diffuseTexture ?.getLevels () ?? 0);
|
|
81521
81787
|
gl .uniform1i (shaderObject .x3d_EnvironmentLightSpecularTextureLinear, specularTexture ?.isLinear ());
|
|
81522
|
-
gl .uniform1i (shaderObject .x3d_EnvironmentLightSpecularTextureLevels,
|
|
81788
|
+
gl .uniform1i (shaderObject .x3d_EnvironmentLightSpecularTextureLevels, specularTexture ?.getLevels () ?? 0);
|
|
81523
81789
|
|
|
81524
81790
|
gl .activeTexture (gl .TEXTURE0 + diffuseTextureUnit);
|
|
81525
81791
|
gl .bindTexture (gl .TEXTURE_CUBE_MAP, diffuseTexture ?.getTexture () ?? browser .getDefaultTextureCube ());
|
|
@@ -87913,7 +88179,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
|
|
|
87913
88179
|
|
|
87914
88180
|
this .thickLinesVertexArrayObject .update ();
|
|
87915
88181
|
},
|
|
87916
|
-
|
|
88182
|
+
generateTexCoords ()
|
|
87917
88183
|
{
|
|
87918
88184
|
// Line stipple support.
|
|
87919
88185
|
|
|
@@ -88847,8 +89113,8 @@ Object .defineProperties (IndexedLineSet,
|
|
|
88847
89113
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "attrib", new x_ite_Fields .MFNode ()),
|
|
88848
89114
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
88849
89115
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
88850
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
88851
89116
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
89117
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
88852
89118
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
88853
89119
|
]),
|
|
88854
89120
|
enumerable: true,
|
|
@@ -89026,8 +89292,8 @@ Object .defineProperties (IndexedTriangleFanSet,
|
|
|
89026
89292
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89027
89293
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89028
89294
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
89029
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89030
89295
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
89296
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89031
89297
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89032
89298
|
]),
|
|
89033
89299
|
enumerable: true,
|
|
@@ -89162,8 +89428,8 @@ Object .defineProperties (IndexedTriangleSet,
|
|
|
89162
89428
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89163
89429
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89164
89430
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
89165
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89166
89431
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
89432
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89167
89433
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89168
89434
|
]),
|
|
89169
89435
|
enumerable: true,
|
|
@@ -89349,8 +89615,8 @@ Object .defineProperties (IndexedTriangleStripSet,
|
|
|
89349
89615
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89350
89616
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89351
89617
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
89352
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89353
89618
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
89619
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89354
89620
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89355
89621
|
]),
|
|
89356
89622
|
enumerable: true,
|
|
@@ -89608,8 +89874,8 @@ Object .defineProperties (LineSet,
|
|
|
89608
89874
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "attrib", new x_ite_Fields .MFNode ()),
|
|
89609
89875
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
89610
89876
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
89611
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89612
89877
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
89878
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
89613
89879
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
89614
89880
|
]),
|
|
89615
89881
|
enumerable: true,
|
|
@@ -89925,7 +90191,7 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
|
|
|
89925
90191
|
{
|
|
89926
90192
|
return false;
|
|
89927
90193
|
},
|
|
89928
|
-
|
|
90194
|
+
generateTexCoords ()
|
|
89929
90195
|
{ },
|
|
89930
90196
|
display (gl, renderContext)
|
|
89931
90197
|
{
|
|
@@ -90289,8 +90555,8 @@ Object .defineProperties (PointSet,
|
|
|
90289
90555
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "attrib", new x_ite_Fields .MFNode ()),
|
|
90290
90556
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90291
90557
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90292
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90293
90558
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
90559
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90294
90560
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90295
90561
|
]),
|
|
90296
90562
|
enumerable: true,
|
|
@@ -90607,8 +90873,8 @@ Object .defineProperties (TriangleFanSet,
|
|
|
90607
90873
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90608
90874
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90609
90875
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
90610
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90611
90876
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
90877
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90612
90878
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90613
90879
|
]),
|
|
90614
90880
|
enumerable: true,
|
|
@@ -90738,8 +91004,8 @@ Object .defineProperties (TriangleSet,
|
|
|
90738
91004
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90739
91005
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90740
91006
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
90741
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90742
91007
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
91008
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90743
91009
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90744
91010
|
]),
|
|
90745
91011
|
enumerable: true,
|
|
@@ -90903,8 +91169,8 @@ Object .defineProperties (TriangleStripSet,
|
|
|
90903
91169
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "fogCoord", new x_ite_Fields .SFNode ()),
|
|
90904
91170
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "color", new x_ite_Fields .SFNode ()),
|
|
90905
91171
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "texCoord", new x_ite_Fields .SFNode ()),
|
|
90906
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90907
91172
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "tangent", new x_ite_Fields .SFNode ()), // experimental
|
|
91173
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "normal", new x_ite_Fields .SFNode ()),
|
|
90908
91174
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "coord", new x_ite_Fields .SFNode ()),
|
|
90909
91175
|
]),
|
|
90910
91176
|
enumerable: true,
|
|
@@ -91144,18 +91410,21 @@ const MaterialTextures_default_ = {
|
|
|
91144
91410
|
"x3d_SpecularGlossinessTexture",
|
|
91145
91411
|
"x3d_OcclusionTexture",
|
|
91146
91412
|
"x3d_NormalTexture",
|
|
91413
|
+
|
|
91147
91414
|
"x3d_AnisotropyTextureEXT",
|
|
91148
|
-
"x3d_ClearcoatTextureEXT",
|
|
91149
|
-
"x3d_ClearcoatRoughnessTextureEXT",
|
|
91150
91415
|
"x3d_ClearcoatNormalTextureEXT",
|
|
91416
|
+
"x3d_ClearcoatRoughnessTextureEXT",
|
|
91417
|
+
"x3d_ClearcoatTextureEXT",
|
|
91418
|
+
"x3d_DiffuseTransmissionColorTextureEXT",
|
|
91419
|
+
"x3d_DiffuseTransmissionTextureEXT",
|
|
91151
91420
|
"x3d_IridescenceTextureEXT",
|
|
91152
91421
|
"x3d_IridescenceThicknessTextureEXT",
|
|
91153
91422
|
"x3d_SheenColorTextureEXT",
|
|
91154
91423
|
"x3d_SheenRoughnessTextureEXT",
|
|
91155
|
-
"x3d_SpecularTextureEXT",
|
|
91156
91424
|
"x3d_SpecularColorTextureEXT",
|
|
91157
|
-
"
|
|
91425
|
+
"x3d_SpecularTextureEXT",
|
|
91158
91426
|
"x3d_ThicknessTextureEXT",
|
|
91427
|
+
"x3d_TransmissionTextureEXT",
|
|
91159
91428
|
],
|
|
91160
91429
|
texture (name, components = "rgba", colorSpace = "")
|
|
91161
91430
|
{
|
|
@@ -91252,7 +91521,7 @@ mediump samplerCube textureCube;
|
|
|
91252
91521
|
x_ite_Namespace .add ("MaterialTextures", "assets/shaders/MaterialTextures", MaterialTextures_default_);
|
|
91253
91522
|
/* harmony default export */ const MaterialTextures = (MaterialTextures_default_);
|
|
91254
91523
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
|
|
91255
|
-
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(
|
|
91524
|
+
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(812);
|
|
91256
91525
|
/*******************************************************************************
|
|
91257
91526
|
*
|
|
91258
91527
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -91448,6 +91717,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91448
91717
|
this .x3d_EnvironmentLightRotation = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.rotation");
|
|
91449
91718
|
this .x3d_EnvironmentLightDiffuseTexture = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.diffuseTexture");
|
|
91450
91719
|
this .x3d_EnvironmentLightDiffuseTextureLinear = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.diffuseTextureLinear");
|
|
91720
|
+
this .x3d_EnvironmentLightDiffuseTextureLevels = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.diffuseTextureLevels");
|
|
91451
91721
|
this .x3d_EnvironmentLightSpecularTexture = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.specularTexture");
|
|
91452
91722
|
this .x3d_EnvironmentLightSpecularTextureLinear = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.specularTextureLinear");
|
|
91453
91723
|
this .x3d_EnvironmentLightSpecularTextureLevels = gl .getUniformLocation (program, "x3d_EnvironmentLightSource.specularTextureLevels");
|
|
@@ -91488,26 +91758,28 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91488
91758
|
"x3d_MultiTextureColor",
|
|
91489
91759
|
// Extensions
|
|
91490
91760
|
"x3d_AnisotropyEXT",
|
|
91761
|
+
"x3d_AttenuationColorEXT",
|
|
91762
|
+
"x3d_AttenuationDistanceEXT",
|
|
91491
91763
|
"x3d_ClearcoatEXT",
|
|
91492
91764
|
"x3d_ClearcoatRoughnessEXT",
|
|
91765
|
+
"x3d_DiffuseTransmissionColorEXT",
|
|
91766
|
+
"x3d_DiffuseTransmissionEXT",
|
|
91493
91767
|
"x3d_DispersionEXT",
|
|
91494
91768
|
"x3d_EmissiveStrengthEXT",
|
|
91495
91769
|
"x3d_IorEXT",
|
|
91496
91770
|
"x3d_IridescenceEXT",
|
|
91497
91771
|
"x3d_IridescenceIndexOfRefractionEXT",
|
|
91498
|
-
"x3d_IridescenceThicknessMinimumEXT",
|
|
91499
91772
|
"x3d_IridescenceThicknessMaximumEXT",
|
|
91773
|
+
"x3d_IridescenceThicknessMinimumEXT",
|
|
91500
91774
|
"x3d_SheenColorEXT",
|
|
91501
|
-
"x3d_SheenRoughnessEXT",
|
|
91502
91775
|
"x3d_SheenELUTTextureEXT",
|
|
91503
|
-
"
|
|
91776
|
+
"x3d_SheenRoughnessEXT",
|
|
91504
91777
|
"x3d_SpecularColorEXT",
|
|
91778
|
+
"x3d_SpecularEXT",
|
|
91779
|
+
"x3d_ThicknessEXT",
|
|
91505
91780
|
"x3d_TransmissionEXT",
|
|
91506
91781
|
"x3d_TransmissionFramebufferSamplerEXT",
|
|
91507
91782
|
"x3d_TransmissionFramebufferSizeEXT",
|
|
91508
|
-
"x3d_ThicknessEXT",
|
|
91509
|
-
"x3d_AttenuationDistanceEXT",
|
|
91510
|
-
"x3d_AttenuationColorEXT",
|
|
91511
91783
|
];
|
|
91512
91784
|
|
|
91513
91785
|
for (const name of commonUniforms)
|
|
@@ -93729,71 +94001,6 @@ const ProgramShader_default_ = ProgramShader;
|
|
|
93729
94001
|
|
|
93730
94002
|
x_ite_Namespace .add ("ProgramShader", "x_ite/Components/Shaders/ProgramShader", ProgramShader_default_);
|
|
93731
94003
|
/* harmony default export */ const Shaders_ProgramShader = (ProgramShader_default_);
|
|
93732
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/Types.glsl.js
|
|
93733
|
-
|
|
93734
|
-
|
|
93735
|
-
const Types_glsl_default_ = /* glsl */ `
|
|
93736
|
-
#if defined(X3D_FOG)
|
|
93737
|
-
struct x3d_FogParameters{mediump int type;mediump vec3 color;mediump float visibilityRange;mediump mat3 matrix;};
|
|
93738
|
-
#endif
|
|
93739
|
-
#if defined(X3D_LIGHTING)
|
|
93740
|
-
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;
|
|
93741
|
-
#if defined(X3D_SHADOWS)
|
|
93742
|
-
mediump vec3 shadowColor;mediump float shadowIntensity;mediump float shadowBias;mediump mat4 shadowMatrix;mediump int shadowMapSize;
|
|
93743
|
-
#endif
|
|
93744
|
-
};
|
|
93745
|
-
#endif
|
|
93746
|
-
#if defined(X3D_USE_IBL)
|
|
93747
|
-
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;
|
|
93748
|
-
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
93749
|
-
mediump sampler2D CharlieLUTTexture;
|
|
93750
|
-
#endif
|
|
93751
|
-
};
|
|
93752
|
-
#endif
|
|
93753
|
-
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93754
|
-
struct x3d_PointPropertiesParameters{mediump float pointSizeScaleFactor;mediump float pointSizeMinValue;mediump float pointSizeMaxValue;mediump vec3 attenuation;};
|
|
93755
|
-
#endif
|
|
93756
|
-
#if defined(X3D_GEOMETRY_1D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93757
|
-
struct x3d_LinePropertiesParameters{mediump int linetype;mediump float lineStippleScale;
|
|
93758
|
-
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
93759
|
-
sampler2D texture;
|
|
93760
|
-
#endif
|
|
93761
|
-
};
|
|
93762
|
-
#endif
|
|
93763
|
-
#if(defined(X3D_GEOMETRY_2D)||defined(X3D_GEOMETRY_3D))&&defined(X3D_STYLE_PROPERTIES)
|
|
93764
|
-
struct x3d_FillPropertiesParameters{bool filled;bool hatched;mediump vec3 hatchColor;
|
|
93765
|
-
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
93766
|
-
sampler2D texture;
|
|
93767
|
-
#endif
|
|
93768
|
-
mediump float scale;};
|
|
93769
|
-
#endif
|
|
93770
|
-
#if defined(X3D_UNLIT_MATERIAL)
|
|
93771
|
-
struct x3d_UnlitMaterialParameters{mediump vec3 emissiveColor;mediump float normalScale;mediump float transparency;};
|
|
93772
|
-
#endif
|
|
93773
|
-
#if defined(X3D_MATERIAL)
|
|
93774
|
-
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;};
|
|
93775
|
-
#endif
|
|
93776
|
-
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
93777
|
-
struct x3d_PhysicalMaterialParameters{
|
|
93778
|
-
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
93779
|
-
mediump vec3 diffuseColor;mediump vec3 specularColor;mediump float glossiness;
|
|
93780
|
-
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93781
|
-
mediump vec3 baseColor;mediump float metallic;mediump float roughness;
|
|
93782
|
-
#endif
|
|
93783
|
-
mediump vec3 emissiveColor;mediump float occlusionStrength;mediump float normalScale;mediump float transparency;};
|
|
93784
|
-
#endif
|
|
93785
|
-
${MaterialTextures .structs ()}
|
|
93786
|
-
#if defined(X3D_MULTI_TEXTURING)
|
|
93787
|
-
struct x3d_MultiTextureParameters{mediump int mode;mediump int alphaMode;mediump int source;mediump int function;};
|
|
93788
|
-
#endif
|
|
93789
|
-
#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES)
|
|
93790
|
-
struct x3d_TextureCoordinateGeneratorParameters{mediump int mode;mediump float parameter[6];};
|
|
93791
|
-
#endif
|
|
93792
|
-
`
|
|
93793
|
-
;
|
|
93794
|
-
|
|
93795
|
-
x_ite_Namespace .add ("Types.glsl", "assets/shaders/Types.glsl", Types_glsl_default_);
|
|
93796
|
-
/* harmony default export */ const Types_glsl = (Types_glsl_default_);
|
|
93797
94004
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/ModeType.js
|
|
93798
94005
|
/*******************************************************************************
|
|
93799
94006
|
*
|
|
@@ -94069,6 +94276,150 @@ const TextureCoordinateGeneratorModeType_default_ = TextureCoordinateGeneratorMo
|
|
|
94069
94276
|
|
|
94070
94277
|
x_ite_Namespace .add ("TextureCoordinateGeneratorModeType", "x_ite/Browser/Texturing/TextureCoordinateGeneratorModeType", TextureCoordinateGeneratorModeType_default_);
|
|
94071
94278
|
/* harmony default export */ const TextureCoordinateGeneratorModeType = (TextureCoordinateGeneratorModeType_default_);
|
|
94279
|
+
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/RenderingConfiguration.js
|
|
94280
|
+
// The numbers must remain in single digits, otherwise the number base must
|
|
94281
|
+
// be increased in the number output for the material shader key.
|
|
94282
|
+
|
|
94283
|
+
const maxClipPlanes = 6;
|
|
94284
|
+
|
|
94285
|
+
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/TexturingConfiguration.js
|
|
94286
|
+
// The numbers must remain in single digits, otherwise the number base must
|
|
94287
|
+
// be increased in the number output for the material shader key.
|
|
94288
|
+
|
|
94289
|
+
const maxTextureTransforms = 4;
|
|
94290
|
+
const maxTexCoords = 4;
|
|
94291
|
+
const maxTextures = 4;
|
|
94292
|
+
|
|
94293
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/Types.glsl.js
|
|
94294
|
+
|
|
94295
|
+
|
|
94296
|
+
|
|
94297
|
+
|
|
94298
|
+
|
|
94299
|
+
|
|
94300
|
+
|
|
94301
|
+
|
|
94302
|
+
const Types_glsl_default_ = /* glsl */ `
|
|
94303
|
+
#define X_ITE
|
|
94304
|
+
#define x3d_None 0
|
|
94305
|
+
#define x3d_Points 0
|
|
94306
|
+
#define x3d_Lines 1
|
|
94307
|
+
#define x3d_Geometry2D 2
|
|
94308
|
+
#define x3d_Geometry3D 3
|
|
94309
|
+
#define x3d_MaxClipPlanes ${maxClipPlanes}
|
|
94310
|
+
#define x3d_LinearFog 1
|
|
94311
|
+
#define x3d_ExponentialFog 2
|
|
94312
|
+
#define x3d_Exponential2Fog 3
|
|
94313
|
+
#define x3d_DirectionalLight 1
|
|
94314
|
+
#define x3d_PointLight 2
|
|
94315
|
+
#define x3d_SpotLight 3
|
|
94316
|
+
#define x3d_MaxTextures ${maxTextures}
|
|
94317
|
+
#define x3d_TextureType2D 2
|
|
94318
|
+
#define x3d_TextureType3D 3
|
|
94319
|
+
#define x3d_TextureTypeCube 4
|
|
94320
|
+
#define x3d_Replace ${Texturing_ModeType .REPLACE}
|
|
94321
|
+
#define x3d_Modulate ${Texturing_ModeType .MODULATE}
|
|
94322
|
+
#define x3d_Modulate2X ${Texturing_ModeType .MODULATE2X}
|
|
94323
|
+
#define x3d_Modulate4X ${Texturing_ModeType .MODULATE4X}
|
|
94324
|
+
#define x3d_Add ${Texturing_ModeType .ADD}
|
|
94325
|
+
#define x3d_AddSigned ${Texturing_ModeType .ADDSIGNED}
|
|
94326
|
+
#define x3d_AddSigned2X ${Texturing_ModeType .ADDSIGNED2X}
|
|
94327
|
+
#define x3d_AddSmooth ${Texturing_ModeType .ADDSMOOTH}
|
|
94328
|
+
#define x3d_Subtract ${Texturing_ModeType .SUBTRACT}
|
|
94329
|
+
#define x3d_BlendDiffuseAlpha ${Texturing_ModeType .BLENDDIFFUSEALPHA}
|
|
94330
|
+
#define x3d_BlendTextureAlpha ${Texturing_ModeType .BLENDTEXTUREALPHA}
|
|
94331
|
+
#define x3d_BlendFactorAlpha ${Texturing_ModeType .BLENDFACTORALPHA}
|
|
94332
|
+
#define x3d_BlendCurrentAlpha ${Texturing_ModeType .BLENDCURRENTALPHA}
|
|
94333
|
+
#define x3d_ModulateAlphaAddColor ${Texturing_ModeType .MODULATEALPHA_ADDCOLOR}
|
|
94334
|
+
#define x3d_ModulateInvAlphaAddColor ${Texturing_ModeType .MODULATEINVALPHA_ADDCOLOR}
|
|
94335
|
+
#define x3d_ModulateInvColorAddAlpha ${Texturing_ModeType .MODULATEINVCOLOR_ADDALPHA}
|
|
94336
|
+
#define x3d_DotProduct3 ${Texturing_ModeType .DOTPRODUCT3}
|
|
94337
|
+
#define x3d_SelectArg1 ${Texturing_ModeType .SELECTARG1}
|
|
94338
|
+
#define x3d_SelectArg2 ${Texturing_ModeType .SELECTARG2}
|
|
94339
|
+
#define x3d_Off ${Texturing_ModeType .OFF}
|
|
94340
|
+
#define x3d_Diffuse ${Texturing_SourceType .DIFFUSE}
|
|
94341
|
+
#define x3d_Specular ${Texturing_SourceType .SPECULAR}
|
|
94342
|
+
#define x3d_Factor ${Texturing_SourceType .FACTOR}
|
|
94343
|
+
#define x3d_Complement ${Texturing_FunctionType .COMPLEMENT}
|
|
94344
|
+
#define x3d_AlphaReplicate ${Texturing_FunctionType .ALPHAREPLICATE}
|
|
94345
|
+
#define x3d_Sphere ${TextureCoordinateGeneratorModeType .SPHERE}
|
|
94346
|
+
#define x3d_CameraSpaceNormal ${TextureCoordinateGeneratorModeType .CAMERASPACENORMAL}
|
|
94347
|
+
#define x3d_CameraSpacePosition ${TextureCoordinateGeneratorModeType .CAMERASPACEPOSITION}
|
|
94348
|
+
#define x3d_CameraSpaceReflectionVector ${TextureCoordinateGeneratorModeType .CAMERASPACEREFLECTIONVECTOR}
|
|
94349
|
+
#define x3d_SphereLocal ${TextureCoordinateGeneratorModeType .SPHERE_LOCAL}
|
|
94350
|
+
#define x3d_Coord ${TextureCoordinateGeneratorModeType .COORD}
|
|
94351
|
+
#define x3d_CoordEye ${TextureCoordinateGeneratorModeType .COORD_EYE}
|
|
94352
|
+
#define x3d_Noise ${TextureCoordinateGeneratorModeType .NOISE}
|
|
94353
|
+
#define x3d_NoiseEye ${TextureCoordinateGeneratorModeType .NOISE_EYE}
|
|
94354
|
+
#define x3d_SphereReflect ${TextureCoordinateGeneratorModeType .SPHERE_REFLECT}
|
|
94355
|
+
#define x3d_SphereReflectLocal ${TextureCoordinateGeneratorModeType .SPHERE_REFLECT_LOCAL}
|
|
94356
|
+
#define x3d_GeometryPoints 0
|
|
94357
|
+
#define x3d_GeometryLines 1
|
|
94358
|
+
#define x3d_NoneClipPlane vec4(88.0,51.0,68.0,33.0)
|
|
94359
|
+
#define x3d_NoneFog 0
|
|
94360
|
+
#define x3d_NoneLight 0
|
|
94361
|
+
#define x3d_NoneTexture 0
|
|
94362
|
+
#if defined(X3D_FOG)
|
|
94363
|
+
struct x3d_FogParameters{mediump int type;mediump vec3 color;mediump float visibilityRange;mediump mat3 matrix;};
|
|
94364
|
+
#endif
|
|
94365
|
+
#if defined(X3D_LIGHTING)
|
|
94366
|
+
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;
|
|
94367
|
+
#if defined(X3D_SHADOWS)
|
|
94368
|
+
mediump vec3 shadowColor;mediump float shadowIntensity;mediump float shadowBias;mediump mat4 shadowMatrix;mediump int shadowMapSize;
|
|
94369
|
+
#endif
|
|
94370
|
+
};
|
|
94371
|
+
#endif
|
|
94372
|
+
#if defined(X3D_USE_IBL)
|
|
94373
|
+
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;
|
|
94374
|
+
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
94375
|
+
mediump sampler2D CharlieLUTTexture;
|
|
94376
|
+
#endif
|
|
94377
|
+
};
|
|
94378
|
+
#endif
|
|
94379
|
+
#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
94380
|
+
struct x3d_PointPropertiesParameters{mediump float pointSizeScaleFactor;mediump float pointSizeMinValue;mediump float pointSizeMaxValue;mediump vec3 attenuation;};
|
|
94381
|
+
#endif
|
|
94382
|
+
#if defined(X3D_GEOMETRY_1D)&&defined(X3D_STYLE_PROPERTIES)
|
|
94383
|
+
struct x3d_LinePropertiesParameters{mediump int linetype;mediump float lineStippleScale;
|
|
94384
|
+
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
94385
|
+
sampler2D texture;
|
|
94386
|
+
#endif
|
|
94387
|
+
};
|
|
94388
|
+
#endif
|
|
94389
|
+
#if(defined(X3D_GEOMETRY_2D)||defined(X3D_GEOMETRY_3D))&&defined(X3D_STYLE_PROPERTIES)
|
|
94390
|
+
struct x3d_FillPropertiesParameters{bool filled;bool hatched;mediump vec3 hatchColor;
|
|
94391
|
+
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
94392
|
+
sampler2D texture;
|
|
94393
|
+
#endif
|
|
94394
|
+
mediump float scale;};
|
|
94395
|
+
#endif
|
|
94396
|
+
#if defined(X3D_UNLIT_MATERIAL)
|
|
94397
|
+
struct x3d_UnlitMaterialParameters{mediump vec3 emissiveColor;mediump float normalScale;mediump float transparency;};
|
|
94398
|
+
#endif
|
|
94399
|
+
#if defined(X3D_MATERIAL)
|
|
94400
|
+
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;};
|
|
94401
|
+
#endif
|
|
94402
|
+
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
94403
|
+
struct x3d_PhysicalMaterialParameters{
|
|
94404
|
+
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
94405
|
+
mediump vec3 diffuseColor;mediump vec3 specularColor;mediump float glossiness;
|
|
94406
|
+
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
94407
|
+
mediump vec3 baseColor;mediump float metallic;mediump float roughness;
|
|
94408
|
+
#endif
|
|
94409
|
+
mediump vec3 emissiveColor;mediump float occlusionStrength;mediump float normalScale;mediump float transparency;};
|
|
94410
|
+
#endif
|
|
94411
|
+
${MaterialTextures .structs ()}
|
|
94412
|
+
#if defined(X3D_MULTI_TEXTURING)
|
|
94413
|
+
struct x3d_MultiTextureParameters{mediump int mode;mediump int alphaMode;mediump int source;mediump int function;};
|
|
94414
|
+
#endif
|
|
94415
|
+
#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES)
|
|
94416
|
+
struct x3d_TextureCoordinateGeneratorParameters{mediump int mode;mediump float parameter[6];};
|
|
94417
|
+
#endif
|
|
94418
|
+
`
|
|
94419
|
+
;
|
|
94420
|
+
|
|
94421
|
+
x_ite_Namespace .add ("Types.glsl", "assets/shaders/Types.glsl", Types_glsl_default_);
|
|
94422
|
+
/* harmony default export */ const Types_glsl = (Types_glsl_default_);
|
|
94072
94423
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Shaders/ShaderSource.js
|
|
94073
94424
|
/*******************************************************************************
|
|
94074
94425
|
*
|
|
@@ -94119,33 +94470,29 @@ x_ite_Namespace .add ("TextureCoordinateGeneratorModeType", "x_ite/Browser/Textu
|
|
|
94119
94470
|
|
|
94120
94471
|
|
|
94121
94472
|
|
|
94122
|
-
|
|
94123
|
-
|
|
94124
|
-
|
|
94125
|
-
|
|
94126
94473
|
const ShaderSource =
|
|
94127
94474
|
{
|
|
94128
94475
|
getSource (gl, browser, source, options)
|
|
94129
94476
|
{
|
|
94130
|
-
|
|
94131
|
-
|
|
94132
|
-
|
|
94133
|
-
|
|
94134
|
-
|
|
94135
|
-
|
|
94136
|
-
|
|
94137
|
-
|
|
94138
|
-
|
|
94139
|
-
|
|
94140
|
-
|
|
94141
|
-
|
|
94142
|
-
|
|
94143
|
-
|
|
94144
|
-
|
|
94477
|
+
const
|
|
94478
|
+
COMMENTS = "\\s+|/\\*[\\s\\S]*?\\*/|//.*?\\n",
|
|
94479
|
+
LINE = "#line\\s+.*?\\n",
|
|
94480
|
+
IF = "#if\\s+.*?\\n",
|
|
94481
|
+
ELIF = "#elif\\s+.*?\\n",
|
|
94482
|
+
IFDEF = "#ifdef\\s+.*?\\n",
|
|
94483
|
+
IFNDEF = "#ifndef\\s+.*?\\n",
|
|
94484
|
+
ELSE = "#else.*?\\n",
|
|
94485
|
+
ENDIF = "#endif.*?\\n",
|
|
94486
|
+
DEFINE = "#define\\s+(?:[^\\n\\\\]|\\\\[^\\r\\n]|\\\\\\r?\\n)*\\n",
|
|
94487
|
+
UNDEF = "#undef\\s+.*?\\n",
|
|
94488
|
+
PRAGMA = "#pragma\\s+.*?\\n",
|
|
94489
|
+
PREPROCESSOR = `${LINE}|${IF}|${ELIF}|${IFDEF}|${IFNDEF}|${ELSE}|${ENDIF}|${DEFINE}|${UNDEF}|${PRAGMA}`,
|
|
94490
|
+
VERSION = "#version\\s+.*?\\n",
|
|
94491
|
+
EXTENSION = "#extension\\s+.*?\\n";
|
|
94145
94492
|
|
|
94146
|
-
|
|
94147
|
-
|
|
94148
|
-
|
|
94493
|
+
const
|
|
94494
|
+
GLSL = new RegExp (`^((?:${COMMENTS}|${PREPROCESSOR})*(?:${VERSION})?(?:${COMMENTS}|${PREPROCESSOR}|${EXTENSION})*)`, "s"),
|
|
94495
|
+
match = source .match (GLSL);
|
|
94149
94496
|
|
|
94150
94497
|
// const
|
|
94151
94498
|
// COMMENTS = "\\s+|/\\*.*?\\*/|//.*?\\n",
|
|
@@ -94161,90 +94508,10 @@ const ShaderSource =
|
|
|
94161
94508
|
|
|
94162
94509
|
// Constants
|
|
94163
94510
|
|
|
94164
|
-
|
|
94165
|
-
|
|
94166
|
-
|
|
94167
|
-
|
|
94168
|
-
if (gl .HAS_FEATURE_DEPTH_TEXTURE)
|
|
94169
|
-
constants += "#define X3D_DEPTH_TEXTURE\n";
|
|
94170
|
-
|
|
94171
|
-
for (const option of options)
|
|
94172
|
-
constants += "#define " + option + "\n";
|
|
94173
|
-
|
|
94174
|
-
// Definitions
|
|
94175
|
-
|
|
94176
|
-
let definitions = "";
|
|
94177
|
-
|
|
94178
|
-
definitions += "#define x3d_None 0\n";
|
|
94179
|
-
|
|
94180
|
-
definitions += "#define x3d_Points 0\n";
|
|
94181
|
-
definitions += "#define x3d_Lines 1\n";
|
|
94182
|
-
definitions += "#define x3d_Geometry2D 2\n";
|
|
94183
|
-
definitions += "#define x3d_Geometry3D 3\n";
|
|
94184
|
-
|
|
94185
|
-
definitions += "#define x3d_MaxClipPlanes " + browser .getMaxClipPlanes () + "\n";
|
|
94186
|
-
|
|
94187
|
-
definitions += "#define x3d_LinearFog 1\n";
|
|
94188
|
-
definitions += "#define x3d_ExponentialFog 2\n";
|
|
94189
|
-
definitions += "#define x3d_Exponential2Fog 3\n";
|
|
94190
|
-
|
|
94191
|
-
definitions += "#define x3d_MaxLights " + browser .getMaxLights () + "\n";
|
|
94192
|
-
definitions += "#define x3d_DirectionalLight 1\n";
|
|
94193
|
-
definitions += "#define x3d_PointLight 2\n";
|
|
94194
|
-
definitions += "#define x3d_SpotLight 3\n";
|
|
94195
|
-
|
|
94196
|
-
definitions += "#define x3d_MaxTextures " + browser .getMaxTextures () + "\n";
|
|
94197
|
-
definitions += "#define x3d_TextureType2D 2\n";
|
|
94198
|
-
definitions += "#define x3d_TextureType3D 3\n";
|
|
94199
|
-
definitions += "#define x3d_TextureTypeCube 4\n";
|
|
94200
|
-
|
|
94201
|
-
definitions += "#define x3d_Replace " + Texturing_ModeType .REPLACE + "\n";
|
|
94202
|
-
definitions += "#define x3d_Modulate " + Texturing_ModeType .MODULATE + "\n";
|
|
94203
|
-
definitions += "#define x3d_Modulate2X " + Texturing_ModeType .MODULATE2X + "\n";
|
|
94204
|
-
definitions += "#define x3d_Modulate4X " + Texturing_ModeType .MODULATE4X + "\n";
|
|
94205
|
-
definitions += "#define x3d_Add " + Texturing_ModeType .ADD + "\n";
|
|
94206
|
-
definitions += "#define x3d_AddSigned " + Texturing_ModeType .ADDSIGNED + "\n";
|
|
94207
|
-
definitions += "#define x3d_AddSigned2X " + Texturing_ModeType .ADDSIGNED2X + "\n";
|
|
94208
|
-
definitions += "#define x3d_AddSmooth " + Texturing_ModeType .ADDSMOOTH + "\n";
|
|
94209
|
-
definitions += "#define x3d_Subtract " + Texturing_ModeType .SUBTRACT + "\n";
|
|
94210
|
-
definitions += "#define x3d_BlendDiffuseAlpha " + Texturing_ModeType .BLENDDIFFUSEALPHA + "\n";
|
|
94211
|
-
definitions += "#define x3d_BlendTextureAlpha " + Texturing_ModeType .BLENDTEXTUREALPHA + "\n";
|
|
94212
|
-
definitions += "#define x3d_BlendFactorAlpha " + Texturing_ModeType .BLENDFACTORALPHA + "\n";
|
|
94213
|
-
definitions += "#define x3d_BlendCurrentAlpha " + Texturing_ModeType .BLENDCURRENTALPHA + "\n";
|
|
94214
|
-
definitions += "#define x3d_ModulateAlphaAddColor " + Texturing_ModeType .MODULATEALPHA_ADDCOLOR + "\n";
|
|
94215
|
-
definitions += "#define x3d_ModulateInvAlphaAddColor " + Texturing_ModeType .MODULATEINVALPHA_ADDCOLOR + "\n";
|
|
94216
|
-
definitions += "#define x3d_ModulateInvColorAddAlpha " + Texturing_ModeType .MODULATEINVCOLOR_ADDALPHA + "\n";
|
|
94217
|
-
definitions += "#define x3d_DotProduct3 " + Texturing_ModeType .DOTPRODUCT3 + "\n";
|
|
94218
|
-
definitions += "#define x3d_SelectArg1 " + Texturing_ModeType .SELECTARG1 + "\n";
|
|
94219
|
-
definitions += "#define x3d_SelectArg2 " + Texturing_ModeType .SELECTARG2 + "\n";
|
|
94220
|
-
definitions += "#define x3d_Off " + Texturing_ModeType .OFF + "\n";
|
|
94221
|
-
|
|
94222
|
-
definitions += "#define x3d_Diffuse " + Texturing_SourceType .DIFFUSE + "\n";
|
|
94223
|
-
definitions += "#define x3d_Specular " + Texturing_SourceType .SPECULAR + "\n";
|
|
94224
|
-
definitions += "#define x3d_Factor " + Texturing_SourceType .FACTOR + "\n";
|
|
94225
|
-
|
|
94226
|
-
definitions += "#define x3d_Complement " + Texturing_FunctionType .COMPLEMENT + "\n";
|
|
94227
|
-
definitions += "#define x3d_AlphaReplicate " + Texturing_FunctionType .ALPHAREPLICATE + "\n";
|
|
94228
|
-
|
|
94229
|
-
definitions += "#define x3d_Sphere " + TextureCoordinateGeneratorModeType .SPHERE + "\n";
|
|
94230
|
-
definitions += "#define x3d_CameraSpaceNormal " + TextureCoordinateGeneratorModeType .CAMERASPACENORMAL + "\n";
|
|
94231
|
-
definitions += "#define x3d_CameraSpacePosition " + TextureCoordinateGeneratorModeType .CAMERASPACEPOSITION + "\n";
|
|
94232
|
-
definitions += "#define x3d_CameraSpaceReflectionVector " + TextureCoordinateGeneratorModeType .CAMERASPACEREFLECTIONVECTOR + "\n";
|
|
94233
|
-
definitions += "#define x3d_SphereLocal " + TextureCoordinateGeneratorModeType .SPHERE_LOCAL + "\n";
|
|
94234
|
-
definitions += "#define x3d_Coord " + TextureCoordinateGeneratorModeType .COORD + "\n";
|
|
94235
|
-
definitions += "#define x3d_CoordEye " + TextureCoordinateGeneratorModeType .COORD_EYE + "\n";
|
|
94236
|
-
definitions += "#define x3d_Noise " + TextureCoordinateGeneratorModeType .NOISE + "\n";
|
|
94237
|
-
definitions += "#define x3d_NoiseEye " + TextureCoordinateGeneratorModeType .NOISE_EYE + "\n";
|
|
94238
|
-
definitions += "#define x3d_SphereReflect " + TextureCoordinateGeneratorModeType .SPHERE_REFLECT + "\n";
|
|
94239
|
-
definitions += "#define x3d_SphereReflectLocal " + TextureCoordinateGeneratorModeType .SPHERE_REFLECT_LOCAL + "\n";
|
|
94240
|
-
|
|
94241
|
-
// Legacy
|
|
94242
|
-
definitions += "#define x3d_GeometryPoints 0\n";
|
|
94243
|
-
definitions += "#define x3d_GeometryLines 1\n";
|
|
94244
|
-
definitions += "#define x3d_NoneClipPlane vec4 (88.0, 51.0, 68.0, 33.0)\n";
|
|
94245
|
-
definitions += "#define x3d_NoneFog 0\n";
|
|
94246
|
-
definitions += "#define x3d_NoneLight 0\n";
|
|
94247
|
-
definitions += "#define x3d_NoneTexture 0\n";
|
|
94511
|
+
const defines = /* glsl */ `
|
|
94512
|
+
${options .map (option => `#define ${option}`) .join ("\n")}
|
|
94513
|
+
#define x3d_MaxLights ${browser .getMaxLights ()}
|
|
94514
|
+
`
|
|
94248
94515
|
|
|
94249
94516
|
// Adjust precision of struct types;
|
|
94250
94517
|
|
|
@@ -94255,12 +94522,12 @@ const ShaderSource =
|
|
|
94255
94522
|
precisionInt = matchInt ?.[1] ?? "mediump";
|
|
94256
94523
|
|
|
94257
94524
|
const types = Types_glsl
|
|
94258
|
-
.replace (/mediump\s+(float|vec2|vec3|mat3|mat4)/g, precisionFloat
|
|
94259
|
-
.replace (/mediump\s+(int)/g, precisionInt
|
|
94525
|
+
.replace (/mediump\s+(float|vec2|vec3|mat3|mat4)/g, `${precisionFloat} \$1`)
|
|
94526
|
+
.replace (/mediump\s+(int)/g, `${precisionInt} \$1`);
|
|
94260
94527
|
|
|
94261
|
-
const lines = (match [1] .match (/\n/g)
|
|
94528
|
+
const lines = (match [1] .match (/\n/g) ?.length ?? 0) + 1;
|
|
94262
94529
|
|
|
94263
|
-
return `${match [1]}${
|
|
94530
|
+
return `${match [1]}${defines}${types}#line ${lines + 1} -1\n${source .substring (match [0] .length)}`;
|
|
94264
94531
|
},
|
|
94265
94532
|
};
|
|
94266
94533
|
|
|
@@ -94277,14 +94544,6 @@ const ShaderSource_default_ = ShaderSource;
|
|
|
94277
94544
|
|
|
94278
94545
|
x_ite_Namespace .add ("ShaderSource", "x_ite/Browser/Shaders/ShaderSource", ShaderSource_default_);
|
|
94279
94546
|
/* harmony default export */ const Shaders_ShaderSource = (ShaderSource_default_);
|
|
94280
|
-
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/TexturingConfiguration.js
|
|
94281
|
-
// The numbers must remain in single digits, otherwise the number base must
|
|
94282
|
-
// be increased in the number output for the material shader key.
|
|
94283
|
-
|
|
94284
|
-
const maxTextureTransforms = 4;
|
|
94285
|
-
const maxTexCoords = 4;
|
|
94286
|
-
const maxTextures = 4;
|
|
94287
|
-
|
|
94288
94547
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Fragment1.glsl.js
|
|
94289
94548
|
|
|
94290
94549
|
|
|
@@ -94795,19 +95054,19 @@ uniform x3d_NormalTextureParameters x3d_NormalTexture;
|
|
|
94795
95054
|
NormalInfo getNormalInfo(const in float normalScale){
|
|
94796
95055
|
#if defined(X3D_NORMAL_TEXTURE)
|
|
94797
95056
|
vec3 UV=getTexCoord(x3d_NormalTexture.textureTransformMapping,x3d_NormalTexture.textureCoordinateMapping);
|
|
94798
|
-
#else
|
|
94799
|
-
vec3 UV=vec3(0.0);
|
|
94800
|
-
#endif
|
|
94801
95057
|
#if defined(X3D_NORMAL_TEXTURE_FLIP_Y)
|
|
94802
95058
|
UV.t=1.0-UV.t;
|
|
94803
95059
|
#endif
|
|
95060
|
+
#else
|
|
95061
|
+
vec3 UV=vertex;
|
|
95062
|
+
#endif
|
|
94804
95063
|
vec3 n,t,b,ng;
|
|
94805
95064
|
#if defined(X3D_TANGENTS)
|
|
94806
95065
|
t=normalize(TBN[0]);b=normalize(TBN[1]);ng=normalize(TBN[2]);
|
|
94807
95066
|
#else
|
|
94808
95067
|
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);
|
|
94809
95068
|
#endif
|
|
94810
|
-
if(gl_FrontFacing==false){t
|
|
95069
|
+
if(gl_FrontFacing==false){t=-t;b=-b;ng=-ng;}NormalInfo info;info.ng=ng;
|
|
94811
95070
|
#if defined(X3D_NORMAL_TEXTURE)
|
|
94812
95071
|
#if __VERSION__==100
|
|
94813
95072
|
#if defined(X3D_NORMAL_TEXTURE_2D)
|
|
@@ -95881,14 +96140,14 @@ x_ite_Namespace .add ("Unlit2.fs", "assets/shaders/webgl2/Unlit2.fs", Unlit2_fs_
|
|
|
95881
96140
|
/* harmony default export */ const Unlit2_fs = (Unlit2_fs_default_);
|
|
95882
96141
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/BRDF2.glsl.js
|
|
95883
96142
|
const BRDF2_glsl_default_ = /* glsl */ `
|
|
95884
|
-
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);}
|
|
96143
|
+
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);}
|
|
95885
96144
|
#if defined(X3D_LIGHTING)
|
|
95886
|
-
vec3 BRDF_lambertian(const in vec3
|
|
96145
|
+
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);}
|
|
95887
96146
|
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95888
96147
|
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;}
|
|
95889
96148
|
#endif
|
|
95890
96149
|
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
95891
|
-
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
|
|
96150
|
+
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);}
|
|
95892
96151
|
#endif
|
|
95893
96152
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95894
96153
|
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;}
|
|
@@ -95926,36 +96185,26 @@ if(!x3d_EnvironmentLightSource.specularTextureLinear)textureColor=sRGBToLinear(t
|
|
|
95926
96185
|
#endif
|
|
95927
96186
|
return textureColor*x3d_EnvironmentLightSource.color*x3d_EnvironmentLightSource.intensity;}
|
|
95928
96187
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95929
|
-
vec3 getSheenLight(const in vec3 reflection,const in float lod){
|
|
95930
|
-
#endif
|
|
95931
|
-
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));
|
|
96188
|
+
vec3 getSheenLight(const in vec3 reflection,const in float lod){vec3 texCoord=x3d_EnvironmentLightSource.rotation*reflection*vec3(-1.0,1.0,1.0);
|
|
95932
96189
|
#if __VERSION__==100
|
|
95933
|
-
|
|
96190
|
+
vec3 textureColor=textureCubeLodEXT(x3d_EnvironmentLightSource.diffuseTexture,texCoord,lod).rgb;
|
|
95934
96191
|
#else
|
|
95935
|
-
|
|
96192
|
+
vec3 textureColor=textureLod(x3d_EnvironmentLightSource.diffuseTexture,texCoord,lod).rgb;
|
|
95936
96193
|
#endif
|
|
95937
|
-
|
|
95938
|
-
|
|
95939
|
-
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
96194
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
96195
|
+
if(x3d_EnvironmentLightSource.diffuseTextureLinear)textureColor=linearToSRGB(textureColor);
|
|
95940
96196
|
#else
|
|
95941
|
-
|
|
96197
|
+
if(!x3d_EnvironmentLightSource.diffuseTextureLinear)textureColor=sRGBToLinear(textureColor);
|
|
95942
96198
|
#endif
|
|
95943
|
-
|
|
95944
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95945
|
-
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));
|
|
95946
|
-
#if __VERSION__==100
|
|
95947
|
-
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95948
|
-
#else
|
|
95949
|
-
vec2 f_ab=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
96199
|
+
return textureColor*x3d_EnvironmentLightSource.color*x3d_EnvironmentLightSource.intensity;}
|
|
95950
96200
|
#endif
|
|
95951
|
-
vec3
|
|
96201
|
+
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));
|
|
95952
96202
|
#if __VERSION__==100
|
|
95953
96203
|
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95954
96204
|
#else
|
|
95955
96205
|
vec2 f_ab=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95956
96206
|
#endif
|
|
95957
|
-
vec3
|
|
95958
|
-
#endif
|
|
96207
|
+
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;}
|
|
95959
96208
|
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95960
96209
|
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);
|
|
95961
96210
|
#if __VERSION__==100
|
|
@@ -95983,16 +96232,10 @@ vec2 brdf=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
|
95983
96232
|
vec3 specularColor=f0*brdf.x+f90*brdf.y;return(1.0-specularColor)*attenuatedColor*baseColor;}
|
|
95984
96233
|
#endif
|
|
95985
96234
|
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
95986
|
-
vec3 getIBLRadianceAnisotropy(const in vec3 n,const in vec3 v,const in float roughness,const in float anisotropy,const in vec3 anisotropyDirection
|
|
95987
|
-
#if __VERSION__==100
|
|
95988
|
-
vec2 f_ab=texture2D(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95989
|
-
#else
|
|
95990
|
-
vec2 f_ab=texture(x3d_EnvironmentLightSource.GGXLUTTexture,brdfSamplePoint).rg;
|
|
95991
|
-
#endif
|
|
95992
|
-
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;}
|
|
96235
|
+
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;}
|
|
95993
96236
|
#endif
|
|
95994
96237
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95995
|
-
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.
|
|
96238
|
+
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));
|
|
95996
96239
|
#if __VERSION__==100
|
|
95997
96240
|
float brdf=texture2D(x3d_EnvironmentLightSource.CharlieLUTTexture,brdfSamplePoint).b;
|
|
95998
96241
|
#else
|
|
@@ -96020,7 +96263,7 @@ x_ite_Namespace .add ("Iridescence2.glsl", "assets/shaders/webgl2/pbr/Iridescenc
|
|
|
96020
96263
|
|
|
96021
96264
|
|
|
96022
96265
|
const MaterialInfo2_glsl_default_ = /* glsl */ `
|
|
96023
|
-
struct MaterialInfo{float ior;float perceptualRoughness;vec3
|
|
96266
|
+
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;};
|
|
96024
96267
|
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
96025
96268
|
${MaterialTextures .texture ("x3d_DiffuseTexture", "rgba", "linear")}
|
|
96026
96269
|
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
@@ -96051,11 +96294,11 @@ baseColor=getTextureColor(baseColor,vec4(vec3(1.0),alpha));
|
|
|
96051
96294
|
return baseColor;}
|
|
96052
96295
|
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
96053
96296
|
${MaterialTextures .texture ("x3d_SpecularGlossinessTexture", "rgba", "linear")}
|
|
96054
|
-
MaterialInfo getSpecularGlossinessInfo(in MaterialInfo info){info.
|
|
96297
|
+
MaterialInfo getSpecularGlossinessInfo(in MaterialInfo info){info.f0_dielectric=x3d_Material.specularColor;info.perceptualRoughness=x3d_Material.glossiness;
|
|
96055
96298
|
#if defined(X3D_SPECULAR_GLOSSINESS_TEXTURE)
|
|
96056
|
-
vec4 sgSample=getSpecularGlossinessTexture();info.perceptualRoughness*=sgSample.a;info.
|
|
96299
|
+
vec4 sgSample=getSpecularGlossinessTexture();info.perceptualRoughness*=sgSample.a;info.f0_dielectric*=sgSample.rgb;
|
|
96057
96300
|
#endif
|
|
96058
|
-
info.perceptualRoughness=1.0-info.perceptualRoughness;
|
|
96301
|
+
info.perceptualRoughness=1.0-info.perceptualRoughness;return info;}
|
|
96059
96302
|
#endif
|
|
96060
96303
|
#if defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
96061
96304
|
${MaterialTextures .texture ("x3d_MetallicRoughnessTexture")}
|
|
@@ -96063,7 +96306,7 @@ MaterialInfo getMetallicRoughnessInfo(in MaterialInfo info){info.metallic=x3d_Ma
|
|
|
96063
96306
|
#if defined(X3D_METALLIC_ROUGHNESS_TEXTURE)
|
|
96064
96307
|
vec4 mrSample=getMetallicRoughnessTexture();info.metallic*=mrSample.b;info.perceptualRoughness*=mrSample.g;
|
|
96065
96308
|
#endif
|
|
96066
|
-
|
|
96309
|
+
return info;}
|
|
96067
96310
|
#endif
|
|
96068
96311
|
${MaterialTextures .texture ("x3d_EmissiveTexture", "rgb", "linear")}
|
|
96069
96312
|
#if defined(X3D_EMISSIVE_STRENGTH_MATERIAL_EXT)
|
|
@@ -96086,7 +96329,7 @@ return 1.0;
|
|
|
96086
96329
|
#endif
|
|
96087
96330
|
}
|
|
96088
96331
|
#if defined(X3D_IOR_MATERIAL_EXT)
|
|
96089
|
-
uniform float x3d_IorEXT;MaterialInfo getIorInfo(in MaterialInfo info){info.
|
|
96332
|
+
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;}
|
|
96090
96333
|
#endif
|
|
96091
96334
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96092
96335
|
${MaterialTextures .texture ("x3d_SheenColorTextureEXT",
|
|
@@ -96107,6 +96350,19 @@ return texture(x3d_SheenELUTTextureEXT,vec2(NdotV,sheenRoughnessFactor)).r;
|
|
|
96107
96350
|
#endif
|
|
96108
96351
|
}
|
|
96109
96352
|
#endif
|
|
96353
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
|
|
96354
|
+
${MaterialTextures .texture ("x3d_DiffuseTransmissionTextureEXT",
|
|
96355
|
+
"a")}
|
|
96356
|
+
${MaterialTextures .texture ("x3d_DiffuseTransmissionColorTextureEXT", "rgb", "linear")}
|
|
96357
|
+
uniform float x3d_DiffuseTransmissionEXT;uniform vec3 x3d_DiffuseTransmissionColorEXT;MaterialInfo getDiffuseTransmissionInfo(in MaterialInfo info){info.diffuseTransmissionFactor=x3d_DiffuseTransmissionEXT;info.diffuseTransmissionColorFactor=x3d_DiffuseTransmissionColorEXT;
|
|
96358
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_TEXTURE_EXT)
|
|
96359
|
+
info.diffuseTransmissionFactor*=getDiffuseTransmissionTextureEXT();
|
|
96360
|
+
#endif
|
|
96361
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_COLOR_TEXTURE_EXT)
|
|
96362
|
+
info.diffuseTransmissionColorFactor*=getDiffuseTransmissionColorTextureEXT();
|
|
96363
|
+
#endif
|
|
96364
|
+
return info;}
|
|
96365
|
+
#endif
|
|
96110
96366
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96111
96367
|
${MaterialTextures .texture ("x3d_ClearcoatTextureEXT",
|
|
96112
96368
|
"r")}
|
|
@@ -96142,7 +96398,7 @@ specularTexture.a=getSpecularTextureEXT();
|
|
|
96142
96398
|
#if defined(X3D_SPECULAR_COLOR_TEXTURE_EXT)
|
|
96143
96399
|
specularTexture.rgb=getSpecularColorTextureEXT();
|
|
96144
96400
|
#endif
|
|
96145
|
-
|
|
96401
|
+
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;}
|
|
96146
96402
|
#endif
|
|
96147
96403
|
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96148
96404
|
${MaterialTextures .texture ("x3d_ThicknessTextureEXT", "g")}
|
|
@@ -96216,12 +96472,11 @@ vec4 getMaterialColor(){vec4 baseColor=getBaseColor();
|
|
|
96216
96472
|
#if defined(X3D_TEXTURE_PROJECTION)
|
|
96217
96473
|
baseColor.rgb*=getTextureProjectorColor();
|
|
96218
96474
|
#endif
|
|
96219
|
-
|
|
96220
|
-
vec3 v=normalize(-vertex);
|
|
96475
|
+
vec3 color=vec3(0.0);vec3 v=normalize(-vertex);
|
|
96221
96476
|
#if defined(X3D_USE_IBL)||defined(X3D_LIGHTING)||defined(X3D_ANISOTROPY_MATERIAL_EXT)||defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96222
96477
|
NormalInfo normalInfo=getNormalInfo(x3d_Material.normalScale);vec3 n=normalInfo.n;float NdotV=clamp(dot(n,v),0.0,1.0);
|
|
96223
96478
|
#endif
|
|
96224
|
-
MaterialInfo materialInfo;materialInfo.baseColor=baseColor.rgb;materialInfo.ior=1.5;materialInfo.
|
|
96479
|
+
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;
|
|
96225
96480
|
#if defined(X3D_IOR_MATERIAL_EXT)
|
|
96226
96481
|
materialInfo=getIorInfo(materialInfo);
|
|
96227
96482
|
#endif
|
|
@@ -96249,80 +96504,100 @@ materialInfo=getVolumeInfo(materialInfo);
|
|
|
96249
96504
|
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96250
96505
|
materialInfo=getIridescenceInfo(materialInfo);
|
|
96251
96506
|
#endif
|
|
96507
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
|
|
96508
|
+
materialInfo=getDiffuseTransmissionInfo(materialInfo);
|
|
96509
|
+
#endif
|
|
96252
96510
|
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96253
96511
|
materialInfo=getAnisotropyInfo(materialInfo,normalInfo);
|
|
96254
96512
|
#endif
|
|
96255
|
-
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.
|
|
96513
|
+
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;
|
|
96256
96514
|
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)&&(defined(X3D_USE_IBL)||defined(X3D_LIGHTING))
|
|
96257
|
-
vec3
|
|
96515
|
+
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;
|
|
96516
|
+
#endif
|
|
96517
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
|
|
96518
|
+
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96519
|
+
diffuseTransmissionThickness=materialInfo.thickness*(length(vec3(u_ModelMatrix[0].xyz))+length(vec3(u_ModelMatrix[1].xyz))+length(vec3(u_ModelMatrix[2].xyz)))/3.0;
|
|
96520
|
+
#endif
|
|
96521
|
+
#endif
|
|
96522
|
+
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96523
|
+
clearcoatFactor=materialInfo.clearcoatFactor;clearcoatFresnel=F_Schlick(materialInfo.clearcoatF0,materialInfo.clearcoatF90,clamp(dot(materialInfo.clearcoatNormal,v),0.0,1.0));
|
|
96258
96524
|
#endif
|
|
96259
96525
|
#if defined(X3D_USE_IBL)
|
|
96260
|
-
|
|
96261
|
-
|
|
96262
|
-
|
|
96263
|
-
|
|
96526
|
+
f_diffuse=getDiffuseLight(n)*baseColor.rgb;
|
|
96527
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
|
|
96528
|
+
vec3 diffuseTransmissionIBL=getDiffuseLight(-n)*materialInfo.diffuseTransmissionColorFactor;
|
|
96529
|
+
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96530
|
+
diffuseTransmissionIBL=applyVolumeAttenuation(diffuseTransmissionIBL,diffuseTransmissionThickness,materialInfo.attenuationColor,materialInfo.attenuationDistance);
|
|
96531
|
+
#endif
|
|
96532
|
+
f_diffuse=mix(f_diffuse,diffuseTransmissionIBL,materialInfo.diffuseTransmissionFactor);
|
|
96533
|
+
#endif
|
|
96534
|
+
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96535
|
+
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);
|
|
96536
|
+
#endif
|
|
96537
|
+
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96538
|
+
f_specular_metal=getIBLRadianceAnisotropy(n,v,materialInfo.perceptualRoughness,materialInfo.anisotropyStrength,materialInfo.anisotropicB);f_specular_dielectric=f_specular_metal;
|
|
96264
96539
|
#else
|
|
96265
|
-
|
|
96540
|
+
f_specular_metal=getIBLRadianceGGX(n,v,materialInfo.perceptualRoughness);f_specular_dielectric=f_specular_metal;
|
|
96541
|
+
#endif
|
|
96542
|
+
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);
|
|
96543
|
+
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96544
|
+
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);
|
|
96266
96545
|
#endif
|
|
96267
96546
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96268
|
-
|
|
96547
|
+
clearcoat_brdf=getIBLRadianceGGX(materialInfo.clearcoatNormal,v,materialInfo.clearcoatRoughness);
|
|
96269
96548
|
#endif
|
|
96270
96549
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96271
|
-
f_sheen
|
|
96550
|
+
f_sheen=getIBLRadianceCharlie(n,v,materialInfo.sheenRoughnessFactor,materialInfo.sheenColorFactor);albedoSheenScaling=1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor);
|
|
96272
96551
|
#endif
|
|
96273
|
-
|
|
96274
|
-
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);
|
|
96552
|
+
color=mix(f_dielectric_brdf_ibl,f_metal_brdf_ibl,materialInfo.metallic);color=f_sheen+color*albedoSheenScaling;color=mix(color,clearcoat_brdf,clearcoatFactor*clearcoatFresnel);
|
|
96275
96553
|
#endif
|
|
96554
|
+
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
96555
|
+
float ao=getOcclusionFactor();color*=1.0+x3d_Material.occlusionStrength*(ao-1.0);
|
|
96276
96556
|
#endif
|
|
96277
|
-
|
|
96557
|
+
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);
|
|
96278
96558
|
#if defined(X3D_LIGHTING)
|
|
96279
|
-
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);
|
|
96559
|
+
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);
|
|
96280
96560
|
#if defined(X3D_SHADOWS)
|
|
96281
|
-
|
|
96282
|
-
#endif
|
|
96283
|
-
vec3 l_diffuse=vec3(0.0);vec3 l_specular=vec3(0.0);
|
|
96284
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96285
|
-
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);
|
|
96286
|
-
#elif defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96287
|
-
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);
|
|
96288
|
-
#else
|
|
96289
|
-
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);
|
|
96561
|
+
lightIntensity=mix(lightIntensity,light.shadowColor,getShadowIntensity(i,light));
|
|
96290
96562
|
#endif
|
|
96291
|
-
|
|
96292
|
-
|
|
96563
|
+
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;
|
|
96564
|
+
#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
|
|
96565
|
+
vec3 diffuse_btdf=lightIntensity*clamp(dot(-n,l),0.0,1.0)*BRDF_lambertian(materialInfo.diffuseTransmissionColorFactor);
|
|
96566
|
+
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96567
|
+
diffuse_btdf=applyVolumeAttenuation(diffuse_btdf,diffuseTransmissionThickness,materialInfo.attenuationColor,materialInfo.attenuationDistance);
|
|
96293
96568
|
#endif
|
|
96294
|
-
|
|
96295
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96296
|
-
f_clearcoat+=intensity*getPunctualRadianceClearCoat(materialInfo.clearcoatNormal,v,l,h,VdotH,materialInfo.clearcoatF0,materialInfo.clearcoatF90,materialInfo.clearcoatRoughness);
|
|
96569
|
+
l_diffuse=mix(l_diffuse,diffuse_btdf,materialInfo.diffuseTransmissionFactor);
|
|
96297
96570
|
#endif
|
|
96298
|
-
}
|
|
96299
96571
|
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96300
|
-
vec3 transmissionRay=getVolumeTransmissionRay(n,v,materialInfo.thickness,materialInfo.ior,x3d_ModelViewMatrix);pointToLight-=transmissionRay;l=normalize(pointToLight);vec3
|
|
96572
|
+
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);
|
|
96301
96573
|
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96302
96574
|
transmittedLight=applyVolumeAttenuation(transmittedLight,length(transmissionRay),materialInfo.attenuationColor,materialInfo.attenuationDistance);
|
|
96303
96575
|
#endif
|
|
96304
|
-
|
|
96305
|
-
#endif
|
|
96306
|
-
}}
|
|
96576
|
+
l_diffuse=mix(l_diffuse,transmittedLight,materialInfo.transmissionFactor);
|
|
96307
96577
|
#endif
|
|
96308
|
-
|
|
96309
|
-
#if defined(
|
|
96310
|
-
|
|
96578
|
+
vec3 intensity=getLightIntensity(light,l,length(light.matrix*pointToLight));
|
|
96579
|
+
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96580
|
+
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;
|
|
96311
96581
|
#else
|
|
96312
|
-
|
|
96582
|
+
l_specular_metal=intensity*NdotL*BRDF_specularGGX(materialInfo.alphaRoughness,NdotL,NdotV,NdotH);l_specular_dielectric=l_specular_metal;
|
|
96583
|
+
#endif
|
|
96584
|
+
l_metal_brdf=metal_fresnel*l_specular_metal;l_dielectric_brdf=mix(l_diffuse,l_specular_dielectric,dielectric_fresnel);
|
|
96585
|
+
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96586
|
+
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);
|
|
96313
96587
|
#endif
|
|
96314
96588
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96315
|
-
|
|
96589
|
+
l_clearcoat_brdf=intensity*getPunctualRadianceClearCoat(materialInfo.clearcoatNormal,v,l,h,VdotH,materialInfo.clearcoatF0,materialInfo.clearcoatF90,materialInfo.clearcoatRoughness);
|
|
96316
96590
|
#endif
|
|
96317
|
-
#if defined(
|
|
96318
|
-
|
|
96591
|
+
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96592
|
+
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));
|
|
96319
96593
|
#endif
|
|
96594
|
+
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;}}
|
|
96320
96595
|
#endif
|
|
96321
|
-
|
|
96596
|
+
f_emissive=getEmissiveColor();
|
|
96322
96597
|
#if defined(X3D_UNLIT_MATERIAL_EXT)
|
|
96323
96598
|
color=baseColor.rgb;
|
|
96324
96599
|
#else
|
|
96325
|
-
color=f_emissive
|
|
96600
|
+
color=f_emissive*(1.0-clearcoatFactor*clearcoatFresnel)+color;
|
|
96326
96601
|
#endif
|
|
96327
96602
|
return vec4(color,baseColor.a);}void main(){fragment_main();}`
|
|
96328
96603
|
;
|
|
@@ -96336,12 +96611,12 @@ float applyIorToRoughness(const in float roughness,const in float ior){return ro
|
|
|
96336
96611
|
#endif
|
|
96337
96612
|
#if defined(X3D_LIGHTING)
|
|
96338
96613
|
#pragma X3D include "../common/Lighting.glsl"
|
|
96339
|
-
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=
|
|
96614
|
+
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;}
|
|
96340
96615
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96341
96616
|
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);}
|
|
96342
96617
|
#endif
|
|
96343
96618
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96344
|
-
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(
|
|
96619
|
+
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);}
|
|
96345
96620
|
#endif
|
|
96346
96621
|
#endif
|
|
96347
96622
|
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
@@ -96675,18 +96950,16 @@ Object .assign (ShaderCompiler .prototype,
|
|
|
96675
96950
|
|
|
96676
96951
|
source = "";
|
|
96677
96952
|
|
|
96678
|
-
for (
|
|
96953
|
+
for (const [i, line] of lines .entries ())
|
|
96679
96954
|
{
|
|
96680
|
-
const
|
|
96681
|
-
line = lines [i],
|
|
96682
|
-
match = line .match (include);
|
|
96955
|
+
const match = line .match (include);
|
|
96683
96956
|
|
|
96684
96957
|
if (match)
|
|
96685
96958
|
{
|
|
96686
|
-
source +=
|
|
96959
|
+
source += `#line 1 ${this .sourceFileNumbers [match [1]]}\n`;
|
|
96687
96960
|
source += this .process (this .includes [match [1]], this .sourceFileNumbers [match [1]]);
|
|
96688
96961
|
source += "\n";
|
|
96689
|
-
source +=
|
|
96962
|
+
source += `#line ${i + 2} ${parent}\n`;
|
|
96690
96963
|
}
|
|
96691
96964
|
else
|
|
96692
96965
|
{
|
|
@@ -96705,7 +96978,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
96705
96978
|
x_ite_Namespace .add ("ShaderCompiler", "x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
|
|
96706
96979
|
/* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
|
|
96707
96980
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
96708
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
96981
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(812);
|
|
96709
96982
|
/*******************************************************************************
|
|
96710
96983
|
*
|
|
96711
96984
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -97376,7 +97649,7 @@ const X3DAppearanceNode_default_ = X3DAppearanceNode;
|
|
|
97376
97649
|
x_ite_Namespace .add ("X3DAppearanceNode", "x_ite/Components/Shape/X3DAppearanceNode", X3DAppearanceNode_default_);
|
|
97377
97650
|
/* harmony default export */ const Shape_X3DAppearanceNode = (X3DAppearanceNode_default_);
|
|
97378
97651
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/Appearance.js
|
|
97379
|
-
/* provided dependency */ var Appearance_$ = __webpack_require__(
|
|
97652
|
+
/* provided dependency */ var Appearance_$ = __webpack_require__(812);
|
|
97380
97653
|
/*******************************************************************************
|
|
97381
97654
|
*
|
|
97382
97655
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -98478,6 +98751,7 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
|
|
|
98478
98751
|
|
|
98479
98752
|
if (numEnvironmentLights)
|
|
98480
98753
|
{
|
|
98754
|
+
// Although we count this kind of light here, only one is supported.
|
|
98481
98755
|
options .push ("X3D_USE_IBL")
|
|
98482
98756
|
options .push (`X3D_NUM_ENVIRONMENT_LIGHTS ${Math .min (numEnvironmentLights, browser .getMaxLights ())}`);
|
|
98483
98757
|
}
|
|
@@ -106300,8 +106574,8 @@ const GifMedia_default_ = GifMedia;
|
|
|
106300
106574
|
x_ite_Namespace .add ("GifMedia", "x_ite/Browser/Texturing/GifMedia", GifMedia_default_);
|
|
106301
106575
|
/* harmony default export */ const Texturing_GifMedia = (GifMedia_default_);
|
|
106302
106576
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
106303
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
106304
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
106577
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(812);
|
|
106578
|
+
/* provided dependency */ var SuperGif = __webpack_require__(807);
|
|
106305
106579
|
/*******************************************************************************
|
|
106306
106580
|
*
|
|
106307
106581
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -109608,6 +109882,7 @@ x_ite_Namespace .add ("fr", "locale/fr", fr_default_);
|
|
|
109608
109882
|
|
|
109609
109883
|
|
|
109610
109884
|
const locales = new Map ([
|
|
109885
|
+
["en", undefined], // default language
|
|
109611
109886
|
["de", de],
|
|
109612
109887
|
["fr", fr],
|
|
109613
109888
|
]);
|
|
@@ -109618,7 +109893,7 @@ function getLanguage ()
|
|
|
109618
109893
|
{
|
|
109619
109894
|
const language = value .split ("-") [0];
|
|
109620
109895
|
|
|
109621
|
-
if (locales .
|
|
109896
|
+
if (locales .has (language))
|
|
109622
109897
|
return language;
|
|
109623
109898
|
}
|
|
109624
109899
|
|
|
@@ -109633,7 +109908,7 @@ const gettext_default_ = (string) => locale .get (string) || string;
|
|
|
109633
109908
|
x_ite_Namespace .add ("gettext", "locale/gettext", gettext_default_);
|
|
109634
109909
|
/* harmony default export */ const gettext = (gettext_default_);
|
|
109635
109910
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
|
|
109636
|
-
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(
|
|
109911
|
+
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(812);
|
|
109637
109912
|
/*******************************************************************************
|
|
109638
109913
|
*
|
|
109639
109914
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -110205,8 +110480,69 @@ const TextureQuality_default_ = TextureQuality;
|
|
|
110205
110480
|
|
|
110206
110481
|
x_ite_Namespace .add ("TextureQuality", "x_ite/Browser/Core/TextureQuality", TextureQuality_default_);
|
|
110207
110482
|
/* harmony default export */ const Core_TextureQuality = (TextureQuality_default_);
|
|
110483
|
+
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/TextCompression.js
|
|
110484
|
+
/*******************************************************************************
|
|
110485
|
+
*
|
|
110486
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
110487
|
+
*
|
|
110488
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
110489
|
+
*
|
|
110490
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
110491
|
+
*
|
|
110492
|
+
* The copyright notice above does not evidence any actual of intended
|
|
110493
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
110494
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
110495
|
+
* create3000.
|
|
110496
|
+
*
|
|
110497
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
110498
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
110499
|
+
* permission of create3000.
|
|
110500
|
+
*
|
|
110501
|
+
* NON-MILITARY USE ONLY
|
|
110502
|
+
*
|
|
110503
|
+
* All create3000 software are effectively free software with a non-military use
|
|
110504
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
110505
|
+
* source in any way you please with the exception anything that uses it must be
|
|
110506
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
110507
|
+
*
|
|
110508
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
110509
|
+
*
|
|
110510
|
+
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
110511
|
+
*
|
|
110512
|
+
* This file is part of the X_ITE Project.
|
|
110513
|
+
*
|
|
110514
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
110515
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
110516
|
+
* Free Software Foundation.
|
|
110517
|
+
*
|
|
110518
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
110519
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
110520
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
110521
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
110522
|
+
*
|
|
110523
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
110524
|
+
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
110525
|
+
* copy of the GPLv3 License.
|
|
110526
|
+
*
|
|
110527
|
+
* For Silvio, Joy and Adi.
|
|
110528
|
+
*
|
|
110529
|
+
******************************************************************************/
|
|
110530
|
+
|
|
110531
|
+
let TextCompression_i = 0;
|
|
110532
|
+
|
|
110533
|
+
const TextCompression =
|
|
110534
|
+
{
|
|
110535
|
+
CHAR_SPACING: TextCompression_i ++,
|
|
110536
|
+
SCALING: TextCompression_i ++,
|
|
110537
|
+
};
|
|
110538
|
+
|
|
110539
|
+
const TextCompression_default_ = TextCompression;
|
|
110540
|
+
;
|
|
110541
|
+
|
|
110542
|
+
x_ite_Namespace .add ("TextCompression", "x_ite/Browser/Core/TextCompression", TextCompression_default_);
|
|
110543
|
+
/* harmony default export */ const Core_TextCompression = (TextCompression_default_);
|
|
110208
110544
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserOptions.js
|
|
110209
|
-
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(
|
|
110545
|
+
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(812);
|
|
110210
110546
|
/*******************************************************************************
|
|
110211
110547
|
*
|
|
110212
110548
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -110264,6 +110600,7 @@ x_ite_Namespace .add ("TextureQuality", "x_ite/Browser/Core/TextureQuality", Tex
|
|
|
110264
110600
|
|
|
110265
110601
|
|
|
110266
110602
|
|
|
110603
|
+
|
|
110267
110604
|
// https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/networking.html#BrowserProperties
|
|
110268
110605
|
|
|
110269
110606
|
function BrowserOptions (executionContext)
|
|
@@ -110334,6 +110671,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110334
110671
|
"Notifications",
|
|
110335
110672
|
"OrderIndependentTransparency",
|
|
110336
110673
|
"SplashScreen",
|
|
110674
|
+
"TextCompression",
|
|
110337
110675
|
"ToneMapping",
|
|
110338
110676
|
]);
|
|
110339
110677
|
|
|
@@ -110403,6 +110741,16 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110403
110741
|
{
|
|
110404
110742
|
return this .textureQuality;
|
|
110405
110743
|
},
|
|
110744
|
+
getTextCompression ()
|
|
110745
|
+
{
|
|
110746
|
+
switch (this ._TextCompression .getValue ())
|
|
110747
|
+
{
|
|
110748
|
+
default: // CHAR_SPACING
|
|
110749
|
+
return Core_TextCompression .CHAR_SPACING;
|
|
110750
|
+
case "SCALING":
|
|
110751
|
+
return Core_TextCompression .SCALING;
|
|
110752
|
+
}
|
|
110753
|
+
},
|
|
110406
110754
|
set_Rubberband__ (rubberband)
|
|
110407
110755
|
{
|
|
110408
110756
|
this .localStorage .Rubberband = rubberband .getValue ();
|
|
@@ -110614,6 +110962,7 @@ Object .defineProperties (BrowserOptions,
|
|
|
110614
110962
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Notifications", new x_ite_Fields .SFBool (true)),
|
|
110615
110963
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "OrderIndependentTransparency", new x_ite_Fields .SFBool ()),
|
|
110616
110964
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "StraightenHorizon", new x_ite_Fields .SFBool (true)),
|
|
110965
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "TextCompression", new x_ite_Fields .SFString ("CHAR_SPACING")),
|
|
110617
110966
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Timings", new x_ite_Fields .SFBool ()),
|
|
110618
110967
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "ToneMapping", new x_ite_Fields .SFString ("NONE")),
|
|
110619
110968
|
]),
|
|
@@ -110827,7 +111176,7 @@ const RenderingProperties_default_ = RenderingProperties;
|
|
|
110827
111176
|
x_ite_Namespace .add ("RenderingProperties", "x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
|
|
110828
111177
|
/* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
|
|
110829
111178
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
|
|
110830
|
-
/* provided dependency */ var Notification_$ = __webpack_require__(
|
|
111179
|
+
/* provided dependency */ var Notification_$ = __webpack_require__(812);
|
|
110831
111180
|
/*******************************************************************************
|
|
110832
111181
|
*
|
|
110833
111182
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -110950,8 +111299,8 @@ const Notification_default_ = Notification;
|
|
|
110950
111299
|
x_ite_Namespace .add ("Notification", "x_ite/Browser/Core/Notification", Notification_default_);
|
|
110951
111300
|
/* harmony default export */ const Core_Notification = (Notification_default_);
|
|
110952
111301
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
|
|
110953
|
-
/* provided dependency */ var jquery_fullscreen = __webpack_require__(
|
|
110954
|
-
/* provided dependency */ var ContextMenu_$ = __webpack_require__(
|
|
111302
|
+
/* provided dependency */ var jquery_fullscreen = __webpack_require__(48);
|
|
111303
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(812);
|
|
110955
111304
|
/*******************************************************************************
|
|
110956
111305
|
*
|
|
110957
111306
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -111059,7 +111408,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111059
111408
|
browser = this .getBrowser (),
|
|
111060
111409
|
fullscreen = browser .getElement () .fullScreen ();
|
|
111061
111410
|
|
|
111062
|
-
if (!
|
|
111411
|
+
if (!browser .getBrowserOption ("ContextMenu"))
|
|
111063
111412
|
return;
|
|
111064
111413
|
|
|
111065
111414
|
const menu = {
|
|
@@ -111355,19 +111704,19 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111355
111704
|
delete menu .items ["available-viewers"];
|
|
111356
111705
|
}
|
|
111357
111706
|
|
|
111358
|
-
if (!
|
|
111707
|
+
if (!browser .getCurrentViewer () .match (/^(?:EXAMINE|FLY)$/))
|
|
111359
111708
|
{
|
|
111360
111709
|
delete menu .items ["straighten-horizon"];
|
|
111361
111710
|
}
|
|
111362
111711
|
|
|
111363
|
-
if (!
|
|
111712
|
+
if (!browser .getBrowserOption ("Debug"))
|
|
111364
111713
|
{
|
|
111365
111714
|
delete menu .items ["shading"];
|
|
111366
111715
|
}
|
|
111367
111716
|
|
|
111368
111717
|
const worldInfo = browser .getExecutionContext () .getWorldInfos () [0];
|
|
111369
111718
|
|
|
111370
|
-
if (!
|
|
111719
|
+
if (!worldInfo || (worldInfo .title .length === 0 && worldInfo .info .length === 0))
|
|
111371
111720
|
{
|
|
111372
111721
|
delete menu .items ["world-info"];
|
|
111373
111722
|
}
|
|
@@ -111380,26 +111729,18 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111380
111729
|
browser = this .getBrowser (),
|
|
111381
111730
|
activeLayer = browser .getActiveLayer ();
|
|
111382
111731
|
|
|
111383
|
-
if (!
|
|
111732
|
+
if (!activeLayer)
|
|
111384
111733
|
return { };
|
|
111385
111734
|
|
|
111386
111735
|
const
|
|
111387
|
-
|
|
111388
|
-
|
|
111389
|
-
|
|
111390
|
-
currentViewpoint = activeLayer .getViewpoint (),
|
|
111391
|
-
menu = { };
|
|
111736
|
+
viewpoints = activeLayer .getUserViewpoints (),
|
|
111737
|
+
currentViewpoint = activeLayer .getViewpoint (),
|
|
111738
|
+
menu = { };
|
|
111392
111739
|
|
|
111393
111740
|
for (const viewpoint of viewpoints)
|
|
111394
111741
|
{
|
|
111395
111742
|
const description = viewpoint .getDescriptions () .join (" » ");
|
|
111396
111743
|
|
|
111397
|
-
if (description === "")
|
|
111398
|
-
continue;
|
|
111399
|
-
|
|
111400
|
-
if (! enableInlineViewpoints && viewpoint .getScene () !== currentScene)
|
|
111401
|
-
continue;
|
|
111402
|
-
|
|
111403
111744
|
const item = {
|
|
111404
111745
|
name: description,
|
|
111405
111746
|
callback: () =>
|
|
@@ -111412,7 +111753,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111412
111753
|
if (viewpoint === currentViewpoint)
|
|
111413
111754
|
item .className = "context-menu-selected";
|
|
111414
111755
|
|
|
111415
|
-
menu [
|
|
111756
|
+
menu [`Viewpoint-${viewpoint .getId ()}`] = item;
|
|
111416
111757
|
}
|
|
111417
111758
|
|
|
111418
111759
|
return menu;
|
|
@@ -111478,7 +111819,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111478
111819
|
menu = options .build (event),
|
|
111479
111820
|
level = 1;
|
|
111480
111821
|
|
|
111481
|
-
if (!
|
|
111822
|
+
if (!menu) return;
|
|
111482
111823
|
|
|
111483
111824
|
// Layer
|
|
111484
111825
|
|
|
@@ -111557,7 +111898,7 @@ Object .assign (Object .setPrototypeOf (ContextMenu .prototype, Base_X3DBaseNode
|
|
|
111557
111898
|
t = ContextMenu_$(event .target) .closest ("li"),
|
|
111558
111899
|
e = t .children ("ul");
|
|
111559
111900
|
|
|
111560
|
-
if (!
|
|
111901
|
+
if (!e .length)
|
|
111561
111902
|
return;
|
|
111562
111903
|
|
|
111563
111904
|
e .css ("top", "");
|
|
@@ -113704,7 +114045,7 @@ const DataStorage_default_ = DataStorage;
|
|
|
113704
114045
|
x_ite_Namespace .add ("DataStorage", "standard/Utility/DataStorage", DataStorage_default_);
|
|
113705
114046
|
/* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
|
|
113706
114047
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
113707
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
114048
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(812);
|
|
113708
114049
|
/*******************************************************************************
|
|
113709
114050
|
*
|
|
113710
114051
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -114101,6 +114442,12 @@ Object .assign (X3DCoreContext .prototype,
|
|
|
114101
114442
|
|
|
114102
114443
|
break;
|
|
114103
114444
|
}
|
|
114445
|
+
case "textCompression":
|
|
114446
|
+
case "textcompression":
|
|
114447
|
+
{
|
|
114448
|
+
this .setBrowserOption ("TextCompression", newValue);
|
|
114449
|
+
break;
|
|
114450
|
+
}
|
|
114104
114451
|
case "timings":
|
|
114105
114452
|
{
|
|
114106
114453
|
this .setBrowserOption ("Timings", this .parseBooleanAttribute (newValue, false));
|
|
@@ -114802,14 +115149,14 @@ Object .assign (Object .setPrototypeOf (ConeOptions .prototype, Base_X3DBaseNode
|
|
|
114802
115149
|
getSideGeometry ()
|
|
114803
115150
|
{
|
|
114804
115151
|
if (!this .sideGeometry)
|
|
114805
|
-
this .
|
|
115152
|
+
this .build ();
|
|
114806
115153
|
|
|
114807
115154
|
return this .sideGeometry;
|
|
114808
115155
|
},
|
|
114809
115156
|
getBottomGeometry ()
|
|
114810
115157
|
{
|
|
114811
115158
|
if (!this .bottomGeometry)
|
|
114812
|
-
this .
|
|
115159
|
+
this .build ();
|
|
114813
115160
|
|
|
114814
115161
|
return this .bottomGeometry;
|
|
114815
115162
|
},
|
|
@@ -114959,7 +115306,7 @@ Object .assign (Object .setPrototypeOf (ConeOptions .prototype, Base_X3DBaseNode
|
|
|
114959
115306
|
|
|
114960
115307
|
point .push (new Numbers_Vector3 (0, 1, 0));
|
|
114961
115308
|
},
|
|
114962
|
-
|
|
115309
|
+
build ()
|
|
114963
115310
|
{
|
|
114964
115311
|
this .sideGeometry = new Geometry3D_IndexedFaceSet (this .getExecutionContext ());
|
|
114965
115312
|
this .sideGeometry ._texCoord = new Texturing_TextureCoordinate (this .getExecutionContext ());
|
|
@@ -114991,6 +115338,11 @@ Object .assign (Object .setPrototypeOf (ConeOptions .prototype, Base_X3DBaseNode
|
|
|
114991
115338
|
sideGeometry .setup ();
|
|
114992
115339
|
bottomGeometry .setup ();
|
|
114993
115340
|
},
|
|
115341
|
+
eventsProcessed ()
|
|
115342
|
+
{
|
|
115343
|
+
this .sideGeometry = null;
|
|
115344
|
+
this .bottomGeometry = null;
|
|
115345
|
+
},
|
|
114994
115346
|
});
|
|
114995
115347
|
|
|
114996
115348
|
Object .defineProperties (ConeOptions,
|
|
@@ -115084,21 +115436,21 @@ Object .assign (Object .setPrototypeOf (CylinderOptions .prototype, Base_X3DBase
|
|
|
115084
115436
|
getSideGeometry ()
|
|
115085
115437
|
{
|
|
115086
115438
|
if (!this .sideGeometry)
|
|
115087
|
-
this .
|
|
115439
|
+
this .build ();
|
|
115088
115440
|
|
|
115089
115441
|
return this .sideGeometry;
|
|
115090
115442
|
},
|
|
115091
115443
|
getTopGeometry ()
|
|
115092
115444
|
{
|
|
115093
115445
|
if (!this .topGeometry)
|
|
115094
|
-
this .
|
|
115446
|
+
this .build ();
|
|
115095
115447
|
|
|
115096
115448
|
return this .topGeometry;
|
|
115097
115449
|
},
|
|
115098
115450
|
getBottomGeometry ()
|
|
115099
115451
|
{
|
|
115100
115452
|
if (!this .bottomGeometry)
|
|
115101
|
-
this .
|
|
115453
|
+
this .build ();
|
|
115102
115454
|
|
|
115103
115455
|
return this .bottomGeometry;
|
|
115104
115456
|
},
|
|
@@ -115287,7 +115639,7 @@ Object .assign (Object .setPrototypeOf (CylinderOptions .prototype, Base_X3DBase
|
|
|
115287
115639
|
point .push (new Numbers_Vector3 (p .imag, 1, p .real));
|
|
115288
115640
|
}
|
|
115289
115641
|
},
|
|
115290
|
-
|
|
115642
|
+
build ()
|
|
115291
115643
|
{
|
|
115292
115644
|
this .sideGeometry = new Geometry3D_IndexedFaceSet (this .getExecutionContext ());
|
|
115293
115645
|
this .sideGeometry ._texCoord = new Texturing_TextureCoordinate (this .getExecutionContext ());
|
|
@@ -115326,6 +115678,12 @@ Object .assign (Object .setPrototypeOf (CylinderOptions .prototype, Base_X3DBase
|
|
|
115326
115678
|
bottomGeometry .setup ();
|
|
115327
115679
|
topGeometry .setup ();
|
|
115328
115680
|
},
|
|
115681
|
+
eventsProcessed ()
|
|
115682
|
+
{
|
|
115683
|
+
this .sideGeometry = null;
|
|
115684
|
+
this .bottomGeometry = null;
|
|
115685
|
+
this .topGeometry = null;
|
|
115686
|
+
},
|
|
115329
115687
|
});
|
|
115330
115688
|
|
|
115331
115689
|
Object .defineProperties (CylinderOptions,
|
|
@@ -115419,7 +115777,7 @@ Object .assign (Object .setPrototypeOf (QuadSphereOptions .prototype, Base_X3DBa
|
|
|
115419
115777
|
getGeometry ()
|
|
115420
115778
|
{
|
|
115421
115779
|
if (!this .geometry)
|
|
115422
|
-
this .
|
|
115780
|
+
this .build ();
|
|
115423
115781
|
|
|
115424
115782
|
return this .geometry;
|
|
115425
115783
|
},
|
|
@@ -115596,7 +115954,7 @@ Object .assign (Object .setPrototypeOf (QuadSphereOptions .prototype, Base_X3DBa
|
|
|
115596
115954
|
// South pole
|
|
115597
115955
|
point .push (new Numbers_Vector3 (0, -1, 0));
|
|
115598
115956
|
},
|
|
115599
|
-
|
|
115957
|
+
build ()
|
|
115600
115958
|
{
|
|
115601
115959
|
this .geometry = new Geometry3D_IndexedFaceSet (this .getExecutionContext ());
|
|
115602
115960
|
this .geometry ._texCoord = new Texturing_TextureCoordinate (this .getExecutionContext ());
|
|
@@ -115618,6 +115976,10 @@ Object .assign (Object .setPrototypeOf (QuadSphereOptions .prototype, Base_X3DBa
|
|
|
115618
115976
|
coord .setup ();
|
|
115619
115977
|
geometry .setup ();
|
|
115620
115978
|
},
|
|
115979
|
+
eventsProcessed ()
|
|
115980
|
+
{
|
|
115981
|
+
this .geometry = null;
|
|
115982
|
+
},
|
|
115621
115983
|
});
|
|
115622
115984
|
|
|
115623
115985
|
Object .defineProperties (QuadSphereOptions,
|
|
@@ -116266,14 +116628,14 @@ function tbProjectToSphere (r, x, y)
|
|
|
116266
116628
|
{
|
|
116267
116629
|
const d = Math .hypot (x, y);
|
|
116268
116630
|
|
|
116269
|
-
if (d < r * Math .
|
|
116631
|
+
if (d < r * Math .SQRT1_2) // Inside sphere
|
|
116270
116632
|
{
|
|
116271
116633
|
return Math .sqrt (r * r - d * d);
|
|
116272
116634
|
}
|
|
116273
116635
|
|
|
116274
116636
|
// On hyperbola
|
|
116275
116637
|
|
|
116276
|
-
const t = r / Math .
|
|
116638
|
+
const t = r / Math .SQRT2;
|
|
116277
116639
|
|
|
116278
116640
|
return t * t / d;
|
|
116279
116641
|
}
|
|
@@ -116284,8 +116646,8 @@ const X3DViewer_default_ = X3DViewer;
|
|
|
116284
116646
|
x_ite_Namespace .add ("X3DViewer", "x_ite/Browser/Navigation/X3DViewer", X3DViewer_default_);
|
|
116285
116647
|
/* harmony default export */ const Navigation_X3DViewer = (X3DViewer_default_);
|
|
116286
116648
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
116287
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
116288
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
116649
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(354);
|
|
116650
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(812);
|
|
116289
116651
|
/*******************************************************************************
|
|
116290
116652
|
*
|
|
116291
116653
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -117201,8 +117563,8 @@ const ExamineViewer_default_ = ExamineViewer;
|
|
|
117201
117563
|
x_ite_Namespace .add ("ExamineViewer", "x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
|
|
117202
117564
|
/* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
|
|
117203
117565
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
117204
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
117205
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
117566
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(354);
|
|
117567
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(812);
|
|
117206
117568
|
/*******************************************************************************
|
|
117207
117569
|
*
|
|
117208
117570
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118217,8 +118579,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
118217
118579
|
x_ite_Namespace .add ("FlyViewer", "x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
|
|
118218
118580
|
/* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
|
|
118219
118581
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
118220
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
118221
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
118582
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(354);
|
|
118583
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(812);
|
|
118222
118584
|
/*******************************************************************************
|
|
118223
118585
|
*
|
|
118224
118586
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118549,8 +118911,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
118549
118911
|
x_ite_Namespace .add ("NoneViewer", "x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
|
|
118550
118912
|
/* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
|
|
118551
118913
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
118552
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
118553
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
118914
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(354);
|
|
118915
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(812);
|
|
118554
118916
|
/*******************************************************************************
|
|
118555
118917
|
*
|
|
118556
118918
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119689,8 +120051,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
119689
120051
|
x_ite_Namespace .add ("X3DPickingContext", "x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
|
|
119690
120052
|
/* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
|
|
119691
120053
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
119692
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
119693
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
120054
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(354);
|
|
120055
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(812);
|
|
119694
120056
|
/*******************************************************************************
|
|
119695
120057
|
*
|
|
119696
120058
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -120991,7 +121353,7 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
|
|
|
120991
121353
|
x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
|
|
120992
121354
|
/* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
|
|
120993
121355
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
120994
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
121356
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(812);
|
|
120995
121357
|
/*******************************************************************************
|
|
120996
121358
|
*
|
|
120997
121359
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -121046,7 +121408,6 @@ x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFram
|
|
|
121046
121408
|
|
|
121047
121409
|
|
|
121048
121410
|
const
|
|
121049
|
-
_viewport = Symbol (),
|
|
121050
121411
|
_frameBuffer = Symbol (),
|
|
121051
121412
|
_transmissionBuffer = Symbol (),
|
|
121052
121413
|
_resizer = Symbol (),
|
|
@@ -121132,7 +121493,7 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
121132
121493
|
},
|
|
121133
121494
|
getMaxClipPlanes ()
|
|
121134
121495
|
{
|
|
121135
|
-
return
|
|
121496
|
+
return maxClipPlanes;
|
|
121136
121497
|
},
|
|
121137
121498
|
getDepthSize ()
|
|
121138
121499
|
{
|
|
@@ -121998,7 +122359,7 @@ const X3DSoundContext_default_ = X3DSoundContext;
|
|
|
121998
122359
|
x_ite_Namespace .add ("X3DSoundContext", "x_ite/Browser/Sound/X3DSoundContext", X3DSoundContext_default_);
|
|
121999
122360
|
/* harmony default export */ const Sound_X3DSoundContext = (X3DSoundContext_default_);
|
|
122000
122361
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/KTXDecoder.js
|
|
122001
|
-
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(
|
|
122362
|
+
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(812);
|
|
122002
122363
|
const KTXDecoder_default_ = class KTXDecoder
|
|
122003
122364
|
{
|
|
122004
122365
|
constructor (gl, externalKtxlib, scriptDir)
|
|
@@ -123612,7 +123973,7 @@ const Components_default_ = Components;
|
|
|
123612
123973
|
x_ite_Namespace .add ("Components", "x_ite/Components", Components_default_);
|
|
123613
123974
|
/* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
|
|
123614
123975
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
|
|
123615
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
123976
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(812);
|
|
123616
123977
|
/*******************************************************************************
|
|
123617
123978
|
* MIT License
|
|
123618
123979
|
*
|
|
@@ -124880,7 +125241,7 @@ const FieldTypes_default_ = new Configuration_FieldTypesArray (Object .values (x
|
|
|
124880
125241
|
x_ite_Namespace .add ("FieldTypes", "x_ite/Configuration/FieldTypes", FieldTypes_default_);
|
|
124881
125242
|
/* harmony default export */ const FieldTypes = (FieldTypes_default_);
|
|
124882
125243
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
|
|
124883
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
125244
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(812);
|
|
124884
125245
|
/*******************************************************************************
|
|
124885
125246
|
*
|
|
124886
125247
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -124951,6 +125312,7 @@ x_ite_Namespace .add ("FieldTypes", "x_ite/Configuration/FieldTypes", FieldTypes
|
|
|
124951
125312
|
|
|
124952
125313
|
|
|
124953
125314
|
|
|
125315
|
+
|
|
124954
125316
|
|
|
124955
125317
|
|
|
124956
125318
|
const
|
|
@@ -125149,7 +125511,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125149
125511
|
{
|
|
125150
125512
|
function loadComponents (components, seen)
|
|
125151
125513
|
{
|
|
125152
|
-
return Promise .all (components .map (component => loadComponent .call (this, component, seen)))
|
|
125514
|
+
return Promise .all (components .map (component => loadComponent .call (this, component, seen)));
|
|
125153
125515
|
}
|
|
125154
125516
|
|
|
125155
125517
|
async function loadComponent ({ name, providerURL, external, dependencies }, seen)
|
|
@@ -125165,7 +125527,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125165
125527
|
{
|
|
125166
125528
|
case "NODE":
|
|
125167
125529
|
{
|
|
125168
|
-
__webpack_require__.g .require (__webpack_require__.g .require ("url") .fileURLToPath (providerURL))
|
|
125530
|
+
__webpack_require__.g .require (__webpack_require__.g .require ("url") .fileURLToPath (providerURL));
|
|
125169
125531
|
break;
|
|
125170
125532
|
}
|
|
125171
125533
|
case "BROWSER":
|
|
@@ -125200,7 +125562,10 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125200
125562
|
}
|
|
125201
125563
|
|
|
125202
125564
|
// Load array of component names.
|
|
125203
|
-
return
|
|
125565
|
+
return Promise .all ([
|
|
125566
|
+
MikkTSpace .initialize (), // Required by Rendering component.
|
|
125567
|
+
loadComponents .call (this, component, new Set ()),
|
|
125568
|
+
]);
|
|
125204
125569
|
};
|
|
125205
125570
|
})(),
|
|
125206
125571
|
addConcreteNode (ConcreteNode)
|
|
@@ -125702,88 +126067,50 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125702
126067
|
|
|
125703
126068
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125704
126069
|
|
|
125705
|
-
|
|
125706
|
-
return;
|
|
125707
|
-
|
|
125708
|
-
layerNode .viewAll (transitionTime, 1, this .getBrowserOption ("StraightenHorizon"));
|
|
126070
|
+
layerNode ?.viewAll (transitionTime, 1, this .getBrowserOption ("StraightenHorizon"));
|
|
125709
126071
|
},
|
|
125710
126072
|
firstViewpoint (layerNode)
|
|
125711
126073
|
{
|
|
125712
126074
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125713
126075
|
|
|
125714
|
-
const viewpoints = layerNode
|
|
126076
|
+
const viewpoints = layerNode ?.getUserViewpoints ();
|
|
125715
126077
|
|
|
125716
|
-
if (viewpoints
|
|
125717
|
-
this .bindViewpoint (layerNode, viewpoints
|
|
126078
|
+
if (viewpoints ?.length)
|
|
126079
|
+
this .bindViewpoint (layerNode, viewpoints .at (0));
|
|
125718
126080
|
},
|
|
125719
126081
|
previousViewpoint (layerNode)
|
|
125720
126082
|
{
|
|
125721
126083
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125722
126084
|
|
|
125723
|
-
|
|
125724
|
-
return;
|
|
126085
|
+
const viewpoints = layerNode ?.getUserViewpoints ();
|
|
125725
126086
|
|
|
125726
|
-
|
|
125727
|
-
|
|
125728
|
-
if (viewpoints .length === 0)
|
|
126087
|
+
if (!viewpoints ?.length)
|
|
125729
126088
|
return;
|
|
125730
126089
|
|
|
125731
|
-
|
|
125732
|
-
{
|
|
125733
|
-
if (viewpoints [i] ._isBound .getValue ())
|
|
125734
|
-
break;
|
|
125735
|
-
}
|
|
126090
|
+
const i = viewpoints .findIndex (viewpointNode => viewpointNode ._isBound .getValue ());
|
|
125736
126091
|
|
|
125737
|
-
|
|
125738
|
-
{
|
|
125739
|
-
if (i === 0)
|
|
125740
|
-
this .bindViewpoint (layerNode, viewpoints .at (-1));
|
|
125741
|
-
|
|
125742
|
-
else
|
|
125743
|
-
this .bindViewpoint (layerNode, viewpoints [i - 1]);
|
|
125744
|
-
}
|
|
125745
|
-
else
|
|
125746
|
-
this .bindViewpoint (layerNode, viewpoints .at (-1));
|
|
126092
|
+
this .bindViewpoint (layerNode, viewpoints .at (i > -1 ? i - 1 : -1));
|
|
125747
126093
|
},
|
|
125748
126094
|
nextViewpoint (layerNode)
|
|
125749
126095
|
{
|
|
125750
126096
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125751
126097
|
|
|
125752
|
-
|
|
125753
|
-
return;
|
|
125754
|
-
|
|
125755
|
-
const viewpoints = layerNode .getUserViewpoints ();
|
|
126098
|
+
const viewpoints = layerNode ?.getUserViewpoints ();
|
|
125756
126099
|
|
|
125757
|
-
if (viewpoints
|
|
126100
|
+
if (!viewpoints ?.length)
|
|
125758
126101
|
return;
|
|
125759
126102
|
|
|
125760
|
-
|
|
125761
|
-
{
|
|
125762
|
-
if (viewpoints [i] ._isBound .getValue ())
|
|
125763
|
-
break;
|
|
125764
|
-
}
|
|
126103
|
+
const i = viewpoints .findIndex (viewpointNode => viewpointNode ._isBound .getValue ());
|
|
125765
126104
|
|
|
125766
|
-
|
|
125767
|
-
{
|
|
125768
|
-
if (i === viewpoints .length - 1)
|
|
125769
|
-
this .bindViewpoint (layerNode, viewpoints [0]);
|
|
125770
|
-
|
|
125771
|
-
else
|
|
125772
|
-
this .bindViewpoint (layerNode, viewpoints [i + 1]);
|
|
125773
|
-
}
|
|
125774
|
-
else
|
|
125775
|
-
this .bindViewpoint (layerNode, viewpoints [0]);
|
|
126105
|
+
this .bindViewpoint (layerNode, viewpoints .at ((i + 1) % viewpoints .length));
|
|
125776
126106
|
},
|
|
125777
126107
|
lastViewpoint (layerNode)
|
|
125778
126108
|
{
|
|
125779
126109
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125780
126110
|
|
|
125781
|
-
|
|
125782
|
-
return;
|
|
126111
|
+
const viewpoints = layerNode ?.getUserViewpoints ();
|
|
125783
126112
|
|
|
125784
|
-
|
|
125785
|
-
|
|
125786
|
-
if (viewpoints .length)
|
|
126113
|
+
if (viewpoints ?.length)
|
|
125787
126114
|
this .bindViewpoint (layerNode, viewpoints .at (-1));
|
|
125788
126115
|
},
|
|
125789
126116
|
changeViewpoint (layerNode, name)
|
|
@@ -125796,17 +126123,11 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
|
|
|
125796
126123
|
|
|
125797
126124
|
layerNode = Base_X3DCast (Base_X3DConstants .X3DLayerNode, layerNode) ?? this .getActiveLayer ();
|
|
125798
126125
|
|
|
125799
|
-
|
|
125800
|
-
|
|
125801
|
-
|
|
125802
|
-
for (const viewpointNode of layerNode .getViewpoints () .get ())
|
|
125803
|
-
{
|
|
125804
|
-
if (viewpointNode .getName () !== name)
|
|
125805
|
-
continue;
|
|
126126
|
+
const viewpointNode = layerNode ?.getViewpoints () .get ()
|
|
126127
|
+
.find (viewpointNode => viewpointNode .getName () === name);
|
|
125806
126128
|
|
|
126129
|
+
if (viewpointNode)
|
|
125807
126130
|
this .bindViewpoint (layerNode, viewpointNode);
|
|
125808
|
-
break;
|
|
125809
|
-
}
|
|
125810
126131
|
},
|
|
125811
126132
|
bindViewpoint (layerNode, viewpointNode)
|
|
125812
126133
|
{
|
|
@@ -125982,7 +126303,7 @@ const X3DBrowser_default_ = X3DBrowser;
|
|
|
125982
126303
|
x_ite_Namespace .add ("X3DBrowser", "x_ite/Browser/X3DBrowser", X3DBrowser_default_);
|
|
125983
126304
|
/* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
|
|
125984
126305
|
;// CONCATENATED MODULE: ./src/x_ite/X3DCanvasElement.js
|
|
125985
|
-
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(
|
|
126306
|
+
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(812);
|
|
125986
126307
|
/*******************************************************************************
|
|
125987
126308
|
*
|
|
125988
126309
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -126089,6 +126410,8 @@ class X3DCanvasElement extends HTMLElement
|
|
|
126089
126410
|
"splashScreen",
|
|
126090
126411
|
"splashscreen",
|
|
126091
126412
|
"src",
|
|
126413
|
+
"textCompression",
|
|
126414
|
+
"textcompression",
|
|
126092
126415
|
"timings",
|
|
126093
126416
|
"toneMapping",
|
|
126094
126417
|
"tonemapping",
|
|
@@ -126132,8 +126455,8 @@ const X3DCanvasElement_default_ = X3DCanvasElement;
|
|
|
126132
126455
|
x_ite_Namespace .add ("X3DCanvasElement", "x_ite/X3DCanvasElement", X3DCanvasElement_default_);
|
|
126133
126456
|
/* harmony default export */ const x_ite_X3DCanvasElement = (X3DCanvasElement_default_);
|
|
126134
126457
|
;// CONCATENATED MODULE: ./src/lib/jquery.js
|
|
126135
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
126136
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
126458
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(812);
|
|
126459
|
+
/* provided dependency */ var pako = __webpack_require__(552);
|
|
126137
126460
|
Object .assign (jquery_$,
|
|
126138
126461
|
{
|
|
126139
126462
|
decodeText (input)
|
|
@@ -126210,14 +126533,14 @@ const jquery_default_ = jquery_$;
|
|
|
126210
126533
|
x_ite_Namespace .add ("jquery", "lib/jquery", jquery_default_);
|
|
126211
126534
|
/* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
|
|
126212
126535
|
;// CONCATENATED MODULE: ./src/lib/libtess.js
|
|
126213
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
126536
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(193);
|
|
126214
126537
|
const libtess_default_ = libtess_libtess;
|
|
126215
126538
|
;
|
|
126216
126539
|
|
|
126217
126540
|
x_ite_Namespace .add ("libtess", "lib/libtess", libtess_default_);
|
|
126218
126541
|
/* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
|
|
126219
126542
|
;// CONCATENATED MODULE: ./src/x_ite/X3D.js
|
|
126220
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
126543
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(812);
|
|
126221
126544
|
/*******************************************************************************
|
|
126222
126545
|
*
|
|
126223
126546
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -126525,7 +126848,7 @@ Object .assign (X3D,
|
|
|
126525
126848
|
|
|
126526
126849
|
// Assign X3D to global namespace.
|
|
126527
126850
|
|
|
126528
|
-
window [Symbol .for ("X_ITE.X3D-10.0
|
|
126851
|
+
window [Symbol .for ("X_ITE.X3D-10.2.0")] = x_ite_X3D;
|
|
126529
126852
|
|
|
126530
126853
|
customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
|
|
126531
126854
|
|