x_ite 8.12.4 → 8.12.5
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/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 +13 -13
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +19 -19
- 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 +23 -23
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +26 -26
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +24 -24
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +23 -23
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +18 -18
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +17 -17
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +39 -39
- 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/TextureProjector.js +14 -14
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +30 -30
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +18 -18
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +9 -9
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +753 -916
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.min.mjs +1 -1
- package/dist/x_ite.mjs +753 -915
- package/dist/x_ite.zip +0 -0
- package/package.json +1 -2
package/dist/x_ite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* X_ITE v8.12.
|
|
1
|
+
/* X_ITE v8.12.5 */(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,386 +11,10 @@
|
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/
|
|
15
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
16
|
-
|
|
17
|
-
"use strict";
|
|
18
|
-
/* provided dependency */ var jQuery = __webpack_require__(864);
|
|
19
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Copyright Marc J. Schmidt. See the LICENSE file at the top-level
|
|
23
|
-
* directory of this distribution and at
|
|
24
|
-
* https://github.com/marcj/css-element-queries/blob/master/LICENSE.
|
|
25
|
-
*/
|
|
26
|
-
(function (root, factory) {
|
|
27
|
-
if (true) {
|
|
28
|
-
!(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
29
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
30
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
|
|
31
|
-
__WEBPACK_AMD_DEFINE_FACTORY__),
|
|
32
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
33
|
-
} else {}
|
|
34
|
-
}(typeof window !== 'undefined' ? window : this, function () {
|
|
35
|
-
|
|
36
|
-
// Make sure it does not throw in a SSR (Server Side Rendering) situation
|
|
37
|
-
if (typeof window === "undefined") {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
// https://github.com/Semantic-Org/Semantic-UI/issues/3855
|
|
41
|
-
// https://github.com/marcj/css-element-queries/issues/257
|
|
42
|
-
var globalWindow = typeof window != 'undefined' && window.Math == Math
|
|
43
|
-
? window
|
|
44
|
-
: typeof self != 'undefined' && self.Math == Math
|
|
45
|
-
? self
|
|
46
|
-
: Function('return this')();
|
|
47
|
-
// Only used for the dirty checking, so the event callback count is limited to max 1 call per fps per sensor.
|
|
48
|
-
// In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and
|
|
49
|
-
// would generate too many unnecessary events.
|
|
50
|
-
var requestAnimationFrame = globalWindow.requestAnimationFrame ||
|
|
51
|
-
globalWindow.mozRequestAnimationFrame ||
|
|
52
|
-
globalWindow.webkitRequestAnimationFrame ||
|
|
53
|
-
function (fn) {
|
|
54
|
-
return globalWindow.setTimeout(fn, 20);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
var cancelAnimationFrame = globalWindow.cancelAnimationFrame ||
|
|
58
|
-
globalWindow.mozCancelAnimationFrame ||
|
|
59
|
-
globalWindow.webkitCancelAnimationFrame ||
|
|
60
|
-
function (timer) {
|
|
61
|
-
globalWindow.clearTimeout(timer);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Iterate over each of the provided element(s).
|
|
66
|
-
*
|
|
67
|
-
* @param {HTMLElement|HTMLElement[]} elements
|
|
68
|
-
* @param {Function} callback
|
|
69
|
-
*/
|
|
70
|
-
function forEachElement(elements, callback){
|
|
71
|
-
var elementsType = Object.prototype.toString.call(elements);
|
|
72
|
-
var isCollectionTyped = ('[object Array]' === elementsType
|
|
73
|
-
|| ('[object NodeList]' === elementsType)
|
|
74
|
-
|| ('[object HTMLCollection]' === elementsType)
|
|
75
|
-
|| ('[object Object]' === elementsType)
|
|
76
|
-
|| ('undefined' !== typeof jQuery && elements instanceof jQuery) //jquery
|
|
77
|
-
|| ('undefined' !== typeof Elements && elements instanceof Elements) //mootools
|
|
78
|
-
);
|
|
79
|
-
var i = 0, j = elements.length;
|
|
80
|
-
if (isCollectionTyped) {
|
|
81
|
-
for (; i < j; i++) {
|
|
82
|
-
callback(elements[i]);
|
|
83
|
-
}
|
|
84
|
-
} else {
|
|
85
|
-
callback(elements);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Get element size
|
|
91
|
-
* @param {HTMLElement} element
|
|
92
|
-
* @returns {Object} {width, height}
|
|
93
|
-
*/
|
|
94
|
-
function getElementSize(element) {
|
|
95
|
-
if (!element.getBoundingClientRect) {
|
|
96
|
-
return {
|
|
97
|
-
width: element.offsetWidth,
|
|
98
|
-
height: element.offsetHeight
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
var rect = element.getBoundingClientRect();
|
|
103
|
-
return {
|
|
104
|
-
width: Math.round(rect.width),
|
|
105
|
-
height: Math.round(rect.height)
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Apply CSS styles to element.
|
|
111
|
-
*
|
|
112
|
-
* @param {HTMLElement} element
|
|
113
|
-
* @param {Object} style
|
|
114
|
-
*/
|
|
115
|
-
function setStyle(element, style) {
|
|
116
|
-
Object.keys(style).forEach(function(key) {
|
|
117
|
-
element.style[key] = style[key];
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Class for dimension change detection.
|
|
123
|
-
*
|
|
124
|
-
* @param {Element|Element[]|Elements|jQuery} element
|
|
125
|
-
* @param {Function} callback
|
|
126
|
-
*
|
|
127
|
-
* @constructor
|
|
128
|
-
*/
|
|
129
|
-
var ResizeSensor = function(element, callback) {
|
|
130
|
-
//Is used when checking in reset() only for invisible elements
|
|
131
|
-
var lastAnimationFrameForInvisibleCheck = 0;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
* @constructor
|
|
136
|
-
*/
|
|
137
|
-
function EventQueue() {
|
|
138
|
-
var q = [];
|
|
139
|
-
this.add = function(ev) {
|
|
140
|
-
q.push(ev);
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
var i, j;
|
|
144
|
-
this.call = function(sizeInfo) {
|
|
145
|
-
for (i = 0, j = q.length; i < j; i++) {
|
|
146
|
-
q[i].call(this, sizeInfo);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
this.remove = function(ev) {
|
|
151
|
-
var newQueue = [];
|
|
152
|
-
for(i = 0, j = q.length; i < j; i++) {
|
|
153
|
-
if(q[i] !== ev) newQueue.push(q[i]);
|
|
154
|
-
}
|
|
155
|
-
q = newQueue;
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
this.length = function() {
|
|
159
|
-
return q.length;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
*
|
|
165
|
-
* @param {HTMLElement} element
|
|
166
|
-
* @param {Function} resized
|
|
167
|
-
*/
|
|
168
|
-
function attachResizeEvent(element, resized) {
|
|
169
|
-
if (!element) return;
|
|
170
|
-
if (element.resizedAttached) {
|
|
171
|
-
element.resizedAttached.add(resized);
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
element.resizedAttached = new EventQueue();
|
|
176
|
-
element.resizedAttached.add(resized);
|
|
177
|
-
|
|
178
|
-
element.resizeSensor = document.createElement('div');
|
|
179
|
-
element.resizeSensor.dir = 'ltr';
|
|
180
|
-
element.resizeSensor.className = 'resize-sensor';
|
|
181
|
-
|
|
182
|
-
var style = {
|
|
183
|
-
pointerEvents: 'none',
|
|
184
|
-
position: 'absolute',
|
|
185
|
-
left: '0px',
|
|
186
|
-
top: '0px',
|
|
187
|
-
right: '0px',
|
|
188
|
-
bottom: '0px',
|
|
189
|
-
overflow: 'hidden',
|
|
190
|
-
zIndex: '-1',
|
|
191
|
-
visibility: 'hidden',
|
|
192
|
-
maxWidth: '100%'
|
|
193
|
-
};
|
|
194
|
-
var styleChild = {
|
|
195
|
-
position: 'absolute',
|
|
196
|
-
left: '0px',
|
|
197
|
-
top: '0px',
|
|
198
|
-
transition: '0s',
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
setStyle(element.resizeSensor, style);
|
|
202
|
-
|
|
203
|
-
var expand = document.createElement('div');
|
|
204
|
-
expand.className = 'resize-sensor-expand';
|
|
205
|
-
setStyle(expand, style);
|
|
206
|
-
|
|
207
|
-
var expandChild = document.createElement('div');
|
|
208
|
-
setStyle(expandChild, styleChild);
|
|
209
|
-
expand.appendChild(expandChild);
|
|
210
|
-
|
|
211
|
-
var shrink = document.createElement('div');
|
|
212
|
-
shrink.className = 'resize-sensor-shrink';
|
|
213
|
-
setStyle(shrink, style);
|
|
214
|
-
|
|
215
|
-
var shrinkChild = document.createElement('div');
|
|
216
|
-
setStyle(shrinkChild, styleChild);
|
|
217
|
-
setStyle(shrinkChild, { width: '200%', height: '200%' });
|
|
218
|
-
shrink.appendChild(shrinkChild);
|
|
219
|
-
|
|
220
|
-
element.resizeSensor.appendChild(expand);
|
|
221
|
-
element.resizeSensor.appendChild(shrink);
|
|
222
|
-
element.appendChild(element.resizeSensor);
|
|
223
|
-
|
|
224
|
-
var computedStyle = window.getComputedStyle(element);
|
|
225
|
-
var position = computedStyle ? computedStyle.getPropertyValue('position') : null;
|
|
226
|
-
if ('absolute' !== position && 'relative' !== position && 'fixed' !== position && 'sticky' !== position) {
|
|
227
|
-
element.style.position = 'relative';
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
var dirty = false;
|
|
231
|
-
|
|
232
|
-
//last request animation frame id used in onscroll event
|
|
233
|
-
var rafId = 0;
|
|
234
|
-
var size = getElementSize(element);
|
|
235
|
-
var lastWidth = 0;
|
|
236
|
-
var lastHeight = 0;
|
|
237
|
-
var initialHiddenCheck = true;
|
|
238
|
-
lastAnimationFrameForInvisibleCheck = 0;
|
|
239
|
-
|
|
240
|
-
var resetExpandShrink = function () {
|
|
241
|
-
var width = element.offsetWidth;
|
|
242
|
-
var height = element.offsetHeight;
|
|
243
|
-
|
|
244
|
-
expandChild.style.width = (width + 10) + 'px';
|
|
245
|
-
expandChild.style.height = (height + 10) + 'px';
|
|
246
|
-
|
|
247
|
-
expand.scrollLeft = width + 10;
|
|
248
|
-
expand.scrollTop = height + 10;
|
|
249
|
-
|
|
250
|
-
shrink.scrollLeft = width + 10;
|
|
251
|
-
shrink.scrollTop = height + 10;
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
var reset = function() {
|
|
255
|
-
// Check if element is hidden
|
|
256
|
-
if (initialHiddenCheck) {
|
|
257
|
-
var invisible = element.offsetWidth === 0 && element.offsetHeight === 0;
|
|
258
|
-
if (invisible) {
|
|
259
|
-
// Check in next frame
|
|
260
|
-
if (!lastAnimationFrameForInvisibleCheck){
|
|
261
|
-
lastAnimationFrameForInvisibleCheck = requestAnimationFrame(function(){
|
|
262
|
-
lastAnimationFrameForInvisibleCheck = 0;
|
|
263
|
-
reset();
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
return;
|
|
268
|
-
} else {
|
|
269
|
-
// Stop checking
|
|
270
|
-
initialHiddenCheck = false;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
resetExpandShrink();
|
|
275
|
-
};
|
|
276
|
-
element.resizeSensor.resetSensor = reset;
|
|
277
|
-
|
|
278
|
-
var onResized = function() {
|
|
279
|
-
rafId = 0;
|
|
280
|
-
|
|
281
|
-
if (!dirty) return;
|
|
282
|
-
|
|
283
|
-
lastWidth = size.width;
|
|
284
|
-
lastHeight = size.height;
|
|
285
|
-
|
|
286
|
-
if (element.resizedAttached) {
|
|
287
|
-
element.resizedAttached.call(size);
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
var onScroll = function() {
|
|
292
|
-
size = getElementSize(element);
|
|
293
|
-
dirty = size.width !== lastWidth || size.height !== lastHeight;
|
|
294
|
-
|
|
295
|
-
if (dirty && !rafId) {
|
|
296
|
-
rafId = requestAnimationFrame(onResized);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
reset();
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
var addEvent = function(el, name, cb) {
|
|
303
|
-
if (el.attachEvent) {
|
|
304
|
-
el.attachEvent('on' + name, cb);
|
|
305
|
-
} else {
|
|
306
|
-
el.addEventListener(name, cb);
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
addEvent(expand, 'scroll', onScroll);
|
|
311
|
-
addEvent(shrink, 'scroll', onScroll);
|
|
312
|
-
|
|
313
|
-
// Fix for custom Elements and invisible elements
|
|
314
|
-
lastAnimationFrameForInvisibleCheck = requestAnimationFrame(function(){
|
|
315
|
-
lastAnimationFrameForInvisibleCheck = 0;
|
|
316
|
-
reset();
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
forEachElement(element, function(elem){
|
|
321
|
-
attachResizeEvent(elem, callback);
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
this.detach = function(ev) {
|
|
325
|
-
// clean up the unfinished animation frame to prevent a potential endless requestAnimationFrame of reset
|
|
326
|
-
if (!lastAnimationFrameForInvisibleCheck) {
|
|
327
|
-
cancelAnimationFrame(lastAnimationFrameForInvisibleCheck);
|
|
328
|
-
lastAnimationFrameForInvisibleCheck = 0;
|
|
329
|
-
}
|
|
330
|
-
ResizeSensor.detach(element, ev);
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
this.reset = function() {
|
|
334
|
-
element.resizeSensor.resetSensor();
|
|
335
|
-
};
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
ResizeSensor.reset = function(element) {
|
|
339
|
-
forEachElement(element, function(elem){
|
|
340
|
-
elem.resizeSensor.resetSensor();
|
|
341
|
-
});
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
ResizeSensor.detach = function(element, ev) {
|
|
345
|
-
forEachElement(element, function(elem){
|
|
346
|
-
if (!elem) return;
|
|
347
|
-
if(elem.resizedAttached && typeof ev === "function"){
|
|
348
|
-
elem.resizedAttached.remove(ev);
|
|
349
|
-
if(elem.resizedAttached.length()) return;
|
|
350
|
-
}
|
|
351
|
-
if (elem.resizeSensor) {
|
|
352
|
-
if (elem.contains(elem.resizeSensor)) {
|
|
353
|
-
elem.removeChild(elem.resizeSensor);
|
|
354
|
-
}
|
|
355
|
-
delete elem.resizeSensor;
|
|
356
|
-
delete elem.resizedAttached;
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
if (typeof MutationObserver !== "undefined") {
|
|
362
|
-
var observer = new MutationObserver(function (mutations) {
|
|
363
|
-
for (var i in mutations) {
|
|
364
|
-
if (mutations.hasOwnProperty(i)) {
|
|
365
|
-
var items = mutations[i].addedNodes;
|
|
366
|
-
for (var j = 0; j < items.length; j++) {
|
|
367
|
-
if (items[j].resizeSensor) {
|
|
368
|
-
ResizeSensor.reset(items[j]);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
});
|
|
374
|
-
|
|
375
|
-
document.addEventListener("DOMContentLoaded", function (event) {
|
|
376
|
-
observer.observe(document.body, {
|
|
377
|
-
childList: true,
|
|
378
|
-
subtree: true,
|
|
379
|
-
});
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
return ResizeSensor;
|
|
384
|
-
|
|
385
|
-
}));
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
/***/ }),
|
|
389
|
-
|
|
390
|
-
/***/ 543:
|
|
14
|
+
/***/ 196:
|
|
391
15
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
392
16
|
|
|
393
|
-
/* provided dependency */ var jQuery = __webpack_require__(
|
|
17
|
+
/* provided dependency */ var jQuery = __webpack_require__(659);
|
|
394
18
|
/**
|
|
395
19
|
* @preserve jquery.fullscreen 1.1.5
|
|
396
20
|
* https://github.com/code-lts/jquery-fullscreen-plugin
|
|
@@ -586,7 +210,7 @@ installFullScreenHandlers();
|
|
|
586
210
|
|
|
587
211
|
/***/ }),
|
|
588
212
|
|
|
589
|
-
/***/
|
|
213
|
+
/***/ 946:
|
|
590
214
|
/***/ ((module, exports, __webpack_require__) => {
|
|
591
215
|
|
|
592
216
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -600,7 +224,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
600
224
|
(function (factory) {
|
|
601
225
|
if ( true ) {
|
|
602
226
|
// AMD. Register as an anonymous module.
|
|
603
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(
|
|
227
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(659)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
604
228
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
605
229
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
606
230
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
@@ -811,7 +435,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
811
435
|
|
|
812
436
|
/***/ }),
|
|
813
437
|
|
|
814
|
-
/***/
|
|
438
|
+
/***/ 659:
|
|
815
439
|
/***/ (function(module, exports) {
|
|
816
440
|
|
|
817
441
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -11535,7 +11159,7 @@ return jQuery;
|
|
|
11535
11159
|
|
|
11536
11160
|
/***/ }),
|
|
11537
11161
|
|
|
11538
|
-
/***/
|
|
11162
|
+
/***/ 793:
|
|
11539
11163
|
/***/ ((module) => {
|
|
11540
11164
|
|
|
11541
11165
|
/**
|
|
@@ -16314,7 +15938,7 @@ if (true) {
|
|
|
16314
15938
|
|
|
16315
15939
|
/***/ }),
|
|
16316
15940
|
|
|
16317
|
-
/***/
|
|
15941
|
+
/***/ 822:
|
|
16318
15942
|
/***/ (function(__unused_webpack_module, exports) {
|
|
16319
15943
|
|
|
16320
15944
|
|
|
@@ -19559,7 +19183,7 @@ if (true) {
|
|
|
19559
19183
|
|
|
19560
19184
|
/***/ }),
|
|
19561
19185
|
|
|
19562
|
-
/***/
|
|
19186
|
+
/***/ 357:
|
|
19563
19187
|
/***/ (function(module, exports) {
|
|
19564
19188
|
|
|
19565
19189
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -20687,7 +20311,7 @@ Object .defineProperty (Namespace, "add",
|
|
|
20687
20311
|
}
|
|
20688
20312
|
else
|
|
20689
20313
|
{
|
|
20690
|
-
const X3D = window [Symbol .for ("X_ITE.X3D-8.12.
|
|
20314
|
+
const X3D = window [Symbol .for ("X_ITE.X3D-8.12.5")];
|
|
20691
20315
|
|
|
20692
20316
|
if (X3D)
|
|
20693
20317
|
X3D [name] = module;
|
|
@@ -34407,7 +34031,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
|
|
|
34407
34031
|
x_ite_Namespace .add ("X3DBaseNode", "x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
|
|
34408
34032
|
/* harmony default export */ const Base_X3DBaseNode = (X3DBaseNode_default_);
|
|
34409
34033
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Legacy.js
|
|
34410
|
-
/* provided dependency */ var $ = __webpack_require__(
|
|
34034
|
+
/* provided dependency */ var $ = __webpack_require__(659);
|
|
34411
34035
|
/*******************************************************************************
|
|
34412
34036
|
*
|
|
34413
34037
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -34544,7 +34168,7 @@ x_ite_Namespace .add ("Legacy", "x_ite/Browser/Legacy", Legacy_default_);
|
|
|
34544
34168
|
*
|
|
34545
34169
|
******************************************************************************/
|
|
34546
34170
|
|
|
34547
|
-
const VERSION_default_ = "8.12.
|
|
34171
|
+
const VERSION_default_ = "8.12.5";
|
|
34548
34172
|
;
|
|
34549
34173
|
|
|
34550
34174
|
x_ite_Namespace .add ("VERSION", "x_ite/Browser/VERSION", VERSION_default_);
|
|
@@ -38432,7 +38056,7 @@ const X3DProtoDeclarationNode_default_ = X3DProtoDeclarationNode;
|
|
|
38432
38056
|
x_ite_Namespace .add ("X3DProtoDeclarationNode", "x_ite/Prototype/X3DProtoDeclarationNode", X3DProtoDeclarationNode_default_);
|
|
38433
38057
|
/* harmony default export */ const Prototype_X3DProtoDeclarationNode = (X3DProtoDeclarationNode_default_);
|
|
38434
38058
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
|
|
38435
|
-
/* provided dependency */ var X3DParser_$ = __webpack_require__(
|
|
38059
|
+
/* provided dependency */ var X3DParser_$ = __webpack_require__(659);
|
|
38436
38060
|
/*******************************************************************************
|
|
38437
38061
|
*
|
|
38438
38062
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -39257,7 +38881,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
|
|
|
39257
38881
|
x_ite_Namespace .add ("X3DProtoDeclaration", "x_ite/Prototype/X3DProtoDeclaration", X3DProtoDeclaration_default_);
|
|
39258
38882
|
/* harmony default export */ const Prototype_X3DProtoDeclaration = (X3DProtoDeclaration_default_);
|
|
39259
38883
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/VRMLParser.js
|
|
39260
|
-
/* provided dependency */ var VRMLParser_$ = __webpack_require__(
|
|
38884
|
+
/* provided dependency */ var VRMLParser_$ = __webpack_require__(659);
|
|
39261
38885
|
/*******************************************************************************
|
|
39262
38886
|
*
|
|
39263
38887
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -41802,7 +41426,7 @@ const VRMLParser_default_ = VRMLParser;
|
|
|
41802
41426
|
x_ite_Namespace .add ("VRMLParser", "x_ite/Parser/VRMLParser", VRMLParser_default_);
|
|
41803
41427
|
/* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
|
|
41804
41428
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
|
|
41805
|
-
/* provided dependency */ var XMLParser_$ = __webpack_require__(
|
|
41429
|
+
/* provided dependency */ var XMLParser_$ = __webpack_require__(659);
|
|
41806
41430
|
/*******************************************************************************
|
|
41807
41431
|
*
|
|
41808
41432
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -43857,7 +43481,7 @@ const URLs_default_ = URLs;
|
|
|
43857
43481
|
x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
|
|
43858
43482
|
/* harmony default export */ const Networking_URLs = (URLs_default_);
|
|
43859
43483
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
|
|
43860
|
-
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(
|
|
43484
|
+
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(659);
|
|
43861
43485
|
/*******************************************************************************
|
|
43862
43486
|
*
|
|
43863
43487
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -44164,12 +43788,12 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
44164
43788
|
}
|
|
44165
43789
|
}
|
|
44166
43790
|
},
|
|
44167
|
-
khrLightsPunctualObject (
|
|
43791
|
+
khrLightsPunctualObject (KHR_lights_punctual)
|
|
44168
43792
|
{
|
|
44169
|
-
if (!(
|
|
43793
|
+
if (!(KHR_lights_punctual instanceof Object))
|
|
44170
43794
|
return;
|
|
44171
43795
|
|
|
44172
|
-
this .lightsArray (
|
|
43796
|
+
this .lightsArray (KHR_lights_punctual .lights);
|
|
44173
43797
|
},
|
|
44174
43798
|
lightsArray (lights)
|
|
44175
43799
|
{
|
|
@@ -44236,10 +43860,9 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
44236
43860
|
scene = this .getExecutionContext (),
|
|
44237
43861
|
lightNode = scene .createNode ("SpotLight", false);
|
|
44238
43862
|
|
|
44239
|
-
lightNode ._radius = this .numberValue (light .range, 0) ||
|
|
43863
|
+
lightNode ._radius = this .numberValue (light .range, 0) || -1;
|
|
44240
43864
|
lightNode ._cutOffAngle = this .numberValue (light .outerConeAngle, Math .PI / 4);
|
|
44241
43865
|
lightNode ._beamWidth = this .numberValue (light .innerConeAngle, 0);
|
|
44242
|
-
lightNode ._attenuation = new Numbers_Vector3 (0, 0, 1);
|
|
44243
43866
|
|
|
44244
43867
|
return lightNode;
|
|
44245
43868
|
},
|
|
@@ -44249,8 +43872,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
44249
43872
|
scene = this .getExecutionContext (),
|
|
44250
43873
|
lightNode = scene .createNode ("PointLight", false);
|
|
44251
43874
|
|
|
44252
|
-
lightNode ._radius
|
|
44253
|
-
lightNode ._attenuation = new Numbers_Vector3 (0, 0, 1);
|
|
43875
|
+
lightNode ._radius = this .numberValue (light .range, 0) || -1;
|
|
44254
43876
|
|
|
44255
43877
|
return lightNode;
|
|
44256
43878
|
},
|
|
@@ -44384,6 +44006,42 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
44384
44006
|
},
|
|
44385
44007
|
configurable: true,
|
|
44386
44008
|
});
|
|
44009
|
+
|
|
44010
|
+
Object .defineProperty (accessor, "normalizedArray",
|
|
44011
|
+
{
|
|
44012
|
+
get: () =>
|
|
44013
|
+
{
|
|
44014
|
+
switch (accessor .componentType)
|
|
44015
|
+
{
|
|
44016
|
+
case 5120: // Int8Array
|
|
44017
|
+
var value = Float32Array .from (accessor .array, v => Math .max (v / 127, -1));
|
|
44018
|
+
break;
|
|
44019
|
+
case 5121: // Uint8Array
|
|
44020
|
+
var value = Float32Array .from (accessor .array, v => v / 255);
|
|
44021
|
+
break;
|
|
44022
|
+
case 5122: // Int16Array
|
|
44023
|
+
var value = Float32Array .from (accessor .array, v => Math .max (v / 32767, -1));
|
|
44024
|
+
break;
|
|
44025
|
+
case 5123: // Uint16Array
|
|
44026
|
+
var value = Float32Array .from (accessor .array, v => v / 65535);
|
|
44027
|
+
break;
|
|
44028
|
+
case 5124: // Int32Array
|
|
44029
|
+
var value = Float32Array .from (accessor .array, v => Math .max (v / 2147483647, -1));
|
|
44030
|
+
break;
|
|
44031
|
+
case 5125: // Uint32Array
|
|
44032
|
+
var value = Float32Array .from (accessor .array, v => v / 4294967295);
|
|
44033
|
+
break;
|
|
44034
|
+
case 5126: // Float32Array
|
|
44035
|
+
var value = accessor .array;
|
|
44036
|
+
break;
|
|
44037
|
+
}
|
|
44038
|
+
|
|
44039
|
+
Object .defineProperty (accessor, "normalizedArray", { value: value });
|
|
44040
|
+
|
|
44041
|
+
return value;
|
|
44042
|
+
},
|
|
44043
|
+
configurable: true,
|
|
44044
|
+
});
|
|
44387
44045
|
};
|
|
44388
44046
|
})(),
|
|
44389
44047
|
sparseObject: (() =>
|
|
@@ -44621,7 +44279,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
44621
44279
|
|
|
44622
44280
|
const texCoordIndices = this .texCoordIndices ("", material);
|
|
44623
44281
|
|
|
44624
|
-
this .texCoordIndex =
|
|
44282
|
+
this .texCoordIndex = Array .from (texCoordIndices) .reduce (Math .max, -1);
|
|
44625
44283
|
this .textureTransformNodes = [ ];
|
|
44626
44284
|
this .texCoordMappings = new Map ();
|
|
44627
44285
|
material .texCoordMappings = this .texCoordMappings;
|
|
@@ -45423,7 +45081,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45423
45081
|
|
|
45424
45082
|
// Add light.
|
|
45425
45083
|
|
|
45426
|
-
this .
|
|
45084
|
+
this .nodeLight (node .extensions ?.KHR_lights_punctual, transformNode);
|
|
45427
45085
|
|
|
45428
45086
|
// Add children.
|
|
45429
45087
|
|
|
@@ -45432,7 +45090,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45432
45090
|
// Add Shape nodes.
|
|
45433
45091
|
|
|
45434
45092
|
if (shapeNodes)
|
|
45435
|
-
transformNode ._children .push (... shapeNodes);
|
|
45093
|
+
transformNode ._children .push (... this .meshInstancing (node .extensions ?.EXT_mesh_gpu_instancing, shapeNodes));
|
|
45436
45094
|
|
|
45437
45095
|
transformNode .setup ();
|
|
45438
45096
|
|
|
@@ -45490,19 +45148,12 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45490
45148
|
|
|
45491
45149
|
humanoidNode ._skin .push (transformNode);
|
|
45492
45150
|
},
|
|
45493
|
-
|
|
45494
|
-
{
|
|
45495
|
-
if (!(extensions instanceof Object))
|
|
45496
|
-
return;
|
|
45497
|
-
|
|
45498
|
-
this .nodeLight (extensions .KHR_lights_punctual, transformNode);
|
|
45499
|
-
},
|
|
45500
|
-
nodeLight (khrLightsPunctual, transformNode)
|
|
45151
|
+
nodeLight (KHR_lights_punctual, transformNode)
|
|
45501
45152
|
{
|
|
45502
|
-
if (!(
|
|
45153
|
+
if (!(KHR_lights_punctual instanceof Object))
|
|
45503
45154
|
return;
|
|
45504
45155
|
|
|
45505
|
-
const lightNode = this .lightObject (this .lights [
|
|
45156
|
+
const lightNode = this .lightObject (this .lights [KHR_lights_punctual .light]);
|
|
45506
45157
|
|
|
45507
45158
|
if (!lightNode)
|
|
45508
45159
|
return;
|
|
@@ -45511,16 +45162,81 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45511
45162
|
|
|
45512
45163
|
transformNode ._children .push (lightNode);
|
|
45513
45164
|
},
|
|
45165
|
+
meshInstancing (EXT_mesh_gpu_instancing, shapeNodes)
|
|
45166
|
+
{
|
|
45167
|
+
if (!(EXT_mesh_gpu_instancing instanceof Object))
|
|
45168
|
+
return shapeNodes;
|
|
45169
|
+
|
|
45170
|
+
let
|
|
45171
|
+
attributes = EXT_mesh_gpu_instancing .attributes,
|
|
45172
|
+
translation = this .accessors [attributes ?.TRANSLATION],
|
|
45173
|
+
rotation = this .accessors [attributes ?.ROTATION],
|
|
45174
|
+
scale = this .accessors [attributes ?.SCALE],
|
|
45175
|
+
count = Math .max (translation ?.count ?? 0, rotation ?.count ?? 0, scale ?.count ?? 0);
|
|
45176
|
+
|
|
45177
|
+
if (!count)
|
|
45178
|
+
return shapeNodes;
|
|
45179
|
+
|
|
45180
|
+
if (translation ?.type !== "VEC3")
|
|
45181
|
+
translation = null;
|
|
45182
|
+
|
|
45183
|
+
if (rotation ?.type !== "VEC4")
|
|
45184
|
+
rotation = null;
|
|
45185
|
+
|
|
45186
|
+
if (scale ?.type !== "VEC3")
|
|
45187
|
+
scale = null;
|
|
45188
|
+
|
|
45189
|
+
const
|
|
45190
|
+
scene = this .getScene (),
|
|
45191
|
+
transformNodes = [ ],
|
|
45192
|
+
tArray = translation ?.array,
|
|
45193
|
+
rArray = rotation ?.normalizedArray,
|
|
45194
|
+
sArray = scale ?.array;
|
|
45195
|
+
|
|
45196
|
+
for (let i = 0; i < count; ++ i)
|
|
45197
|
+
{
|
|
45198
|
+
const transformNode = scene .createNode ("Transform", false);
|
|
45199
|
+
|
|
45200
|
+
if (translation && i < translation .count)
|
|
45201
|
+
{
|
|
45202
|
+
transformNode ._translation = new Numbers_Vector3 (tArray [i * 3 + 0],
|
|
45203
|
+
tArray [i * 3 + 1],
|
|
45204
|
+
tArray [i * 3 + 2]);
|
|
45205
|
+
}
|
|
45206
|
+
|
|
45207
|
+
if (rotation && i < rotation .count)
|
|
45208
|
+
{
|
|
45209
|
+
transformNode ._rotation = new Numbers_Rotation4 (new Numbers_Quaternion (rArray [i * 4 + 0],
|
|
45210
|
+
rArray [i * 4 + 1],
|
|
45211
|
+
rArray [i * 4 + 2],
|
|
45212
|
+
rArray [i * 4 + 3]));
|
|
45213
|
+
}
|
|
45214
|
+
|
|
45215
|
+
if (scale && i < scale .count)
|
|
45216
|
+
{
|
|
45217
|
+
transformNode ._scale = new Numbers_Vector3 (sArray [i * 3 + 0],
|
|
45218
|
+
sArray [i * 3 + 1],
|
|
45219
|
+
sArray [i * 3 + 2]);
|
|
45220
|
+
}
|
|
45221
|
+
|
|
45222
|
+
transformNode ._children = shapeNodes;
|
|
45223
|
+
|
|
45224
|
+
transformNode .setup ();
|
|
45225
|
+
transformNodes .push (transformNode);
|
|
45226
|
+
}
|
|
45227
|
+
|
|
45228
|
+
return transformNodes;
|
|
45229
|
+
},
|
|
45514
45230
|
nodeChildrenArray (children)
|
|
45515
45231
|
{
|
|
45516
45232
|
if (!(children instanceof Array))
|
|
45517
45233
|
return [ ];
|
|
45518
45234
|
|
|
45519
|
-
const nodes =
|
|
45235
|
+
const nodes = Array .from (new Set (children
|
|
45520
45236
|
.map (index => this .nodes [index] ?.childNode)
|
|
45521
45237
|
.filter (node => node)
|
|
45522
45238
|
.filter (node => node .getTypeName () !== "HAnimHumanoid" || !node .getCloneCount ())
|
|
45523
|
-
)
|
|
45239
|
+
));
|
|
45524
45240
|
|
|
45525
45241
|
return nodes;
|
|
45526
45242
|
},
|
|
@@ -45796,7 +45512,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
45796
45512
|
if (!output .array .length)
|
|
45797
45513
|
return [ ];
|
|
45798
45514
|
|
|
45799
|
-
return this .createInterpolator (timeSensorNode, node, target, sampler .interpolation, input .array, output
|
|
45515
|
+
return this .createInterpolator (timeSensorNode, node, target, sampler .interpolation, input .array, output, timeSensorNode ._cycleInterval .getValue ());
|
|
45800
45516
|
},
|
|
45801
45517
|
createNavigationInfo ()
|
|
45802
45518
|
{
|
|
@@ -46222,29 +45938,9 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46222
45938
|
opaque = appearanceNode ._alphaMode .getValue () === "OPAQUE",
|
|
46223
45939
|
colorNode = scene .createNode (opaque ? "Color" : typeName, false);
|
|
46224
45940
|
|
|
46225
|
-
|
|
46226
|
-
? color .
|
|
46227
|
-
: color .
|
|
46228
|
-
|
|
46229
|
-
switch (color .componentType)
|
|
46230
|
-
{
|
|
46231
|
-
case 5120: // Int8Array
|
|
46232
|
-
case 5122: // Int16Array
|
|
46233
|
-
case 5124: // Int32Array
|
|
46234
|
-
break;
|
|
46235
|
-
case 5121: // Uint8Array
|
|
46236
|
-
colorNode ._color = array .map (v => v / 0xff);
|
|
46237
|
-
break;
|
|
46238
|
-
case 5123: // Uint16Array
|
|
46239
|
-
colorNode ._color = array .map (v => v / 0xffff);
|
|
46240
|
-
break;
|
|
46241
|
-
case 5125: // Uint32Array
|
|
46242
|
-
colorNode ._color = array .map (v => v / 0xffffffff);
|
|
46243
|
-
break;
|
|
46244
|
-
case 5126: // Float32Array
|
|
46245
|
-
colorNode ._color = array;
|
|
46246
|
-
break;
|
|
46247
|
-
}
|
|
45941
|
+
colorNode ._color = opaque && typeName !== "Color"
|
|
45942
|
+
? color .normalizedArray .filter ((_, i) => (i + 1) % 4)
|
|
45943
|
+
: color .normalizedArray;
|
|
46248
45944
|
|
|
46249
45945
|
colorNode .setup ();
|
|
46250
45946
|
|
|
@@ -46269,13 +45965,11 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46269
45965
|
}
|
|
46270
45966
|
case 1:
|
|
46271
45967
|
{
|
|
46272
|
-
return texCoords .textureCoordinateNode =
|
|
46273
|
-
.map (([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping)) [0];
|
|
45968
|
+
return texCoords .textureCoordinateNode = Array .from (material .texCoordMappings .entries (), ([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping)) [0];
|
|
46274
45969
|
}
|
|
46275
45970
|
default:
|
|
46276
45971
|
{
|
|
46277
|
-
const textureCoordinateNodes =
|
|
46278
|
-
.map (([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping))
|
|
45972
|
+
const textureCoordinateNodes = Array .from (material .texCoordMappings .entries (), ([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping))
|
|
46279
45973
|
.filter (node => node)
|
|
46280
45974
|
.sort ((a, b) => Math_Algorithm .cmp (a ._mapping .getValue (), b ._mapping .getValue ()));
|
|
46281
45975
|
|
|
@@ -46307,7 +46001,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46307
46001
|
textureCoordinateNode = scene .createNode ("TextureCoordinate", false);
|
|
46308
46002
|
|
|
46309
46003
|
textureCoordinateNode ._mapping = mapping;
|
|
46310
|
-
textureCoordinateNode ._point = texCoord .
|
|
46004
|
+
textureCoordinateNode ._point = texCoord .normalizedArray;
|
|
46311
46005
|
|
|
46312
46006
|
textureCoordinateNode .setup ();
|
|
46313
46007
|
|
|
@@ -46325,7 +46019,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46325
46019
|
scene = this .getExecutionContext (),
|
|
46326
46020
|
normalNode = scene .createNode ("Normal", false);
|
|
46327
46021
|
|
|
46328
|
-
normalNode ._vector = normal .
|
|
46022
|
+
normalNode ._vector = normal .normalizedArray;
|
|
46329
46023
|
|
|
46330
46024
|
if ((targets instanceof Array) && (weights instanceof Array))
|
|
46331
46025
|
{
|
|
@@ -46406,7 +46100,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46406
46100
|
const
|
|
46407
46101
|
start = skin .coordinateNode ._point .length,
|
|
46408
46102
|
jointsArray = joints .array,
|
|
46409
|
-
weightsArray = weights .
|
|
46103
|
+
weightsArray = weights .normalizedArray,
|
|
46410
46104
|
numVertices = jointsArray .length / 4;
|
|
46411
46105
|
|
|
46412
46106
|
for (let v = 0; v < numVertices; ++ v)
|
|
@@ -46524,7 +46218,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46524
46218
|
{
|
|
46525
46219
|
case "translation":
|
|
46526
46220
|
{
|
|
46527
|
-
const interpolatorNode = this .createPositionInterpolator (interpolation, times, keyValues, cycleInterval);
|
|
46221
|
+
const interpolatorNode = this .createPositionInterpolator (interpolation, times, keyValues .array, cycleInterval);
|
|
46528
46222
|
|
|
46529
46223
|
scene .addNamedNode (scene .getUniqueName ("TranslationInterpolator"), interpolatorNode);
|
|
46530
46224
|
|
|
@@ -46535,7 +46229,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46535
46229
|
}
|
|
46536
46230
|
case "rotation":
|
|
46537
46231
|
{
|
|
46538
|
-
const interpolatorNode = this .createOrientationInterpolator (interpolation, times, keyValues, cycleInterval);
|
|
46232
|
+
const interpolatorNode = this .createOrientationInterpolator (interpolation, times, keyValues .normalizedArray, cycleInterval);
|
|
46539
46233
|
|
|
46540
46234
|
scene .addNamedNode (scene .getUniqueName ("RotationInterpolator"), interpolatorNode);
|
|
46541
46235
|
|
|
@@ -46546,7 +46240,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46546
46240
|
}
|
|
46547
46241
|
case "scale":
|
|
46548
46242
|
{
|
|
46549
|
-
const interpolatorNode = this .createPositionInterpolator (interpolation, times, keyValues, cycleInterval);
|
|
46243
|
+
const interpolatorNode = this .createPositionInterpolator (interpolation, times, keyValues .array, cycleInterval);
|
|
46550
46244
|
|
|
46551
46245
|
scene .addNamedNode (scene .getUniqueName ("ScaleInterpolator"), interpolatorNode);
|
|
46552
46246
|
|
|
@@ -46573,7 +46267,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46573
46267
|
if (!geometryNode)
|
|
46574
46268
|
continue;
|
|
46575
46269
|
|
|
46576
|
-
const coordinateInterpolatorNode = this .createArrayInterpolator ("
|
|
46270
|
+
const coordinateInterpolatorNode = this .createArrayInterpolator ("CoordinateInterpolator", interpolation, times, keyValues .normalizedArray, cycleInterval, targets, attributes, "POSITION", false);
|
|
46577
46271
|
|
|
46578
46272
|
if (coordinateInterpolatorNode)
|
|
46579
46273
|
{
|
|
@@ -46583,7 +46277,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46583
46277
|
scene .addRoute (coordinateInterpolatorNode, "value_changed", geometryNode ._coord, "set_point");
|
|
46584
46278
|
}
|
|
46585
46279
|
|
|
46586
|
-
const normalInterpolatorNode = this .createArrayInterpolator ("
|
|
46280
|
+
const normalInterpolatorNode = this .createArrayInterpolator ("NormalInterpolator", interpolation, times, keyValues .normalizedArray, cycleInterval, targets, attributes, "NORMAL", true);
|
|
46587
46281
|
|
|
46588
46282
|
if (normalInterpolatorNode)
|
|
46589
46283
|
{
|
|
@@ -46660,8 +46354,9 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46660
46354
|
keyValues [i + 2]));
|
|
46661
46355
|
}
|
|
46662
46356
|
|
|
46663
|
-
const
|
|
46664
|
-
|
|
46357
|
+
const
|
|
46358
|
+
length = Math .floor (times .at (-1) * SAMPLES_PER_SECOND),
|
|
46359
|
+
samples = Array .from ({ length: length }, (_, i) => i / (length - 1) * times .at (-1))
|
|
46665
46360
|
|
|
46666
46361
|
for (const t of samples)
|
|
46667
46362
|
{
|
|
@@ -46750,8 +46445,9 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46750
46445
|
keyValues [i + 3]));
|
|
46751
46446
|
}
|
|
46752
46447
|
|
|
46753
|
-
const
|
|
46754
|
-
|
|
46448
|
+
const
|
|
46449
|
+
length = Math .floor (times .at (-1) * SAMPLES_PER_SECOND),
|
|
46450
|
+
samples = Array .from ({ length: length }, (_, i) => i / (length - 1) * times .at (-1))
|
|
46755
46451
|
|
|
46756
46452
|
for (const t of samples)
|
|
46757
46453
|
{
|
|
@@ -46767,7 +46463,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46767
46463
|
}
|
|
46768
46464
|
}
|
|
46769
46465
|
},
|
|
46770
|
-
createArrayInterpolator (
|
|
46466
|
+
createArrayInterpolator (typeName, interpolation, times, weights, cycleInterval, targets, accessors, key, normalized)
|
|
46771
46467
|
{
|
|
46772
46468
|
const
|
|
46773
46469
|
scene = this .getExecutionContext (),
|
|
@@ -46780,7 +46476,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46780
46476
|
{
|
|
46781
46477
|
case "STEP":
|
|
46782
46478
|
{
|
|
46783
|
-
const interpolatorNode = scene .createNode (
|
|
46479
|
+
const interpolatorNode = scene .createNode (typeName, false);
|
|
46784
46480
|
|
|
46785
46481
|
// Key
|
|
46786
46482
|
|
|
@@ -46793,14 +46489,14 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46793
46489
|
|
|
46794
46490
|
const w = Array .from (targets .keys (), i => weights [i]);
|
|
46795
46491
|
|
|
46796
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
46492
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w, normalized))
|
|
46797
46493
|
interpolatorNode ._keyValue .push (value);
|
|
46798
46494
|
|
|
46799
46495
|
for (let t = 1, length = times .length; t < length; ++ t)
|
|
46800
46496
|
{
|
|
46801
46497
|
const
|
|
46802
46498
|
w = Array .from (targets .keys (), i => weights [t * targets .length + i]),
|
|
46803
|
-
values = this .applyMorphTargets (accessor .field, targets, key, w);
|
|
46499
|
+
values = this .applyMorphTargets (accessor .field, targets, key, w, normalized);
|
|
46804
46500
|
|
|
46805
46501
|
for (const value of values)
|
|
46806
46502
|
interpolatorNode ._keyValue .push (value);
|
|
@@ -46818,7 +46514,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46818
46514
|
default:
|
|
46819
46515
|
case "LINEAR":
|
|
46820
46516
|
{
|
|
46821
|
-
const interpolatorNode = scene .createNode (
|
|
46517
|
+
const interpolatorNode = scene .createNode (typeName, false);
|
|
46822
46518
|
|
|
46823
46519
|
// Key
|
|
46824
46520
|
|
|
@@ -46830,7 +46526,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46830
46526
|
{
|
|
46831
46527
|
const w = Array .from (targets .keys (), i => weights [t * targets .length + i]);
|
|
46832
46528
|
|
|
46833
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
46529
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w, normalized))
|
|
46834
46530
|
interpolatorNode ._keyValue .push (value);
|
|
46835
46531
|
}
|
|
46836
46532
|
|
|
@@ -46842,12 +46538,13 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46842
46538
|
}
|
|
46843
46539
|
case "CUBICSPLINE":
|
|
46844
46540
|
{
|
|
46845
|
-
const interpolatorNode = scene .createNode (
|
|
46541
|
+
const interpolatorNode = scene .createNode (typeName, false);
|
|
46846
46542
|
|
|
46847
46543
|
// Key
|
|
46848
46544
|
|
|
46849
|
-
const
|
|
46850
|
-
|
|
46545
|
+
const
|
|
46546
|
+
length = Math .floor (times .at (-1) * SAMPLES_PER_SECOND),
|
|
46547
|
+
samples = Array .from ({ length: length }, (_, i) => i / (length - 1) * times .at (-1))
|
|
46851
46548
|
|
|
46852
46549
|
// KeyValue
|
|
46853
46550
|
|
|
@@ -46857,7 +46554,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46857
46554
|
|
|
46858
46555
|
const w = Array .from (targets .keys (), i => this .cubicSplineScalarArray (t, times, weights, targets .length, i));
|
|
46859
46556
|
|
|
46860
|
-
for (const value of this .applyMorphTargets (accessor .field, targets, key, w))
|
|
46557
|
+
for (const value of this .applyMorphTargets (accessor .field, targets, key, w, normalized))
|
|
46861
46558
|
interpolatorNode ._keyValue .push (value);
|
|
46862
46559
|
}
|
|
46863
46560
|
|
|
@@ -46873,7 +46570,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46873
46570
|
{
|
|
46874
46571
|
const value = new Numbers_Vector3 (0, 0, 0);
|
|
46875
46572
|
|
|
46876
|
-
return function (array, targets, key, weights)
|
|
46573
|
+
return function (array, targets, key, weights, normalized)
|
|
46877
46574
|
{
|
|
46878
46575
|
const vectors = Array .from (array, v => v .getValue () .copy ());
|
|
46879
46576
|
|
|
@@ -46890,7 +46587,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
46890
46587
|
continue;
|
|
46891
46588
|
|
|
46892
46589
|
const
|
|
46893
|
-
array = accessor
|
|
46590
|
+
array = accessor [normalized ? "normalizedArray" : "array"],
|
|
46894
46591
|
length = array .length;
|
|
46895
46592
|
|
|
46896
46593
|
for (let a = 0, p = 0; a < length; a += 3, ++ p)
|
|
@@ -46980,7 +46677,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
|
|
|
46980
46677
|
x_ite_Namespace .add ("GLTF2Parser", "x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
|
|
46981
46678
|
/* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
|
|
46982
46679
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
|
|
46983
|
-
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(
|
|
46680
|
+
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(659);
|
|
46984
46681
|
/*******************************************************************************
|
|
46985
46682
|
*
|
|
46986
46683
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -47132,7 +46829,7 @@ const GLB2Parser_default_ = GLB2Parser;
|
|
|
47132
46829
|
x_ite_Namespace .add ("GLB2Parser", "x_ite/Parser/GLB2Parser", GLB2Parser_default_);
|
|
47133
46830
|
/* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
|
|
47134
46831
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
|
|
47135
|
-
/* provided dependency */ var OBJParser_$ = __webpack_require__(
|
|
46832
|
+
/* provided dependency */ var OBJParser_$ = __webpack_require__(659);
|
|
47136
46833
|
/*******************************************************************************
|
|
47137
46834
|
*
|
|
47138
46835
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -50487,8 +50184,8 @@ const MatrixStack_default_ = MatrixStack;
|
|
|
50487
50184
|
x_ite_Namespace .add ("MatrixStack", "standard/Math/Utility/MatrixStack", MatrixStack_default_);
|
|
50488
50185
|
/* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
|
|
50489
50186
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
|
|
50490
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
50491
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
50187
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(659);
|
|
50188
|
+
/* provided dependency */ var libtess = __webpack_require__(793);
|
|
50492
50189
|
/*******************************************************************************
|
|
50493
50190
|
*
|
|
50494
50191
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -53256,7 +52953,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
53256
52953
|
x_ite_Namespace .add ("SVGParser", "x_ite/Parser/SVGParser", SVGParser_default_);
|
|
53257
52954
|
/* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
|
|
53258
52955
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
|
|
53259
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
52956
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(659);
|
|
53260
52957
|
/*******************************************************************************
|
|
53261
52958
|
*
|
|
53262
52959
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -53593,7 +53290,7 @@ const Plane3_default_ = Plane3;
|
|
|
53593
53290
|
x_ite_Namespace .add ("Plane3", "standard/Math/Geometry/Plane3", Plane3_default_);
|
|
53594
53291
|
/* harmony default export */ const Geometry_Plane3 = (Plane3_default_);
|
|
53595
53292
|
;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
|
|
53596
|
-
/* provided dependency */ var Triangle3_libtess = __webpack_require__(
|
|
53293
|
+
/* provided dependency */ var Triangle3_libtess = __webpack_require__(793);
|
|
53597
53294
|
/*******************************************************************************
|
|
53598
53295
|
*
|
|
53599
53296
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -60251,6 +59948,7 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, Core_X3DBi
|
|
|
60251
59948
|
gl .uniformMatrix4fv (shaderNode .x3d_ProjectionMatrix, false, this .projectionMatrixArray);
|
|
60252
59949
|
gl .uniformMatrix4fv (shaderNode .x3d_ModelViewMatrix, false, this .modelViewMatrixArray);
|
|
60253
59950
|
|
|
59951
|
+
gl .uniform3f (shaderNode .x3d_EmissiveColor, 1, 1, 1)
|
|
60254
59952
|
gl .uniform1f (shaderNode .x3d_Transparency, transparency)
|
|
60255
59953
|
gl .uniform1i (shaderNode .x3d_TextureCoordinateGeneratorMode [0], 0);
|
|
60256
59954
|
|
|
@@ -60978,7 +60676,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
60978
60676
|
x_ite_Namespace .add ("X3DTexture2DNode", "x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
|
|
60979
60677
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
|
|
60980
60678
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
60981
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
60679
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(659);
|
|
60982
60680
|
/*******************************************************************************
|
|
60983
60681
|
*
|
|
60984
60682
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -65583,7 +65281,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
65583
65281
|
x_ite_Namespace .add ("X3DWorld", "x_ite/Execution/X3DWorld", X3DWorld_default_);
|
|
65584
65282
|
/* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
|
|
65585
65283
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
|
|
65586
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
65284
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(659);
|
|
65587
65285
|
/*******************************************************************************
|
|
65588
65286
|
*
|
|
65589
65287
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -80049,6 +79747,7 @@ Object .assign (DirectionalLightContainer .prototype,
|
|
|
80049
79747
|
gl .uniform1f (shaderObject .x3d_LightIntensity [i], lightNode .getIntensity ());
|
|
80050
79748
|
gl .uniform1f (shaderObject .x3d_LightAmbientIntensity [i], lightNode .getAmbientIntensity ());
|
|
80051
79749
|
gl .uniform3f (shaderObject .x3d_LightDirection [i], direction .x, direction .y, direction .z);
|
|
79750
|
+
gl .uniform1f (shaderObject .x3d_LightRadius [i], -1);
|
|
80052
79751
|
|
|
80053
79752
|
if (this .shadowBuffer)
|
|
80054
79753
|
{
|
|
@@ -80593,7 +80292,8 @@ Object .assign (Object .setPrototypeOf (PointLight .prototype, Lighting_X3DLight
|
|
|
80593
80292
|
},
|
|
80594
80293
|
getRadius ()
|
|
80595
80294
|
{
|
|
80596
|
-
|
|
80295
|
+
// Negative values mean infinity.
|
|
80296
|
+
return this ._radius .getValue ();
|
|
80597
80297
|
},
|
|
80598
80298
|
getLights ()
|
|
80599
80299
|
{
|
|
@@ -80938,7 +80638,8 @@ Object .assign (Object .setPrototypeOf (SpotLight .prototype, Lighting_X3DLightN
|
|
|
80938
80638
|
},
|
|
80939
80639
|
getRadius ()
|
|
80940
80640
|
{
|
|
80941
|
-
|
|
80641
|
+
// Negative values mean infinity.
|
|
80642
|
+
return this ._radius .getValue ();
|
|
80942
80643
|
},
|
|
80943
80644
|
getBeamWidth ()
|
|
80944
80645
|
{
|
|
@@ -89092,7 +88793,7 @@ const X3DShaderNode_default_ = X3DShaderNode;
|
|
|
89092
88793
|
x_ite_Namespace .add ("X3DShaderNode", "x_ite/Components/Shaders/X3DShaderNode", X3DShaderNode_default_);
|
|
89093
88794
|
/* harmony default export */ const Shaders_X3DShaderNode = (X3DShaderNode_default_);
|
|
89094
88795
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
|
|
89095
|
-
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(
|
|
88796
|
+
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(659);
|
|
89096
88797
|
/*******************************************************************************
|
|
89097
88798
|
*
|
|
89098
88799
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -92117,16 +91818,16 @@ const ShaderSource_default_ = ShaderSource;
|
|
|
92117
91818
|
|
|
92118
91819
|
x_ite_Namespace .add ("ShaderSource", "x_ite/Browser/Shaders/ShaderSource", ShaderSource_default_);
|
|
92119
91820
|
/* harmony default export */ const Shaders_ShaderSource = (ShaderSource_default_);
|
|
92120
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
91821
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/ClipPlanes1.glsl.js
|
|
92121
91822
|
const ClipPlanes1_glsl_default_ = /* glsl */ `#if defined(X3D_CLIP_PLANES)
|
|
92122
91823
|
uniform vec4 x3d_ClipPlane[X3D_NUM_CLIP_PLANES];void clip(){for(int i=0;i<X3D_NUM_CLIP_PLANES;++i){if(dot(vertex,x3d_ClipPlane[i].xyz)-x3d_ClipPlane[i].w<0.0)discard;}}
|
|
92123
91824
|
#endif
|
|
92124
91825
|
`
|
|
92125
91826
|
;
|
|
92126
91827
|
|
|
92127
|
-
x_ite_Namespace .add ("ClipPlanes1.glsl", "assets/shaders/webgl1/
|
|
91828
|
+
x_ite_Namespace .add ("ClipPlanes1.glsl", "assets/shaders/webgl1/common/ClipPlanes1.glsl", ClipPlanes1_glsl_default_);
|
|
92128
91829
|
/* harmony default export */ const ClipPlanes1_glsl = (ClipPlanes1_glsl_default_);
|
|
92129
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
91830
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Colors1.glsl.js
|
|
92130
91831
|
const Colors1_glsl_default_ = /* glsl */ `vec4 SRGBtoLINEAR(const in vec4 srgbIn){
|
|
92131
91832
|
#if defined(MANUAL_SRGB)
|
|
92132
91833
|
#if defined(SRGB_FAST_APPROXIMATION)
|
|
@@ -92147,9 +91848,9 @@ vec4 Gamma(const in vec4 color){return vec4(pow(color.rgb,vec3(1.0/2.2)),color.a
|
|
|
92147
91848
|
`
|
|
92148
91849
|
;
|
|
92149
91850
|
|
|
92150
|
-
x_ite_Namespace .add ("Colors1.glsl", "assets/shaders/webgl1/
|
|
91851
|
+
x_ite_Namespace .add ("Colors1.glsl", "assets/shaders/webgl1/common/Colors1.glsl", Colors1_glsl_default_);
|
|
92151
91852
|
/* harmony default export */ const Colors1_glsl = (Colors1_glsl_default_);
|
|
92152
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
91853
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Fog1.glsl.js
|
|
92153
91854
|
const Fog1_glsl_default_ = /* glsl */ `#if defined(X3D_FOG)
|
|
92154
91855
|
uniform x3d_FogParameters x3d_Fog;float getFogInterpolant(){
|
|
92155
91856
|
#if defined(X3D_FOG_COORDS)
|
|
@@ -92167,9 +91868,9 @@ return exp(-dV/max(0.001,visibilityRange-dV));
|
|
|
92167
91868
|
`
|
|
92168
91869
|
;
|
|
92169
91870
|
|
|
92170
|
-
x_ite_Namespace .add ("Fog1.glsl", "assets/shaders/webgl1/
|
|
91871
|
+
x_ite_Namespace .add ("Fog1.glsl", "assets/shaders/webgl1/common/Fog1.glsl", Fog1_glsl_default_);
|
|
92171
91872
|
/* harmony default export */ const Fog1_glsl = (Fog1_glsl_default_);
|
|
92172
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
91873
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Fragment1.glsl.js
|
|
92173
91874
|
const Fragment1_glsl_default_ = /* glsl */ `#if defined(X3D_NORMAL_TEXTURE)
|
|
92174
91875
|
#extension GL_OES_standard_derivatives:enable
|
|
92175
91876
|
#endif
|
|
@@ -92270,9 +91971,9 @@ gl_FragDepthEXT=log2(depth)*x3d_LogarithmicFarFactor1_2;
|
|
|
92270
91971
|
`
|
|
92271
91972
|
;
|
|
92272
91973
|
|
|
92273
|
-
x_ite_Namespace .add ("Fragment1.glsl", "assets/shaders/webgl1/
|
|
91974
|
+
x_ite_Namespace .add ("Fragment1.glsl", "assets/shaders/webgl1/common/Fragment1.glsl", Fragment1_glsl_default_);
|
|
92274
91975
|
/* harmony default export */ const Fragment1_glsl = (Fragment1_glsl_default_);
|
|
92275
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
91976
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Hatch1.glsl.js
|
|
92276
91977
|
const Hatch1_glsl_default_ = /* glsl */ `#if(defined(X3D_GEOMETRY_2D)||defined(X3D_GEOMETRY_3D))&&defined(X3D_STYLE_PROPERTIES)
|
|
92277
91978
|
uniform x3d_FillPropertiesParameters x3d_FillProperties;vec4 getHatchColor(vec4 color){vec4 finalColor=x3d_FillProperties.filled?color:vec4(0.0);
|
|
92278
91979
|
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
@@ -92283,14 +91984,14 @@ return finalColor;}
|
|
|
92283
91984
|
`
|
|
92284
91985
|
;
|
|
92285
91986
|
|
|
92286
|
-
x_ite_Namespace .add ("Hatch1.glsl", "assets/shaders/webgl1/
|
|
91987
|
+
x_ite_Namespace .add ("Hatch1.glsl", "assets/shaders/webgl1/common/Hatch1.glsl", Hatch1_glsl_default_);
|
|
92287
91988
|
/* harmony default export */ const Hatch1_glsl = (Hatch1_glsl_default_);
|
|
92288
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
91989
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Material1.glsl.js
|
|
92289
91990
|
const Material1_glsl_default_ = /* glsl */ `uniform x3d_MaterialParameters x3d_Material;
|
|
92290
91991
|
#if defined(X3D_LIGHTING)
|
|
92291
91992
|
#pragma X3D include "SpotFactor.glsl"
|
|
92292
91993
|
#pragma X3D include "Shadow.glsl"
|
|
92293
|
-
uniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];vec3 getMaterialColor(const in vec3 vertex,const in vec3 N,const in vec3 ambientColor,const in vec3 diffuseColor,const in vec3 specularColor,const in float shininess){vec3 V=normalize(-vertex);vec3 finalColor=vec3(0.0);for(int i=0;i<X3D_NUM_LIGHTS;++i){x3d_LightSourceParameters light=x3d_LightSource[i];vec3 vL=light.location-vertex;float dL=length(light.matrix*vL);bool di=light.type==x3d_DirectionalLight;if(di||dL<=light.radius){vec3 d=light.direction;vec3 c=light.attenuation;vec3 L=di?-d:normalize(vL);vec3 H=normalize(L+V);float lightAngle=max(dot(N,L),0.0);vec3 diffuseTerm=diffuseColor*lightAngle;float specularFactor=shininess>0.0?pow(max(dot(N,H),0.0),shininess*128.0):1.0;vec3 specularTerm=specularColor*specularFactor;float attenuationFactor=di?1.0:1.0/max(dot(c,vec3(1.0,dL,dL*dL)),1.0);float spotFactor=light.type==x3d_SpotLight?getSpotFactor(light.cutOffAngle,light.beamWidth,L,d):1.0;float attenuationSpotFactor=attenuationFactor*spotFactor;vec3 ambientTerm=light.ambientIntensity*ambientColor;vec3 diffuseSpecularTerm=light.intensity*(diffuseTerm+specularTerm);
|
|
91994
|
+
uniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];vec3 getMaterialColor(const in vec3 vertex,const in vec3 N,const in vec3 ambientColor,const in vec3 diffuseColor,const in vec3 specularColor,const in float shininess){vec3 V=normalize(-vertex);vec3 finalColor=vec3(0.0);for(int i=0;i<X3D_NUM_LIGHTS;++i){x3d_LightSourceParameters light=x3d_LightSource[i];vec3 vL=light.location-vertex;float dL=length(light.matrix*vL);bool di=light.type==x3d_DirectionalLight;if(di||dL<=light.radius||light.radius<0.0){vec3 d=light.direction;vec3 c=light.attenuation;vec3 L=di?-d:normalize(vL);vec3 H=normalize(L+V);float lightAngle=max(dot(N,L),0.0);vec3 diffuseTerm=diffuseColor*lightAngle;float specularFactor=shininess>0.0?pow(max(dot(N,H),0.0),shininess*128.0):1.0;vec3 specularTerm=specularColor*specularFactor;float attenuationFactor=di?1.0:1.0/max(dot(c,vec3(1.0,dL,dL*dL)),1.0);float spotFactor=light.type==x3d_SpotLight?getSpotFactor(light.cutOffAngle,light.beamWidth,L,d):1.0;float attenuationSpotFactor=attenuationFactor*spotFactor;vec3 ambientTerm=light.ambientIntensity*ambientColor;vec3 diffuseSpecularTerm=light.intensity*(diffuseTerm+specularTerm);
|
|
92294
91995
|
#if defined(X3D_FRAGMENT_SHADER)&&defined(X3D_SHADOWS)
|
|
92295
91996
|
if(lightAngle>0.0&&light.shadowIntensity>0.0)diffuseSpecularTerm=mix(diffuseSpecularTerm,light.shadowColor,getShadowIntensity(i,light));
|
|
92296
91997
|
#endif
|
|
@@ -92299,9 +92000,9 @@ finalColor+=attenuationSpotFactor*light.color*(ambientTerm+diffuseSpecularTerm);
|
|
|
92299
92000
|
`
|
|
92300
92001
|
;
|
|
92301
92002
|
|
|
92302
|
-
x_ite_Namespace .add ("Material1.glsl", "assets/shaders/webgl1/
|
|
92003
|
+
x_ite_Namespace .add ("Material1.glsl", "assets/shaders/webgl1/common/Material1.glsl", Material1_glsl_default_);
|
|
92303
92004
|
/* harmony default export */ const Material1_glsl = (Material1_glsl_default_);
|
|
92304
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
92005
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Normal1.glsl.js
|
|
92305
92006
|
const Normal1_glsl_default_ = /* glsl */ `#if defined(X3D_NORMAL_TEXTURE)
|
|
92306
92007
|
mat3 getTBNMatrix(const in vec2 texCoord){vec3 pos_dx=dFdx(vertex);vec3 pos_dy=dFdy(vertex);vec3 tex_dx=dFdx(vec3(texCoord,0.0));vec3 tex_dy=dFdy(vec3(texCoord,0.0));vec3 t=(tex_dy.t*pos_dx-tex_dx.t*pos_dy)/(tex_dx.s*tex_dy.t-tex_dy.s*tex_dx.t);vec3 N=normalize(normal);vec3 T=normalize(t-N*dot(N,t));vec3 B=normalize(cross(N,T));mat3 tbn=mat3(T,B,N);return tbn;}
|
|
92307
92008
|
#endif
|
|
@@ -92324,16 +92025,16 @@ return normalize(normal)*facing;
|
|
|
92324
92025
|
`
|
|
92325
92026
|
;
|
|
92326
92027
|
|
|
92327
|
-
x_ite_Namespace .add ("Normal1.glsl", "assets/shaders/webgl1/
|
|
92028
|
+
x_ite_Namespace .add ("Normal1.glsl", "assets/shaders/webgl1/common/Normal1.glsl", Normal1_glsl_default_);
|
|
92328
92029
|
/* harmony default export */ const Normal1_glsl = (Normal1_glsl_default_);
|
|
92329
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
92030
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Perlin1.glsl.js
|
|
92330
92031
|
const Perlin1_glsl_default_ = /* glsl */ `float rand(const in vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);}float rand(const in vec2 co,const in float l){return rand(vec2(rand(co),l));}float rand(const in vec2 co,const in float l,const in float t){return rand(vec2(rand(co,l),t));}float perlin(const in vec2 p,const in float dim,const in float time){const float M_PI=3.14159265358979323846;vec2 pos=floor(p*dim);vec2 posx=pos+vec2(1.0,0.0);vec2 posy=pos+vec2(0.0,1.0);vec2 posxy=pos+vec2(1.0);float c=rand(pos,dim,time);float cx=rand(posx,dim,time);float cy=rand(posy,dim,time);float cxy=rand(posxy,dim,time);vec2 d=fract(p*dim);d=-0.5*cos(d*M_PI)+0.5;float ccx=mix(c,cx,d.x);float cycxy=mix(cy,cxy,d.x);float center=mix(ccx,cycxy,d.y);return center*2.0-1.0;}vec3 perlin(const in vec3 p){return vec3(perlin(p.xy,1.0,0.0),perlin(p.yz,1.0,0.0),perlin(p.zx,1.0,0.0));}
|
|
92331
92032
|
`
|
|
92332
92033
|
;
|
|
92333
92034
|
|
|
92334
|
-
x_ite_Namespace .add ("Perlin1.glsl", "assets/shaders/webgl1/
|
|
92035
|
+
x_ite_Namespace .add ("Perlin1.glsl", "assets/shaders/webgl1/common/Perlin1.glsl", Perlin1_glsl_default_);
|
|
92335
92036
|
/* harmony default export */ const Perlin1_glsl = (Perlin1_glsl_default_);
|
|
92336
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
92037
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Point1.glsl.js
|
|
92337
92038
|
const Point1_glsl_default_ = /* glsl */ `#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
92338
92039
|
#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES)
|
|
92339
92040
|
void setPointTexCoords(){vec4 texCoord=vec4(gl_PointCoord.x,1.0-gl_PointCoord.y,0.0,1.0);
|
|
@@ -92359,9 +92060,9 @@ varying float pointSize;vec4 getPointColor(in vec4 color){if(pointSize>1.0)color
|
|
|
92359
92060
|
`
|
|
92360
92061
|
;
|
|
92361
92062
|
|
|
92362
|
-
x_ite_Namespace .add ("Point1.glsl", "assets/shaders/webgl1/
|
|
92063
|
+
x_ite_Namespace .add ("Point1.glsl", "assets/shaders/webgl1/common/Point1.glsl", Point1_glsl_default_);
|
|
92363
92064
|
/* harmony default export */ const Point1_glsl = (Point1_glsl_default_);
|
|
92364
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
92065
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/PointSize1.glsl.js
|
|
92365
92066
|
const PointSize1_glsl_default_ = /* glsl */ `#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
92366
92067
|
uniform x3d_PointPropertiesParameters x3d_PointProperties;varying float pointSize;float getPointSize(const in vec3 vertex){float pointSizeMinValue=x3d_PointProperties.pointSizeMinValue;float pointSizeMaxValue=x3d_PointProperties.pointSizeMaxValue;vec3 attenuation=x3d_PointProperties.attenuation;float dL=length(vertex);float pointSize=0.0;pointSize=x3d_PointProperties.pointSizeScaleFactor;pointSize/=dot(attenuation,vec3(1.0,dL,dL*dL));pointSize=clamp(pointSize,pointSizeMinValue,pointSizeMaxValue);
|
|
92367
92068
|
#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURE)
|
|
@@ -92374,9 +92075,9 @@ return pointSize+1.0-step(pointSize,1.0);
|
|
|
92374
92075
|
`
|
|
92375
92076
|
;
|
|
92376
92077
|
|
|
92377
|
-
x_ite_Namespace .add ("PointSize1.glsl", "assets/shaders/webgl1/
|
|
92078
|
+
x_ite_Namespace .add ("PointSize1.glsl", "assets/shaders/webgl1/common/PointSize1.glsl", PointSize1_glsl_default_);
|
|
92378
92079
|
/* harmony default export */ const PointSize1_glsl = (PointSize1_glsl_default_);
|
|
92379
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
92080
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Shadow1.glsl.js
|
|
92380
92081
|
const Shadow1_glsl_default_ = /* glsl */ `#if defined(X3D_FRAGMENT_SHADER)&&defined(X3D_SHADOWS)
|
|
92381
92082
|
uniform sampler2D x3d_ShadowMap[X3D_NUM_LIGHTS];float getShadowDepth(const in int index,const in vec2 shadowCoord){
|
|
92382
92083
|
#if X3D_NUM_LIGHTS>0
|
|
@@ -92422,16 +92123,16 @@ vec4 shadowCoord=light.shadowMatrix*vec4(vertex,1.0);shadowCoord.z-=light.shadow
|
|
|
92422
92123
|
`
|
|
92423
92124
|
;
|
|
92424
92125
|
|
|
92425
|
-
x_ite_Namespace .add ("Shadow1.glsl", "assets/shaders/webgl1/
|
|
92126
|
+
x_ite_Namespace .add ("Shadow1.glsl", "assets/shaders/webgl1/common/Shadow1.glsl", Shadow1_glsl_default_);
|
|
92426
92127
|
/* harmony default export */ const Shadow1_glsl = (Shadow1_glsl_default_);
|
|
92427
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
92128
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/SpotFactor1.glsl.js
|
|
92428
92129
|
const SpotFactor1_glsl_default_ = /* glsl */ `float getSpotFactor(const in float cutOffAngle,const in float beamWidth,const in vec3 L,const in vec3 d){float spotAngle=acos(clamp(dot(-L,d),-1.0,1.0));if(spotAngle>=cutOffAngle)return 0.0;else if(spotAngle<=beamWidth)return 1.0;return(spotAngle-cutOffAngle)/(beamWidth-cutOffAngle);}
|
|
92429
92130
|
`
|
|
92430
92131
|
;
|
|
92431
92132
|
|
|
92432
|
-
x_ite_Namespace .add ("SpotFactor1.glsl", "assets/shaders/webgl1/
|
|
92133
|
+
x_ite_Namespace .add ("SpotFactor1.glsl", "assets/shaders/webgl1/common/SpotFactor1.glsl", SpotFactor1_glsl_default_);
|
|
92433
92134
|
/* harmony default export */ const SpotFactor1_glsl = (SpotFactor1_glsl_default_);
|
|
92434
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
92135
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Texture1.glsl.js
|
|
92435
92136
|
const Texture1_glsl_default_ = /* glsl */ `#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES)
|
|
92436
92137
|
#pragma X3D include "Perlin.glsl"
|
|
92437
92138
|
uniform mat4 x3d_TextureMatrix[X3D_NUM_TEXTURE_TRANSFORMS];mat4 getTextureMatrix(const in int i){
|
|
@@ -92518,9 +92219,16 @@ return textureColor;}
|
|
|
92518
92219
|
#if defined(X3D_MULTI_TEXTURING)
|
|
92519
92220
|
uniform vec4 x3d_MultiTextureColor;uniform x3d_MultiTextureParameters x3d_MultiTexture[X3D_NUM_TEXTURES];
|
|
92520
92221
|
#endif
|
|
92222
|
+
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
92223
|
+
vec4 sRGBToLinear(const in vec4 srgbIn);
|
|
92224
|
+
#endif
|
|
92521
92225
|
int minI(const in int a,const in int b){return a<b?a:b;}vec4 getTextureColor(const in vec4 diffuseColor,const in vec4 specularColor){
|
|
92522
92226
|
#if defined(X3D_MULTI_TEXTURING)
|
|
92523
|
-
vec4 currentColor=diffuseColor;for(int i=0;i<X3D_NUM_TEXTURES;++i){vec3 texCoord=getTexCoord(minI(i,X3D_NUM_TEXTURE_TRANSFORMS-1),minI(i,X3D_NUM_TEXTURE_COORDINATES-1));vec4 textureColor=getTexture(i,texCoord);
|
|
92227
|
+
vec4 currentColor=diffuseColor;for(int i=0;i<X3D_NUM_TEXTURES;++i){vec3 texCoord=getTexCoord(minI(i,X3D_NUM_TEXTURE_TRANSFORMS-1),minI(i,X3D_NUM_TEXTURE_COORDINATES-1));vec4 textureColor=getTexture(i,texCoord);
|
|
92228
|
+
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
92229
|
+
textureColor=sRGBToLinear(textureColor);
|
|
92230
|
+
#endif
|
|
92231
|
+
x3d_MultiTextureParameters multiTexture=x3d_MultiTexture[i];vec4 arg1=textureColor;vec4 arg2=currentColor;int source=multiTexture.source;if(source==x3d_Diffuse){arg1=diffuseColor;}else if(source==x3d_Specular){arg1=specularColor;}else if(source==x3d_Factor){arg1=x3d_MultiTextureColor;}int function=multiTexture.function;if(function==x3d_Complement){arg1=1.0-arg1;}else if(function==x3d_AlphaReplicate){arg1.a=arg2.a;}int mode=multiTexture.mode;int alphaMode=multiTexture.alphaMode;if(mode==x3d_Replace){currentColor.rgb=arg1.rgb;}else if(mode==x3d_Modulate){currentColor.rgb=arg1.rgb*arg2.rgb;}else if(mode==x3d_Modulate2X){currentColor.rgb=(arg1.rgb*arg2.rgb)*2.0;}else if(mode==x3d_Modulate4X){currentColor.rgb=(arg1.rgb*arg2.rgb)*4.0;}else if(mode==x3d_Add){currentColor.rgb=arg1.rgb+arg2.rgb;}else if(mode==x3d_AddSigned){currentColor.rgb=arg1.rgb+arg2.rgb-0.5;}else if(mode==x3d_AddSigned2X){currentColor.rgb=(arg1.rgb+arg2.rgb-0.5)*2.0;}else if(mode==x3d_AddSmooth){currentColor.rgb=arg1.rgb+(1.0-arg1.rgb)*arg2.rgb;}else if(mode==x3d_Subtract){currentColor.rgb=arg1.rgb-arg2.rgb;}else if(mode==x3d_BlendDiffuseAlpha){currentColor.rgb=arg1.rgb*diffuseColor.a+arg2.rgb*(1.0-diffuseColor.a);}else if(mode==x3d_BlendTextureAlpha){currentColor.rgb=arg1.rgb*arg1.a+arg2.rgb*(1.0-arg1.a);}else if(mode==x3d_BlendFactorAlpha){currentColor.rgb=arg1.rgb*x3d_MultiTextureColor.a+arg2.rgb*(1.0-x3d_MultiTextureColor.a);}else if(mode==x3d_BlendCurrentAlpha){currentColor.rgb=arg1.rgb*arg2.a+arg2.rgb*(1.0-arg2.a);}else if(mode==x3d_ModulateAlphaAddColor){currentColor.rgb=arg1.rgb+arg1.a*arg2.rgb;}else if(mode==x3d_ModulateInvAlphaAddColor){currentColor.rgb=(1.0-arg1.a)*arg2.rgb+arg1.rgb;}else if(mode==x3d_ModulateInvColorAddAlpha){currentColor.rgb=(1.0-arg1.rgb)*arg2.rgb+arg1.a;}else if(mode==x3d_DotProduct3){currentColor.rgb=vec3(dot(arg1.rgb*2.0-1.0,arg2.rgb*2.0-1.0));}else if(mode==x3d_SelectArg1){currentColor.rgb=arg1.rgb;}else if(mode==x3d_SelectArg2){currentColor.rgb=arg2.rgb;}else if(mode==x3d_Off);if(alphaMode==x3d_Replace){currentColor.a=arg1.a;}else if(alphaMode==x3d_Modulate){currentColor.a=arg1.a*arg2.a;}else if(alphaMode==x3d_Modulate2X){currentColor.a=(arg1.a*arg2.a)*2.0;}else if(alphaMode==x3d_Modulate4X){currentColor.a=(arg1.a*arg2.a)*4.0;}else if(alphaMode==x3d_Add){currentColor.a=arg1.a+arg2.a;}else if(alphaMode==x3d_AddSigned){currentColor.a=arg1.a+arg2.a-0.5;}else if(alphaMode==x3d_AddSigned2X){currentColor.a=(arg1.a+arg2.a-0.5)*2.0;}else if(alphaMode==x3d_AddSmooth){currentColor.a=arg1.a+(1.0-arg1.a)*arg2.a;}else if(alphaMode==x3d_Subtract){currentColor.a=arg1.a-arg2.a;}else if(alphaMode==x3d_BlendDiffuseAlpha){currentColor.a=arg1.a*diffuseColor.a+arg2.a*(1.0-diffuseColor.a);}else if(alphaMode==x3d_BlendTextureAlpha){currentColor.a=arg1.a*arg1.a+arg2.a*(1.0-arg1.a);}else if(alphaMode==x3d_BlendFactorAlpha){currentColor.a=arg1.a*x3d_MultiTextureColor.a+arg2.a*(1.0-x3d_MultiTextureColor.a);}else if(alphaMode==x3d_BlendCurrentAlpha){currentColor.a=arg1.a*arg2.a+arg2.a*(1.0-arg2.a);}else if(alphaMode==x3d_ModulateAlphaAddColor){currentColor.a=arg1.a+arg1.a*arg2.a;}else if(alphaMode==x3d_ModulateInvAlphaAddColor){currentColor.a=(1.0-arg1.a)*arg2.a+arg1.a;}else if(alphaMode==x3d_ModulateInvColorAddAlpha){currentColor.a=(1.0-arg1.a)*arg2.a+arg1.a;}else if(alphaMode==x3d_DotProduct3){currentColor.a=dot(arg1.rgb*2.0-1.0,arg2.rgb*2.0-1.0);}else if(alphaMode==x3d_SelectArg1){currentColor.a=arg1.a;}else if(alphaMode==x3d_SelectArg2){currentColor.a=arg2.a;}else if(alphaMode==x3d_Off);}return currentColor;
|
|
92524
92232
|
#else
|
|
92525
92233
|
vec3 texCoord=getTexCoord(0,0);
|
|
92526
92234
|
#if defined(X3D_TEXTURE0_2D)
|
|
@@ -92530,6 +92238,9 @@ vec4 textureColor=textureCube(x3d_TextureCube[0],texCoord.stp);
|
|
|
92530
92238
|
#else
|
|
92531
92239
|
vec4 textureColor=vec4(0.0);
|
|
92532
92240
|
#endif
|
|
92241
|
+
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
92242
|
+
textureColor=sRGBToLinear(textureColor);
|
|
92243
|
+
#endif
|
|
92533
92244
|
return diffuseColor*textureColor;
|
|
92534
92245
|
#endif
|
|
92535
92246
|
}
|
|
@@ -92547,9 +92258,9 @@ return color;}vec4 getProjectiveTextureColor(in vec4 currentColor){vec3 N=gl_Fro
|
|
|
92547
92258
|
`
|
|
92548
92259
|
;
|
|
92549
92260
|
|
|
92550
|
-
x_ite_Namespace .add ("Texture1.glsl", "assets/shaders/webgl1/
|
|
92261
|
+
x_ite_Namespace .add ("Texture1.glsl", "assets/shaders/webgl1/common/Texture1.glsl", Texture1_glsl_default_);
|
|
92551
92262
|
/* harmony default export */ const Texture1_glsl = (Texture1_glsl_default_);
|
|
92552
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/
|
|
92263
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/common/Vertex1.glsl.js
|
|
92553
92264
|
const Vertex1_glsl_default_ = /* glsl */ `uniform mat4 x3d_ProjectionMatrix;uniform mat4 x3d_ModelViewMatrix;
|
|
92554
92265
|
#if defined(X3D_FOG)&&defined(X3D_FOG_COORDS)
|
|
92555
92266
|
attribute float x3d_FogDepth;
|
|
@@ -92657,41 +92368,18 @@ depth=1.0+gl_Position.w;
|
|
|
92657
92368
|
`
|
|
92658
92369
|
;
|
|
92659
92370
|
|
|
92660
|
-
x_ite_Namespace .add ("Vertex1.glsl", "assets/shaders/webgl1/
|
|
92371
|
+
x_ite_Namespace .add ("Vertex1.glsl", "assets/shaders/webgl1/common/Vertex1.glsl", Vertex1_glsl_default_);
|
|
92661
92372
|
/* harmony default export */ const Vertex1_glsl = (Vertex1_glsl_default_);
|
|
92662
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92373
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/ClipPlanes2.glsl.js
|
|
92663
92374
|
const ClipPlanes2_glsl_default_ = /* glsl */ `#if defined(X3D_CLIP_PLANES)
|
|
92664
92375
|
uniform vec4 x3d_ClipPlane[X3D_NUM_CLIP_PLANES];void clip(){for(int i=0;i<X3D_NUM_CLIP_PLANES;++i){if(dot(vertex,x3d_ClipPlane[i].xyz)-x3d_ClipPlane[i].w<0.0)discard;}}
|
|
92665
92376
|
#endif
|
|
92666
92377
|
`
|
|
92667
92378
|
;
|
|
92668
92379
|
|
|
92669
|
-
x_ite_Namespace .add ("ClipPlanes2.glsl", "assets/shaders/webgl2/
|
|
92380
|
+
x_ite_Namespace .add ("ClipPlanes2.glsl", "assets/shaders/webgl2/common/ClipPlanes2.glsl", ClipPlanes2_glsl_default_);
|
|
92670
92381
|
/* harmony default export */ const ClipPlanes2_glsl = (ClipPlanes2_glsl_default_);
|
|
92671
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92672
|
-
const Colors2_glsl_default_ = /* glsl */ `vec4 SRGBtoLINEAR(const in vec4 srgbIn){
|
|
92673
|
-
#if defined(MANUAL_SRGB)
|
|
92674
|
-
#if defined(SRGB_FAST_APPROXIMATION)
|
|
92675
|
-
vec3 linOut=pow(srgbIn.xyz,vec3(2.2));
|
|
92676
|
-
#else
|
|
92677
|
-
vec3 bLess=step(vec3(0.04045),srgbIn.xyz);vec3 linOut=mix(srgbIn.xyz/vec3(12.92),pow((srgbIn.xyz+vec3(0.055))/vec3(1.055),vec3(2.4)),bLess);
|
|
92678
|
-
#endif
|
|
92679
|
-
return vec4(linOut,srgbIn.w);
|
|
92680
|
-
#else
|
|
92681
|
-
return srgbIn;
|
|
92682
|
-
#endif
|
|
92683
|
-
}
|
|
92684
|
-
#if defined(MANUAL_SRGB)
|
|
92685
|
-
vec4 Gamma(const in vec4 color){return vec4(pow(color.rgb,vec3(1.0/2.2)),color.a);}
|
|
92686
|
-
#else
|
|
92687
|
-
#define Gamma(color)(color)
|
|
92688
|
-
#endif
|
|
92689
|
-
`
|
|
92690
|
-
;
|
|
92691
|
-
|
|
92692
|
-
x_ite_Namespace .add ("Colors2.glsl", "assets/shaders/webgl2/include/Colors2.glsl", Colors2_glsl_default_);
|
|
92693
|
-
/* harmony default export */ const Colors2_glsl = (Colors2_glsl_default_);
|
|
92694
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/include/Fog2.glsl.js
|
|
92382
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Fog2.glsl.js
|
|
92695
92383
|
const Fog2_glsl_default_ = /* glsl */ `#if defined(X3D_FOG)
|
|
92696
92384
|
uniform x3d_FogParameters x3d_Fog;float getFogInterpolant(){
|
|
92697
92385
|
#if defined(X3D_FOG_COORDS)
|
|
@@ -92709,9 +92397,9 @@ return exp(-dV/max(0.001,visibilityRange-dV));
|
|
|
92709
92397
|
`
|
|
92710
92398
|
;
|
|
92711
92399
|
|
|
92712
|
-
x_ite_Namespace .add ("Fog2.glsl", "assets/shaders/webgl2/
|
|
92400
|
+
x_ite_Namespace .add ("Fog2.glsl", "assets/shaders/webgl2/common/Fog2.glsl", Fog2_glsl_default_);
|
|
92713
92401
|
/* harmony default export */ const Fog2_glsl = (Fog2_glsl_default_);
|
|
92714
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92402
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Fragment2.glsl.js
|
|
92715
92403
|
const Fragment2_glsl_default_ = /* glsl */ `#if defined(X3D_ALPHA_MODE_MASK)
|
|
92716
92404
|
uniform float x3d_AlphaCutoff;
|
|
92717
92405
|
#endif
|
|
@@ -92825,9 +92513,9 @@ gl_FragDepth=log2(depth)*x3d_LogarithmicFarFactor1_2;
|
|
|
92825
92513
|
`
|
|
92826
92514
|
;
|
|
92827
92515
|
|
|
92828
|
-
x_ite_Namespace .add ("Fragment2.glsl", "assets/shaders/webgl2/
|
|
92516
|
+
x_ite_Namespace .add ("Fragment2.glsl", "assets/shaders/webgl2/common/Fragment2.glsl", Fragment2_glsl_default_);
|
|
92829
92517
|
/* harmony default export */ const Fragment2_glsl = (Fragment2_glsl_default_);
|
|
92830
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92518
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Hatch2.glsl.js
|
|
92831
92519
|
const Hatch2_glsl_default_ = /* glsl */ `#if(defined(X3D_GEOMETRY_2D)||defined(X3D_GEOMETRY_3D))&&defined(X3D_STYLE_PROPERTIES)
|
|
92832
92520
|
uniform x3d_FillPropertiesParameters x3d_FillProperties;vec4 getHatchColor(vec4 color){vec4 finalColor=x3d_FillProperties.filled?color:vec4(0.0);
|
|
92833
92521
|
#if defined(X3D_STYLE_PROPERTIES_TEXTURE)
|
|
@@ -92838,21 +92526,21 @@ return finalColor;}
|
|
|
92838
92526
|
`
|
|
92839
92527
|
;
|
|
92840
92528
|
|
|
92841
|
-
x_ite_Namespace .add ("Hatch2.glsl", "assets/shaders/webgl2/
|
|
92529
|
+
x_ite_Namespace .add ("Hatch2.glsl", "assets/shaders/webgl2/common/Hatch2.glsl", Hatch2_glsl_default_);
|
|
92842
92530
|
/* harmony default export */ const Hatch2_glsl = (Hatch2_glsl_default_);
|
|
92843
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92531
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Line22.glsl.js
|
|
92844
92532
|
const Line22_glsl_default_ = /* glsl */ `struct Line2{vec2 point;vec2 direction;};Line2 line2(const in vec2 point1,const in vec2 point2){return Line2(point1,normalize(point2-point1));}vec2 closest_point(const in Line2 line,const in vec2 point){vec2 r=point-line.point;float d=dot(r,line.direction);return line.direction*d+line.point;}
|
|
92845
92533
|
`
|
|
92846
92534
|
;
|
|
92847
92535
|
|
|
92848
|
-
x_ite_Namespace .add ("Line22.glsl", "assets/shaders/webgl2/
|
|
92536
|
+
x_ite_Namespace .add ("Line22.glsl", "assets/shaders/webgl2/common/Line22.glsl", Line22_glsl_default_);
|
|
92849
92537
|
/* harmony default export */ const Line22_glsl = (Line22_glsl_default_);
|
|
92850
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92538
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Material2.glsl.js
|
|
92851
92539
|
const Material2_glsl_default_ = /* glsl */ `uniform x3d_MaterialParameters x3d_Material;
|
|
92852
92540
|
#if defined(X3D_LIGHTING)
|
|
92853
92541
|
#pragma X3D include "SpotFactor.glsl"
|
|
92854
92542
|
#pragma X3D include "Shadow.glsl"
|
|
92855
|
-
uniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];vec3 getMaterialColor(const in vec3 vertex,const in vec3 N,const in vec3 ambientColor,const in vec3 diffuseColor,const in vec3 specularColor,const in float shininess){vec3 V=normalize(-vertex);vec3 finalColor=vec3(0.0);for(int i=0;i<X3D_NUM_LIGHTS;++i){x3d_LightSourceParameters light=x3d_LightSource[i];vec3 vL=light.location-vertex;float dL=length(light.matrix*vL);bool di=light.type==x3d_DirectionalLight;
|
|
92543
|
+
uniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];vec3 getMaterialColor(const in vec3 vertex,const in vec3 N,const in vec3 ambientColor,const in vec3 diffuseColor,const in vec3 specularColor,const in float shininess){vec3 V=normalize(-vertex);vec3 finalColor=vec3(0.0);for(int i=0;i<X3D_NUM_LIGHTS;++i){x3d_LightSourceParameters light=x3d_LightSource[i];vec3 vL=light.location-vertex;float dL=length(light.matrix*vL);if(dL<=light.radius||light.radius<0.0){bool di=light.type==x3d_DirectionalLight;vec3 d=light.direction;vec3 c=light.attenuation;vec3 L=di?-d:normalize(vL);vec3 H=normalize(L+V);float lightAngle=max(dot(N,L),0.0);vec3 diffuseTerm=diffuseColor*lightAngle;float specularFactor=shininess>0.0?pow(max(dot(N,H),0.0),shininess*128.0):1.0;vec3 specularTerm=specularColor*specularFactor;float attenuationFactor=di?1.0:1.0/max(dot(c,vec3(1.0,dL,dL*dL)),1.0);float spotFactor=light.type==x3d_SpotLight?getSpotFactor(light.cutOffAngle,light.beamWidth,L,d):1.0;float attenuationSpotFactor=attenuationFactor*spotFactor;vec3 ambientTerm=light.ambientIntensity*ambientColor;vec3 diffuseSpecularTerm=light.intensity*(diffuseTerm+specularTerm);
|
|
92856
92544
|
#if defined(X3D_FRAGMENT_SHADER)&&defined(X3D_SHADOWS)
|
|
92857
92545
|
if(lightAngle>0.0&&light.shadowIntensity>0.0)diffuseSpecularTerm=mix(diffuseSpecularTerm,light.shadowColor,getShadowIntensity(i,light));
|
|
92858
92546
|
#endif
|
|
@@ -92861,11 +92549,11 @@ finalColor+=attenuationSpotFactor*light.color*(ambientTerm+diffuseSpecularTerm);
|
|
|
92861
92549
|
`
|
|
92862
92550
|
;
|
|
92863
92551
|
|
|
92864
|
-
x_ite_Namespace .add ("Material2.glsl", "assets/shaders/webgl2/
|
|
92552
|
+
x_ite_Namespace .add ("Material2.glsl", "assets/shaders/webgl2/common/Material2.glsl", Material2_glsl_default_);
|
|
92865
92553
|
/* harmony default export */ const Material2_glsl = (Material2_glsl_default_);
|
|
92866
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92554
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Normal2.glsl.js
|
|
92867
92555
|
const Normal2_glsl_default_ = /* glsl */ `#if defined(X3D_NORMAL_TEXTURE)
|
|
92868
|
-
mat3 getTBNMatrix(const in vec2 texCoord){vec3 pos_dx=dFdx(vertex);vec3 pos_dy=dFdy(vertex);
|
|
92556
|
+
mat3 getTBNMatrix(const in vec2 texCoord){vec3 pos_dx=dFdx(vertex);vec3 pos_dy=dFdy(vertex);vec2 tex_dx=dFdx(texCoord);vec2 tex_dy=dFdy(texCoord);vec3 t=(tex_dy.t*pos_dx-tex_dx.t*pos_dy)/(tex_dx.s*tex_dy.t-tex_dy.s*tex_dx.t);vec3 N=normalize(normal);vec3 T=normalize(t-N*dot(N,t));vec3 B=normalize(cross(N,T));mat3 tbn=mat3(T,B,N);return tbn;}
|
|
92869
92557
|
#endif
|
|
92870
92558
|
#if defined(X3D_NORMAL_TEXTURE)
|
|
92871
92559
|
uniform x3d_NormalTextureParameters x3d_NormalTexture;
|
|
@@ -92888,9 +92576,9 @@ return normalize(normal)*facing;
|
|
|
92888
92576
|
`
|
|
92889
92577
|
;
|
|
92890
92578
|
|
|
92891
|
-
x_ite_Namespace .add ("Normal2.glsl", "assets/shaders/webgl2/
|
|
92579
|
+
x_ite_Namespace .add ("Normal2.glsl", "assets/shaders/webgl2/common/Normal2.glsl", Normal2_glsl_default_);
|
|
92892
92580
|
/* harmony default export */ const Normal2_glsl = (Normal2_glsl_default_);
|
|
92893
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92581
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Particle2.glsl.js
|
|
92894
92582
|
const Particle2_glsl_default_ = /* glsl */ `#if defined(X3D_PARTICLE_SYSTEM)
|
|
92895
92583
|
#if defined(X3D_TEX_COORD_RAMP)
|
|
92896
92584
|
uniform sampler2D x3d_TexCoordRamp;in vec4 x3d_Particle;vec4 getParticleTexCoord(const in vec4 texCoord){const int map[6]=int[6](0,1,2,0,2,3);int index0=int(x3d_Particle[3]);return texelFetch(x3d_TexCoordRamp,index0+map[gl_VertexID % 6],0);}
|
|
@@ -92905,16 +92593,16 @@ in mat4 x3d_ParticleMatrix;vec4 getParticleVertex(const in vec4 vertex){return x
|
|
|
92905
92593
|
`
|
|
92906
92594
|
;
|
|
92907
92595
|
|
|
92908
|
-
x_ite_Namespace .add ("Particle2.glsl", "assets/shaders/webgl2/
|
|
92596
|
+
x_ite_Namespace .add ("Particle2.glsl", "assets/shaders/webgl2/common/Particle2.glsl", Particle2_glsl_default_);
|
|
92909
92597
|
/* harmony default export */ const Particle2_glsl = (Particle2_glsl_default_);
|
|
92910
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92598
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Perlin2.glsl.js
|
|
92911
92599
|
const Perlin2_glsl_default_ = /* glsl */ `float rand(const in vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);}float rand(const in vec2 co,const in float l){return rand(vec2(rand(co),l));}float rand(const in vec2 co,const in float l,const in float t){return rand(vec2(rand(co,l),t));}float perlin(const in vec2 p,const in float dim,const in float time){const float M_PI=3.14159265358979323846;vec2 pos=floor(p*dim);vec2 posx=pos+vec2(1.0,0.0);vec2 posy=pos+vec2(0.0,1.0);vec2 posxy=pos+vec2(1.0);float c=rand(pos,dim,time);float cx=rand(posx,dim,time);float cy=rand(posy,dim,time);float cxy=rand(posxy,dim,time);vec2 d=fract(p*dim);d=-0.5*cos(d*M_PI)+0.5;float ccx=mix(c,cx,d.x);float cycxy=mix(cy,cxy,d.x);float center=mix(ccx,cycxy,d.y);return center*2.0-1.0;}vec3 perlin(const in vec3 p){return vec3(perlin(p.xy,1.0,0.0),perlin(p.yz,1.0,0.0),perlin(p.zx,1.0,0.0));}
|
|
92912
92600
|
`
|
|
92913
92601
|
;
|
|
92914
92602
|
|
|
92915
|
-
x_ite_Namespace .add ("Perlin2.glsl", "assets/shaders/webgl2/
|
|
92603
|
+
x_ite_Namespace .add ("Perlin2.glsl", "assets/shaders/webgl2/common/Perlin2.glsl", Perlin2_glsl_default_);
|
|
92916
92604
|
/* harmony default export */ const Perlin2_glsl = (Perlin2_glsl_default_);
|
|
92917
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92605
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Point2.glsl.js
|
|
92918
92606
|
const Point2_glsl_default_ = /* glsl */ `#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
92919
92607
|
#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES)
|
|
92920
92608
|
void setPointTexCoords(){vec4 texCoord=vec4(gl_PointCoord.x,1.0-gl_PointCoord.y,0.0,1.0);
|
|
@@ -92940,9 +92628,9 @@ in float pointSize;vec4 getPointColor(in vec4 color){if(pointSize>1.0)color.a*=c
|
|
|
92940
92628
|
`
|
|
92941
92629
|
;
|
|
92942
92630
|
|
|
92943
|
-
x_ite_Namespace .add ("Point2.glsl", "assets/shaders/webgl2/
|
|
92631
|
+
x_ite_Namespace .add ("Point2.glsl", "assets/shaders/webgl2/common/Point2.glsl", Point2_glsl_default_);
|
|
92944
92632
|
/* harmony default export */ const Point2_glsl = (Point2_glsl_default_);
|
|
92945
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92633
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/PointSize2.glsl.js
|
|
92946
92634
|
const PointSize2_glsl_default_ = /* glsl */ `#if defined(X3D_GEOMETRY_0D)&&defined(X3D_STYLE_PROPERTIES)
|
|
92947
92635
|
uniform x3d_PointPropertiesParameters x3d_PointProperties;out float pointSize;float getPointSize(const in vec3 vertex){float pointSizeMinValue=x3d_PointProperties.pointSizeMinValue;float pointSizeMaxValue=x3d_PointProperties.pointSizeMaxValue;vec3 attenuation=x3d_PointProperties.attenuation;float dL=length(vertex);float pointSize=0.0;pointSize=x3d_PointProperties.pointSizeScaleFactor;pointSize/=dot(attenuation,vec3(1.0,dL,dL*dL));pointSize=clamp(pointSize,pointSizeMinValue,pointSizeMaxValue);
|
|
92948
92636
|
#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURE)
|
|
@@ -92955,9 +92643,9 @@ return pointSize+1.0-step(pointSize,1.0);
|
|
|
92955
92643
|
`
|
|
92956
92644
|
;
|
|
92957
92645
|
|
|
92958
|
-
x_ite_Namespace .add ("PointSize2.glsl", "assets/shaders/webgl2/
|
|
92646
|
+
x_ite_Namespace .add ("PointSize2.glsl", "assets/shaders/webgl2/common/PointSize2.glsl", PointSize2_glsl_default_);
|
|
92959
92647
|
/* harmony default export */ const PointSize2_glsl = (PointSize2_glsl_default_);
|
|
92960
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92648
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Shadow2.glsl.js
|
|
92961
92649
|
const Shadow2_glsl_default_ = /* glsl */ `#if defined(X3D_FRAGMENT_SHADER)&&defined(X3D_SHADOWS)
|
|
92962
92650
|
uniform sampler2D x3d_ShadowMap[X3D_NUM_LIGHTS];float getShadowDepth(const in int index,const in vec2 shadowCoord){switch(index){
|
|
92963
92651
|
#if X3D_NUM_LIGHTS>0
|
|
@@ -93003,9 +92691,9 @@ vec4 shadowCoord=light.shadowMatrix*vec4(vertex,1.0);shadowCoord.z-=light.shadow
|
|
|
93003
92691
|
`
|
|
93004
92692
|
;
|
|
93005
92693
|
|
|
93006
|
-
x_ite_Namespace .add ("Shadow2.glsl", "assets/shaders/webgl2/
|
|
92694
|
+
x_ite_Namespace .add ("Shadow2.glsl", "assets/shaders/webgl2/common/Shadow2.glsl", Shadow2_glsl_default_);
|
|
93007
92695
|
/* harmony default export */ const Shadow2_glsl = (Shadow2_glsl_default_);
|
|
93008
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92696
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Skin2.glsl.js
|
|
93009
92697
|
const Skin2_glsl_default_ = /* glsl */ `#if defined(X3D_SKINNING)
|
|
93010
92698
|
in float x3d_CoordIndex;uniform sampler2D x3d_JointsTexture;uniform sampler2D x3d_DisplacementsTexture;uniform sampler2D x3d_JointMatricesTexture;mat4 getJointMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+1,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+2,0);vec4 d=texelFetch(x3d_JointMatricesTexture,joint*8+3,0);return mat4(a,b,c,d);}mat3 getDisplacementJointMatrix(const in int joint){mat4 m=getJointMatrix(joint);return mat3(m[0].xyz,m[1].xyz,m[2].xyz);}
|
|
93011
92699
|
#if defined(X3D_NORMALS)
|
|
@@ -93031,16 +92719,16 @@ skinNormal+=(getJointNormalMatrix(joint)*normal-normal)*weight;
|
|
|
93031
92719
|
`
|
|
93032
92720
|
;
|
|
93033
92721
|
|
|
93034
|
-
x_ite_Namespace .add ("Skin2.glsl", "assets/shaders/webgl2/
|
|
92722
|
+
x_ite_Namespace .add ("Skin2.glsl", "assets/shaders/webgl2/common/Skin2.glsl", Skin2_glsl_default_);
|
|
93035
92723
|
/* harmony default export */ const Skin2_glsl = (Skin2_glsl_default_);
|
|
93036
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92724
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/SpotFactor2.glsl.js
|
|
93037
92725
|
const SpotFactor2_glsl_default_ = /* glsl */ `float getSpotFactor(const in float cutOffAngle,const in float beamWidth,const in vec3 L,const in vec3 d){float spotAngle=acos(clamp(dot(-L,d),-1.0,1.0));if(spotAngle>=cutOffAngle)return 0.0;else if(spotAngle<=beamWidth)return 1.0;return(spotAngle-cutOffAngle)/(beamWidth-cutOffAngle);}
|
|
93038
92726
|
`
|
|
93039
92727
|
;
|
|
93040
92728
|
|
|
93041
|
-
x_ite_Namespace .add ("SpotFactor2.glsl", "assets/shaders/webgl2/
|
|
92729
|
+
x_ite_Namespace .add ("SpotFactor2.glsl", "assets/shaders/webgl2/common/SpotFactor2.glsl", SpotFactor2_glsl_default_);
|
|
93042
92730
|
/* harmony default export */ const SpotFactor2_glsl = (SpotFactor2_glsl_default_);
|
|
93043
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92731
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Stipple2.glsl.js
|
|
93044
92732
|
const Stipple2_glsl_default_ = /* glsl */ `#if defined(X3D_GEOMETRY_1D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93045
92733
|
#pragma X3D include "Line2.glsl"
|
|
93046
92734
|
uniform x3d_LinePropertiesParameters x3d_LineProperties;flat in float lengthSoFar;flat in vec2 startPoint;in vec2 midPoint;void stipple(){vec2 point=closest_point(line2(startPoint,midPoint),gl_FragCoord.xy);float s=(lengthSoFar+length(point-startPoint))*x3d_LineProperties.lineStippleScale;
|
|
@@ -93060,9 +92748,9 @@ if(x3d_LineProperties.linetype==16)return;int linetype=x3d_LineProperties.linety
|
|
|
93060
92748
|
`
|
|
93061
92749
|
;
|
|
93062
92750
|
|
|
93063
|
-
x_ite_Namespace .add ("Stipple2.glsl", "assets/shaders/webgl2/
|
|
92751
|
+
x_ite_Namespace .add ("Stipple2.glsl", "assets/shaders/webgl2/common/Stipple2.glsl", Stipple2_glsl_default_);
|
|
93064
92752
|
/* harmony default export */ const Stipple2_glsl = (Stipple2_glsl_default_);
|
|
93065
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92753
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Texture2.glsl.js
|
|
93066
92754
|
const Texture2_glsl_default_ = /* glsl */ `#if defined(X3D_TEXTURE)||defined(X3D_MATERIAL_TEXTURES)
|
|
93067
92755
|
#pragma X3D include "Perlin.glsl"
|
|
93068
92756
|
vec4 texCoords[X3D_NUM_TEXTURE_COORDINATES];void setTexCoords(){
|
|
@@ -93113,9 +92801,16 @@ return texture(x3d_TextureCube[1],texCoord.stp);
|
|
|
93113
92801
|
#if defined(X3D_MULTI_TEXTURING)
|
|
93114
92802
|
uniform vec4 x3d_MultiTextureColor;uniform x3d_MultiTextureParameters x3d_MultiTexture[X3D_NUM_TEXTURES];
|
|
93115
92803
|
#endif
|
|
92804
|
+
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
92805
|
+
vec4 sRGBToLinear(const in vec4 srgbIn);
|
|
92806
|
+
#endif
|
|
93116
92807
|
vec4 getTextureColor(const in vec4 diffuseColor,const in vec4 specularColor){
|
|
93117
92808
|
#if defined(X3D_MULTI_TEXTURING)
|
|
93118
|
-
vec4 currentColor=diffuseColor;for(int i=0;i<X3D_NUM_TEXTURES;++i){vec3 texCoord=getTexCoord(min(i,X3D_NUM_TEXTURE_TRANSFORMS-1),min(i,X3D_NUM_TEXTURE_COORDINATES-1));vec4 textureColor=getTexture(i,texCoord);
|
|
92809
|
+
vec4 currentColor=diffuseColor;for(int i=0;i<X3D_NUM_TEXTURES;++i){vec3 texCoord=getTexCoord(min(i,X3D_NUM_TEXTURE_TRANSFORMS-1),min(i,X3D_NUM_TEXTURE_COORDINATES-1));vec4 textureColor=getTexture(i,texCoord);
|
|
92810
|
+
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
92811
|
+
textureColor=sRGBToLinear(textureColor);
|
|
92812
|
+
#endif
|
|
92813
|
+
x3d_MultiTextureParameters multiTexture=x3d_MultiTexture[i];vec4 arg1=textureColor;vec4 arg2=currentColor;int source=multiTexture.source;switch(source){case x3d_Diffuse:{arg1=diffuseColor;break;}case x3d_Specular:{arg1=specularColor;break;}case x3d_Factor:{arg1=x3d_MultiTextureColor;break;}}int function=multiTexture.function;switch(function){case x3d_Complement:{arg1=1.0-arg1;break;}case x3d_AlphaReplicate:{arg1.a=arg2.a;break;}}int mode=multiTexture.mode;int alphaMode=multiTexture.alphaMode;switch(mode){case x3d_Replace:{currentColor.rgb=arg1.rgb;break;}case x3d_Modulate:{currentColor.rgb=arg1.rgb*arg2.rgb;break;}case x3d_Modulate2X:{currentColor.rgb=(arg1.rgb*arg2.rgb)*2.0;break;}case x3d_Modulate4X:{currentColor.rgb=(arg1.rgb*arg2.rgb)*4.0;break;}case x3d_Add:{currentColor.rgb=arg1.rgb+arg2.rgb;break;}case x3d_AddSigned:{currentColor.rgb=arg1.rgb+arg2.rgb-0.5;break;}case x3d_AddSigned2X:{currentColor.rgb=(arg1.rgb+arg2.rgb-0.5)*2.0;break;}case x3d_AddSmooth:{currentColor.rgb=arg1.rgb+(1.0-arg1.rgb)*arg2.rgb;break;}case x3d_Subtract:{currentColor.rgb=arg1.rgb-arg2.rgb;break;}case x3d_BlendDiffuseAlpha:{currentColor.rgb=arg1.rgb*diffuseColor.a+arg2.rgb*(1.0-diffuseColor.a);break;}case x3d_BlendTextureAlpha:{currentColor.rgb=arg1.rgb*arg1.a+arg2.rgb*(1.0-arg1.a);break;}case x3d_BlendFactorAlpha:{currentColor.rgb=arg1.rgb*x3d_MultiTextureColor.a+arg2.rgb*(1.0-x3d_MultiTextureColor.a);break;}case x3d_BlendCurrentAlpha:{currentColor.rgb=arg1.rgb*arg2.a+arg2.rgb*(1.0-arg2.a);break;}case x3d_ModulateAlphaAddColor:{currentColor.rgb=arg1.rgb+arg1.a*arg2.rgb;break;}case x3d_ModulateInvAlphaAddColor:{currentColor.rgb=(1.0-arg1.a)*arg2.rgb+arg1.rgb;break;}case x3d_ModulateInvColorAddAlpha:{currentColor.rgb=(1.0-arg1.rgb)*arg2.rgb+arg1.a;break;}case x3d_DotProduct3:{currentColor.rgb=vec3(dot(arg1.rgb*2.0-1.0,arg2.rgb*2.0-1.0));break;}case x3d_SelectArg1:{currentColor.rgb=arg1.rgb;break;}case x3d_SelectArg2:{currentColor.rgb=arg2.rgb;break;}case x3d_Off:{break;}}switch(alphaMode){case x3d_Replace:{currentColor.a=arg1.a;break;}case x3d_Modulate:{currentColor.a=arg1.a*arg2.a;break;}case x3d_Modulate2X:{currentColor.a=(arg1.a*arg2.a)*2.0;break;}case x3d_Modulate4X:{currentColor.a=(arg1.a*arg2.a)*4.0;break;}case x3d_Add:{currentColor.a=arg1.a+arg2.a;break;}case x3d_AddSigned:{currentColor.a=arg1.a+arg2.a-0.5;break;}case x3d_AddSigned2X:{currentColor.a=(arg1.a+arg2.a-0.5)*2.0;break;}case x3d_AddSmooth:{currentColor.a=arg1.a+(1.0-arg1.a)*arg2.a;break;}case x3d_Subtract:{currentColor.a=arg1.a-arg2.a;break;}case x3d_BlendDiffuseAlpha:{currentColor.a=arg1.a*diffuseColor.a+arg2.a*(1.0-diffuseColor.a);break;}case x3d_BlendTextureAlpha:{currentColor.a=arg1.a*arg1.a+arg2.a*(1.0-arg1.a);break;}case x3d_BlendFactorAlpha:{currentColor.a=arg1.a*x3d_MultiTextureColor.a+arg2.a*(1.0-x3d_MultiTextureColor.a);break;}case x3d_BlendCurrentAlpha:{currentColor.a=arg1.a*arg2.a+arg2.a*(1.0-arg2.a);break;}case x3d_ModulateAlphaAddColor:{currentColor.a=arg1.a+arg1.a*arg2.a;break;}case x3d_ModulateInvAlphaAddColor:{currentColor.a=(1.0-arg1.a)*arg2.a+arg1.a;break;}case x3d_ModulateInvColorAddAlpha:{currentColor.a=(1.0-arg1.a)*arg2.a+arg1.a;break;}case x3d_DotProduct3:{currentColor.a=dot(arg1.rgb*2.0-1.0,arg2.rgb*2.0-1.0);break;}case x3d_SelectArg1:{currentColor.a=arg1.a;break;}case x3d_SelectArg2:{currentColor.a=arg2.a;break;}case x3d_Off:{break;}}}return currentColor;
|
|
93119
92814
|
#else
|
|
93120
92815
|
vec3 texCoord=getTexCoord(0,0);
|
|
93121
92816
|
#if defined(X3D_TEXTURE0_2D)
|
|
@@ -93125,6 +92820,9 @@ vec4 textureColor=texture(x3d_Texture3D[0],texCoord.stp);
|
|
|
93125
92820
|
#elif defined(X3D_TEXTURE0_CUBE)
|
|
93126
92821
|
vec4 textureColor=texture(x3d_TextureCube[0],texCoord.stp);
|
|
93127
92822
|
#endif
|
|
92823
|
+
#if defined(X3D_PHYSICAL_MATERIAL)
|
|
92824
|
+
textureColor=sRGBToLinear(textureColor);
|
|
92825
|
+
#endif
|
|
93128
92826
|
return diffuseColor*textureColor;
|
|
93129
92827
|
#endif
|
|
93130
92828
|
}
|
|
@@ -93142,18 +92840,18 @@ case 1:return texture(x3d_ProjectiveTexture[1],texCoord);
|
|
|
93142
92840
|
`
|
|
93143
92841
|
;
|
|
93144
92842
|
|
|
93145
|
-
x_ite_Namespace .add ("Texture2.glsl", "assets/shaders/webgl2/
|
|
92843
|
+
x_ite_Namespace .add ("Texture2.glsl", "assets/shaders/webgl2/common/Texture2.glsl", Texture2_glsl_default_);
|
|
93146
92844
|
/* harmony default export */ const Texture2_glsl = (Texture2_glsl_default_);
|
|
93147
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92845
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Utils2.glsl.js
|
|
93148
92846
|
const Utils2_glsl_default_ = /* glsl */ `#if defined(X3D_SKINNING)||defined(X3D_PARTICLE_SYSTEM)
|
|
93149
92847
|
vec4 texelFetch(const in sampler2D _sampler,const in int index,const in int lod){int x=textureSize(_sampler,lod).x;ivec2 p=ivec2(index % x,index/x);vec4 t=texelFetch(_sampler,p,lod);return t;}
|
|
93150
92848
|
#endif
|
|
93151
92849
|
`
|
|
93152
92850
|
;
|
|
93153
92851
|
|
|
93154
|
-
x_ite_Namespace .add ("Utils2.glsl", "assets/shaders/webgl2/
|
|
92852
|
+
x_ite_Namespace .add ("Utils2.glsl", "assets/shaders/webgl2/common/Utils2.glsl", Utils2_glsl_default_);
|
|
93155
92853
|
/* harmony default export */ const Utils2_glsl = (Utils2_glsl_default_);
|
|
93156
|
-
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/
|
|
92854
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/common/Vertex2.glsl.js
|
|
93157
92855
|
const Vertex2_glsl_default_ = /* glsl */ `uniform mat4 x3d_ProjectionMatrix;uniform mat4 x3d_ModelViewMatrix;
|
|
93158
92856
|
#if defined(X3D_GEOMETRY_1D)&&defined(X3D_STYLE_PROPERTIES)
|
|
93159
92857
|
in vec3 x3d_LineStipple;
|
|
@@ -93279,11 +92977,11 @@ depth=1.0+gl_Position.w;
|
|
|
93279
92977
|
`
|
|
93280
92978
|
;
|
|
93281
92979
|
|
|
93282
|
-
x_ite_Namespace .add ("Vertex2.glsl", "assets/shaders/webgl2/
|
|
92980
|
+
x_ite_Namespace .add ("Vertex2.glsl", "assets/shaders/webgl2/common/Vertex2.glsl", Vertex2_glsl_default_);
|
|
93283
92981
|
/* harmony default export */ const Vertex2_glsl = (Vertex2_glsl_default_);
|
|
93284
92982
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/Default1.vs.js
|
|
93285
92983
|
const Default1_vs_default_ = /* glsl */ `precision highp float;precision highp int;precision highp sampler2D;precision highp samplerCube;
|
|
93286
|
-
#pragma X3D include "
|
|
92984
|
+
#pragma X3D include "common/Vertex.glsl"
|
|
93287
92985
|
void main(){vertex_main();}
|
|
93288
92986
|
`
|
|
93289
92987
|
;
|
|
@@ -93292,8 +92990,8 @@ x_ite_Namespace .add ("Default1.vs", "assets/shaders/webgl1/Default1.vs", Defaul
|
|
|
93292
92990
|
/* harmony default export */ const Default1_vs = (Default1_vs_default_);
|
|
93293
92991
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/Depth1.fs.js
|
|
93294
92992
|
const Depth1_fs_default_ = /* glsl */ `precision highp float;precision highp int;precision highp sampler2D;varying vec3 vertex;
|
|
93295
|
-
#pragma X3D include "
|
|
93296
|
-
#pragma X3D include "
|
|
92993
|
+
#pragma X3D include "common/ClipPlanes.glsl"
|
|
92994
|
+
#pragma X3D include "common/Point.glsl"
|
|
93297
92995
|
void main(){
|
|
93298
92996
|
#if defined(X3D_CLIP_PLANES)
|
|
93299
92997
|
clip();
|
|
@@ -93309,7 +93007,7 @@ x_ite_Namespace .add ("Depth1.fs", "assets/shaders/webgl1/Depth1.fs", Depth1_fs_
|
|
|
93309
93007
|
/* harmony default export */ const Depth1_fs = (Depth1_fs_default_);
|
|
93310
93008
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/Depth1.vs.js
|
|
93311
93009
|
const Depth1_vs_default_ = /* glsl */ `precision highp float;precision highp int;uniform mat4 x3d_ProjectionMatrix;uniform mat4 x3d_ModelViewMatrix;attribute vec4 x3d_Vertex;varying vec3 vertex;
|
|
93312
|
-
#pragma X3D include "
|
|
93010
|
+
#pragma X3D include "common/PointSize.glsl"
|
|
93313
93011
|
void main(){vec4 position=x3d_ModelViewMatrix*x3d_Vertex;vertex=position.xyz;
|
|
93314
93012
|
#if defined(X3D_GEOMETRY_0D)
|
|
93315
93013
|
#if defined(X3D_STYLE_PROPERTIES)
|
|
@@ -93326,7 +93024,7 @@ x_ite_Namespace .add ("Depth1.vs", "assets/shaders/webgl1/Depth1.vs", Depth1_vs_
|
|
|
93326
93024
|
/* harmony default export */ const Depth1_vs = (Depth1_vs_default_);
|
|
93327
93025
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/Gouraud1.fs.js
|
|
93328
93026
|
const Gouraud1_fs_default_ = /* glsl */ `precision highp float;precision highp int;precision highp sampler2D;precision highp samplerCube;
|
|
93329
|
-
#pragma X3D include "
|
|
93027
|
+
#pragma X3D include "common/Fragment.glsl"
|
|
93330
93028
|
varying vec4 frontColor;
|
|
93331
93029
|
#if!defined(X3D_GEOMETRY_0D)&&!defined(X3D_GEOMETRY_1D)
|
|
93332
93030
|
varying vec4 backColor;
|
|
@@ -93351,8 +93049,8 @@ x_ite_Namespace .add ("Gouraud1.fs", "assets/shaders/webgl1/Gouraud1.fs", Gourau
|
|
|
93351
93049
|
/* harmony default export */ const Gouraud1_fs = (Gouraud1_fs_default_);
|
|
93352
93050
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/Gouraud1.vs.js
|
|
93353
93051
|
const Gouraud1_vs_default_ = /* glsl */ `precision highp float;precision highp int;precision highp sampler2D;precision highp samplerCube;
|
|
93354
|
-
#pragma X3D include "
|
|
93355
|
-
#pragma X3D include "
|
|
93052
|
+
#pragma X3D include "common/Vertex.glsl"
|
|
93053
|
+
#pragma X3D include "common/Material.glsl"
|
|
93356
93054
|
varying vec4 frontColor;
|
|
93357
93055
|
#if!defined(X3D_GEOMETRY_0D)&&!defined(X3D_GEOMETRY_1D)
|
|
93358
93056
|
varying vec4 backColor;
|
|
@@ -93380,112 +93078,51 @@ backColor=getMaterialColor(-normal,vertex,x3d_Material);
|
|
|
93380
93078
|
x_ite_Namespace .add ("Gouraud1.vs", "assets/shaders/webgl1/Gouraud1.vs", Gouraud1_vs_default_);
|
|
93381
93079
|
/* harmony default export */ const Gouraud1_vs = (Gouraud1_vs_default_);
|
|
93382
93080
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/PBR1.fs.js
|
|
93383
|
-
const PBR1_fs_default_ = /* glsl */
|
|
93384
|
-
|
|
93385
|
-
#pragma X3D include "
|
|
93386
|
-
#pragma X3D include "
|
|
93387
|
-
#pragma X3D include "include/Normal.glsl"
|
|
93388
|
-
#pragma X3D include "include/SpotFactor.glsl"
|
|
93389
|
-
#pragma X3D include "include/Shadow.glsl"
|
|
93081
|
+
const PBR1_fs_default_ = /* glsl */ `precision highp float;precision highp int;precision highp sampler2D;precision highp samplerCube;
|
|
93082
|
+
#pragma X3D include "common/Fragment.glsl"
|
|
93083
|
+
#pragma X3D include "common/Normal.glsl"
|
|
93084
|
+
#pragma X3D include "common/Shadow.glsl"
|
|
93390
93085
|
#if defined(X3D_LIGHTING)
|
|
93391
93086
|
uniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];
|
|
93392
93087
|
#endif
|
|
93393
93088
|
uniform x3d_PhysicalMaterialParameters x3d_Material;
|
|
93394
|
-
#
|
|
93395
|
-
|
|
93396
|
-
#
|
|
93397
|
-
#
|
|
93398
|
-
|
|
93399
|
-
#
|
|
93400
|
-
|
|
93401
|
-
#if defined(X3D_COLOR_MATERIAL)
|
|
93402
|
-
vec4 baseParameter=vec4(color.rgb,color.a*alpha);
|
|
93403
|
-
#else
|
|
93404
|
-
vec4 baseParameter=vec4(x3d_Material.baseColor,alpha);
|
|
93405
|
-
#endif
|
|
93406
|
-
#if defined(X3D_BASE_TEXTURE)
|
|
93407
|
-
vec3 texCoord=getTexCoord(x3d_BaseTexture.textureTransformMapping,x3d_BaseTexture.textureCoordinateMapping);
|
|
93408
|
-
#if defined(X3D_BASE_TEXTURE_2D)
|
|
93409
|
-
return baseParameter*SRGBtoLINEAR(texture2D(x3d_BaseTexture.texture2D,texCoord.st));
|
|
93410
|
-
#elif defined(X3D_BASE_TEXTURE_CUBE)
|
|
93411
|
-
return baseParameter*SRGBtoLINEAR(textureCube(x3d_BaseTexture.textureCube,texCoord));
|
|
93412
|
-
#endif
|
|
93413
|
-
#elif defined(X3D_TEXTURE)
|
|
93414
|
-
return getTextureColor(baseParameter,vec4(vec3(1.0),alpha));
|
|
93415
|
-
#else
|
|
93416
|
-
return baseParameter;
|
|
93417
|
-
#endif
|
|
93418
|
-
}
|
|
93419
|
-
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93420
|
-
uniform x3d_EmissiveTextureParameters x3d_EmissiveTexture;
|
|
93421
|
-
#endif
|
|
93422
|
-
vec3 getEmissiveColor(){vec3 emissiveParameter=x3d_Material.emissiveColor;
|
|
93423
|
-
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93424
|
-
vec3 texCoord=getTexCoord(x3d_EmissiveTexture.textureTransformMapping,x3d_EmissiveTexture.textureCoordinateMapping);
|
|
93425
|
-
#if defined(X3D_EMISSIVE_TEXTURE_2D)
|
|
93426
|
-
return emissiveParameter*SRGBtoLINEAR(texture2D(x3d_EmissiveTexture.texture2D,texCoord.st)).rgb;
|
|
93427
|
-
#elif defined(X3D_EMISSIVE_TEXTURE_CUBE)
|
|
93428
|
-
return emissiveParameter*SRGBtoLINEAR(textureCube(x3d_EmissiveTexture.textureCube,texCoord)).rgb;
|
|
93429
|
-
#endif
|
|
93430
|
-
#else
|
|
93431
|
-
return emissiveParameter.rgb;
|
|
93089
|
+
#pragma X3D include "pbr/BDRF.glsl"
|
|
93090
|
+
#pragma X3D include "pbr/ToneMapping.glsl"
|
|
93091
|
+
#pragma X3D include "pbr/MaterialInfo.glsl"
|
|
93092
|
+
#pragma X3D include "pbr/Punctual.glsl"
|
|
93093
|
+
vec4 getMaterialColor(){vec4 baseColor=getBaseColor();vec3 n=getNormalVector(x3d_Material.normalScale);vec3 v=normalize(-vertex);MaterialInfo materialInfo;materialInfo.baseColor=baseColor.rgb;materialInfo.ior=1.5;materialInfo.f0=vec3(0.04);materialInfo.specularWeight=1.0;
|
|
93094
|
+
#if defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93095
|
+
materialInfo=getMetallicRoughnessInfo(materialInfo);
|
|
93432
93096
|
#endif
|
|
93433
|
-
|
|
93434
|
-
#if defined(
|
|
93435
|
-
uniform x3d_MetallicRoughnessTextureParameters x3d_MetallicRoughnessTexture;
|
|
93097
|
+
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=max(max(materialInfo.f0.r,materialInfo.f0.g),materialInfo.f0.b);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;
|
|
93098
|
+
#if defined(X3D_USE_IBL)
|
|
93436
93099
|
#endif
|
|
93437
|
-
|
|
93438
|
-
#if defined(
|
|
93439
|
-
vec3
|
|
93440
|
-
#if defined(
|
|
93441
|
-
|
|
93442
|
-
#elif defined(X3D_METALLIC_ROUGHNESS_TEXTURE_CUBE)
|
|
93443
|
-
vec4 mrSample=textureCube(x3d_MetallicRoughnessTexture.textureCube,texCoord);
|
|
93444
|
-
#endif
|
|
93445
|
-
metallic*=mrSample.b;perceptualRoughness*=mrSample.g;return vec2(metallic,perceptualRoughness);
|
|
93446
|
-
#else
|
|
93447
|
-
return vec2(metallic,perceptualRoughness);
|
|
93100
|
+
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);
|
|
93101
|
+
#if defined(X3D_LIGHTING)
|
|
93102
|
+
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 NdotV=clamp(dot(n,v),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,pointToLight,distanceToLight);
|
|
93103
|
+
#if defined(X3D_SHADOWS)
|
|
93104
|
+
if(light.shadowIntensity>0.0)intensity=mix(intensity,light.shadowColor,getShadowIntensity(i,light));
|
|
93448
93105
|
#endif
|
|
93449
|
-
}
|
|
93450
|
-
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
93451
|
-
uniform x3d_OcclusionTextureParameters x3d_OcclusionTexture;
|
|
93106
|
+
f_diffuse+=intensity*NdotL*BRDF_lambertian(materialInfo.f0,materialInfo.f90,materialInfo.c_diff,materialInfo.specularWeight,VdotH);f_specular+=intensity*NdotL*BRDF_specularGGX(materialInfo.f0,materialInfo.f90,materialInfo.alphaRoughness,materialInfo.specularWeight,VdotH,NdotL,NdotV,NdotH);}}}
|
|
93452
93107
|
#endif
|
|
93453
|
-
float
|
|
93108
|
+
f_emissive=getEmissiveColor();float clearcoatFactor=0.0;vec3 clearcoatFresnel=vec3(0.0);vec3 diffuse;vec3 specular;vec3 sheen;vec3 clearcoat;
|
|
93454
93109
|
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
93455
|
-
|
|
93456
|
-
#if defined(X3D_OCCLUSION_TEXTURE_2D)
|
|
93457
|
-
return texture2D(x3d_OcclusionTexture.texture2D,texCoord.st).r;
|
|
93458
|
-
#elif defined(X3D_OCCLUSION_TEXTURE_CUBE)
|
|
93459
|
-
return textureCube(x3d_OcclusionTexture.textureCube,texCoord).r;
|
|
93460
|
-
#endif
|
|
93110
|
+
float ao=getOcclusionFactor();diffuse=f_diffuse+mix(f_diffuse_ibl,f_diffuse_ibl*ao,x3d_Material.occlusionStrength);specular=f_specular+mix(f_specular_ibl,f_specular_ibl*ao,x3d_Material.occlusionStrength);sheen=f_sheen+mix(f_sheen_ibl,f_sheen_ibl*ao,x3d_Material.occlusionStrength);clearcoat=f_clearcoat+mix(f_clearcoat_ibl,f_clearcoat_ibl*ao,x3d_Material.occlusionStrength);
|
|
93461
93111
|
#else
|
|
93462
|
-
|
|
93112
|
+
diffuse=f_diffuse_ibl+f_diffuse;specular=f_specular_ibl+f_specular;sheen=f_sheen_ibl+f_sheen;clearcoat=f_clearcoat_ibl+f_clearcoat;
|
|
93463
93113
|
#endif
|
|
93464
|
-
|
|
93465
|
-
#if defined(
|
|
93466
|
-
|
|
93467
|
-
#if defined(USE_TEX_LOD)
|
|
93468
|
-
vec3 specularLight=SRGBtoLINEAR(textureCubeLodEXT(specularEnvironmentTexture,reflection,lod)).rgb;
|
|
93114
|
+
vec3 color=vec3(0.0);
|
|
93115
|
+
#if defined(X3D_MATERIAL_UNLIT)
|
|
93116
|
+
color=baseColor.rgb;
|
|
93469
93117
|
#else
|
|
93470
|
-
|
|
93471
|
-
#endif
|
|
93472
|
-
vec3 diffuse=diffuseLight*pbrInputs.diffuseColor;vec3 specular=specularLight*(pbrInputs.specularColor*brdf.x+brdf.y);return diffuse+specular;}
|
|
93118
|
+
color=f_emissive+diffuse+specular;color=sheen+color*albedoSheenScaling;color=color*(1.0-clearcoatFactor*clearcoatFresnel)+clearcoat;
|
|
93473
93119
|
#endif
|
|
93474
|
-
|
|
93475
|
-
|
|
93476
|
-
|
|
93477
|
-
|
|
93478
|
-
if(NdotL>0.001&&light.shadowIntensity>0.0)diffuseSpecContrib=mix(diffuseSpecContrib,light.shadowColor,getShadowIntensity(i,light));
|
|
93479
|
-
#endif
|
|
93480
|
-
vec3 color=NdotL*attenuationSpotFactor*light.color*diffuseSpecContrib;finalColor+=color;}}
|
|
93481
|
-
#endif
|
|
93482
|
-
#if defined(USE_IBL)
|
|
93483
|
-
vec3 reflection=-normalize(reflect(v,n));finalColor+=getIBLContribution(pbrInputs,n,reflection);
|
|
93484
|
-
#endif
|
|
93485
|
-
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
93486
|
-
finalColor=mix(finalColor,finalColor*getOcclusionFactor(),x3d_Material.occlusionStrength);
|
|
93120
|
+
#if defined(X3D_LINEAR_OUTPUT)
|
|
93121
|
+
return vec4(color.rgb,baseColor.a);
|
|
93122
|
+
#else
|
|
93123
|
+
return vec4(toneMap(color),baseColor.a);
|
|
93487
93124
|
#endif
|
|
93488
|
-
|
|
93125
|
+
}void main(){fragment_main();}
|
|
93489
93126
|
`
|
|
93490
93127
|
;
|
|
93491
93128
|
|
|
@@ -93493,9 +93130,9 @@ x_ite_Namespace .add ("PBR1.fs", "assets/shaders/webgl1/PBR1.fs", PBR1_fs_defaul
|
|
|
93493
93130
|
/* harmony default export */ const PBR1_fs = (PBR1_fs_default_);
|
|
93494
93131
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/Phong1.fs.js
|
|
93495
93132
|
const Phong1_fs_default_ = /* glsl */ `precision highp float;precision highp int;precision highp sampler2D;precision highp samplerCube;
|
|
93496
|
-
#pragma X3D include "
|
|
93497
|
-
#pragma X3D include "
|
|
93498
|
-
#pragma X3D include "
|
|
93133
|
+
#pragma X3D include "common/Fragment.glsl"
|
|
93134
|
+
#pragma X3D include "common/Material.glsl"
|
|
93135
|
+
#pragma X3D include "common/Normal.glsl"
|
|
93499
93136
|
#if defined(X3D_AMBIENT_TEXTURE)
|
|
93500
93137
|
uniform x3d_AmbientTextureParameters x3d_AmbientTexture;
|
|
93501
93138
|
#endif
|
|
@@ -93523,16 +93160,14 @@ vec4 diffuseParameter=vec4(x3d_Material.diffuseColor,alpha);
|
|
|
93523
93160
|
#if defined(X3D_DIFFUSE_TEXTURE)
|
|
93524
93161
|
vec3 texCoord=getTexCoord(x3d_DiffuseTexture.textureTransformMapping,x3d_DiffuseTexture.textureCoordinateMapping);
|
|
93525
93162
|
#if defined(X3D_DIFFUSE_TEXTURE_2D)
|
|
93526
|
-
|
|
93163
|
+
diffuseParameter*=texture2D(x3d_DiffuseTexture.texture2D,texCoord.st);
|
|
93527
93164
|
#elif defined(X3D_DIFFUSE_TEXTURE_CUBE)
|
|
93528
|
-
|
|
93165
|
+
diffuseParameter*=textureCube(x3d_DiffuseTexture.textureCube,texCoord);
|
|
93529
93166
|
#endif
|
|
93530
93167
|
#elif defined(X3D_TEXTURE)
|
|
93531
|
-
|
|
93532
|
-
#else
|
|
93533
|
-
return diffuseParameter;
|
|
93168
|
+
diffuseParameter=getTextureColor(diffuseParameter,vec4(x3d_Material.specularColor,alpha));
|
|
93534
93169
|
#endif
|
|
93535
|
-
}
|
|
93170
|
+
return diffuseParameter;}
|
|
93536
93171
|
#if defined(X3D_SPECULAR_TEXTURE)
|
|
93537
93172
|
uniform x3d_SpecularTextureParameters x3d_SpecularTexture;
|
|
93538
93173
|
#endif
|
|
@@ -93540,14 +93175,12 @@ vec3 getSpecularColor(){vec3 specularParameter=x3d_Material.specularColor;
|
|
|
93540
93175
|
#if defined(X3D_SPECULAR_TEXTURE)
|
|
93541
93176
|
vec3 texCoord=getTexCoord(x3d_SpecularTexture.textureTransformMapping,x3d_SpecularTexture.textureCoordinateMapping);
|
|
93542
93177
|
#if defined(X3D_SPECULAR_TEXTURE_2D)
|
|
93543
|
-
|
|
93178
|
+
specularParameter*=texture2D(x3d_SpecularTexture.texture2D,texCoord.st).rgb;
|
|
93544
93179
|
#elif defined(X3D_SPECULAR_TEXTURE_CUBE)
|
|
93545
|
-
|
|
93180
|
+
specularParameter*=textureCube(x3d_SpecularTexture.textureCube,texCoord).rgb;
|
|
93546
93181
|
#endif
|
|
93547
|
-
#else
|
|
93548
|
-
return specularParameter;
|
|
93549
93182
|
#endif
|
|
93550
|
-
}
|
|
93183
|
+
return specularParameter;}
|
|
93551
93184
|
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93552
93185
|
uniform x3d_EmissiveTextureParameters x3d_EmissiveTexture;
|
|
93553
93186
|
#endif
|
|
@@ -93555,14 +93188,12 @@ vec3 getEmissiveColor(){vec3 emissiveParameter=x3d_Material.emissiveColor;
|
|
|
93555
93188
|
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93556
93189
|
vec3 texCoord=getTexCoord(x3d_EmissiveTexture.textureTransformMapping,x3d_EmissiveTexture.textureCoordinateMapping);
|
|
93557
93190
|
#if defined(X3D_EMISSIVE_TEXTURE_2D)
|
|
93558
|
-
|
|
93191
|
+
emissiveParameter*=texture2D(x3d_EmissiveTexture.texture2D,texCoord.st).rgb;
|
|
93559
93192
|
#elif defined(X3D_EMISSIVE_TEXTURE_CUBE)
|
|
93560
|
-
|
|
93193
|
+
emissiveParameter*=textureCube(x3d_EmissiveTexture.textureCube,texCoord).rgb;
|
|
93561
93194
|
#endif
|
|
93562
|
-
#else
|
|
93563
|
-
return emissiveParameter;
|
|
93564
93195
|
#endif
|
|
93565
|
-
}
|
|
93196
|
+
return emissiveParameter;}
|
|
93566
93197
|
#if defined(X3D_SHININESS_TEXTURE)
|
|
93567
93198
|
uniform x3d_ShininessTextureParameters x3d_ShininessTexture;
|
|
93568
93199
|
#endif
|
|
@@ -93570,14 +93201,12 @@ float getShininessFactor(){float shininess=x3d_Material.shininess;
|
|
|
93570
93201
|
#if defined(X3D_SHININESS_TEXTURE)
|
|
93571
93202
|
vec3 texCoord=getTexCoord(x3d_ShininessTexture.textureTransformMapping,x3d_ShininessTexture.textureCoordinateMapping);
|
|
93572
93203
|
#if defined(X3D_SHININESS_TEXTURE_2D)
|
|
93573
|
-
|
|
93204
|
+
shininess*=texture2D(x3d_ShininessTexture.texture2D,texCoord.st).a;
|
|
93574
93205
|
#elif defined(X3D_SHININESS_TEXTURE_CUBE)
|
|
93575
|
-
|
|
93206
|
+
shininess*=textureCube(x3d_ShininessTexture.textureCube,texCoord).a;
|
|
93576
93207
|
#endif
|
|
93577
|
-
#else
|
|
93578
|
-
return shininess;
|
|
93579
93208
|
#endif
|
|
93580
|
-
}
|
|
93209
|
+
return shininess;}
|
|
93581
93210
|
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
93582
93211
|
uniform x3d_OcclusionTextureParameters x3d_OcclusionTexture;
|
|
93583
93212
|
#endif
|
|
@@ -93618,8 +93247,8 @@ varying vec4 texCoord0;
|
|
|
93618
93247
|
#else
|
|
93619
93248
|
vec4 texCoord0=vec4(0.0,0.0,0.0,1.0);
|
|
93620
93249
|
#endif
|
|
93621
|
-
#pragma X3D include "
|
|
93622
|
-
#pragma X3D include "
|
|
93250
|
+
#pragma X3D include "common/ClipPlanes.glsl"
|
|
93251
|
+
#pragma X3D include "common/Point.glsl"
|
|
93623
93252
|
uniform float x3d_Id;void main(){
|
|
93624
93253
|
#if defined(X3D_CLIP_PLANES)
|
|
93625
93254
|
clip();
|
|
@@ -93642,7 +93271,7 @@ varying vec3 vertex;varying vec3 normal;
|
|
|
93642
93271
|
#if!defined(X3D_GEOMETRY_0D)&&!defined(X3D_GEOMETRY_1D)
|
|
93643
93272
|
varying vec4 texCoord0;
|
|
93644
93273
|
#endif
|
|
93645
|
-
#pragma X3D include "
|
|
93274
|
+
#pragma X3D include "common/PointSize.glsl"
|
|
93646
93275
|
void main(){
|
|
93647
93276
|
#if defined(X3D_GEOMETRY_0D)
|
|
93648
93277
|
#if defined(X3D_STYLE_PROPERTIES)
|
|
@@ -93663,7 +93292,7 @@ x_ite_Namespace .add ("Pointing1.vs", "assets/shaders/webgl1/Pointing1.vs", Poin
|
|
|
93663
93292
|
/* harmony default export */ const Pointing1_vs = (Pointing1_vs_default_);
|
|
93664
93293
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/Unlit1.fs.js
|
|
93665
93294
|
const Unlit1_fs_default_ = /* glsl */ `precision highp float;precision highp int;precision highp sampler2D;precision highp samplerCube;
|
|
93666
|
-
#pragma X3D include "
|
|
93295
|
+
#pragma X3D include "common/Fragment.glsl"
|
|
93667
93296
|
uniform x3d_UnlitMaterialParameters x3d_Material;
|
|
93668
93297
|
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93669
93298
|
uniform x3d_EmissiveTextureParameters x3d_EmissiveTexture;
|
|
@@ -93677,16 +93306,14 @@ vec4 emissiveParameter=vec4(x3d_Material.emissiveColor,alpha);
|
|
|
93677
93306
|
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93678
93307
|
vec3 texCoord=getTexCoord(x3d_EmissiveTexture.textureTransformMapping,x3d_EmissiveTexture.textureCoordinateMapping);
|
|
93679
93308
|
#if defined(X3D_EMISSIVE_TEXTURE_2D)
|
|
93680
|
-
|
|
93309
|
+
emissiveParameter*=texture2D(x3d_EmissiveTexture.texture2D,texCoord.st);
|
|
93681
93310
|
#elif defined(X3D_EMISSIVE_TEXTURE_CUBE)
|
|
93682
|
-
|
|
93311
|
+
emissiveParameter*=textureCube(x3d_EmissiveTexture.textureCube,texCoord);
|
|
93683
93312
|
#endif
|
|
93684
93313
|
#elif defined(X3D_TEXTURE)
|
|
93685
|
-
|
|
93686
|
-
#else
|
|
93687
|
-
return emissiveParameter;
|
|
93314
|
+
emissiveParameter=getTextureColor(emissiveParameter,vec4(vec3(1.0),alpha));
|
|
93688
93315
|
#endif
|
|
93689
|
-
}vec4 getMaterialColor(){return getEmissiveColor();}void main(){fragment_main();}
|
|
93316
|
+
return emissiveParameter;}vec4 getMaterialColor(){return getEmissiveColor();}void main(){fragment_main();}
|
|
93690
93317
|
`
|
|
93691
93318
|
;
|
|
93692
93319
|
|
|
@@ -93711,7 +93338,7 @@ x_ite_Namespace .add ("Compose2.vs", "assets/shaders/webgl2/Compose2.vs", Compos
|
|
|
93711
93338
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/Default2.vs.js
|
|
93712
93339
|
const Default2_vs_default_ = /* glsl */ `#version 300 es
|
|
93713
93340
|
precision highp float;precision highp int;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;
|
|
93714
|
-
#pragma X3D include "
|
|
93341
|
+
#pragma X3D include "common/Vertex.glsl"
|
|
93715
93342
|
void main(){vertex_main();}
|
|
93716
93343
|
`
|
|
93717
93344
|
;
|
|
@@ -93721,8 +93348,8 @@ x_ite_Namespace .add ("Default2.vs", "assets/shaders/webgl2/Default2.vs", Defaul
|
|
|
93721
93348
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/Depth2.fs.js
|
|
93722
93349
|
const Depth2_fs_default_ = /* glsl */ `#version 300 es
|
|
93723
93350
|
precision highp float;precision highp int;precision highp sampler2D;in vec3 vertex;out vec4 x3d_FragColor;
|
|
93724
|
-
#pragma X3D include "
|
|
93725
|
-
#pragma X3D include "
|
|
93351
|
+
#pragma X3D include "common/ClipPlanes.glsl"
|
|
93352
|
+
#pragma X3D include "common/Point.glsl"
|
|
93726
93353
|
void main(){
|
|
93727
93354
|
#if defined(X3D_CLIP_PLANES)
|
|
93728
93355
|
clip();
|
|
@@ -93739,10 +93366,10 @@ x_ite_Namespace .add ("Depth2.fs", "assets/shaders/webgl2/Depth2.fs", Depth2_fs_
|
|
|
93739
93366
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/Depth2.vs.js
|
|
93740
93367
|
const Depth2_vs_default_ = /* glsl */ `#version 300 es
|
|
93741
93368
|
precision highp float;precision highp int;precision highp sampler2D;uniform mat4 x3d_ProjectionMatrix;uniform mat4 x3d_ModelViewMatrix;in vec4 x3d_Vertex;out vec3 vertex;
|
|
93742
|
-
#pragma X3D include "
|
|
93743
|
-
#pragma X3D include "
|
|
93744
|
-
#pragma X3D include "
|
|
93745
|
-
#pragma X3D include "
|
|
93369
|
+
#pragma X3D include "common/Utils.glsl"
|
|
93370
|
+
#pragma X3D include "common/Skin.glsl"
|
|
93371
|
+
#pragma X3D include "common/Particle.glsl"
|
|
93372
|
+
#pragma X3D include "common/PointSize.glsl"
|
|
93746
93373
|
void main(){vec4 x3d_TransformedVertex=getParticleVertex(getSkinVertex(x3d_Vertex,vec3(0.0)));vec4 position=x3d_ModelViewMatrix*x3d_TransformedVertex;vertex=position.xyz;
|
|
93747
93374
|
#if defined(X3D_GEOMETRY_0D)
|
|
93748
93375
|
#if defined(X3D_STYLE_PROPERTIES)
|
|
@@ -93760,7 +93387,7 @@ x_ite_Namespace .add ("Depth2.vs", "assets/shaders/webgl2/Depth2.vs", Depth2_vs_
|
|
|
93760
93387
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/Gouraud2.fs.js
|
|
93761
93388
|
const Gouraud2_fs_default_ = /* glsl */ `#version 300 es
|
|
93762
93389
|
precision highp float;precision highp int;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;
|
|
93763
|
-
#pragma X3D include "
|
|
93390
|
+
#pragma X3D include "common/Fragment.glsl"
|
|
93764
93391
|
in vec4 frontColor;
|
|
93765
93392
|
#if!defined(X3D_GEOMETRY_0D)&&!defined(X3D_GEOMETRY_1D)
|
|
93766
93393
|
in vec4 backColor;
|
|
@@ -93786,8 +93413,8 @@ x_ite_Namespace .add ("Gouraud2.fs", "assets/shaders/webgl2/Gouraud2.fs", Gourau
|
|
|
93786
93413
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/Gouraud2.vs.js
|
|
93787
93414
|
const Gouraud2_vs_default_ = /* glsl */ `#version 300 es
|
|
93788
93415
|
precision highp float;precision highp int;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;
|
|
93789
|
-
#pragma X3D include "
|
|
93790
|
-
#pragma X3D include "
|
|
93416
|
+
#pragma X3D include "common/Vertex.glsl"
|
|
93417
|
+
#pragma X3D include "common/Material.glsl"
|
|
93791
93418
|
out vec4 frontColor;
|
|
93792
93419
|
#if!defined(X3D_GEOMETRY_0D)&&!defined(X3D_GEOMETRY_1D)
|
|
93793
93420
|
out vec4 backColor;
|
|
@@ -93833,118 +93460,50 @@ x_ite_Namespace .add ("LineTransform2.vs", "assets/shaders/webgl2/LineTransform2
|
|
|
93833
93460
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/PBR2.fs.js
|
|
93834
93461
|
const PBR2_fs_default_ = /* glsl */ `#version 300 es
|
|
93835
93462
|
precision highp float;precision highp int;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;
|
|
93836
|
-
#pragma X3D include "
|
|
93837
|
-
#pragma X3D include "
|
|
93838
|
-
#pragma X3D include "
|
|
93839
|
-
#pragma X3D include "include/SpotFactor.glsl"
|
|
93840
|
-
#pragma X3D include "include/Shadow.glsl"
|
|
93463
|
+
#pragma X3D include "common/Fragment.glsl"
|
|
93464
|
+
#pragma X3D include "common/Normal.glsl"
|
|
93465
|
+
#pragma X3D include "common/Shadow.glsl"
|
|
93841
93466
|
#if defined(X3D_LIGHTING)
|
|
93842
93467
|
uniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];
|
|
93843
93468
|
#endif
|
|
93844
93469
|
uniform x3d_PhysicalMaterialParameters x3d_Material;
|
|
93845
|
-
#
|
|
93846
|
-
|
|
93847
|
-
#
|
|
93848
|
-
#
|
|
93849
|
-
|
|
93850
|
-
#
|
|
93851
|
-
|
|
93852
|
-
#if defined(X3D_COLOR_MATERIAL)
|
|
93853
|
-
vec4 baseParameter=vec4(color.rgb,color.a*alpha);
|
|
93854
|
-
#else
|
|
93855
|
-
vec4 baseParameter=vec4(x3d_Material.baseColor,alpha);
|
|
93856
|
-
#endif
|
|
93857
|
-
#if defined(X3D_BASE_TEXTURE)
|
|
93858
|
-
vec3 texCoord=getTexCoord(x3d_BaseTexture.textureTransformMapping,x3d_BaseTexture.textureCoordinateMapping);
|
|
93859
|
-
#if defined(X3D_BASE_TEXTURE_2D)
|
|
93860
|
-
return baseParameter*SRGBtoLINEAR(texture(x3d_BaseTexture.texture2D,texCoord.st));
|
|
93861
|
-
#elif defined(X3D_BASE_TEXTURE_3D)
|
|
93862
|
-
return baseParameter*SRGBtoLINEAR(texture(x3d_BaseTexture.texture3D,texCoord));
|
|
93863
|
-
#elif defined(X3D_BASE_TEXTURE_CUBE)
|
|
93864
|
-
return baseParameter*SRGBtoLINEAR(texture(x3d_BaseTexture.textureCube,texCoord));
|
|
93865
|
-
#endif
|
|
93866
|
-
#elif defined(X3D_TEXTURE)
|
|
93867
|
-
return getTextureColor(baseParameter,vec4(vec3(1.0),alpha));
|
|
93868
|
-
#else
|
|
93869
|
-
return baseParameter;
|
|
93870
|
-
#endif
|
|
93871
|
-
}
|
|
93872
|
-
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93873
|
-
uniform x3d_EmissiveTextureParameters x3d_EmissiveTexture;
|
|
93874
|
-
#endif
|
|
93875
|
-
vec3 getEmissiveColor(){vec3 emissiveParameter=x3d_Material.emissiveColor;
|
|
93876
|
-
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93877
|
-
vec3 texCoord=getTexCoord(x3d_EmissiveTexture.textureTransformMapping,x3d_EmissiveTexture.textureCoordinateMapping);
|
|
93878
|
-
#if defined(X3D_EMISSIVE_TEXTURE_2D)
|
|
93879
|
-
return emissiveParameter*SRGBtoLINEAR(texture(x3d_EmissiveTexture.texture2D,texCoord.st)).rgb;
|
|
93880
|
-
#elif defined(X3D_EMISSIVE_TEXTURE_3D)
|
|
93881
|
-
return emissiveParameter*SRGBtoLINEAR(texture(x3d_EmissiveTexture.texture3D,texCoord)).rgb;
|
|
93882
|
-
#elif defined(X3D_EMISSIVE_TEXTURE_CUBE)
|
|
93883
|
-
return emissiveParameter*SRGBtoLINEAR(texture(x3d_EmissiveTexture.textureCube,texCoord)).rgb;
|
|
93470
|
+
#pragma X3D include "pbr/BDRF.glsl"
|
|
93471
|
+
#pragma X3D include "pbr/ToneMapping.glsl"
|
|
93472
|
+
#pragma X3D include "pbr/MaterialInfo.glsl"
|
|
93473
|
+
#pragma X3D include "pbr/Punctual.glsl"
|
|
93474
|
+
vec4 getMaterialColor(){vec4 baseColor=getBaseColor();vec3 n=getNormalVector(x3d_Material.normalScale);vec3 v=normalize(-vertex);MaterialInfo materialInfo;materialInfo.baseColor=baseColor.rgb;materialInfo.ior=1.5;materialInfo.f0=vec3(0.04);materialInfo.specularWeight=1.0;
|
|
93475
|
+
#if defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93476
|
+
materialInfo=getMetallicRoughnessInfo(materialInfo);
|
|
93884
93477
|
#endif
|
|
93885
|
-
|
|
93886
|
-
|
|
93478
|
+
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=max(max(materialInfo.f0.r,materialInfo.f0.g),materialInfo.f0.b);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;
|
|
93479
|
+
#if defined(X3D_USE_IBL)
|
|
93887
93480
|
#endif
|
|
93888
|
-
|
|
93889
|
-
#if defined(
|
|
93890
|
-
|
|
93891
|
-
#
|
|
93892
|
-
|
|
93893
|
-
#if defined(X3D_METALLIC_ROUGHNESS_TEXTURE)
|
|
93894
|
-
vec3 texCoord=getTexCoord(x3d_MetallicRoughnessTexture.textureTransformMapping,x3d_MetallicRoughnessTexture.textureCoordinateMapping);
|
|
93895
|
-
#if defined(X3D_METALLIC_ROUGHNESS_TEXTURE_2D)
|
|
93896
|
-
vec4 mrSample=texture(x3d_MetallicRoughnessTexture.texture2D,texCoord.st);
|
|
93897
|
-
#elif defined(X3D_METALLIC_ROUGHNESS_TEXTURE_3D)
|
|
93898
|
-
vec4 mrSample=texture(x3d_MetallicRoughnessTexture.texture3D,texCoord);
|
|
93899
|
-
#elif defined(X3D_METALLIC_ROUGHNESS_TEXTURE_CUBE)
|
|
93900
|
-
vec4 mrSample=texture(x3d_MetallicRoughnessTexture.textureCube,texCoord);
|
|
93481
|
+
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);
|
|
93482
|
+
#if defined(X3D_LIGHTING)
|
|
93483
|
+
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 NdotV=clamp(dot(n,v),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,pointToLight,distanceToLight);
|
|
93484
|
+
#if defined(X3D_SHADOWS)
|
|
93485
|
+
if(light.shadowIntensity>0.0)intensity=mix(intensity,light.shadowColor,getShadowIntensity(i,light));
|
|
93901
93486
|
#endif
|
|
93902
|
-
|
|
93903
|
-
#else
|
|
93904
|
-
return vec2(metallic,perceptualRoughness);
|
|
93487
|
+
f_diffuse+=intensity*NdotL*BRDF_lambertian(materialInfo.f0,materialInfo.f90,materialInfo.c_diff,materialInfo.specularWeight,VdotH);f_specular+=intensity*NdotL*BRDF_specularGGX(materialInfo.f0,materialInfo.f90,materialInfo.alphaRoughness,materialInfo.specularWeight,VdotH,NdotL,NdotV,NdotH);}}}
|
|
93905
93488
|
#endif
|
|
93906
|
-
|
|
93489
|
+
f_emissive=getEmissiveColor();float clearcoatFactor=0.0;vec3 clearcoatFresnel=vec3(0.0);vec3 diffuse;vec3 specular;vec3 sheen;vec3 clearcoat;
|
|
93907
93490
|
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
93908
|
-
|
|
93909
|
-
#endif
|
|
93910
|
-
float getOcclusionFactor(){
|
|
93911
|
-
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
93912
|
-
vec3 texCoord=getTexCoord(x3d_OcclusionTexture.textureTransformMapping,x3d_OcclusionTexture.textureCoordinateMapping);
|
|
93913
|
-
#if defined(X3D_OCCLUSION_TEXTURE_2D)
|
|
93914
|
-
return texture(x3d_OcclusionTexture.texture2D,texCoord.st).r;
|
|
93915
|
-
#elif defined(X3D_OCCLUSION_TEXTURE_3D)
|
|
93916
|
-
return texture(x3d_OcclusionTexture.texture3D,texCoord).r;
|
|
93917
|
-
#elif defined(X3D_OCCLUSION_TEXTURE_CUBE)
|
|
93918
|
-
return texture(x3d_OcclusionTexture.textureCube,texCoord).r;
|
|
93919
|
-
#endif
|
|
93491
|
+
float ao=getOcclusionFactor();diffuse=f_diffuse+mix(f_diffuse_ibl,f_diffuse_ibl*ao,x3d_Material.occlusionStrength);specular=f_specular+mix(f_specular_ibl,f_specular_ibl*ao,x3d_Material.occlusionStrength);sheen=f_sheen+mix(f_sheen_ibl,f_sheen_ibl*ao,x3d_Material.occlusionStrength);clearcoat=f_clearcoat+mix(f_clearcoat_ibl,f_clearcoat_ibl*ao,x3d_Material.occlusionStrength);
|
|
93920
93492
|
#else
|
|
93921
|
-
|
|
93493
|
+
diffuse=f_diffuse_ibl+f_diffuse;specular=f_specular_ibl+f_specular;sheen=f_sheen_ibl+f_sheen;clearcoat=f_clearcoat_ibl+f_clearcoat;
|
|
93922
93494
|
#endif
|
|
93923
|
-
|
|
93924
|
-
#if defined(
|
|
93925
|
-
|
|
93926
|
-
#if defined(USE_TEX_LOD)
|
|
93927
|
-
vec3 specularLight=SRGBtoLINEAR(textureCubeLodEXT(specularEnvironmentTexture,reflection,lod)).rgb;
|
|
93495
|
+
vec3 color=vec3(0.0);
|
|
93496
|
+
#if defined(X3D_MATERIAL_UNLIT)
|
|
93497
|
+
color=baseColor.rgb;
|
|
93928
93498
|
#else
|
|
93929
|
-
|
|
93930
|
-
#endif
|
|
93931
|
-
vec3 diffuse=diffuseLight*pbrInputs.diffuseColor;vec3 specular=specularLight*(pbrInputs.specularColor*brdf.x+brdf.y);return diffuse+specular;}
|
|
93932
|
-
#endif
|
|
93933
|
-
vec3 diffuse(const in PBRInfo pbrInputs){return pbrInputs.diffuseColor/M_PI;}vec3 specularReflection(const in PBRInfo pbrInputs){return pbrInputs.reflectance0+(pbrInputs.reflectance90-pbrInputs.reflectance0)*pow(clamp(1.0-pbrInputs.VdotH,0.0,1.0),5.0);}float geometricOcclusion(const in PBRInfo pbrInputs){float NdotL=pbrInputs.NdotL;float NdotV=pbrInputs.NdotV;float r=pbrInputs.alphaRoughness;float attenuationL=2.0*NdotL/(NdotL+sqrt(r*r+(1.0-r*r)*(NdotL*NdotL)));float attenuationV=2.0*NdotV/(NdotV+sqrt(r*r+(1.0-r*r)*(NdotV*NdotV)));return attenuationL*attenuationV;}float microfacetDistribution(const in PBRInfo pbrInputs){float roughnessSq=pbrInputs.alphaRoughness*pbrInputs.alphaRoughness;float f=(pbrInputs.NdotH*roughnessSq-pbrInputs.NdotH)*pbrInputs.NdotH+1.0;return roughnessSq/(M_PI*f*f);}vec4 getMaterialColor(){vec2 metallicRoughness=getMetallicRoughness();float perceptualRoughness=clamp(metallicRoughness[1],c_MinRoughness,1.0);float metallic=clamp(metallicRoughness[0],0.0,1.0);float alphaRoughness=perceptualRoughness*perceptualRoughness;vec4 baseColor=getBaseColor();float alpha=baseColor.a;vec3 f0=vec3(0.04);vec3 diffuseColor=baseColor.rgb*(vec3(1.0)-f0);diffuseColor*=1.0-metallic;vec3 specularColor=mix(f0,baseColor.rgb,metallic);float reflectance=max(max(specularColor.r,specularColor.g),specularColor.b);float reflectance90=clamp(reflectance*25.0,0.0,1.0);vec3 specularEnvironmentR0=specularColor.rgb;vec3 specularEnvironmentR90=vec3(1.0,1.0,1.0)*reflectance90;vec3 n=getNormalVector(x3d_Material.normalScale);vec3 v=normalize(-vertex);vec3 finalColor=vec3(0.0);
|
|
93934
|
-
#if defined(X3D_LIGHTING)
|
|
93935
|
-
for(int i=0;i<X3D_NUM_LIGHTS;i++){x3d_LightSourceParameters light=x3d_LightSource[i];vec3 vL=light.location-vertex;float dL=length(light.matrix*vL);bool di=light.type==x3d_DirectionalLight;if(di||dL<=light.radius){vec3 d=light.direction;vec3 c=light.attenuation;vec3 L=di?-d:normalize(vL);vec3 l=normalize(L);vec3 h=normalize(l+v);float NdotL=clamp(dot(n,l),0.001,1.0);float NdotV=abs(dot(n,v))+0.001;float NdotH=clamp(dot(n,h),0.0,1.0);float LdotH=clamp(dot(l,h),0.0,1.0);float VdotH=clamp(dot(v,h),0.0,1.0);PBRInfo pbrInputs=PBRInfo(NdotL,NdotV,NdotH,LdotH,VdotH,perceptualRoughness,metallic,specularEnvironmentR0,specularEnvironmentR90,alphaRoughness,diffuseColor,specularColor);vec3 F=specularReflection(pbrInputs);float G=geometricOcclusion(pbrInputs);float D=microfacetDistribution(pbrInputs);float attenuationFactor=di?1.0:1.0/max(dot(c,vec3(1.0,dL,dL*dL)),1.0);float spotFactor=light.type==x3d_SpotLight?getSpotFactor(light.cutOffAngle,light.beamWidth,L,d):1.0;float attenuationSpotFactor=attenuationFactor*spotFactor;vec3 diffuseContrib=(1.0-F)*diffuse(pbrInputs);vec3 specContrib=F*G*D/(4.0*NdotL*NdotV);vec3 diffuseSpecContrib=light.intensity*(diffuseContrib+specContrib);
|
|
93936
|
-
#if defined(X3D_SHADOWS)
|
|
93937
|
-
if(NdotL>0.001&&light.shadowIntensity>0.0)diffuseSpecContrib=mix(diffuseSpecContrib,light.shadowColor,getShadowIntensity(i,light));
|
|
93499
|
+
color=f_emissive+diffuse+specular;color=sheen+color*albedoSheenScaling;color=color*(1.0-clearcoatFactor*clearcoatFresnel)+clearcoat;
|
|
93938
93500
|
#endif
|
|
93939
|
-
|
|
93940
|
-
|
|
93941
|
-
#
|
|
93942
|
-
|
|
93943
|
-
#endif
|
|
93944
|
-
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
93945
|
-
finalColor=mix(finalColor,finalColor*getOcclusionFactor(),x3d_Material.occlusionStrength);
|
|
93501
|
+
#if defined(X3D_LINEAR_OUTPUT)
|
|
93502
|
+
return vec4(color.rgb,baseColor.a);
|
|
93503
|
+
#else
|
|
93504
|
+
return vec4(toneMap(color),baseColor.a);
|
|
93946
93505
|
#endif
|
|
93947
|
-
|
|
93506
|
+
}void main(){fragment_main();}
|
|
93948
93507
|
`
|
|
93949
93508
|
;
|
|
93950
93509
|
|
|
@@ -93953,9 +93512,9 @@ x_ite_Namespace .add ("PBR2.fs", "assets/shaders/webgl2/PBR2.fs", PBR2_fs_defaul
|
|
|
93953
93512
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/Phong2.fs.js
|
|
93954
93513
|
const Phong2_fs_default_ = /* glsl */ `#version 300 es
|
|
93955
93514
|
precision highp float;precision highp int;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;
|
|
93956
|
-
#pragma X3D include "
|
|
93957
|
-
#pragma X3D include "
|
|
93958
|
-
#pragma X3D include "
|
|
93515
|
+
#pragma X3D include "common/Fragment.glsl"
|
|
93516
|
+
#pragma X3D include "common/Material.glsl"
|
|
93517
|
+
#pragma X3D include "common/Normal.glsl"
|
|
93959
93518
|
#if defined(X3D_AMBIENT_TEXTURE)
|
|
93960
93519
|
uniform x3d_AmbientTextureParameters x3d_AmbientTexture;
|
|
93961
93520
|
#endif
|
|
@@ -93963,16 +93522,14 @@ vec3 getAmbientColor(const in vec3 diffuseColor){vec3 ambientParameter=x3d_Mater
|
|
|
93963
93522
|
#if defined(X3D_AMBIENT_TEXTURE)
|
|
93964
93523
|
vec3 texCoord=getTexCoord(x3d_AmbientTexture.textureTransformMapping,x3d_AmbientTexture.textureCoordinateMapping);
|
|
93965
93524
|
#if defined(X3D_AMBIENT_TEXTURE_2D)
|
|
93966
|
-
|
|
93525
|
+
ambientParameter*=texture(x3d_AmbientTexture.texture2D,texCoord.st).rgb;
|
|
93967
93526
|
#elif defined(X3D_AMBIENT_TEXTURE_3D)
|
|
93968
|
-
|
|
93527
|
+
ambientParameter*=texture(x3d_AmbientTexture.texture3D,texCoord).rgb;
|
|
93969
93528
|
#elif defined(X3D_AMBIENT_TEXTURE_CUBE)
|
|
93970
|
-
|
|
93529
|
+
ambientParameter*=texture(x3d_AmbientTexture.textureCube,texCoord).rgb;
|
|
93971
93530
|
#endif
|
|
93972
|
-
#else
|
|
93973
|
-
return ambientParameter;
|
|
93974
93531
|
#endif
|
|
93975
|
-
}
|
|
93532
|
+
return ambientParameter;}
|
|
93976
93533
|
#if defined(X3D_DIFFUSE_TEXTURE)
|
|
93977
93534
|
uniform x3d_DiffuseTextureParameters x3d_DiffuseTexture;
|
|
93978
93535
|
#endif
|
|
@@ -93985,18 +93542,16 @@ vec4 diffuseParameter=vec4(x3d_Material.diffuseColor,alpha);
|
|
|
93985
93542
|
#if defined(X3D_DIFFUSE_TEXTURE)
|
|
93986
93543
|
vec3 texCoord=getTexCoord(x3d_DiffuseTexture.textureTransformMapping,x3d_DiffuseTexture.textureCoordinateMapping);
|
|
93987
93544
|
#if defined(X3D_DIFFUSE_TEXTURE_2D)
|
|
93988
|
-
|
|
93545
|
+
diffuseParameter*=texture(x3d_DiffuseTexture.texture2D,texCoord.st);
|
|
93989
93546
|
#elif defined(X3D_DIFFUSE_TEXTURE_3D)
|
|
93990
|
-
|
|
93547
|
+
diffuseParameter*=texture(x3d_DiffuseTexture.texture3D,texCoord);
|
|
93991
93548
|
#elif defined(X3D_DIFFUSE_TEXTURE_CUBE)
|
|
93992
|
-
|
|
93549
|
+
diffuseParameter*=texture(x3d_DiffuseTexture.textureCube,texCoord);
|
|
93993
93550
|
#endif
|
|
93994
93551
|
#elif defined(X3D_TEXTURE)
|
|
93995
|
-
|
|
93996
|
-
#else
|
|
93997
|
-
return diffuseParameter;
|
|
93552
|
+
diffuseParameter=getTextureColor(diffuseParameter,vec4(x3d_Material.specularColor,alpha));
|
|
93998
93553
|
#endif
|
|
93999
|
-
}
|
|
93554
|
+
return diffuseParameter;}
|
|
94000
93555
|
#if defined(X3D_SPECULAR_TEXTURE)
|
|
94001
93556
|
uniform x3d_SpecularTextureParameters x3d_SpecularTexture;
|
|
94002
93557
|
#endif
|
|
@@ -94004,16 +93559,14 @@ vec3 getSpecularColor(){vec3 specularParameter=x3d_Material.specularColor;
|
|
|
94004
93559
|
#if defined(X3D_SPECULAR_TEXTURE)
|
|
94005
93560
|
vec3 texCoord=getTexCoord(x3d_SpecularTexture.textureTransformMapping,x3d_SpecularTexture.textureCoordinateMapping);
|
|
94006
93561
|
#if defined(X3D_SPECULAR_TEXTURE_2D)
|
|
94007
|
-
|
|
93562
|
+
specularParameter*=texture(x3d_SpecularTexture.texture2D,texCoord.st).rgb;
|
|
94008
93563
|
#elif defined(X3D_SPECULAR_TEXTURE_3D)
|
|
94009
|
-
|
|
93564
|
+
specularParameter*=texture(x3d_SpecularTexture.texture3D,texCoord).rgb;
|
|
94010
93565
|
#elif defined(X3D_SPECULAR_TEXTURE_CUBE)
|
|
94011
|
-
|
|
93566
|
+
specularParameter*=texture(x3d_SpecularTexture.textureCube,texCoord).rgb;
|
|
94012
93567
|
#endif
|
|
94013
|
-
#else
|
|
94014
|
-
return specularParameter;
|
|
94015
93568
|
#endif
|
|
94016
|
-
}
|
|
93569
|
+
return specularParameter;}
|
|
94017
93570
|
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
94018
93571
|
uniform x3d_EmissiveTextureParameters x3d_EmissiveTexture;
|
|
94019
93572
|
#endif
|
|
@@ -94021,16 +93574,14 @@ vec3 getEmissiveColor(){vec3 emissiveParameter=x3d_Material.emissiveColor;
|
|
|
94021
93574
|
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
94022
93575
|
vec3 texCoord=getTexCoord(x3d_EmissiveTexture.textureTransformMapping,x3d_EmissiveTexture.textureCoordinateMapping);
|
|
94023
93576
|
#if defined(X3D_EMISSIVE_TEXTURE_2D)
|
|
94024
|
-
|
|
93577
|
+
emissiveParameter*=texture(x3d_EmissiveTexture.texture2D,texCoord.st).rgb;
|
|
94025
93578
|
#elif defined(X3D_EMISSIVE_TEXTURE_3D)
|
|
94026
|
-
|
|
93579
|
+
emissiveParameter*=texture(x3d_EmissiveTexture.texture3D,texCoord).rgb;
|
|
94027
93580
|
#elif defined(X3D_EMISSIVE_TEXTURE_CUBE)
|
|
94028
|
-
|
|
93581
|
+
emissiveParameter*=texture(x3d_EmissiveTexture.textureCube,texCoord).rgb;
|
|
94029
93582
|
#endif
|
|
94030
|
-
#else
|
|
94031
|
-
return emissiveParameter;
|
|
94032
93583
|
#endif
|
|
94033
|
-
}
|
|
93584
|
+
return emissiveParameter;}
|
|
94034
93585
|
#if defined(X3D_SHININESS_TEXTURE)
|
|
94035
93586
|
uniform x3d_ShininessTextureParameters x3d_ShininessTexture;
|
|
94036
93587
|
#endif
|
|
@@ -94038,16 +93589,14 @@ float getShininessFactor(){float shininess=x3d_Material.shininess;
|
|
|
94038
93589
|
#if defined(X3D_SHININESS_TEXTURE)
|
|
94039
93590
|
vec3 texCoord=getTexCoord(x3d_ShininessTexture.textureTransformMapping,x3d_ShininessTexture.textureCoordinateMapping);
|
|
94040
93591
|
#if defined(X3D_SHININESS_TEXTURE_2D)
|
|
94041
|
-
|
|
93592
|
+
shininess*=texture(x3d_ShininessTexture.texture2D,texCoord.st).a;
|
|
94042
93593
|
#elif defined(X3D_SHININESS_TEXTURE_3D)
|
|
94043
|
-
|
|
93594
|
+
shininess*=texture(x3d_ShininessTexture.texture3D,texCoord).a;
|
|
94044
93595
|
#elif defined(X3D_SHININESS_TEXTURE_CUBE)
|
|
94045
|
-
|
|
93596
|
+
shininess*=texture(x3d_ShininessTexture.textureCube,texCoord).a;
|
|
94046
93597
|
#endif
|
|
94047
|
-
#else
|
|
94048
|
-
return shininess;
|
|
94049
93598
|
#endif
|
|
94050
|
-
}
|
|
93599
|
+
return shininess;}
|
|
94051
93600
|
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
94052
93601
|
uniform x3d_OcclusionTextureParameters x3d_OcclusionTexture;
|
|
94053
93602
|
#endif
|
|
@@ -94091,8 +93640,8 @@ in vec4 texCoord0;
|
|
|
94091
93640
|
vec4 texCoord0=vec4(0.0,0.0,0.0,1.0);
|
|
94092
93641
|
#endif
|
|
94093
93642
|
layout(location=0)out vec4 x3d_FragData0;layout(location=1)out vec4 x3d_FragData1;layout(location=2)out vec4 x3d_FragData2;
|
|
94094
|
-
#pragma X3D include "
|
|
94095
|
-
#pragma X3D include "
|
|
93643
|
+
#pragma X3D include "common/ClipPlanes.glsl"
|
|
93644
|
+
#pragma X3D include "common/Point.glsl"
|
|
94096
93645
|
#pragma X3D include "Stipple.glsl"
|
|
94097
93646
|
uniform float x3d_Id;void main(){
|
|
94098
93647
|
#if defined(X3D_CLIP_PLANES)
|
|
@@ -94126,10 +93675,10 @@ out vec4 texCoord0;
|
|
|
94126
93675
|
#if defined(X3D_GEOMETRY_1D)&&defined(X3D_STYLE_PROPERTIES)
|
|
94127
93676
|
flat out float lengthSoFar;flat out vec2 startPoint;out vec2 midPoint;
|
|
94128
93677
|
#endif
|
|
94129
|
-
#pragma X3D include "
|
|
94130
|
-
#pragma X3D include "
|
|
94131
|
-
#pragma X3D include "
|
|
94132
|
-
#pragma X3D include "
|
|
93678
|
+
#pragma X3D include "common/Utils.glsl"
|
|
93679
|
+
#pragma X3D include "common/Skin.glsl"
|
|
93680
|
+
#pragma X3D include "common/Particle.glsl"
|
|
93681
|
+
#pragma X3D include "common/PointSize.glsl"
|
|
94133
93682
|
void main(){
|
|
94134
93683
|
#if defined(X3D_GEOMETRY_1D)&&defined(X3D_STYLE_PROPERTIES)
|
|
94135
93684
|
lengthSoFar=x3d_LineStipple.z;startPoint=x3d_LineStipple.xy;midPoint=x3d_LineStipple.xy;
|
|
@@ -94154,7 +93703,7 @@ x_ite_Namespace .add ("Pointing2.vs", "assets/shaders/webgl2/Pointing2.vs", Poin
|
|
|
94154
93703
|
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/Unlit2.fs.js
|
|
94155
93704
|
const Unlit2_fs_default_ = /* glsl */ `#version 300 es
|
|
94156
93705
|
precision highp float;precision highp int;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;
|
|
94157
|
-
#pragma X3D include "
|
|
93706
|
+
#pragma X3D include "common/Fragment.glsl"
|
|
94158
93707
|
uniform x3d_UnlitMaterialParameters x3d_Material;
|
|
94159
93708
|
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
94160
93709
|
uniform x3d_EmissiveTextureParameters x3d_EmissiveTexture;
|
|
@@ -94168,23 +93717,297 @@ vec4 emissiveParameter=vec4(x3d_Material.emissiveColor,alpha);
|
|
|
94168
93717
|
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
94169
93718
|
vec3 texCoord=getTexCoord(x3d_EmissiveTexture.textureTransformMapping,x3d_EmissiveTexture.textureCoordinateMapping);
|
|
94170
93719
|
#if defined(X3D_EMISSIVE_TEXTURE_2D)
|
|
94171
|
-
|
|
93720
|
+
emissiveParameter*=texture(x3d_EmissiveTexture.texture2D,texCoord.st);
|
|
94172
93721
|
#elif defined(X3D_EMISSIVE_TEXTURE_3D)
|
|
94173
|
-
|
|
93722
|
+
emissiveParameter*=texture(x3d_EmissiveTexture.texture3D,texCoord);
|
|
94174
93723
|
#elif defined(X3D_EMISSIVE_TEXTURE_CUBE)
|
|
94175
|
-
|
|
93724
|
+
emissiveParameter*=texture(x3d_EmissiveTexture.textureCube,texCoord);
|
|
94176
93725
|
#endif
|
|
94177
93726
|
#elif defined(X3D_TEXTURE)
|
|
94178
|
-
|
|
94179
|
-
#else
|
|
94180
|
-
return emissiveParameter;
|
|
93727
|
+
emissiveParameter=getTextureColor(emissiveParameter,vec4(vec3(1.0),alpha));
|
|
94181
93728
|
#endif
|
|
94182
|
-
}vec4 getMaterialColor(){return getEmissiveColor();}void main(){fragment_main();}
|
|
93729
|
+
return emissiveParameter;}vec4 getMaterialColor(){return getEmissiveColor();}void main(){fragment_main();}
|
|
94183
93730
|
`
|
|
94184
93731
|
;
|
|
94185
93732
|
|
|
94186
93733
|
x_ite_Namespace .add ("Unlit2.fs", "assets/shaders/webgl2/Unlit2.fs", Unlit2_fs_default_);
|
|
94187
93734
|
/* harmony default export */ const Unlit2_fs = (Unlit2_fs_default_);
|
|
93735
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/pbr/BDRF1.glsl.js
|
|
93736
|
+
const BDRF1_glsl_default_ = /* glsl */ `const float M_PI=3.14159265359;vec3 F_Schlick(vec3 f0,vec3 f90,float VdotH){return f0+(f90-f0)*pow(clamp(1.0-VdotH,0.0,1.0),5.0);}float V_GGX(float NdotL,float NdotV,float alphaRoughness){float alphaRoughnessSq=alphaRoughness*alphaRoughness;float GGXV=NdotL*sqrt(NdotV*NdotV*(1.0-alphaRoughnessSq)+alphaRoughnessSq);float GGXL=NdotV*sqrt(NdotL*NdotL*(1.0-alphaRoughnessSq)+alphaRoughnessSq);float GGX=GGXV+GGXL;if(GGX>0.0){return 0.5/GGX;}return 0.0;}float D_GGX(float NdotH,float alphaRoughness){float alphaRoughnessSq=alphaRoughness*alphaRoughness;float f=(NdotH*NdotH)*(alphaRoughnessSq-1.0)+1.0;return alphaRoughnessSq/(M_PI*f*f);}vec3 BRDF_lambertian(vec3 f0,vec3 f90,vec3 diffuseColor,float specularWeight,float VdotH){return(1.0-specularWeight*F_Schlick(f0,f90,VdotH))*(diffuseColor/M_PI);}vec3 BRDF_specularGGX(vec3 f0,vec3 f90,float alphaRoughness,float specularWeight,float VdotH,float NdotL,float NdotV,float NdotH){vec3 F=F_Schlick(f0,f90,VdotH);float Vis=V_GGX(NdotL,NdotV,alphaRoughness);float D=D_GGX(NdotH,alphaRoughness);return specularWeight*F*Vis*D;}
|
|
93737
|
+
`
|
|
93738
|
+
;
|
|
93739
|
+
|
|
93740
|
+
x_ite_Namespace .add ("BDRF1.glsl", "assets/shaders/webgl1/pbr/BDRF1.glsl", BDRF1_glsl_default_);
|
|
93741
|
+
/* harmony default export */ const BDRF1_glsl = (BDRF1_glsl_default_);
|
|
93742
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/pbr/Punctual1.glsl.js
|
|
93743
|
+
const Punctual1_glsl_default_ = /* glsl */ `#if defined(X3D_LIGHTING)
|
|
93744
|
+
float getAttenuation(const in vec3 attenuation,const in float distanceToLight){return 1.0/max(dot(attenuation,vec3(1.0,distanceToLight,distanceToLight*distanceToLight)),1.0);}float getRangeAttenuation(const in float range,const in float _distance){if(range<=0.0){return 1.0/pow(_distance,2.0);}return max(min(1.0-pow(_distance/range,4.0),1.0),0.0)/pow(_distance,2.0);}float getSpotAttenuation(const in vec3 pointToLight,const in vec3 spotDirection,const in float outerConeCos,const in float innerConeCos){float actualCos=dot(normalize(spotDirection),normalize(-pointToLight));if(actualCos>outerConeCos){if(actualCos<innerConeCos){return smoothstep(outerConeCos,innerConeCos,actualCos);}return 1.0;}return 0.0;}vec3 getLightIntensity(const in x3d_LightSourceParameters light,const in vec3 pointToLight,const in float distanceToLight){float attenuation=1.0;float rangeAttenuation=1.0;float spotAttenuation=1.0;if(light.type!=x3d_DirectionalLight){attenuation=getAttenuation(light.attenuation,distanceToLight);rangeAttenuation=getRangeAttenuation(light.radius,length(pointToLight));}if(light.type==x3d_SpotLight){spotAttenuation=getSpotAttenuation(pointToLight,light.direction,cos(light.cutOffAngle),cos(light.beamWidth));}return attenuation*rangeAttenuation*spotAttenuation*light.intensity*light.color;}
|
|
93745
|
+
#endif
|
|
93746
|
+
`
|
|
93747
|
+
;
|
|
93748
|
+
|
|
93749
|
+
x_ite_Namespace .add ("Punctual1.glsl", "assets/shaders/webgl1/pbr/Punctual1.glsl", Punctual1_glsl_default_);
|
|
93750
|
+
/* harmony default export */ const Punctual1_glsl = (Punctual1_glsl_default_);
|
|
93751
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/pbr/MaterialInfo1.glsl.js
|
|
93752
|
+
const MaterialInfo1_glsl_default_ = /* glsl */ `struct MaterialInfo{float ior;float perceptualRoughness;vec3 f0;float alphaRoughness;vec3 c_diff;vec3 f90;float metallic;vec3 baseColor;float sheenRoughnessFactor;vec3 sheenColorFactor;vec3 clearcoatF0;vec3 clearcoatF90;float clearcoatFactor;vec3 clearcoatNormal;float clearcoatRoughness;float specularWeight;float transmissionFactor;float thickness;vec3 attenuationColor;float attenuationDistance;float iridescenceFactor;float iridescenceIor;float iridescenceThickness;vec3 anisotropicT;vec3 anisotropicB;float anisotropyStrength;};
|
|
93753
|
+
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
93754
|
+
#if defined(X3D_DIFFUSE_TEXTURE)
|
|
93755
|
+
uniform x3d_DiffuseTextureParameters x3d_DiffuseTexture;
|
|
93756
|
+
#endif
|
|
93757
|
+
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93758
|
+
#if defined(X3D_BASE_TEXTURE)
|
|
93759
|
+
uniform x3d_BaseTextureParameters x3d_BaseTexture;
|
|
93760
|
+
#endif
|
|
93761
|
+
#endif
|
|
93762
|
+
vec4 getBaseColor(){float alpha=1.0-x3d_Material.transparency;
|
|
93763
|
+
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
93764
|
+
vec4 baseColor=vec4(x3d_Material.diffuseColor,alpha);
|
|
93765
|
+
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93766
|
+
vec4 baseColor=vec4(x3d_Material.baseColor,alpha);
|
|
93767
|
+
#endif
|
|
93768
|
+
#if defined(X3D_COLOR_MATERIAL)
|
|
93769
|
+
baseColor*=color;
|
|
93770
|
+
#endif
|
|
93771
|
+
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
93772
|
+
#if defined(X3D_DIFFUSE_TEXTURE)
|
|
93773
|
+
vec3 texCoord=getTexCoord(x3d_Diffuse.textureTransformMapping,x3d_Diffuse.textureCoordinateMapping);
|
|
93774
|
+
#if defined(X3D_DIFFUSE_TEXTURE_2D)
|
|
93775
|
+
baseColor*=sRGBToLinear(texture2D(x3d_Diffuse.texture2D,texCoord.st));
|
|
93776
|
+
#elif defined(X3D_DIFFUSE_TEXTURE_CUBE)
|
|
93777
|
+
baseColor*=sRGBToLinear(textureCube(x3d_Diffuse.textureCube,texCoord));
|
|
93778
|
+
#endif
|
|
93779
|
+
#elif defined(X3D_TEXTURE)
|
|
93780
|
+
baseColor=getTextureColor(baseColor,vec4(vec3(1.0),alpha));
|
|
93781
|
+
#endif
|
|
93782
|
+
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93783
|
+
#if defined(X3D_BASE_TEXTURE)
|
|
93784
|
+
vec3 texCoord=getTexCoord(x3d_BaseTexture.textureTransformMapping,x3d_BaseTexture.textureCoordinateMapping);
|
|
93785
|
+
#if defined(X3D_BASE_TEXTURE_2D)
|
|
93786
|
+
baseColor*=sRGBToLinear(texture2D(x3d_BaseTexture.texture2D,texCoord.st));
|
|
93787
|
+
#elif defined(X3D_BASE_TEXTURE_CUBE)
|
|
93788
|
+
baseColor*=sRGBToLinear(textureCube(x3d_BaseTexture.textureCube,texCoord));
|
|
93789
|
+
#endif
|
|
93790
|
+
#elif defined(X3D_TEXTURE)
|
|
93791
|
+
baseColor=getTextureColor(baseColor,vec4(vec3(1.0),alpha));
|
|
93792
|
+
#endif
|
|
93793
|
+
#endif
|
|
93794
|
+
return baseColor;}
|
|
93795
|
+
#if defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93796
|
+
#if defined(X3D_METALLIC_ROUGHNESS_TEXTURE)
|
|
93797
|
+
uniform x3d_MetallicRoughnessTextureParameters x3d_MetallicRoughnessTexture;
|
|
93798
|
+
#endif
|
|
93799
|
+
MaterialInfo getMetallicRoughnessInfo(MaterialInfo info){info.metallic=x3d_Material.metallic;info.perceptualRoughness=x3d_Material.roughness;
|
|
93800
|
+
#if defined(X3D_METALLIC_ROUGHNESS_TEXTURE)
|
|
93801
|
+
vec3 texCoord=getTexCoord(x3d_MetallicRoughnessTexture.textureTransformMapping,x3d_MetallicRoughnessTexture.textureCoordinateMapping);
|
|
93802
|
+
#if defined(X3D_METALLIC_ROUGHNESS_TEXTURE_2D)
|
|
93803
|
+
vec4 mrSample=texture2D(x3d_MetallicRoughnessTexture.texture2D,texCoord.st);
|
|
93804
|
+
#elif defined(X3D_METALLIC_ROUGHNESS_TEXTURE_CUBE)
|
|
93805
|
+
vec4 mrSample=textureCube(x3d_MetallicRoughnessTexture.textureCube,texCoord);
|
|
93806
|
+
#endif
|
|
93807
|
+
info.metallic*=mrSample.b;info.perceptualRoughness*=mrSample.g;
|
|
93808
|
+
#endif
|
|
93809
|
+
info.c_diff=mix(info.baseColor.rgb,vec3(0.0),info.metallic);info.f0=mix(info.f0,info.baseColor.rgb,info.metallic);return info;}
|
|
93810
|
+
#endif
|
|
93811
|
+
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93812
|
+
uniform x3d_EmissiveTextureParameters x3d_EmissiveTexture;
|
|
93813
|
+
#endif
|
|
93814
|
+
vec3 getEmissiveColor(){vec3 emissiveParameter=x3d_Material.emissiveColor;
|
|
93815
|
+
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93816
|
+
vec3 texCoord=getTexCoord(x3d_EmissiveTexture.textureTransformMapping,x3d_EmissiveTexture.textureCoordinateMapping);
|
|
93817
|
+
#if defined(X3D_EMISSIVE_TEXTURE_2D)
|
|
93818
|
+
emissiveParameter*=sRGBToLinear(texture2D(x3d_EmissiveTexture.texture2D,texCoord.st)).rgb;
|
|
93819
|
+
#elif defined(X3D_EMISSIVE_TEXTURE_CUBE)
|
|
93820
|
+
emissiveParameter*=sRGBToLinear(textureCube(x3d_EmissiveTexture.textureCube,texCoord)).rgb;
|
|
93821
|
+
#endif
|
|
93822
|
+
#endif
|
|
93823
|
+
return emissiveParameter.rgb;}
|
|
93824
|
+
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
93825
|
+
uniform x3d_OcclusionTextureParameters x3d_OcclusionTexture;
|
|
93826
|
+
#endif
|
|
93827
|
+
float getOcclusionFactor(){
|
|
93828
|
+
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
93829
|
+
vec3 texCoord=getTexCoord(x3d_OcclusionTexture.textureTransformMapping,x3d_OcclusionTexture.textureCoordinateMapping);
|
|
93830
|
+
#if defined(X3D_OCCLUSION_TEXTURE_2D)
|
|
93831
|
+
return texture2D(x3d_OcclusionTexture.texture2D,texCoord.st).r;
|
|
93832
|
+
#elif defined(X3D_OCCLUSION_TEXTURE_CUBE)
|
|
93833
|
+
return textureCube(x3d_OcclusionTexture.textureCube,texCoord).r;
|
|
93834
|
+
#endif
|
|
93835
|
+
#else
|
|
93836
|
+
return 1.0;
|
|
93837
|
+
#endif
|
|
93838
|
+
}
|
|
93839
|
+
`
|
|
93840
|
+
;
|
|
93841
|
+
|
|
93842
|
+
x_ite_Namespace .add ("MaterialInfo1.glsl", "assets/shaders/webgl1/pbr/MaterialInfo1.glsl", MaterialInfo1_glsl_default_);
|
|
93843
|
+
/* harmony default export */ const MaterialInfo1_glsl = (MaterialInfo1_glsl_default_);
|
|
93844
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl1/pbr/ToneMapping1.glsl.js
|
|
93845
|
+
const ToneMapping1_glsl_default_ = /* glsl */ `const float exposure=1.0;const float GAMMA=2.2;const float INV_GAMMA=1.0/GAMMA;vec3 linearTosRGB(const in vec3 color){return pow(color,vec3(INV_GAMMA));}vec3 sRGBToLinear(const in vec3 srgbIn){return vec3(pow(srgbIn.xyz,vec3(GAMMA)));}vec4 sRGBToLinear(const in vec4 srgbIn){return vec4(sRGBToLinear(srgbIn.xyz),srgbIn.w);}
|
|
93846
|
+
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
93847
|
+
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);}
|
|
93848
|
+
#endif
|
|
93849
|
+
#if defined(X3D_TONEMAP_ACES_HILL)||defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
93850
|
+
const mat3 ACESInputMat=mat3(0.59719,0.07600,0.02840,0.35458,0.90834,0.13383,0.04823,0.01566,0.83777);const mat3 ACESOutputMat=mat3(1.60475,-0.10208,-0.00327,-0.53108,1.10813,-0.07276,-0.07367,-0.00605,1.07602);vec3 RRTAndODTFit(const in vec3 color){vec3 a=color*(color+0.0245786)-0.000090537;vec3 b=color*(0.983729*color+0.4329510)+0.238081;return a/b;}vec3 toneMapACES_Hill(in vec3 color){color=ACESInputMat*color;color=RRTAndODTFit(color);color=ACESOutputMat*color;color=clamp(color,0.0,1.0);return color;}
|
|
93851
|
+
#endif
|
|
93852
|
+
vec3 toneMap(in vec3 color){color*=exposure;
|
|
93853
|
+
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
93854
|
+
color=toneMapACES_Narkowicz(color);
|
|
93855
|
+
#endif
|
|
93856
|
+
#if defined(X3D_TONEMAP_ACES_HILL)
|
|
93857
|
+
color=toneMapACES_Hill(color);
|
|
93858
|
+
#endif
|
|
93859
|
+
#if defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
93860
|
+
color/=0.6;color=toneMapACES_Hill(color);
|
|
93861
|
+
#endif
|
|
93862
|
+
return linearTosRGB(color);}
|
|
93863
|
+
`
|
|
93864
|
+
;
|
|
93865
|
+
|
|
93866
|
+
x_ite_Namespace .add ("ToneMapping1.glsl", "assets/shaders/webgl1/pbr/ToneMapping1.glsl", ToneMapping1_glsl_default_);
|
|
93867
|
+
/* harmony default export */ const ToneMapping1_glsl = (ToneMapping1_glsl_default_);
|
|
93868
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/BDRF2.glsl.js
|
|
93869
|
+
const BDRF2_glsl_default_ = /* glsl */ `const float M_PI=3.14159265359;vec3 F_Schlick(vec3 f0,vec3 f90,float VdotH){return f0+(f90-f0)*pow(clamp(1.0-VdotH,0.0,1.0),5.0);}float V_GGX(float NdotL,float NdotV,float alphaRoughness){float alphaRoughnessSq=alphaRoughness*alphaRoughness;float GGXV=NdotL*sqrt(NdotV*NdotV*(1.0-alphaRoughnessSq)+alphaRoughnessSq);float GGXL=NdotV*sqrt(NdotL*NdotL*(1.0-alphaRoughnessSq)+alphaRoughnessSq);float GGX=GGXV+GGXL;if(GGX>0.0){return 0.5/GGX;}return 0.0;}float D_GGX(float NdotH,float alphaRoughness){float alphaRoughnessSq=alphaRoughness*alphaRoughness;float f=(NdotH*NdotH)*(alphaRoughnessSq-1.0)+1.0;return alphaRoughnessSq/(M_PI*f*f);}vec3 BRDF_lambertian(vec3 f0,vec3 f90,vec3 diffuseColor,float specularWeight,float VdotH){return(1.0-specularWeight*F_Schlick(f0,f90,VdotH))*(diffuseColor/M_PI);}vec3 BRDF_specularGGX(vec3 f0,vec3 f90,float alphaRoughness,float specularWeight,float VdotH,float NdotL,float NdotV,float NdotH){vec3 F=F_Schlick(f0,f90,VdotH);float Vis=V_GGX(NdotL,NdotV,alphaRoughness);float D=D_GGX(NdotH,alphaRoughness);return specularWeight*F*Vis*D;}
|
|
93870
|
+
`
|
|
93871
|
+
;
|
|
93872
|
+
|
|
93873
|
+
x_ite_Namespace .add ("BDRF2.glsl", "assets/shaders/webgl2/pbr/BDRF2.glsl", BDRF2_glsl_default_);
|
|
93874
|
+
/* harmony default export */ const BDRF2_glsl = (BDRF2_glsl_default_);
|
|
93875
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/Punctual2.glsl.js
|
|
93876
|
+
const Punctual2_glsl_default_ = /* glsl */ `#if defined(X3D_LIGHTING)
|
|
93877
|
+
float getAttenuation(const in vec3 attenuation,const in float distanceToLight){return 1.0/max(dot(attenuation,vec3(1.0,distanceToLight,distanceToLight*distanceToLight)),1.0);}float getRangeAttenuation(const in float range,const in float _distance){if(range<=0.0){return 1.0/pow(_distance,2.0);}return max(min(1.0-pow(_distance/range,4.0),1.0),0.0)/pow(_distance,2.0);}float getSpotAttenuation(const in vec3 pointToLight,const in vec3 spotDirection,const in float outerConeCos,const in float innerConeCos){float actualCos=dot(normalize(spotDirection),normalize(-pointToLight));if(actualCos>outerConeCos){if(actualCos<innerConeCos){return smoothstep(outerConeCos,innerConeCos,actualCos);}return 1.0;}return 0.0;}vec3 getLightIntensity(const in x3d_LightSourceParameters light,const in vec3 pointToLight,const in float distanceToLight){float attenuation=1.0;float rangeAttenuation=1.0;float spotAttenuation=1.0;if(light.type!=x3d_DirectionalLight){attenuation=getAttenuation(light.attenuation,distanceToLight);rangeAttenuation=getRangeAttenuation(light.radius,length(pointToLight));}if(light.type==x3d_SpotLight){spotAttenuation=getSpotAttenuation(pointToLight,light.direction,cos(light.cutOffAngle),cos(light.beamWidth));}return attenuation*rangeAttenuation*spotAttenuation*light.intensity*light.color;}
|
|
93878
|
+
#endif
|
|
93879
|
+
`
|
|
93880
|
+
;
|
|
93881
|
+
|
|
93882
|
+
x_ite_Namespace .add ("Punctual2.glsl", "assets/shaders/webgl2/pbr/Punctual2.glsl", Punctual2_glsl_default_);
|
|
93883
|
+
/* harmony default export */ const Punctual2_glsl = (Punctual2_glsl_default_);
|
|
93884
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/MaterialInfo2.glsl.js
|
|
93885
|
+
const MaterialInfo2_glsl_default_ = /* glsl */ `struct MaterialInfo{float ior;float perceptualRoughness;vec3 f0;float alphaRoughness;vec3 c_diff;vec3 f90;float metallic;vec3 baseColor;float sheenRoughnessFactor;vec3 sheenColorFactor;vec3 clearcoatF0;vec3 clearcoatF90;float clearcoatFactor;vec3 clearcoatNormal;float clearcoatRoughness;float specularWeight;float transmissionFactor;float thickness;vec3 attenuationColor;float attenuationDistance;float iridescenceFactor;float iridescenceIor;float iridescenceThickness;vec3 anisotropicT;vec3 anisotropicB;float anisotropyStrength;};
|
|
93886
|
+
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
93887
|
+
#if defined(X3D_DIFFUSE_TEXTURE)
|
|
93888
|
+
uniform x3d_DiffuseTextureParameters x3d_DiffuseTexture;
|
|
93889
|
+
#endif
|
|
93890
|
+
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93891
|
+
#if defined(X3D_BASE_TEXTURE)
|
|
93892
|
+
uniform x3d_BaseTextureParameters x3d_BaseTexture;
|
|
93893
|
+
#endif
|
|
93894
|
+
#endif
|
|
93895
|
+
vec4 getBaseColor(){float alpha=1.0-x3d_Material.transparency;
|
|
93896
|
+
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
93897
|
+
vec4 baseColor=vec4(x3d_Material.diffuseColor,alpha);
|
|
93898
|
+
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93899
|
+
vec4 baseColor=vec4(x3d_Material.baseColor,alpha);
|
|
93900
|
+
#endif
|
|
93901
|
+
#if defined(X3D_COLOR_MATERIAL)
|
|
93902
|
+
baseColor*=color;
|
|
93903
|
+
#endif
|
|
93904
|
+
#if defined(X3D_MATERIAL_SPECULAR_GLOSSINESS)
|
|
93905
|
+
#if defined(X3D_DIFFUSE_TEXTURE)
|
|
93906
|
+
vec3 texCoord=getTexCoord(x3d_Diffuse.textureTransformMapping,x3d_Diffuse.textureCoordinateMapping);
|
|
93907
|
+
#if defined(X3D_DIFFUSE_TEXTURE_2D)
|
|
93908
|
+
baseColor*=sRGBToLinear(texture(x3d_Diffuse.texture2D,texCoord.st));
|
|
93909
|
+
#elif defined(X3D_DIFFUSE_TEXTURE_3D)
|
|
93910
|
+
baseColor*=sRGBToLinear(texture(x3d_Diffuse.texture3D,texCoord));
|
|
93911
|
+
#elif defined(X3D_DIFFUSE_TEXTURE_CUBE)
|
|
93912
|
+
baseColor*=sRGBToLinear(texture(x3d_Diffuse.textureCube,texCoord));
|
|
93913
|
+
#endif
|
|
93914
|
+
#elif defined(X3D_TEXTURE)
|
|
93915
|
+
baseColor=getTextureColor(baseColor,vec4(vec3(1.0),alpha));
|
|
93916
|
+
#endif
|
|
93917
|
+
#elif defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93918
|
+
#if defined(X3D_BASE_TEXTURE)
|
|
93919
|
+
vec3 texCoord=getTexCoord(x3d_BaseTexture.textureTransformMapping,x3d_BaseTexture.textureCoordinateMapping);
|
|
93920
|
+
#if defined(X3D_BASE_TEXTURE_2D)
|
|
93921
|
+
baseColor*=sRGBToLinear(texture(x3d_BaseTexture.texture2D,texCoord.st));
|
|
93922
|
+
#elif defined(X3D_BASE_TEXTURE_3D)
|
|
93923
|
+
baseColor*=sRGBToLinear(texture(x3d_BaseTexture.texture3D,texCoord));
|
|
93924
|
+
#elif defined(X3D_BASE_TEXTURE_CUBE)
|
|
93925
|
+
baseColor*=sRGBToLinear(texture(x3d_BaseTexture.textureCube,texCoord));
|
|
93926
|
+
#endif
|
|
93927
|
+
#elif defined(X3D_TEXTURE)
|
|
93928
|
+
baseColor=getTextureColor(baseColor,vec4(vec3(1.0),alpha));
|
|
93929
|
+
#endif
|
|
93930
|
+
#endif
|
|
93931
|
+
return baseColor;}
|
|
93932
|
+
#if defined(X3D_MATERIAL_METALLIC_ROUGHNESS)
|
|
93933
|
+
#if defined(X3D_METALLIC_ROUGHNESS_TEXTURE)
|
|
93934
|
+
uniform x3d_MetallicRoughnessTextureParameters x3d_MetallicRoughnessTexture;
|
|
93935
|
+
#endif
|
|
93936
|
+
MaterialInfo getMetallicRoughnessInfo(MaterialInfo info){info.metallic=x3d_Material.metallic;info.perceptualRoughness=x3d_Material.roughness;
|
|
93937
|
+
#if defined(X3D_METALLIC_ROUGHNESS_TEXTURE)
|
|
93938
|
+
vec3 texCoord=getTexCoord(x3d_MetallicRoughnessTexture.textureTransformMapping,x3d_MetallicRoughnessTexture.textureCoordinateMapping);
|
|
93939
|
+
#if defined(X3D_METALLIC_ROUGHNESS_TEXTURE_2D)
|
|
93940
|
+
vec4 mrSample=texture(x3d_MetallicRoughnessTexture.texture2D,texCoord.st);
|
|
93941
|
+
#elif defined(X3D_METALLIC_ROUGHNESS_TEXTURE_3D)
|
|
93942
|
+
vec4 mrSample=texture(x3d_MetallicRoughnessTexture.texture3D,texCoord);
|
|
93943
|
+
#elif defined(X3D_METALLIC_ROUGHNESS_TEXTURE_CUBE)
|
|
93944
|
+
vec4 mrSample=texture(x3d_MetallicRoughnessTexture.textureCube,texCoord);
|
|
93945
|
+
#endif
|
|
93946
|
+
info.metallic*=mrSample.b;info.perceptualRoughness*=mrSample.g;
|
|
93947
|
+
#endif
|
|
93948
|
+
info.c_diff=mix(info.baseColor.rgb,vec3(0.0),info.metallic);info.f0=mix(info.f0,info.baseColor.rgb,info.metallic);return info;}
|
|
93949
|
+
#endif
|
|
93950
|
+
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93951
|
+
uniform x3d_EmissiveTextureParameters x3d_EmissiveTexture;
|
|
93952
|
+
#endif
|
|
93953
|
+
vec3 getEmissiveColor(){vec3 emissiveParameter=x3d_Material.emissiveColor;
|
|
93954
|
+
#if defined(X3D_EMISSIVE_TEXTURE)
|
|
93955
|
+
vec3 texCoord=getTexCoord(x3d_EmissiveTexture.textureTransformMapping,x3d_EmissiveTexture.textureCoordinateMapping);
|
|
93956
|
+
#if defined(X3D_EMISSIVE_TEXTURE_2D)
|
|
93957
|
+
emissiveParameter*=sRGBToLinear(texture(x3d_EmissiveTexture.texture2D,texCoord.st)).rgb;
|
|
93958
|
+
#elif defined(X3D_EMISSIVE_TEXTURE_3D)
|
|
93959
|
+
emissiveParameter*=sRGBToLinear(texture(x3d_EmissiveTexture.texture3D,texCoord)).rgb;
|
|
93960
|
+
#elif defined(X3D_EMISSIVE_TEXTURE_CUBE)
|
|
93961
|
+
emissiveParameter*=sRGBToLinear(texture(x3d_EmissiveTexture.textureCube,texCoord)).rgb;
|
|
93962
|
+
#endif
|
|
93963
|
+
#endif
|
|
93964
|
+
return emissiveParameter.rgb;}
|
|
93965
|
+
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
93966
|
+
uniform x3d_OcclusionTextureParameters x3d_OcclusionTexture;
|
|
93967
|
+
#endif
|
|
93968
|
+
float getOcclusionFactor(){
|
|
93969
|
+
#if defined(X3D_OCCLUSION_TEXTURE)
|
|
93970
|
+
vec3 texCoord=getTexCoord(x3d_OcclusionTexture.textureTransformMapping,x3d_OcclusionTexture.textureCoordinateMapping);
|
|
93971
|
+
#if defined(X3D_OCCLUSION_TEXTURE_2D)
|
|
93972
|
+
return texture(x3d_OcclusionTexture.texture2D,texCoord.st).r;
|
|
93973
|
+
#elif defined(X3D_OCCLUSION_TEXTURE_3D)
|
|
93974
|
+
return texture(x3d_OcclusionTexture.texture3D,texCoord).r;
|
|
93975
|
+
#elif defined(X3D_OCCLUSION_TEXTURE_CUBE)
|
|
93976
|
+
return texture(x3d_OcclusionTexture.textureCube,texCoord).r;
|
|
93977
|
+
#endif
|
|
93978
|
+
#else
|
|
93979
|
+
return 1.0;
|
|
93980
|
+
#endif
|
|
93981
|
+
}
|
|
93982
|
+
`
|
|
93983
|
+
;
|
|
93984
|
+
|
|
93985
|
+
x_ite_Namespace .add ("MaterialInfo2.glsl", "assets/shaders/webgl2/pbr/MaterialInfo2.glsl", MaterialInfo2_glsl_default_);
|
|
93986
|
+
/* harmony default export */ const MaterialInfo2_glsl = (MaterialInfo2_glsl_default_);
|
|
93987
|
+
;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/pbr/ToneMapping2.glsl.js
|
|
93988
|
+
const ToneMapping2_glsl_default_ = /* glsl */ `const float exposure=1.0;const float GAMMA=2.2;const float INV_GAMMA=1.0/GAMMA;vec3 linearTosRGB(const in vec3 color){return pow(color,vec3(INV_GAMMA));}vec3 sRGBToLinear(const in vec3 srgbIn){return vec3(pow(srgbIn.xyz,vec3(GAMMA)));}vec4 sRGBToLinear(const in vec4 srgbIn){return vec4(sRGBToLinear(srgbIn.xyz),srgbIn.w);}
|
|
93989
|
+
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
93990
|
+
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);}
|
|
93991
|
+
#endif
|
|
93992
|
+
#if defined(X3D_TONEMAP_ACES_HILL)||defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
93993
|
+
const mat3 ACESInputMat=mat3(0.59719,0.07600,0.02840,0.35458,0.90834,0.13383,0.04823,0.01566,0.83777);const mat3 ACESOutputMat=mat3(1.60475,-0.10208,-0.00327,-0.53108,1.10813,-0.07276,-0.07367,-0.00605,1.07602);vec3 RRTAndODTFit(const in vec3 color){vec3 a=color*(color+0.0245786)-0.000090537;vec3 b=color*(0.983729*color+0.4329510)+0.238081;return a/b;}vec3 toneMapACES_Hill(in vec3 color){color=ACESInputMat*color;color=RRTAndODTFit(color);color=ACESOutputMat*color;color=clamp(color,0.0,1.0);return color;}
|
|
93994
|
+
#endif
|
|
93995
|
+
vec3 toneMap(in vec3 color){color*=exposure;
|
|
93996
|
+
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
93997
|
+
color=toneMapACES_Narkowicz(color);
|
|
93998
|
+
#endif
|
|
93999
|
+
#if defined(X3D_TONEMAP_ACES_HILL)
|
|
94000
|
+
color=toneMapACES_Hill(color);
|
|
94001
|
+
#endif
|
|
94002
|
+
#if defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
94003
|
+
color/=0.6;color=toneMapACES_Hill(color);
|
|
94004
|
+
#endif
|
|
94005
|
+
return linearTosRGB(color);}
|
|
94006
|
+
`
|
|
94007
|
+
;
|
|
94008
|
+
|
|
94009
|
+
x_ite_Namespace .add ("ToneMapping2.glsl", "assets/shaders/webgl2/pbr/ToneMapping2.glsl", ToneMapping2_glsl_default_);
|
|
94010
|
+
/* harmony default export */ const ToneMapping2_glsl = (ToneMapping2_glsl_default_);
|
|
94188
94011
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Shaders/ShaderRegistry.js
|
|
94189
94012
|
/*******************************************************************************
|
|
94190
94013
|
*
|
|
@@ -94269,7 +94092,6 @@ x_ite_Namespace .add ("Unlit2.fs", "assets/shaders/webgl2/Unlit2.fs", Unlit2_fs_
|
|
|
94269
94092
|
|
|
94270
94093
|
|
|
94271
94094
|
|
|
94272
|
-
|
|
94273
94095
|
/* WebGL 1 */
|
|
94274
94096
|
|
|
94275
94097
|
|
|
@@ -94298,6 +94120,18 @@ x_ite_Namespace .add ("Unlit2.fs", "assets/shaders/webgl2/Unlit2.fs", Unlit2_fs_
|
|
|
94298
94120
|
|
|
94299
94121
|
|
|
94300
94122
|
|
|
94123
|
+
/* PBR 1 */
|
|
94124
|
+
|
|
94125
|
+
|
|
94126
|
+
|
|
94127
|
+
|
|
94128
|
+
|
|
94129
|
+
/* PBR 2 */
|
|
94130
|
+
|
|
94131
|
+
|
|
94132
|
+
|
|
94133
|
+
|
|
94134
|
+
|
|
94301
94135
|
const ShaderRegistry = {
|
|
94302
94136
|
includes: {
|
|
94303
94137
|
1: {
|
|
@@ -94315,10 +94149,14 @@ const ShaderRegistry = {
|
|
|
94315
94149
|
SpotFactor: SpotFactor1_glsl,
|
|
94316
94150
|
Texture: Texture1_glsl,
|
|
94317
94151
|
Vertex: Vertex1_glsl,
|
|
94152
|
+
// PBR
|
|
94153
|
+
BDRF: BDRF1_glsl,
|
|
94154
|
+
MaterialInfo: MaterialInfo1_glsl,
|
|
94155
|
+
Punctual: Punctual1_glsl,
|
|
94156
|
+
ToneMapping: ToneMapping1_glsl,
|
|
94318
94157
|
},
|
|
94319
94158
|
2: {
|
|
94320
94159
|
ClipPlanes: ClipPlanes2_glsl,
|
|
94321
|
-
Colors: Colors2_glsl,
|
|
94322
94160
|
Fog: Fog2_glsl,
|
|
94323
94161
|
Fragment: Fragment2_glsl,
|
|
94324
94162
|
Hatch: Hatch2_glsl,
|
|
@@ -94336,6 +94174,11 @@ const ShaderRegistry = {
|
|
|
94336
94174
|
Texture: Texture2_glsl,
|
|
94337
94175
|
Utils: Utils2_glsl,
|
|
94338
94176
|
Vertex: Vertex2_glsl,
|
|
94177
|
+
// PBR
|
|
94178
|
+
BDRF: BDRF2_glsl,
|
|
94179
|
+
MaterialInfo: MaterialInfo2_glsl,
|
|
94180
|
+
Punctual: Punctual2_glsl,
|
|
94181
|
+
ToneMapping: ToneMapping2_glsl,
|
|
94339
94182
|
},
|
|
94340
94183
|
},
|
|
94341
94184
|
vertex: {
|
|
@@ -94484,7 +94327,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
94484
94327
|
x_ite_Namespace .add ("ShaderCompiler", "x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
|
|
94485
94328
|
/* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
|
|
94486
94329
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
94487
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
94330
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(659);
|
|
94488
94331
|
/*******************************************************************************
|
|
94489
94332
|
*
|
|
94490
94333
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -95141,7 +94984,7 @@ const X3DAppearanceNode_default_ = X3DAppearanceNode;
|
|
|
95141
94984
|
x_ite_Namespace .add ("X3DAppearanceNode", "x_ite/Components/Shape/X3DAppearanceNode", X3DAppearanceNode_default_);
|
|
95142
94985
|
/* harmony default export */ const Shape_X3DAppearanceNode = (X3DAppearanceNode_default_);
|
|
95143
94986
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/Appearance.js
|
|
95144
|
-
/* provided dependency */ var Appearance_$ = __webpack_require__(
|
|
94987
|
+
/* provided dependency */ var Appearance_$ = __webpack_require__(659);
|
|
95145
94988
|
/*******************************************************************************
|
|
95146
94989
|
*
|
|
95147
94990
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -97146,7 +96989,7 @@ Object .assign (Object .setPrototypeOf (PhysicalMaterial .prototype, Shape_X3DOn
|
|
|
97146
96989
|
|
|
97147
96990
|
if (geometryContext .hasNormals)
|
|
97148
96991
|
{
|
|
97149
|
-
options .push ("X3D_PHYSICAL_MATERIAL", "
|
|
96992
|
+
options .push ("X3D_PHYSICAL_MATERIAL", "X3D_MATERIAL_METALLIC_ROUGHNESS");
|
|
97150
96993
|
|
|
97151
96994
|
if (+this .getTextureBits ())
|
|
97152
96995
|
{
|
|
@@ -98422,7 +98265,7 @@ const Components_Shape_default_ = {
|
|
|
98422
98265
|
x_ite_Namespace .add ("Shape", "x_ite/Components/Shape", Components_Shape_default_);
|
|
98423
98266
|
/* harmony default export */ const Components_Shape = (Components_Shape_default_);
|
|
98424
98267
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Sound/X3DSoundProcessingNode.js
|
|
98425
|
-
/* provided dependency */ var X3DSoundProcessingNode_$ = __webpack_require__(
|
|
98268
|
+
/* provided dependency */ var X3DSoundProcessingNode_$ = __webpack_require__(659);
|
|
98426
98269
|
/*******************************************************************************
|
|
98427
98270
|
*
|
|
98428
98271
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -99062,7 +98905,7 @@ const X3DSoundSourceNode_default_ = X3DSoundSourceNode;
|
|
|
99062
98905
|
x_ite_Namespace .add ("X3DSoundSourceNode", "x_ite/Components/Sound/X3DSoundSourceNode", X3DSoundSourceNode_default_);
|
|
99063
98906
|
/* harmony default export */ const Sound_X3DSoundSourceNode = (X3DSoundSourceNode_default_);
|
|
99064
98907
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Sound/AudioClip.js
|
|
99065
|
-
/* provided dependency */ var AudioClip_$ = __webpack_require__(
|
|
98908
|
+
/* provided dependency */ var AudioClip_$ = __webpack_require__(659);
|
|
99066
98909
|
/*******************************************************************************
|
|
99067
98910
|
*
|
|
99068
98911
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -99364,7 +99207,7 @@ const X3DSoundNode_default_ = X3DSoundNode;
|
|
|
99364
99207
|
x_ite_Namespace .add ("X3DSoundNode", "x_ite/Components/Sound/X3DSoundNode", X3DSoundNode_default_);
|
|
99365
99208
|
/* harmony default export */ const Sound_X3DSoundNode = (X3DSoundNode_default_);
|
|
99366
99209
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Sound/X3DSoundDestinationNode.js
|
|
99367
|
-
/* provided dependency */ var X3DSoundDestinationNode_$ = __webpack_require__(
|
|
99210
|
+
/* provided dependency */ var X3DSoundDestinationNode_$ = __webpack_require__(659);
|
|
99368
99211
|
/*******************************************************************************
|
|
99369
99212
|
*
|
|
99370
99213
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -101014,7 +100857,7 @@ const ListenerPointSource_default_ = ListenerPointSource;
|
|
|
101014
100857
|
x_ite_Namespace .add ("ListenerPointSource", "x_ite/Components/Sound/ListenerPointSource", ListenerPointSource_default_);
|
|
101015
100858
|
/* harmony default export */ const Sound_ListenerPointSource = (ListenerPointSource_default_);
|
|
101016
100859
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Sound/MicrophoneSource.js
|
|
101017
|
-
/* provided dependency */ var MicrophoneSource_$ = __webpack_require__(
|
|
100860
|
+
/* provided dependency */ var MicrophoneSource_$ = __webpack_require__(659);
|
|
101018
100861
|
/*******************************************************************************
|
|
101019
100862
|
*
|
|
101020
100863
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -102552,7 +102395,7 @@ const Components_Sound_default_ = {
|
|
|
102552
102395
|
|
|
102553
102396
|
x_ite_Namespace .add ("Sound", "x_ite/Components/Sound", Components_Sound_default_);
|
|
102554
102397
|
/* harmony default export */ const Components_Sound = (Components_Sound_default_);
|
|
102555
|
-
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/
|
|
102398
|
+
;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/GifMedia.js
|
|
102556
102399
|
/*******************************************************************************
|
|
102557
102400
|
*
|
|
102558
102401
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -102677,14 +102520,14 @@ function GifMedia (gif, movieTexture)
|
|
|
102677
102520
|
});
|
|
102678
102521
|
}
|
|
102679
102522
|
|
|
102680
|
-
const
|
|
102523
|
+
const GifMedia_default_ = GifMedia;
|
|
102681
102524
|
;
|
|
102682
102525
|
|
|
102683
|
-
x_ite_Namespace .add ("
|
|
102684
|
-
/* harmony default export */ const
|
|
102526
|
+
x_ite_Namespace .add ("GifMedia", "x_ite/Browser/Texturing/GifMedia", GifMedia_default_);
|
|
102527
|
+
/* harmony default export */ const Texturing_GifMedia = (GifMedia_default_);
|
|
102685
102528
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
102686
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
102687
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
102529
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(659);
|
|
102530
|
+
/* provided dependency */ var SuperGif = __webpack_require__(357);
|
|
102688
102531
|
/*******************************************************************************
|
|
102689
102532
|
*
|
|
102690
102533
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -102888,7 +102731,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
|
|
|
102888
102731
|
{
|
|
102889
102732
|
this .gif = gif;
|
|
102890
102733
|
|
|
102891
|
-
|
|
102734
|
+
Texturing_GifMedia (gif, this);
|
|
102892
102735
|
|
|
102893
102736
|
gif .pause ();
|
|
102894
102737
|
|
|
@@ -102918,10 +102761,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
|
|
|
102918
102761
|
if (this .checkLoadState () !== Base_X3DConstants .COMPLETE_STATE)
|
|
102919
102762
|
return;
|
|
102920
102763
|
|
|
102921
|
-
|
|
102922
|
-
this .updateTexture (this .gif .currentFrame .data, true);
|
|
102923
|
-
else
|
|
102924
|
-
this .updateTexture (this .video [0], true);
|
|
102764
|
+
this .updateTexture (this .gif ?.currentFrame .data ?? this .video [0], true);
|
|
102925
102765
|
},
|
|
102926
102766
|
traverse: Texturing_X3DTexture2DNode .prototype .traverse,
|
|
102927
102767
|
dispose ()
|
|
@@ -103855,7 +103695,7 @@ const MultiTextureTransform_default_ = MultiTextureTransform;
|
|
|
103855
103695
|
x_ite_Namespace .add ("MultiTextureTransform", "x_ite/Components/Texturing/MultiTextureTransform", MultiTextureTransform_default_);
|
|
103856
103696
|
/* harmony default export */ const Texturing_MultiTextureTransform = (MultiTextureTransform_default_);
|
|
103857
103697
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/PixelTexture.js
|
|
103858
|
-
/* provided dependency */ var PixelTexture_$ = __webpack_require__(
|
|
103698
|
+
/* provided dependency */ var PixelTexture_$ = __webpack_require__(659);
|
|
103859
103699
|
/*******************************************************************************
|
|
103860
103700
|
*
|
|
103861
103701
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -106009,7 +105849,7 @@ const gettext_default_ = gettext;
|
|
|
106009
105849
|
x_ite_Namespace .add ("gettext", "locale/gettext", gettext_default_);
|
|
106010
105850
|
/* harmony default export */ const locale_gettext = (gettext_default_);
|
|
106011
105851
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
|
|
106012
|
-
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(
|
|
105852
|
+
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(659);
|
|
106013
105853
|
/*******************************************************************************
|
|
106014
105854
|
*
|
|
106015
105855
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -106439,7 +106279,7 @@ const TextureQuality_default_ = TextureQuality;
|
|
|
106439
106279
|
x_ite_Namespace .add ("TextureQuality", "x_ite/Browser/Core/TextureQuality", TextureQuality_default_);
|
|
106440
106280
|
/* harmony default export */ const Core_TextureQuality = (TextureQuality_default_);
|
|
106441
106281
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserOptions.js
|
|
106442
|
-
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(
|
|
106282
|
+
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(659);
|
|
106443
106283
|
/*******************************************************************************
|
|
106444
106284
|
*
|
|
106445
106285
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -107032,7 +106872,7 @@ const RenderingProperties_default_ = RenderingProperties;
|
|
|
107032
106872
|
x_ite_Namespace .add ("RenderingProperties", "x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
|
|
107033
106873
|
/* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
|
|
107034
106874
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
|
|
107035
|
-
/* provided dependency */ var Notification_$ = __webpack_require__(
|
|
106875
|
+
/* provided dependency */ var Notification_$ = __webpack_require__(659);
|
|
107036
106876
|
/*******************************************************************************
|
|
107037
106877
|
*
|
|
107038
106878
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -107155,8 +106995,8 @@ const Notification_default_ = Notification;
|
|
|
107155
106995
|
x_ite_Namespace .add ("Notification", "x_ite/Browser/Core/Notification", Notification_default_);
|
|
107156
106996
|
/* harmony default export */ const Core_Notification = (Notification_default_);
|
|
107157
106997
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
|
|
107158
|
-
/* provided dependency */ var jquery_fullscreen = __webpack_require__(
|
|
107159
|
-
/* provided dependency */ var ContextMenu_$ = __webpack_require__(
|
|
106998
|
+
/* provided dependency */ var jquery_fullscreen = __webpack_require__(196);
|
|
106999
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(659);
|
|
107160
107000
|
/*******************************************************************************
|
|
107161
107001
|
*
|
|
107162
107002
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -109908,7 +109748,7 @@ const DataStorage_default_ = DataStorage;
|
|
|
109908
109748
|
x_ite_Namespace .add ("DataStorage", "standard/Utility/DataStorage", DataStorage_default_);
|
|
109909
109749
|
/* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
|
|
109910
109750
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
109911
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
109751
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(659);
|
|
109912
109752
|
/*******************************************************************************
|
|
109913
109753
|
*
|
|
109914
109754
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -111954,8 +111794,8 @@ const X3DViewer_default_ = X3DViewer;
|
|
|
111954
111794
|
x_ite_Namespace .add ("X3DViewer", "x_ite/Browser/Navigation/X3DViewer", X3DViewer_default_);
|
|
111955
111795
|
/* harmony default export */ const Navigation_X3DViewer = (X3DViewer_default_);
|
|
111956
111796
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
111957
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
111958
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
111797
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(946);
|
|
111798
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(659);
|
|
111959
111799
|
/*******************************************************************************
|
|
111960
111800
|
*
|
|
111961
111801
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -112827,8 +112667,8 @@ const ExamineViewer_default_ = ExamineViewer;
|
|
|
112827
112667
|
x_ite_Namespace .add ("ExamineViewer", "x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
|
|
112828
112668
|
/* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
|
|
112829
112669
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
112830
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
112831
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
112670
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(946);
|
|
112671
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(659);
|
|
112832
112672
|
/*******************************************************************************
|
|
112833
112673
|
*
|
|
112834
112674
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -113539,7 +113379,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, Navigation_X3DV
|
|
|
113539
113379
|
|
|
113540
113380
|
gl .uniformMatrix4fv (shaderNode .x3d_ProjectionMatrix, false, projectionMatrixArray);
|
|
113541
113381
|
gl .uniformMatrix4fv (shaderNode .x3d_ModelViewMatrix, false, modelViewMatrixArray);
|
|
113542
|
-
gl .uniform3f (shaderNode .x3d_EmissiveColor,
|
|
113382
|
+
gl .uniform3f (shaderNode .x3d_EmissiveColor, 1, 1, 1);
|
|
113543
113383
|
gl .uniform1f (shaderNode .x3d_Transparency, 0);
|
|
113544
113384
|
|
|
113545
113385
|
if (this .lineVertexArrayObject .enable (shaderNode))
|
|
@@ -113832,8 +113672,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
113832
113672
|
x_ite_Namespace .add ("FlyViewer", "x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
|
|
113833
113673
|
/* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
|
|
113834
113674
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
113835
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
113836
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
113675
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(946);
|
|
113676
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(659);
|
|
113837
113677
|
/*******************************************************************************
|
|
113838
113678
|
*
|
|
113839
113679
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -114164,8 +114004,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
114164
114004
|
x_ite_Namespace .add ("NoneViewer", "x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
|
|
114165
114005
|
/* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
|
|
114166
114006
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
114167
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
114168
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
114007
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(946);
|
|
114008
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(659);
|
|
114169
114009
|
/*******************************************************************************
|
|
114170
114010
|
*
|
|
114171
114011
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -115304,8 +115144,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
115304
115144
|
x_ite_Namespace .add ("X3DPickingContext", "x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
|
|
115305
115145
|
/* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
|
|
115306
115146
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
115307
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
115308
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
115147
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(946);
|
|
115148
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(659);
|
|
115309
115149
|
/*******************************************************************************
|
|
115310
115150
|
*
|
|
115311
115151
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -116493,6 +116333,12 @@ Object .assign (MultiSampleFrameBuffer .prototype,
|
|
|
116493
116333
|
0, 0, width, height,
|
|
116494
116334
|
gl .COLOR_BUFFER_BIT, samples && !oit ? gl .LINEAR : gl .NEAREST);
|
|
116495
116335
|
},
|
|
116336
|
+
unbind ()
|
|
116337
|
+
{
|
|
116338
|
+
const { context: gl, lastBuffer } = this;
|
|
116339
|
+
|
|
116340
|
+
gl .bindFramebuffer (gl .FRAMEBUFFER, lastBuffer .pop ());
|
|
116341
|
+
},
|
|
116496
116342
|
bindForOrderIndependentTransparency ()
|
|
116497
116343
|
{
|
|
116498
116344
|
const { context: gl, lastBuffer, oitFrameBuffer } = this;
|
|
@@ -116505,12 +116351,6 @@ Object .assign (MultiSampleFrameBuffer .prototype,
|
|
|
116505
116351
|
gl .clear (gl .COLOR_BUFFER_BIT);
|
|
116506
116352
|
gl .blendFuncSeparate (gl .ONE, gl .ONE, gl .ZERO, gl .ONE_MINUS_SRC_ALPHA);
|
|
116507
116353
|
},
|
|
116508
|
-
unbind ()
|
|
116509
|
-
{
|
|
116510
|
-
const { context: gl, lastBuffer } = this;
|
|
116511
|
-
|
|
116512
|
-
gl .bindFramebuffer (gl .FRAMEBUFFER, lastBuffer .pop ());
|
|
116513
|
-
},
|
|
116514
116354
|
compose ()
|
|
116515
116355
|
{
|
|
116516
116356
|
const { context: gl, width, height, samples, program } = this;
|
|
@@ -116598,8 +116438,7 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
|
|
|
116598
116438
|
x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
|
|
116599
116439
|
/* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
|
|
116600
116440
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
116601
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
116602
|
-
/* provided dependency */ var ResizeSensor = __webpack_require__(45);
|
|
116441
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(659);
|
|
116603
116442
|
/*******************************************************************************
|
|
116604
116443
|
*
|
|
116605
116444
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -116686,10 +116525,8 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
116686
116525
|
|
|
116687
116526
|
X3DRenderingContext_$(document) .on ('webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange', this .onfullscreen .bind (this));
|
|
116688
116527
|
|
|
116689
|
-
|
|
116690
|
-
this [_resizer]
|
|
116691
|
-
|
|
116692
|
-
this .getSurface () .css ("position", ""); // Reset position, set from ResizeSensor.
|
|
116528
|
+
this [_resizer] = new ResizeObserver (this .reshape .bind (this));
|
|
116529
|
+
this [_resizer] .observe (this .getSurface () [0]);
|
|
116693
116530
|
|
|
116694
116531
|
this .reshape ();
|
|
116695
116532
|
},
|
|
@@ -118887,7 +118724,7 @@ const Components_default_ = Components;
|
|
|
118887
118724
|
x_ite_Namespace .add ("Components", "x_ite/Components", Components_default_);
|
|
118888
118725
|
/* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
|
|
118889
118726
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
|
|
118890
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
118727
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(659);
|
|
118891
118728
|
/*******************************************************************************
|
|
118892
118729
|
* MIT License
|
|
118893
118730
|
*
|
|
@@ -120025,7 +119862,7 @@ const SupportedProfiles_default_ = SupportedProfiles;
|
|
|
120025
119862
|
x_ite_Namespace .add ("SupportedProfiles", "x_ite/Configuration/SupportedProfiles", SupportedProfiles_default_);
|
|
120026
119863
|
/* harmony default export */ const Configuration_SupportedProfiles = (SupportedProfiles_default_);
|
|
120027
119864
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
|
|
120028
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
119865
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(659);
|
|
120029
119866
|
/*******************************************************************************
|
|
120030
119867
|
*
|
|
120031
119868
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -121106,7 +120943,7 @@ const X3DBrowser_default_ = X3DBrowser;
|
|
|
121106
120943
|
x_ite_Namespace .add ("X3DBrowser", "x_ite/Browser/X3DBrowser", X3DBrowser_default_);
|
|
121107
120944
|
/* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
|
|
121108
120945
|
;// CONCATENATED MODULE: ./src/x_ite/X3DCanvasElement.js
|
|
121109
|
-
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(
|
|
120946
|
+
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(659);
|
|
121110
120947
|
/*******************************************************************************
|
|
121111
120948
|
*
|
|
121112
120949
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -121238,8 +121075,8 @@ const X3DCanvasElement_default_ = X3DCanvasElement;
|
|
|
121238
121075
|
x_ite_Namespace .add ("X3DCanvasElement", "x_ite/X3DCanvasElement", X3DCanvasElement_default_);
|
|
121239
121076
|
/* harmony default export */ const x_ite_X3DCanvasElement = (X3DCanvasElement_default_);
|
|
121240
121077
|
;// CONCATENATED MODULE: ./src/lib/jquery.js
|
|
121241
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
121242
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
121078
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(659);
|
|
121079
|
+
/* provided dependency */ var pako = __webpack_require__(822);
|
|
121243
121080
|
Object .assign (jquery_$,
|
|
121244
121081
|
{
|
|
121245
121082
|
decodeText (input)
|
|
@@ -121316,14 +121153,14 @@ const jquery_default_ = jquery_$;
|
|
|
121316
121153
|
x_ite_Namespace .add ("jquery", "lib/jquery", jquery_default_);
|
|
121317
121154
|
/* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
|
|
121318
121155
|
;// CONCATENATED MODULE: ./src/lib/libtess.js
|
|
121319
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
121156
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(793);
|
|
121320
121157
|
const libtess_default_ = libtess_libtess;
|
|
121321
121158
|
;
|
|
121322
121159
|
|
|
121323
121160
|
x_ite_Namespace .add ("libtess", "lib/libtess", libtess_default_);
|
|
121324
121161
|
/* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
|
|
121325
121162
|
;// CONCATENATED MODULE: ./src/x_ite/X3D.js
|
|
121326
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
121163
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(659);
|
|
121327
121164
|
/*******************************************************************************
|
|
121328
121165
|
*
|
|
121329
121166
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -121717,7 +121554,7 @@ x_ite_Namespace .add ("shim", "shim", shim_default_);
|
|
|
121717
121554
|
|
|
121718
121555
|
// Assign X3D to global namespace.
|
|
121719
121556
|
|
|
121720
|
-
window [Symbol .for ("X_ITE.X3D-8.12.
|
|
121557
|
+
window [Symbol .for ("X_ITE.X3D-8.12.5")] = x_ite_X3D;
|
|
121721
121558
|
|
|
121722
121559
|
customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
|
|
121723
121560
|
|