x_ite 10.0.1 → 10.0.3
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 +5 -5
- package/dist/X3DUOM.xml +1095 -0
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +14 -14
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +25 -25
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +37 -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 +18 -18
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +33 -33
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +30 -24
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +27 -27
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +23 -23
- 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 +25 -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 +24 -24
- 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 +31 -27
- 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 +94 -176
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.d.ts +844 -59
- package/dist/x_ite.js +1256 -1220
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.min.mjs +1 -1
- package/dist/x_ite.mjs +1256 -1220
- package/dist/x_ite.zip +0 -0
- package/package.json +3 -2
package/dist/x_ite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* X_ITE v10.0.
|
|
1
|
+
/* X_ITE v10.0.3 */(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
|
+
/***/ 68:
|
|
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__(376);
|
|
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
|
+
/***/ 302:
|
|
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__(376)], __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
|
+
/***/ 376:
|
|
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
|
+
/***/ 229:
|
|
11163
11163
|
/***/ ((module) => {
|
|
11164
11164
|
|
|
11165
11165
|
/**
|
|
@@ -15938,7 +15938,7 @@ if (true) {
|
|
|
15938
15938
|
|
|
15939
15939
|
/***/ }),
|
|
15940
15940
|
|
|
15941
|
-
/***/
|
|
15941
|
+
/***/ 860:
|
|
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
|
+
/***/ 123:
|
|
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.0.3")];
|
|
20315
20315
|
|
|
20316
20316
|
if (X3D)
|
|
20317
20317
|
X3D [name] = module;
|
|
@@ -21722,32 +21722,18 @@ Object .assign (X3DObject .prototype,
|
|
|
21722
21722
|
},
|
|
21723
21723
|
getUserData (key)
|
|
21724
21724
|
{
|
|
21725
|
-
return this [_userData] .get (key)
|
|
21726
|
-
?? this [_userData] .map ?.get (key);
|
|
21725
|
+
return this [_userData] .get (key);
|
|
21727
21726
|
},
|
|
21728
21727
|
setUserData (key, value)
|
|
21729
21728
|
{
|
|
21730
|
-
|
|
21731
|
-
|
|
21732
|
-
if (this [_userData] === X3DObject .prototype [_userData])
|
|
21733
|
-
this [_userData] = new WeakMap ();
|
|
21734
|
-
|
|
21735
|
-
this [_userData] .set (key, value);
|
|
21736
|
-
}
|
|
21737
|
-
catch
|
|
21738
|
-
{
|
|
21739
|
-
if (!this [_userData] .map)
|
|
21740
|
-
this [_userData] .map = new Map ();
|
|
21729
|
+
if (this [_userData] === X3DObject .prototype [_userData])
|
|
21730
|
+
this [_userData] = new Map ();
|
|
21741
21731
|
|
|
21742
|
-
|
|
21743
|
-
}
|
|
21732
|
+
this [_userData] .set (key, value);
|
|
21744
21733
|
},
|
|
21745
21734
|
removeUserData (key)
|
|
21746
21735
|
{
|
|
21747
|
-
|
|
21748
|
-
return;
|
|
21749
|
-
|
|
21750
|
-
this [_userData] .map ?.delete (key);
|
|
21736
|
+
this [_userData] .delete (key);
|
|
21751
21737
|
},
|
|
21752
21738
|
toString (options = Object .prototype)
|
|
21753
21739
|
{
|
|
@@ -21800,7 +21786,7 @@ Object .assign (X3DObject .prototype,
|
|
|
21800
21786
|
dispose ()
|
|
21801
21787
|
{
|
|
21802
21788
|
this [_interests] .clear ();
|
|
21803
|
-
this [_userData]
|
|
21789
|
+
this [_userData] .clear ();
|
|
21804
21790
|
},
|
|
21805
21791
|
});
|
|
21806
21792
|
|
|
@@ -23595,6 +23581,22 @@ Object .assign (Color3 .prototype,
|
|
|
23595
23581
|
|
|
23596
23582
|
return this;
|
|
23597
23583
|
},
|
|
23584
|
+
linearToSRGB (color = new Color3 ())
|
|
23585
|
+
{
|
|
23586
|
+
color [_r] = Math .pow (this [_r], 1 / 2.2);
|
|
23587
|
+
color [_g] = Math .pow (this [_g], 1 / 2.2);
|
|
23588
|
+
color [_b] = Math .pow (this [_b], 1 / 2.2);
|
|
23589
|
+
|
|
23590
|
+
return color;
|
|
23591
|
+
},
|
|
23592
|
+
sRGBToLinear (color = new Color3 ())
|
|
23593
|
+
{
|
|
23594
|
+
color [_r] = Math .pow (this [_r], 2.2);
|
|
23595
|
+
color [_g] = Math .pow (this [_g], 2.2);
|
|
23596
|
+
color [_b] = Math .pow (this [_b], 2.2);
|
|
23597
|
+
|
|
23598
|
+
return color;
|
|
23599
|
+
},
|
|
23598
23600
|
toString ()
|
|
23599
23601
|
{
|
|
23600
23602
|
return this [_r] + " " +
|
|
@@ -23794,6 +23796,14 @@ Object .assign (Object .setPrototypeOf (SFColor .prototype, Base_X3DField .proto
|
|
|
23794
23796
|
this .getValue () .setHSV (h, s, v);
|
|
23795
23797
|
this .addEvent ();
|
|
23796
23798
|
},
|
|
23799
|
+
linearToSRGB ()
|
|
23800
|
+
{
|
|
23801
|
+
return new SFColor (this .getValue () .linearToSRGB ());
|
|
23802
|
+
},
|
|
23803
|
+
sRGBToLinear ()
|
|
23804
|
+
{
|
|
23805
|
+
return new SFColor (this .getValue () .sRGBToLinear ());
|
|
23806
|
+
},
|
|
23797
23807
|
lerp: (() =>
|
|
23798
23808
|
{
|
|
23799
23809
|
const
|
|
@@ -24048,6 +24058,22 @@ Object .assign (Color4 .prototype,
|
|
|
24048
24058
|
|
|
24049
24059
|
return this;
|
|
24050
24060
|
},
|
|
24061
|
+
linearToSRGB (color = new Color4 ())
|
|
24062
|
+
{
|
|
24063
|
+
Numbers_Color3 .prototype .linearToSRGB .call (this, color);
|
|
24064
|
+
|
|
24065
|
+
color [_a] = this [_a];
|
|
24066
|
+
|
|
24067
|
+
return color;
|
|
24068
|
+
},
|
|
24069
|
+
sRGBToLinear (color = new Color4 ())
|
|
24070
|
+
{
|
|
24071
|
+
Numbers_Color3 .prototype .sRGBToLinear .call (this, color);
|
|
24072
|
+
|
|
24073
|
+
color [_a] = this [_a];
|
|
24074
|
+
|
|
24075
|
+
return color;
|
|
24076
|
+
},
|
|
24051
24077
|
toString ()
|
|
24052
24078
|
{
|
|
24053
24079
|
return this [Color4_r] + " " +
|
|
@@ -24218,6 +24244,14 @@ Object .assign (Object .setPrototypeOf (SFColorRGBA .prototype, Base_X3DField .p
|
|
|
24218
24244
|
this .getValue () .setHSVA (h, s, v, a);
|
|
24219
24245
|
this .addEvent ();
|
|
24220
24246
|
},
|
|
24247
|
+
linearToSRGB ()
|
|
24248
|
+
{
|
|
24249
|
+
return new SFColorRGBA (this .getValue () .linearToSRGB ());
|
|
24250
|
+
},
|
|
24251
|
+
sRGBToLinear ()
|
|
24252
|
+
{
|
|
24253
|
+
return new SFColorRGBA (this .getValue () .sRGBToLinear ());
|
|
24254
|
+
},
|
|
24221
24255
|
lerp: (() =>
|
|
24222
24256
|
{
|
|
24223
24257
|
const
|
|
@@ -34243,7 +34277,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
|
|
|
34243
34277
|
x_ite_Namespace .add ("X3DBaseNode", "x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
|
|
34244
34278
|
/* harmony default export */ const Base_X3DBaseNode = (X3DBaseNode_default_);
|
|
34245
34279
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Legacy.js
|
|
34246
|
-
/* provided dependency */ var $ = __webpack_require__(
|
|
34280
|
+
/* provided dependency */ var $ = __webpack_require__(376);
|
|
34247
34281
|
/*******************************************************************************
|
|
34248
34282
|
*
|
|
34249
34283
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -34380,7 +34414,7 @@ x_ite_Namespace .add ("Legacy", "x_ite/Browser/Legacy", Legacy_default_);
|
|
|
34380
34414
|
*
|
|
34381
34415
|
******************************************************************************/
|
|
34382
34416
|
|
|
34383
|
-
const BROWSER_VERSION_default_ = "10.0.
|
|
34417
|
+
const BROWSER_VERSION_default_ = "10.0.3";
|
|
34384
34418
|
;
|
|
34385
34419
|
|
|
34386
34420
|
x_ite_Namespace .add ("BROWSER_VERSION", "x_ite/BROWSER_VERSION", BROWSER_VERSION_default_);
|
|
@@ -37566,7 +37600,7 @@ const X3DBindableNode_default_ = X3DBindableNode;
|
|
|
37566
37600
|
x_ite_Namespace .add ("X3DBindableNode", "x_ite/Components/Core/X3DBindableNode", X3DBindableNode_default_);
|
|
37567
37601
|
/* harmony default export */ const Core_X3DBindableNode = (X3DBindableNode_default_);
|
|
37568
37602
|
;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
|
|
37569
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
37603
|
+
/* provided dependency */ var libtess = __webpack_require__(229);
|
|
37570
37604
|
/*******************************************************************************
|
|
37571
37605
|
*
|
|
37572
37606
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -40136,7 +40170,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
|
|
|
40136
40170
|
x_ite_Namespace .add ("X3DProtoDeclaration", "x_ite/Prototype/X3DProtoDeclaration", X3DProtoDeclaration_default_);
|
|
40137
40171
|
/* harmony default export */ const Prototype_X3DProtoDeclaration = (X3DProtoDeclaration_default_);
|
|
40138
40172
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
|
|
40139
|
-
/* provided dependency */ var X3DParser_$ = __webpack_require__(
|
|
40173
|
+
/* provided dependency */ var X3DParser_$ = __webpack_require__(376);
|
|
40140
40174
|
/*******************************************************************************
|
|
40141
40175
|
*
|
|
40142
40176
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -40394,7 +40428,7 @@ const Expressions_default_ = Expressions;
|
|
|
40394
40428
|
x_ite_Namespace .add ("Expressions", "x_ite/Parser/Expressions", Expressions_default_);
|
|
40395
40429
|
/* harmony default export */ const Parser_Expressions = (Expressions_default_);
|
|
40396
40430
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/VRMLParser.js
|
|
40397
|
-
/* provided dependency */ var VRMLParser_$ = __webpack_require__(
|
|
40431
|
+
/* provided dependency */ var VRMLParser_$ = __webpack_require__(376);
|
|
40398
40432
|
/*******************************************************************************
|
|
40399
40433
|
*
|
|
40400
40434
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -43094,7 +43128,7 @@ const VRMLParser_default_ = VRMLParser;
|
|
|
43094
43128
|
x_ite_Namespace .add ("VRMLParser", "x_ite/Parser/VRMLParser", VRMLParser_default_);
|
|
43095
43129
|
/* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
|
|
43096
43130
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
|
|
43097
|
-
/* provided dependency */ var XMLParser_$ = __webpack_require__(
|
|
43131
|
+
/* provided dependency */ var XMLParser_$ = __webpack_require__(376);
|
|
43098
43132
|
/*******************************************************************************
|
|
43099
43133
|
*
|
|
43100
43134
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -45270,7 +45304,7 @@ const URLs_default_ = URLs;
|
|
|
45270
45304
|
x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
|
|
45271
45305
|
/* harmony default export */ const Networking_URLs = (URLs_default_);
|
|
45272
45306
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
|
|
45273
|
-
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(
|
|
45307
|
+
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(376);
|
|
45274
45308
|
/*******************************************************************************
|
|
45275
45309
|
*
|
|
45276
45310
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -45575,7 +45609,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45575
45609
|
case "KHR_materials_sheen":
|
|
45576
45610
|
case "KHR_materials_specular":
|
|
45577
45611
|
case "KHR_materials_transmission":
|
|
45578
|
-
case "KHR_materials_unlit":
|
|
45579
45612
|
case "KHR_materials_volume":
|
|
45580
45613
|
{
|
|
45581
45614
|
const component = browser .getComponent ("X_ITE", 1);
|
|
@@ -46270,7 +46303,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46270
46303
|
|
|
46271
46304
|
appearanceNode ._alphaMode = this .stringValue (material .alphaMode, "OPAQUE");
|
|
46272
46305
|
appearanceNode ._alphaCutoff = this .numberValue (material .alphaCutoff, 0.5);
|
|
46273
|
-
appearanceNode ._material = materialNode;
|
|
46306
|
+
appearanceNode ._material = this .khrMaterialsUnlitObject (material .extensions ?.KHR_materials_unlit, materialNode);
|
|
46274
46307
|
appearanceNode ._textureTransform = this .createMultiTextureTransform (materialNode);
|
|
46275
46308
|
|
|
46276
46309
|
appearanceNode .setup ();
|
|
@@ -46443,9 +46476,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46443
46476
|
case "KHR_materials_transmission":
|
|
46444
46477
|
this .khrMaterialsTransmission (value, materialNode);
|
|
46445
46478
|
break;
|
|
46446
|
-
case "KHR_materials_unlit":
|
|
46447
|
-
this .khrMaterialsUnlitObject (value, materialNode);
|
|
46448
|
-
break;
|
|
46449
46479
|
case "KHR_materials_volume":
|
|
46450
46480
|
this .khrMaterialsVolumeObject (value, materialNode);
|
|
46451
46481
|
break;
|
|
@@ -46604,14 +46634,6 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46604
46634
|
|
|
46605
46635
|
materialNode ._extensions .push (extension);
|
|
46606
46636
|
},
|
|
46607
|
-
khrMaterialsUnlitObject (KHR_materials_unlit, materialNode)
|
|
46608
|
-
{
|
|
46609
|
-
const extension = this .getScene () .createNode ("UnlitMaterialExtension", false);
|
|
46610
|
-
|
|
46611
|
-
extension .setup ();
|
|
46612
|
-
|
|
46613
|
-
materialNode ._extensions .push (extension);
|
|
46614
|
-
},
|
|
46615
46637
|
khrMaterialsVolumeObject (KHR_materials_volume, materialNode)
|
|
46616
46638
|
{
|
|
46617
46639
|
const extension = this .getScene () .createNode ("VolumeMaterialExtension", false);
|
|
@@ -46630,6 +46652,27 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46630
46652
|
|
|
46631
46653
|
materialNode ._extensions .push (extension);
|
|
46632
46654
|
},
|
|
46655
|
+
khrMaterialsUnlitObject (KHR_materials_unlit, materialNode)
|
|
46656
|
+
{
|
|
46657
|
+
if (!KHR_materials_unlit)
|
|
46658
|
+
return materialNode;
|
|
46659
|
+
|
|
46660
|
+
const unlitMaterialNode = this .getScene () .createNode ("UnlitMaterial", false);
|
|
46661
|
+
|
|
46662
|
+
unlitMaterialNode ._emissiveColor = materialNode ._baseColor;
|
|
46663
|
+
unlitMaterialNode ._emissiveTextureMapping = materialNode ._baseTextureMapping;
|
|
46664
|
+
unlitMaterialNode ._emissiveTexture = materialNode ._baseTexture;
|
|
46665
|
+
unlitMaterialNode ._normalScale = materialNode ._normalScale;
|
|
46666
|
+
unlitMaterialNode ._normalTextureMapping = materialNode ._normalTextureMapping;
|
|
46667
|
+
unlitMaterialNode ._normalTexture = materialNode ._normalTexture;
|
|
46668
|
+
unlitMaterialNode ._transparency = materialNode ._transparency;
|
|
46669
|
+
|
|
46670
|
+
unlitMaterialNode .setup ();
|
|
46671
|
+
|
|
46672
|
+
materialNode .dispose ();
|
|
46673
|
+
|
|
46674
|
+
return unlitMaterialNode;
|
|
46675
|
+
},
|
|
46633
46676
|
textureTransformObject (KHR_texture_transform, texCoord)
|
|
46634
46677
|
{
|
|
46635
46678
|
if (!(KHR_texture_transform instanceof Object))
|
|
@@ -47747,12 +47790,12 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
47747
47790
|
},
|
|
47748
47791
|
hasTextures (materialNode)
|
|
47749
47792
|
{
|
|
47750
|
-
// Test PhysicalMaterial, ...
|
|
47793
|
+
// Test PhysicalMaterial, UnlitMaterial ...
|
|
47751
47794
|
|
|
47752
47795
|
if (+materialNode .getTextureBits ())
|
|
47753
47796
|
return true;
|
|
47754
47797
|
|
|
47755
|
-
if (materialNode ._extensions
|
|
47798
|
+
if (materialNode ._extensions ?.some (extension => +extension .getValue () .getTextureBits ()))
|
|
47756
47799
|
return true;
|
|
47757
47800
|
|
|
47758
47801
|
return false;
|
|
@@ -48904,7 +48947,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
|
|
|
48904
48947
|
x_ite_Namespace .add ("GLTF2Parser", "x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
|
|
48905
48948
|
/* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
|
|
48906
48949
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
|
|
48907
|
-
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(
|
|
48950
|
+
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(376);
|
|
48908
48951
|
/*******************************************************************************
|
|
48909
48952
|
*
|
|
48910
48953
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -49056,7 +49099,7 @@ const GLB2Parser_default_ = GLB2Parser;
|
|
|
49056
49099
|
x_ite_Namespace .add ("GLB2Parser", "x_ite/Parser/GLB2Parser", GLB2Parser_default_);
|
|
49057
49100
|
/* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
|
|
49058
49101
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
|
|
49059
|
-
/* provided dependency */ var OBJParser_$ = __webpack_require__(
|
|
49102
|
+
/* provided dependency */ var OBJParser_$ = __webpack_require__(376);
|
|
49060
49103
|
/*******************************************************************************
|
|
49061
49104
|
*
|
|
49062
49105
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -50744,6 +50787,8 @@ x_ite_Namespace .add ("STLBParser", "x_ite/Parser/STLBParser", STLBParser_defaul
|
|
|
50744
50787
|
|
|
50745
50788
|
|
|
50746
50789
|
|
|
50790
|
+
|
|
50791
|
+
|
|
50747
50792
|
/*
|
|
50748
50793
|
* Grammar
|
|
50749
50794
|
*/
|
|
@@ -50910,6 +50955,14 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
|
|
|
50910
50955
|
return value;
|
|
50911
50956
|
}
|
|
50912
50957
|
},
|
|
50958
|
+
convertFDC (f_dc)
|
|
50959
|
+
{
|
|
50960
|
+
// https://github.com/graphdeco-inria/gaussian-splatting/issues/485
|
|
50961
|
+
|
|
50962
|
+
const C0 = 0.28209479177387814;
|
|
50963
|
+
|
|
50964
|
+
return 0.5 + C0 * f_dc;
|
|
50965
|
+
},
|
|
50913
50966
|
header (elements)
|
|
50914
50967
|
{
|
|
50915
50968
|
PLYAParser_Grammar .ply .parse (this);
|
|
@@ -51109,20 +51162,20 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
|
|
|
51109
51162
|
async parseVertices ({ count, properties })
|
|
51110
51163
|
{
|
|
51111
51164
|
const
|
|
51112
|
-
browser
|
|
51113
|
-
scene
|
|
51114
|
-
colors
|
|
51115
|
-
texCoord
|
|
51116
|
-
texCoords
|
|
51117
|
-
normal
|
|
51118
|
-
normals
|
|
51119
|
-
coord
|
|
51120
|
-
points
|
|
51121
|
-
attributes
|
|
51165
|
+
browser = this .getBrowser (),
|
|
51166
|
+
scene = this .getScene (),
|
|
51167
|
+
colors = [ ],
|
|
51168
|
+
texCoord = scene .createNode ("TextureCoordinate"),
|
|
51169
|
+
texCoords = [ ],
|
|
51170
|
+
normal = scene .createNode ("Normal"),
|
|
51171
|
+
normals = [ ],
|
|
51172
|
+
coord = scene .createNode ("Coordinate"),
|
|
51173
|
+
points = [ ],
|
|
51174
|
+
attributes = new Map ();
|
|
51122
51175
|
|
|
51123
51176
|
for (const { name } of properties)
|
|
51124
51177
|
{
|
|
51125
|
-
if (name .match (/^(?:red|green|blue|alpha|r|g|b|a|s|t|u|v|nx|ny|nz|x|y|z)$/))
|
|
51178
|
+
if (name .match (/^(?:red|green|blue|alpha|r|g|b|a|f_dc_0|f_dc_1|f_dc_2|opacity|s|t|u|v|nx|ny|nz|x|y|z)$/))
|
|
51126
51179
|
continue;
|
|
51127
51180
|
|
|
51128
51181
|
attributes .set (name, [ ]);
|
|
@@ -51148,6 +51201,13 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
|
|
|
51148
51201
|
case "r": case "g": case "b": case "a":
|
|
51149
51202
|
colors .push (this .convertColor (this .value, type));
|
|
51150
51203
|
break;
|
|
51204
|
+
case "f_dc_0": case "f_dc_1": case "f_dc_2":
|
|
51205
|
+
colors .push (this .convertFDC (this .convertColor (this .value, type)));
|
|
51206
|
+
break;
|
|
51207
|
+
case "opacity":
|
|
51208
|
+
// https://github.com/antimatter15/splat/blob/main/convert.py
|
|
51209
|
+
colors .push (1 / (1 + Math .exp (-this .value)));
|
|
51210
|
+
break;
|
|
51151
51211
|
case "s": case "t":
|
|
51152
51212
|
case "u": case "v":
|
|
51153
51213
|
texCoords .push (this .value);
|
|
@@ -51187,7 +51247,7 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
|
|
|
51187
51247
|
// Geometric properties
|
|
51188
51248
|
|
|
51189
51249
|
const
|
|
51190
|
-
pAlpha = properties .some (p => p .name .match (/^(?:alpha|a)$/)),
|
|
51250
|
+
pAlpha = properties .some (p => p .name .match (/^(?:alpha|a|opacity)$/)),
|
|
51191
51251
|
alpha = pAlpha && colors .some ((v, i) => i % 4 === 3 && v < 1),
|
|
51192
51252
|
color = scene .createNode (alpha ? "ColorRGBA" : "Color");
|
|
51193
51253
|
|
|
@@ -52414,8 +52474,8 @@ const MatrixStack_default_ = MatrixStack;
|
|
|
52414
52474
|
x_ite_Namespace .add ("MatrixStack", "standard/Math/Utility/MatrixStack", MatrixStack_default_);
|
|
52415
52475
|
/* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
|
|
52416
52476
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
|
|
52417
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
52418
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
52477
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(376);
|
|
52478
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(229);
|
|
52419
52479
|
/*******************************************************************************
|
|
52420
52480
|
*
|
|
52421
52481
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -55186,7 +55246,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
55186
55246
|
x_ite_Namespace .add ("SVGParser", "x_ite/Parser/SVGParser", SVGParser_default_);
|
|
55187
55247
|
/* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
|
|
55188
55248
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
|
|
55189
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
55249
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(376);
|
|
55190
55250
|
/*******************************************************************************
|
|
55191
55251
|
*
|
|
55192
55252
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -56915,6 +56975,7 @@ function X3DRenderObject (executionContext)
|
|
|
56915
56975
|
const browser = executionContext .getBrowser ();
|
|
56916
56976
|
|
|
56917
56977
|
this .renderKey = "";
|
|
56978
|
+
this .renderAndGlobalLightsKey = "";
|
|
56918
56979
|
this .renderCount = 0;
|
|
56919
56980
|
this .viewVolumes = [ ];
|
|
56920
56981
|
this .projectionMatrix = new Utility_MatrixStack (Numbers_Matrix4);
|
|
@@ -56928,12 +56989,13 @@ function X3DRenderObject (executionContext)
|
|
|
56928
56989
|
this .hitRay = new Geometry_Line3 (Numbers_Vector3 .Zero, Numbers_Vector3 .Zero);
|
|
56929
56990
|
this .sensors = [[ ]];
|
|
56930
56991
|
this .viewpointGroups = [ ];
|
|
56931
|
-
this .
|
|
56992
|
+
this .lights = [ ];
|
|
56932
56993
|
this .globalLightsKeys = [ ];
|
|
56933
56994
|
this .globalLights = [ ];
|
|
56995
|
+
this .localObjectsKeys = [ ];
|
|
56934
56996
|
this .localObjects = [ ];
|
|
56935
|
-
this .lights = [ ];
|
|
56936
56997
|
this .globalShadows = [ false ];
|
|
56998
|
+
this .globalShadow = false;
|
|
56937
56999
|
this .localShadows = [ false ];
|
|
56938
57000
|
this .localFogs = [ null ];
|
|
56939
57001
|
this .layouts = [ ];
|
|
@@ -56968,6 +57030,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
56968
57030
|
const browser = this .getBrowser ();
|
|
56969
57031
|
|
|
56970
57032
|
browser .getRenderingProperties () ._LogarithmicDepthBuffer .addInterest ("set_renderKey__", this);
|
|
57033
|
+
browser .getBrowserOptions () ._ColorSpace .addInterest ("set_renderKey__", this);
|
|
56971
57034
|
browser .getBrowserOptions () ._OrderIndependentTransparency .addInterest ("set_renderKey__", this);
|
|
56972
57035
|
browser .getBrowserOptions () ._ToneMapping .addInterest ("set_renderKey__", this);
|
|
56973
57036
|
|
|
@@ -56993,9 +57056,22 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
56993
57056
|
|
|
56994
57057
|
let renderKey = "";
|
|
56995
57058
|
|
|
56996
|
-
renderKey += this .logarithmicDepthBuffer
|
|
57059
|
+
renderKey += this .logarithmicDepthBuffer ? 1 : 0;
|
|
56997
57060
|
renderKey += this .orderIndependentTransparency ? 1 : 0;
|
|
56998
57061
|
|
|
57062
|
+
switch (browser .getBrowserOption ("ColorSpace"))
|
|
57063
|
+
{
|
|
57064
|
+
case "SRGB":
|
|
57065
|
+
renderKey += 0;
|
|
57066
|
+
break;
|
|
57067
|
+
default: // LINEAR_WHEN_PHYSICAL_MATERIAL
|
|
57068
|
+
renderKey += 1;
|
|
57069
|
+
break;
|
|
57070
|
+
case "LINEAR":
|
|
57071
|
+
renderKey += 2;
|
|
57072
|
+
break;
|
|
57073
|
+
}
|
|
57074
|
+
|
|
56999
57075
|
switch (browser .getBrowserOption ("ToneMapping"))
|
|
57000
57076
|
{
|
|
57001
57077
|
default: // NONE
|
|
@@ -57029,6 +57105,10 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57029
57105
|
{
|
|
57030
57106
|
return this .renderKey;
|
|
57031
57107
|
},
|
|
57108
|
+
getRenderAndGlobalLightsKey ()
|
|
57109
|
+
{
|
|
57110
|
+
return this .renderAndGlobalLightsKey;
|
|
57111
|
+
},
|
|
57032
57112
|
getRenderCount ()
|
|
57033
57113
|
{
|
|
57034
57114
|
return this .renderCount;
|
|
@@ -57095,10 +57175,18 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57095
57175
|
{
|
|
57096
57176
|
return this .viewpointGroups;
|
|
57097
57177
|
},
|
|
57178
|
+
getLights ()
|
|
57179
|
+
{
|
|
57180
|
+
return this .lights;
|
|
57181
|
+
},
|
|
57098
57182
|
getGlobalLights ()
|
|
57099
57183
|
{
|
|
57100
57184
|
return this .globalLights;
|
|
57101
57185
|
},
|
|
57186
|
+
getGlobalLightsKeys ()
|
|
57187
|
+
{
|
|
57188
|
+
return this .globalLightsKeys;
|
|
57189
|
+
},
|
|
57102
57190
|
getLocalObjects ()
|
|
57103
57191
|
{
|
|
57104
57192
|
return this .localObjects;
|
|
@@ -57107,10 +57195,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57107
57195
|
{
|
|
57108
57196
|
return this .localObjectsKeys;
|
|
57109
57197
|
},
|
|
57110
|
-
getLights ()
|
|
57111
|
-
{
|
|
57112
|
-
return this .lights;
|
|
57113
|
-
},
|
|
57114
57198
|
pushGlobalShadows (value)
|
|
57115
57199
|
{
|
|
57116
57200
|
this .globalShadows .push (value || this .globalShadows .at (-1));
|
|
@@ -57119,6 +57203,10 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57119
57203
|
{
|
|
57120
57204
|
return this .globalShadows;
|
|
57121
57205
|
},
|
|
57206
|
+
getGlobalShadow ()
|
|
57207
|
+
{
|
|
57208
|
+
return this .globalShadow;
|
|
57209
|
+
},
|
|
57122
57210
|
pushLocalShadows (value)
|
|
57123
57211
|
{
|
|
57124
57212
|
this .localShadows .push (value || this .localShadows .at (-1));
|
|
@@ -57946,7 +58034,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57946
58034
|
globalLights = this .globalLights,
|
|
57947
58035
|
generatedCubeMapTextures = this .generatedCubeMapTextures,
|
|
57948
58036
|
globalShadows = this .globalShadows,
|
|
57949
|
-
shadows = globalShadows .at (-1),
|
|
57950
58037
|
headlight = this .getNavigationInfo () ._headlight .getValue (),
|
|
57951
58038
|
oit = frameBuffer .getOIT () && independent;
|
|
57952
58039
|
|
|
@@ -57978,6 +58065,9 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57978
58065
|
for (const light of globalLights)
|
|
57979
58066
|
globalLightsKeys .push (light .lightNode .getLightKey ());
|
|
57980
58067
|
|
|
58068
|
+
this .renderAndGlobalLightsKey = `.${this .renderKey}.${globalLightsKeys .sort () .join ("")}.`;
|
|
58069
|
+
this .globalShadow = globalShadows .at (-1);
|
|
58070
|
+
|
|
57981
58071
|
// Set global uniforms.
|
|
57982
58072
|
|
|
57983
58073
|
this .viewportArray .set (viewport);
|
|
@@ -57985,34 +58075,6 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
57985
58075
|
this .viewMatrixArray .set (this .getViewMatrix () .get ());
|
|
57986
58076
|
this .cameraSpaceMatrixArray .set (this .getCameraSpaceMatrix () .get ());
|
|
57987
58077
|
|
|
57988
|
-
// Prepare opaque objects.
|
|
57989
|
-
|
|
57990
|
-
const
|
|
57991
|
-
opaqueShapes = this .opaqueShapes,
|
|
57992
|
-
numOpaqueShapes = this .numOpaqueShapes;
|
|
57993
|
-
|
|
57994
|
-
for (let i = 0; i < numOpaqueShapes; ++ i)
|
|
57995
|
-
{
|
|
57996
|
-
const renderContext = opaqueShapes [i];
|
|
57997
|
-
|
|
57998
|
-
renderContext .shadows = renderContext .shadows || shadows;
|
|
57999
|
-
renderContext .objectsKeys .push (... globalLightsKeys);
|
|
58000
|
-
}
|
|
58001
|
-
|
|
58002
|
-
// Prepare transparent objects.
|
|
58003
|
-
|
|
58004
|
-
const
|
|
58005
|
-
transparentShapes = this .transparentShapes,
|
|
58006
|
-
numTransparentShapes = this .numTransparentShapes;
|
|
58007
|
-
|
|
58008
|
-
for (let i = 0; i < numTransparentShapes; ++ i)
|
|
58009
|
-
{
|
|
58010
|
-
const renderContext = transparentShapes [i];
|
|
58011
|
-
|
|
58012
|
-
renderContext .shadows = renderContext .shadows || shadows;
|
|
58013
|
-
renderContext .objectsKeys .push (... globalLightsKeys);
|
|
58014
|
-
}
|
|
58015
|
-
|
|
58016
58078
|
// DRAW
|
|
58017
58079
|
|
|
58018
58080
|
if (independent && this .transmission)
|
|
@@ -58031,13 +58093,13 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
58031
58093
|
gl .bindTexture (gl .TEXTURE_2D, transmissionBuffer .getColorTexture ());
|
|
58032
58094
|
gl .generateMipmap (gl .TEXTURE_2D);
|
|
58033
58095
|
|
|
58034
|
-
this .drawShapes (gl, browser, true, frameBuffer, 0, oit, viewport, opaqueShapes, numOpaqueShapes, transparentShapes, numTransparentShapes, this .transparencySorter);
|
|
58096
|
+
this .drawShapes (gl, browser, true, frameBuffer, 0, oit, viewport, this .opaqueShapes, this .numOpaqueShapes, this .transparentShapes, this .numTransparentShapes, this .transparencySorter);
|
|
58035
58097
|
}
|
|
58036
58098
|
else
|
|
58037
58099
|
{
|
|
58038
58100
|
// Draw with sorted blend or OIT.
|
|
58039
58101
|
|
|
58040
|
-
this .drawShapes (gl, browser, independent, frameBuffer, 0, oit, viewport, opaqueShapes, numOpaqueShapes, transparentShapes, numTransparentShapes, this .transparencySorter);
|
|
58102
|
+
this .drawShapes (gl, browser, independent, frameBuffer, 0, oit, viewport, this .opaqueShapes, this .numOpaqueShapes, this .transparentShapes, this .numTransparentShapes, this .transparencySorter);
|
|
58041
58103
|
}
|
|
58042
58104
|
|
|
58043
58105
|
// POST DRAW
|
|
@@ -61961,8 +62023,7 @@ function X3DBackgroundNode (executionContext)
|
|
|
61961
62023
|
this .textureNodes = new Array (6);
|
|
61962
62024
|
this .textureBits = new Utility_BitSet ();
|
|
61963
62025
|
this .sphereContext = new Rendering_GeometryContext ({ colorMaterial: true });
|
|
61964
|
-
this .
|
|
61965
|
-
this .texturesContext = new Rendering_GeometryContext ({ });
|
|
62026
|
+
this .texturesContext = new Rendering_GeometryContext ({ objectsKeys: this .sphereContext .objectsKeys});
|
|
61966
62027
|
}
|
|
61967
62028
|
|
|
61968
62029
|
Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBindableNode .prototype),
|
|
@@ -62314,26 +62375,20 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62314
62375
|
{
|
|
62315
62376
|
const
|
|
62316
62377
|
localObjects = renderObject .getLocalObjects (),
|
|
62317
|
-
clipPlanes = this .clipPlanes
|
|
62378
|
+
clipPlanes = this .clipPlanes,
|
|
62379
|
+
objectsKeys = this .sphereContext .objectsKeys;
|
|
62318
62380
|
|
|
62319
62381
|
let c = 0;
|
|
62320
62382
|
|
|
62321
|
-
for (
|
|
62383
|
+
for (const localObject of localObjects)
|
|
62322
62384
|
{
|
|
62323
|
-
if (
|
|
62324
|
-
clipPlanes [c ++] =
|
|
62385
|
+
if (localObject .isClipped)
|
|
62386
|
+
clipPlanes [c ++] = localObject;
|
|
62325
62387
|
}
|
|
62326
62388
|
|
|
62327
|
-
clipPlanes
|
|
62328
|
-
|
|
62329
|
-
|
|
62330
|
-
{
|
|
62331
|
-
this .sphereContext .objectsKeys [i] = 0;
|
|
62332
|
-
this .texturesContext .objectsKeys [i] = 0;
|
|
62333
|
-
}
|
|
62334
|
-
|
|
62335
|
-
this .sphereContext .objectsKeys .length = c;
|
|
62336
|
-
this .texturesContext .objectsKeys .length = c;
|
|
62389
|
+
clipPlanes .length = c;
|
|
62390
|
+
objectsKeys .length = c;
|
|
62391
|
+
objectsKeys .fill (0);
|
|
62337
62392
|
return;
|
|
62338
62393
|
}
|
|
62339
62394
|
}
|
|
@@ -62392,9 +62447,14 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62392
62447
|
return;
|
|
62393
62448
|
|
|
62394
62449
|
const
|
|
62395
|
-
browser
|
|
62396
|
-
gl
|
|
62397
|
-
|
|
62450
|
+
browser = this .getBrowser (),
|
|
62451
|
+
gl = browser .getContext (),
|
|
62452
|
+
sphereContext = this .sphereContext;
|
|
62453
|
+
|
|
62454
|
+
sphereContext .alphaMode = transparency ? Shape_AlphaMode .BLEND : Shape_AlphaMode .OPAQUE;
|
|
62455
|
+
sphereContext .renderObject = renderObject;
|
|
62456
|
+
|
|
62457
|
+
const shaderNode = browser .getDefaultMaterial () .getShader (sphereContext);
|
|
62398
62458
|
|
|
62399
62459
|
shaderNode .enable (gl);
|
|
62400
62460
|
shaderNode .setClipPlanes (gl, this .clipPlanes);
|
|
@@ -62442,8 +62502,9 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
62442
62502
|
{
|
|
62443
62503
|
const textureNode = this .textureNodes [i];
|
|
62444
62504
|
|
|
62445
|
-
texturesContext .alphaMode
|
|
62446
|
-
texturesContext .textureNode
|
|
62505
|
+
texturesContext .alphaMode = textureNode ._transparent .getValue () ? Shape_AlphaMode .BLEND : Shape_AlphaMode .OPAQUE;
|
|
62506
|
+
texturesContext .textureNode = textureNode;
|
|
62507
|
+
texturesContext .renderObject = renderObject;
|
|
62447
62508
|
|
|
62448
62509
|
const shaderNode = browser .getDefaultMaterial () .getShader (texturesContext);
|
|
62449
62510
|
|
|
@@ -63153,7 +63214,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
63153
63214
|
x_ite_Namespace .add ("X3DTexture2DNode", "x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
|
|
63154
63215
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
|
|
63155
63216
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
63156
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
63217
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(376);
|
|
63157
63218
|
/*******************************************************************************
|
|
63158
63219
|
*
|
|
63159
63220
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -66737,7 +66798,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
66737
66798
|
x_ite_Namespace .add ("X3DWorld", "x_ite/Execution/X3DWorld", X3DWorld_default_);
|
|
66738
66799
|
/* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
|
|
66739
66800
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
|
|
66740
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
66801
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(376);
|
|
66741
66802
|
/*******************************************************************************
|
|
66742
66803
|
*
|
|
66743
66804
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -67671,7 +67732,7 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
|
|
|
67671
67732
|
x_ite_Namespace .add ("ProtoDeclarationArray", "x_ite/Prototype/ProtoDeclarationArray", ProtoDeclarationArray_default_);
|
|
67672
67733
|
/* harmony default export */ const Prototype_ProtoDeclarationArray = (ProtoDeclarationArray_default_);
|
|
67673
67734
|
;// CONCATENATED MODULE: ./src/x_ite/Routing/X3DRoute.js
|
|
67674
|
-
/* provided dependency */ var X3DRoute_$ = __webpack_require__(
|
|
67735
|
+
/* provided dependency */ var X3DRoute_$ = __webpack_require__(376);
|
|
67675
67736
|
/*******************************************************************************
|
|
67676
67737
|
*
|
|
67677
67738
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -81423,6 +81484,9 @@ x_ite_Namespace .add ("DirectionalLight", "x_ite/Components/Lighting/Directional
|
|
|
81423
81484
|
|
|
81424
81485
|
|
|
81425
81486
|
|
|
81487
|
+
/**
|
|
81488
|
+
* THIS NODE IS STILL EXPERIMENTAL.
|
|
81489
|
+
*/
|
|
81426
81490
|
|
|
81427
81491
|
const EnvironmentLights = Utility_ObjectCache (EnvironmentLightContainer);
|
|
81428
81492
|
|
|
@@ -90322,6 +90386,10 @@ x_ite_Namespace .add ("PointSet", "x_ite/Components/Rendering/PointSet", PointSe
|
|
|
90322
90386
|
|
|
90323
90387
|
|
|
90324
90388
|
|
|
90389
|
+
/**
|
|
90390
|
+
* THIS NODE IS STILL EXPERIMENTAL.
|
|
90391
|
+
*/
|
|
90392
|
+
|
|
90325
90393
|
function Tangent (executionContext)
|
|
90326
90394
|
{
|
|
90327
90395
|
Rendering_X3DGeometricPropertyNode .call (this, executionContext);
|
|
@@ -91119,7 +91187,7 @@ const MaterialTextures_default_ = {
|
|
|
91119
91187
|
"x3d_TransmissionTextureEXT",
|
|
91120
91188
|
"x3d_ThicknessTextureEXT",
|
|
91121
91189
|
],
|
|
91122
|
-
texture (name, components = "rgba",
|
|
91190
|
+
texture (name, components = "rgba", colorSpace = "")
|
|
91123
91191
|
{
|
|
91124
91192
|
const ext = !!name .match (/EXT$/);
|
|
91125
91193
|
|
|
@@ -91157,15 +91225,29 @@ vec4 textureColor=texture(${name}${EXT} .textureCube,texCoord);
|
|
|
91157
91225
|
#endif
|
|
91158
91226
|
${type}
|
|
91159
91227
|
textureColorComponents=textureColor.${components};
|
|
91228
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
91160
91229
|
#if defined(${define}${_EXT}_LINEAR)
|
|
91161
|
-
#if ${
|
|
91162
|
-
textureColorComponents=
|
|
91230
|
+
#if ${colorSpace === "sRGB" || colorSpace === "linear" ? 1 : 0}
|
|
91231
|
+
textureColorComponents=linearToSRGB(textureColorComponents);
|
|
91232
|
+
#endif
|
|
91233
|
+
#endif
|
|
91234
|
+
#elif defined(X3D_COLORSPACE_LINEAR_WHEN_PHYSICAL_MATERIAL)
|
|
91235
|
+
#if defined(${define}${_EXT}_LINEAR)
|
|
91236
|
+
#if ${colorSpace === "sRGB" ? 1 : 0}
|
|
91237
|
+
textureColorComponents=linearToSRGB(textureColorComponents);
|
|
91163
91238
|
#endif
|
|
91164
91239
|
#else
|
|
91165
|
-
#if ${
|
|
91240
|
+
#if ${colorSpace === "linear" ? 1 : 0}
|
|
91166
91241
|
textureColorComponents=sRGBToLinear(textureColorComponents);
|
|
91167
91242
|
#endif
|
|
91168
91243
|
#endif
|
|
91244
|
+
#elif defined(X3D_COLORSPACE_LINEAR)
|
|
91245
|
+
#if!defined(${define}${_EXT}_LINEAR)
|
|
91246
|
+
#if ${colorSpace === "sRGB" || colorSpace === "linear" ? 1 : 0}
|
|
91247
|
+
textureColorComponents=sRGBToLinear(textureColorComponents);
|
|
91248
|
+
#endif
|
|
91249
|
+
#endif
|
|
91250
|
+
#endif
|
|
91169
91251
|
return textureColorComponents;}
|
|
91170
91252
|
#endif
|
|
91171
91253
|
`
|
|
@@ -91200,7 +91282,7 @@ mediump samplerCube textureCube;
|
|
|
91200
91282
|
x_ite_Namespace .add ("MaterialTextures", "assets/shaders/MaterialTextures", MaterialTextures_default_);
|
|
91201
91283
|
/* harmony default export */ const MaterialTextures = (MaterialTextures_default_);
|
|
91202
91284
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
|
|
91203
|
-
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(
|
|
91285
|
+
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(376);
|
|
91204
91286
|
/*******************************************************************************
|
|
91205
91287
|
*
|
|
91206
91288
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -91455,7 +91537,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
|
|
|
91455
91537
|
"x3d_TransmissionFramebufferSizeEXT",
|
|
91456
91538
|
"x3d_ThicknessEXT",
|
|
91457
91539
|
"x3d_AttenuationDistanceEXT",
|
|
91458
|
-
"
|
|
91540
|
+
"x3d_AttenuationColorEXT",
|
|
91459
91541
|
];
|
|
91460
91542
|
|
|
91461
91543
|
for (const name of commonUniforms)
|
|
@@ -93487,6 +93569,10 @@ x_ite_Namespace .add ("Matrix4VertexAttribute", "x_ite/Components/Shaders/Matrix
|
|
|
93487
93569
|
|
|
93488
93570
|
|
|
93489
93571
|
|
|
93572
|
+
/**
|
|
93573
|
+
* THIS NODE IS NOT SUPPORTED.
|
|
93574
|
+
*/
|
|
93575
|
+
|
|
93490
93576
|
function PackagedShader (executionContext)
|
|
93491
93577
|
{
|
|
93492
93578
|
Shaders_X3DShaderNode .call (this, executionContext);
|
|
@@ -93619,6 +93705,10 @@ x_ite_Namespace .add ("PackagedShader", "x_ite/Components/Shaders/PackagedShader
|
|
|
93619
93705
|
|
|
93620
93706
|
|
|
93621
93707
|
|
|
93708
|
+
/**
|
|
93709
|
+
* THIS NODE IS NOT SUPPORTED.
|
|
93710
|
+
*/
|
|
93711
|
+
|
|
93622
93712
|
function ProgramShader (executionContext)
|
|
93623
93713
|
{
|
|
93624
93714
|
Shaders_X3DShaderNode .call (this, executionContext);
|
|
@@ -94311,7 +94401,7 @@ finalColor.a=1.0;
|
|
|
94311
94401
|
#if defined(X3D_ALPHA_MODE_MASK)
|
|
94312
94402
|
if(finalColor.a<x3d_AlphaCutoff)discard;finalColor.a=1.0;
|
|
94313
94403
|
#endif
|
|
94314
|
-
gl_FragColor=finalColor;
|
|
94404
|
+
finalColor.rgb=toneMap(finalColor.rgb);gl_FragColor=finalColor;
|
|
94315
94405
|
#if defined(X3D_LOGARITHMIC_DEPTH_BUFFER)
|
|
94316
94406
|
gl_FragDepthEXT=log2(depth)*x3d_LogarithmicFarFactor1_2;
|
|
94317
94407
|
#endif
|
|
@@ -94320,55 +94410,6 @@ gl_FragDepthEXT=log2(depth)*x3d_LogarithmicFarFactor1_2;
|
|
|
94320
94410
|
|
|
94321
94411
|
x_ite_Namespace .add ("Fragment1.glsl", "assets/shaders/webgl1/common/Fragment1.glsl", Fragment1_glsl_default_);
|
|
94322
94412
|
/* harmony default export */ const Fragment1_glsl = (Fragment1_glsl_default_);
|
|
94323
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Shadow1.glsl.js
|
|
94324
|
-
const Shadow1_glsl_default_ = /* glsl */ `
|
|
94325
|
-
#if defined(X3D_FRAGMENT_SHADER)&&defined(X3D_SHADOWS)
|
|
94326
|
-
uniform sampler2D x3d_ShadowMap[X3D_NUM_LIGHTS];float getShadowDepth(const in int index,const in vec2 shadowCoord){
|
|
94327
|
-
#if X3D_NUM_LIGHTS>0
|
|
94328
|
-
if(index==0)return texture2D(x3d_ShadowMap[0],shadowCoord).r;
|
|
94329
|
-
#endif
|
|
94330
|
-
#if X3D_NUM_LIGHTS>1
|
|
94331
|
-
if(index==1)return texture2D(x3d_ShadowMap[1],shadowCoord).r;
|
|
94332
|
-
#endif
|
|
94333
|
-
#if X3D_NUM_LIGHTS>2
|
|
94334
|
-
if(index==2)return texture2D(x3d_ShadowMap[2],shadowCoord).r;
|
|
94335
|
-
#endif
|
|
94336
|
-
#if X3D_NUM_LIGHTS>3
|
|
94337
|
-
if(index==3)return texture2D(x3d_ShadowMap[3],shadowCoord).r;
|
|
94338
|
-
#endif
|
|
94339
|
-
#if X3D_NUM_LIGHTS>4
|
|
94340
|
-
if(index==4)return texture2D(x3d_ShadowMap[4],shadowCoord).r;
|
|
94341
|
-
#endif
|
|
94342
|
-
#if X3D_NUM_LIGHTS>5
|
|
94343
|
-
if(index==5)return texture2D(x3d_ShadowMap[5],shadowCoord).r;
|
|
94344
|
-
#endif
|
|
94345
|
-
#if X3D_NUM_LIGHTS>6
|
|
94346
|
-
if(index==6)return texture2D(x3d_ShadowMap[6],shadowCoord).r;
|
|
94347
|
-
#endif
|
|
94348
|
-
#if X3D_NUM_LIGHTS>7
|
|
94349
|
-
if(index==7)return texture2D(x3d_ShadowMap[7],shadowCoord).r;
|
|
94350
|
-
#endif
|
|
94351
|
-
return 0.0;}float texture2DCompare(const in int index,const in vec2 texCoord,const in float compare){float shadowDepth=getShadowDepth(index,texCoord);return(1.0-step(1.0,shadowDepth))*step(shadowDepth,compare);}float texture2DShadowLerp(const in int index,const in vec2 texelSize,const in float shadowMapSize,const in vec2 texCoord,const in float compare){const vec2 offset=vec2(0.0,1.0);vec2 centroidTexCoord=floor(texCoord*shadowMapSize+0.5)/shadowMapSize;float lb=texture2DCompare(index,centroidTexCoord+texelSize*offset.xx,compare);float lt=texture2DCompare(index,centroidTexCoord+texelSize*offset.xy,compare);float rb=texture2DCompare(index,centroidTexCoord+texelSize*offset.yx,compare);float rt=texture2DCompare(index,centroidTexCoord+texelSize*offset.yy,compare);vec2 f=fract(texCoord*shadowMapSize+0.5);float a=mix(lb,lt,f.y);float b=mix(rb,rt,f.y);float c=mix(a,b,f.x);return c;}vec2 cubeToUVCompact(in vec3 v,const float texelSizeY){vec3 absV=abs(v);float scaleToCube=1.0/max(absV.x,max(absV.y,absV.z));absV*=scaleToCube;v*=scaleToCube*(1.0-2.0*texelSizeY);vec2 planar=v.xy;float almostATexel=1.5*texelSizeY;float almostOne=1.0-almostATexel;if(absV.z>=almostOne){if(v.z>0.0)planar.x=4.0-v.x;}else if(absV.x>=almostOne){float signX=sign(v.x);planar.x=v.z*signX+2.0*signX;}else if(absV.y>=almostOne){float signY=sign(v.y);planar.x=(v.x+0.5+signY)*2.0;planar.y=v.z*signY-2.0;}return vec2(0.125,0.25)*planar+vec2(0.375,0.75);}mat4 getPointLightRotations(const in vec3 vector){mat4 rotations[6];rotations[0]=mat4(0,0,1,0,0,1,0,0,-1,0,0,0,0,0,0,1);rotations[1]=mat4(0,0,-1,0,0,1,0,0,1,0,0,0,0,0,0,1);rotations[2]=mat4(-1,0,0,0,0,1,0,0,0,0,-1,0,0,0,0,1);rotations[3]=mat4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);rotations[4]=mat4(1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1);rotations[5]=mat4(1,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,1);vec3 a=abs(vector.xyz);if(a.x>a.y){if(a.x>a.z)return vector.x>0.0?rotations[1]:rotations[0];else return vector.z>0.0?rotations[2]:rotations[3];}else{if(a.y>a.z)return vector.y>0.0?rotations[5]:rotations[4];else return vector.z>0.0?rotations[2]:rotations[3];}return rotations[3];}float getShadowIntensity(const in int index,const in x3d_LightSourceParameters light){if(light.type==x3d_PointLight){const mat4 biasMatrix=mat4(0.5,0.0,0.0,0.0,0.0,0.5,0.0,0.0,0.0,0.0,0.5,0.0,0.5,0.5,0.5,1.0);const mat4 projectionMatrix=mat4(1.0,0.0,0.0,0.0,0.0,0.5,0.0,0.0,0.0,0.0,-1.000025000312504,-1.0,0,0.0,-0.25000312503906297,0.0);vec2 texelSize=vec2(1.0)/(float(light.shadowMapSize)*vec2(4.0,2.0));vec4 shadowCoord=light.shadowMatrix*vec4(vertex,1.0);vec3 lightToPosition=shadowCoord.xyz;shadowCoord=biasMatrix*(projectionMatrix*(getPointLightRotations(lightToPosition)*shadowCoord));shadowCoord.z-=light.shadowBias;shadowCoord.xyz/=shadowCoord.w;
|
|
94352
|
-
#if defined(X3D_PCF_FILTERING)||defined(X3D_PCF_SOFT_FILTERING)
|
|
94353
|
-
vec2 offset=vec2(-1,1)*(texelSize.y*42.0);float value=(texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.xyy,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.yyy,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.xyx,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.yyx,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.xxy,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.yxy,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.xxx,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.yxx,texelSize.y),shadowCoord.z))*(1.0/9.0);return light.shadowIntensity*value;
|
|
94354
|
-
#else
|
|
94355
|
-
float value=texture2DCompare(index,cubeToUVCompact(lightToPosition,texelSize.y),shadowCoord.z);return light.shadowIntensity*value;
|
|
94356
|
-
#endif
|
|
94357
|
-
}else{
|
|
94358
|
-
#if defined(X3D_PCF_FILTERING)
|
|
94359
|
-
vec2 texelSize=vec2(1.0)/vec2(light.shadowMapSize);vec4 shadowCoord=light.shadowMatrix*vec4(vertex,1.0);shadowCoord.z-=light.shadowBias;shadowCoord.xyz/=shadowCoord.w;if(any(greaterThan(abs(shadowCoord.xy-0.5),vec2(0.5))))return 0.0;vec2 d0=-texelSize;vec2 d1=texelSize;float value=(texture2DCompare(index,shadowCoord.xy+d0,shadowCoord.z)+texture2DCompare(index,shadowCoord.xy+vec2(0.0,d0.y),shadowCoord.z)+texture2DCompare(index,shadowCoord.xy+vec2(d1.x,d0.y),shadowCoord.z)+texture2DCompare(index,shadowCoord.xy+vec2(d0.x,0.0),shadowCoord.z)+texture2DCompare(index,shadowCoord.xy,shadowCoord.z)+texture2DCompare(index,shadowCoord.xy+vec2(d1.x,0.0),shadowCoord.z)+texture2DCompare(index,shadowCoord.xy+vec2(d0.x,d1.y),shadowCoord.z)+texture2DCompare(index,shadowCoord.xy+vec2(0.0,d1.y),shadowCoord.z)+texture2DCompare(index,shadowCoord.xy+d1,shadowCoord.z))*(1.0/9.0);return light.shadowIntensity*value;
|
|
94360
|
-
#elif defined(X3D_PCF_SOFT_FILTERING)
|
|
94361
|
-
vec2 texelSize=vec2(1.0)/vec2(light.shadowMapSize);vec4 shadowCoord=light.shadowMatrix*vec4(vertex,1.0);shadowCoord.z-=light.shadowBias;shadowCoord.xyz/=shadowCoord.w;if(any(greaterThan(abs(shadowCoord.xy-0.5),vec2(0.5))))return 0.0;vec2 d0=-texelSize;vec2 d1=texelSize;float value=(texture2DShadowLerp(index,texelSize,float(shadowMapSize),shadowCoord.xy+d0,shadowCoord.z)+texture2DShadowLerp(index,texelSize,float(shadowMapSize),shadowCoord.xy+vec2(0.0,d0.y),shadowCoord.z)+texture2DShadowLerp(index,texelSize,float(shadowMapSize),shadowCoord.xy+vec2(d1.x,d0.y),shadowCoord.z)+texture2DShadowLerp(index,texelSize,float(shadowMapSize),shadowCoord.xy+vec2(d0.x,0.0),shadowCoord.z)+texture2DShadowLerp(index,texelSize,float(shadowMapSize),shadowCoord.xy,shadowCoord.z)+texture2DShadowLerp(index,texelSize,float(shadowMapSize),shadowCoord.xy+vec2(d1.x,0.0),shadowCoord.z)+texture2DShadowLerp(index,texelSize,float(shadowMapSize),shadowCoord.xy+vec2(d0.x,d1.y),shadowCoord.z)+texture2DShadowLerp(index,texelSize,float(shadowMapSize),shadowCoord.xy+vec2(0.0,d1.y),shadowCoord.z)+texture2DShadowLerp(index,texelSize,float(shadowMapSize),shadowCoord.xy+d1,shadowCoord.z))*(1.0/9.0);return light.shadowIntensity*value;
|
|
94362
|
-
#else
|
|
94363
|
-
vec4 shadowCoord=light.shadowMatrix*vec4(vertex,1.0);shadowCoord.z-=light.shadowBias;shadowCoord.xyz/=shadowCoord.w;if(any(greaterThan(abs(shadowCoord.xy-0.5),vec2(0.5))))return 0.0;float value=texture2DCompare(index,shadowCoord.xy,shadowCoord.z);return light.shadowIntensity*value;
|
|
94364
|
-
#endif
|
|
94365
|
-
}return 0.0;}
|
|
94366
|
-
#endif
|
|
94367
|
-
`
|
|
94368
|
-
;
|
|
94369
|
-
|
|
94370
|
-
x_ite_Namespace .add ("Shadow1.glsl", "assets/shaders/webgl1/common/Shadow1.glsl", Shadow1_glsl_default_);
|
|
94371
|
-
/* harmony default export */ const Shadow1_glsl = (Shadow1_glsl_default_);
|
|
94372
94413
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Texture1.glsl.js
|
|
94373
94414
|
|
|
94374
94415
|
|
|
@@ -94427,10 +94468,20 @@ textureColor = texture2D (x3d_Texture2D [${i}], texCoord .st);
|
|
|
94427
94468
|
#elif defined (X3D_TEXTURE${i}_CUBE)
|
|
94428
94469
|
textureColor = textureCube (x3d_TextureCube [${i}], texCoord .stp);
|
|
94429
94470
|
#endif
|
|
94471
|
+
#if defined (X3D_COLORSPACE_SRGB)
|
|
94472
|
+
#if defined (X3D_TEXTURE${i}_LINEAR)
|
|
94473
|
+
textureColor = linearToSRGB (textureColor);
|
|
94474
|
+
#endif
|
|
94475
|
+
#elif defined (X3D_COLORSPACE_LINEAR_WHEN_PHYSICAL_MATERIAL)
|
|
94430
94476
|
#if defined (X3D_PHYSICAL_MATERIAL) && !defined (X3D_TEXTURE${i}_LINEAR)
|
|
94431
94477
|
textureColor = sRGBToLinear (textureColor);
|
|
94432
94478
|
#elif !defined (X3D_PHYSICAL_MATERIAL) && defined (X3D_TEXTURE${i}_LINEAR)
|
|
94433
|
-
textureColor =
|
|
94479
|
+
textureColor = linearToSRGB (textureColor);
|
|
94480
|
+
#endif
|
|
94481
|
+
#elif defined (X3D_COLORSPACE_LINEAR)
|
|
94482
|
+
#if !defined (X3D_TEXTURE${i}_LINEAR)
|
|
94483
|
+
textureColor = sRGBToLinear (textureColor);
|
|
94484
|
+
#endif
|
|
94434
94485
|
#endif
|
|
94435
94486
|
}
|
|
94436
94487
|
#endif
|
|
@@ -94458,10 +94509,16 @@ textureColor = texture2D (x3d_TextureProjectorTexture [${i}], texCoord);
|
|
|
94458
94509
|
#endif
|
|
94459
94510
|
`) .join ("\n")}
|
|
94460
94511
|
return textureColor;}vec3 getTextureProjectorColor(){vec3 currentColor=vec3(1.0);vec3 N=gl_FrontFacing?normal:-normal;for(int i=0;i<X3D_NUM_TEXTURE_PROJECTORS;++i){vec4 texCoord=x3d_TextureProjectorMatrix[i]*vec4(vertex,1.0);texCoord.stp/=texCoord.q;texCoord.p=clamp(texCoord.p,x3d_TextureProjectorParams[i].x,x3d_TextureProjectorParams[i].y);if(any(greaterThan(abs(texCoord.stp-0.5),vec3(0.5))))continue;vec3 p=x3d_TextureProjectorLocation[i]-vertex;if(dot(N,p)<0.0)continue;vec4 T=getTextureProjectorTexture(i,texCoord.st);
|
|
94512
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
94513
|
+
if(bool(x3d_TextureProjectorParams[i].z))T=linearToSRGB(T);
|
|
94514
|
+
#elif defined(X3D_COLORSPACE_LINEAR_WHEN_PHYSICAL_MATERIAL)
|
|
94461
94515
|
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
94462
94516
|
if(!bool(x3d_TextureProjectorParams[i].z))T=sRGBToLinear(T);
|
|
94463
94517
|
#else
|
|
94464
|
-
if(bool(x3d_TextureProjectorParams[i].z))T=
|
|
94518
|
+
if(bool(x3d_TextureProjectorParams[i].z))T=linearToSRGB(T);
|
|
94519
|
+
#endif
|
|
94520
|
+
#elif defined(X3D_COLORSPACE_LINEAR)
|
|
94521
|
+
if(!bool(x3d_TextureProjectorParams[i].z))T=sRGBToLinear(T);
|
|
94465
94522
|
#endif
|
|
94466
94523
|
currentColor*=mix(vec3(1.0),T.rgb*x3d_TextureProjectorColor[i],T.a*x3d_TextureProjectorIntensity[i]);}return currentColor;}
|
|
94467
94524
|
#endif
|
|
@@ -94691,6 +94748,7 @@ finalColor.a=1.0;
|
|
|
94691
94748
|
#if defined(X3D_ALPHA_MODE_MASK)
|
|
94692
94749
|
if(finalColor.a<x3d_AlphaCutoff)discard;finalColor.a=1.0;
|
|
94693
94750
|
#endif
|
|
94751
|
+
finalColor.rgb=toneMap(finalColor.rgb);
|
|
94694
94752
|
#if defined(X3D_ORDER_INDEPENDENT_TRANSPARENCY)
|
|
94695
94753
|
float a=finalColor.a;float w=weight(gl_FragCoord.z,a);finalColor.rgb*=a;finalColor*=w;x3d_FragData0=vec4(finalColor.rgb,a);x3d_FragData1=vec4(finalColor.a);
|
|
94696
94754
|
#else
|
|
@@ -94894,7 +94952,36 @@ x_ite_Namespace .add ("PointSize2.glsl", "assets/shaders/webgl2/common/PointSize
|
|
|
94894
94952
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Shadow2.glsl.js
|
|
94895
94953
|
const Shadow2_glsl_default_ = /* glsl */ `
|
|
94896
94954
|
#if defined(X3D_FRAGMENT_SHADER)&&defined(X3D_SHADOWS)
|
|
94897
|
-
uniform sampler2D x3d_ShadowMap[X3D_NUM_LIGHTS];
|
|
94955
|
+
uniform sampler2D x3d_ShadowMap[X3D_NUM_LIGHTS];
|
|
94956
|
+
#if __VERSION__==100
|
|
94957
|
+
float getShadowDepth(const in int index,const in vec2 shadowCoord){
|
|
94958
|
+
#if X3D_NUM_LIGHTS>0
|
|
94959
|
+
if(index==0)return texture2D(x3d_ShadowMap[0],shadowCoord).r;
|
|
94960
|
+
#endif
|
|
94961
|
+
#if X3D_NUM_LIGHTS>1
|
|
94962
|
+
if(index==1)return texture2D(x3d_ShadowMap[1],shadowCoord).r;
|
|
94963
|
+
#endif
|
|
94964
|
+
#if X3D_NUM_LIGHTS>2
|
|
94965
|
+
if(index==2)return texture2D(x3d_ShadowMap[2],shadowCoord).r;
|
|
94966
|
+
#endif
|
|
94967
|
+
#if X3D_NUM_LIGHTS>3
|
|
94968
|
+
if(index==3)return texture2D(x3d_ShadowMap[3],shadowCoord).r;
|
|
94969
|
+
#endif
|
|
94970
|
+
#if X3D_NUM_LIGHTS>4
|
|
94971
|
+
if(index==4)return texture2D(x3d_ShadowMap[4],shadowCoord).r;
|
|
94972
|
+
#endif
|
|
94973
|
+
#if X3D_NUM_LIGHTS>5
|
|
94974
|
+
if(index==5)return texture2D(x3d_ShadowMap[5],shadowCoord).r;
|
|
94975
|
+
#endif
|
|
94976
|
+
#if X3D_NUM_LIGHTS>6
|
|
94977
|
+
if(index==6)return texture2D(x3d_ShadowMap[6],shadowCoord).r;
|
|
94978
|
+
#endif
|
|
94979
|
+
#if X3D_NUM_LIGHTS>7
|
|
94980
|
+
if(index==7)return texture2D(x3d_ShadowMap[7],shadowCoord).r;
|
|
94981
|
+
#endif
|
|
94982
|
+
return 0.0;}
|
|
94983
|
+
#else
|
|
94984
|
+
float getShadowDepth(const in int index,const in vec2 shadowCoord){switch(index){
|
|
94898
94985
|
#if X3D_NUM_LIGHTS>0
|
|
94899
94986
|
case 0:{return texture(x3d_ShadowMap[0],shadowCoord).r;}
|
|
94900
94987
|
#endif
|
|
@@ -94919,7 +95006,9 @@ case 6:{return texture(x3d_ShadowMap[6],shadowCoord).r;}
|
|
|
94919
95006
|
#if X3D_NUM_LIGHTS>7
|
|
94920
95007
|
case 7:{return texture(x3d_ShadowMap[7],shadowCoord).r;}
|
|
94921
95008
|
#endif
|
|
94922
|
-
default:{return 0.0;}}}
|
|
95009
|
+
default:{return 0.0;}}}
|
|
95010
|
+
#endif
|
|
95011
|
+
float texture2DCompare(const in int index,const in vec2 texCoord,const in float compare){float shadowDepth=getShadowDepth(index,texCoord);return(1.0-step(1.0,shadowDepth))*step(shadowDepth,compare);}float texture2DShadowLerp(const in int index,const in vec2 texelSize,const in float shadowMapSize,const in vec2 texCoord,const in float compare){const vec2 offset=vec2(0.0,1.0);vec2 centroidTexCoord=floor(texCoord*shadowMapSize+0.5)/shadowMapSize;float lb=texture2DCompare(index,centroidTexCoord+texelSize*offset.xx,compare);float lt=texture2DCompare(index,centroidTexCoord+texelSize*offset.xy,compare);float rb=texture2DCompare(index,centroidTexCoord+texelSize*offset.yx,compare);float rt=texture2DCompare(index,centroidTexCoord+texelSize*offset.yy,compare);vec2 f=fract(texCoord*shadowMapSize+0.5);float a=mix(lb,lt,f.y);float b=mix(rb,rt,f.y);float c=mix(a,b,f.x);return c;}vec2 cubeToUVCompact(in vec3 v,const float texelSizeY){vec3 absV=abs(v);float scaleToCube=1.0/max(absV.x,max(absV.y,absV.z));absV*=scaleToCube;v*=scaleToCube*(1.0-2.0*texelSizeY);vec2 planar=v.xy;float almostATexel=1.5*texelSizeY;float almostOne=1.0-almostATexel;if(absV.z>=almostOne){if(v.z>0.0)planar.x=4.0-v.x;}else if(absV.x>=almostOne){float signX=sign(v.x);planar.x=v.z*signX+2.0*signX;}else if(absV.y>=almostOne){float signY=sign(v.y);planar.x=(v.x+0.5+signY)*2.0;planar.y=v.z*signY-2.0;}return vec2(0.125,0.25)*planar+vec2(0.375,0.75);}mat4 getPointLightRotations(const in vec3 vector){mat4 rotations[6];rotations[0]=mat4(0,0,1,0,0,1,0,0,-1,0,0,0,0,0,0,1);rotations[1]=mat4(0,0,-1,0,0,1,0,0,1,0,0,0,0,0,0,1);rotations[2]=mat4(-1,0,0,0,0,1,0,0,0,0,-1,0,0,0,0,1);rotations[3]=mat4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);rotations[4]=mat4(1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1);rotations[5]=mat4(1,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,1);vec3 a=abs(vector.xyz);if(a.x>a.y){if(a.x>a.z)return vector.x>0.0?rotations[1]:rotations[0];else return vector.z>0.0?rotations[2]:rotations[3];}else{if(a.y>a.z)return vector.y>0.0?rotations[5]:rotations[4];else return vector.z>0.0?rotations[2]:rotations[3];}return rotations[3];}float getShadowIntensity(const in int index,const in x3d_LightSourceParameters light){if(light.type==x3d_PointLight){const mat4 biasMatrix=mat4(0.5,0.0,0.0,0.0,0.0,0.5,0.0,0.0,0.0,0.0,0.5,0.0,0.5,0.5,0.5,1.0);const mat4 projectionMatrix=mat4(1.0,0.0,0.0,0.0,0.0,0.5,0.0,0.0,0.0,0.0,-1.000025000312504,-1.0,0,0.0,-0.25000312503906297,0.0);vec2 texelSize=vec2(1.0)/(float(light.shadowMapSize)*vec2(4.0,2.0));vec4 shadowCoord=light.shadowMatrix*vec4(vertex,1.0);vec3 lightToPosition=shadowCoord.xyz;shadowCoord=biasMatrix*(projectionMatrix*(getPointLightRotations(lightToPosition)*shadowCoord));shadowCoord.z-=light.shadowBias;shadowCoord.xyz/=shadowCoord.w;
|
|
94923
95012
|
#if defined(X3D_PCF_FILTERING)||defined(X3D_PCF_SOFT_FILTERING)
|
|
94924
95013
|
vec2 offset=vec2(-1,1)*(texelSize.y*42.0);float value=(texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.xyy,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.yyy,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.xyx,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.yyx,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.xxy,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.yxy,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.xxx,texelSize.y),shadowCoord.z)+texture2DCompare(index,cubeToUVCompact(lightToPosition+offset.yxx,texelSize.y),shadowCoord.z))*(1.0/9.0);return light.shadowIntensity*value;
|
|
94925
95014
|
#else
|
|
@@ -95043,10 +95132,20 @@ textureColor = texture (x3d_Texture3D [${i}], texCoord .stp);
|
|
|
95043
95132
|
#elif defined (X3D_TEXTURE${i}_CUBE)
|
|
95044
95133
|
textureColor = texture (x3d_TextureCube [${i}], texCoord .stp);
|
|
95045
95134
|
#endif
|
|
95135
|
+
#if defined (X3D_COLORSPACE_SRGB)
|
|
95136
|
+
#if defined (X3D_TEXTURE${i}_LINEAR)
|
|
95137
|
+
textureColor = linearToSRGB (textureColor);
|
|
95138
|
+
#endif
|
|
95139
|
+
#elif defined (X3D_COLORSPACE_LINEAR_WHEN_PHYSICAL_MATERIAL)
|
|
95046
95140
|
#if defined (X3D_PHYSICAL_MATERIAL) && !defined (X3D_TEXTURE${i}_LINEAR)
|
|
95047
95141
|
textureColor = sRGBToLinear (textureColor);
|
|
95048
95142
|
#elif !defined (X3D_PHYSICAL_MATERIAL) && defined (X3D_TEXTURE${i}_LINEAR)
|
|
95049
|
-
textureColor =
|
|
95143
|
+
textureColor = linearToSRGB (textureColor);
|
|
95144
|
+
#endif
|
|
95145
|
+
#elif defined (X3D_COLORSPACE_LINEAR)
|
|
95146
|
+
#if !defined (X3D_TEXTURE${i}_LINEAR)
|
|
95147
|
+
textureColor = sRGBToLinear (textureColor);
|
|
95148
|
+
#endif
|
|
95050
95149
|
#endif
|
|
95051
95150
|
break;
|
|
95052
95151
|
}
|
|
@@ -95074,10 +95173,16 @@ break;
|
|
|
95074
95173
|
#endif
|
|
95075
95174
|
`) .join ("\n")}
|
|
95076
95175
|
}return textureColor;}vec3 getTextureProjectorColor(){vec3 currentColor=vec3(1.0);vec3 N=gl_FrontFacing?normal:-normal;for(int i=0;i<X3D_NUM_TEXTURE_PROJECTORS;++i){vec4 texCoord=x3d_TextureProjectorMatrix[i]*vec4(vertex,1.0);texCoord.stp/=texCoord.q;texCoord.p=clamp(texCoord.p,x3d_TextureProjectorParams[i].x,x3d_TextureProjectorParams[i].y);if(any(greaterThan(abs(texCoord.stp-0.5),vec3(0.5))))continue;vec3 p=x3d_TextureProjectorLocation[i]-vertex;if(dot(N,p)<0.0)continue;vec4 T=getTextureProjectorTexture(i,texCoord.st);
|
|
95176
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
95177
|
+
if(bool(x3d_TextureProjectorParams[i].z))T=linearToSRGB(T);
|
|
95178
|
+
#elif defined(X3D_COLORSPACE_LINEAR_WHEN_PHYSICAL_MATERIAL)
|
|
95077
95179
|
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
95078
95180
|
if(!bool(x3d_TextureProjectorParams[i].z))T=sRGBToLinear(T);
|
|
95079
95181
|
#else
|
|
95080
|
-
if(bool(x3d_TextureProjectorParams[i].z))T=
|
|
95182
|
+
if(bool(x3d_TextureProjectorParams[i].z))T=linearToSRGB(T);
|
|
95183
|
+
#endif
|
|
95184
|
+
#elif defined(X3D_COLORSPACE_LINEAR)
|
|
95185
|
+
if(!bool(x3d_TextureProjectorParams[i].z))T=sRGBToLinear(T);
|
|
95081
95186
|
#endif
|
|
95082
95187
|
currentColor*=mix(vec3(1.0),T.rgb*x3d_TextureProjectorColor[i],T.a*x3d_TextureProjectorIntensity[i]);}return currentColor;}
|
|
95083
95188
|
#endif
|
|
@@ -95322,141 +95427,18 @@ backColor=getMaterialColor(-normal,vertex,x3d_Material);
|
|
|
95322
95427
|
|
|
95323
95428
|
x_ite_Namespace .add ("Gouraud1.vs", "assets/shaders/webgl1/Gouraud1.vs", Gouraud1_vs_default_);
|
|
95324
95429
|
/* harmony default export */ const Gouraud1_vs = (Gouraud1_vs_default_);
|
|
95325
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
95326
|
-
const
|
|
95430
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/Physical1.fs.js
|
|
95431
|
+
const Physical1_fs_default_ = /* glsl */ `
|
|
95327
95432
|
#extension GL_OES_standard_derivatives:enable
|
|
95328
95433
|
#extension GL_EXT_frag_depth:enable
|
|
95329
95434
|
#extension GL_EXT_shader_texture_lod:enable
|
|
95330
95435
|
precision highp float;precision highp int;precision highp sampler2D;precision highp samplerCube;
|
|
95331
|
-
#pragma X3D include "
|
|
95332
|
-
|
|
95333
|
-
#pragma X3D include "common/Shadow.glsl"
|
|
95334
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95335
|
-
uniform mat4 x3d_ProjectionMatrix;uniform mat4 x3d_ModelViewMatrix;
|
|
95336
|
-
#endif
|
|
95337
|
-
#if defined(X3D_LIGHTING)
|
|
95338
|
-
uniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];
|
|
95339
|
-
#endif
|
|
95340
|
-
uniform x3d_PhysicalMaterialParameters x3d_Material;
|
|
95341
|
-
#pragma X3D include "pbr/BRDF.glsl"
|
|
95342
|
-
#pragma X3D include "pbr/MaterialInfo.glsl"
|
|
95343
|
-
#pragma X3D include "pbr/Punctual.glsl"
|
|
95344
|
-
#pragma X3D include "pbr/IBL.glsl"
|
|
95345
|
-
#pragma X3D include "pbr/Iridescence.glsl"
|
|
95346
|
-
vec4 getMaterialColor(){vec4 baseColor=getBaseColor();
|
|
95347
|
-
#if defined(X3D_TEXTURE_PROJECTION)
|
|
95348
|
-
baseColor.rgb*=getTextureProjectorColor();
|
|
95349
|
-
#endif
|
|
95350
|
-
vec3 v=normalize(-vertex);
|
|
95351
|
-
#if defined(X3D_USE_IBL)||defined(X3D_LIGHTING)||defined(X3D_ANISOTROPY_MATERIAL_EXT)||defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
95352
|
-
NormalInfo normalInfo=getNormalInfo(x3d_Material.normalScale);vec3 n=normalInfo.n;float NdotV=clamp(dot(n,v),0.0,1.0);
|
|
95353
|
-
#endif
|
|
95354
|
-
MaterialInfo materialInfo;materialInfo.baseColor=baseColor.rgb;materialInfo.ior=1.5;materialInfo.f0=vec3(0.04);materialInfo.specularWeight=1.0;
|
|
95355
|
-
#if defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
95356
|
-
materialInfo=getMetallicRoughnessInfo(materialInfo);
|
|
95357
|
-
#endif
|
|
95358
|
-
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95359
|
-
materialInfo=getSheenInfo(materialInfo);
|
|
95360
|
-
#endif
|
|
95361
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
95362
|
-
materialInfo=getClearCoatInfo(materialInfo,normalInfo);
|
|
95363
|
-
#endif
|
|
95364
|
-
#if defined(X3D_SPECULAR_MATERIAL_EXT)
|
|
95365
|
-
materialInfo=getSpecularInfo(materialInfo);
|
|
95366
|
-
#endif
|
|
95367
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95368
|
-
materialInfo=getTransmissionInfo(materialInfo);
|
|
95369
|
-
#endif
|
|
95370
|
-
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
95371
|
-
materialInfo=getVolumeInfo(materialInfo);
|
|
95372
|
-
#endif
|
|
95373
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95374
|
-
materialInfo=getIridescenceInfo(materialInfo);
|
|
95375
|
-
#endif
|
|
95376
|
-
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
95377
|
-
materialInfo=getAnisotropyInfo(materialInfo,normalInfo);
|
|
95378
|
-
#endif
|
|
95379
|
-
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);materialInfo.f90=vec3(1.0);vec3 f_specular=vec3(0.0);vec3 f_diffuse=vec3(0.0);vec3 f_emissive=vec3(0.0);vec3 f_clearcoat=vec3(0.0);vec3 f_sheen=vec3(0.0);vec3 f_transmission=vec3(0.0);float albedoSheenScaling=1.0;
|
|
95380
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)&&(defined(X3D_USE_IBL)||defined(X3D_LIGHTING))
|
|
95381
|
-
vec3 iridescenceFresnel=evalIridescence(1.0,materialInfo.iridescenceIor,NdotV,materialInfo.iridescenceThickness,materialInfo.f0);vec3 iridescenceF0=Schlick_to_F0(iridescenceFresnel,NdotV);if(materialInfo.iridescenceThickness==0.0)materialInfo.iridescenceFactor=0.0;
|
|
95382
|
-
#endif
|
|
95383
|
-
#if defined(X3D_USE_IBL)
|
|
95384
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95385
|
-
f_specular+=getIBLRadianceGGXIridescence(n,v,materialInfo.perceptualRoughness,materialInfo.f0,iridescenceFresnel,materialInfo.iridescenceFactor,materialInfo.specularWeight);f_diffuse+=getIBLRadianceLambertianIridescence(n,v,materialInfo.perceptualRoughness,materialInfo.c_diff,materialInfo.f0,iridescenceF0,materialInfo.iridescenceFactor,materialInfo.specularWeight);
|
|
95386
|
-
#elif defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
95387
|
-
f_specular+=getIBLRadianceAnisotropy(n,v,materialInfo.perceptualRoughness,materialInfo.anisotropyStrength,materialInfo.anisotropicB,materialInfo.f0,materialInfo.specularWeight);f_diffuse+=getIBLRadianceLambertian(n,v,materialInfo.perceptualRoughness,materialInfo.c_diff,materialInfo.f0,materialInfo.specularWeight);
|
|
95388
|
-
#else
|
|
95389
|
-
f_specular+=getIBLRadianceGGX(n,v,materialInfo.perceptualRoughness,materialInfo.f0,materialInfo.specularWeight);f_diffuse+=getIBLRadianceLambertian(n,v,materialInfo.perceptualRoughness,materialInfo.c_diff,materialInfo.f0,materialInfo.specularWeight);
|
|
95390
|
-
#endif
|
|
95391
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
95392
|
-
f_clearcoat+=getIBLRadianceGGX(materialInfo.clearcoatNormal,v,materialInfo.clearcoatRoughness,materialInfo.clearcoatF0,1.0);
|
|
95393
|
-
#endif
|
|
95394
|
-
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95395
|
-
f_sheen+=getIBLRadianceCharlie(n,v,materialInfo.sheenRoughnessFactor,materialInfo.sheenColorFactor);albedoSheenScaling=1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor);
|
|
95396
|
-
#endif
|
|
95397
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95398
|
-
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);
|
|
95399
|
-
#endif
|
|
95400
|
-
#endif
|
|
95401
|
-
vec3 f_diffuse_ibl=f_diffuse;vec3 f_specular_ibl=f_specular;vec3 f_sheen_ibl=f_sheen;vec3 f_clearcoat_ibl=f_clearcoat;f_diffuse=vec3(0.0);f_specular=vec3(0.0);f_sheen=vec3(0.0);f_clearcoat=vec3(0.0);
|
|
95402
|
-
#if defined(X3D_LIGHTING)
|
|
95403
|
-
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);if(NdotL>0.0||NdotV>0.0){vec3 intensity=getLightIntensity(light,l,distanceToLight);
|
|
95404
|
-
#if defined(X3D_SHADOWS)
|
|
95405
|
-
intensity=mix(intensity,light.shadowColor,getShadowIntensity(i,light));
|
|
95406
|
-
#endif
|
|
95407
|
-
vec3 l_diffuse=vec3(0.0);vec3 l_specular=vec3(0.0);
|
|
95408
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95409
|
-
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);
|
|
95410
|
-
#elif defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
95411
|
-
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);
|
|
95412
|
-
#else
|
|
95413
|
-
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);
|
|
95414
|
-
#endif
|
|
95415
|
-
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95416
|
-
f_sheen+=intensity*getPunctualRadianceSheen(materialInfo.sheenColorFactor,materialInfo.sheenRoughnessFactor,NdotL,NdotV,NdotH);float l_albedoSheenScaling=min(1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor),1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotL,materialInfo.sheenRoughnessFactor));l_diffuse*=l_albedoSheenScaling;l_specular*=l_albedoSheenScaling;
|
|
95417
|
-
#endif
|
|
95418
|
-
f_diffuse+=l_diffuse;f_specular+=l_specular;
|
|
95419
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
95420
|
-
f_clearcoat+=intensity*getPunctualRadianceClearCoat(materialInfo.clearcoatNormal,v,l,h,VdotH,materialInfo.clearcoatF0,materialInfo.clearcoatF90,materialInfo.clearcoatRoughness);
|
|
95421
|
-
#endif
|
|
95422
|
-
}
|
|
95423
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95424
|
-
vec3 transmissionRay=getVolumeTransmissionRay(n,v,materialInfo.thickness,materialInfo.ior,x3d_ModelViewMatrix);pointToLight-=transmissionRay;l=normalize(pointToLight);vec3 intensity=getLightIntensity(light,pointToLight,distanceToLight);vec3 transmittedLight=intensity*getPunctualRadianceTransmission(n,v,l,materialInfo.alphaRoughness,materialInfo.f0,materialInfo.f90,materialInfo.c_diff,materialInfo.ior);
|
|
95425
|
-
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
95426
|
-
transmittedLight=applyVolumeAttenuation(transmittedLight,length(transmissionRay),materialInfo.attenuationColor,materialInfo.attenuationDistance);
|
|
95427
|
-
#endif
|
|
95428
|
-
f_transmission+=transmittedLight;
|
|
95429
|
-
#endif
|
|
95430
|
-
}}
|
|
95431
|
-
#endif
|
|
95432
|
-
f_emissive=getEmissiveColor();float clearcoatFactor=0.0;vec3 clearcoatFresnel=vec3(0.0);vec3 diffuse;vec3 specular;vec3 sheen;vec3 clearcoat;
|
|
95433
|
-
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
95434
|
-
float ao=getOcclusionFactor();float occlusionStrength=x3d_Material.occlusionStrength;diffuse=f_diffuse+mix(f_diffuse_ibl,f_diffuse_ibl*ao,occlusionStrength)*albedoSheenScaling;specular=f_specular+mix(f_specular_ibl,f_specular_ibl*ao,occlusionStrength)*albedoSheenScaling;sheen=f_sheen+mix(f_sheen_ibl,f_sheen_ibl*ao,occlusionStrength);clearcoat=f_clearcoat+mix(f_clearcoat_ibl,f_clearcoat_ibl*ao,occlusionStrength);
|
|
95435
|
-
#else
|
|
95436
|
-
diffuse=f_diffuse_ibl*albedoSheenScaling+f_diffuse;specular=f_specular_ibl*albedoSheenScaling+f_specular;sheen=f_sheen_ibl+f_sheen;clearcoat=f_clearcoat_ibl+f_clearcoat;
|
|
95437
|
-
#endif
|
|
95438
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
95439
|
-
clearcoatFactor=materialInfo.clearcoatFactor;clearcoatFresnel=F_Schlick(materialInfo.clearcoatF0,materialInfo.clearcoatF90,clamp(dot(materialInfo.clearcoatNormal,v),0.0,1.0));clearcoat*=clearcoatFactor;
|
|
95440
|
-
#endif
|
|
95441
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95442
|
-
diffuse=mix(diffuse,f_transmission,materialInfo.transmissionFactor);
|
|
95443
|
-
#endif
|
|
95444
|
-
vec3 color=vec3(0.0);
|
|
95445
|
-
#if defined(X3D_UNLIT_MATERIAL_EXT)
|
|
95446
|
-
color=baseColor.rgb;
|
|
95447
|
-
#else
|
|
95448
|
-
color=f_emissive+diffuse+specular;color=sheen+color;color=color*(1.0-clearcoatFactor*clearcoatFresnel)+clearcoat;
|
|
95449
|
-
#endif
|
|
95450
|
-
#if defined(X3D_LINEAR_OUTPUT)
|
|
95451
|
-
return vec4(color,baseColor.a);
|
|
95452
|
-
#else
|
|
95453
|
-
return vec4(toneMap(color),baseColor.a);
|
|
95454
|
-
#endif
|
|
95455
|
-
}void main(){fragment_main();}`
|
|
95436
|
+
#pragma X3D include "pbr/PBR.glsl"
|
|
95437
|
+
`
|
|
95456
95438
|
;
|
|
95457
95439
|
|
|
95458
|
-
x_ite_Namespace .add ("
|
|
95459
|
-
/* harmony default export */ const
|
|
95440
|
+
x_ite_Namespace .add ("Physical1.fs", "assets/shaders/webgl1/Physical1.fs", Physical1_fs_default_);
|
|
95441
|
+
/* harmony default export */ const Physical1_fs = (Physical1_fs_default_);
|
|
95460
95442
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/Phong1.fs.js
|
|
95461
95443
|
|
|
95462
95444
|
|
|
@@ -95751,144 +95733,15 @@ precision highp float;precision highp int;precision highp sampler2D;uniform samp
|
|
|
95751
95733
|
|
|
95752
95734
|
x_ite_Namespace .add ("OITCompose2.fs", "assets/shaders/webgl2/OITCompose2.fs", OITCompose2_fs_default_);
|
|
95753
95735
|
/* harmony default export */ const OITCompose2_fs = (OITCompose2_fs_default_);
|
|
95754
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
95755
|
-
const
|
|
95736
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/Physical2.js
|
|
95737
|
+
const Physical2_default_ = /* glsl */ `#version 300 es
|
|
95756
95738
|
precision highp float;precision highp int;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;
|
|
95757
|
-
#pragma X3D include "
|
|
95758
|
-
|
|
95759
|
-
#pragma X3D include "common/Shadow.glsl"
|
|
95760
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95761
|
-
uniform mat4 x3d_ProjectionMatrix;uniform mat4 x3d_ModelViewMatrix;
|
|
95762
|
-
#endif
|
|
95763
|
-
#if defined(X3D_LIGHTING)
|
|
95764
|
-
uniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];
|
|
95765
|
-
#endif
|
|
95766
|
-
uniform x3d_PhysicalMaterialParameters x3d_Material;
|
|
95767
|
-
#pragma X3D include "pbr/BRDF.glsl"
|
|
95768
|
-
#pragma X3D include "pbr/MaterialInfo.glsl"
|
|
95769
|
-
#pragma X3D include "pbr/Punctual.glsl"
|
|
95770
|
-
#pragma X3D include "pbr/IBL.glsl"
|
|
95771
|
-
#pragma X3D include "pbr/Iridescence.glsl"
|
|
95772
|
-
vec4 getMaterialColor(){vec4 baseColor=getBaseColor();
|
|
95773
|
-
#if defined(X3D_TEXTURE_PROJECTION)
|
|
95774
|
-
baseColor.rgb*=getTextureProjectorColor();
|
|
95775
|
-
#endif
|
|
95776
|
-
vec3 v=normalize(-vertex);
|
|
95777
|
-
#if defined(X3D_USE_IBL)||defined(X3D_LIGHTING)||defined(X3D_ANISOTROPY_MATERIAL_EXT)||defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
95778
|
-
NormalInfo normalInfo=getNormalInfo(x3d_Material.normalScale);vec3 n=normalInfo.n;float NdotV=clamp(dot(n,v),0.0,1.0);
|
|
95779
|
-
#endif
|
|
95780
|
-
MaterialInfo materialInfo;materialInfo.baseColor=baseColor.rgb;materialInfo.ior=1.5;materialInfo.f0=vec3(0.04);materialInfo.specularWeight=1.0;
|
|
95781
|
-
#if defined(X3D_IOR_MATERIAL_EXT)
|
|
95782
|
-
materialInfo=getIorInfo(materialInfo);
|
|
95783
|
-
#endif
|
|
95784
|
-
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
95785
|
-
materialInfo=getSpecularGlossinessInfo(materialInfo);
|
|
95786
|
-
#endif
|
|
95787
|
-
#if defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
95788
|
-
materialInfo=getMetallicRoughnessInfo(materialInfo);
|
|
95789
|
-
#endif
|
|
95790
|
-
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95791
|
-
materialInfo=getSheenInfo(materialInfo);
|
|
95792
|
-
#endif
|
|
95793
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
95794
|
-
materialInfo=getClearCoatInfo(materialInfo,normalInfo);
|
|
95795
|
-
#endif
|
|
95796
|
-
#if defined(X3D_SPECULAR_MATERIAL_EXT)
|
|
95797
|
-
materialInfo=getSpecularInfo(materialInfo);
|
|
95798
|
-
#endif
|
|
95799
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95800
|
-
materialInfo=getTransmissionInfo(materialInfo);
|
|
95801
|
-
#endif
|
|
95802
|
-
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
95803
|
-
materialInfo=getVolumeInfo(materialInfo);
|
|
95804
|
-
#endif
|
|
95805
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95806
|
-
materialInfo=getIridescenceInfo(materialInfo);
|
|
95807
|
-
#endif
|
|
95808
|
-
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
95809
|
-
materialInfo=getAnisotropyInfo(materialInfo,normalInfo);
|
|
95810
|
-
#endif
|
|
95811
|
-
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);materialInfo.f90=vec3(1.0);vec3 f_specular=vec3(0.0);vec3 f_diffuse=vec3(0.0);vec3 f_emissive=vec3(0.0);vec3 f_clearcoat=vec3(0.0);vec3 f_sheen=vec3(0.0);vec3 f_transmission=vec3(0.0);float albedoSheenScaling=1.0;
|
|
95812
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)&&(defined(X3D_USE_IBL)||defined(X3D_LIGHTING))
|
|
95813
|
-
vec3 iridescenceFresnel=evalIridescence(1.0,materialInfo.iridescenceIor,NdotV,materialInfo.iridescenceThickness,materialInfo.f0);vec3 iridescenceF0=Schlick_to_F0(iridescenceFresnel,NdotV);if(materialInfo.iridescenceThickness==0.0)materialInfo.iridescenceFactor=0.0;
|
|
95814
|
-
#endif
|
|
95815
|
-
#if defined(X3D_USE_IBL)
|
|
95816
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95817
|
-
f_specular+=getIBLRadianceGGXIridescence(n,v,materialInfo.perceptualRoughness,materialInfo.f0,iridescenceFresnel,materialInfo.iridescenceFactor,materialInfo.specularWeight);f_diffuse+=getIBLRadianceLambertianIridescence(n,v,materialInfo.perceptualRoughness,materialInfo.c_diff,materialInfo.f0,iridescenceF0,materialInfo.iridescenceFactor,materialInfo.specularWeight);
|
|
95818
|
-
#elif defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
95819
|
-
f_specular+=getIBLRadianceAnisotropy(n,v,materialInfo.perceptualRoughness,materialInfo.anisotropyStrength,materialInfo.anisotropicB,materialInfo.f0,materialInfo.specularWeight);f_diffuse+=getIBLRadianceLambertian(n,v,materialInfo.perceptualRoughness,materialInfo.c_diff,materialInfo.f0,materialInfo.specularWeight);
|
|
95820
|
-
#else
|
|
95821
|
-
f_specular+=getIBLRadianceGGX(n,v,materialInfo.perceptualRoughness,materialInfo.f0,materialInfo.specularWeight);f_diffuse+=getIBLRadianceLambertian(n,v,materialInfo.perceptualRoughness,materialInfo.c_diff,materialInfo.f0,materialInfo.specularWeight);
|
|
95822
|
-
#endif
|
|
95823
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
95824
|
-
f_clearcoat+=getIBLRadianceGGX(materialInfo.clearcoatNormal,v,materialInfo.clearcoatRoughness,materialInfo.clearcoatF0,1.0);
|
|
95825
|
-
#endif
|
|
95826
|
-
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95827
|
-
f_sheen+=getIBLRadianceCharlie(n,v,materialInfo.sheenRoughnessFactor,materialInfo.sheenColorFactor);albedoSheenScaling=1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor);
|
|
95828
|
-
#endif
|
|
95829
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95830
|
-
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);
|
|
95831
|
-
#endif
|
|
95832
|
-
#endif
|
|
95833
|
-
vec3 f_diffuse_ibl=f_diffuse;vec3 f_specular_ibl=f_specular;vec3 f_sheen_ibl=f_sheen;vec3 f_clearcoat_ibl=f_clearcoat;f_diffuse=vec3(0.0);f_specular=vec3(0.0);f_sheen=vec3(0.0);f_clearcoat=vec3(0.0);
|
|
95834
|
-
#if defined(X3D_LIGHTING)
|
|
95835
|
-
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);if(NdotL>0.0||NdotV>0.0){vec3 intensity=getLightIntensity(light,l,distanceToLight);
|
|
95836
|
-
#if defined(X3D_SHADOWS)
|
|
95837
|
-
intensity=mix(intensity,light.shadowColor,getShadowIntensity(i,light));
|
|
95838
|
-
#endif
|
|
95839
|
-
vec3 l_diffuse=vec3(0.0);vec3 l_specular=vec3(0.0);
|
|
95840
|
-
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
95841
|
-
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);
|
|
95842
|
-
#elif defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
95843
|
-
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);
|
|
95844
|
-
#else
|
|
95845
|
-
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);
|
|
95846
|
-
#endif
|
|
95847
|
-
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
95848
|
-
f_sheen+=intensity*getPunctualRadianceSheen(materialInfo.sheenColorFactor,materialInfo.sheenRoughnessFactor,NdotL,NdotV,NdotH);float l_albedoSheenScaling=min(1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor),1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotL,materialInfo.sheenRoughnessFactor));l_diffuse*=l_albedoSheenScaling;l_specular*=l_albedoSheenScaling;
|
|
95849
|
-
#endif
|
|
95850
|
-
f_diffuse+=l_diffuse;f_specular+=l_specular;
|
|
95851
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
95852
|
-
f_clearcoat+=intensity*getPunctualRadianceClearCoat(materialInfo.clearcoatNormal,v,l,h,VdotH,materialInfo.clearcoatF0,materialInfo.clearcoatF90,materialInfo.clearcoatRoughness);
|
|
95853
|
-
#endif
|
|
95854
|
-
}
|
|
95855
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95856
|
-
vec3 transmissionRay=getVolumeTransmissionRay(n,v,materialInfo.thickness,materialInfo.ior,x3d_ModelViewMatrix);pointToLight-=transmissionRay;l=normalize(pointToLight);vec3 intensity=getLightIntensity(light,pointToLight,distanceToLight);vec3 transmittedLight=intensity*getPunctualRadianceTransmission(n,v,l,materialInfo.alphaRoughness,materialInfo.f0,materialInfo.f90,materialInfo.c_diff,materialInfo.ior);
|
|
95857
|
-
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
95858
|
-
transmittedLight=applyVolumeAttenuation(transmittedLight,length(transmissionRay),materialInfo.attenuationColor,materialInfo.attenuationDistance);
|
|
95859
|
-
#endif
|
|
95860
|
-
f_transmission+=transmittedLight;
|
|
95861
|
-
#endif
|
|
95862
|
-
}}
|
|
95863
|
-
#endif
|
|
95864
|
-
f_emissive=getEmissiveColor();float clearcoatFactor=0.0;vec3 clearcoatFresnel=vec3(0.0);vec3 diffuse;vec3 specular;vec3 sheen;vec3 clearcoat;
|
|
95865
|
-
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
95866
|
-
float ao=getOcclusionFactor();float occlusionStrength=x3d_Material.occlusionStrength;diffuse=f_diffuse+mix(f_diffuse_ibl,f_diffuse_ibl*ao,occlusionStrength)*albedoSheenScaling;specular=f_specular+mix(f_specular_ibl,f_specular_ibl*ao,occlusionStrength)*albedoSheenScaling;sheen=f_sheen+mix(f_sheen_ibl,f_sheen_ibl*ao,occlusionStrength);clearcoat=f_clearcoat+mix(f_clearcoat_ibl,f_clearcoat_ibl*ao,occlusionStrength);
|
|
95867
|
-
#else
|
|
95868
|
-
diffuse=f_diffuse_ibl*albedoSheenScaling+f_diffuse;specular=f_specular_ibl*albedoSheenScaling+f_specular;sheen=f_sheen_ibl+f_sheen;clearcoat=f_clearcoat_ibl+f_clearcoat;
|
|
95869
|
-
#endif
|
|
95870
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
95871
|
-
clearcoatFactor=materialInfo.clearcoatFactor;clearcoatFresnel=F_Schlick(materialInfo.clearcoatF0,materialInfo.clearcoatF90,clamp(dot(materialInfo.clearcoatNormal,v),0.0,1.0));clearcoat*=clearcoatFactor;
|
|
95872
|
-
#endif
|
|
95873
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
95874
|
-
diffuse=mix(diffuse,f_transmission,materialInfo.transmissionFactor);
|
|
95875
|
-
#endif
|
|
95876
|
-
vec3 color=vec3(0.0);
|
|
95877
|
-
#if defined(X3D_UNLIT_MATERIAL_EXT)
|
|
95878
|
-
color=baseColor.rgb;
|
|
95879
|
-
#else
|
|
95880
|
-
color=f_emissive+diffuse+specular;color=sheen+color;color=color*(1.0-clearcoatFactor*clearcoatFresnel)+clearcoat;
|
|
95881
|
-
#endif
|
|
95882
|
-
#if defined(X3D_LINEAR_OUTPUT)
|
|
95883
|
-
return vec4(color,baseColor.a);
|
|
95884
|
-
#else
|
|
95885
|
-
return vec4(toneMap(color),baseColor.a);
|
|
95886
|
-
#endif
|
|
95887
|
-
}void main(){fragment_main();}`
|
|
95739
|
+
#pragma X3D include "pbr/PBR.glsl"
|
|
95740
|
+
`
|
|
95888
95741
|
;
|
|
95889
95742
|
|
|
95890
|
-
x_ite_Namespace .add ("
|
|
95891
|
-
/* harmony default export */ const
|
|
95743
|
+
x_ite_Namespace .add ("Physical2", "assets/shaders/webgl2/Physical2", Physical2_default_);
|
|
95744
|
+
/* harmony default export */ const Physical2 = (Physical2_default_);
|
|
95892
95745
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/Phong2.fs.js
|
|
95893
95746
|
|
|
95894
95747
|
|
|
@@ -96085,13 +95938,23 @@ vec3 textureColor=textureCube(x3d_EnvironmentLightSource.diffuseTexture,texCoord
|
|
|
96085
95938
|
#else
|
|
96086
95939
|
vec3 textureColor=texture(x3d_EnvironmentLightSource.diffuseTexture,texCoord).rgb;
|
|
96087
95940
|
#endif
|
|
96088
|
-
if
|
|
95941
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
95942
|
+
if(x3d_EnvironmentLightSource.diffuseTextureLinear)textureColor=linearToSRGB(textureColor);
|
|
95943
|
+
#else
|
|
95944
|
+
if(!x3d_EnvironmentLightSource.diffuseTextureLinear)textureColor=sRGBToLinear(textureColor);
|
|
95945
|
+
#endif
|
|
95946
|
+
return textureColor*x3d_EnvironmentLightSource.color*x3d_EnvironmentLightSource.intensity;}vec3 getSpecularLight(const in vec3 reflection,const in float lod){vec3 texCoord=x3d_EnvironmentLightSource.rotation*reflection*vec3(-1.0,1.0,1.0);
|
|
96089
95947
|
#if __VERSION__==100
|
|
96090
95948
|
vec3 textureColor=textureCubeLodEXT(x3d_EnvironmentLightSource.specularTexture,texCoord,lod).rgb;
|
|
96091
95949
|
#else
|
|
96092
95950
|
vec3 textureColor=textureLod(x3d_EnvironmentLightSource.specularTexture,texCoord,lod).rgb;
|
|
96093
95951
|
#endif
|
|
96094
|
-
if(
|
|
95952
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
95953
|
+
if(x3d_EnvironmentLightSource.specularTextureLinear)textureColor=linearToSRGB(textureColor);
|
|
95954
|
+
#else
|
|
95955
|
+
if(!x3d_EnvironmentLightSource.specularTextureLinear)textureColor=sRGBToLinear(textureColor);
|
|
95956
|
+
#endif
|
|
95957
|
+
return textureColor*x3d_EnvironmentLightSource.color*x3d_EnvironmentLightSource.intensity;}
|
|
96095
95958
|
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96096
95959
|
vec3 getSheenLight(const in vec3 reflection,const in float lod){return vec3(0.5)*(lod/float(x3d_EnvironmentLightSource.specularTextureLevels))*x3d_EnvironmentLightSource.intensity;}
|
|
96097
95960
|
#endif
|
|
@@ -96130,7 +95993,12 @@ float framebufferSize=max(float(x3d_TransmissionFramebufferSizeEXT.x),float(x3d_
|
|
|
96130
95993
|
#else
|
|
96131
95994
|
int framebufferSize=max(x3d_TransmissionFramebufferSizeEXT.x,x3d_TransmissionFramebufferSizeEXT.y);float framebufferLod=log2(float(framebufferSize))*applyIorToRoughness(roughness,ior);vec3 transmittedLight=textureLod(x3d_TransmissionFramebufferSamplerEXT,fragCoord,framebufferLod).rgb;
|
|
96132
95995
|
#endif
|
|
96133
|
-
|
|
95996
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
95997
|
+
return transmittedLight;
|
|
95998
|
+
#else
|
|
95999
|
+
return sRGBToLinear(transmittedLight);
|
|
96000
|
+
#endif
|
|
96001
|
+
}vec3 getIBLVolumeRefraction(const in vec3 n,const in vec3 v,const in float perceptualRoughness,const in vec3 baseColor,const in vec3 f0,const in vec3 f90,const in vec3 position,const in mat4 modelMatrix,const in mat4 projMatrix,const in float ior,const in float thickness,const in vec3 attenuationColor,const in float attenuationDistance,const in float dispersion){
|
|
96134
96002
|
#if defined(X3D_DISPERSION_MATERIAL_EXT)
|
|
96135
96003
|
float halfSpread=(ior-1.0)*0.025*dispersion;vec3 iors=vec3(ior-halfSpread,ior,ior+halfSpread);vec3 transmittedLight;float transmissionRayLength;for(int i=0;i<3;i++){vec3 transmissionRay=getVolumeTransmissionRay(n,v,thickness,iors[i],modelMatrix);transmissionRayLength=length(transmissionRay);vec3 refractedRayExit=position+transmissionRay;vec4 ndcPos=projMatrix*vec4(refractedRayExit,1.0);vec2 refractionCoords=ndcPos.xy/ndcPos.w;refractionCoords+=1.0;refractionCoords/=2.0;transmittedLight[i]=getTransmissionSample(refractionCoords,perceptualRoughness,iors[i])[i];}
|
|
96136
96004
|
#else
|
|
@@ -96178,29 +96046,6 @@ const mat3 XYZ_TO_REC709=mat3(3.2404542,-0.9692660,0.0556434,-1.5371385,1.876010
|
|
|
96178
96046
|
|
|
96179
96047
|
x_ite_Namespace .add ("Iridescence2.glsl", "assets/shaders/webgl2/pbr/Iridescence2.glsl", Iridescence2_glsl_default_);
|
|
96180
96048
|
/* harmony default export */ const Iridescence2_glsl = (Iridescence2_glsl_default_);
|
|
96181
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/Punctual2.glsl.js
|
|
96182
|
-
const Punctual2_glsl_default_ = /* glsl */ `
|
|
96183
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96184
|
-
float applyIorToRoughness(const in float roughness,const in float ior){return roughness*clamp(ior*2.0-2.0,0.0,1.0);}
|
|
96185
|
-
#endif
|
|
96186
|
-
#if defined(X3D_LIGHTING)
|
|
96187
|
-
#pragma X3D include "../common/Lighting.glsl"
|
|
96188
|
-
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=getAttenuation(light.attenuation,distanceToLight);}if(light.type==x3d_SpotLight){spotFactor=getSpotFactor(pointToLight,light.direction,light.cutOffAngle,light.beamWidth);}return attenuationFactor*spotFactor*light.intensity*light.color;}
|
|
96189
|
-
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96190
|
-
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);}
|
|
96191
|
-
#endif
|
|
96192
|
-
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96193
|
-
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(f0,f90,clearcoatRoughness*clearcoatRoughness,1.0,VdotH,NdotL,NdotV,NdotH);}
|
|
96194
|
-
#endif
|
|
96195
|
-
#endif
|
|
96196
|
-
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96197
|
-
vec3 getPunctualRadianceTransmission(const in vec3 n,const in vec3 v,const in vec3 l,const in float alphaRoughness,const in vec3 f0,const in vec3 f90,const in vec3 baseColor,const in float ior){float transmissionRoughness=applyIorToRoughness(alphaRoughness,ior);vec3 l_mirror=normalize(l+2.0*n*dot(-l,n));vec3 h=normalize(l_mirror+v);float D=D_GGX(clamp(dot(n,h),0.0,1.0),transmissionRoughness);vec3 F=F_Schlick(f0,f90,clamp(dot(v,h),0.0,1.0));float Vis=V_GGX(clamp(dot(n,l_mirror),0.0,1.0),clamp(dot(n,v),0.0,1.0),transmissionRoughness);return(1.0-F)*baseColor*D*Vis;}vec3 applyVolumeAttenuation(const in vec3 radiance,const in float transmissionDistance,const in vec3 attenuationColor,const in float attenuationDistance){if(attenuationDistance==0.0){return radiance;}else{vec3 attenuationCoefficient=-log(attenuationColor)/attenuationDistance;vec3 transmittance=exp(-attenuationCoefficient*transmissionDistance);return transmittance*radiance;}}vec3 getVolumeTransmissionRay(const in vec3 n,const in vec3 v,const in float thickness,const in float ior,const in mat4 modelMatrix){vec3 refractionVector=refract(-v,normalize(n),1.0/ior);vec3 modelScale;modelScale.x=length(vec3(modelMatrix[0].xyz));modelScale.y=length(vec3(modelMatrix[1].xyz));modelScale.z=length(vec3(modelMatrix[2].xyz));return normalize(refractionVector)*thickness*modelScale;}
|
|
96198
|
-
#endif
|
|
96199
|
-
`
|
|
96200
|
-
;
|
|
96201
|
-
|
|
96202
|
-
x_ite_Namespace .add ("Punctual2.glsl", "assets/shaders/webgl2/pbr/Punctual2.glsl", Punctual2_glsl_default_);
|
|
96203
|
-
/* harmony default export */ const Punctual2_glsl = (Punctual2_glsl_default_);
|
|
96204
96049
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/MaterialInfo2.glsl.js
|
|
96205
96050
|
|
|
96206
96051
|
|
|
@@ -96284,12 +96129,13 @@ info.sheenColorFactor*=getSheenColorTextureEXT();
|
|
|
96284
96129
|
#if defined(X3D_SHEEN_ROUGHNESS_TEXTURE_EXT)
|
|
96285
96130
|
info.sheenRoughnessFactor*=getSheenRoughnessTextureEXT();
|
|
96286
96131
|
#endif
|
|
96287
|
-
return info;}uniform sampler2D x3d_SheenELUTTextureEXT;
|
|
96132
|
+
return info;}uniform sampler2D x3d_SheenELUTTextureEXT;float albedoSheenScalingLUT(const in float NdotV,const in float sheenRoughnessFactor){
|
|
96288
96133
|
#if __VERSION__==100
|
|
96289
|
-
|
|
96134
|
+
return texture2D(x3d_SheenELUTTextureEXT,vec2(NdotV,sheenRoughnessFactor)).r;
|
|
96290
96135
|
#else
|
|
96291
|
-
|
|
96136
|
+
return texture(x3d_SheenELUTTextureEXT,vec2(NdotV,sheenRoughnessFactor)).r;
|
|
96292
96137
|
#endif
|
|
96138
|
+
}
|
|
96293
96139
|
#endif
|
|
96294
96140
|
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96295
96141
|
${MaterialTextures .texture ("x3d_ClearcoatTextureEXT",
|
|
@@ -96330,7 +96176,7 @@ vec3 dielectricSpecularF0=min(info.f0*x3d_SpecularColorEXT*specularTexture.rgb,v
|
|
|
96330
96176
|
#endif
|
|
96331
96177
|
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96332
96178
|
${MaterialTextures .texture ("x3d_ThicknessTextureEXT", "g")}
|
|
96333
|
-
uniform float x3d_ThicknessEXT;uniform float x3d_AttenuationDistanceEXT;uniform vec3
|
|
96179
|
+
uniform float x3d_ThicknessEXT;uniform float x3d_AttenuationDistanceEXT;uniform vec3 x3d_AttenuationColorEXT;MaterialInfo getVolumeInfo(in MaterialInfo info){info.thickness=x3d_ThicknessEXT;info.attenuationDistance=x3d_AttenuationDistanceEXT;info.attenuationColor=x3d_AttenuationColorEXT;
|
|
96334
96180
|
#if defined(X3D_THICKNESS_TEXTURE_EXT)
|
|
96335
96181
|
info.thickness*=getThicknessTextureEXT();
|
|
96336
96182
|
#endif
|
|
@@ -96379,9 +96225,166 @@ vec2 directionRotation=x3d_AnisotropyEXT.xy;mat2 rotationMatrix=mat2(directionRo
|
|
|
96379
96225
|
|
|
96380
96226
|
x_ite_Namespace .add ("MaterialInfo2.glsl", "assets/shaders/webgl2/pbr/MaterialInfo2.glsl", MaterialInfo2_glsl_default_);
|
|
96381
96227
|
/* harmony default export */ const MaterialInfo2_glsl = (MaterialInfo2_glsl_default_);
|
|
96228
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/PBR2.glsl.js
|
|
96229
|
+
const PBR2_glsl_default_ = /* glsl */ `
|
|
96230
|
+
#pragma X3D include "../common/Fragment.glsl"
|
|
96231
|
+
#pragma X3D include "../common/Normal.glsl"
|
|
96232
|
+
#pragma X3D include "../common/Shadow.glsl"
|
|
96233
|
+
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96234
|
+
uniform mat4 x3d_ProjectionMatrix;uniform mat4 x3d_ModelViewMatrix;
|
|
96235
|
+
#endif
|
|
96236
|
+
#if defined(X3D_LIGHTING)
|
|
96237
|
+
uniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];
|
|
96238
|
+
#endif
|
|
96239
|
+
uniform x3d_PhysicalMaterialParameters x3d_Material;
|
|
96240
|
+
#pragma X3D include "pbr/BRDF.glsl"
|
|
96241
|
+
#pragma X3D include "pbr/MaterialInfo.glsl"
|
|
96242
|
+
#pragma X3D include "pbr/Punctual.glsl"
|
|
96243
|
+
#pragma X3D include "pbr/IBL.glsl"
|
|
96244
|
+
#pragma X3D include "pbr/Iridescence.glsl"
|
|
96245
|
+
vec4 getMaterialColor(){vec4 baseColor=getBaseColor();
|
|
96246
|
+
#if defined(X3D_TEXTURE_PROJECTION)
|
|
96247
|
+
baseColor.rgb*=getTextureProjectorColor();
|
|
96248
|
+
#endif
|
|
96249
|
+
#if!defined(X3D_UNLIT_MATERIAL_EXT)
|
|
96250
|
+
vec3 v=normalize(-vertex);
|
|
96251
|
+
#if defined(X3D_USE_IBL)||defined(X3D_LIGHTING)||defined(X3D_ANISOTROPY_MATERIAL_EXT)||defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96252
|
+
NormalInfo normalInfo=getNormalInfo(x3d_Material.normalScale);vec3 n=normalInfo.n;float NdotV=clamp(dot(n,v),0.0,1.0);
|
|
96253
|
+
#endif
|
|
96254
|
+
MaterialInfo materialInfo;materialInfo.baseColor=baseColor.rgb;materialInfo.ior=1.5;materialInfo.f0=vec3(0.04);materialInfo.specularWeight=1.0;
|
|
96255
|
+
#if defined(X3D_IOR_MATERIAL_EXT)
|
|
96256
|
+
materialInfo=getIorInfo(materialInfo);
|
|
96257
|
+
#endif
|
|
96258
|
+
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
96259
|
+
materialInfo=getSpecularGlossinessInfo(materialInfo);
|
|
96260
|
+
#endif
|
|
96261
|
+
#if defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
96262
|
+
materialInfo=getMetallicRoughnessInfo(materialInfo);
|
|
96263
|
+
#endif
|
|
96264
|
+
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96265
|
+
materialInfo=getSheenInfo(materialInfo);
|
|
96266
|
+
#endif
|
|
96267
|
+
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96268
|
+
materialInfo=getClearCoatInfo(materialInfo,normalInfo);
|
|
96269
|
+
#endif
|
|
96270
|
+
#if defined(X3D_SPECULAR_MATERIAL_EXT)
|
|
96271
|
+
materialInfo=getSpecularInfo(materialInfo);
|
|
96272
|
+
#endif
|
|
96273
|
+
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96274
|
+
materialInfo=getTransmissionInfo(materialInfo);
|
|
96275
|
+
#endif
|
|
96276
|
+
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96277
|
+
materialInfo=getVolumeInfo(materialInfo);
|
|
96278
|
+
#endif
|
|
96279
|
+
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96280
|
+
materialInfo=getIridescenceInfo(materialInfo);
|
|
96281
|
+
#endif
|
|
96282
|
+
#if defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96283
|
+
materialInfo=getAnisotropyInfo(materialInfo,normalInfo);
|
|
96284
|
+
#endif
|
|
96285
|
+
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);materialInfo.f90=vec3(1.0);vec3 f_specular=vec3(0.0);vec3 f_diffuse=vec3(0.0);vec3 f_emissive=vec3(0.0);vec3 f_clearcoat=vec3(0.0);vec3 f_sheen=vec3(0.0);vec3 f_transmission=vec3(0.0);float albedoSheenScaling=1.0;
|
|
96286
|
+
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)&&(defined(X3D_USE_IBL)||defined(X3D_LIGHTING))
|
|
96287
|
+
vec3 iridescenceFresnel=evalIridescence(1.0,materialInfo.iridescenceIor,NdotV,materialInfo.iridescenceThickness,materialInfo.f0);vec3 iridescenceF0=Schlick_to_F0(iridescenceFresnel,NdotV);if(materialInfo.iridescenceThickness==0.0)materialInfo.iridescenceFactor=0.0;
|
|
96288
|
+
#endif
|
|
96289
|
+
#if defined(X3D_USE_IBL)
|
|
96290
|
+
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96291
|
+
f_specular+=getIBLRadianceGGXIridescence(n,v,materialInfo.perceptualRoughness,materialInfo.f0,iridescenceFresnel,materialInfo.iridescenceFactor,materialInfo.specularWeight);f_diffuse+=getIBLRadianceLambertianIridescence(n,v,materialInfo.perceptualRoughness,materialInfo.c_diff,materialInfo.f0,iridescenceF0,materialInfo.iridescenceFactor,materialInfo.specularWeight);
|
|
96292
|
+
#elif defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96293
|
+
f_specular+=getIBLRadianceAnisotropy(n,v,materialInfo.perceptualRoughness,materialInfo.anisotropyStrength,materialInfo.anisotropicB,materialInfo.f0,materialInfo.specularWeight);f_diffuse+=getIBLRadianceLambertian(n,v,materialInfo.perceptualRoughness,materialInfo.c_diff,materialInfo.f0,materialInfo.specularWeight);
|
|
96294
|
+
#else
|
|
96295
|
+
f_specular+=getIBLRadianceGGX(n,v,materialInfo.perceptualRoughness,materialInfo.f0,materialInfo.specularWeight);f_diffuse+=getIBLRadianceLambertian(n,v,materialInfo.perceptualRoughness,materialInfo.c_diff,materialInfo.f0,materialInfo.specularWeight);
|
|
96296
|
+
#endif
|
|
96297
|
+
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96298
|
+
f_clearcoat+=getIBLRadianceGGX(materialInfo.clearcoatNormal,v,materialInfo.clearcoatRoughness,materialInfo.clearcoatF0,1.0);
|
|
96299
|
+
#endif
|
|
96300
|
+
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96301
|
+
f_sheen+=getIBLRadianceCharlie(n,v,materialInfo.sheenRoughnessFactor,materialInfo.sheenColorFactor);albedoSheenScaling=1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor);
|
|
96302
|
+
#endif
|
|
96303
|
+
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96304
|
+
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);
|
|
96305
|
+
#endif
|
|
96306
|
+
#endif
|
|
96307
|
+
vec3 f_diffuse_ibl=f_diffuse;vec3 f_specular_ibl=f_specular;vec3 f_sheen_ibl=f_sheen;vec3 f_clearcoat_ibl=f_clearcoat;f_diffuse=vec3(0.0);f_specular=vec3(0.0);f_sheen=vec3(0.0);f_clearcoat=vec3(0.0);
|
|
96308
|
+
#if defined(X3D_LIGHTING)
|
|
96309
|
+
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);if(NdotL>0.0||NdotV>0.0){vec3 intensity=getLightIntensity(light,l,distanceToLight);
|
|
96310
|
+
#if defined(X3D_SHADOWS)
|
|
96311
|
+
intensity=mix(intensity,light.shadowColor,getShadowIntensity(i,light));
|
|
96312
|
+
#endif
|
|
96313
|
+
vec3 l_diffuse=vec3(0.0);vec3 l_specular=vec3(0.0);
|
|
96314
|
+
#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
|
|
96315
|
+
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);
|
|
96316
|
+
#elif defined(X3D_ANISOTROPY_MATERIAL_EXT)
|
|
96317
|
+
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);
|
|
96318
|
+
#else
|
|
96319
|
+
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);
|
|
96320
|
+
#endif
|
|
96321
|
+
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96322
|
+
f_sheen+=intensity*getPunctualRadianceSheen(materialInfo.sheenColorFactor,materialInfo.sheenRoughnessFactor,NdotL,NdotV,NdotH);float l_albedoSheenScaling=min(1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor),1.0-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotL,materialInfo.sheenRoughnessFactor));l_diffuse*=l_albedoSheenScaling;l_specular*=l_albedoSheenScaling;
|
|
96323
|
+
#endif
|
|
96324
|
+
f_diffuse+=l_diffuse;f_specular+=l_specular;
|
|
96325
|
+
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96326
|
+
f_clearcoat+=intensity*getPunctualRadianceClearCoat(materialInfo.clearcoatNormal,v,l,h,VdotH,materialInfo.clearcoatF0,materialInfo.clearcoatF90,materialInfo.clearcoatRoughness);
|
|
96327
|
+
#endif
|
|
96328
|
+
}
|
|
96329
|
+
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96330
|
+
vec3 transmissionRay=getVolumeTransmissionRay(n,v,materialInfo.thickness,materialInfo.ior,x3d_ModelViewMatrix);pointToLight-=transmissionRay;l=normalize(pointToLight);vec3 intensity=getLightIntensity(light,pointToLight,distanceToLight);vec3 transmittedLight=intensity*getPunctualRadianceTransmission(n,v,l,materialInfo.alphaRoughness,materialInfo.f0,materialInfo.f90,materialInfo.c_diff,materialInfo.ior);
|
|
96331
|
+
#if defined(X3D_VOLUME_MATERIAL_EXT)
|
|
96332
|
+
transmittedLight=applyVolumeAttenuation(transmittedLight,length(transmissionRay),materialInfo.attenuationColor,materialInfo.attenuationDistance);
|
|
96333
|
+
#endif
|
|
96334
|
+
f_transmission+=transmittedLight;
|
|
96335
|
+
#endif
|
|
96336
|
+
}}
|
|
96337
|
+
#endif
|
|
96338
|
+
f_emissive=getEmissiveColor();float clearcoatFactor=0.0;vec3 clearcoatFresnel=vec3(0.0);vec3 diffuse;vec3 specular;vec3 sheen;vec3 clearcoat;
|
|
96339
|
+
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
96340
|
+
float ao=getOcclusionFactor();float occlusionStrength=x3d_Material.occlusionStrength;diffuse=f_diffuse+mix(f_diffuse_ibl,f_diffuse_ibl*ao,occlusionStrength)*albedoSheenScaling;specular=f_specular+mix(f_specular_ibl,f_specular_ibl*ao,occlusionStrength)*albedoSheenScaling;sheen=f_sheen+mix(f_sheen_ibl,f_sheen_ibl*ao,occlusionStrength);clearcoat=f_clearcoat+mix(f_clearcoat_ibl,f_clearcoat_ibl*ao,occlusionStrength);
|
|
96341
|
+
#else
|
|
96342
|
+
diffuse=f_diffuse_ibl*albedoSheenScaling+f_diffuse;specular=f_specular_ibl*albedoSheenScaling+f_specular;sheen=f_sheen_ibl+f_sheen;clearcoat=f_clearcoat_ibl+f_clearcoat;
|
|
96343
|
+
#endif
|
|
96344
|
+
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96345
|
+
clearcoatFactor=materialInfo.clearcoatFactor;clearcoatFresnel=F_Schlick(materialInfo.clearcoatF0,materialInfo.clearcoatF90,clamp(dot(materialInfo.clearcoatNormal,v),0.0,1.0));clearcoat*=clearcoatFactor;
|
|
96346
|
+
#endif
|
|
96347
|
+
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96348
|
+
diffuse=mix(diffuse,f_transmission,materialInfo.transmissionFactor);
|
|
96349
|
+
#endif
|
|
96350
|
+
#endif
|
|
96351
|
+
vec3 color=vec3(0.0);
|
|
96352
|
+
#if defined(X3D_UNLIT_MATERIAL_EXT)
|
|
96353
|
+
color=baseColor.rgb;
|
|
96354
|
+
#else
|
|
96355
|
+
color=f_emissive+diffuse+specular;color=sheen+color;color=color*(1.0-clearcoatFactor*clearcoatFresnel)+clearcoat;
|
|
96356
|
+
#endif
|
|
96357
|
+
return vec4(color,baseColor.a);}void main(){fragment_main();}`
|
|
96358
|
+
;
|
|
96359
|
+
|
|
96360
|
+
x_ite_Namespace .add ("PBR2.glsl", "assets/shaders/webgl2/pbr/PBR2.glsl", PBR2_glsl_default_);
|
|
96361
|
+
/* harmony default export */ const PBR2_glsl = (PBR2_glsl_default_);
|
|
96362
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/Punctual2.glsl.js
|
|
96363
|
+
const Punctual2_glsl_default_ = /* glsl */ `
|
|
96364
|
+
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96365
|
+
float applyIorToRoughness(const in float roughness,const in float ior){return roughness*clamp(ior*2.0-2.0,0.0,1.0);}
|
|
96366
|
+
#endif
|
|
96367
|
+
#if defined(X3D_LIGHTING)
|
|
96368
|
+
#pragma X3D include "../common/Lighting.glsl"
|
|
96369
|
+
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=getAttenuation(light.attenuation,distanceToLight);}if(light.type==x3d_SpotLight){spotFactor=getSpotFactor(pointToLight,light.direction,light.cutOffAngle,light.beamWidth);}return attenuationFactor*spotFactor*light.intensity*light.color;}
|
|
96370
|
+
#if defined(X3D_SHEEN_MATERIAL_EXT)
|
|
96371
|
+
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);}
|
|
96372
|
+
#endif
|
|
96373
|
+
#if defined(X3D_CLEARCOAT_MATERIAL_EXT)
|
|
96374
|
+
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(f0,f90,clearcoatRoughness*clearcoatRoughness,1.0,VdotH,NdotL,NdotV,NdotH);}
|
|
96375
|
+
#endif
|
|
96376
|
+
#endif
|
|
96377
|
+
#if defined(X3D_TRANSMISSION_MATERIAL_EXT)
|
|
96378
|
+
vec3 getPunctualRadianceTransmission(const in vec3 n,const in vec3 v,const in vec3 l,const in float alphaRoughness,const in vec3 f0,const in vec3 f90,const in vec3 baseColor,const in float ior){float transmissionRoughness=applyIorToRoughness(alphaRoughness,ior);vec3 l_mirror=normalize(l+2.0*n*dot(-l,n));vec3 h=normalize(l_mirror+v);float D=D_GGX(clamp(dot(n,h),0.0,1.0),transmissionRoughness);vec3 F=F_Schlick(f0,f90,clamp(dot(v,h),0.0,1.0));float Vis=V_GGX(clamp(dot(n,l_mirror),0.0,1.0),clamp(dot(n,v),0.0,1.0),transmissionRoughness);return(1.0-F)*baseColor*D*Vis;}vec3 applyVolumeAttenuation(const in vec3 radiance,const in float transmissionDistance,const in vec3 attenuationColor,const in float attenuationDistance){if(attenuationDistance==0.0){return radiance;}else{vec3 attenuationCoefficient=log(attenuationColor)/attenuationDistance;vec3 transmittance=exp(attenuationCoefficient*transmissionDistance);return transmittance*radiance;}}vec3 getVolumeTransmissionRay(const in vec3 n,const in vec3 v,const in float thickness,const in float ior,const in mat4 modelMatrix){vec3 refractionVector=refract(-v,normalize(n),1.0/ior);vec3 modelScale;modelScale.x=length(vec3(modelMatrix[0].xyz));modelScale.y=length(vec3(modelMatrix[1].xyz));modelScale.z=length(vec3(modelMatrix[2].xyz));return normalize(refractionVector)*thickness*modelScale;}
|
|
96379
|
+
#endif
|
|
96380
|
+
`
|
|
96381
|
+
;
|
|
96382
|
+
|
|
96383
|
+
x_ite_Namespace .add ("Punctual2.glsl", "assets/shaders/webgl2/pbr/Punctual2.glsl", Punctual2_glsl_default_);
|
|
96384
|
+
/* harmony default export */ const Punctual2_glsl = (Punctual2_glsl_default_);
|
|
96382
96385
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/ToneMapping2.glsl.js
|
|
96383
96386
|
const ToneMapping2_glsl_default_ = /* glsl */ `
|
|
96384
|
-
const float GAMMA=2.2;const float INV_GAMMA=1.0/GAMMA;vec3
|
|
96387
|
+
const float GAMMA=2.2;const float INV_GAMMA=1.0/GAMMA;vec3 linearToSRGB(const in vec3 color){return pow(color,vec3(INV_GAMMA));}vec4 linearToSRGB(const in vec4 color){return vec4(linearToSRGB(color.rgb),color.a);}vec3 sRGBToLinear(const in vec3 color){return pow(color,vec3(GAMMA));}vec4 sRGBToLinear(const in vec4 color){return vec4(sRGBToLinear(color.rgb),color.a);}
|
|
96385
96388
|
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
96386
96389
|
vec3 toneMapACES_Narkowicz(const in vec3 color){const float A=2.51;const float B=0.03;const float C=2.43;const float D=0.59;const float E=0.14;return clamp((color*(A*color+B))/(color*(C*color+D)+E),0.0,1.0);}
|
|
96387
96390
|
#endif
|
|
@@ -96404,7 +96407,18 @@ color/=0.6;color=toneMapACES_Hill(color);
|
|
|
96404
96407
|
#if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
|
|
96405
96408
|
color=toneMap_KhronosPbrNeutral(color);
|
|
96406
96409
|
#endif
|
|
96407
|
-
|
|
96410
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
96411
|
+
return color;
|
|
96412
|
+
#elif defined(X3D_COLORSPACE_LINEAR_WHEN_PHYSICAL_MATERIAL)
|
|
96413
|
+
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
96414
|
+
return linearToSRGB(color);
|
|
96415
|
+
#else
|
|
96416
|
+
return color;
|
|
96417
|
+
#endif
|
|
96418
|
+
#elif defined(X3D_COLORSPACE_LINEAR)
|
|
96419
|
+
return linearToSRGB(color);
|
|
96420
|
+
#endif
|
|
96421
|
+
}`
|
|
96408
96422
|
;
|
|
96409
96423
|
|
|
96410
96424
|
x_ite_Namespace .add ("ToneMapping2.glsl", "assets/shaders/webgl2/pbr/ToneMapping2.glsl", ToneMapping2_glsl_default_);
|
|
@@ -96462,7 +96476,6 @@ x_ite_Namespace .add ("ToneMapping2.glsl", "assets/shaders/webgl2/pbr/ToneMappin
|
|
|
96462
96476
|
|
|
96463
96477
|
|
|
96464
96478
|
|
|
96465
|
-
|
|
96466
96479
|
/* WebGL 2 */
|
|
96467
96480
|
|
|
96468
96481
|
|
|
@@ -96520,6 +96533,7 @@ x_ite_Namespace .add ("ToneMapping2.glsl", "assets/shaders/webgl2/pbr/ToneMappin
|
|
|
96520
96533
|
|
|
96521
96534
|
|
|
96522
96535
|
|
|
96536
|
+
|
|
96523
96537
|
const ShaderRegistry = {
|
|
96524
96538
|
includes: {
|
|
96525
96539
|
1: {
|
|
@@ -96533,7 +96547,7 @@ const ShaderRegistry = {
|
|
|
96533
96547
|
Perlin: Perlin2_glsl,
|
|
96534
96548
|
Point: Point2_glsl,
|
|
96535
96549
|
PointSize: PointSize2_glsl,
|
|
96536
|
-
Shadow:
|
|
96550
|
+
Shadow: Shadow2_glsl,
|
|
96537
96551
|
Texture: Texture1_glsl,
|
|
96538
96552
|
Vertex: Vertex1_glsl,
|
|
96539
96553
|
// PBR
|
|
@@ -96541,6 +96555,7 @@ const ShaderRegistry = {
|
|
|
96541
96555
|
IBL: IBL2_glsl,
|
|
96542
96556
|
Iridescence: Iridescence2_glsl,
|
|
96543
96557
|
MaterialInfo: MaterialInfo2_glsl,
|
|
96558
|
+
PBR: PBR2_glsl,
|
|
96544
96559
|
Punctual: Punctual2_glsl,
|
|
96545
96560
|
ToneMapping: ToneMapping2_glsl,
|
|
96546
96561
|
},
|
|
@@ -96568,6 +96583,7 @@ const ShaderRegistry = {
|
|
|
96568
96583
|
IBL: IBL2_glsl,
|
|
96569
96584
|
Iridescence: Iridescence2_glsl,
|
|
96570
96585
|
MaterialInfo: MaterialInfo2_glsl,
|
|
96586
|
+
PBR: PBR2_glsl,
|
|
96571
96587
|
Punctual: Punctual2_glsl,
|
|
96572
96588
|
ToneMapping: ToneMapping2_glsl,
|
|
96573
96589
|
},
|
|
@@ -96593,9 +96609,9 @@ const ShaderRegistry = {
|
|
|
96593
96609
|
1: {
|
|
96594
96610
|
Depth: Depth1_fs,
|
|
96595
96611
|
Gouraud: Gouraud1_fs,
|
|
96596
|
-
PBR: PBR1_fs,
|
|
96597
96612
|
Phong: Phong1_fs,
|
|
96598
96613
|
Pointing: Pointing1_fs,
|
|
96614
|
+
Physical: Physical1_fs,
|
|
96599
96615
|
Unlit: Unlit1_fs,
|
|
96600
96616
|
},
|
|
96601
96617
|
2: {
|
|
@@ -96603,9 +96619,9 @@ const ShaderRegistry = {
|
|
|
96603
96619
|
Gouraud: Gouraud2_fs,
|
|
96604
96620
|
LineTransform: LineTransform2_fs,
|
|
96605
96621
|
OITCompose: OITCompose2_fs,
|
|
96606
|
-
PBR: PBR2_fs,
|
|
96607
96622
|
Phong: Phong2_fs,
|
|
96608
96623
|
Pointing: Pointing2_fs,
|
|
96624
|
+
Physical: Physical2,
|
|
96609
96625
|
Unlit: Unlit2_fs,
|
|
96610
96626
|
},
|
|
96611
96627
|
},
|
|
@@ -96719,7 +96735,250 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
96719
96735
|
x_ite_Namespace .add ("ShaderCompiler", "x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
|
|
96720
96736
|
/* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
|
|
96721
96737
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
96722
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
96738
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(376);
|
|
96739
|
+
/*******************************************************************************
|
|
96740
|
+
*
|
|
96741
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
96742
|
+
*
|
|
96743
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
96744
|
+
*
|
|
96745
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
96746
|
+
*
|
|
96747
|
+
* The copyright notice above does not evidence any actual of intended
|
|
96748
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
96749
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
96750
|
+
* create3000.
|
|
96751
|
+
*
|
|
96752
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
96753
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
96754
|
+
* permission of create3000.
|
|
96755
|
+
*
|
|
96756
|
+
* NON-MILITARY USE ONLY
|
|
96757
|
+
*
|
|
96758
|
+
* All create3000 software are effectively free software with a non-military use
|
|
96759
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
96760
|
+
* source in any way you please with the exception anything that uses it must be
|
|
96761
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
96762
|
+
*
|
|
96763
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
96764
|
+
*
|
|
96765
|
+
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
96766
|
+
*
|
|
96767
|
+
* This file is part of the X_ITE Project.
|
|
96768
|
+
*
|
|
96769
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
96770
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
96771
|
+
* Free Software Foundation.
|
|
96772
|
+
*
|
|
96773
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
96774
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
96775
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
96776
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
96777
|
+
*
|
|
96778
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
96779
|
+
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
96780
|
+
* copy of the GPLv3 License.
|
|
96781
|
+
*
|
|
96782
|
+
* For Silvio, Joy and Adi.
|
|
96783
|
+
*
|
|
96784
|
+
******************************************************************************/
|
|
96785
|
+
|
|
96786
|
+
|
|
96787
|
+
|
|
96788
|
+
|
|
96789
|
+
|
|
96790
|
+
|
|
96791
|
+
|
|
96792
|
+
|
|
96793
|
+
|
|
96794
|
+
|
|
96795
|
+
|
|
96796
|
+
const customOptions = [
|
|
96797
|
+
"X3D_GEOMETRY_0D",
|
|
96798
|
+
"X3D_GEOMETRY_1D",
|
|
96799
|
+
"X3D_GEOMETRY_2D",
|
|
96800
|
+
"X3D_GEOMETRY_3D",
|
|
96801
|
+
"X3D_FOG",
|
|
96802
|
+
"X3D_STYLE_PROPERTIES",
|
|
96803
|
+
"X3D_UNLIT_MATERIAL",
|
|
96804
|
+
"X3D_MATERIAL",
|
|
96805
|
+
"X3D_LIGHTING",
|
|
96806
|
+
"X3D_TEXTURE",
|
|
96807
|
+
"X3D_MULTI_TEXTURING",
|
|
96808
|
+
];
|
|
96809
|
+
|
|
96810
|
+
function ShaderPart (executionContext)
|
|
96811
|
+
{
|
|
96812
|
+
Core_X3DNode .call (this, executionContext);
|
|
96813
|
+
Networking_X3DUrlObject .call (this, executionContext);
|
|
96814
|
+
|
|
96815
|
+
this .addType (Base_X3DConstants .ShaderPart);
|
|
96816
|
+
|
|
96817
|
+
this .options = [ ];
|
|
96818
|
+
}
|
|
96819
|
+
|
|
96820
|
+
Object .assign (Object .setPrototypeOf (ShaderPart .prototype, Core_X3DNode .prototype),
|
|
96821
|
+
Networking_X3DUrlObject .prototype,
|
|
96822
|
+
{
|
|
96823
|
+
initialize ()
|
|
96824
|
+
{
|
|
96825
|
+
Core_X3DNode .prototype .initialize .call (this);
|
|
96826
|
+
Networking_X3DUrlObject .prototype .initialize .call (this);
|
|
96827
|
+
|
|
96828
|
+
if (!this .isPrivate ())
|
|
96829
|
+
this .options = customOptions .slice ();
|
|
96830
|
+
|
|
96831
|
+
this ._type .addInterest ("set_type__", this);
|
|
96832
|
+
|
|
96833
|
+
this .requestImmediateLoad () .catch (Function .prototype);
|
|
96834
|
+
},
|
|
96835
|
+
set_type__ ()
|
|
96836
|
+
{
|
|
96837
|
+
this .setLoadState (Base_X3DConstants .NOT_STARTED_STATE);
|
|
96838
|
+
|
|
96839
|
+
this .requestImmediateLoad () .catch (Function .prototype);
|
|
96840
|
+
},
|
|
96841
|
+
getSourceText ()
|
|
96842
|
+
{
|
|
96843
|
+
return this ._url;
|
|
96844
|
+
},
|
|
96845
|
+
getOptions ()
|
|
96846
|
+
{
|
|
96847
|
+
return this .options;
|
|
96848
|
+
},
|
|
96849
|
+
setOptions (value)
|
|
96850
|
+
{
|
|
96851
|
+
this .options = value;
|
|
96852
|
+
},
|
|
96853
|
+
getShader ()
|
|
96854
|
+
{
|
|
96855
|
+
return this .shader;
|
|
96856
|
+
},
|
|
96857
|
+
getShaderType: (() =>
|
|
96858
|
+
{
|
|
96859
|
+
const shaderTypes = new Map ([
|
|
96860
|
+
["VERTEX", "VERTEX_SHADER"],
|
|
96861
|
+
["TESS_CONTROL", "TESS_CONTROL_SHADER"],
|
|
96862
|
+
["TESS_EVALUATION", "TESS_EVALUATION_SHADER"],
|
|
96863
|
+
["GEOMETRY", "GEOMETRY_SHADER"],
|
|
96864
|
+
["FRAGMENT", "FRAGMENT_SHADER"],
|
|
96865
|
+
["COMPUTE", "COMPUTE_SHADER"],
|
|
96866
|
+
]);
|
|
96867
|
+
|
|
96868
|
+
return function ()
|
|
96869
|
+
{
|
|
96870
|
+
return shaderTypes .get (this ._type .getValue ()) || "VERTEX_SHADER";
|
|
96871
|
+
};
|
|
96872
|
+
})(),
|
|
96873
|
+
unloadData ()
|
|
96874
|
+
{
|
|
96875
|
+
this .valid = false;
|
|
96876
|
+
},
|
|
96877
|
+
loadData ()
|
|
96878
|
+
{
|
|
96879
|
+
new InputOutput_FileLoader (this) .loadDocument (this ._url,
|
|
96880
|
+
function (data, url)
|
|
96881
|
+
{
|
|
96882
|
+
if (data === null)
|
|
96883
|
+
{
|
|
96884
|
+
// No URL could be loaded.
|
|
96885
|
+
this .setLoadState (Base_X3DConstants .FAILED_STATE);
|
|
96886
|
+
}
|
|
96887
|
+
else
|
|
96888
|
+
{
|
|
96889
|
+
const
|
|
96890
|
+
browser = this .getBrowser (),
|
|
96891
|
+
gl = browser .getContext (),
|
|
96892
|
+
type = this .getShaderType (),
|
|
96893
|
+
options = ["X3D_" + type] .concat (this .options),
|
|
96894
|
+
shaderCompiler = new Shaders_ShaderCompiler (gl),
|
|
96895
|
+
source = Shaders_ShaderSource .getSource (gl, browser, shaderCompiler .process (ShaderPart_$.decodeText (data)), options),
|
|
96896
|
+
shader = gl .createShader (gl [type]);
|
|
96897
|
+
|
|
96898
|
+
gl .deleteShader (this .shader);
|
|
96899
|
+
|
|
96900
|
+
this .shader = shader;
|
|
96901
|
+
|
|
96902
|
+
gl .shaderSource (shader, source);
|
|
96903
|
+
gl .compileShader (shader);
|
|
96904
|
+
|
|
96905
|
+
if (!gl .getShaderParameter (shader, gl .COMPILE_STATUS))
|
|
96906
|
+
{
|
|
96907
|
+
const
|
|
96908
|
+
typeName = this .getTypeName (),
|
|
96909
|
+
name = this .getName (),
|
|
96910
|
+
log = gl .getShaderInfoLog (shader),
|
|
96911
|
+
match = log .match (/(\d+):(\d+)/);
|
|
96912
|
+
|
|
96913
|
+
if (match)
|
|
96914
|
+
{
|
|
96915
|
+
const fileName = shaderCompiler .getSourceFileName (match [1]) || url || this .getExecutionContext () .getWorldURL ();
|
|
96916
|
+
|
|
96917
|
+
throw new Error ("Error in " + typeName + " '" + name + "' in URL '" + fileName + "', line " + match [2] + ", " + log);
|
|
96918
|
+
}
|
|
96919
|
+
else
|
|
96920
|
+
{
|
|
96921
|
+
const fileName = url || this .getExecutionContext () .getWorldURL ();
|
|
96922
|
+
|
|
96923
|
+
throw new Error ("Error in " + typeName + " '" + name + "' in URL '" + fileName + "', " + log);
|
|
96924
|
+
}
|
|
96925
|
+
}
|
|
96926
|
+
|
|
96927
|
+
this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
|
|
96928
|
+
}
|
|
96929
|
+
}
|
|
96930
|
+
.bind (this));
|
|
96931
|
+
},
|
|
96932
|
+
dispose ()
|
|
96933
|
+
{
|
|
96934
|
+
Networking_X3DUrlObject .prototype .dispose .call (this);
|
|
96935
|
+
Core_X3DNode .prototype .dispose .call (this);
|
|
96936
|
+
},
|
|
96937
|
+
});
|
|
96938
|
+
|
|
96939
|
+
Object .defineProperties (ShaderPart,
|
|
96940
|
+
{
|
|
96941
|
+
typeName:
|
|
96942
|
+
{
|
|
96943
|
+
value: "ShaderPart",
|
|
96944
|
+
enumerable: true,
|
|
96945
|
+
},
|
|
96946
|
+
componentInfo:
|
|
96947
|
+
{
|
|
96948
|
+
value: Object .freeze ({ name: "Shaders", level: 1 }),
|
|
96949
|
+
enumerable: true,
|
|
96950
|
+
},
|
|
96951
|
+
containerField:
|
|
96952
|
+
{
|
|
96953
|
+
value: "parts",
|
|
96954
|
+
enumerable: true,
|
|
96955
|
+
},
|
|
96956
|
+
specificationRange:
|
|
96957
|
+
{
|
|
96958
|
+
value: Object .freeze ({ from: "3.0", to: "Infinity" }),
|
|
96959
|
+
enumerable: true,
|
|
96960
|
+
},
|
|
96961
|
+
fieldDefinitions:
|
|
96962
|
+
{
|
|
96963
|
+
value: new Base_FieldDefinitionArray ([
|
|
96964
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "metadata", new x_ite_Fields .SFNode ()),
|
|
96965
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "description", new x_ite_Fields .SFString ()),
|
|
96966
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .initializeOnly, "type", new x_ite_Fields .SFString ("VERTEX")),
|
|
96967
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "load", new x_ite_Fields .SFBool (true)),
|
|
96968
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "url", new x_ite_Fields .MFString ()),
|
|
96969
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "autoRefresh", new x_ite_Fields .SFTime ()),
|
|
96970
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "autoRefreshTimeLimit", new x_ite_Fields .SFTime (3600)),
|
|
96971
|
+
]),
|
|
96972
|
+
enumerable: true,
|
|
96973
|
+
},
|
|
96974
|
+
});
|
|
96975
|
+
|
|
96976
|
+
const ShaderPart_default_ = ShaderPart;
|
|
96977
|
+
;
|
|
96978
|
+
|
|
96979
|
+
x_ite_Namespace .add ("ShaderPart", "x_ite/Components/Shaders/ShaderPart", ShaderPart_default_);
|
|
96980
|
+
/* harmony default export */ const Shaders_ShaderPart = (ShaderPart_default_);
|
|
96981
|
+
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderProgram.js
|
|
96723
96982
|
/*******************************************************************************
|
|
96724
96983
|
*
|
|
96725
96984
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -96775,248 +97034,9 @@ x_ite_Namespace .add ("ShaderCompiler", "x_ite/Browser/Shaders/ShaderCompiler",
|
|
|
96775
97034
|
|
|
96776
97035
|
|
|
96777
97036
|
|
|
96778
|
-
|
|
96779
|
-
|
|
96780
|
-
|
|
96781
|
-
"X3D_GEOMETRY_0D",
|
|
96782
|
-
"X3D_GEOMETRY_1D",
|
|
96783
|
-
"X3D_GEOMETRY_2D",
|
|
96784
|
-
"X3D_GEOMETRY_3D",
|
|
96785
|
-
"X3D_FOG",
|
|
96786
|
-
"X3D_STYLE_PROPERTIES",
|
|
96787
|
-
"X3D_UNLIT_MATERIAL",
|
|
96788
|
-
"X3D_MATERIAL",
|
|
96789
|
-
"X3D_LIGHTING",
|
|
96790
|
-
"X3D_TEXTURE",
|
|
96791
|
-
"X3D_MULTI_TEXTURING",
|
|
96792
|
-
];
|
|
96793
|
-
|
|
96794
|
-
function ShaderPart (executionContext)
|
|
96795
|
-
{
|
|
96796
|
-
Core_X3DNode .call (this, executionContext);
|
|
96797
|
-
Networking_X3DUrlObject .call (this, executionContext);
|
|
96798
|
-
|
|
96799
|
-
this .addType (Base_X3DConstants .ShaderPart);
|
|
96800
|
-
|
|
96801
|
-
this .options = [ ];
|
|
96802
|
-
}
|
|
96803
|
-
|
|
96804
|
-
Object .assign (Object .setPrototypeOf (ShaderPart .prototype, Core_X3DNode .prototype),
|
|
96805
|
-
Networking_X3DUrlObject .prototype,
|
|
96806
|
-
{
|
|
96807
|
-
initialize ()
|
|
96808
|
-
{
|
|
96809
|
-
Core_X3DNode .prototype .initialize .call (this);
|
|
96810
|
-
Networking_X3DUrlObject .prototype .initialize .call (this);
|
|
96811
|
-
|
|
96812
|
-
if (!this .isPrivate ())
|
|
96813
|
-
this .options = customOptions .slice ();
|
|
96814
|
-
|
|
96815
|
-
this ._type .addInterest ("set_type__", this);
|
|
96816
|
-
|
|
96817
|
-
this .requestImmediateLoad () .catch (Function .prototype);
|
|
96818
|
-
},
|
|
96819
|
-
set_type__ ()
|
|
96820
|
-
{
|
|
96821
|
-
this .setLoadState (Base_X3DConstants .NOT_STARTED_STATE);
|
|
96822
|
-
|
|
96823
|
-
this .requestImmediateLoad () .catch (Function .prototype);
|
|
96824
|
-
},
|
|
96825
|
-
getSourceText ()
|
|
96826
|
-
{
|
|
96827
|
-
return this ._url;
|
|
96828
|
-
},
|
|
96829
|
-
getOptions ()
|
|
96830
|
-
{
|
|
96831
|
-
return this .options;
|
|
96832
|
-
},
|
|
96833
|
-
setOptions (value)
|
|
96834
|
-
{
|
|
96835
|
-
this .options = value;
|
|
96836
|
-
},
|
|
96837
|
-
getShader ()
|
|
96838
|
-
{
|
|
96839
|
-
return this .shader;
|
|
96840
|
-
},
|
|
96841
|
-
getShaderType: (() =>
|
|
96842
|
-
{
|
|
96843
|
-
const shaderTypes = new Map ([
|
|
96844
|
-
["VERTEX", "VERTEX_SHADER"],
|
|
96845
|
-
["TESS_CONTROL", "TESS_CONTROL_SHADER"],
|
|
96846
|
-
["TESS_EVALUATION", "TESS_EVALUATION_SHADER"],
|
|
96847
|
-
["GEOMETRY", "GEOMETRY_SHADER"],
|
|
96848
|
-
["FRAGMENT", "FRAGMENT_SHADER"],
|
|
96849
|
-
["COMPUTE", "COMPUTE_SHADER"],
|
|
96850
|
-
]);
|
|
96851
|
-
|
|
96852
|
-
return function ()
|
|
96853
|
-
{
|
|
96854
|
-
return shaderTypes .get (this ._type .getValue ()) || "VERTEX_SHADER";
|
|
96855
|
-
};
|
|
96856
|
-
})(),
|
|
96857
|
-
unloadData ()
|
|
96858
|
-
{
|
|
96859
|
-
this .valid = false;
|
|
96860
|
-
},
|
|
96861
|
-
loadData ()
|
|
96862
|
-
{
|
|
96863
|
-
new InputOutput_FileLoader (this) .loadDocument (this ._url,
|
|
96864
|
-
function (data, url)
|
|
96865
|
-
{
|
|
96866
|
-
if (data === null)
|
|
96867
|
-
{
|
|
96868
|
-
// No URL could be loaded.
|
|
96869
|
-
this .setLoadState (Base_X3DConstants .FAILED_STATE);
|
|
96870
|
-
}
|
|
96871
|
-
else
|
|
96872
|
-
{
|
|
96873
|
-
const
|
|
96874
|
-
browser = this .getBrowser (),
|
|
96875
|
-
gl = browser .getContext (),
|
|
96876
|
-
type = this .getShaderType (),
|
|
96877
|
-
options = ["X3D_" + type] .concat (this .options),
|
|
96878
|
-
shaderCompiler = new Shaders_ShaderCompiler (gl),
|
|
96879
|
-
source = Shaders_ShaderSource .getSource (gl, browser, shaderCompiler .process (ShaderPart_$.decodeText (data)), options),
|
|
96880
|
-
shader = gl .createShader (gl [type]);
|
|
96881
|
-
|
|
96882
|
-
gl .deleteShader (this .shader);
|
|
96883
|
-
|
|
96884
|
-
this .shader = shader;
|
|
96885
|
-
|
|
96886
|
-
gl .shaderSource (shader, source);
|
|
96887
|
-
gl .compileShader (shader);
|
|
96888
|
-
|
|
96889
|
-
if (!gl .getShaderParameter (shader, gl .COMPILE_STATUS))
|
|
96890
|
-
{
|
|
96891
|
-
const
|
|
96892
|
-
typeName = this .getTypeName (),
|
|
96893
|
-
name = this .getName (),
|
|
96894
|
-
log = gl .getShaderInfoLog (shader),
|
|
96895
|
-
match = log .match (/(\d+):(\d+)/);
|
|
96896
|
-
|
|
96897
|
-
if (match)
|
|
96898
|
-
{
|
|
96899
|
-
const fileName = shaderCompiler .getSourceFileName (match [1]) || url || this .getExecutionContext () .getWorldURL ();
|
|
96900
|
-
|
|
96901
|
-
throw new Error ("Error in " + typeName + " '" + name + "' in URL '" + fileName + "', line " + match [2] + ", " + log);
|
|
96902
|
-
}
|
|
96903
|
-
else
|
|
96904
|
-
{
|
|
96905
|
-
const fileName = url || this .getExecutionContext () .getWorldURL ();
|
|
96906
|
-
|
|
96907
|
-
throw new Error ("Error in " + typeName + " '" + name + "' in URL '" + fileName + "', " + log);
|
|
96908
|
-
}
|
|
96909
|
-
}
|
|
96910
|
-
|
|
96911
|
-
this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
|
|
96912
|
-
}
|
|
96913
|
-
}
|
|
96914
|
-
.bind (this));
|
|
96915
|
-
},
|
|
96916
|
-
dispose ()
|
|
96917
|
-
{
|
|
96918
|
-
Networking_X3DUrlObject .prototype .dispose .call (this);
|
|
96919
|
-
Core_X3DNode .prototype .dispose .call (this);
|
|
96920
|
-
},
|
|
96921
|
-
});
|
|
96922
|
-
|
|
96923
|
-
Object .defineProperties (ShaderPart,
|
|
96924
|
-
{
|
|
96925
|
-
typeName:
|
|
96926
|
-
{
|
|
96927
|
-
value: "ShaderPart",
|
|
96928
|
-
enumerable: true,
|
|
96929
|
-
},
|
|
96930
|
-
componentInfo:
|
|
96931
|
-
{
|
|
96932
|
-
value: Object .freeze ({ name: "Shaders", level: 1 }),
|
|
96933
|
-
enumerable: true,
|
|
96934
|
-
},
|
|
96935
|
-
containerField:
|
|
96936
|
-
{
|
|
96937
|
-
value: "parts",
|
|
96938
|
-
enumerable: true,
|
|
96939
|
-
},
|
|
96940
|
-
specificationRange:
|
|
96941
|
-
{
|
|
96942
|
-
value: Object .freeze ({ from: "3.0", to: "Infinity" }),
|
|
96943
|
-
enumerable: true,
|
|
96944
|
-
},
|
|
96945
|
-
fieldDefinitions:
|
|
96946
|
-
{
|
|
96947
|
-
value: new Base_FieldDefinitionArray ([
|
|
96948
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "metadata", new x_ite_Fields .SFNode ()),
|
|
96949
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "description", new x_ite_Fields .SFString ()),
|
|
96950
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .initializeOnly, "type", new x_ite_Fields .SFString ("VERTEX")),
|
|
96951
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "load", new x_ite_Fields .SFBool (true)),
|
|
96952
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "url", new x_ite_Fields .MFString ()),
|
|
96953
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "autoRefresh", new x_ite_Fields .SFTime ()),
|
|
96954
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "autoRefreshTimeLimit", new x_ite_Fields .SFTime (3600)),
|
|
96955
|
-
]),
|
|
96956
|
-
enumerable: true,
|
|
96957
|
-
},
|
|
96958
|
-
});
|
|
96959
|
-
|
|
96960
|
-
const ShaderPart_default_ = ShaderPart;
|
|
96961
|
-
;
|
|
96962
|
-
|
|
96963
|
-
x_ite_Namespace .add ("ShaderPart", "x_ite/Components/Shaders/ShaderPart", ShaderPart_default_);
|
|
96964
|
-
/* harmony default export */ const Shaders_ShaderPart = (ShaderPart_default_);
|
|
96965
|
-
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderProgram.js
|
|
96966
|
-
/*******************************************************************************
|
|
96967
|
-
*
|
|
96968
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
96969
|
-
*
|
|
96970
|
-
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
96971
|
-
*
|
|
96972
|
-
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
96973
|
-
*
|
|
96974
|
-
* The copyright notice above does not evidence any actual of intended
|
|
96975
|
-
* publication of such source code, and is an unpublished work by create3000.
|
|
96976
|
-
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
96977
|
-
* create3000.
|
|
96978
|
-
*
|
|
96979
|
-
* No permission is granted to copy, distribute, or create derivative works from
|
|
96980
|
-
* the contents of this software, in whole or in part, without the prior written
|
|
96981
|
-
* permission of create3000.
|
|
96982
|
-
*
|
|
96983
|
-
* NON-MILITARY USE ONLY
|
|
96984
|
-
*
|
|
96985
|
-
* All create3000 software are effectively free software with a non-military use
|
|
96986
|
-
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
96987
|
-
* source in any way you please with the exception anything that uses it must be
|
|
96988
|
-
* marked to indicate is contains 'non-military use only' components.
|
|
96989
|
-
*
|
|
96990
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
96991
|
-
*
|
|
96992
|
-
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
96993
|
-
*
|
|
96994
|
-
* This file is part of the X_ITE Project.
|
|
96995
|
-
*
|
|
96996
|
-
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
96997
|
-
* terms of the GNU General Public License version 3 only, as published by the
|
|
96998
|
-
* Free Software Foundation.
|
|
96999
|
-
*
|
|
97000
|
-
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
97001
|
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
97002
|
-
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
97003
|
-
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
97004
|
-
*
|
|
97005
|
-
* You should have received a copy of the GNU General Public License version 3
|
|
97006
|
-
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
97007
|
-
* copy of the GPLv3 License.
|
|
97008
|
-
*
|
|
97009
|
-
* For Silvio, Joy and Adi.
|
|
97010
|
-
*
|
|
97011
|
-
******************************************************************************/
|
|
97012
|
-
|
|
97013
|
-
|
|
97014
|
-
|
|
97015
|
-
|
|
97016
|
-
|
|
97017
|
-
|
|
97018
|
-
|
|
97019
|
-
|
|
97037
|
+
/**
|
|
97038
|
+
* THIS NODE IS NOT SUPPORTED.
|
|
97039
|
+
*/
|
|
97020
97040
|
|
|
97021
97041
|
function ShaderProgram (executionContext)
|
|
97022
97042
|
{
|
|
@@ -97386,7 +97406,7 @@ const X3DAppearanceNode_default_ = X3DAppearanceNode;
|
|
|
97386
97406
|
x_ite_Namespace .add ("X3DAppearanceNode", "x_ite/Components/Shape/X3DAppearanceNode", X3DAppearanceNode_default_);
|
|
97387
97407
|
/* harmony default export */ const Shape_X3DAppearanceNode = (X3DAppearanceNode_default_);
|
|
97388
97408
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/Appearance.js
|
|
97389
|
-
/* provided dependency */ var Appearance_$ = __webpack_require__(
|
|
97409
|
+
/* provided dependency */ var Appearance_$ = __webpack_require__(376);
|
|
97390
97410
|
/*******************************************************************************
|
|
97391
97411
|
*
|
|
97392
97412
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -98341,16 +98361,14 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
|
|
|
98341
98361
|
const { renderObject, shadows, fogNode, shapeNode, appearanceNode, textureNode, humanoidNode, objectsKeys } = renderContext;
|
|
98342
98362
|
|
|
98343
98363
|
key += shapeNode .getAlphaMode ();
|
|
98344
|
-
key += renderObject .
|
|
98345
|
-
key += shadows ? 1 : 0;
|
|
98364
|
+
key += renderObject .getRenderAndGlobalLightsKey ();
|
|
98365
|
+
key += shadows || renderObject .getGlobalShadow () ? 1 : 0;
|
|
98346
98366
|
key += fogNode ?.getFogType () ?? 0;
|
|
98347
98367
|
key += shapeNode .getShapeKey ();
|
|
98348
98368
|
key += appearanceNode .getStyleProperties (geometryContext .geometryType) ?.getStyleKey () ?? 0;
|
|
98349
98369
|
key += appearanceNode .getTextureTransformMapping () .size || 1;
|
|
98350
98370
|
key += geometryContext .textureCoordinateMapping .size || 1;
|
|
98351
|
-
key += "
|
|
98352
|
-
key += humanoidNode ?.getHumanoidKey () ?? "";
|
|
98353
|
-
key += ".";
|
|
98371
|
+
key += humanoidNode ?.getHumanoidKey () ?? "[]";
|
|
98354
98372
|
key += objectsKeys .sort () .join (""); // ClipPlane, X3DLightNode
|
|
98355
98373
|
key += ".";
|
|
98356
98374
|
key += textureNode ? 2 : appearanceNode .getTextureBits () .toString (16);
|
|
@@ -98359,11 +98377,13 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
|
|
|
98359
98377
|
{
|
|
98360
98378
|
// Rubberband, X3DBackgroundNode
|
|
98361
98379
|
|
|
98362
|
-
const { alphaMode, textureNode, objectsKeys } = geometryContext;
|
|
98380
|
+
const { renderObject, alphaMode, textureNode, objectsKeys } = geometryContext;
|
|
98363
98381
|
|
|
98364
98382
|
key += alphaMode;
|
|
98365
|
-
key += "
|
|
98366
|
-
key +=
|
|
98383
|
+
key += ".";
|
|
98384
|
+
key += renderObject .getRenderKey ();
|
|
98385
|
+
key += "..000011[]";
|
|
98386
|
+
key += objectsKeys .sort () .join (""); // ClipPlane
|
|
98367
98387
|
key += ".";
|
|
98368
98388
|
key += textureNode ?.getTextureBits () .toString (16) ?? 0;
|
|
98369
98389
|
}
|
|
@@ -98391,9 +98411,36 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
|
|
|
98391
98411
|
if (geometryContext .hasTangents)
|
|
98392
98412
|
options .push ("X3D_TANGENTS");
|
|
98393
98413
|
|
|
98414
|
+
switch (browser .getBrowserOption ("ColorSpace"))
|
|
98415
|
+
{
|
|
98416
|
+
case "SRGB":
|
|
98417
|
+
options .push ("X3D_COLORSPACE_SRGB");
|
|
98418
|
+
break;
|
|
98419
|
+
default: // LINEAR_WHEN_PHYSICAL_MATERIAL
|
|
98420
|
+
options .push ("X3D_COLORSPACE_LINEAR_WHEN_PHYSICAL_MATERIAL");
|
|
98421
|
+
break;
|
|
98422
|
+
case "LINEAR":
|
|
98423
|
+
options .push ("X3D_COLORSPACE_LINEAR");
|
|
98424
|
+
break;
|
|
98425
|
+
}
|
|
98426
|
+
|
|
98427
|
+
switch (browser .getBrowserOption ("ToneMapping"))
|
|
98428
|
+
{
|
|
98429
|
+
default: // NONE
|
|
98430
|
+
break;
|
|
98431
|
+
case "ACES_NARKOWICZ":
|
|
98432
|
+
case "ACES_HILL":
|
|
98433
|
+
case "ACES_HILL_EXPOSURE_BOOST":
|
|
98434
|
+
case "KHR_PBR_NEUTRAL":
|
|
98435
|
+
options .push (`X3D_TONEMAP_${browser .getBrowserOption ("ToneMapping")}`);
|
|
98436
|
+
break;
|
|
98437
|
+
}
|
|
98438
|
+
|
|
98394
98439
|
if (renderContext)
|
|
98395
98440
|
{
|
|
98396
|
-
const { renderObject, fogNode, shapeNode, appearanceNode, humanoidNode, objectsKeys, textureNode } = renderContext;
|
|
98441
|
+
const { renderObject, fogNode, shapeNode, appearanceNode, humanoidNode, objectsKeys: localObjectsKeys, textureNode } = renderContext;
|
|
98442
|
+
|
|
98443
|
+
const objectsKeys = localObjectsKeys .concat (renderObject .getGlobalLightsKeys ());
|
|
98397
98444
|
|
|
98398
98445
|
if (renderObject .getLogarithmicDepthBuffer ())
|
|
98399
98446
|
options .push ("X3D_LOGARITHMIC_DEPTH_BUFFER");
|
|
@@ -98421,7 +98468,7 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
|
|
|
98421
98468
|
}
|
|
98422
98469
|
}
|
|
98423
98470
|
|
|
98424
|
-
if (renderContext .shadows)
|
|
98471
|
+
if (renderContext .shadows || renderObject .getGlobalShadows () .at (-1))
|
|
98425
98472
|
options .push ("X3D_SHADOWS", "X3D_PCF_FILTERING");
|
|
98426
98473
|
|
|
98427
98474
|
switch (fogNode ?.getFogType ())
|
|
@@ -98527,7 +98574,10 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
|
|
|
98527
98574
|
}
|
|
98528
98575
|
else
|
|
98529
98576
|
{
|
|
98530
|
-
const { alphaMode, objectsKeys, textureNode } = geometryContext;
|
|
98577
|
+
const { renderObject, alphaMode, objectsKeys, textureNode } = geometryContext;
|
|
98578
|
+
|
|
98579
|
+
if (renderObject .getLogarithmicDepthBuffer ())
|
|
98580
|
+
options .push ("X3D_LOGARITHMIC_DEPTH_BUFFER");
|
|
98531
98581
|
|
|
98532
98582
|
switch (alphaMode)
|
|
98533
98583
|
{
|
|
@@ -98545,18 +98595,14 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
|
|
|
98545
98595
|
{
|
|
98546
98596
|
options .push ("X3D_ALPHA_MODE_BLEND");
|
|
98547
98597
|
|
|
98548
|
-
if (
|
|
98598
|
+
if (renderObject .getOrderIndependentTransparency ())
|
|
98549
98599
|
options .push ("X3D_ORDER_INDEPENDENT_TRANSPARENCY");
|
|
98550
98600
|
|
|
98551
98601
|
break;
|
|
98552
98602
|
}
|
|
98553
98603
|
}
|
|
98554
98604
|
|
|
98555
|
-
const
|
|
98556
|
-
numClipPlanes = objectsKeys .reduce ((a, c) => a + (c === 0), 0),
|
|
98557
|
-
numLights = objectsKeys .reduce ((a, c) => a + (c === 1), 0),
|
|
98558
|
-
numEnvironmentLights = objectsKeys .reduce ((a, c) => a + (c === 2), 0),
|
|
98559
|
-
numTextureProjectors = objectsKeys .reduce ((a, c) => a + (c === 3), 0);
|
|
98605
|
+
const numClipPlanes = objectsKeys .reduce ((a, c) => a + (c === 0), 0);
|
|
98560
98606
|
|
|
98561
98607
|
if (numClipPlanes)
|
|
98562
98608
|
{
|
|
@@ -98564,24 +98610,6 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, Shape_X3DApp
|
|
|
98564
98610
|
options .push (`X3D_NUM_CLIP_PLANES ${Math .min (numClipPlanes, browser .getMaxClipPlanes ())}`);
|
|
98565
98611
|
}
|
|
98566
98612
|
|
|
98567
|
-
if (numLights)
|
|
98568
|
-
{
|
|
98569
|
-
options .push ("X3D_LIGHTING")
|
|
98570
|
-
options .push (`X3D_NUM_LIGHTS ${Math .min (numLights, browser .getMaxLights ())}`);
|
|
98571
|
-
}
|
|
98572
|
-
|
|
98573
|
-
if (numEnvironmentLights)
|
|
98574
|
-
{
|
|
98575
|
-
options .push ("X3D_USE_IBL")
|
|
98576
|
-
options .push (`X3D_NUM_ENVIRONMENT_LIGHTS ${Math .min (numEnvironmentLights, browser .getMaxLights ())}`);
|
|
98577
|
-
}
|
|
98578
|
-
|
|
98579
|
-
if (numTextureProjectors)
|
|
98580
|
-
{
|
|
98581
|
-
options .push ("X3D_TEXTURE_PROJECTION")
|
|
98582
|
-
options .push (`X3D_NUM_TEXTURE_PROJECTORS ${Math .min (numTextureProjectors, browser .getMaxTextures ())}`);
|
|
98583
|
-
}
|
|
98584
|
-
|
|
98585
98613
|
if (textureNode)
|
|
98586
98614
|
{
|
|
98587
98615
|
// X3DBackgroundNode textures
|
|
@@ -99404,8 +99432,7 @@ Object .assign (Object .setPrototypeOf (PhysicalMaterial .prototype, Shape_X3DOn
|
|
|
99404
99432
|
set_transparent__ ()
|
|
99405
99433
|
{
|
|
99406
99434
|
this .setTransparent (this .getTransparency () ||
|
|
99407
|
-
this .baseTextureNode ?.isTransparent ()
|
|
99408
|
-
this .isTransmission ());
|
|
99435
|
+
this .baseTextureNode ?.isTransparent ());
|
|
99409
99436
|
},
|
|
99410
99437
|
set_extensions__ ()
|
|
99411
99438
|
{
|
|
@@ -99431,7 +99458,6 @@ Object .assign (Object .setPrototypeOf (PhysicalMaterial .prototype, Shape_X3DOn
|
|
|
99431
99458
|
|
|
99432
99459
|
this .setTransmission (extensionNodes .some (extensionNode => extensionNode .getType () .includes (Base_X3DConstants .TransmissionMaterialExtension)));
|
|
99433
99460
|
|
|
99434
|
-
this .set_transparent__ ();
|
|
99435
99461
|
this .set_extensionsKey__ ();
|
|
99436
99462
|
},
|
|
99437
99463
|
set_extensionsKey__ ()
|
|
@@ -99453,18 +99479,6 @@ Object .assign (Object .setPrototypeOf (PhysicalMaterial .prototype, Shape_X3DOn
|
|
|
99453
99479
|
|
|
99454
99480
|
options .push ("X3D_PHYSICAL_MATERIAL", "X3D_MATERIAL_METALLIC_ROUGHNESS");
|
|
99455
99481
|
|
|
99456
|
-
switch (browser .getBrowserOption ("ToneMapping"))
|
|
99457
|
-
{
|
|
99458
|
-
default: // NONE
|
|
99459
|
-
break;
|
|
99460
|
-
case "ACES_NARKOWICZ":
|
|
99461
|
-
case "ACES_HILL":
|
|
99462
|
-
case "ACES_HILL_EXPOSURE_BOOST":
|
|
99463
|
-
case "KHR_PBR_NEUTRAL":
|
|
99464
|
-
options .push (`X3D_TONEMAP_${browser .getBrowserOption ("ToneMapping")}`);
|
|
99465
|
-
break;
|
|
99466
|
-
}
|
|
99467
|
-
|
|
99468
99482
|
if (+this .getTextureBits ())
|
|
99469
99483
|
{
|
|
99470
99484
|
this .baseTextureNode ?.getShaderOptions (options, "BASE");
|
|
@@ -99472,7 +99486,7 @@ Object .assign (Object .setPrototypeOf (PhysicalMaterial .prototype, Shape_X3DOn
|
|
|
99472
99486
|
this .occlusionTextureNode ?.getShaderOptions (options, "OCCLUSION");
|
|
99473
99487
|
}
|
|
99474
99488
|
|
|
99475
|
-
const shaderNode = browser .createShader ("
|
|
99489
|
+
const shaderNode = browser .createShader ("Physical", "Default", "Physical", options);
|
|
99476
99490
|
|
|
99477
99491
|
browser .getShaders () .set (key, shaderNode);
|
|
99478
99492
|
|
|
@@ -100067,230 +100081,234 @@ x_ite_Namespace .add ("X3DShapeNode", "x_ite/Components/Shape/X3DShapeNode", X3D
|
|
|
100067
100081
|
|
|
100068
100082
|
|
|
100069
100083
|
|
|
100070
|
-
function Shape (executionContext)
|
|
100071
|
-
{
|
|
100072
|
-
Shape_X3DShapeNode .call (this, executionContext);
|
|
100073
|
-
|
|
100074
|
-
this .addType (Base_X3DConstants .Shape);
|
|
100075
|
-
}
|
|
100076
|
-
|
|
100077
|
-
Object .assign (Object .setPrototypeOf (Shape .prototype, Shape_X3DShapeNode .prototype),
|
|
100078
|
-
{
|
|
100079
|
-
initialize ()
|
|
100080
|
-
{
|
|
100081
|
-
Shape_X3DShapeNode .prototype .initialize .call (this);
|
|
100082
|
-
|
|
100083
|
-
this ._transformSensors_changed .addInterest ("set_transformSensors__", this);
|
|
100084
|
-
|
|
100085
|
-
this .set_transformSensors__ ();
|
|
100086
|
-
},
|
|
100087
|
-
getShapeKey ()
|
|
100088
|
-
{
|
|
100089
|
-
return 0;
|
|
100090
|
-
},
|
|
100091
|
-
getNumInstances ()
|
|
100092
|
-
{
|
|
100093
|
-
return 1;
|
|
100094
|
-
},
|
|
100095
|
-
set_geometry__ ()
|
|
100096
|
-
{
|
|
100097
|
-
Shape_X3DShapeNode .prototype .set_geometry__ .call (this);
|
|
100098
|
-
|
|
100099
|
-
if (this .getGeometry ())
|
|
100100
|
-
delete this .traverse;
|
|
100101
|
-
else
|
|
100102
|
-
this .traverse = Function .prototype;
|
|
100103
|
-
},
|
|
100104
|
-
set_transformSensors__ ()
|
|
100105
|
-
{
|
|
100106
|
-
this .setPickableObject (this .getTransformSensors () .size);
|
|
100107
|
-
},
|
|
100108
|
-
intersectsBox (box, clipPlanes, modelViewMatrix)
|
|
100109
|
-
{
|
|
100110
|
-
return this .getGeometry () .intersectsBox (box, clipPlanes, modelViewMatrix);
|
|
100111
|
-
},
|
|
100112
|
-
traverse (type, renderObject)
|
|
100113
|
-
{
|
|
100114
|
-
// Always look at ParticleSystem if you do modify something here and there.
|
|
100115
|
-
|
|
100116
|
-
switch (type)
|
|
100117
|
-
{
|
|
100118
|
-
case Rendering_TraverseType .POINTER:
|
|
100119
|
-
{
|
|
100120
|
-
if (this ._pointerEvents .getValue ())
|
|
100121
|
-
renderObject .addPointingShape (this);
|
|
100122
|
-
|
|
100123
|
-
break;
|
|
100124
|
-
}
|
|
100125
|
-
case Rendering_TraverseType .PICKING:
|
|
100126
|
-
{
|
|
100127
|
-
this .picking (renderObject);
|
|
100128
|
-
break;
|
|
100129
|
-
}
|
|
100130
|
-
case Rendering_TraverseType .COLLISION:
|
|
100131
|
-
{
|
|
100132
|
-
renderObject .addCollisionShape (this);
|
|
100133
|
-
break;
|
|
100134
|
-
}
|
|
100135
|
-
case Rendering_TraverseType .SHADOW:
|
|
100136
|
-
{
|
|
100137
|
-
if (this ._castShadow .getValue ())
|
|
100138
|
-
renderObject .addShadowShape (this);
|
|
100139
|
-
|
|
100140
|
-
break;
|
|
100141
|
-
}
|
|
100142
|
-
case Rendering_TraverseType .DISPLAY:
|
|
100143
|
-
{
|
|
100144
|
-
if (renderObject .addDisplayShape (this))
|
|
100145
|
-
{
|
|
100146
|
-
// Currently used for GeneratedCubeMapTexture.
|
|
100147
|
-
this .getAppearance () .traverse (type, renderObject);
|
|
100148
|
-
}
|
|
100149
|
-
|
|
100150
|
-
break;
|
|
100151
|
-
}
|
|
100152
|
-
}
|
|
100153
|
-
|
|
100154
|
-
// Currently used for ScreenText and Tools.
|
|
100155
|
-
this .getGeometry () .traverse (type, renderObject);
|
|
100156
|
-
},
|
|
100157
|
-
picking (renderObject)
|
|
100158
|
-
{
|
|
100159
|
-
const modelMatrix = renderObject .getModelViewMatrix () .get ();
|
|
100160
|
-
|
|
100161
|
-
if (this .getTransformSensors () .size)
|
|
100162
|
-
{
|
|
100163
|
-
for (const transformSensorNode of this .getTransformSensors ())
|
|
100164
|
-
transformSensorNode .collect (modelMatrix);
|
|
100165
|
-
}
|
|
100166
|
-
|
|
100167
|
-
const
|
|
100168
|
-
browser = this .getBrowser (),
|
|
100169
|
-
pickSensorStack = browser .getPickSensors (),
|
|
100170
|
-
pickingHierarchy = browser .getPickingHierarchy ();
|
|
100171
|
-
|
|
100172
|
-
pickingHierarchy .push (this);
|
|
100173
|
-
|
|
100174
|
-
for (const pickSensor of pickSensorStack .at (-1))
|
|
100175
|
-
{
|
|
100176
|
-
pickSensor .collect (this .getGeometry (), modelMatrix, pickingHierarchy);
|
|
100177
|
-
}
|
|
100178
|
-
|
|
100179
|
-
pickingHierarchy .pop ();
|
|
100180
|
-
},
|
|
100181
|
-
displaySimple (gl, renderContext, shaderNode)
|
|
100182
|
-
{
|
|
100183
|
-
this .getGeometry () .displaySimple (gl, renderContext, shaderNode);
|
|
100184
|
-
},
|
|
100185
|
-
display (gl, renderContext)
|
|
100186
|
-
{
|
|
100187
|
-
this .getGeometry () .display (gl, renderContext);
|
|
100188
|
-
},
|
|
100189
|
-
});
|
|
100190
|
-
|
|
100191
|
-
Object .defineProperties (Shape,
|
|
100192
|
-
{
|
|
100193
|
-
typeName:
|
|
100194
|
-
{
|
|
100195
|
-
value: "Shape",
|
|
100196
|
-
enumerable: true,
|
|
100197
|
-
},
|
|
100198
|
-
componentInfo:
|
|
100199
|
-
{
|
|
100200
|
-
value: Object .freeze ({ name: "Shape", level: 1 }),
|
|
100201
|
-
enumerable: true,
|
|
100202
|
-
},
|
|
100203
|
-
containerField:
|
|
100204
|
-
{
|
|
100205
|
-
value: "children",
|
|
100206
|
-
enumerable: true,
|
|
100207
|
-
},
|
|
100208
|
-
specificationRange:
|
|
100209
|
-
{
|
|
100210
|
-
value: Object .freeze ({ from: "2.0", to: "Infinity" }),
|
|
100211
|
-
enumerable: true,
|
|
100212
|
-
},
|
|
100213
|
-
fieldDefinitions:
|
|
100214
|
-
{
|
|
100215
|
-
value: new Base_FieldDefinitionArray ([
|
|
100216
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "metadata", new x_ite_Fields .SFNode ()),
|
|
100217
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "pointerEvents", new x_ite_Fields .SFBool (true)), // skip test
|
|
100218
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "castShadow", new x_ite_Fields .SFBool (true)),
|
|
100219
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "visible", new x_ite_Fields .SFBool (true)),
|
|
100220
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "bboxDisplay", new x_ite_Fields .SFBool ()),
|
|
100221
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .initializeOnly, "bboxSize", new x_ite_Fields .SFVec3f (-1, -1, -1)),
|
|
100222
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .initializeOnly, "bboxCenter", new x_ite_Fields .SFVec3f ()),
|
|
100223
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "appearance", new x_ite_Fields .SFNode ()),
|
|
100224
|
-
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "geometry", new x_ite_Fields .SFNode ()),
|
|
100225
|
-
]),
|
|
100226
|
-
enumerable: true,
|
|
100227
|
-
},
|
|
100228
|
-
});
|
|
100229
|
-
|
|
100230
|
-
const Shape_default_ = Shape;
|
|
100231
|
-
;
|
|
100232
|
-
|
|
100233
|
-
x_ite_Namespace .add ("Shape", "x_ite/Components/Shape/Shape", Shape_default_);
|
|
100234
|
-
/* harmony default export */ const Shape_Shape = (Shape_default_);
|
|
100235
|
-
;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/TwoSidedMaterial.js
|
|
100236
|
-
/*******************************************************************************
|
|
100237
|
-
*
|
|
100238
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
100239
|
-
*
|
|
100240
|
-
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
100241
|
-
*
|
|
100242
|
-
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
100243
|
-
*
|
|
100244
|
-
* The copyright notice above does not evidence any actual of intended
|
|
100245
|
-
* publication of such source code, and is an unpublished work by create3000.
|
|
100246
|
-
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
100247
|
-
* create3000.
|
|
100248
|
-
*
|
|
100249
|
-
* No permission is granted to copy, distribute, or create derivative works from
|
|
100250
|
-
* the contents of this software, in whole or in part, without the prior written
|
|
100251
|
-
* permission of create3000.
|
|
100252
|
-
*
|
|
100253
|
-
* NON-MILITARY USE ONLY
|
|
100254
|
-
*
|
|
100255
|
-
* All create3000 software are effectively free software with a non-military use
|
|
100256
|
-
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
100257
|
-
* source in any way you please with the exception anything that uses it must be
|
|
100258
|
-
* marked to indicate is contains 'non-military use only' components.
|
|
100259
|
-
*
|
|
100260
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
100261
|
-
*
|
|
100262
|
-
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
100263
|
-
*
|
|
100264
|
-
* This file is part of the X_ITE Project.
|
|
100265
|
-
*
|
|
100266
|
-
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
100267
|
-
* terms of the GNU General Public License version 3 only, as published by the
|
|
100268
|
-
* Free Software Foundation.
|
|
100269
|
-
*
|
|
100270
|
-
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
100271
|
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
100272
|
-
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
100273
|
-
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
100274
|
-
*
|
|
100275
|
-
* You should have received a copy of the GNU General Public License version 3
|
|
100276
|
-
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
100277
|
-
* copy of the GPLv3 License.
|
|
100278
|
-
*
|
|
100279
|
-
* For Silvio, Joy and Adi.
|
|
100280
|
-
*
|
|
100281
|
-
******************************************************************************/
|
|
100282
|
-
|
|
100283
|
-
|
|
100284
|
-
|
|
100285
|
-
|
|
100286
|
-
|
|
100287
|
-
|
|
100288
|
-
|
|
100084
|
+
function Shape (executionContext)
|
|
100085
|
+
{
|
|
100086
|
+
Shape_X3DShapeNode .call (this, executionContext);
|
|
100087
|
+
|
|
100088
|
+
this .addType (Base_X3DConstants .Shape);
|
|
100089
|
+
}
|
|
100090
|
+
|
|
100091
|
+
Object .assign (Object .setPrototypeOf (Shape .prototype, Shape_X3DShapeNode .prototype),
|
|
100092
|
+
{
|
|
100093
|
+
initialize ()
|
|
100094
|
+
{
|
|
100095
|
+
Shape_X3DShapeNode .prototype .initialize .call (this);
|
|
100096
|
+
|
|
100097
|
+
this ._transformSensors_changed .addInterest ("set_transformSensors__", this);
|
|
100098
|
+
|
|
100099
|
+
this .set_transformSensors__ ();
|
|
100100
|
+
},
|
|
100101
|
+
getShapeKey ()
|
|
100102
|
+
{
|
|
100103
|
+
return 0;
|
|
100104
|
+
},
|
|
100105
|
+
getNumInstances ()
|
|
100106
|
+
{
|
|
100107
|
+
return 1;
|
|
100108
|
+
},
|
|
100109
|
+
set_geometry__ ()
|
|
100110
|
+
{
|
|
100111
|
+
Shape_X3DShapeNode .prototype .set_geometry__ .call (this);
|
|
100112
|
+
|
|
100113
|
+
if (this .getGeometry ())
|
|
100114
|
+
delete this .traverse;
|
|
100115
|
+
else
|
|
100116
|
+
this .traverse = Function .prototype;
|
|
100117
|
+
},
|
|
100118
|
+
set_transformSensors__ ()
|
|
100119
|
+
{
|
|
100120
|
+
this .setPickableObject (this .getTransformSensors () .size);
|
|
100121
|
+
},
|
|
100122
|
+
intersectsBox (box, clipPlanes, modelViewMatrix)
|
|
100123
|
+
{
|
|
100124
|
+
return this .getGeometry () .intersectsBox (box, clipPlanes, modelViewMatrix);
|
|
100125
|
+
},
|
|
100126
|
+
traverse (type, renderObject)
|
|
100127
|
+
{
|
|
100128
|
+
// Always look at ParticleSystem if you do modify something here and there.
|
|
100129
|
+
|
|
100130
|
+
switch (type)
|
|
100131
|
+
{
|
|
100132
|
+
case Rendering_TraverseType .POINTER:
|
|
100133
|
+
{
|
|
100134
|
+
if (this ._pointerEvents .getValue ())
|
|
100135
|
+
renderObject .addPointingShape (this);
|
|
100136
|
+
|
|
100137
|
+
break;
|
|
100138
|
+
}
|
|
100139
|
+
case Rendering_TraverseType .PICKING:
|
|
100140
|
+
{
|
|
100141
|
+
this .picking (renderObject);
|
|
100142
|
+
break;
|
|
100143
|
+
}
|
|
100144
|
+
case Rendering_TraverseType .COLLISION:
|
|
100145
|
+
{
|
|
100146
|
+
renderObject .addCollisionShape (this);
|
|
100147
|
+
break;
|
|
100148
|
+
}
|
|
100149
|
+
case Rendering_TraverseType .SHADOW:
|
|
100150
|
+
{
|
|
100151
|
+
if (this ._castShadow .getValue ())
|
|
100152
|
+
renderObject .addShadowShape (this);
|
|
100153
|
+
|
|
100154
|
+
break;
|
|
100155
|
+
}
|
|
100156
|
+
case Rendering_TraverseType .DISPLAY:
|
|
100157
|
+
{
|
|
100158
|
+
if (renderObject .addDisplayShape (this))
|
|
100159
|
+
{
|
|
100160
|
+
// Currently used for GeneratedCubeMapTexture.
|
|
100161
|
+
this .getAppearance () .traverse (type, renderObject);
|
|
100162
|
+
}
|
|
100163
|
+
|
|
100164
|
+
break;
|
|
100165
|
+
}
|
|
100166
|
+
}
|
|
100167
|
+
|
|
100168
|
+
// Currently used for ScreenText and Tools.
|
|
100169
|
+
this .getGeometry () .traverse (type, renderObject);
|
|
100170
|
+
},
|
|
100171
|
+
picking (renderObject)
|
|
100172
|
+
{
|
|
100173
|
+
const modelMatrix = renderObject .getModelViewMatrix () .get ();
|
|
100174
|
+
|
|
100175
|
+
if (this .getTransformSensors () .size)
|
|
100176
|
+
{
|
|
100177
|
+
for (const transformSensorNode of this .getTransformSensors ())
|
|
100178
|
+
transformSensorNode .collect (modelMatrix);
|
|
100179
|
+
}
|
|
100180
|
+
|
|
100181
|
+
const
|
|
100182
|
+
browser = this .getBrowser (),
|
|
100183
|
+
pickSensorStack = browser .getPickSensors (),
|
|
100184
|
+
pickingHierarchy = browser .getPickingHierarchy ();
|
|
100185
|
+
|
|
100186
|
+
pickingHierarchy .push (this);
|
|
100187
|
+
|
|
100188
|
+
for (const pickSensor of pickSensorStack .at (-1))
|
|
100189
|
+
{
|
|
100190
|
+
pickSensor .collect (this .getGeometry (), modelMatrix, pickingHierarchy);
|
|
100191
|
+
}
|
|
100192
|
+
|
|
100193
|
+
pickingHierarchy .pop ();
|
|
100194
|
+
},
|
|
100195
|
+
displaySimple (gl, renderContext, shaderNode)
|
|
100196
|
+
{
|
|
100197
|
+
this .getGeometry () .displaySimple (gl, renderContext, shaderNode);
|
|
100198
|
+
},
|
|
100199
|
+
display (gl, renderContext)
|
|
100200
|
+
{
|
|
100201
|
+
this .getGeometry () .display (gl, renderContext);
|
|
100202
|
+
},
|
|
100203
|
+
});
|
|
100204
|
+
|
|
100205
|
+
Object .defineProperties (Shape,
|
|
100206
|
+
{
|
|
100207
|
+
typeName:
|
|
100208
|
+
{
|
|
100209
|
+
value: "Shape",
|
|
100210
|
+
enumerable: true,
|
|
100211
|
+
},
|
|
100212
|
+
componentInfo:
|
|
100213
|
+
{
|
|
100214
|
+
value: Object .freeze ({ name: "Shape", level: 1 }),
|
|
100215
|
+
enumerable: true,
|
|
100216
|
+
},
|
|
100217
|
+
containerField:
|
|
100218
|
+
{
|
|
100219
|
+
value: "children",
|
|
100220
|
+
enumerable: true,
|
|
100221
|
+
},
|
|
100222
|
+
specificationRange:
|
|
100223
|
+
{
|
|
100224
|
+
value: Object .freeze ({ from: "2.0", to: "Infinity" }),
|
|
100225
|
+
enumerable: true,
|
|
100226
|
+
},
|
|
100227
|
+
fieldDefinitions:
|
|
100228
|
+
{
|
|
100229
|
+
value: new Base_FieldDefinitionArray ([
|
|
100230
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "metadata", new x_ite_Fields .SFNode ()),
|
|
100231
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "pointerEvents", new x_ite_Fields .SFBool (true)), // skip test
|
|
100232
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "castShadow", new x_ite_Fields .SFBool (true)),
|
|
100233
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "visible", new x_ite_Fields .SFBool (true)),
|
|
100234
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "bboxDisplay", new x_ite_Fields .SFBool ()),
|
|
100235
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .initializeOnly, "bboxSize", new x_ite_Fields .SFVec3f (-1, -1, -1)),
|
|
100236
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .initializeOnly, "bboxCenter", new x_ite_Fields .SFVec3f ()),
|
|
100237
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "appearance", new x_ite_Fields .SFNode ()),
|
|
100238
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "geometry", new x_ite_Fields .SFNode ()),
|
|
100239
|
+
]),
|
|
100240
|
+
enumerable: true,
|
|
100241
|
+
},
|
|
100242
|
+
});
|
|
100243
|
+
|
|
100244
|
+
const Shape_default_ = Shape;
|
|
100245
|
+
;
|
|
100246
|
+
|
|
100247
|
+
x_ite_Namespace .add ("Shape", "x_ite/Components/Shape/Shape", Shape_default_);
|
|
100248
|
+
/* harmony default export */ const Shape_Shape = (Shape_default_);
|
|
100249
|
+
;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/TwoSidedMaterial.js
|
|
100250
|
+
/*******************************************************************************
|
|
100251
|
+
*
|
|
100252
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
100253
|
+
*
|
|
100254
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
100255
|
+
*
|
|
100256
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
100257
|
+
*
|
|
100258
|
+
* The copyright notice above does not evidence any actual of intended
|
|
100259
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
100260
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
100261
|
+
* create3000.
|
|
100262
|
+
*
|
|
100263
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
100264
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
100265
|
+
* permission of create3000.
|
|
100266
|
+
*
|
|
100267
|
+
* NON-MILITARY USE ONLY
|
|
100268
|
+
*
|
|
100269
|
+
* All create3000 software are effectively free software with a non-military use
|
|
100270
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
100271
|
+
* source in any way you please with the exception anything that uses it must be
|
|
100272
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
100273
|
+
*
|
|
100274
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
100275
|
+
*
|
|
100276
|
+
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
100277
|
+
*
|
|
100278
|
+
* This file is part of the X_ITE Project.
|
|
100279
|
+
*
|
|
100280
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
100281
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
100282
|
+
* Free Software Foundation.
|
|
100283
|
+
*
|
|
100284
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
100285
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
100286
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
100287
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
100288
|
+
*
|
|
100289
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
100290
|
+
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
100291
|
+
* copy of the GPLv3 License.
|
|
100292
|
+
*
|
|
100293
|
+
* For Silvio, Joy and Adi.
|
|
100294
|
+
*
|
|
100295
|
+
******************************************************************************/
|
|
100296
|
+
|
|
100297
|
+
|
|
100298
|
+
|
|
100299
|
+
|
|
100300
|
+
|
|
100301
|
+
|
|
100302
|
+
|
|
100303
|
+
|
|
100289
100304
|
|
|
100305
|
+
/**
|
|
100306
|
+
* THIS NODE IS DEPRECIATED.
|
|
100307
|
+
*/
|
|
100290
100308
|
|
|
100291
100309
|
function TwoSidedMaterial (executionContext)
|
|
100292
100310
|
{
|
|
100293
|
-
console .warn ("TwoSidedMaterial is depreciated, please use Appearance backMaterial field.");
|
|
100311
|
+
console .warn ("TwoSidedMaterial is depreciated, please use Appearance backMaterial field instead.");
|
|
100294
100312
|
|
|
100295
100313
|
Shape_X3DMaterialNode .call (this, executionContext);
|
|
100296
100314
|
|
|
@@ -105699,6 +105717,10 @@ x_ite_Namespace .add ("SpatialSound", "x_ite/Components/Sound/SpatialSound", Spa
|
|
|
105699
105717
|
|
|
105700
105718
|
|
|
105701
105719
|
|
|
105720
|
+
/**
|
|
105721
|
+
* THIS NODE IS NOT SUPPORTED.
|
|
105722
|
+
*/
|
|
105723
|
+
|
|
105702
105724
|
function StreamAudioDestination (executionContext)
|
|
105703
105725
|
{
|
|
105704
105726
|
Sound_X3DSoundDestinationNode .call (this, executionContext);
|
|
@@ -105830,6 +105852,10 @@ x_ite_Namespace .add ("StreamAudioDestination", "x_ite/Components/Sound/StreamAu
|
|
|
105830
105852
|
|
|
105831
105853
|
|
|
105832
105854
|
|
|
105855
|
+
/**
|
|
105856
|
+
* THIS NODE IS NOT SUPPORTED.
|
|
105857
|
+
*/
|
|
105858
|
+
|
|
105833
105859
|
function StreamAudioSource (executionContext)
|
|
105834
105860
|
{
|
|
105835
105861
|
Sound_X3DSoundSourceNode .call (this, executionContext);
|
|
@@ -106304,8 +106330,8 @@ const GifMedia_default_ = GifMedia;
|
|
|
106304
106330
|
x_ite_Namespace .add ("GifMedia", "x_ite/Browser/Texturing/GifMedia", GifMedia_default_);
|
|
106305
106331
|
/* harmony default export */ const Texturing_GifMedia = (GifMedia_default_);
|
|
106306
106332
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
106307
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
106308
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
106333
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(376);
|
|
106334
|
+
/* provided dependency */ var SuperGif = __webpack_require__(123);
|
|
106309
106335
|
/*******************************************************************************
|
|
106310
106336
|
*
|
|
106311
106337
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -108960,6 +108986,27 @@ const Context =
|
|
|
108960
108986
|
gl .drawArraysInstanced = ext .drawArraysInstancedANGLE .bind (ext);
|
|
108961
108987
|
gl .drawElementsInstanced = ext .drawElementsInstancedANGLE .bind (ext);
|
|
108962
108988
|
}
|
|
108989
|
+
|
|
108990
|
+
{
|
|
108991
|
+
const ext = gl .getExtension ("WEBGL_color_buffer_float");
|
|
108992
|
+
|
|
108993
|
+
gl .RGBA32F = ext .RGBA32F_EXT;
|
|
108994
|
+
}
|
|
108995
|
+
|
|
108996
|
+
{
|
|
108997
|
+
const ext = gl .getExtension ("WEBGL_draw_buffers");
|
|
108998
|
+
|
|
108999
|
+
gl .MAX_COLOR_ATTACHMENTS = ext .MAX_COLOR_ATTACHMENTS_WEBGL;
|
|
109000
|
+
gl .drawBuffers = ext .drawBuffersWEBGL .bind (ext);
|
|
109001
|
+
|
|
109002
|
+
for (let i = 0, length = gl .getParameter(gl .MAX_COLOR_ATTACHMENTS); i < length; ++ i)
|
|
109003
|
+
{
|
|
109004
|
+
const COLOR_ATTACHMENTi = ext .COLOR_ATTACHMENT0_WEBGL + i;
|
|
109005
|
+
|
|
109006
|
+
if (gl [`COLOR_ATTACHMENT${i}`] === undefined)
|
|
109007
|
+
gl [`COLOR_ATTACHMENT${i}`] = COLOR_ATTACHMENTi;
|
|
109008
|
+
}
|
|
109009
|
+
}
|
|
108963
109010
|
}
|
|
108964
109011
|
}
|
|
108965
109012
|
|
|
@@ -108994,106 +109041,20 @@ const Context =
|
|
|
108994
109041
|
gl .HAS_FEATURE_DEPTH_TEXTURE = gl .getVersion () >= 2 || !! gl .getExtension ("WEBGL_depth_texture");
|
|
108995
109042
|
gl .HAS_FEATURE_FRAG_DEPTH = gl .getVersion () >= 2 || !! gl .getExtension ("EXT_frag_depth");
|
|
108996
109043
|
|
|
108997
|
-
if (
|
|
109044
|
+
if (mobile)
|
|
108998
109045
|
{
|
|
108999
|
-
const
|
|
109000
|
-
color_buffer_float = gl .getExtension ("WEBGL_color_buffer_float"),
|
|
109001
|
-
draw_buffers = gl .getExtension ("WEBGL_draw_buffers");
|
|
109002
|
-
|
|
109003
|
-
gl .RGBA32F = color_buffer_float .RGBA32F_EXT;
|
|
109004
|
-
gl .MAX_COLOR_ATTACHMENTS = draw_buffers .MAX_COLOR_ATTACHMENTS_WEBGL;
|
|
109005
|
-
gl .drawBuffers = draw_buffers .drawBuffersWEBGL .bind (draw_buffers);
|
|
109006
|
-
|
|
109007
|
-
for (let i = 0, length = gl .getParameter(gl .MAX_COLOR_ATTACHMENTS); i < length; ++ i)
|
|
109008
109046
|
{
|
|
109009
|
-
const
|
|
109047
|
+
const ext = gl .getExtension ("EXT_color_buffer_half_float");
|
|
109010
109048
|
|
|
109011
|
-
|
|
109012
|
-
|
|
109049
|
+
// Use defineProperty to overwrite property.
|
|
109050
|
+
Object .defineProperty (gl, "RGBA32F",
|
|
109051
|
+
{
|
|
109052
|
+
value: gl .getVersion () === 1 ? ext .RGBA16F_EXT : gl .RGBA16F,
|
|
109053
|
+
enumerable: true,
|
|
109054
|
+
});
|
|
109013
109055
|
}
|
|
109014
109056
|
}
|
|
109015
109057
|
|
|
109016
|
-
if (mobile)
|
|
109017
|
-
{
|
|
109018
|
-
const color_buffer_half_float = gl .getExtension ("EXT_color_buffer_half_float");
|
|
109019
|
-
|
|
109020
|
-
Object .defineProperty (gl, "RGBA32F",
|
|
109021
|
-
{
|
|
109022
|
-
value: gl .getVersion () === 1 ? color_buffer_half_float .RGBA16F_EXT : gl .RGBA16F,
|
|
109023
|
-
});
|
|
109024
|
-
}
|
|
109025
|
-
|
|
109026
|
-
// // Async functions, DOES'NT WORK WELL WITH OPERA!!!
|
|
109027
|
-
|
|
109028
|
-
// Object .assign (gl, gl .getVersion () === 1
|
|
109029
|
-
// ?
|
|
109030
|
-
// {
|
|
109031
|
-
// readPixelsAsync: gl .readPixels,
|
|
109032
|
-
// }
|
|
109033
|
-
// :
|
|
109034
|
-
// {
|
|
109035
|
-
// clientWaitAsync (sync, flags, timeout)
|
|
109036
|
-
// {
|
|
109037
|
-
// return new Promise ((resolve, reject) =>
|
|
109038
|
-
// {
|
|
109039
|
-
// const check = () =>
|
|
109040
|
-
// {
|
|
109041
|
-
// const result = this .clientWaitSync (sync, flags, 0);
|
|
109042
|
-
|
|
109043
|
-
// switch (result)
|
|
109044
|
-
// {
|
|
109045
|
-
// case this .WAIT_FAILED:
|
|
109046
|
-
// {
|
|
109047
|
-
// reject (new Error ("clientWaitSync: WAIT_FAILED"));
|
|
109048
|
-
// return;
|
|
109049
|
-
// }
|
|
109050
|
-
// case this .TIMEOUT_EXPIRED:
|
|
109051
|
-
// {
|
|
109052
|
-
// setTimeout (check, timeout);
|
|
109053
|
-
// return;
|
|
109054
|
-
// }
|
|
109055
|
-
// default:
|
|
109056
|
-
// {
|
|
109057
|
-
// resolve ();
|
|
109058
|
-
// return;
|
|
109059
|
-
// }
|
|
109060
|
-
// }
|
|
109061
|
-
// };
|
|
109062
|
-
|
|
109063
|
-
// setTimeout (check);
|
|
109064
|
-
// });
|
|
109065
|
-
// },
|
|
109066
|
-
// async getBufferSubDataAsync (target, buffer, srcByteOffset, dstBuffer, /* optional */ dstOffset, /* optional */ length)
|
|
109067
|
-
// {
|
|
109068
|
-
// const sync = this .fenceSync (this .SYNC_GPU_COMMANDS_COMPLETE, 0);
|
|
109069
|
-
|
|
109070
|
-
// this .flush ();
|
|
109071
|
-
|
|
109072
|
-
// await this .clientWaitAsync (sync, 0, 10);
|
|
109073
|
-
|
|
109074
|
-
// this .deleteSync (sync);
|
|
109075
|
-
|
|
109076
|
-
// this .bindBuffer (target, buffer);
|
|
109077
|
-
// this .getBufferSubData (target, srcByteOffset, dstBuffer, dstOffset, length);
|
|
109078
|
-
// this .bindBuffer (target, null);
|
|
109079
|
-
// },
|
|
109080
|
-
// async readPixelsAsync (x, y, w, h, format, type, dest, dstOffset)
|
|
109081
|
-
// {
|
|
109082
|
-
// const buffer = this .createBuffer ();
|
|
109083
|
-
|
|
109084
|
-
// this .bindBuffer (this .PIXEL_PACK_BUFFER, buffer);
|
|
109085
|
-
// this .bufferData (this .PIXEL_PACK_BUFFER, dest .byteLength, this .STREAM_READ);
|
|
109086
|
-
// this .readPixels (x, y, w, h, format, type, 0);
|
|
109087
|
-
// this .bindBuffer (this .PIXEL_PACK_BUFFER, null);
|
|
109088
|
-
|
|
109089
|
-
// await this .getBufferSubDataAsync (this .PIXEL_PACK_BUFFER, buffer, 0, dest, dstOffset);
|
|
109090
|
-
|
|
109091
|
-
// this .deleteBuffer (buffer);
|
|
109092
|
-
// },
|
|
109093
|
-
// });
|
|
109094
|
-
|
|
109095
|
-
// Return context.
|
|
109096
|
-
|
|
109097
109058
|
return gl;
|
|
109098
109059
|
},
|
|
109099
109060
|
}
|
|
@@ -109702,7 +109663,7 @@ const gettext_default_ = (string) => locale .get (string) || string;
|
|
|
109702
109663
|
x_ite_Namespace .add ("gettext", "locale/gettext", gettext_default_);
|
|
109703
109664
|
/* harmony default export */ const gettext = (gettext_default_);
|
|
109704
109665
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
|
|
109705
|
-
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(
|
|
109666
|
+
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(376);
|
|
109706
109667
|
/*******************************************************************************
|
|
109707
109668
|
*
|
|
109708
109669
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -110275,7 +110236,7 @@ const TextureQuality_default_ = TextureQuality;
|
|
|
110275
110236
|
x_ite_Namespace .add ("TextureQuality", "x_ite/Browser/Core/TextureQuality", TextureQuality_default_);
|
|
110276
110237
|
/* harmony default export */ const Core_TextureQuality = (TextureQuality_default_);
|
|
110277
110238
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserOptions.js
|
|
110278
|
-
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(
|
|
110239
|
+
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(376);
|
|
110279
110240
|
/*******************************************************************************
|
|
110280
110241
|
*
|
|
110281
110242
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -110333,6 +110294,8 @@ x_ite_Namespace .add ("TextureQuality", "x_ite/Browser/Core/TextureQuality", Tex
|
|
|
110333
110294
|
|
|
110334
110295
|
|
|
110335
110296
|
|
|
110297
|
+
// https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/networking.html#BrowserProperties
|
|
110298
|
+
|
|
110336
110299
|
function BrowserOptions (executionContext)
|
|
110337
110300
|
{
|
|
110338
110301
|
Base_X3DBaseNode .call (this, executionContext);
|
|
@@ -110361,27 +110324,27 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110361
110324
|
Timings: this ._Timings .getValue (),
|
|
110362
110325
|
});
|
|
110363
110326
|
|
|
110364
|
-
this ._Rubberband .addInterest ("
|
|
110365
|
-
this ._Antialiased .addInterest ("
|
|
110366
|
-
this ._PrimitiveQuality .addInterest ("
|
|
110367
|
-
this ._TextureQuality .addInterest ("
|
|
110368
|
-
this ._Shading .addInterest ("
|
|
110369
|
-
this ._StraightenHorizon .addInterest ("
|
|
110370
|
-
this ._AutoUpdate .addInterest ("
|
|
110371
|
-
this ._ContentScale .addInterest ("
|
|
110372
|
-
this ._Exposure .addInterest ("
|
|
110373
|
-
this ._LogarithmicDepthBuffer .addInterest ("
|
|
110374
|
-
this ._Multisampling .addInterest ("
|
|
110375
|
-
this ._OrderIndependentTransparency .addInterest ("
|
|
110376
|
-
this ._Timings .addInterest ("
|
|
110377
|
-
|
|
110378
|
-
this .
|
|
110379
|
-
this .
|
|
110380
|
-
this .
|
|
110381
|
-
this .
|
|
110382
|
-
this .
|
|
110383
|
-
this .
|
|
110384
|
-
this .
|
|
110327
|
+
this ._Rubberband .addInterest ("set_Rubberband__", this);
|
|
110328
|
+
this ._Antialiased .addInterest ("set_Antialiased__", this);
|
|
110329
|
+
this ._PrimitiveQuality .addInterest ("set_PrimitiveQuality__", this);
|
|
110330
|
+
this ._TextureQuality .addInterest ("set_TextureQuality__", this);
|
|
110331
|
+
this ._Shading .addInterest ("set_Shading__", this);
|
|
110332
|
+
this ._StraightenHorizon .addInterest ("set_StraightenHorizon__", this);
|
|
110333
|
+
this ._AutoUpdate .addInterest ("set_AutoUpdate__", this);
|
|
110334
|
+
this ._ContentScale .addInterest ("set_ContentScale__", this);
|
|
110335
|
+
this ._Exposure .addInterest ("set_Exposure__", this);
|
|
110336
|
+
this ._LogarithmicDepthBuffer .addInterest ("set_LogarithmicDepthBuffer__", this);
|
|
110337
|
+
this ._Multisampling .addInterest ("set_Multisampling__", this);
|
|
110338
|
+
this ._OrderIndependentTransparency .addInterest ("set_OrderIndependentTransparency__", this);
|
|
110339
|
+
this ._Timings .addInterest ("set_Timings__", this);
|
|
110340
|
+
|
|
110341
|
+
this .set_Antialiased__ (this ._Antialiased);
|
|
110342
|
+
this .set_Shading__ (this ._Shading);
|
|
110343
|
+
this .set_ContentScale__ (this ._ContentScale);
|
|
110344
|
+
this .set_Exposure__ (this ._Exposure);
|
|
110345
|
+
this .set_LogarithmicDepthBuffer__ (this ._LogarithmicDepthBuffer);
|
|
110346
|
+
this .set_Multisampling__ (this ._Multisampling);
|
|
110347
|
+
this .set_OrderIndependentTransparency__ (this ._OrderIndependentTransparency);
|
|
110385
110348
|
|
|
110386
110349
|
this .reset ();
|
|
110387
110350
|
},
|
|
@@ -110391,6 +110354,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110391
110354
|
"Antialiased",
|
|
110392
110355
|
"AutoUpdate",
|
|
110393
110356
|
"Cache",
|
|
110357
|
+
"ColorSpace",
|
|
110394
110358
|
"ContentScale",
|
|
110395
110359
|
"ContextMenu",
|
|
110396
110360
|
"Debug",
|
|
@@ -110469,15 +110433,15 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110469
110433
|
{
|
|
110470
110434
|
return this .textureQuality;
|
|
110471
110435
|
},
|
|
110472
|
-
|
|
110436
|
+
set_Rubberband__ (rubberband)
|
|
110473
110437
|
{
|
|
110474
110438
|
this .localStorage .Rubberband = rubberband .getValue ();
|
|
110475
110439
|
},
|
|
110476
|
-
|
|
110440
|
+
set_Antialiased__ ()
|
|
110477
110441
|
{
|
|
110478
|
-
this .
|
|
110442
|
+
this .set_Multisampling__ (this ._Multisampling);
|
|
110479
110443
|
},
|
|
110480
|
-
|
|
110444
|
+
set_PrimitiveQuality__ (value)
|
|
110481
110445
|
{
|
|
110482
110446
|
const
|
|
110483
110447
|
browser = this .getBrowser (),
|
|
@@ -110492,7 +110456,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110492
110456
|
if (typeof browser .setPrimitiveQuality3D === "function")
|
|
110493
110457
|
browser .setPrimitiveQuality3D (this .primitiveQuality);
|
|
110494
110458
|
},
|
|
110495
|
-
|
|
110459
|
+
set_TextureQuality__ (value)
|
|
110496
110460
|
{
|
|
110497
110461
|
const
|
|
110498
110462
|
browser = this .getBrowser (),
|
|
@@ -110504,7 +110468,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110504
110468
|
if (typeof browser .setTextureQuality === "function")
|
|
110505
110469
|
browser .setTextureQuality (this .textureQuality);
|
|
110506
110470
|
},
|
|
110507
|
-
|
|
110471
|
+
set_Shading__: (() =>
|
|
110508
110472
|
{
|
|
110509
110473
|
const strings = {
|
|
110510
110474
|
[Core_Shading .POINT]: "POINT",
|
|
@@ -110526,14 +110490,14 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110526
110490
|
browser .setShading (this .shading);
|
|
110527
110491
|
};
|
|
110528
110492
|
})(),
|
|
110529
|
-
|
|
110493
|
+
set_StraightenHorizon__ (straightenHorizon)
|
|
110530
110494
|
{
|
|
110531
110495
|
this .localStorage .StraightenHorizon = straightenHorizon .getValue ();
|
|
110532
110496
|
|
|
110533
110497
|
if (straightenHorizon .getValue ())
|
|
110534
110498
|
this .getBrowser () .getActiveLayer () ?.straightenView ();
|
|
110535
110499
|
},
|
|
110536
|
-
|
|
110500
|
+
set_AutoUpdate__ (autoUpdate)
|
|
110537
110501
|
{
|
|
110538
110502
|
const events = ["resize", "scroll", "load"]
|
|
110539
110503
|
.map (event => `${event}.${this .getTypeName ()}${this .getId ()}`)
|
|
@@ -110567,7 +110531,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110567
110531
|
BrowserOptions_$(window) .off (events);
|
|
110568
110532
|
}
|
|
110569
110533
|
},
|
|
110570
|
-
|
|
110534
|
+
set_ContentScale__ (contentScale)
|
|
110571
110535
|
{
|
|
110572
110536
|
const browser = this .getBrowser ();
|
|
110573
110537
|
|
|
@@ -110599,7 +110563,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110599
110563
|
|
|
110600
110564
|
browser .reshape ();
|
|
110601
110565
|
},
|
|
110602
|
-
|
|
110566
|
+
set_Exposure__ ()
|
|
110603
110567
|
{
|
|
110604
110568
|
const
|
|
110605
110569
|
browser = this .getBrowser (),
|
|
@@ -110612,7 +110576,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110612
110576
|
gl .uniform1f (shaderNode .x3d_Exposure, exposure);
|
|
110613
110577
|
}
|
|
110614
110578
|
},
|
|
110615
|
-
|
|
110579
|
+
set_LogarithmicDepthBuffer__ (logarithmicDepthBuffer)
|
|
110616
110580
|
{
|
|
110617
110581
|
const
|
|
110618
110582
|
browser = this .getBrowser (),
|
|
@@ -110620,7 +110584,7 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110620
110584
|
|
|
110621
110585
|
browser .getRenderingProperties () ._LogarithmicDepthBuffer = logarithmicDepthBuffer .getValue () && gl .HAS_FEATURE_FRAG_DEPTH;
|
|
110622
110586
|
},
|
|
110623
|
-
|
|
110587
|
+
set_Multisampling__ (multisampling)
|
|
110624
110588
|
{
|
|
110625
110589
|
const
|
|
110626
110590
|
browser = this .getBrowser (),
|
|
@@ -110631,11 +110595,11 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
110631
110595
|
|
|
110632
110596
|
browser .reshape ();
|
|
110633
110597
|
},
|
|
110634
|
-
|
|
110598
|
+
set_OrderIndependentTransparency__ ()
|
|
110635
110599
|
{
|
|
110636
110600
|
this .getBrowser () .reshape ();
|
|
110637
110601
|
},
|
|
110638
|
-
|
|
110602
|
+
set_Timings__ (timings)
|
|
110639
110603
|
{
|
|
110640
110604
|
this .localStorage .Timings = timings .getValue ();
|
|
110641
110605
|
},
|
|
@@ -110661,10 +110625,12 @@ Object .defineProperties (BrowserOptions,
|
|
|
110661
110625
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "QualityWhenMoving", new x_ite_Fields .SFString ("SAME")),
|
|
110662
110626
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Shading", new x_ite_Fields .SFString ("GOURAUD")),
|
|
110663
110627
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "MotionBlur", new x_ite_Fields .SFBool ()),
|
|
110628
|
+
// Additional options:
|
|
110664
110629
|
// Always update geometries, even if browser is not live.
|
|
110665
110630
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "AlwaysUpdateGeometries", new x_ite_Fields .SFBool ()),
|
|
110666
110631
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "AutoUpdate", new x_ite_Fields .SFBool ()),
|
|
110667
110632
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Cache", new x_ite_Fields .SFBool (true)),
|
|
110633
|
+
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "ColorSpace", new x_ite_Fields .SFString ("LINEAR_WHEN_PHYSICAL_MATERIAL")),
|
|
110668
110634
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "ContentScale", new x_ite_Fields .SFDouble (1)),
|
|
110669
110635
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "ContextMenu", new x_ite_Fields .SFBool (true)),
|
|
110670
110636
|
new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Debug", new x_ite_Fields .SFBool ()),
|
|
@@ -110891,7 +110857,7 @@ const RenderingProperties_default_ = RenderingProperties;
|
|
|
110891
110857
|
x_ite_Namespace .add ("RenderingProperties", "x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
|
|
110892
110858
|
/* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
|
|
110893
110859
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
|
|
110894
|
-
/* provided dependency */ var Notification_$ = __webpack_require__(
|
|
110860
|
+
/* provided dependency */ var Notification_$ = __webpack_require__(376);
|
|
110895
110861
|
/*******************************************************************************
|
|
110896
110862
|
*
|
|
110897
110863
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -111014,8 +110980,8 @@ const Notification_default_ = Notification;
|
|
|
111014
110980
|
x_ite_Namespace .add ("Notification", "x_ite/Browser/Core/Notification", Notification_default_);
|
|
111015
110981
|
/* harmony default export */ const Core_Notification = (Notification_default_);
|
|
111016
110982
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
|
|
111017
|
-
/* provided dependency */ var jquery_fullscreen = __webpack_require__(
|
|
111018
|
-
/* provided dependency */ var ContextMenu_$ = __webpack_require__(
|
|
110983
|
+
/* provided dependency */ var jquery_fullscreen = __webpack_require__(68);
|
|
110984
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(376);
|
|
111019
110985
|
/*******************************************************************************
|
|
111020
110986
|
*
|
|
111021
110987
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -113768,7 +113734,7 @@ const DataStorage_default_ = DataStorage;
|
|
|
113768
113734
|
x_ite_Namespace .add ("DataStorage", "standard/Utility/DataStorage", DataStorage_default_);
|
|
113769
113735
|
/* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
|
|
113770
113736
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
113771
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
113737
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(376);
|
|
113772
113738
|
/*******************************************************************************
|
|
113773
113739
|
*
|
|
113774
113740
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -113862,8 +113828,8 @@ function X3DCoreContext (element)
|
|
|
113862
113828
|
// Get canvas & context.
|
|
113863
113829
|
|
|
113864
113830
|
const
|
|
113865
|
-
browser = X3DCoreContext_$("<div></div>") .addClass ("x_ite-private-browser") .attr ("tabindex", 0),
|
|
113866
|
-
surface = X3DCoreContext_$("<div></div>") .addClass ("x_ite-private-surface") .appendTo (browser),
|
|
113831
|
+
browser = X3DCoreContext_$("<div></div>") .addClass ("x_ite-private-browser") .attr ("part", "browser") .attr ("tabindex", 0),
|
|
113832
|
+
surface = X3DCoreContext_$("<div></div>") .addClass ("x_ite-private-surface") .attr ("part", "surface") .appendTo (browser),
|
|
113867
113833
|
splashScreen = X3DCoreContext_$("<div></div>") .hide () .addClass ("x_ite-private-splash-screen") .appendTo (browser),
|
|
113868
113834
|
spinner = X3DCoreContext_$("<div></div>") .addClass ("x_ite-private-spinner") .appendTo (splashScreen),
|
|
113869
113835
|
progress = X3DCoreContext_$("<div></div>") .addClass ("x_ite-private-progress") .appendTo (splashScreen);
|
|
@@ -113898,7 +113864,7 @@ function X3DCoreContext (element)
|
|
|
113898
113864
|
this [_mobile] = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i .test (navigator .userAgent);
|
|
113899
113865
|
this [_element] = element;
|
|
113900
113866
|
this [_surface] = surface;
|
|
113901
|
-
this [_canvas] = X3DCoreContext_$("<canvas></canvas>") .addClass ("x_ite-private-canvas") .prependTo (surface);
|
|
113867
|
+
this [_canvas] = X3DCoreContext_$("<canvas></canvas>") .attr ("part", "canvas") .addClass ("x_ite-private-canvas") .prependTo (surface);
|
|
113902
113868
|
this [_context] = Core_Context .create (this [_canvas] [0], WEBGL_VERSION, element .attr ("preserveDrawingBuffer") === "true", this [_mobile]);
|
|
113903
113869
|
this [_splashScreen] = splashScreen;
|
|
113904
113870
|
|
|
@@ -114076,6 +114042,12 @@ Object .assign (X3DCoreContext .prototype,
|
|
|
114076
114042
|
this .setBrowserOption ("Cache", this .parseBooleanAttribute (newValue, true));
|
|
114077
114043
|
break;
|
|
114078
114044
|
}
|
|
114045
|
+
case "colorSpace":
|
|
114046
|
+
case "colorspace":
|
|
114047
|
+
{
|
|
114048
|
+
this .setBrowserOption ("ColorSpace", newValue);
|
|
114049
|
+
break;
|
|
114050
|
+
}
|
|
114079
114051
|
case "contentScale":
|
|
114080
114052
|
case "contentscale":
|
|
114081
114053
|
{
|
|
@@ -116342,8 +116314,8 @@ const X3DViewer_default_ = X3DViewer;
|
|
|
116342
116314
|
x_ite_Namespace .add ("X3DViewer", "x_ite/Browser/Navigation/X3DViewer", X3DViewer_default_);
|
|
116343
116315
|
/* harmony default export */ const Navigation_X3DViewer = (X3DViewer_default_);
|
|
116344
116316
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
116345
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
116346
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
116317
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(302);
|
|
116318
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(376);
|
|
116347
116319
|
/*******************************************************************************
|
|
116348
116320
|
*
|
|
116349
116321
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -116406,12 +116378,14 @@ x_ite_Namespace .add ("X3DViewer", "x_ite/Browser/Navigation/X3DViewer", X3DView
|
|
|
116406
116378
|
|
|
116407
116379
|
typeof jquery_mousewheel; // import plugin
|
|
116408
116380
|
|
|
116409
|
-
const
|
|
116381
|
+
const
|
|
116382
|
+
macOS = /Mac OS X/i .test (navigator .userAgent),
|
|
116383
|
+
mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i .test (navigator .userAgent);
|
|
116410
116384
|
|
|
116411
116385
|
const
|
|
116412
|
-
SPIN_RELEASE_TIME = 20,
|
|
116413
|
-
SPIN_ANGLE = Math_Algorithm .radians (2),
|
|
116414
|
-
SPIN_FACTOR = 0.
|
|
116386
|
+
SPIN_RELEASE_TIME = mobile ? 20 : 25,
|
|
116387
|
+
SPIN_ANGLE = Math_Algorithm .radians (mobile ? 3 : 2),
|
|
116388
|
+
SPIN_FACTOR = mobile ? 0.2 : 0.3,
|
|
116415
116389
|
SCROLL_FACTOR = macOS ? 1 / 120 : 1 / 20,
|
|
116416
116390
|
MOVE_TIME = 0.2,
|
|
116417
116391
|
ROTATE_TIME = 0.2,
|
|
@@ -117257,8 +117231,8 @@ const ExamineViewer_default_ = ExamineViewer;
|
|
|
117257
117231
|
x_ite_Namespace .add ("ExamineViewer", "x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
|
|
117258
117232
|
/* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
|
|
117259
117233
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
117260
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
117261
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
117234
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(302);
|
|
117235
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(376);
|
|
117262
117236
|
/*******************************************************************************
|
|
117263
117237
|
*
|
|
117264
117238
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -117315,6 +117289,7 @@ x_ite_Namespace .add ("ExamineViewer", "x_ite/Browser/Navigation/ExamineViewer",
|
|
|
117315
117289
|
|
|
117316
117290
|
|
|
117317
117291
|
|
|
117292
|
+
|
|
117318
117293
|
typeof X3DFlyViewer_jquery_mousewheel; // import plugin
|
|
117319
117294
|
|
|
117320
117295
|
const X3DFlyViewer_macOS = /Mac OS X/i .test (navigator .userAgent)
|
|
@@ -117354,7 +117329,12 @@ function X3DFlyViewer (executionContext, navigationInfo)
|
|
|
117354
117329
|
this .lineVertexBuffer = gl .createBuffer ();
|
|
117355
117330
|
this .lineVertexArrayObject = new Rendering_VertexArray (gl);
|
|
117356
117331
|
this .lineVertexArray = new Float32Array (8 * 4) .fill (1);
|
|
117357
|
-
|
|
117332
|
+
|
|
117333
|
+
this .geometryContext = new Rendering_GeometryContext ({
|
|
117334
|
+
renderObject: this .getActiveLayer (),
|
|
117335
|
+
geometryType: 2,
|
|
117336
|
+
colorMaterial: true,
|
|
117337
|
+
});
|
|
117358
117338
|
|
|
117359
117339
|
gl .bindBuffer (gl .ELEMENT_ARRAY_BUFFER, this .lineIndexBuffer);
|
|
117360
117340
|
gl .bufferData (gl .ELEMENT_ARRAY_BUFFER, new Uint8Array ([0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7]), gl .STATIC_DRAW);
|
|
@@ -118267,8 +118247,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
118267
118247
|
x_ite_Namespace .add ("FlyViewer", "x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
|
|
118268
118248
|
/* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
|
|
118269
118249
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
118270
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
118271
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
118250
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(302);
|
|
118251
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(376);
|
|
118272
118252
|
/*******************************************************************************
|
|
118273
118253
|
*
|
|
118274
118254
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118599,8 +118579,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
118599
118579
|
x_ite_Namespace .add ("NoneViewer", "x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
|
|
118600
118580
|
/* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
|
|
118601
118581
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
118602
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
118603
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
118582
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(302);
|
|
118583
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(376);
|
|
118604
118584
|
/*******************************************************************************
|
|
118605
118585
|
*
|
|
118606
118586
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119188,20 +119168,6 @@ const
|
|
|
119188
119168
|
_viewerNode = Symbol (),
|
|
119189
119169
|
_headlightContainer = Symbol ();
|
|
119190
119170
|
|
|
119191
|
-
function getHeadlight (browser)
|
|
119192
|
-
{
|
|
119193
|
-
const headlight = new Lighting_DirectionalLight (browser .getPrivateScene ());
|
|
119194
|
-
|
|
119195
|
-
headlight .setup ();
|
|
119196
|
-
|
|
119197
|
-
const headlightContainer = headlight .getLights () .pop ();
|
|
119198
|
-
|
|
119199
|
-
headlightContainer .set (headlight, null, Numbers_Matrix4 .Identity);
|
|
119200
|
-
headlightContainer .dispose = Function .prototype;
|
|
119201
|
-
|
|
119202
|
-
return headlightContainer;
|
|
119203
|
-
};
|
|
119204
|
-
|
|
119205
119171
|
function X3DNavigationContext ()
|
|
119206
119172
|
{
|
|
119207
119173
|
this .addChildObjects (Base_X3DConstants .outputOnly, "activeLayer", new x_ite_Fields .SFNode (),
|
|
@@ -119223,9 +119189,22 @@ Object .assign (X3DNavigationContext .prototype,
|
|
|
119223
119189
|
this .initialized () .addInterest ("set_world__", this);
|
|
119224
119190
|
this .shutdown () .addInterest ("remove_world__", this);
|
|
119225
119191
|
|
|
119226
|
-
this [_headlightContainer] =
|
|
119192
|
+
this [_headlightContainer] = this .createHeadlight ();
|
|
119227
119193
|
this [_viewerNode] .setup ();
|
|
119228
119194
|
},
|
|
119195
|
+
createHeadlight ()
|
|
119196
|
+
{
|
|
119197
|
+
const headlight = new Lighting_DirectionalLight (this .getPrivateScene ());
|
|
119198
|
+
|
|
119199
|
+
headlight .setup ();
|
|
119200
|
+
|
|
119201
|
+
const headlightContainer = headlight .getLights () .pop ();
|
|
119202
|
+
|
|
119203
|
+
headlightContainer .set (headlight, null, Numbers_Matrix4 .Identity);
|
|
119204
|
+
headlightContainer .dispose = Function .prototype;
|
|
119205
|
+
|
|
119206
|
+
return headlightContainer;
|
|
119207
|
+
},
|
|
119229
119208
|
getHeadlight ()
|
|
119230
119209
|
{
|
|
119231
119210
|
return this [_headlightContainer];
|
|
@@ -119740,8 +119719,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
119740
119719
|
x_ite_Namespace .add ("X3DPickingContext", "x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
|
|
119741
119720
|
/* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
|
|
119742
119721
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
119743
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
119744
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
119722
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(302);
|
|
119723
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(376);
|
|
119745
119724
|
/*******************************************************************************
|
|
119746
119725
|
*
|
|
119747
119726
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -120565,14 +120544,11 @@ Object .assign (X3DPointingDeviceSensorContext .prototype,
|
|
|
120565
120544
|
|
|
120566
120545
|
let key = "";
|
|
120567
120546
|
|
|
120568
|
-
key += numClipPlanes;
|
|
120569
|
-
key += "
|
|
120547
|
+
key += numClipPlanes; // Could be more than 9.
|
|
120548
|
+
key += humanoidNode ?.getHumanoidKey () ?? "[]";
|
|
120570
120549
|
key += shapeNode .getShapeKey ();
|
|
120571
120550
|
key += geometryType;
|
|
120572
|
-
key += hasNormals;
|
|
120573
|
-
key += ".";
|
|
120574
|
-
key += humanoidNode ?.getHumanoidKey () ?? "";
|
|
120575
|
-
key += ".";
|
|
120551
|
+
key += hasNormals ? 1 : 0;
|
|
120576
120552
|
|
|
120577
120553
|
if (geometryType >= 2)
|
|
120578
120554
|
{
|
|
@@ -121045,7 +121021,7 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
|
|
|
121045
121021
|
x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
|
|
121046
121022
|
/* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
|
|
121047
121023
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
121048
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
121024
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(376);
|
|
121049
121025
|
/*******************************************************************************
|
|
121050
121026
|
*
|
|
121051
121027
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -121097,6 +121073,8 @@ x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFram
|
|
|
121097
121073
|
|
|
121098
121074
|
|
|
121099
121075
|
|
|
121076
|
+
|
|
121077
|
+
|
|
121100
121078
|
const
|
|
121101
121079
|
_viewport = Symbol (),
|
|
121102
121080
|
_frameBuffer = Symbol (),
|
|
@@ -121110,7 +121088,9 @@ const
|
|
|
121110
121088
|
|
|
121111
121089
|
function X3DRenderingContext ()
|
|
121112
121090
|
{
|
|
121113
|
-
|
|
121091
|
+
|
|
121092
|
+
this .addChildObjects (Base_X3DConstants .outputOnly, "viewport", new x_ite_Fields .MFInt32 (0, 0, 300, 150));
|
|
121093
|
+
|
|
121114
121094
|
this [_frameBuffer] = new Rendering_MultiSampleFrameBuffer (this, 300, 150, 4);
|
|
121115
121095
|
this [_localObjects] = [ ]; // shader objects dumpster
|
|
121116
121096
|
this [_depthShaders] = new Map ();
|
|
@@ -121202,7 +121182,7 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
121202
121182
|
},
|
|
121203
121183
|
getViewport ()
|
|
121204
121184
|
{
|
|
121205
|
-
return this
|
|
121185
|
+
return this ._viewport;
|
|
121206
121186
|
},
|
|
121207
121187
|
getLocalObjects ()
|
|
121208
121188
|
{
|
|
@@ -121260,13 +121240,10 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
121260
121240
|
|
|
121261
121241
|
let key = "";
|
|
121262
121242
|
|
|
121263
|
-
key += numClipPlanes;
|
|
121264
|
-
key += "
|
|
121243
|
+
key += numClipPlanes; // Could be more than 9.
|
|
121244
|
+
key += humanoidNode ?.getHumanoidKey () ?? "[]";
|
|
121265
121245
|
key += shapeNode .getShapeKey ();
|
|
121266
121246
|
key += geometryContext .geometryType;
|
|
121267
|
-
key += ".";
|
|
121268
|
-
key += humanoidNode ?.getHumanoidKey () ?? "";
|
|
121269
|
-
key += ".";
|
|
121270
121247
|
|
|
121271
121248
|
if (geometryContext .geometryType >= 2)
|
|
121272
121249
|
{
|
|
@@ -121320,6 +121297,32 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
121320
121297
|
|
|
121321
121298
|
return shaderNode;
|
|
121322
121299
|
},
|
|
121300
|
+
resize (width, height)
|
|
121301
|
+
{
|
|
121302
|
+
return new Promise (resolve =>
|
|
121303
|
+
{
|
|
121304
|
+
const key = Symbol ();
|
|
121305
|
+
|
|
121306
|
+
const test = () =>
|
|
121307
|
+
{
|
|
121308
|
+
if (this ._viewport [2] !== width)
|
|
121309
|
+
return;
|
|
121310
|
+
|
|
121311
|
+
if (this ._viewport [2] !== height)
|
|
121312
|
+
return;
|
|
121313
|
+
|
|
121314
|
+
this ._viewport .removeFieldCallback (key);
|
|
121315
|
+
|
|
121316
|
+
resolve ();
|
|
121317
|
+
}
|
|
121318
|
+
|
|
121319
|
+
this .getElement () .css ({ "width": `${width}px`, "height": `${height}px` });
|
|
121320
|
+
|
|
121321
|
+
this ._viewport .addFieldCallback (key, test);
|
|
121322
|
+
|
|
121323
|
+
test ();
|
|
121324
|
+
});
|
|
121325
|
+
},
|
|
121323
121326
|
reshape ()
|
|
121324
121327
|
{
|
|
121325
121328
|
const
|
|
@@ -121330,28 +121333,30 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
121330
121333
|
width = Math .max (canvas .width () * contentScale, 1),
|
|
121331
121334
|
height = Math .max (canvas .height () * contentScale, 1);
|
|
121332
121335
|
|
|
121336
|
+
this .addBrowserEvent ();
|
|
121337
|
+
|
|
121333
121338
|
canvas .prop ("width", width);
|
|
121334
121339
|
canvas .prop ("height", height);
|
|
121335
121340
|
|
|
121336
|
-
this
|
|
121337
|
-
this
|
|
121341
|
+
this ._viewport [2] = width;
|
|
121342
|
+
this ._viewport [3] = height;
|
|
121338
121343
|
|
|
121339
|
-
if (width
|
|
121340
|
-
height
|
|
121341
|
-
samples
|
|
121342
|
-
oit
|
|
121344
|
+
if (width === this [_frameBuffer] .getWidth () &&
|
|
121345
|
+
height === this [_frameBuffer] .getHeight () &&
|
|
121346
|
+
samples === this [_frameBuffer] .getSamples () &&
|
|
121347
|
+
oit === this [_frameBuffer] .getOIT ())
|
|
121343
121348
|
{
|
|
121344
|
-
|
|
121345
|
-
this [_frameBuffer] = new Rendering_MultiSampleFrameBuffer (this, width, height, samples, oit);
|
|
121346
|
-
|
|
121347
|
-
if (this [_transmissionBuffer])
|
|
121348
|
-
{
|
|
121349
|
-
this [_transmissionBuffer] .dispose ();
|
|
121350
|
-
this [_transmissionBuffer] = new Rendering_TextureBuffer (this, width, height, false, true);
|
|
121351
|
-
}
|
|
121349
|
+
return;
|
|
121352
121350
|
}
|
|
121353
121351
|
|
|
121354
|
-
this .
|
|
121352
|
+
this [_frameBuffer] .dispose ();
|
|
121353
|
+
this [_frameBuffer] = new Rendering_MultiSampleFrameBuffer (this, width, height, samples, oit);
|
|
121354
|
+
|
|
121355
|
+
if (!this [_transmissionBuffer])
|
|
121356
|
+
return;
|
|
121357
|
+
|
|
121358
|
+
this [_transmissionBuffer] .dispose ();
|
|
121359
|
+
this [_transmissionBuffer] = new Rendering_TextureBuffer (this, width, height, false, true);
|
|
121355
121360
|
},
|
|
121356
121361
|
onfullscreen ()
|
|
121357
121362
|
{
|
|
@@ -121610,7 +121615,7 @@ Object .assign (X3DShadersContext .prototype,
|
|
|
121610
121615
|
vertexShader .setup ();
|
|
121611
121616
|
|
|
121612
121617
|
const fragmentShader = new Shaders_ShaderPart (this .getPrivateScene ());
|
|
121613
|
-
fragmentShader ._type
|
|
121618
|
+
fragmentShader ._type = "FRAGMENT";
|
|
121614
121619
|
fragmentShader ._url .push (encodeURI (fs .startsWith ("data:") ? fs : "data:x-shader/x-fragment," + Shaders_ShaderRegistry .fragment [version] [fs]));
|
|
121615
121620
|
fragmentShader .setPrivate (true);
|
|
121616
121621
|
fragmentShader .setName (`${name}FragmentShader`);
|
|
@@ -122020,7 +122025,7 @@ const X3DSoundContext_default_ = X3DSoundContext;
|
|
|
122020
122025
|
x_ite_Namespace .add ("X3DSoundContext", "x_ite/Browser/Sound/X3DSoundContext", X3DSoundContext_default_);
|
|
122021
122026
|
/* harmony default export */ const Sound_X3DSoundContext = (X3DSoundContext_default_);
|
|
122022
122027
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/KTXDecoder.js
|
|
122023
|
-
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(
|
|
122028
|
+
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(376);
|
|
122024
122029
|
const KTXDecoder_default_ = class KTXDecoder
|
|
122025
122030
|
{
|
|
122026
122031
|
constructor (gl, externalKtxlib, scriptDir)
|
|
@@ -123189,7 +123194,8 @@ function X3DBrowserContext (element)
|
|
|
123189
123194
|
Base_X3DConstants .outputOnly, "timeEvents", new Fields_SFTime (),
|
|
123190
123195
|
Base_X3DConstants .outputOnly, "sensorEvents", new Fields_SFTime (),
|
|
123191
123196
|
Base_X3DConstants .outputOnly, "displayEvents", new Fields_SFTime (),
|
|
123192
|
-
Base_X3DConstants .outputOnly, "finishedEvents", new Fields_SFTime ()
|
|
123197
|
+
Base_X3DConstants .outputOnly, "finishedEvents", new Fields_SFTime (),
|
|
123198
|
+
Base_X3DConstants .outputOnly, "endEvents", new Fields_SFTime ());
|
|
123193
123199
|
|
|
123194
123200
|
this [X3DBrowserContext_tainted] = false;
|
|
123195
123201
|
this [_previousTime] = 0;
|
|
@@ -123274,6 +123280,10 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
|
|
|
123274
123280
|
{
|
|
123275
123281
|
return this ._finishedEvents;
|
|
123276
123282
|
},
|
|
123283
|
+
endEvents ()
|
|
123284
|
+
{
|
|
123285
|
+
return this ._endEvents;
|
|
123286
|
+
},
|
|
123277
123287
|
getBrowser ()
|
|
123278
123288
|
{
|
|
123279
123289
|
return this;
|
|
@@ -123299,6 +123309,21 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
|
|
|
123299
123309
|
this [X3DBrowserContext_tainted] = true;
|
|
123300
123310
|
this [_animFrame] = requestAnimationFrame (this [_renderCallback]);
|
|
123301
123311
|
},
|
|
123312
|
+
nextFrame ()
|
|
123313
|
+
{
|
|
123314
|
+
return new Promise (resolve =>
|
|
123315
|
+
{
|
|
123316
|
+
const key = Symbol ();
|
|
123317
|
+
|
|
123318
|
+
this .addBrowserEvent ();
|
|
123319
|
+
|
|
123320
|
+
this ._endEvents .addFieldCallback (key, () =>
|
|
123321
|
+
{
|
|
123322
|
+
this ._endEvents .removeFieldCallback (key);
|
|
123323
|
+
resolve ();
|
|
123324
|
+
});
|
|
123325
|
+
});
|
|
123326
|
+
},
|
|
123302
123327
|
[_limitFrameRate] (now)
|
|
123303
123328
|
{
|
|
123304
123329
|
if (now > this [_previousTime])
|
|
@@ -123327,7 +123352,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
|
|
|
123327
123352
|
this [_systemTime] .stop ();
|
|
123328
123353
|
this [_browserTime] .start ();
|
|
123329
123354
|
|
|
123330
|
-
//
|
|
123355
|
+
// Time
|
|
123331
123356
|
|
|
123332
123357
|
this .advanceTime ();
|
|
123333
123358
|
|
|
@@ -123374,6 +123399,9 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
|
|
|
123374
123399
|
this .getFrameBuffer () .blit ();
|
|
123375
123400
|
this [_displayTime] .stop ();
|
|
123376
123401
|
|
|
123402
|
+
this .addTaintedField (this ._endEvents);
|
|
123403
|
+
this [X3DBrowserContext_processEvents] ();
|
|
123404
|
+
|
|
123377
123405
|
// Finish
|
|
123378
123406
|
|
|
123379
123407
|
this [_browserTime] .stop ();
|
|
@@ -123611,7 +123639,7 @@ const Components_default_ = Components;
|
|
|
123611
123639
|
x_ite_Namespace .add ("Components", "x_ite/Components", Components_default_);
|
|
123612
123640
|
/* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
|
|
123613
123641
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
|
|
123614
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
123642
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(376);
|
|
123615
123643
|
/*******************************************************************************
|
|
123616
123644
|
* MIT License
|
|
123617
123645
|
*
|
|
@@ -124879,7 +124907,7 @@ const FieldTypes_default_ = new Configuration_FieldTypesArray (Object .values (x
|
|
|
124879
124907
|
x_ite_Namespace .add ("FieldTypes", "x_ite/Configuration/FieldTypes", FieldTypes_default_);
|
|
124880
124908
|
/* harmony default export */ const FieldTypes = (FieldTypes_default_);
|
|
124881
124909
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
|
|
124882
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
124910
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(376);
|
|
124883
124911
|
/*******************************************************************************
|
|
124884
124912
|
*
|
|
124885
124913
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -125981,7 +126009,7 @@ const X3DBrowser_default_ = X3DBrowser;
|
|
|
125981
126009
|
x_ite_Namespace .add ("X3DBrowser", "x_ite/Browser/X3DBrowser", X3DBrowser_default_);
|
|
125982
126010
|
/* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
|
|
125983
126011
|
;// CONCATENATED MODULE: ./src/x_ite/X3DCanvasElement.js
|
|
125984
|
-
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(
|
|
126012
|
+
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(376);
|
|
125985
126013
|
/*******************************************************************************
|
|
125986
126014
|
*
|
|
125987
126015
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -126033,13 +126061,19 @@ x_ite_Namespace .add ("X3DBrowser", "x_ite/Browser/X3DBrowser", X3DBrowser_defau
|
|
|
126033
126061
|
|
|
126034
126062
|
class X3DCanvasElement extends HTMLElement
|
|
126035
126063
|
{
|
|
126064
|
+
browser;
|
|
126065
|
+
|
|
126036
126066
|
constructor ()
|
|
126037
126067
|
{
|
|
126038
126068
|
try
|
|
126039
126069
|
{
|
|
126040
126070
|
super ();
|
|
126041
126071
|
|
|
126042
|
-
|
|
126072
|
+
Object .defineProperty (this, "browser",
|
|
126073
|
+
{
|
|
126074
|
+
value: new Browser_X3DBrowser (this),
|
|
126075
|
+
enumerable: true,
|
|
126076
|
+
});
|
|
126043
126077
|
}
|
|
126044
126078
|
catch (error)
|
|
126045
126079
|
{
|
|
@@ -126063,6 +126097,8 @@ class X3DCanvasElement extends HTMLElement
|
|
|
126063
126097
|
"baseURL",
|
|
126064
126098
|
"baseurl",
|
|
126065
126099
|
"cache",
|
|
126100
|
+
"colorSpace",
|
|
126101
|
+
"colorspace",
|
|
126066
126102
|
"contentScale",
|
|
126067
126103
|
"contentscale",
|
|
126068
126104
|
"contextMenu",
|
|
@@ -126123,8 +126159,8 @@ const X3DCanvasElement_default_ = X3DCanvasElement;
|
|
|
126123
126159
|
x_ite_Namespace .add ("X3DCanvasElement", "x_ite/X3DCanvasElement", X3DCanvasElement_default_);
|
|
126124
126160
|
/* harmony default export */ const x_ite_X3DCanvasElement = (X3DCanvasElement_default_);
|
|
126125
126161
|
;// CONCATENATED MODULE: ./src/lib/jquery.js
|
|
126126
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
126127
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
126162
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(376);
|
|
126163
|
+
/* provided dependency */ var pako = __webpack_require__(860);
|
|
126128
126164
|
Object .assign (jquery_$,
|
|
126129
126165
|
{
|
|
126130
126166
|
decodeText (input)
|
|
@@ -126201,14 +126237,14 @@ const jquery_default_ = jquery_$;
|
|
|
126201
126237
|
x_ite_Namespace .add ("jquery", "lib/jquery", jquery_default_);
|
|
126202
126238
|
/* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
|
|
126203
126239
|
;// CONCATENATED MODULE: ./src/lib/libtess.js
|
|
126204
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
126240
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(229);
|
|
126205
126241
|
const libtess_default_ = libtess_libtess;
|
|
126206
126242
|
;
|
|
126207
126243
|
|
|
126208
126244
|
x_ite_Namespace .add ("libtess", "lib/libtess", libtess_default_);
|
|
126209
126245
|
/* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
|
|
126210
126246
|
;// CONCATENATED MODULE: ./src/x_ite/X3D.js
|
|
126211
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
126247
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(376);
|
|
126212
126248
|
/*******************************************************************************
|
|
126213
126249
|
*
|
|
126214
126250
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -126516,7 +126552,7 @@ Object .assign (X3D,
|
|
|
126516
126552
|
|
|
126517
126553
|
// Assign X3D to global namespace.
|
|
126518
126554
|
|
|
126519
|
-
window [Symbol .for ("X_ITE.X3D-10.0.
|
|
126555
|
+
window [Symbol .for ("X_ITE.X3D-10.0.3")] = x_ite_X3D;
|
|
126520
126556
|
|
|
126521
126557
|
customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
|
|
126522
126558
|
|