x_ite 8.6.8 → 8.6.9
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/.vscode/tasks.json +1 -1
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- 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 +18 -18
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +27 -27
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +24 -24
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +25 -27
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +19 -19
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +18 -18
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +28 -28
- 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 +19 -19
- 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 +897 -660
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +2 -2
- package/docs/laboratory/gltf-sample-viewer.html +4 -4
- package/package.json +1 -1
- package/src/assets/shaders/webgl1/Pointing.fs.js +1 -1
- package/src/assets/shaders/webgl1/include/Fragment.glsl.js +17 -1
- package/src/assets/shaders/webgl1/include/Point.glsl.js +10 -2
- package/src/assets/shaders/webgl1/include/Texture.glsl.js +31 -1
- package/src/assets/shaders/webgl1/include/Vertex.glsl.js +24 -0
- package/src/assets/shaders/webgl2/Pointing.fs.js +1 -1
- package/src/assets/shaders/webgl2/include/Fragment.glsl.js +18 -0
- package/src/assets/shaders/webgl2/include/Point.glsl.js +12 -4
- package/src/assets/shaders/webgl2/include/Texture.glsl.js +17 -20
- package/src/assets/shaders/webgl2/include/Vertex.glsl.js +24 -0
- package/src/bookmarks.js +1 -1
- package/src/tests.js +1 -0
- package/src/x_ite/Browser/Core/BrowserOptions.js +3 -0
- package/src/x_ite/Browser/Core/BrowserTimings.js +12 -11
- package/src/x_ite/Browser/Core/Context.js +64 -64
- package/src/x_ite/Browser/Core/ContextMenu.js +0 -9
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +1 -1
- package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +8 -0
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +1 -1
- package/src/x_ite/Components/Core/X3DBindableNode.js +0 -2
- package/src/x_ite/Components/Core/X3DNode.js +3 -8
- package/src/x_ite/Components/Layering/X3DLayerNode.js +6 -2
- package/src/x_ite/Components/Navigation/NavigationInfo.js +1 -0
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +34 -21
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +2 -4
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +5 -19
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +6 -12
- package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +4 -8
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +28 -27
- package/src/x_ite/Components/Shape/Material.js +4 -0
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +4 -0
- package/src/x_ite/Components/Shape/TwoSidedMaterial.js +1 -0
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +21 -19
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +4 -0
- package/src/x_ite/Components/Texturing/ImageTexture.js +77 -48
- package/src/x_ite/Components/Texturing/MultiTexture.js +7 -4
- package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +19 -16
- package/src/x_ite/Components/Texturing/MultiTextureTransform.js +16 -32
- package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +1 -1
- package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +2 -8
- package/src/x_ite/Components/Texturing/X3DSingleTextureTransformNode.js +2 -8
- package/src/x_ite/Execution/NamedNodesHandling.js +84 -0
- package/src/x_ite/Execution/X3DExecutionContext.js +7 -37
- package/src/x_ite/Execution/X3DScene.js +5 -0
- package/src/x_ite/InputOutput/FileLoader.js +1 -1
- package/src/x_ite/InputOutput/Generator.js +32 -81
- package/src/x_ite/Parser/GLTF2Parser.js +109 -43
- package/src/x_ite/Parser/OBJParser.js +42 -30
- package/src/x_ite/Parser/STLAParser.js +3 -0
- package/src/x_ite/Parser/SVGParser.js +4 -0
- package/src/x_ite/Rendering/X3DRenderObject.js +2 -0
- package/src/x_ite.html +52 -46
- package/x_ite.min.html +52 -46
package/dist/x_ite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* X_ITE v8.6.
|
|
1
|
+
/* X_ITE v8.6.9 */(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,11 +11,11 @@
|
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/
|
|
14
|
+
/***/ 599:
|
|
15
15
|
/***/ (function(module, exports, __webpack_require__) {
|
|
16
16
|
|
|
17
17
|
"use strict";
|
|
18
|
-
/* provided dependency */ var jQuery = __webpack_require__(
|
|
18
|
+
/* provided dependency */ var jQuery = __webpack_require__(998);
|
|
19
19
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -387,10 +387,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
|
387
387
|
|
|
388
388
|
/***/ }),
|
|
389
389
|
|
|
390
|
-
/***/
|
|
390
|
+
/***/ 774:
|
|
391
391
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
392
392
|
|
|
393
|
-
/* provided dependency */ var jQuery = __webpack_require__(
|
|
393
|
+
/* provided dependency */ var jQuery = __webpack_require__(998);
|
|
394
394
|
/**
|
|
395
395
|
* @preserve jquery.fullscreen 1.1.5
|
|
396
396
|
* https://github.com/code-lts/jquery-fullscreen-plugin
|
|
@@ -586,7 +586,7 @@ installFullScreenHandlers();
|
|
|
586
586
|
|
|
587
587
|
/***/ }),
|
|
588
588
|
|
|
589
|
-
/***/
|
|
589
|
+
/***/ 136:
|
|
590
590
|
/***/ ((module, exports, __webpack_require__) => {
|
|
591
591
|
|
|
592
592
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -600,7 +600,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
600
600
|
(function (factory) {
|
|
601
601
|
if ( true ) {
|
|
602
602
|
// AMD. Register as an anonymous module.
|
|
603
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(
|
|
603
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(998)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
604
604
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
605
605
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
606
606
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
@@ -811,7 +811,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
811
811
|
|
|
812
812
|
/***/ }),
|
|
813
813
|
|
|
814
|
-
/***/
|
|
814
|
+
/***/ 998:
|
|
815
815
|
/***/ (function(module, exports) {
|
|
816
816
|
|
|
817
817
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -11812,7 +11812,7 @@ return jQuery;
|
|
|
11812
11812
|
|
|
11813
11813
|
/***/ }),
|
|
11814
11814
|
|
|
11815
|
-
/***/
|
|
11815
|
+
/***/ 422:
|
|
11816
11816
|
/***/ ((module) => {
|
|
11817
11817
|
|
|
11818
11818
|
/**
|
|
@@ -16591,7 +16591,7 @@ if (true) {
|
|
|
16591
16591
|
|
|
16592
16592
|
/***/ }),
|
|
16593
16593
|
|
|
16594
|
-
/***/
|
|
16594
|
+
/***/ 978:
|
|
16595
16595
|
/***/ (function(__unused_webpack_module, exports) {
|
|
16596
16596
|
|
|
16597
16597
|
|
|
@@ -19836,7 +19836,7 @@ if (true) {
|
|
|
19836
19836
|
|
|
19837
19837
|
/***/ }),
|
|
19838
19838
|
|
|
19839
|
-
/***/
|
|
19839
|
+
/***/ 921:
|
|
19840
19840
|
/***/ (function(module, exports) {
|
|
19841
19841
|
|
|
19842
19842
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -21094,6 +21094,92 @@ const __default__ = X3DConstants;
|
|
|
21094
21094
|
|
|
21095
21095
|
x_ite_Namespace.set ("x_ite/Base/X3DConstants", __default__);
|
|
21096
21096
|
/* harmony default export */ const Base_X3DConstants = (__default__);
|
|
21097
|
+
;// CONCATENATED MODULE: ./src/x_ite/Execution/NamedNodesHandling.js
|
|
21098
|
+
/*******************************************************************************
|
|
21099
|
+
*
|
|
21100
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
21101
|
+
*
|
|
21102
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
21103
|
+
*
|
|
21104
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
21105
|
+
*
|
|
21106
|
+
* The copyright notice above does not evidence any actual of intended
|
|
21107
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
21108
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
21109
|
+
* create3000.
|
|
21110
|
+
*
|
|
21111
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
21112
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
21113
|
+
* permission of create3000.
|
|
21114
|
+
*
|
|
21115
|
+
* NON-MILITARY USE ONLY
|
|
21116
|
+
*
|
|
21117
|
+
* All create3000 software are effectively free software with a non-military use
|
|
21118
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
21119
|
+
* source in any way you please with the exception anything that uses it must be
|
|
21120
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
21121
|
+
*
|
|
21122
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
21123
|
+
*
|
|
21124
|
+
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
21125
|
+
*
|
|
21126
|
+
* This file is part of the X_ITE Project.
|
|
21127
|
+
*
|
|
21128
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
21129
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
21130
|
+
* Free Software Foundation.
|
|
21131
|
+
*
|
|
21132
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
21133
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
21134
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
21135
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
21136
|
+
*
|
|
21137
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
21138
|
+
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
21139
|
+
* copy of the GPLv3 License.
|
|
21140
|
+
*
|
|
21141
|
+
* For Silvio, Joy and Adi.
|
|
21142
|
+
*
|
|
21143
|
+
******************************************************************************/
|
|
21144
|
+
|
|
21145
|
+
const getUniqueName = function (array, name = "", number = false)
|
|
21146
|
+
{
|
|
21147
|
+
name = String (name) .replace (/_\d+$/, "");
|
|
21148
|
+
|
|
21149
|
+
let
|
|
21150
|
+
newName = number ? `${name}_1` : name,
|
|
21151
|
+
lo = 1,
|
|
21152
|
+
hi = 1;
|
|
21153
|
+
|
|
21154
|
+
while (array .has (newName) || newName .length === 0)
|
|
21155
|
+
{
|
|
21156
|
+
lo = hi;
|
|
21157
|
+
hi <<= 1;
|
|
21158
|
+
|
|
21159
|
+
newName = `${name}_${lo}`;
|
|
21160
|
+
}
|
|
21161
|
+
|
|
21162
|
+
lo >>>= 1;
|
|
21163
|
+
hi >>>= 1;
|
|
21164
|
+
|
|
21165
|
+
if (lo && hi)
|
|
21166
|
+
{
|
|
21167
|
+
while (lo < hi)
|
|
21168
|
+
{
|
|
21169
|
+
const m = (lo + hi) >>> 1;
|
|
21170
|
+
|
|
21171
|
+
if (array .has (`${name}_${m}`))
|
|
21172
|
+
lo = m + 1;
|
|
21173
|
+
else
|
|
21174
|
+
hi = m;
|
|
21175
|
+
}
|
|
21176
|
+
|
|
21177
|
+
newName = `${name}_${lo}`;
|
|
21178
|
+
}
|
|
21179
|
+
|
|
21180
|
+
return newName;
|
|
21181
|
+
};
|
|
21182
|
+
|
|
21097
21183
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/Generator.js
|
|
21098
21184
|
/*******************************************************************************
|
|
21099
21185
|
*
|
|
@@ -21144,6 +21230,7 @@ x_ite_Namespace.set ("x_ite/Base/X3DConstants", __default__);
|
|
|
21144
21230
|
|
|
21145
21231
|
|
|
21146
21232
|
|
|
21233
|
+
|
|
21147
21234
|
function Generator ({ style = "TIDY", precision = 7, doublePrecision = 15 })
|
|
21148
21235
|
{
|
|
21149
21236
|
this .Style (style);
|
|
@@ -21164,12 +21251,11 @@ function Generator ({ style = "TIDY", precision = 7, doublePrecision = 15 })
|
|
|
21164
21251
|
this .importedNames = new Map ();
|
|
21165
21252
|
this .routeNodes = new Set ();
|
|
21166
21253
|
this .level = 0;
|
|
21167
|
-
this .newName = 0;
|
|
21168
21254
|
this .containerFields = [ ];
|
|
21169
21255
|
this .units = true;
|
|
21170
21256
|
this .unitCategories = [ ];
|
|
21171
21257
|
|
|
21172
|
-
this .names .set (null, new
|
|
21258
|
+
this .names .set (null, new Set ());
|
|
21173
21259
|
}
|
|
21174
21260
|
|
|
21175
21261
|
Generator .prototype =
|
|
@@ -21309,7 +21395,7 @@ Generator .prototype =
|
|
|
21309
21395
|
this .executionContextStack .push (executionContext);
|
|
21310
21396
|
|
|
21311
21397
|
if (! this .names .has (executionContext))
|
|
21312
|
-
this .names .set (executionContext, new
|
|
21398
|
+
this .names .set (executionContext, Object .assign (new Set (), { index: 0 }));
|
|
21313
21399
|
|
|
21314
21400
|
if (! this .importedNodesIndex .has (executionContext))
|
|
21315
21401
|
this .importedNodesIndex .set (executionContext, new Set ());
|
|
@@ -21333,9 +21419,6 @@ Generator .prototype =
|
|
|
21333
21419
|
},
|
|
21334
21420
|
EnterScope: function ()
|
|
21335
21421
|
{
|
|
21336
|
-
if (this .level === 0)
|
|
21337
|
-
this .newName = 0;
|
|
21338
|
-
|
|
21339
21422
|
++ this .level;
|
|
21340
21423
|
},
|
|
21341
21424
|
LeaveScope: function ()
|
|
@@ -21403,79 +21486,47 @@ Generator .prototype =
|
|
|
21403
21486
|
{
|
|
21404
21487
|
return this .nodes .has (baseNode);
|
|
21405
21488
|
},
|
|
21406
|
-
Name:
|
|
21489
|
+
Name: function (baseNode)
|
|
21407
21490
|
{
|
|
21408
|
-
|
|
21491
|
+
// Is the node already in index.
|
|
21409
21492
|
|
|
21410
|
-
|
|
21411
|
-
{
|
|
21412
|
-
// Is the node already in index
|
|
21493
|
+
const name = this .namesByNode .get (baseNode);
|
|
21413
21494
|
|
|
21414
|
-
|
|
21495
|
+
if (name !== undefined)
|
|
21496
|
+
{
|
|
21497
|
+
return name;
|
|
21498
|
+
}
|
|
21499
|
+
else
|
|
21500
|
+
{
|
|
21501
|
+
const
|
|
21502
|
+
name = baseNode .getName (),
|
|
21503
|
+
match = name .match (/^(.*?)(_\d+)?$/),
|
|
21504
|
+
names = this .names .get (this .ExecutionContext ());
|
|
21415
21505
|
|
|
21416
|
-
if (
|
|
21506
|
+
if (match [1])
|
|
21417
21507
|
{
|
|
21418
|
-
|
|
21508
|
+
// The node has a name.
|
|
21509
|
+
|
|
21510
|
+
var newName = getUniqueName (names, name, !! match [2]);
|
|
21419
21511
|
}
|
|
21420
21512
|
else
|
|
21421
21513
|
{
|
|
21422
|
-
|
|
21423
|
-
|
|
21424
|
-
// The node has no name
|
|
21425
|
-
|
|
21426
|
-
if (baseNode .getName () .length === 0)
|
|
21427
|
-
{
|
|
21428
|
-
if (this .NeedsName (baseNode))
|
|
21429
|
-
{
|
|
21430
|
-
const name = this .UniqueName ();
|
|
21431
|
-
|
|
21432
|
-
names .set (name, baseNode);
|
|
21433
|
-
this .namesByNode .set (baseNode, name);
|
|
21434
|
-
|
|
21435
|
-
return name;
|
|
21436
|
-
}
|
|
21437
|
-
|
|
21438
|
-
// The node doesn't need a name
|
|
21439
|
-
|
|
21440
|
-
return baseNode .getName ();
|
|
21441
|
-
}
|
|
21442
|
-
|
|
21443
|
-
// The node has a name
|
|
21514
|
+
// The node has no name.
|
|
21444
21515
|
|
|
21445
|
-
|
|
21446
|
-
|
|
21516
|
+
if (!this .NeedsName (baseNode))
|
|
21517
|
+
return "";
|
|
21447
21518
|
|
|
21448
|
-
|
|
21449
|
-
|
|
21450
|
-
if (name .length === 0)
|
|
21451
|
-
{
|
|
21452
|
-
if (this .NeedsName (baseNode))
|
|
21453
|
-
name = this .UniqueName ();
|
|
21454
|
-
|
|
21455
|
-
else
|
|
21456
|
-
return "";
|
|
21457
|
-
}
|
|
21458
|
-
else
|
|
21459
|
-
{
|
|
21460
|
-
let
|
|
21461
|
-
i = 0,
|
|
21462
|
-
newName = hasNumber ? name + '_' + (++ i) : name;
|
|
21519
|
+
var newName = `_${++ names .index}`;
|
|
21520
|
+
}
|
|
21463
21521
|
|
|
21464
|
-
|
|
21465
|
-
{
|
|
21466
|
-
newName = name + '_' + (++ i);
|
|
21467
|
-
}
|
|
21522
|
+
// Add to indices.
|
|
21468
21523
|
|
|
21469
|
-
|
|
21470
|
-
|
|
21524
|
+
names .add (newName);
|
|
21525
|
+
this .namesByNode .set (baseNode, newName);
|
|
21471
21526
|
|
|
21472
|
-
|
|
21473
|
-
|
|
21474
|
-
|
|
21475
|
-
return name;
|
|
21476
|
-
}
|
|
21477
|
-
};
|
|
21478
|
-
})(),
|
|
21527
|
+
return newName;
|
|
21528
|
+
}
|
|
21529
|
+
},
|
|
21479
21530
|
NeedsName: function (baseNode)
|
|
21480
21531
|
{
|
|
21481
21532
|
if (baseNode .getCloneCount () > 1)
|
|
@@ -21506,20 +21557,6 @@ Generator .prototype =
|
|
|
21506
21557
|
return false;
|
|
21507
21558
|
}
|
|
21508
21559
|
},
|
|
21509
|
-
UniqueName: function ()
|
|
21510
|
-
{
|
|
21511
|
-
const names = this .names .get (this .ExecutionContext ());
|
|
21512
|
-
|
|
21513
|
-
for (; ;)
|
|
21514
|
-
{
|
|
21515
|
-
const name = '_' + (++ this .newName);
|
|
21516
|
-
|
|
21517
|
-
if (names .has (name))
|
|
21518
|
-
continue;
|
|
21519
|
-
|
|
21520
|
-
return name;
|
|
21521
|
-
}
|
|
21522
|
-
},
|
|
21523
21560
|
LocalName: function (baseNode)
|
|
21524
21561
|
{
|
|
21525
21562
|
const importedName = this .importedNames .get (baseNode);
|
|
@@ -34912,7 +34949,7 @@ x_ite_Namespace.set ("x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
|
|
|
34912
34949
|
*
|
|
34913
34950
|
******************************************************************************/
|
|
34914
34951
|
|
|
34915
|
-
const VERSION_default_ = "8.6.
|
|
34952
|
+
const VERSION_default_ = "8.6.9";
|
|
34916
34953
|
;
|
|
34917
34954
|
|
|
34918
34955
|
x_ite_Namespace.set ("x_ite/Browser/VERSION", VERSION_default_);
|
|
@@ -35167,70 +35204,70 @@ const Context =
|
|
|
35167
35204
|
|
|
35168
35205
|
// Async functions
|
|
35169
35206
|
|
|
35170
|
-
|
|
35171
|
-
|
|
35172
|
-
|
|
35173
|
-
|
|
35174
|
-
|
|
35175
|
-
|
|
35176
|
-
|
|
35177
|
-
|
|
35178
|
-
|
|
35179
|
-
|
|
35180
|
-
|
|
35181
|
-
|
|
35182
|
-
|
|
35183
|
-
|
|
35184
|
-
|
|
35185
|
-
|
|
35186
|
-
|
|
35187
|
-
|
|
35188
|
-
|
|
35189
|
-
|
|
35190
|
-
|
|
35191
|
-
|
|
35192
|
-
|
|
35193
|
-
|
|
35194
|
-
|
|
35195
|
-
|
|
35196
|
-
|
|
35197
|
-
|
|
35198
|
-
|
|
35199
|
-
|
|
35200
|
-
|
|
35201
|
-
|
|
35202
|
-
|
|
35203
|
-
// check ();
|
|
35204
|
-
// });
|
|
35205
|
-
// },
|
|
35206
|
-
// getBufferSubDataAsync: async function (target, buffer, srcByteOffset, dstBuffer, /* optional */ dstOffset, /* optional */ length)
|
|
35207
|
-
// {
|
|
35208
|
-
// const sync = this .fenceSync (this .SYNC_GPU_COMMANDS_COMPLETE, 0);
|
|
35207
|
+
Object .assign (gl, gl .getVersion () === 1
|
|
35208
|
+
? {
|
|
35209
|
+
readPixelsAsync: gl .readPixels,
|
|
35210
|
+
}
|
|
35211
|
+
: {
|
|
35212
|
+
clientWaitAsync: function (sync, flags, timeout)
|
|
35213
|
+
{
|
|
35214
|
+
return new Promise ((resolve, reject) =>
|
|
35215
|
+
{
|
|
35216
|
+
const check = () =>
|
|
35217
|
+
{
|
|
35218
|
+
const result = this .clientWaitSync (sync, flags, 0);
|
|
35219
|
+
|
|
35220
|
+
switch (result)
|
|
35221
|
+
{
|
|
35222
|
+
case this .WAIT_FAILED:
|
|
35223
|
+
{
|
|
35224
|
+
reject ();
|
|
35225
|
+
return;
|
|
35226
|
+
}
|
|
35227
|
+
case this .TIMEOUT_EXPIRED:
|
|
35228
|
+
{
|
|
35229
|
+
setTimeout (check, timeout);
|
|
35230
|
+
return;
|
|
35231
|
+
}
|
|
35232
|
+
default:
|
|
35233
|
+
{
|
|
35234
|
+
resolve ();
|
|
35235
|
+
return;
|
|
35236
|
+
}
|
|
35237
|
+
}
|
|
35238
|
+
};
|
|
35209
35239
|
|
|
35210
|
-
|
|
35240
|
+
check ();
|
|
35241
|
+
});
|
|
35242
|
+
},
|
|
35243
|
+
getBufferSubDataAsync: async function (target, buffer, srcByteOffset, dstBuffer, /* optional */ dstOffset, /* optional */ length)
|
|
35244
|
+
{
|
|
35245
|
+
const sync = this .fenceSync (this .SYNC_GPU_COMMANDS_COMPLETE, 0);
|
|
35211
35246
|
|
|
35212
|
-
|
|
35247
|
+
this .flush ();
|
|
35213
35248
|
|
|
35214
|
-
|
|
35249
|
+
await this .clientWaitAsync (sync, 0, 10);
|
|
35215
35250
|
|
|
35216
|
-
|
|
35217
|
-
// this .getBufferSubData (target, srcByteOffset, dstBuffer, dstOffset, length);
|
|
35218
|
-
// this .bindBuffer (target, null);
|
|
35219
|
-
// },
|
|
35220
|
-
// readPixelsAsync: async function (x, y, w, h, format, type, dest, dstOffset)
|
|
35221
|
-
// {
|
|
35222
|
-
// const buffer = this .createBuffer ();
|
|
35251
|
+
this .deleteSync (sync);
|
|
35223
35252
|
|
|
35224
|
-
|
|
35225
|
-
|
|
35226
|
-
|
|
35227
|
-
|
|
35253
|
+
this .bindBuffer (target, buffer);
|
|
35254
|
+
this .getBufferSubData (target, srcByteOffset, dstBuffer, dstOffset, length);
|
|
35255
|
+
this .bindBuffer (target, null);
|
|
35256
|
+
},
|
|
35257
|
+
readPixelsAsync: async function (x, y, w, h, format, type, dest, dstOffset)
|
|
35258
|
+
{
|
|
35259
|
+
const buffer = this .createBuffer ();
|
|
35228
35260
|
|
|
35229
|
-
|
|
35261
|
+
this .bindBuffer (this .PIXEL_PACK_BUFFER, buffer);
|
|
35262
|
+
this .bufferData (this .PIXEL_PACK_BUFFER, dest .byteLength, this .STREAM_READ);
|
|
35263
|
+
this .readPixels (x, y, w, h, format, type, 0);
|
|
35264
|
+
this .bindBuffer (this .PIXEL_PACK_BUFFER, null);
|
|
35230
35265
|
|
|
35231
|
-
|
|
35232
|
-
|
|
35233
|
-
|
|
35266
|
+
await this .getBufferSubDataAsync (this .PIXEL_PACK_BUFFER, buffer, 0, dest, dstOffset);
|
|
35267
|
+
|
|
35268
|
+
this .deleteBuffer (buffer);
|
|
35269
|
+
},
|
|
35270
|
+
});
|
|
35234
35271
|
|
|
35235
35272
|
// Return context.
|
|
35236
35273
|
|
|
@@ -35814,7 +35851,7 @@ const gettext_default_ = gettext;
|
|
|
35814
35851
|
x_ite_Namespace.set ("locale/gettext", gettext_default_);
|
|
35815
35852
|
/* harmony default export */ const locale_gettext = (gettext_default_);
|
|
35816
35853
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
|
|
35817
|
-
/* provided dependency */ var $ = __webpack_require__(
|
|
35854
|
+
/* provided dependency */ var $ = __webpack_require__(998);
|
|
35818
35855
|
/*******************************************************************************
|
|
35819
35856
|
*
|
|
35820
35857
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -35866,8 +35903,6 @@ x_ite_Namespace.set ("locale/gettext", gettext_default_);
|
|
|
35866
35903
|
|
|
35867
35904
|
|
|
35868
35905
|
|
|
35869
|
-
function f2 (n) { return n .toFixed (2); }
|
|
35870
|
-
|
|
35871
35906
|
function BrowserTimings (executionContext)
|
|
35872
35907
|
{
|
|
35873
35908
|
Base_X3DBaseNode.call (this, executionContext);
|
|
@@ -35928,6 +35963,7 @@ BrowserTimings .prototype = Object .assign (Object .create (Base_X3DBaseNode.pro
|
|
|
35928
35963
|
this .fps .reset ();
|
|
35929
35964
|
this .getBrowser () .prepareEvents () .addInterest ("update", this);
|
|
35930
35965
|
this .update ();
|
|
35966
|
+
this .build ();
|
|
35931
35967
|
}
|
|
35932
35968
|
else
|
|
35933
35969
|
{
|
|
@@ -35975,7 +36011,7 @@ BrowserTimings .prototype = Object .assign (Object .create (Base_X3DBaseNode.pro
|
|
|
35975
36011
|
let r = 0;
|
|
35976
36012
|
|
|
35977
36013
|
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Frame rate") + ":")) .append ($("<td></td>") .text (f2(1000 / this .fps .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("fps")));
|
|
35978
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Speed")
|
|
36014
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Speed") + ":")) .append ($("<td></td>") .text (f2(this .getSpeed (browser .currentSpeed)) .toLocaleString (language, fixed) + " " + this .getSpeedUnit (browser .currentSpeed)));
|
|
35979
36015
|
|
|
35980
36016
|
if (this .localStorage .type === "MORE")
|
|
35981
36017
|
{
|
|
@@ -36000,14 +36036,14 @@ BrowserTimings .prototype = Object .assign (Object .create (Base_X3DBaseNode.pro
|
|
|
36000
36036
|
|
|
36001
36037
|
rows [1] .addClass ("x_ite-private-more");
|
|
36002
36038
|
|
|
36003
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Browser")
|
|
36004
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("X3D total")
|
|
36005
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Event Processing")
|
|
36006
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Pointer")
|
|
36007
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Camera")
|
|
36008
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Picking")
|
|
36009
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Collision Detection") + ":")) .append ($("<td></td>") .text (f2(collisionTime)
|
|
36010
|
-
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Rendering")
|
|
36039
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Browser") + ":")) .append ($("<td></td>") .text (f2(browser .getSystemTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
|
|
36040
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("X3D total") + ":")) .append ($("<td></td>") .text (f2(browser .getBrowserTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
|
|
36041
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Event Processing") + ":")) .append ($("<td></td>") .text (f2(routingTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
|
|
36042
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Pointer") + ":")) .append ($("<td></td>") .text (f2(browser .getPointingTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
|
|
36043
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Camera") + ":")) .append ($("<td></td>") .text (f2(browser .getCameraTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
|
|
36044
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Picking") + ":")) .append ($("<td></td>") .text (f2(browser .getPickingTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
|
|
36045
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Collision Detection") + ":")) .append ($("<td></td>") .text (f2(collisionTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
|
|
36046
|
+
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Rendering") + ":")) .append ($("<td></td>") .text (f2(browser .getDisplayTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
|
|
36011
36047
|
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Number of Shapes") + ":")) .append ($("<td></td>") .text (opaqueShapes + " + " + transparentShapes));
|
|
36012
36048
|
rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Number of Sensors") + ":")) .append ($("<td></td>") .text (prepareEvents + sensors));
|
|
36013
36049
|
|
|
@@ -36045,6 +36081,8 @@ BrowserTimings .prototype = Object .assign (Object .create (Base_X3DBaseNode.pro
|
|
|
36045
36081
|
},
|
|
36046
36082
|
});
|
|
36047
36083
|
|
|
36084
|
+
function f2 (n) { return isFinite (n) ? n .toFixed (2) : 0 .toFixed (2); }
|
|
36085
|
+
|
|
36048
36086
|
const BrowserTimings_default_ = BrowserTimings;
|
|
36049
36087
|
;
|
|
36050
36088
|
|
|
@@ -36506,6 +36544,9 @@ BrowserOptions .prototype = Object .assign (Object .create (Base_X3DBaseNode.pro
|
|
|
36506
36544
|
set_straightenHorizon__: function (straightenHorizon)
|
|
36507
36545
|
{
|
|
36508
36546
|
this .localStorage .StraightenHorizon = straightenHorizon .getValue ();
|
|
36547
|
+
|
|
36548
|
+
if (straightenHorizon .getValue ())
|
|
36549
|
+
this .getBrowser () .getActiveLayer ()?.straightenView ();
|
|
36509
36550
|
},
|
|
36510
36551
|
updateContentScale: function ()
|
|
36511
36552
|
{
|
|
@@ -36772,7 +36813,7 @@ const RenderingProperties_default_ = RenderingProperties;
|
|
|
36772
36813
|
x_ite_Namespace.set ("x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
|
|
36773
36814
|
/* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
|
|
36774
36815
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
|
|
36775
|
-
/* provided dependency */ var Notification_$ = __webpack_require__(
|
|
36816
|
+
/* provided dependency */ var Notification_$ = __webpack_require__(998);
|
|
36776
36817
|
/*******************************************************************************
|
|
36777
36818
|
*
|
|
36778
36819
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -36894,8 +36935,8 @@ const Notification_default_ = Notification;
|
|
|
36894
36935
|
x_ite_Namespace.set ("x_ite/Browser/Core/Notification", Notification_default_);
|
|
36895
36936
|
/* harmony default export */ const Core_Notification = (Notification_default_);
|
|
36896
36937
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
|
|
36897
|
-
/* provided dependency */ var jquery_fullscreen = __webpack_require__(
|
|
36898
|
-
/* provided dependency */ var ContextMenu_$ = __webpack_require__(
|
|
36938
|
+
/* provided dependency */ var jquery_fullscreen = __webpack_require__(774);
|
|
36939
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(998);
|
|
36899
36940
|
/*******************************************************************************
|
|
36900
36941
|
*
|
|
36901
36942
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -37048,18 +37089,9 @@ ContextMenu .prototype = Object .assign (Object .create (Base_X3DBaseNode.protot
|
|
|
37048
37089
|
browser .setBrowserOption ("StraightenHorizon", straightenHorizon);
|
|
37049
37090
|
|
|
37050
37091
|
if (straightenHorizon)
|
|
37051
|
-
{
|
|
37052
37092
|
browser .getNotification () ._string = locale_gettext("Straighten Horizon") + ": " + locale_gettext("on");
|
|
37053
|
-
|
|
37054
|
-
const activeViewpoint = browser .getActiveViewpoint ();
|
|
37055
|
-
|
|
37056
|
-
if (activeViewpoint)
|
|
37057
|
-
activeViewpoint .straighten (browser .getActiveLayer (), true);
|
|
37058
|
-
}
|
|
37059
37093
|
else
|
|
37060
|
-
{
|
|
37061
37094
|
browser .getNotification () ._string = locale_gettext("Straighten Horizon") + ": " + locale_gettext("off");
|
|
37062
|
-
}
|
|
37063
37095
|
}
|
|
37064
37096
|
.bind (this),
|
|
37065
37097
|
},
|
|
@@ -38014,15 +38046,10 @@ X3DNode .prototype = Object .assign (Object .create (Base_X3DBaseNode.prototype)
|
|
|
38014
38046
|
return copy;
|
|
38015
38047
|
}
|
|
38016
38048
|
},
|
|
38017
|
-
getDisplayName:
|
|
38049
|
+
getDisplayName: function ()
|
|
38018
38050
|
{
|
|
38019
|
-
|
|
38020
|
-
|
|
38021
|
-
return function ()
|
|
38022
|
-
{
|
|
38023
|
-
return this .getName () .replace (_TrailingNumber, "");
|
|
38024
|
-
};
|
|
38025
|
-
})(),
|
|
38051
|
+
return this .getName () .replace (/_\d+$/, "");
|
|
38052
|
+
},
|
|
38026
38053
|
getNeedsName: function ()
|
|
38027
38054
|
{
|
|
38028
38055
|
if (this .getName () .length)
|
|
@@ -41897,7 +41924,7 @@ const X3DUrlObject_default_ = X3DUrlObject;
|
|
|
41897
41924
|
x_ite_Namespace.set ("x_ite/Components/Networking/X3DUrlObject", X3DUrlObject_default_);
|
|
41898
41925
|
/* harmony default export */ const Networking_X3DUrlObject = (X3DUrlObject_default_);
|
|
41899
41926
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
|
|
41900
|
-
/* provided dependency */ var X3DParser_$ = __webpack_require__(
|
|
41927
|
+
/* provided dependency */ var X3DParser_$ = __webpack_require__(998);
|
|
41901
41928
|
/*******************************************************************************
|
|
41902
41929
|
*
|
|
41903
41930
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -45074,7 +45101,7 @@ const VRMLParser_default_ = VRMLParser;
|
|
|
45074
45101
|
x_ite_Namespace.set ("x_ite/Parser/VRMLParser", VRMLParser_default_);
|
|
45075
45102
|
/* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
|
|
45076
45103
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
|
|
45077
|
-
/* provided dependency */ var XMLParser_$ = __webpack_require__(
|
|
45104
|
+
/* provided dependency */ var XMLParser_$ = __webpack_require__(998);
|
|
45078
45105
|
/*******************************************************************************
|
|
45079
45106
|
*
|
|
45080
45107
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -47117,7 +47144,7 @@ const URLs_default_ = URLs;
|
|
|
47117
47144
|
x_ite_Namespace.set ("x_ite/Browser/Networking/URLs", URLs_default_);
|
|
47118
47145
|
/* harmony default export */ const Networking_URLs = (URLs_default_);
|
|
47119
47146
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
|
|
47120
|
-
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(
|
|
47147
|
+
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(998);
|
|
47121
47148
|
/*******************************************************************************
|
|
47122
47149
|
*
|
|
47123
47150
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -47181,9 +47208,7 @@ x_ite_Namespace.set ("x_ite/Browser/Networking/URLs", URLs_default_);
|
|
|
47181
47208
|
// https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html
|
|
47182
47209
|
// https://github.com/KhronosGroup/glTF-Sample-Models
|
|
47183
47210
|
|
|
47184
|
-
const
|
|
47185
|
-
STEP_TIME = 1e-4, // in seconds
|
|
47186
|
-
SAMPLES_PER_SECOND = 30; // in 1/s
|
|
47211
|
+
const SAMPLES_PER_SECOND = 30; // in 1/s
|
|
47187
47212
|
|
|
47188
47213
|
function GLTF2Parser (scene)
|
|
47189
47214
|
{
|
|
@@ -47206,7 +47231,7 @@ function GLTF2Parser (scene)
|
|
|
47206
47231
|
this .accessors = [ ];
|
|
47207
47232
|
this .samplers = [ ];
|
|
47208
47233
|
this .materials = [ ];
|
|
47209
|
-
this .textureTransformNodes =
|
|
47234
|
+
this .textureTransformNodes = [ ];
|
|
47210
47235
|
this .cameras = [ ];
|
|
47211
47236
|
this .viewpoints = 0;
|
|
47212
47237
|
this .nodes = [ ];
|
|
@@ -47440,12 +47465,16 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47440
47465
|
if (this .vectorValue (light .color, color))
|
|
47441
47466
|
lightNode ._color = color;
|
|
47442
47467
|
|
|
47468
|
+
lightNode ._global = true;
|
|
47443
47469
|
lightNode ._intensity = this .numberValue (light .intensity, 1);
|
|
47444
47470
|
|
|
47445
47471
|
lightNode .setup ();
|
|
47446
47472
|
|
|
47447
47473
|
if (name)
|
|
47474
|
+
{
|
|
47448
47475
|
scene .addNamedNode (scene .getUniqueName (name), lightNode);
|
|
47476
|
+
scene .addExportedNode (scene .getUniqueExportName (name), lightNode);
|
|
47477
|
+
}
|
|
47449
47478
|
|
|
47450
47479
|
return lightNode;
|
|
47451
47480
|
},
|
|
@@ -47591,7 +47620,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47591
47620
|
components = Components .get (accessor .type),
|
|
47592
47621
|
count = accessor .count || 0,
|
|
47593
47622
|
stride = byteStride ? byteStride / TypedArray .BYTES_PER_ELEMENT : components,
|
|
47594
|
-
length = stride * count,
|
|
47623
|
+
length = Math .min (stride * count, (bufferView .byteLength - byteOffset) / TypedArray .BYTES_PER_ELEMENT),
|
|
47595
47624
|
array = new TypedArray (bufferView .buffer, byteOffset, length);
|
|
47596
47625
|
|
|
47597
47626
|
if (stride === components)
|
|
@@ -47716,7 +47745,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47716
47745
|
name = this .sanitizeName (sampler .name);
|
|
47717
47746
|
|
|
47718
47747
|
if (name)
|
|
47748
|
+
{
|
|
47719
47749
|
scene .addNamedNode (scene .getUniqueName (name), texturePropertiesNode);
|
|
47750
|
+
scene .addExportedNode (scene .getUniqueExportName (name), texturePropertiesNode);
|
|
47751
|
+
}
|
|
47720
47752
|
|
|
47721
47753
|
// minFilter
|
|
47722
47754
|
|
|
@@ -47814,7 +47846,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47814
47846
|
name = this .sanitizeName (texture .name || image .name);
|
|
47815
47847
|
|
|
47816
47848
|
if (name)
|
|
47849
|
+
{
|
|
47817
47850
|
scene .addNamedNode (scene .getUniqueName (name), textureNode);
|
|
47851
|
+
scene .addExportedNode (scene .getUniqueExportName (name), textureNode);
|
|
47852
|
+
}
|
|
47818
47853
|
|
|
47819
47854
|
textureNode ._url = [image .uri];
|
|
47820
47855
|
textureNode ._flipVertically = true;
|
|
@@ -47843,13 +47878,18 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47843
47878
|
if (material .appearanceNode)
|
|
47844
47879
|
return material .appearanceNode;
|
|
47845
47880
|
|
|
47846
|
-
|
|
47847
|
-
|
|
47881
|
+
const texCoordIndices = this .texCoordIndices ("", material);
|
|
47882
|
+
|
|
47883
|
+
this .texCoordIndex = [... texCoordIndices] .reduce (Math .max, -1);
|
|
47884
|
+
|
|
47885
|
+
this .textureTransformNodes = [ ];
|
|
47886
|
+
this .texCoordMappings = new Map ();
|
|
47887
|
+
material .texCoordMappings = this .texCoordMappings;
|
|
47848
47888
|
|
|
47849
47889
|
const
|
|
47850
47890
|
scene = this .getExecutionContext (),
|
|
47851
47891
|
appearanceNode = scene .createNode ("Appearance", false),
|
|
47852
|
-
materialNode = this .
|
|
47892
|
+
materialNode = this .createMaterial (material),
|
|
47853
47893
|
name = this .sanitizeName (material .name);
|
|
47854
47894
|
|
|
47855
47895
|
const emissiveFactor = new Numbers_Color3 (0, 0, 0);
|
|
@@ -47857,8 +47897,8 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47857
47897
|
if (this .vectorValue (material .emissiveFactor, emissiveFactor))
|
|
47858
47898
|
materialNode ._emissiveColor = emissiveFactor;
|
|
47859
47899
|
|
|
47860
|
-
materialNode ._emissiveTextureMapping = this .textureMapping (material .emissiveTexture);
|
|
47861
47900
|
materialNode ._emissiveTexture = this .textureInfo (material .emissiveTexture);
|
|
47901
|
+
materialNode ._emissiveTextureMapping = this .textureMapping (material .emissiveTexture);
|
|
47862
47902
|
|
|
47863
47903
|
this .occlusionTextureInfo (material .occlusionTexture, materialNode);
|
|
47864
47904
|
this .normalTextureInfo (material .normalTexture, materialNode);
|
|
@@ -47866,8 +47906,28 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47866
47906
|
|
|
47867
47907
|
materialNode .setup ();
|
|
47868
47908
|
|
|
47909
|
+
for (const i of texCoordIndices)
|
|
47910
|
+
{
|
|
47911
|
+
const mapping = `TEXCOORD_${i}`;
|
|
47912
|
+
|
|
47913
|
+
if (this .textureTransformNodes .length)
|
|
47914
|
+
{
|
|
47915
|
+
const textureTransformNode = scene .createNode ("TextureTransform", false);
|
|
47916
|
+
|
|
47917
|
+
textureTransformNode ._mapping = mapping;
|
|
47918
|
+
textureTransformNode .setup ();
|
|
47919
|
+
|
|
47920
|
+
this .textureTransformNodes .push (textureTransformNode);
|
|
47921
|
+
}
|
|
47922
|
+
|
|
47923
|
+
this .texCoordMappings .set (mapping, i);
|
|
47924
|
+
}
|
|
47925
|
+
|
|
47869
47926
|
if (name)
|
|
47927
|
+
{
|
|
47870
47928
|
scene .addNamedNode (scene .getUniqueName (name), appearanceNode);
|
|
47929
|
+
scene .addExportedNode (scene .getUniqueExportName (name), appearanceNode);
|
|
47930
|
+
}
|
|
47871
47931
|
|
|
47872
47932
|
appearanceNode ._alphaMode = this .stringValue (material .alphaMode, "OPAQUE");
|
|
47873
47933
|
appearanceNode ._alphaCutoff = this .numberValue (material .alphaCutoff, 0.5);
|
|
@@ -47878,11 +47938,24 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47878
47938
|
|
|
47879
47939
|
return material .appearanceNode = appearanceNode;
|
|
47880
47940
|
},
|
|
47881
|
-
|
|
47941
|
+
texCoordIndices: function (key, object, indices = new Set ())
|
|
47942
|
+
{
|
|
47943
|
+
if (!(object instanceof Object))
|
|
47944
|
+
return indices;
|
|
47945
|
+
|
|
47946
|
+
if (key .endsWith ("Texture") && !object?.extensions?.KHR_texture_transform)
|
|
47947
|
+
indices .add (object .texCoord || 0);
|
|
47948
|
+
|
|
47949
|
+
for (const [key, value] of Object .entries (object))
|
|
47950
|
+
this .texCoordIndices (key, value, indices);
|
|
47951
|
+
|
|
47952
|
+
return indices;
|
|
47953
|
+
},
|
|
47954
|
+
createMaterial: function (material)
|
|
47882
47955
|
{
|
|
47883
47956
|
const materials = [
|
|
47884
47957
|
this .pbrMetallicRoughnessObject .bind (this, material .pbrMetallicRoughness),
|
|
47885
|
-
this .pbrSpecularGlossinessObject .bind (this, material .extensions
|
|
47958
|
+
this .pbrSpecularGlossinessObject .bind (this, material .extensions?.KHR_materials_pbrSpecularGlossiness),
|
|
47886
47959
|
this .pbrMetallicRoughnessObject .bind (this, { }),
|
|
47887
47960
|
];
|
|
47888
47961
|
|
|
@@ -47916,10 +47989,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47916
47989
|
materialNode ._metallic = this .numberValue (pbrMetallicRoughness .metallicFactor, 1);
|
|
47917
47990
|
materialNode ._roughness = this .numberValue (pbrMetallicRoughness .roughnessFactor, 1);
|
|
47918
47991
|
|
|
47919
|
-
materialNode ._baseTextureMapping = this .textureMapping (pbrMetallicRoughness .baseColorTexture);
|
|
47920
47992
|
materialNode ._baseTexture = this .textureInfo (pbrMetallicRoughness .baseColorTexture);
|
|
47921
|
-
materialNode .
|
|
47993
|
+
materialNode ._baseTextureMapping = this .textureMapping (pbrMetallicRoughness .baseColorTexture);
|
|
47922
47994
|
materialNode ._metallicRoughnessTexture = this .textureInfo (pbrMetallicRoughness .metallicRoughnessTexture);
|
|
47995
|
+
materialNode ._metallicRoughnessTextureMapping = this .textureMapping (pbrMetallicRoughness .metallicRoughnessTexture);
|
|
47923
47996
|
|
|
47924
47997
|
return materialNode;
|
|
47925
47998
|
},
|
|
@@ -47954,30 +48027,23 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47954
48027
|
|
|
47955
48028
|
materialNode ._shininess = this .numberValue (pbrSpecularGlossiness .glossinessFactor, 1);
|
|
47956
48029
|
|
|
47957
|
-
materialNode ._diffuseTextureMapping = this .textureMapping (pbrSpecularGlossiness .diffuseTexture);
|
|
47958
48030
|
materialNode ._diffuseTexture = this .textureInfo (pbrSpecularGlossiness .diffuseTexture);
|
|
47959
|
-
materialNode .
|
|
48031
|
+
materialNode ._diffuseTextureMapping = this .textureMapping (pbrSpecularGlossiness .diffuseTexture);
|
|
47960
48032
|
materialNode ._specularTexture = this .textureInfo (pbrSpecularGlossiness .specularGlossinessTexture);
|
|
47961
|
-
materialNode .
|
|
48033
|
+
materialNode ._specularTextureMapping = this .textureMapping (pbrSpecularGlossiness .specularGlossinessTexture);
|
|
47962
48034
|
materialNode ._shininessTexture = this .textureInfo (pbrSpecularGlossiness .specularGlossinessTexture);
|
|
48035
|
+
materialNode ._shininessTextureMapping = this .textureMapping (pbrSpecularGlossiness .specularGlossinessTexture);
|
|
47963
48036
|
|
|
47964
48037
|
return materialNode;
|
|
47965
48038
|
},
|
|
47966
|
-
textureMapping: function (texture)
|
|
47967
|
-
{
|
|
47968
|
-
if (!(texture instanceof Object))
|
|
47969
|
-
return "";
|
|
47970
|
-
|
|
47971
|
-
return "TEXCOORD_" + (texture .texCoord || 0);
|
|
47972
|
-
},
|
|
47973
48039
|
occlusionTextureInfo: function (occlusionTexture, materialNode)
|
|
47974
48040
|
{
|
|
47975
48041
|
if (!(occlusionTexture instanceof Object))
|
|
47976
48042
|
return null;
|
|
47977
48043
|
|
|
47978
48044
|
materialNode ._occlusionStrength = this .numberValue (occlusionTexture .strength, 1);
|
|
47979
|
-
materialNode ._occlusionTextureMapping = this .textureMapping (occlusionTexture);
|
|
47980
48045
|
materialNode ._occlusionTexture = this .textureInfo (occlusionTexture);
|
|
48046
|
+
materialNode ._occlusionTextureMapping = this .textureMapping (occlusionTexture);
|
|
47981
48047
|
},
|
|
47982
48048
|
normalTextureInfo: function (normalTexture, materialNode)
|
|
47983
48049
|
{
|
|
@@ -47985,8 +48051,8 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47985
48051
|
return null;
|
|
47986
48052
|
|
|
47987
48053
|
materialNode ._normalScale = this .numberValue (normalTexture .scale, 1);
|
|
47988
|
-
materialNode ._normalTextureMapping = this .textureMapping (normalTexture);
|
|
47989
48054
|
materialNode ._normalTexture = this .textureInfo (normalTexture);
|
|
48055
|
+
materialNode ._normalTextureMapping = this .textureMapping (normalTexture);
|
|
47990
48056
|
},
|
|
47991
48057
|
textureInfo: function (texture)
|
|
47992
48058
|
{
|
|
@@ -47994,10 +48060,19 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
47994
48060
|
return null;
|
|
47995
48061
|
|
|
47996
48062
|
if (texture .extensions instanceof Object)
|
|
47997
|
-
this .textureTransformObject (texture .extensions .KHR_texture_transform,
|
|
48063
|
+
texture .mapping = this .textureTransformObject (texture .extensions .KHR_texture_transform, texture .texCoord || 0);
|
|
48064
|
+
else
|
|
48065
|
+
texture .mapping = `TEXCOORD_${texture .texCoord || 0}`;
|
|
47998
48066
|
|
|
47999
48067
|
return this .textureObject (this .textures [texture .index]);
|
|
48000
48068
|
},
|
|
48069
|
+
textureMapping: function (texture)
|
|
48070
|
+
{
|
|
48071
|
+
if (!(texture instanceof Object))
|
|
48072
|
+
return "";
|
|
48073
|
+
|
|
48074
|
+
return texture .mapping;
|
|
48075
|
+
},
|
|
48001
48076
|
materialExtensions: function (extensions, materialNode)
|
|
48002
48077
|
{
|
|
48003
48078
|
if (!(extensions instanceof Object))
|
|
@@ -48049,7 +48124,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
48049
48124
|
|
|
48050
48125
|
materialNode ._emissiveStrength = this .numberValue (KHR_materials_emissive_strength .emissiveStrength, 1);
|
|
48051
48126
|
},
|
|
48052
|
-
textureTransformObject: function (KHR_texture_transform,
|
|
48127
|
+
textureTransformObject: function (KHR_texture_transform, texCoord)
|
|
48053
48128
|
{
|
|
48054
48129
|
if (!(KHR_texture_transform instanceof Object))
|
|
48055
48130
|
return;
|
|
@@ -48059,7 +48134,8 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
48059
48134
|
|
|
48060
48135
|
const
|
|
48061
48136
|
scene = this .getExecutionContext (),
|
|
48062
|
-
textureTransformNode = scene .createNode ("TextureTransformMatrix3D", false)
|
|
48137
|
+
textureTransformNode = scene .createNode ("TextureTransformMatrix3D", false),
|
|
48138
|
+
mapping = `TEXCOORD_${this .texCoordIndex + this .textureTransformNodes .length + 1}`;
|
|
48063
48139
|
|
|
48064
48140
|
const
|
|
48065
48141
|
translation = new Numbers_Vector2 (0, 0),
|
|
@@ -48079,7 +48155,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
48079
48155
|
|
|
48080
48156
|
textureTransformNode .setup ();
|
|
48081
48157
|
|
|
48082
|
-
this .textureTransformNodes .
|
|
48158
|
+
this .textureTransformNodes .push (textureTransformNode);
|
|
48159
|
+
this .texCoordMappings .set (mapping, KHR_texture_transform .texCoord ?? texCoord);
|
|
48160
|
+
|
|
48161
|
+
return mapping;
|
|
48083
48162
|
},
|
|
48084
48163
|
meshesArray: function (meshes)
|
|
48085
48164
|
{
|
|
@@ -48107,7 +48186,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
48107
48186
|
if (name)
|
|
48108
48187
|
{
|
|
48109
48188
|
for (const shapeNode of shapeNodes)
|
|
48189
|
+
{
|
|
48110
48190
|
scene .addNamedNode (scene .getUniqueName (name), shapeNode);
|
|
48191
|
+
scene .addExportedNode (scene .getUniqueExportName (name), shapeNode);
|
|
48192
|
+
}
|
|
48111
48193
|
}
|
|
48112
48194
|
|
|
48113
48195
|
return mesh .shapeNodes = shapeNodes;
|
|
@@ -48341,7 +48423,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
48341
48423
|
// Name
|
|
48342
48424
|
|
|
48343
48425
|
if (name)
|
|
48426
|
+
{
|
|
48344
48427
|
scene .addNamedNode (scene .getUniqueName (name), viewpointNode);
|
|
48428
|
+
scene .addExportedNode (scene .getUniqueExportName (name), viewpointNode);
|
|
48429
|
+
}
|
|
48345
48430
|
|
|
48346
48431
|
if (camera .name)
|
|
48347
48432
|
viewpointNode ._description = camera .name;
|
|
@@ -48437,7 +48522,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
48437
48522
|
// Name
|
|
48438
48523
|
|
|
48439
48524
|
if (name)
|
|
48525
|
+
{
|
|
48440
48526
|
scene .addNamedNode (scene .getUniqueName (name), transformNode);
|
|
48527
|
+
scene .addExportedNode (scene .getUniqueExportName (name), transformNode);
|
|
48528
|
+
}
|
|
48441
48529
|
|
|
48442
48530
|
// Set transformation matrix.
|
|
48443
48531
|
|
|
@@ -48569,6 +48657,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
48569
48657
|
const switchNode = scene .createNode ("Switch", false);
|
|
48570
48658
|
|
|
48571
48659
|
scene .addNamedNode (scene .getUniqueName ("Scenes"), switchNode);
|
|
48660
|
+
scene .addExportedNode (scene .getUniqueExportName ("Scenes"), switchNode);
|
|
48572
48661
|
|
|
48573
48662
|
// Scenes.
|
|
48574
48663
|
|
|
@@ -48607,7 +48696,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
48607
48696
|
name = this .sanitizeName (sceneObject .name);
|
|
48608
48697
|
|
|
48609
48698
|
if (name)
|
|
48699
|
+
{
|
|
48610
48700
|
scene .addNamedNode (scene .getUniqueName (name), groupNode);
|
|
48701
|
+
scene .addExportedNode (scene .getUniqueExportName (name), groupNode);
|
|
48702
|
+
}
|
|
48611
48703
|
|
|
48612
48704
|
groupNode ._children = nodes;
|
|
48613
48705
|
|
|
@@ -48638,7 +48730,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
48638
48730
|
groupNode = scene .createNode ("Group", false);
|
|
48639
48731
|
|
|
48640
48732
|
scene .addNamedNode (scene .getUniqueName ("Animations"), groupNode);
|
|
48641
|
-
scene .addExportedNode ("Animations", groupNode);
|
|
48733
|
+
scene .addExportedNode (scene .getUniqueExportName ("Animations"), groupNode);
|
|
48642
48734
|
|
|
48643
48735
|
groupNode ._children = animationNodes;
|
|
48644
48736
|
|
|
@@ -48667,6 +48759,8 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
48667
48759
|
|
|
48668
48760
|
scene .addNamedNode (scene .getUniqueName (name || `Animation${this .animations}`), groupNode);
|
|
48669
48761
|
scene .addNamedNode (scene .getUniqueName (`Timer${this .animations}`), timeSensorNode);
|
|
48762
|
+
scene .addExportedNode (scene .getUniqueExportName (name || `Animation${this .animations}`), groupNode);
|
|
48763
|
+
scene .addExportedNode (scene .getUniqueExportName (`Timer${this .animations}`), timeSensorNode);
|
|
48670
48764
|
|
|
48671
48765
|
timeSensorNode ._description = animation .name || `Animation ${this .animations}`;
|
|
48672
48766
|
groupNode ._children .push (timeSensorNode, ... channelNodes);
|
|
@@ -48801,11 +48895,9 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
48801
48895
|
if (!+materialNode .getTextureBits ())
|
|
48802
48896
|
return null;
|
|
48803
48897
|
|
|
48804
|
-
const textureTransformNodes =
|
|
48898
|
+
const textureTransformNodes = this .textureTransformNodes
|
|
48805
48899
|
.sort ((a, b) => Algorithm.cmp (a ._mapping .getValue (), b ._mapping .getValue ()));
|
|
48806
48900
|
|
|
48807
|
-
this .textureTransformNodes .clear ();
|
|
48808
|
-
|
|
48809
48901
|
switch (textureTransformNodes .length)
|
|
48810
48902
|
{
|
|
48811
48903
|
case 0:
|
|
@@ -49142,7 +49234,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
49142
49234
|
if (texCoords .textureCoordinateNode)
|
|
49143
49235
|
return texCoords .textureCoordinateNode;
|
|
49144
49236
|
|
|
49145
|
-
switch (
|
|
49237
|
+
switch (material .texCoordMappings .size)
|
|
49146
49238
|
{
|
|
49147
49239
|
case 0:
|
|
49148
49240
|
{
|
|
@@ -49150,12 +49242,13 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
49150
49242
|
}
|
|
49151
49243
|
case 1:
|
|
49152
49244
|
{
|
|
49153
|
-
return texCoords .textureCoordinateNode =
|
|
49245
|
+
return texCoords .textureCoordinateNode = [... material .texCoordMappings .entries ()]
|
|
49246
|
+
.map (([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping)) [0];
|
|
49154
49247
|
}
|
|
49155
49248
|
default:
|
|
49156
49249
|
{
|
|
49157
|
-
const textureCoordinateNodes =
|
|
49158
|
-
.map ((
|
|
49250
|
+
const textureCoordinateNodes = [... material .texCoordMappings .entries ()]
|
|
49251
|
+
.map (([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping))
|
|
49159
49252
|
.filter (node => node)
|
|
49160
49253
|
.sort ((a, b) => Algorithm.cmp (a ._mapping .getValue (), b ._mapping .getValue ()));
|
|
49161
49254
|
|
|
@@ -49182,19 +49275,19 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
49182
49275
|
if (texCoord .type !== "VEC2")
|
|
49183
49276
|
return null;
|
|
49184
49277
|
|
|
49185
|
-
if (texCoord
|
|
49186
|
-
return texCoord
|
|
49278
|
+
if (texCoord [mapping])
|
|
49279
|
+
return texCoord [mapping];
|
|
49187
49280
|
|
|
49188
49281
|
const
|
|
49189
49282
|
scene = this .getExecutionContext (),
|
|
49190
49283
|
textureCoordinateNode = scene .createNode ("TextureCoordinate", false);
|
|
49191
49284
|
|
|
49192
|
-
textureCoordinateNode ._mapping =
|
|
49285
|
+
textureCoordinateNode ._mapping = mapping;
|
|
49193
49286
|
textureCoordinateNode ._point = texCoord .array;
|
|
49194
49287
|
|
|
49195
49288
|
textureCoordinateNode .setup ();
|
|
49196
49289
|
|
|
49197
|
-
return texCoord
|
|
49290
|
+
return texCoord [mapping] = textureCoordinateNode;
|
|
49198
49291
|
},
|
|
49199
49292
|
createNormal: function (normal)
|
|
49200
49293
|
{
|
|
@@ -49290,7 +49383,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
49290
49383
|
interpolatorNode ._key .push (times [0] / cycleInterval);
|
|
49291
49384
|
|
|
49292
49385
|
for (let i = 1, length = times .length; i < length; ++ i)
|
|
49293
|
-
interpolatorNode ._key .push (
|
|
49386
|
+
interpolatorNode ._key .push (times [i] / cycleInterval, times [i] / cycleInterval);
|
|
49294
49387
|
|
|
49295
49388
|
// KeyValue
|
|
49296
49389
|
|
|
@@ -49364,7 +49457,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
|
|
|
49364
49457
|
interpolatorNode ._key .push (times [0] / cycleInterval);
|
|
49365
49458
|
|
|
49366
49459
|
for (let i = 1, length = times .length; i < length; ++ i)
|
|
49367
|
-
interpolatorNode ._key .push (
|
|
49460
|
+
interpolatorNode ._key .push (times [i] / cycleInterval, times [i] / cycleInterval);
|
|
49368
49461
|
|
|
49369
49462
|
// KeyValue
|
|
49370
49463
|
|
|
@@ -49496,7 +49589,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
|
|
|
49496
49589
|
x_ite_Namespace.set ("x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
|
|
49497
49590
|
/* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
|
|
49498
49591
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
|
|
49499
|
-
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(
|
|
49592
|
+
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(998);
|
|
49500
49593
|
/*******************************************************************************
|
|
49501
49594
|
*
|
|
49502
49595
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -49649,7 +49742,7 @@ const GLB2Parser_default_ = GLB2Parser;
|
|
|
49649
49742
|
x_ite_Namespace.set ("x_ite/Parser/GLB2Parser", GLB2Parser_default_);
|
|
49650
49743
|
/* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
|
|
49651
49744
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
|
|
49652
|
-
/* provided dependency */ var OBJParser_$ = __webpack_require__(
|
|
49745
|
+
/* provided dependency */ var OBJParser_$ = __webpack_require__(998);
|
|
49653
49746
|
/*******************************************************************************
|
|
49654
49747
|
*
|
|
49655
49748
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -49936,24 +50029,30 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
49936
50029
|
|
|
49937
50030
|
parser .parse ();
|
|
49938
50031
|
|
|
49939
|
-
for (const [
|
|
50032
|
+
for (const [id, material] of parser .materials)
|
|
49940
50033
|
{
|
|
49941
|
-
const
|
|
50034
|
+
const name = this .sanitizeName (id);
|
|
49942
50035
|
|
|
49943
|
-
if (
|
|
49944
|
-
|
|
50036
|
+
if (name)
|
|
50037
|
+
{
|
|
50038
|
+
scene .addNamedNode (scene .getUniqueName (name), material);
|
|
50039
|
+
scene .addExportedNode (scene .getUniqueExportName (name), material);
|
|
50040
|
+
}
|
|
49945
50041
|
|
|
49946
|
-
this .materials .set (
|
|
50042
|
+
this .materials .set (id, material);
|
|
49947
50043
|
}
|
|
49948
50044
|
|
|
49949
|
-
for (const [
|
|
50045
|
+
for (const [id, texture] of parser .textures)
|
|
49950
50046
|
{
|
|
49951
|
-
const
|
|
50047
|
+
const name = this .sanitizeName (id);
|
|
49952
50048
|
|
|
49953
|
-
if (
|
|
49954
|
-
|
|
50049
|
+
if (name)
|
|
50050
|
+
{
|
|
50051
|
+
scene .addNamedNode (scene .getUniqueName (name), texture);
|
|
50052
|
+
scene .addExportedNode (scene .getUniqueExportName (name), texture);
|
|
50053
|
+
}
|
|
49955
50054
|
|
|
49956
|
-
this .textures .set (
|
|
50055
|
+
this .textures .set (id, texture);
|
|
49957
50056
|
}
|
|
49958
50057
|
}
|
|
49959
50058
|
catch (error)
|
|
@@ -49971,10 +50070,10 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
49971
50070
|
|
|
49972
50071
|
if (OBJParser_Grammar .untilEndOfLine .parse (this))
|
|
49973
50072
|
{
|
|
49974
|
-
const
|
|
50073
|
+
const id = this .result [1];
|
|
49975
50074
|
|
|
49976
|
-
this .material = this .materials .get (
|
|
49977
|
-
this .texture = this .textures .get (
|
|
50075
|
+
this .material = this .materials .get (id) || this .defaultMaterial;
|
|
50076
|
+
this .texture = this .textures .get (id);
|
|
49978
50077
|
|
|
49979
50078
|
const smoothingGroup = this .smoothingGroups .get (this .group .getNodeName ());
|
|
49980
50079
|
|
|
@@ -49998,8 +50097,8 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
49998
50097
|
if (OBJParser_Grammar .untilEndOfLine .parse (this))
|
|
49999
50098
|
{
|
|
50000
50099
|
const
|
|
50001
|
-
scene
|
|
50002
|
-
|
|
50100
|
+
scene = this .getExecutionContext (),
|
|
50101
|
+
name = this .sanitizeName (this .result [1]);
|
|
50003
50102
|
|
|
50004
50103
|
if (this .group .children .length)
|
|
50005
50104
|
{
|
|
@@ -50010,8 +50109,11 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
50010
50109
|
scene .getRootNodes () .push (this .object);
|
|
50011
50110
|
}
|
|
50012
50111
|
|
|
50013
|
-
if (
|
|
50014
|
-
|
|
50112
|
+
if (name)
|
|
50113
|
+
{
|
|
50114
|
+
scene .addNamedNode (scene .getUniqueName (name), this .object);
|
|
50115
|
+
scene .addExportedNode (scene .getUniqueExportName (name), this .object);
|
|
50116
|
+
}
|
|
50015
50117
|
}
|
|
50016
50118
|
|
|
50017
50119
|
return true;
|
|
@@ -50030,10 +50132,10 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
50030
50132
|
if (OBJParser_Grammar .untilEndOfLine .parse (this))
|
|
50031
50133
|
{
|
|
50032
50134
|
const
|
|
50033
|
-
scene
|
|
50034
|
-
|
|
50035
|
-
|
|
50036
|
-
group
|
|
50135
|
+
scene = this .getExecutionContext (),
|
|
50136
|
+
id = this .result [1],
|
|
50137
|
+
name = this .sanitizeName (id),
|
|
50138
|
+
group = this .groups .get (id);
|
|
50037
50139
|
|
|
50038
50140
|
if (group)
|
|
50039
50141
|
{
|
|
@@ -50049,10 +50151,13 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
50049
50151
|
}
|
|
50050
50152
|
}
|
|
50051
50153
|
|
|
50052
|
-
this .groups .set (
|
|
50154
|
+
this .groups .set (id, this .group);
|
|
50053
50155
|
|
|
50054
|
-
if (
|
|
50055
|
-
|
|
50156
|
+
if (name)
|
|
50157
|
+
{
|
|
50158
|
+
scene .addNamedNode (scene .getUniqueName (name), this .group);
|
|
50159
|
+
scene .addExportedNode (scene .getUniqueExportName (name), this .group);
|
|
50160
|
+
}
|
|
50056
50161
|
|
|
50057
50162
|
this .smoothingGroup = 0;
|
|
50058
50163
|
}
|
|
@@ -50377,7 +50482,7 @@ function MaterialParser (scene, input)
|
|
|
50377
50482
|
this .materials = new Map ();
|
|
50378
50483
|
this .textures = new Map ();
|
|
50379
50484
|
this .color3 = new Numbers_Color3 ();
|
|
50380
|
-
this .
|
|
50485
|
+
this .id = "";
|
|
50381
50486
|
}
|
|
50382
50487
|
|
|
50383
50488
|
MaterialParser .prototype =
|
|
@@ -50470,15 +50575,15 @@ MaterialParser .prototype =
|
|
|
50470
50575
|
{
|
|
50471
50576
|
this .whitespacesNoLineTerminator ();
|
|
50472
50577
|
|
|
50473
|
-
this .
|
|
50578
|
+
this .id = "";
|
|
50474
50579
|
|
|
50475
50580
|
if (OBJParser_Grammar .untilEndOfLine .parse (this))
|
|
50476
50581
|
{
|
|
50477
|
-
this .
|
|
50582
|
+
this .id = this .result [1];
|
|
50478
50583
|
|
|
50479
50584
|
this .material = this .executionContext .createNode ("Material");
|
|
50480
50585
|
|
|
50481
|
-
this .materials .set (this .
|
|
50586
|
+
this .materials .set (this .id, this .material);
|
|
50482
50587
|
|
|
50483
50588
|
return true;
|
|
50484
50589
|
}
|
|
@@ -50643,7 +50748,7 @@ MaterialParser .prototype =
|
|
|
50643
50748
|
{
|
|
50644
50749
|
const string = this .result [1];
|
|
50645
50750
|
|
|
50646
|
-
if (string .length && this .
|
|
50751
|
+
if (string .length && this .id .length)
|
|
50647
50752
|
{
|
|
50648
50753
|
const paths = string .trim () .split (/\s+/);
|
|
50649
50754
|
|
|
@@ -50656,7 +50761,7 @@ MaterialParser .prototype =
|
|
|
50656
50761
|
|
|
50657
50762
|
texture .url = [path];
|
|
50658
50763
|
|
|
50659
|
-
this .textures .set (this .
|
|
50764
|
+
this .textures .set (this .id, texture);
|
|
50660
50765
|
}
|
|
50661
50766
|
}
|
|
50662
50767
|
|
|
@@ -50945,7 +51050,10 @@ STLAParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototy
|
|
|
50945
51050
|
coordinate .point = this .point;
|
|
50946
51051
|
|
|
50947
51052
|
if (name)
|
|
51053
|
+
{
|
|
50948
51054
|
scene .addNamedNode (scene .getUniqueName (name), shape);
|
|
51055
|
+
scene .addExportedNode (scene .getUniqueExportName (name), shape);
|
|
51056
|
+
}
|
|
50949
51057
|
|
|
50950
51058
|
scene .getRootNodes () .push (shape);
|
|
50951
51059
|
|
|
@@ -52087,8 +52195,8 @@ const MatrixStack_default_ = MatrixStack;
|
|
|
52087
52195
|
x_ite_Namespace.set ("standard/Math/Utility/MatrixStack", MatrixStack_default_);
|
|
52088
52196
|
/* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
|
|
52089
52197
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
|
|
52090
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
52091
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
52198
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(998);
|
|
52199
|
+
/* provided dependency */ var libtess = __webpack_require__(422);
|
|
52092
52200
|
/*******************************************************************************
|
|
52093
52201
|
*
|
|
52094
52202
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -52445,6 +52553,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52445
52553
|
// Add root Transform node.
|
|
52446
52554
|
|
|
52447
52555
|
scene .addNamedNode (scene .getUniqueName ("ViewBox"), this .rootTransform);
|
|
52556
|
+
scene .addExportedNode (scene .getUniqueExportName ("ViewBox"), this .rootTransform);
|
|
52448
52557
|
scene .getRootNodes () .push (this .rootTransform);
|
|
52449
52558
|
|
|
52450
52559
|
// Optimize scene graph.
|
|
@@ -53303,7 +53412,10 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53303
53412
|
name = this .sanitizeName (attribute);
|
|
53304
53413
|
|
|
53305
53414
|
if (name)
|
|
53415
|
+
{
|
|
53306
53416
|
scene .addNamedNode (scene .getUniqueName (name), node);
|
|
53417
|
+
scene .addExportedNode (scene .getUniqueExportName (name), node);
|
|
53418
|
+
}
|
|
53307
53419
|
},
|
|
53308
53420
|
viewBoxAttribute: function (attribute, defaultValue)
|
|
53309
53421
|
{
|
|
@@ -54853,7 +54965,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
54853
54965
|
x_ite_Namespace.set ("x_ite/Parser/SVGParser", SVGParser_default_);
|
|
54854
54966
|
/* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
|
|
54855
54967
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
|
|
54856
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
54968
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(998);
|
|
54857
54969
|
/*******************************************************************************
|
|
54858
54970
|
*
|
|
54859
54971
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -55182,7 +55294,7 @@ const Plane3_default_ = Plane3;
|
|
|
55182
55294
|
x_ite_Namespace.set ("standard/Math/Geometry/Plane3", Plane3_default_);
|
|
55183
55295
|
/* harmony default export */ const Geometry_Plane3 = (Plane3_default_);
|
|
55184
55296
|
;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
|
|
55185
|
-
/* provided dependency */ var Triangle3_libtess = __webpack_require__(
|
|
55297
|
+
/* provided dependency */ var Triangle3_libtess = __webpack_require__(422);
|
|
55186
55298
|
/*******************************************************************************
|
|
55187
55299
|
*
|
|
55188
55300
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -58359,6 +58471,7 @@ X3DRenderObject .prototype =
|
|
|
58359
58471
|
gl .depthMask (true);
|
|
58360
58472
|
gl .enable (gl .DEPTH_TEST);
|
|
58361
58473
|
gl .disable (gl .BLEND);
|
|
58474
|
+
gl .colorMask (true, true, true, false);
|
|
58362
58475
|
|
|
58363
58476
|
const opaqueShapes = this .opaqueShapes;
|
|
58364
58477
|
|
|
@@ -58380,6 +58493,7 @@ X3DRenderObject .prototype =
|
|
|
58380
58493
|
|
|
58381
58494
|
gl .depthMask (false);
|
|
58382
58495
|
gl .enable (gl .BLEND);
|
|
58496
|
+
gl .colorMask (true, true, true, true);
|
|
58383
58497
|
|
|
58384
58498
|
const transparentShapes = this .transparentShapes;
|
|
58385
58499
|
|
|
@@ -58969,8 +59083,6 @@ function X3DBindableNode (executionContext)
|
|
|
58969
59083
|
Core_X3DChildNode.call (this, executionContext);
|
|
58970
59084
|
|
|
58971
59085
|
this .addType (Base_X3DConstants.X3DBindableNode);
|
|
58972
|
-
|
|
58973
|
-
this .addChildObjects ("transitionActive", new x_ite_Fields.SFBool ());
|
|
58974
59086
|
}
|
|
58975
59087
|
|
|
58976
59088
|
X3DBindableNode .prototype = Object .assign (Object .create (Core_X3DChildNode.prototype),
|
|
@@ -59058,6 +59170,7 @@ function NavigationInfo (executionContext)
|
|
|
59058
59170
|
this .addType (Base_X3DConstants.NavigationInfo);
|
|
59059
59171
|
|
|
59060
59172
|
this .addChildObjects ("transitionStart", new x_ite_Fields.SFBool (),
|
|
59173
|
+
"transitionActive", new x_ite_Fields.SFBool (),
|
|
59061
59174
|
"availableViewers", new x_ite_Fields.MFString (),
|
|
59062
59175
|
"viewer", new x_ite_Fields.SFString ("EXAMINE"));
|
|
59063
59176
|
|
|
@@ -59971,7 +60084,7 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
|
|
|
59971
60084
|
this .backFace = new Map ([[gl .CCW, gl .CW], [gl .CW, gl .CCW]]);
|
|
59972
60085
|
this .attribBuffers = [ ];
|
|
59973
60086
|
this .textureCoordinateNode = browser .getDefaultTextureCoordinate ();
|
|
59974
|
-
this .texCoordBuffers = Array .from ({length: browser .
|
|
60087
|
+
this .texCoordBuffers = Array .from ({length: browser .getMaxTexCoords ()}, () => gl .createBuffer ());
|
|
59975
60088
|
this .fogDepthBuffer = gl .createBuffer ();
|
|
59976
60089
|
this .colorBuffer = gl .createBuffer ();
|
|
59977
60090
|
this .normalBuffer = gl .createBuffer ();
|
|
@@ -60623,16 +60736,6 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
|
|
|
60623
60736
|
if (this .multiTexCoords .length === 0)
|
|
60624
60737
|
this .buildTexCoords ();
|
|
60625
60738
|
|
|
60626
|
-
if (this .multiTexCoords .length)
|
|
60627
|
-
{
|
|
60628
|
-
const maxTextures = this .getBrowser () .getMaxTextures ();
|
|
60629
|
-
|
|
60630
|
-
for (let i = this .multiTexCoords .length; i < maxTextures; ++ i)
|
|
60631
|
-
this .multiTexCoords [i] = this .multiTexCoords .at (-1);
|
|
60632
|
-
|
|
60633
|
-
this .multiTexCoords .length = maxTextures;
|
|
60634
|
-
}
|
|
60635
|
-
|
|
60636
60739
|
// Transfer arrays and update.
|
|
60637
60740
|
|
|
60638
60741
|
this .transfer ();
|
|
@@ -60812,8 +60915,7 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
|
|
|
60812
60915
|
attribBuffers = this .attribBuffers,
|
|
60813
60916
|
primitiveMode = browser .getPrimitiveMode (this .primitiveMode);
|
|
60814
60917
|
|
|
60815
|
-
|
|
60816
|
-
blendModeNode .enable (gl);
|
|
60918
|
+
blendModeNode?.enable (gl);
|
|
60817
60919
|
|
|
60818
60920
|
shaderNode .enable (gl);
|
|
60819
60921
|
shaderNode .setUniforms (gl, this, renderContext, front);
|
|
@@ -60884,8 +60986,7 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
|
|
|
60884
60986
|
}
|
|
60885
60987
|
}
|
|
60886
60988
|
|
|
60887
|
-
|
|
60888
|
-
blendModeNode .disable (gl);
|
|
60989
|
+
blendModeNode?.disable (gl);
|
|
60889
60990
|
},
|
|
60890
60991
|
displaySimpleParticles: function (gl, shaderNode, particleSystem)
|
|
60891
60992
|
{
|
|
@@ -60933,8 +61034,7 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
|
|
|
60933
61034
|
attribBuffers = this .attribBuffers,
|
|
60934
61035
|
primitiveMode = browser .getPrimitiveMode (this .primitiveMode);
|
|
60935
61036
|
|
|
60936
|
-
|
|
60937
|
-
blendModeNode .enable (gl);
|
|
61037
|
+
blendModeNode?.enable (gl);
|
|
60938
61038
|
|
|
60939
61039
|
// Setup shader.
|
|
60940
61040
|
|
|
@@ -61004,8 +61104,7 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
|
|
|
61004
61104
|
gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
|
|
61005
61105
|
}
|
|
61006
61106
|
|
|
61007
|
-
|
|
61008
|
-
blendModeNode .disable (gl);
|
|
61107
|
+
blendModeNode?.disable (gl);
|
|
61009
61108
|
},
|
|
61010
61109
|
});
|
|
61011
61110
|
|
|
@@ -62423,7 +62522,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
62423
62522
|
x_ite_Namespace.set ("x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
|
|
62424
62523
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
|
|
62425
62524
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
62426
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
62525
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(998);
|
|
62427
62526
|
/*******************************************************************************
|
|
62428
62527
|
*
|
|
62429
62528
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -62488,7 +62587,6 @@ function ImageTexture (executionContext)
|
|
|
62488
62587
|
this .addType (Base_X3DConstants.ImageTexture);
|
|
62489
62588
|
|
|
62490
62589
|
this .image = ImageTexture_$("<img></img>");
|
|
62491
|
-
this .canvas = ImageTexture_$("<canvas></canvas>");
|
|
62492
62590
|
this .urlStack = new x_ite_Fields.MFString ();
|
|
62493
62591
|
}
|
|
62494
62592
|
|
|
@@ -62574,7 +62672,7 @@ ImageTexture .prototype = Object .assign (Object .create (Texturing_X3DTexture2D
|
|
|
62574
62672
|
|
|
62575
62673
|
this .loadNext ();
|
|
62576
62674
|
},
|
|
62577
|
-
setImage: function ()
|
|
62675
|
+
setImage: async function ()
|
|
62578
62676
|
{
|
|
62579
62677
|
if (DEBUG)
|
|
62580
62678
|
{
|
|
@@ -62585,45 +62683,21 @@ ImageTexture .prototype = Object .assign (Object .create (Texturing_X3DTexture2D
|
|
|
62585
62683
|
try
|
|
62586
62684
|
{
|
|
62587
62685
|
const
|
|
62588
|
-
gl
|
|
62589
|
-
image
|
|
62590
|
-
canvas = this .canvas [0],
|
|
62591
|
-
cx = canvas .getContext ("2d", { willReadFrequently: true });
|
|
62592
|
-
|
|
62593
|
-
let
|
|
62594
|
-
width = image .width,
|
|
62595
|
-
height = image .height;
|
|
62686
|
+
gl = this .getBrowser () .getContext (),
|
|
62687
|
+
image = this .image [0];
|
|
62596
62688
|
|
|
62597
62689
|
// https://developer.mozilla.org/en-US/docs/Web/API/createImageBitmap
|
|
62598
62690
|
// createImageBitmap
|
|
62599
62691
|
|
|
62600
|
-
|
|
62601
|
-
|
|
62602
|
-
if (gl .getVersion () >= 2 || (Algorithm.isPowerOfTwo (width) && Algorithm.isPowerOfTwo (height)))
|
|
62603
|
-
{
|
|
62604
|
-
// Flip Y
|
|
62605
|
-
|
|
62606
|
-
canvas .width = width;
|
|
62607
|
-
canvas .height = height;
|
|
62608
|
-
|
|
62609
|
-
cx .clearRect (0, 0, width, height);
|
|
62610
|
-
cx .save ();
|
|
62611
|
-
|
|
62612
|
-
if (!this ._flipVertically .getValue ())
|
|
62613
|
-
{
|
|
62614
|
-
cx .translate (0, height);
|
|
62615
|
-
cx .scale (1, -1);
|
|
62616
|
-
}
|
|
62617
|
-
|
|
62618
|
-
cx .drawImage (image, 0, 0);
|
|
62619
|
-
cx .restore ();
|
|
62620
|
-
}
|
|
62621
|
-
else
|
|
62692
|
+
if (gl .getVersion () === 1 && !(Algorithm.isPowerOfTwo (image .width) && Algorithm.isPowerOfTwo (image .height)))
|
|
62622
62693
|
{
|
|
62623
|
-
|
|
62694
|
+
const
|
|
62695
|
+
canvas = document .createElement ("canvas"),
|
|
62696
|
+
cx = canvas .getContext ("2d", { willReadFrequently: true }),
|
|
62697
|
+
width = Algorithm.nextPowerOfTwo (image .width),
|
|
62698
|
+
height = Algorithm.nextPowerOfTwo (image .height);
|
|
62624
62699
|
|
|
62625
|
-
|
|
62626
|
-
height = Algorithm.nextPowerOfTwo (height);
|
|
62700
|
+
// Flip Y and scale image to next power of two if needed.
|
|
62627
62701
|
|
|
62628
62702
|
canvas .width = width;
|
|
62629
62703
|
canvas .height = height;
|
|
@@ -62639,25 +62713,31 @@ ImageTexture .prototype = Object .assign (Object .create (Texturing_X3DTexture2D
|
|
|
62639
62713
|
|
|
62640
62714
|
cx .drawImage (image, 0, 0, image .width, image .height, 0, 0, width, height);
|
|
62641
62715
|
cx .restore ();
|
|
62642
|
-
}
|
|
62643
62716
|
|
|
62644
|
-
|
|
62717
|
+
// Determine image alpha.
|
|
62645
62718
|
|
|
62646
|
-
|
|
62719
|
+
const
|
|
62720
|
+
data = cx .getImageData (0, 0, width, height, { premultipliedAlpha: false }) .data,
|
|
62721
|
+
transparent = this .isImageTransparent (data);
|
|
62647
62722
|
|
|
62648
|
-
|
|
62723
|
+
// Upload image to GPU.
|
|
62649
62724
|
|
|
62650
|
-
|
|
62651
|
-
|
|
62652
|
-
if (data [i] !== 255)
|
|
62653
|
-
{
|
|
62654
|
-
transparent = true;
|
|
62655
|
-
break;
|
|
62656
|
-
}
|
|
62725
|
+
this .setTexture (width, height, transparent, data, false);
|
|
62726
|
+
this .setLoadState (Base_X3DConstants.COMPLETE_STATE);
|
|
62657
62727
|
}
|
|
62728
|
+
else
|
|
62729
|
+
{
|
|
62730
|
+
const
|
|
62731
|
+
data = await this .getImageData (image),
|
|
62732
|
+
transparent = this .isImageTransparent (data),
|
|
62733
|
+
width = image .width,
|
|
62734
|
+
height = image .height;
|
|
62658
62735
|
|
|
62659
|
-
|
|
62660
|
-
|
|
62736
|
+
// Upload image to GPU.
|
|
62737
|
+
|
|
62738
|
+
this .setTexture (width, height, transparent, data, !this ._flipVertically .getValue ());
|
|
62739
|
+
this .setLoadState (Base_X3DConstants.COMPLETE_STATE);
|
|
62740
|
+
}
|
|
62661
62741
|
}
|
|
62662
62742
|
catch (error)
|
|
62663
62743
|
{
|
|
@@ -62665,6 +62745,54 @@ ImageTexture .prototype = Object .assign (Object .create (Texturing_X3DTexture2D
|
|
|
62665
62745
|
this .setError ({ type: error .message });
|
|
62666
62746
|
}
|
|
62667
62747
|
},
|
|
62748
|
+
getImageData: async function (image)
|
|
62749
|
+
{
|
|
62750
|
+
const
|
|
62751
|
+
gl = this .getBrowser () .getContext (),
|
|
62752
|
+
framebuffer = gl .createFramebuffer (),
|
|
62753
|
+
texture = gl .createTexture (),
|
|
62754
|
+
data = new Uint8Array (image .width * image .height * 4);
|
|
62755
|
+
|
|
62756
|
+
gl .bindFramebuffer (gl.FRAMEBUFFER, framebuffer);
|
|
62757
|
+
gl .bindTexture (gl.TEXTURE_2D, texture);
|
|
62758
|
+
gl .framebufferTexture2D (gl.FRAMEBUFFER, gl .COLOR_ATTACHMENT0, gl .TEXTURE_2D, texture, 0);
|
|
62759
|
+
gl .texImage2D (gl .TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
|
|
62760
|
+
await gl .readPixelsAsync (0, 0, image .width, image .height, gl.RGBA, gl.UNSIGNED_BYTE, data);
|
|
62761
|
+
gl .deleteFramebuffer (framebuffer);
|
|
62762
|
+
gl .deleteTexture (texture);
|
|
62763
|
+
|
|
62764
|
+
return data;
|
|
62765
|
+
},
|
|
62766
|
+
isImageTransparent: function (data)
|
|
62767
|
+
{
|
|
62768
|
+
for (let i = 3, length = data .length; i < length; i += 4)
|
|
62769
|
+
{
|
|
62770
|
+
if (data [i] !== 255)
|
|
62771
|
+
return true;
|
|
62772
|
+
}
|
|
62773
|
+
|
|
62774
|
+
return false;
|
|
62775
|
+
},
|
|
62776
|
+
flipImage (data, width, height, components)
|
|
62777
|
+
{
|
|
62778
|
+
const
|
|
62779
|
+
height1_2 = height >> 1,
|
|
62780
|
+
bytesPerRow = width * components,
|
|
62781
|
+
tmp = new Uint8Array (bytesPerRow);
|
|
62782
|
+
|
|
62783
|
+
for (let y = 0; y < height1_2; ++ y)
|
|
62784
|
+
{
|
|
62785
|
+
const
|
|
62786
|
+
top = y * bytesPerRow,
|
|
62787
|
+
bottom = (height - y - 1) * bytesPerRow;
|
|
62788
|
+
|
|
62789
|
+
tmp .set (data .subarray (top, top + bytesPerRow));
|
|
62790
|
+
data .copyWithin (top, bottom, bottom + bytesPerRow);
|
|
62791
|
+
data .set (tmp, bottom);
|
|
62792
|
+
}
|
|
62793
|
+
|
|
62794
|
+
return data;
|
|
62795
|
+
},
|
|
62668
62796
|
dispose: function ()
|
|
62669
62797
|
{
|
|
62670
62798
|
Networking_X3DUrlObject.prototype.dispose.call (this);
|
|
@@ -63050,13 +63178,17 @@ X3DLayerNode .prototype = Object .assign (Object .create (Core_X3DNode.prototype
|
|
|
63050
63178
|
{
|
|
63051
63179
|
return this .collisionTime;
|
|
63052
63180
|
},
|
|
63053
|
-
|
|
63181
|
+
viewAll: function (factor = 1, straighten = false)
|
|
63054
63182
|
{
|
|
63055
63183
|
const
|
|
63056
63184
|
viewpointNode = this .getViewpoint (),
|
|
63057
63185
|
bbox = this .getBBox (new Geometry_Box3 ()) .multRight (Numbers_Matrix4.inverse (viewpointNode .getModelMatrix ()));
|
|
63058
63186
|
|
|
63059
|
-
|
|
63187
|
+
viewpointNode .lookAt (this, bbox .center, viewpointNode .getLookAtDistance (bbox), factor, straighten);
|
|
63188
|
+
},
|
|
63189
|
+
straightenView: function ()
|
|
63190
|
+
{
|
|
63191
|
+
this .getViewpoint () .straightenView (this);
|
|
63060
63192
|
},
|
|
63061
63193
|
set_viewport__: function ()
|
|
63062
63194
|
{
|
|
@@ -64603,7 +64735,6 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
|
|
|
64603
64735
|
this .scaleOrientationInterpolator .setup ();
|
|
64604
64736
|
this .fieldOfViewScaleInterpolator .setup ();
|
|
64605
64737
|
|
|
64606
|
-
this .timeSensor ._isActive .addFieldInterest (this ._transitionActive);
|
|
64607
64738
|
this .timeSensor ._fraction_changed .addFieldInterest (this .easeInEaseOut ._set_fraction);
|
|
64608
64739
|
|
|
64609
64740
|
this .easeInEaseOut ._modifiedFraction_changed .addFieldInterest (this .positionInterpolator ._set_fraction);
|
|
@@ -64671,10 +64802,18 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
|
|
|
64671
64802
|
},
|
|
64672
64803
|
set_active__: function (navigationInfoNode, active)
|
|
64673
64804
|
{
|
|
64674
|
-
if (
|
|
64675
|
-
|
|
64676
|
-
|
|
64677
|
-
|
|
64805
|
+
if (active .getValue ())
|
|
64806
|
+
return;
|
|
64807
|
+
|
|
64808
|
+
this .timeSensor ._isActive .removeInterest ("set_active__", this);
|
|
64809
|
+
|
|
64810
|
+
if (!this ._isBound .getValue ())
|
|
64811
|
+
return;
|
|
64812
|
+
|
|
64813
|
+
if (this .timeSensor ._fraction_changed .getValue () !== 1)
|
|
64814
|
+
return;
|
|
64815
|
+
|
|
64816
|
+
navigationInfoNode ._transitionComplete = true;
|
|
64678
64817
|
},
|
|
64679
64818
|
setInterpolators: function () { },
|
|
64680
64819
|
getPosition: function ()
|
|
@@ -64757,6 +64896,11 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
|
|
|
64757
64896
|
if (this ._viewAll .getValue ())
|
|
64758
64897
|
this .viewAll (layerNode .getBBox (new Geometry_Box3 ()));
|
|
64759
64898
|
|
|
64899
|
+
if (this .getBrowser () .getBrowserOption ("StraightenHorizon"))
|
|
64900
|
+
{
|
|
64901
|
+
this ._orientationOffset = this .straightenHorizon (this .getUserOrientation ()) .multLeft (this .getOrientation () .copy () .inverse ());
|
|
64902
|
+
}
|
|
64903
|
+
|
|
64760
64904
|
// Handle NavigationInfo.
|
|
64761
64905
|
|
|
64762
64906
|
const
|
|
@@ -64805,7 +64949,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
|
|
|
64805
64949
|
}
|
|
64806
64950
|
}
|
|
64807
64951
|
|
|
64808
|
-
|
|
64952
|
+
navigationInfoNode ._transitionStart = true;
|
|
64809
64953
|
|
|
64810
64954
|
this .timeSensor ._cycleInterval = transitionTime;
|
|
64811
64955
|
this .timeSensor ._stopTime = this .getBrowser () .getCurrentTime ();
|
|
@@ -64824,11 +64968,13 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
|
|
|
64824
64968
|
this ._scaleOrientationOffset = relative .scaleOrientation;
|
|
64825
64969
|
|
|
64826
64970
|
this .setInterpolators (fromViewpointNode, relative);
|
|
64827
|
-
|
|
64828
|
-
this ._transitionActive = true;
|
|
64829
64971
|
}
|
|
64830
64972
|
else
|
|
64831
64973
|
{
|
|
64974
|
+
const navigationInfoNode = layerNode .getNavigationInfo ();
|
|
64975
|
+
|
|
64976
|
+
navigationInfoNode ._transitionComplete = true;
|
|
64977
|
+
|
|
64832
64978
|
const relative = this .getRelativeTransformation (fromViewpointNode);
|
|
64833
64979
|
|
|
64834
64980
|
this ._positionOffset = relative .position;
|
|
@@ -64853,6 +64999,11 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
|
|
|
64853
64999
|
this ._centerOfRotationOffset = Numbers_Vector3.Zero;
|
|
64854
65000
|
this ._fieldOfViewScale = 1;
|
|
64855
65001
|
|
|
65002
|
+
if (this .getBrowser () .getBrowserOption ("StraightenHorizon"))
|
|
65003
|
+
{
|
|
65004
|
+
this ._orientationOffset = this .straightenHorizon (this .getUserOrientation ()) .multLeft (this .getOrientation () .copy () .inverse ());
|
|
65005
|
+
}
|
|
65006
|
+
|
|
64856
65007
|
this .set_nearDistance__ ();
|
|
64857
65008
|
this .set_farDistance__ ();
|
|
64858
65009
|
},
|
|
@@ -64898,7 +65049,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
|
|
|
64898
65049
|
x .assign (up) .cross (z) .normalize ();
|
|
64899
65050
|
y .assign (z) .cross (x) .normalize ();
|
|
64900
65051
|
|
|
64901
|
-
m .set (
|
|
65052
|
+
m .set (... x, ... y, ... z);
|
|
64902
65053
|
r .setMatrix (m);
|
|
64903
65054
|
|
|
64904
65055
|
return r;
|
|
@@ -64927,14 +65078,10 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
|
|
|
64927
65078
|
const
|
|
64928
65079
|
offset = point .copy () .add (this .getUserOrientation () .multVecRot (new Numbers_Vector3 (0, 0, distance))) .subtract (this .getPosition ());
|
|
64929
65080
|
|
|
64930
|
-
|
|
64931
|
-
|
|
64932
|
-
this .timeSensor ._cycleInterval = 0.2;
|
|
65081
|
+
this .timeSensor ._cycleInterval = 1;
|
|
64933
65082
|
this .timeSensor ._stopTime = this .getBrowser () .getCurrentTime ();
|
|
64934
65083
|
this .timeSensor ._startTime = this .getBrowser () .getCurrentTime ();
|
|
64935
65084
|
|
|
64936
|
-
this .timeSensor ._isActive .addInterest ("set_active__", this, layerNode .getNavigationInfo ());
|
|
64937
|
-
|
|
64938
65085
|
this .easeInEaseOut ._easeInEaseOut = new x_ite_Fields.MFVec2f (new x_ite_Fields.SFVec2f (0, 1), new x_ite_Fields.SFVec2f (1, 0));
|
|
64939
65086
|
|
|
64940
65087
|
const
|
|
@@ -64957,19 +65104,17 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
|
|
|
64957
65104
|
|
|
64958
65105
|
this ._fieldOfViewScale = 1;
|
|
64959
65106
|
this ._centerOfRotationOffset = Numbers_Vector3.subtract (point, this .getCenterOfRotation ());
|
|
65107
|
+
this .nearDistance = Math .min (distance / 2, 0.125);
|
|
65108
|
+
this .farDistance = this .nearDistance * this .getMaxFarValue () / 0.125;
|
|
64960
65109
|
|
|
64961
65110
|
this .setInterpolators (this, relative);
|
|
64962
65111
|
},
|
|
64963
|
-
|
|
65112
|
+
straightenView: function (layerNode)
|
|
64964
65113
|
{
|
|
64965
|
-
|
|
64966
|
-
|
|
64967
|
-
this .timeSensor ._cycleInterval = 0.4;
|
|
65114
|
+
this .timeSensor ._cycleInterval = 1;
|
|
64968
65115
|
this .timeSensor ._stopTime = this .getBrowser () .getCurrentTime ();
|
|
64969
65116
|
this .timeSensor ._startTime = this .getBrowser () .getCurrentTime ();
|
|
64970
65117
|
|
|
64971
|
-
this .timeSensor ._isActive .addInterest ("set_active__", this, layerNode .getNavigationInfo ());
|
|
64972
|
-
|
|
64973
65118
|
this .easeInEaseOut ._easeInEaseOut = new x_ite_Fields.MFVec2f (new x_ite_Fields.SFVec2f (0, 1), new x_ite_Fields.SFVec2f (1, 0));
|
|
64974
65119
|
|
|
64975
65120
|
const rotation = Numbers_Rotation4.multRight (Numbers_Rotation4.inverse (this .getOrientation ()), this .straightenHorizon (this .getUserOrientation ()));
|
|
@@ -64992,7 +65137,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
|
|
|
64992
65137
|
localZAxis = new Numbers_Vector3 (0, 0, 0),
|
|
64993
65138
|
rotation = new Numbers_Rotation4 (0, 0, 1, 0);
|
|
64994
65139
|
|
|
64995
|
-
return function (orientation, upVector = this .getUpVector ())
|
|
65140
|
+
return function (orientation, upVector = this .getUpVector (true))
|
|
64996
65141
|
{
|
|
64997
65142
|
orientation .multVecRot (localXAxis .assign (Numbers_Vector3.xAxis) .negate ());
|
|
64998
65143
|
orientation .multVecRot (localZAxis .assign (Numbers_Vector3.zAxis));
|
|
@@ -66678,7 +66823,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
66678
66823
|
x_ite_Namespace.set ("x_ite/Execution/X3DWorld", X3DWorld_default_);
|
|
66679
66824
|
/* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
|
|
66680
66825
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
|
|
66681
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
66826
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(998);
|
|
66682
66827
|
/*******************************************************************************
|
|
66683
66828
|
*
|
|
66684
66829
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -66813,7 +66958,7 @@ FileLoader .prototype = Object .assign (Object .create (Base_X3DObject.prototype
|
|
|
66813
66958
|
else
|
|
66814
66959
|
scene .setExecutionContext (this .executionContext);
|
|
66815
66960
|
|
|
66816
|
-
scene .setWorldURL (
|
|
66961
|
+
scene .setWorldURL (new URL (worldURL, this .getReferer ()) .href);
|
|
66817
66962
|
|
|
66818
66963
|
if (success)
|
|
66819
66964
|
success = this .setScene .bind (this, scene, success, error);
|
|
@@ -68136,9 +68281,9 @@ X3DExecutionContext .prototype = Object .assign (Object .create (Base_X3DBaseNod
|
|
|
68136
68281
|
{
|
|
68137
68282
|
return this [_namedNodes];
|
|
68138
68283
|
},
|
|
68139
|
-
getUniqueName: function (name
|
|
68284
|
+
getUniqueName: function (name)
|
|
68140
68285
|
{
|
|
68141
|
-
return getUniqueName
|
|
68286
|
+
return getUniqueName (this [_namedNodes], name);
|
|
68142
68287
|
},
|
|
68143
68288
|
addImportedNode: function (inlineNode, exportedName, importedName)
|
|
68144
68289
|
{
|
|
@@ -68319,9 +68464,9 @@ X3DExecutionContext .prototype = Object .assign (Object .create (Base_X3DBaseNod
|
|
|
68319
68464
|
{
|
|
68320
68465
|
return this [_protos];
|
|
68321
68466
|
},
|
|
68322
|
-
getUniqueProtoName: function (name
|
|
68467
|
+
getUniqueProtoName: function (name)
|
|
68323
68468
|
{
|
|
68324
|
-
return getUniqueName
|
|
68469
|
+
return getUniqueName (this [_protos], name);
|
|
68325
68470
|
},
|
|
68326
68471
|
getExternProtoDeclaration: function (name)
|
|
68327
68472
|
{
|
|
@@ -68383,9 +68528,9 @@ X3DExecutionContext .prototype = Object .assign (Object .create (Base_X3DBaseNod
|
|
|
68383
68528
|
{
|
|
68384
68529
|
return this [_externprotos];
|
|
68385
68530
|
},
|
|
68386
|
-
getUniqueExternProtoName: function (name
|
|
68531
|
+
getUniqueExternProtoName: function (name)
|
|
68387
68532
|
{
|
|
68388
|
-
return getUniqueName
|
|
68533
|
+
return getUniqueName (this [_externprotos], name);
|
|
68389
68534
|
},
|
|
68390
68535
|
addRoute: function (sourceNode, sourceField, destinationNode, destinationField)
|
|
68391
68536
|
{
|
|
@@ -68772,36 +68917,6 @@ X3DExecutionContext .prototype = Object .assign (Object .create (Base_X3DBaseNod
|
|
|
68772
68917
|
},
|
|
68773
68918
|
});
|
|
68774
68919
|
|
|
68775
|
-
const getUniqueName = (function ()
|
|
68776
|
-
{
|
|
68777
|
-
const _TrailingNumbers = /_\d+$/;
|
|
68778
|
-
|
|
68779
|
-
return function (array, name = "")
|
|
68780
|
-
{
|
|
68781
|
-
name = String (name) .replace (_TrailingNumbers, "");
|
|
68782
|
-
|
|
68783
|
-
let
|
|
68784
|
-
newName = name,
|
|
68785
|
-
i = 64;
|
|
68786
|
-
|
|
68787
|
-
for (; i;)
|
|
68788
|
-
{
|
|
68789
|
-
if (! (this [array] .has (newName) || newName .length === 0))
|
|
68790
|
-
break;
|
|
68791
|
-
|
|
68792
|
-
const
|
|
68793
|
-
min = i,
|
|
68794
|
-
max = i <<= 1;
|
|
68795
|
-
|
|
68796
|
-
newName = name;
|
|
68797
|
-
newName += '_';
|
|
68798
|
-
newName += Math .round (Algorithm.random (min, max));
|
|
68799
|
-
}
|
|
68800
|
-
|
|
68801
|
-
return newName;
|
|
68802
|
-
};
|
|
68803
|
-
})();
|
|
68804
|
-
|
|
68805
68920
|
for (const key of Reflect .ownKeys (X3DExecutionContext .prototype))
|
|
68806
68921
|
Object .defineProperty (X3DExecutionContext .prototype, key, { enumerable: false });
|
|
68807
68922
|
|
|
@@ -68882,7 +68997,7 @@ const X3DExecutionContext_default_ = X3DExecutionContext;
|
|
|
68882
68997
|
x_ite_Namespace.set ("x_ite/Execution/X3DExecutionContext", X3DExecutionContext_default_);
|
|
68883
68998
|
/* harmony default export */ const Execution_X3DExecutionContext = (X3DExecutionContext_default_);
|
|
68884
68999
|
;// CONCATENATED MODULE: ./src/x_ite/Configuration/ComponentInfo.js
|
|
68885
|
-
/* provided dependency */ var ComponentInfo_$ = __webpack_require__(
|
|
69000
|
+
/* provided dependency */ var ComponentInfo_$ = __webpack_require__(998);
|
|
68886
69001
|
/*******************************************************************************
|
|
68887
69002
|
*
|
|
68888
69003
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -69575,77 +69690,78 @@ x_ite_Namespace.set ("x_ite/Execution/X3DExportedNode", X3DExportedNode_default_
|
|
|
69575
69690
|
|
|
69576
69691
|
|
|
69577
69692
|
|
|
69578
|
-
function ExportedNodesArray (array)
|
|
69579
|
-
{
|
|
69580
|
-
return Base_X3DInfoArray.call (this, array);
|
|
69581
|
-
}
|
|
69582
|
-
|
|
69583
|
-
ExportedNodesArray .prototype = Object .assign (Object .create (Base_X3DInfoArray.prototype),
|
|
69584
|
-
{
|
|
69585
|
-
constructor: ExportedNodesArray,
|
|
69586
|
-
getTypeName: function ()
|
|
69587
|
-
{
|
|
69588
|
-
return "ExportedNodesArray";
|
|
69589
|
-
},
|
|
69590
|
-
});
|
|
69591
|
-
|
|
69592
|
-
for (const key of Reflect .ownKeys (ExportedNodesArray .prototype))
|
|
69593
|
-
Object .defineProperty (ExportedNodesArray .prototype, key, { enumerable: false });
|
|
69594
|
-
|
|
69595
|
-
const ExportedNodesArray_default_ = ExportedNodesArray;
|
|
69596
|
-
;
|
|
69597
|
-
|
|
69598
|
-
x_ite_Namespace.set ("x_ite/Execution/ExportedNodesArray", ExportedNodesArray_default_);
|
|
69599
|
-
/* harmony default export */ const Execution_ExportedNodesArray = (ExportedNodesArray_default_);
|
|
69600
|
-
;// CONCATENATED MODULE: ./src/x_ite/Execution/X3DScene.js
|
|
69601
|
-
/*******************************************************************************
|
|
69602
|
-
*
|
|
69603
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
69604
|
-
*
|
|
69605
|
-
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
69606
|
-
*
|
|
69607
|
-
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
69608
|
-
*
|
|
69609
|
-
* The copyright notice above does not evidence any actual of intended
|
|
69610
|
-
* publication of such source code, and is an unpublished work by create3000.
|
|
69611
|
-
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
69612
|
-
* create3000.
|
|
69613
|
-
*
|
|
69614
|
-
* No permission is granted to copy, distribute, or create derivative works from
|
|
69615
|
-
* the contents of this software, in whole or in part, without the prior written
|
|
69616
|
-
* permission of create3000.
|
|
69617
|
-
*
|
|
69618
|
-
* NON-MILITARY USE ONLY
|
|
69619
|
-
*
|
|
69620
|
-
* All create3000 software are effectively free software with a non-military use
|
|
69621
|
-
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
69622
|
-
* source in any way you please with the exception anything that uses it must be
|
|
69623
|
-
* marked to indicate is contains 'non-military use only' components.
|
|
69624
|
-
*
|
|
69625
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
69626
|
-
*
|
|
69627
|
-
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
69628
|
-
*
|
|
69629
|
-
* This file is part of the X_ITE Project.
|
|
69630
|
-
*
|
|
69631
|
-
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
69632
|
-
* terms of the GNU General Public License version 3 only, as published by the
|
|
69633
|
-
* Free Software Foundation.
|
|
69634
|
-
*
|
|
69635
|
-
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
69636
|
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
69637
|
-
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
69638
|
-
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
69639
|
-
*
|
|
69640
|
-
* You should have received a copy of the GNU General Public License version 3
|
|
69641
|
-
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
69642
|
-
* copy of the GPLv3 License.
|
|
69643
|
-
*
|
|
69644
|
-
* For Silvio, Joy and Adi.
|
|
69645
|
-
*
|
|
69646
|
-
******************************************************************************/
|
|
69647
|
-
|
|
69648
|
-
|
|
69693
|
+
function ExportedNodesArray (array)
|
|
69694
|
+
{
|
|
69695
|
+
return Base_X3DInfoArray.call (this, array);
|
|
69696
|
+
}
|
|
69697
|
+
|
|
69698
|
+
ExportedNodesArray .prototype = Object .assign (Object .create (Base_X3DInfoArray.prototype),
|
|
69699
|
+
{
|
|
69700
|
+
constructor: ExportedNodesArray,
|
|
69701
|
+
getTypeName: function ()
|
|
69702
|
+
{
|
|
69703
|
+
return "ExportedNodesArray";
|
|
69704
|
+
},
|
|
69705
|
+
});
|
|
69706
|
+
|
|
69707
|
+
for (const key of Reflect .ownKeys (ExportedNodesArray .prototype))
|
|
69708
|
+
Object .defineProperty (ExportedNodesArray .prototype, key, { enumerable: false });
|
|
69709
|
+
|
|
69710
|
+
const ExportedNodesArray_default_ = ExportedNodesArray;
|
|
69711
|
+
;
|
|
69712
|
+
|
|
69713
|
+
x_ite_Namespace.set ("x_ite/Execution/ExportedNodesArray", ExportedNodesArray_default_);
|
|
69714
|
+
/* harmony default export */ const Execution_ExportedNodesArray = (ExportedNodesArray_default_);
|
|
69715
|
+
;// CONCATENATED MODULE: ./src/x_ite/Execution/X3DScene.js
|
|
69716
|
+
/*******************************************************************************
|
|
69717
|
+
*
|
|
69718
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
69719
|
+
*
|
|
69720
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
69721
|
+
*
|
|
69722
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
69723
|
+
*
|
|
69724
|
+
* The copyright notice above does not evidence any actual of intended
|
|
69725
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
69726
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
69727
|
+
* create3000.
|
|
69728
|
+
*
|
|
69729
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
69730
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
69731
|
+
* permission of create3000.
|
|
69732
|
+
*
|
|
69733
|
+
* NON-MILITARY USE ONLY
|
|
69734
|
+
*
|
|
69735
|
+
* All create3000 software are effectively free software with a non-military use
|
|
69736
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
69737
|
+
* source in any way you please with the exception anything that uses it must be
|
|
69738
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
69739
|
+
*
|
|
69740
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
69741
|
+
*
|
|
69742
|
+
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
69743
|
+
*
|
|
69744
|
+
* This file is part of the X_ITE Project.
|
|
69745
|
+
*
|
|
69746
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
69747
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
69748
|
+
* Free Software Foundation.
|
|
69749
|
+
*
|
|
69750
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
69751
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
69752
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
69753
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
69754
|
+
*
|
|
69755
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
69756
|
+
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
69757
|
+
* copy of the GPLv3 License.
|
|
69758
|
+
*
|
|
69759
|
+
* For Silvio, Joy and Adi.
|
|
69760
|
+
*
|
|
69761
|
+
******************************************************************************/
|
|
69762
|
+
|
|
69763
|
+
|
|
69764
|
+
|
|
69649
69765
|
|
|
69650
69766
|
|
|
69651
69767
|
|
|
@@ -69957,6 +70073,10 @@ X3DScene .prototype = Object .assign (Object .create (Execution_X3DExecutionCont
|
|
|
69957
70073
|
{
|
|
69958
70074
|
return this [_exportedNodes];
|
|
69959
70075
|
},
|
|
70076
|
+
getUniqueExportName: function (name)
|
|
70077
|
+
{
|
|
70078
|
+
return getUniqueName (this [_exportedNodes], name);
|
|
70079
|
+
},
|
|
69960
70080
|
addRootNode: function (node)
|
|
69961
70081
|
{
|
|
69962
70082
|
node = Fields_SFNodeCache.get (Base_X3DCast (Base_X3DConstants.X3DNode, node, false));
|
|
@@ -70848,7 +70968,7 @@ const DataStorage_default_ = DataStorage;
|
|
|
70848
70968
|
x_ite_Namespace.set ("standard/Utility/DataStorage", DataStorage_default_);
|
|
70849
70969
|
/* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
|
|
70850
70970
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
70851
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
70971
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(998);
|
|
70852
70972
|
/*******************************************************************************
|
|
70853
70973
|
*
|
|
70854
70974
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -73147,15 +73267,9 @@ X3DSingleTextureCoordinateNode .prototype = Object .assign (Object .create (Text
|
|
|
73147
73267
|
},
|
|
73148
73268
|
getTextureCoordinateMapping: function (textureCoordinateMapping, channel = 0)
|
|
73149
73269
|
{
|
|
73150
|
-
|
|
73151
|
-
textureCoordinateMapping .set (this ._mapping .getValue (), channel);
|
|
73270
|
+
textureCoordinateMapping .set (this ._mapping .getValue () || channel, channel);
|
|
73152
73271
|
},
|
|
73153
|
-
setShaderUniforms: function (gl, shaderObject)
|
|
73154
|
-
{
|
|
73155
|
-
for (let i = 0, length = shaderObject .x3d_MaxTextures; i < length; ++ i)
|
|
73156
|
-
this .setShaderUniformsToChannel (gl, shaderObject, i);
|
|
73157
|
-
},
|
|
73158
|
-
setShaderUniformsToChannel: function (gl, shaderObject, channel = 0)
|
|
73272
|
+
setShaderUniforms: function (gl, shaderObject, channel = 0)
|
|
73159
73273
|
{
|
|
73160
73274
|
gl .uniform1i (shaderObject .x3d_TextureCoordinateGeneratorMode [channel], 0);
|
|
73161
73275
|
},
|
|
@@ -74942,8 +75056,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
|
|
|
74942
75056
|
|
|
74943
75057
|
// Render triangles.
|
|
74944
75058
|
|
|
74945
|
-
|
|
74946
|
-
blendModeNode .enable (gl);
|
|
75059
|
+
blendModeNode?.enable (gl);
|
|
74947
75060
|
|
|
74948
75061
|
// Setup shader.
|
|
74949
75062
|
|
|
@@ -74985,8 +75098,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
|
|
|
74985
75098
|
gl .enable (gl .CULL_FACE);
|
|
74986
75099
|
gl .drawArrays (primitiveMode, 0, this .vertexCount * 3);
|
|
74987
75100
|
|
|
74988
|
-
|
|
74989
|
-
blendModeNode .disable (gl);
|
|
75101
|
+
blendModeNode?.disable (gl);
|
|
74990
75102
|
|
|
74991
75103
|
return;
|
|
74992
75104
|
}
|
|
@@ -74994,8 +75106,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
|
|
|
74994
75106
|
|
|
74995
75107
|
const primitiveMode = browser .getPrimitiveMode (this .getPrimitiveMode ());
|
|
74996
75108
|
|
|
74997
|
-
|
|
74998
|
-
blendModeNode .enable (gl);
|
|
75109
|
+
blendModeNode?.enable (gl);
|
|
74999
75110
|
|
|
75000
75111
|
// Setup shader.
|
|
75001
75112
|
|
|
@@ -75025,8 +75136,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
|
|
|
75025
75136
|
|
|
75026
75137
|
gl .drawArrays (primitiveMode, 0, this .vertexCount);
|
|
75027
75138
|
|
|
75028
|
-
|
|
75029
|
-
blendModeNode .disable (gl);
|
|
75139
|
+
blendModeNode?.disable (gl);
|
|
75030
75140
|
|
|
75031
75141
|
gl .lineWidth (1);
|
|
75032
75142
|
};
|
|
@@ -75042,8 +75152,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
|
|
|
75042
75152
|
attribBuffers = this .getAttribBuffers (),
|
|
75043
75153
|
primitiveMode = browser .getPrimitiveMode (this .getPrimitiveMode ());
|
|
75044
75154
|
|
|
75045
|
-
|
|
75046
|
-
blendModeNode .enable (gl);
|
|
75155
|
+
blendModeNode?.enable (gl);
|
|
75047
75156
|
|
|
75048
75157
|
// Setup shader.
|
|
75049
75158
|
|
|
@@ -75082,8 +75191,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
|
|
|
75082
75191
|
|
|
75083
75192
|
gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
|
|
75084
75193
|
|
|
75085
|
-
|
|
75086
|
-
blendModeNode .disable (gl);
|
|
75194
|
+
blendModeNode?.disable (gl);
|
|
75087
75195
|
|
|
75088
75196
|
gl .lineWidth (1);
|
|
75089
75197
|
},
|
|
@@ -77338,8 +77446,8 @@ const OrientationChaser_default_ = OrientationChaser;
|
|
|
77338
77446
|
x_ite_Namespace.set ("x_ite/Components/Followers/OrientationChaser", OrientationChaser_default_);
|
|
77339
77447
|
/* harmony default export */ const Followers_OrientationChaser = (OrientationChaser_default_);
|
|
77340
77448
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
77341
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
77342
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
77449
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(136);
|
|
77450
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(998);
|
|
77343
77451
|
/*******************************************************************************
|
|
77344
77452
|
*
|
|
77345
77453
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -78131,7 +78239,7 @@ ExamineViewer .prototype = Object .assign (Object .create (Navigation_X3DViewer.
|
|
|
78131
78239
|
.multRight (orientationOffsetBefore);
|
|
78132
78240
|
|
|
78133
78241
|
if (straightenHorizon)
|
|
78134
|
-
viewpoint .straightenHorizon (userOrientation
|
|
78242
|
+
viewpoint .straightenHorizon (userOrientation);
|
|
78135
78243
|
|
|
78136
78244
|
const orientationOffsetAfter = orientationOffset
|
|
78137
78245
|
.assign (viewpoint .getOrientation ())
|
|
@@ -78203,8 +78311,8 @@ const ExamineViewer_default_ = ExamineViewer;
|
|
|
78203
78311
|
x_ite_Namespace.set ("x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
|
|
78204
78312
|
/* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
|
|
78205
78313
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
78206
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
78207
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
78314
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(136);
|
|
78315
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(998);
|
|
78208
78316
|
/*******************************************************************************
|
|
78209
78317
|
*
|
|
78210
78318
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -79154,8 +79262,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
79154
79262
|
x_ite_Namespace.set ("x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
|
|
79155
79263
|
/* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
|
|
79156
79264
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
79157
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
79158
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
79265
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(136);
|
|
79266
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(998);
|
|
79159
79267
|
/*******************************************************************************
|
|
79160
79268
|
*
|
|
79161
79269
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -79464,8 +79572,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
79464
79572
|
x_ite_Namespace.set ("x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
|
|
79465
79573
|
/* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
|
|
79466
79574
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
79467
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
79468
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
79575
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(136);
|
|
79576
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(998);
|
|
79469
79577
|
/*******************************************************************************
|
|
79470
79578
|
*
|
|
79471
79579
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -81068,8 +81176,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
81068
81176
|
x_ite_Namespace.set ("x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
|
|
81069
81177
|
/* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
|
|
81070
81178
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
81071
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
81072
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
81179
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(136);
|
|
81180
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(998);
|
|
81073
81181
|
/*******************************************************************************
|
|
81074
81182
|
*
|
|
81075
81183
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -82091,8 +82199,8 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
|
|
|
82091
82199
|
x_ite_Namespace.set ("x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
|
|
82092
82200
|
/* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
|
|
82093
82201
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
82094
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
82095
|
-
/* provided dependency */ var ResizeSensor = __webpack_require__(
|
|
82202
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(998);
|
|
82203
|
+
/* provided dependency */ var ResizeSensor = __webpack_require__(599);
|
|
82096
82204
|
/*******************************************************************************
|
|
82097
82205
|
*
|
|
82098
82206
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -82555,6 +82663,14 @@ uniform float x3d_AlphaCutoff;
|
|
|
82555
82663
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
82556
82664
|
varying vec4 texCoord1;
|
|
82557
82665
|
#endif
|
|
82666
|
+
|
|
82667
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
82668
|
+
varying vec4 texCoord2;
|
|
82669
|
+
#endif
|
|
82670
|
+
|
|
82671
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
82672
|
+
varying vec4 texCoord3;
|
|
82673
|
+
#endif
|
|
82558
82674
|
#endif
|
|
82559
82675
|
#else
|
|
82560
82676
|
#if defined (X3D_TEXTURE) || defined (X3D_MATERIAL_TEXTURES)
|
|
@@ -82565,6 +82681,14 @@ uniform float x3d_AlphaCutoff;
|
|
|
82565
82681
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
82566
82682
|
vec4 texCoord1 = vec4 (0.0, 0.0, 0.0, 1.0);
|
|
82567
82683
|
#endif
|
|
82684
|
+
|
|
82685
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
82686
|
+
vec4 texCoord2 = vec4 (0.0, 0.0, 0.0, 1.0);
|
|
82687
|
+
#endif
|
|
82688
|
+
|
|
82689
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
82690
|
+
vec4 texCoord3 = vec4 (0.0, 0.0, 0.0, 1.0);
|
|
82691
|
+
#endif
|
|
82568
82692
|
#endif
|
|
82569
82693
|
#endif
|
|
82570
82694
|
|
|
@@ -82610,7 +82734,7 @@ fragment_main ()
|
|
|
82610
82734
|
#endif
|
|
82611
82735
|
|
|
82612
82736
|
#if defined (X3D_GEOMETRY_0D) && defined (X3D_STYLE_PROPERTIES)
|
|
82613
|
-
|
|
82737
|
+
setPointTexCoords ();
|
|
82614
82738
|
#endif
|
|
82615
82739
|
|
|
82616
82740
|
vec4 finalColor = getMaterialColor ();
|
|
@@ -82838,7 +82962,7 @@ const Point_glsl_default_ = /* glsl */ `
|
|
|
82838
82962
|
#if defined (X3D_GEOMETRY_0D) && defined (X3D_STYLE_PROPERTIES)
|
|
82839
82963
|
#if defined (X3D_TEXTURE) || defined (X3D_MATERIAL_TEXTURES)
|
|
82840
82964
|
void
|
|
82841
|
-
|
|
82965
|
+
setPointTexCoords ()
|
|
82842
82966
|
{
|
|
82843
82967
|
vec4 texCoord = vec4 (gl_PointCoord .x, 1.0 - gl_PointCoord .y, 0.0, 1.0);
|
|
82844
82968
|
|
|
@@ -82849,13 +82973,21 @@ setTexCoords ()
|
|
|
82849
82973
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
82850
82974
|
texCoord1 = texCoord;
|
|
82851
82975
|
#endif
|
|
82976
|
+
|
|
82977
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
82978
|
+
texCoord2 = texCoord;
|
|
82979
|
+
#endif
|
|
82980
|
+
|
|
82981
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
82982
|
+
texCoord3 = texCoord;
|
|
82983
|
+
#endif
|
|
82852
82984
|
}
|
|
82853
82985
|
|
|
82854
82986
|
#define getPointColor(color) (color)
|
|
82855
82987
|
|
|
82856
82988
|
#else
|
|
82857
82989
|
|
|
82858
|
-
#define
|
|
82990
|
+
#define setPointTexCoords()
|
|
82859
82991
|
|
|
82860
82992
|
varying float pointSize;
|
|
82861
82993
|
|
|
@@ -83270,6 +83402,16 @@ getTextureMatrix (const in int i)
|
|
|
83270
83402
|
textureMatrix = x3d_TextureMatrix [1];
|
|
83271
83403
|
#endif
|
|
83272
83404
|
|
|
83405
|
+
#if X3D_NUM_TEXTURE_TRANSFORMS > 2
|
|
83406
|
+
else if (i == 2)
|
|
83407
|
+
textureMatrix = x3d_TextureMatrix [2];
|
|
83408
|
+
#endif
|
|
83409
|
+
|
|
83410
|
+
#if X3D_NUM_TEXTURE_TRANSFORMS > 3
|
|
83411
|
+
else if (i == 3)
|
|
83412
|
+
textureMatrix = x3d_TextureMatrix [3];
|
|
83413
|
+
#endif
|
|
83414
|
+
|
|
83273
83415
|
return textureMatrix;
|
|
83274
83416
|
#else
|
|
83275
83417
|
return x3d_TextureMatrix [0];
|
|
@@ -83292,6 +83434,16 @@ getTexCoord (const in int i)
|
|
|
83292
83434
|
texCoord = texCoord1;
|
|
83293
83435
|
#endif
|
|
83294
83436
|
|
|
83437
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
83438
|
+
else if (i == 2)
|
|
83439
|
+
texCoord = texCoord2;
|
|
83440
|
+
#endif
|
|
83441
|
+
|
|
83442
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
83443
|
+
else if (i == 3)
|
|
83444
|
+
texCoord = texCoord3;
|
|
83445
|
+
#endif
|
|
83446
|
+
|
|
83295
83447
|
return texCoord;
|
|
83296
83448
|
#else
|
|
83297
83449
|
return texCoord0;
|
|
@@ -83393,6 +83545,16 @@ getTexCoord (const in int textureTransformMapping, const in int textureCoordinat
|
|
|
83393
83545
|
texCoord = getTexCoord (x3d_TextureCoordinateGenerator [1], textureTransformMapping, textureCoordinateMapping);
|
|
83394
83546
|
#endif
|
|
83395
83547
|
|
|
83548
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
83549
|
+
else if (textureCoordinateMapping == 2)
|
|
83550
|
+
texCoord = getTexCoord (x3d_TextureCoordinateGenerator [2], textureTransformMapping, textureCoordinateMapping);
|
|
83551
|
+
#endif
|
|
83552
|
+
|
|
83553
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
83554
|
+
else if (textureCoordinateMapping == 3)
|
|
83555
|
+
texCoord = getTexCoord (x3d_TextureCoordinateGenerator [3], textureTransformMapping, textureCoordinateMapping);
|
|
83556
|
+
#endif
|
|
83557
|
+
|
|
83396
83558
|
texCoord .stp /= texCoord .q;
|
|
83397
83559
|
|
|
83398
83560
|
#if defined (X3D_GEOMETRY_2D)
|
|
@@ -83457,7 +83619,7 @@ getTextureColor (const in vec4 diffuseColor, const in vec4 specularColor)
|
|
|
83457
83619
|
{
|
|
83458
83620
|
// Get texture color.
|
|
83459
83621
|
|
|
83460
|
-
vec3 texCoord = getTexCoord (i, i);
|
|
83622
|
+
vec3 texCoord = getTexCoord (min (i, X3D_NUM_TEXTURE_TRANSFORMS - 1), min (i, X3D_NUM_TEXTURE_COORDINATES - 1));
|
|
83461
83623
|
vec4 textureColor = getTexture (i, texCoord);
|
|
83462
83624
|
|
|
83463
83625
|
// Multi texturing
|
|
@@ -83773,6 +83935,14 @@ uniform mat4 x3d_ModelViewMatrix;
|
|
|
83773
83935
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
83774
83936
|
attribute vec4 x3d_TexCoord1;
|
|
83775
83937
|
#endif
|
|
83938
|
+
|
|
83939
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
83940
|
+
attribute vec4 x3d_TexCoord2;
|
|
83941
|
+
#endif
|
|
83942
|
+
|
|
83943
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
83944
|
+
attribute vec4 x3d_TexCoord3;
|
|
83945
|
+
#endif
|
|
83776
83946
|
#endif
|
|
83777
83947
|
#endif
|
|
83778
83948
|
|
|
@@ -83797,6 +83967,14 @@ attribute vec4 x3d_Vertex;
|
|
|
83797
83967
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
83798
83968
|
varying vec4 texCoord1;
|
|
83799
83969
|
#endif
|
|
83970
|
+
|
|
83971
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
83972
|
+
varying vec4 texCoord2;
|
|
83973
|
+
#endif
|
|
83974
|
+
|
|
83975
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
83976
|
+
varying vec4 texCoord3;
|
|
83977
|
+
#endif
|
|
83800
83978
|
#endif
|
|
83801
83979
|
#endif
|
|
83802
83980
|
|
|
@@ -83856,6 +84034,14 @@ vertex_main ()
|
|
|
83856
84034
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
83857
84035
|
texCoord1 = x3d_TexCoord1;
|
|
83858
84036
|
#endif
|
|
84037
|
+
|
|
84038
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
84039
|
+
texCoord2 = x3d_TexCoord2;
|
|
84040
|
+
#endif
|
|
84041
|
+
|
|
84042
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
84043
|
+
texCoord3 = x3d_TexCoord3;
|
|
84044
|
+
#endif
|
|
83859
84045
|
#endif
|
|
83860
84046
|
#endif
|
|
83861
84047
|
|
|
@@ -83994,6 +84180,14 @@ uniform float x3d_AlphaCutoff;
|
|
|
83994
84180
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
83995
84181
|
in vec4 texCoord1;
|
|
83996
84182
|
#endif
|
|
84183
|
+
|
|
84184
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
84185
|
+
in vec4 texCoord2;
|
|
84186
|
+
#endif
|
|
84187
|
+
|
|
84188
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
84189
|
+
in vec4 texCoord3;
|
|
84190
|
+
#endif
|
|
83997
84191
|
#endif
|
|
83998
84192
|
#else
|
|
83999
84193
|
#if defined (X3D_TEXTURE) || defined (X3D_MATERIAL_TEXTURES)
|
|
@@ -84004,6 +84198,14 @@ uniform float x3d_AlphaCutoff;
|
|
|
84004
84198
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
84005
84199
|
vec4 texCoord1 = vec4 (0.0, 0.0, 0.0, 1.0);
|
|
84006
84200
|
#endif
|
|
84201
|
+
|
|
84202
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
84203
|
+
vec4 texCoord2 = vec4 (0.0, 0.0, 0.0, 1.0);
|
|
84204
|
+
#endif
|
|
84205
|
+
|
|
84206
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
84207
|
+
vec4 texCoord3 = vec4 (0.0, 0.0, 0.0, 1.0);
|
|
84208
|
+
#endif
|
|
84007
84209
|
#endif
|
|
84008
84210
|
#endif
|
|
84009
84211
|
|
|
@@ -84056,6 +84258,8 @@ fragment_main ()
|
|
|
84056
84258
|
#endif
|
|
84057
84259
|
|
|
84058
84260
|
#if defined (X3D_GEOMETRY_0D) && defined (X3D_STYLE_PROPERTIES)
|
|
84261
|
+
setPointTexCoords ();
|
|
84262
|
+
#elif defined (X3D_TEXTURE) || defined (X3D_MATERIAL_TEXTURES)
|
|
84059
84263
|
setTexCoords ();
|
|
84060
84264
|
#endif
|
|
84061
84265
|
|
|
@@ -84362,16 +84566,24 @@ const include_Point_glsl_default_ = /* glsl */ `
|
|
|
84362
84566
|
#if defined (X3D_GEOMETRY_0D) && defined (X3D_STYLE_PROPERTIES)
|
|
84363
84567
|
#if defined (X3D_TEXTURE) || defined (X3D_MATERIAL_TEXTURES)
|
|
84364
84568
|
void
|
|
84365
|
-
|
|
84569
|
+
setPointTexCoords ()
|
|
84366
84570
|
{
|
|
84367
84571
|
vec4 texCoord = vec4 (gl_PointCoord .x, 1.0 - gl_PointCoord .y, 0.0, 1.0);
|
|
84368
84572
|
|
|
84369
84573
|
#if X3D_NUM_TEXTURE_COORDINATES > 0
|
|
84370
|
-
|
|
84574
|
+
texCoords [0] = texCoord;
|
|
84371
84575
|
#endif
|
|
84372
84576
|
|
|
84373
84577
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
84374
|
-
|
|
84578
|
+
texCoords [1] = texCoord;
|
|
84579
|
+
#endif
|
|
84580
|
+
|
|
84581
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
84582
|
+
texCoords [2] = texCoord;
|
|
84583
|
+
#endif
|
|
84584
|
+
|
|
84585
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
84586
|
+
texCoords [3] = texCoord;
|
|
84375
84587
|
#endif
|
|
84376
84588
|
}
|
|
84377
84589
|
|
|
@@ -84379,7 +84591,7 @@ setTexCoords ()
|
|
|
84379
84591
|
|
|
84380
84592
|
#else
|
|
84381
84593
|
|
|
84382
|
-
#define
|
|
84594
|
+
#define setPointTexCoords()
|
|
84383
84595
|
|
|
84384
84596
|
in float pointSize;
|
|
84385
84597
|
|
|
@@ -84836,25 +85048,22 @@ const include_Texture_glsl_default_ = /* glsl */ `
|
|
|
84836
85048
|
|
|
84837
85049
|
#pragma X3D include "Perlin.glsl"
|
|
84838
85050
|
|
|
84839
|
-
vec4
|
|
84840
|
-
|
|
85051
|
+
vec4 texCoords [X3D_NUM_TEXTURE_COORDINATES];
|
|
85052
|
+
|
|
85053
|
+
void
|
|
85054
|
+
setTexCoords ()
|
|
84841
85055
|
{
|
|
85056
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 0
|
|
85057
|
+
texCoords [0] = texCoord0;
|
|
85058
|
+
#endif
|
|
84842
85059
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
84843
|
-
|
|
84844
|
-
|
|
84845
|
-
|
|
84846
|
-
|
|
84847
|
-
|
|
84848
|
-
|
|
84849
|
-
|
|
84850
|
-
case 1:
|
|
84851
|
-
return texCoord1;
|
|
84852
|
-
#endif
|
|
84853
|
-
}
|
|
84854
|
-
|
|
84855
|
-
return vec4 (0.0);
|
|
84856
|
-
#else
|
|
84857
|
-
return texCoord0;
|
|
85060
|
+
texCoords [1] = texCoord1;
|
|
85061
|
+
#endif
|
|
85062
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
85063
|
+
texCoords [2] = texCoord2;
|
|
85064
|
+
#endif
|
|
85065
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
85066
|
+
texCoords [3] = texCoord3;
|
|
84858
85067
|
#endif
|
|
84859
85068
|
}
|
|
84860
85069
|
|
|
@@ -84869,7 +85078,7 @@ getTexCoord (const in x3d_TextureCoordinateGeneratorParameters textureCoordinate
|
|
|
84869
85078
|
{
|
|
84870
85079
|
case x3d_None:
|
|
84871
85080
|
{
|
|
84872
|
-
return x3d_TextureMatrix [textureTransformMapping] *
|
|
85081
|
+
return x3d_TextureMatrix [textureTransformMapping] * texCoords [textureCoordinateMapping];
|
|
84873
85082
|
}
|
|
84874
85083
|
case x3d_Sphere:
|
|
84875
85084
|
{
|
|
@@ -84938,7 +85147,7 @@ getTexCoord (const in x3d_TextureCoordinateGeneratorParameters textureCoordinate
|
|
|
84938
85147
|
}
|
|
84939
85148
|
default:
|
|
84940
85149
|
{
|
|
84941
|
-
return x3d_TextureMatrix [textureTransformMapping] *
|
|
85150
|
+
return x3d_TextureMatrix [textureTransformMapping] * texCoords [textureCoordinateMapping];
|
|
84942
85151
|
}
|
|
84943
85152
|
}
|
|
84944
85153
|
}
|
|
@@ -85016,7 +85225,7 @@ getTextureColor (const in vec4 diffuseColor, const in vec4 specularColor)
|
|
|
85016
85225
|
{
|
|
85017
85226
|
// Get texture color.
|
|
85018
85227
|
|
|
85019
|
-
vec3 texCoord = getTexCoord (i, i);
|
|
85228
|
+
vec3 texCoord = getTexCoord (min (i, X3D_NUM_TEXTURE_TRANSFORMS - 1), min (i, X3D_NUM_TEXTURE_COORDINATES - 1));
|
|
85020
85229
|
vec4 textureColor = getTexture (i, texCoord);
|
|
85021
85230
|
|
|
85022
85231
|
// Multi texturing
|
|
@@ -85395,6 +85604,14 @@ uniform mat4 x3d_ModelViewMatrix;
|
|
|
85395
85604
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
85396
85605
|
in vec4 x3d_TexCoord1;
|
|
85397
85606
|
#endif
|
|
85607
|
+
|
|
85608
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
85609
|
+
in vec4 x3d_TexCoord2;
|
|
85610
|
+
#endif
|
|
85611
|
+
|
|
85612
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
85613
|
+
in vec4 x3d_TexCoord3;
|
|
85614
|
+
#endif
|
|
85398
85615
|
#endif
|
|
85399
85616
|
#endif
|
|
85400
85617
|
|
|
@@ -85419,6 +85636,14 @@ in vec4 x3d_Vertex;
|
|
|
85419
85636
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
85420
85637
|
out vec4 texCoord1;
|
|
85421
85638
|
#endif
|
|
85639
|
+
|
|
85640
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
85641
|
+
out vec4 texCoord2;
|
|
85642
|
+
#endif
|
|
85643
|
+
|
|
85644
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
85645
|
+
out vec4 texCoord3;
|
|
85646
|
+
#endif
|
|
85422
85647
|
#endif
|
|
85423
85648
|
#endif
|
|
85424
85649
|
|
|
@@ -85491,6 +85716,14 @@ vertex_main ()
|
|
|
85491
85716
|
#if X3D_NUM_TEXTURE_COORDINATES > 1
|
|
85492
85717
|
texCoord1 = getTexCoord (x3d_TexCoord1);
|
|
85493
85718
|
#endif
|
|
85719
|
+
|
|
85720
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 2
|
|
85721
|
+
texCoord2 = getTexCoord (x3d_TexCoord2);
|
|
85722
|
+
#endif
|
|
85723
|
+
|
|
85724
|
+
#if X3D_NUM_TEXTURE_COORDINATES > 3
|
|
85725
|
+
texCoord3 = getTexCoord (x3d_TexCoord3);
|
|
85726
|
+
#endif
|
|
85494
85727
|
#endif
|
|
85495
85728
|
#endif
|
|
85496
85729
|
|
|
@@ -85719,7 +85952,7 @@ main ()
|
|
|
85719
85952
|
if (getPointColor (vec4 (1.0)) .a < 0.5)
|
|
85720
85953
|
discard;
|
|
85721
85954
|
|
|
85722
|
-
|
|
85955
|
+
setPointTexCoords ();
|
|
85723
85956
|
#endif
|
|
85724
85957
|
|
|
85725
85958
|
gl_FragData [0] = vec4 (vertex, x3d_Id);
|
|
@@ -86769,7 +87002,7 @@ main ()
|
|
|
86769
87002
|
if (getPointColor (vec4 (1.0)) .a < 0.5)
|
|
86770
87003
|
discard;
|
|
86771
87004
|
|
|
86772
|
-
|
|
87005
|
+
setPointTexCoords ();
|
|
86773
87006
|
#endif
|
|
86774
87007
|
|
|
86775
87008
|
#if defined (X3D_GEOMETRY_1D) && defined (X3D_STYLE_PROPERTIES)
|
|
@@ -87948,9 +88181,6 @@ X3DProgrammableShaderObject .prototype =
|
|
|
87948
88181
|
|
|
87949
88182
|
browser .getRenderingProperties () ._LogarithmicDepthBuffer .addInterest ("set_logarithmicDepthBuffer__", this);
|
|
87950
88183
|
|
|
87951
|
-
// Use by multi texture nodes.
|
|
87952
|
-
this .x3d_MaxTextures = browser .getMaxTextures ();
|
|
87953
|
-
|
|
87954
88184
|
this .set_logarithmicDepthBuffer__ ();
|
|
87955
88185
|
},
|
|
87956
88186
|
set_logarithmicDepthBuffer__: function ()
|
|
@@ -87974,12 +88204,14 @@ X3DProgrammableShaderObject .prototype =
|
|
|
87974
88204
|
// Get uniforms and attributes.
|
|
87975
88205
|
|
|
87976
88206
|
const
|
|
87977
|
-
program
|
|
87978
|
-
browser
|
|
87979
|
-
gl
|
|
87980
|
-
maxClipPlanes
|
|
87981
|
-
maxLights
|
|
87982
|
-
maxTextures
|
|
88207
|
+
program = this .getProgram (),
|
|
88208
|
+
browser = this .getBrowser (),
|
|
88209
|
+
gl = browser .getContext (),
|
|
88210
|
+
maxClipPlanes = browser .getMaxClipPlanes (),
|
|
88211
|
+
maxLights = browser .getMaxLights (),
|
|
88212
|
+
maxTextures = browser .getMaxTextures (),
|
|
88213
|
+
maxTextureTransforms = browser .getMaxTextureTransforms (),
|
|
88214
|
+
maxTexCoords = browser .getMaxTexCoords ();
|
|
87983
88215
|
|
|
87984
88216
|
gl .useProgram (program);
|
|
87985
88217
|
|
|
@@ -88080,17 +88312,6 @@ X3DProgrammableShaderObject .prototype =
|
|
|
88080
88312
|
|
|
88081
88313
|
for (let i = 0; i < maxTextures; ++ i)
|
|
88082
88314
|
{
|
|
88083
|
-
// Attributes
|
|
88084
|
-
|
|
88085
|
-
const x3d_TexCoord = this .getAttribLocation (gl, program, "x3d_TexCoord" + i, i ? "" : "x3d_TexCoord");
|
|
88086
|
-
|
|
88087
|
-
if (x3d_TexCoord !== -1)
|
|
88088
|
-
this .x3d_TexCoord .push ([i, x3d_TexCoord]);
|
|
88089
|
-
|
|
88090
|
-
// Uniforms
|
|
88091
|
-
|
|
88092
|
-
this .x3d_TextureMatrix [i] = gl .getUniformLocation (program, "x3d_TextureMatrix[" + i + "]");
|
|
88093
|
-
|
|
88094
88315
|
this .x3d_TextureCoordinateGeneratorMode [i] = gl .getUniformLocation (program, "x3d_TextureCoordinateGenerator[" + i + "].mode");
|
|
88095
88316
|
this .x3d_TextureCoordinateGeneratorParameter [i] = gl .getUniformLocation (program, "x3d_TextureCoordinateGenerator[" + i + "].parameter");
|
|
88096
88317
|
|
|
@@ -88110,6 +88331,22 @@ X3DProgrammableShaderObject .prototype =
|
|
|
88110
88331
|
this .x3d_ProjectiveTextureLocation [i] = gl .getUniformLocation (program, "x3d_ProjectiveTextureLocation[" + i + "]");
|
|
88111
88332
|
}
|
|
88112
88333
|
|
|
88334
|
+
for (let i = 0; i < maxTextureTransforms; ++ i)
|
|
88335
|
+
{
|
|
88336
|
+
const uniform = gl .getUniformLocation (program, "x3d_TextureMatrix[" + i + "]");
|
|
88337
|
+
|
|
88338
|
+
if (uniform !== null)
|
|
88339
|
+
this .x3d_TextureMatrix [i] = uniform;
|
|
88340
|
+
}
|
|
88341
|
+
|
|
88342
|
+
for (let i = 0; i < maxTexCoords; ++ i)
|
|
88343
|
+
{
|
|
88344
|
+
const x3d_TexCoord = this .getAttribLocation (gl, program, "x3d_TexCoord" + i, i ? "" : "x3d_TexCoord");
|
|
88345
|
+
|
|
88346
|
+
if (x3d_TexCoord !== -1)
|
|
88347
|
+
this .x3d_TexCoord .push ([i, x3d_TexCoord]);
|
|
88348
|
+
}
|
|
88349
|
+
|
|
88113
88350
|
this .x3d_TexCoordRamp = gl .getUniformLocation (program, "x3d_TexCoordRamp");
|
|
88114
88351
|
|
|
88115
88352
|
this .x3d_Viewport = gl .getUniformLocation (program, "x3d_Viewport");
|
|
@@ -88193,7 +88430,7 @@ X3DProgrammableShaderObject .prototype =
|
|
|
88193
88430
|
for (const uniform of this .x3d_ProjectiveTexture)
|
|
88194
88431
|
gl .uniform1i (uniform, browser .getDefaultTexture2DUnit ());
|
|
88195
88432
|
|
|
88196
|
-
gl .uniform1i
|
|
88433
|
+
gl .uniform1i (this .x3d_TexCoordRamp, browser .getDefaultTexture2DUnit ());
|
|
88197
88434
|
},
|
|
88198
88435
|
getUniformLocation: function (gl, program, name, depreciated)
|
|
88199
88436
|
{
|
|
@@ -88879,8 +89116,7 @@ X3DProgrammableShaderObject .prototype =
|
|
|
88879
89116
|
|
|
88880
89117
|
// Fog
|
|
88881
89118
|
|
|
88882
|
-
|
|
88883
|
-
fogNode .setShaderUniforms (gl, this);
|
|
89119
|
+
fogNode?.setShaderUniforms (gl, this);
|
|
88884
89120
|
|
|
88885
89121
|
// Clip planes and local lights
|
|
88886
89122
|
|
|
@@ -88897,8 +89133,7 @@ X3DProgrammableShaderObject .prototype =
|
|
|
88897
89133
|
|
|
88898
89134
|
// Style Properties
|
|
88899
89135
|
|
|
88900
|
-
|
|
88901
|
-
stylePropertiesNode .setShaderUniforms (gl, this);
|
|
89136
|
+
stylePropertiesNode?.setShaderUniforms (gl, this);
|
|
88902
89137
|
|
|
88903
89138
|
// Material
|
|
88904
89139
|
|
|
@@ -88906,8 +89141,7 @@ X3DProgrammableShaderObject .prototype =
|
|
|
88906
89141
|
|
|
88907
89142
|
// Texture
|
|
88908
89143
|
|
|
88909
|
-
|
|
88910
|
-
textureNode .setShaderUniforms (gl, this, renderObject);
|
|
89144
|
+
textureNode?.setShaderUniforms (gl, this, renderObject);
|
|
88911
89145
|
|
|
88912
89146
|
appearanceNode .getTextureTransform () .setShaderUniforms (gl, this);
|
|
88913
89147
|
geometryContext .getTextureCoordinate () .setShaderUniforms (gl, this);
|
|
@@ -90617,7 +90851,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
90617
90851
|
x_ite_Namespace.set ("x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
|
|
90618
90852
|
/* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
|
|
90619
90853
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
90620
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
90854
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(998);
|
|
90621
90855
|
/*******************************************************************************
|
|
90622
90856
|
*
|
|
90623
90857
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -91985,6 +92219,10 @@ X3DMaterialNode .prototype = Object .assign (Object .create (Shape_X3DAppearance
|
|
|
91985
92219
|
{
|
|
91986
92220
|
return this ._transparent .getValue ();
|
|
91987
92221
|
},
|
|
92222
|
+
getBaseTexture: function ()
|
|
92223
|
+
{
|
|
92224
|
+
return null;
|
|
92225
|
+
},
|
|
91988
92226
|
setTexture: function (index, textureNode)
|
|
91989
92227
|
{
|
|
91990
92228
|
const textureType = textureNode ? textureNode .getTextureType () - 1 : 0;
|
|
@@ -92109,37 +92347,35 @@ X3DMaterialNode .prototype = Object .assign (Object .create (Shape_X3DAppearance
|
|
|
92109
92347
|
options .push ("X3D_STYLE_PROPERTIES");
|
|
92110
92348
|
|
|
92111
92349
|
if (+this .textureBits)
|
|
92112
|
-
{
|
|
92113
92350
|
options .push ("X3D_MATERIAL_TEXTURES");
|
|
92114
|
-
|
|
92115
|
-
|
|
92351
|
+
|
|
92352
|
+
if (renderContext .textureNode)
|
|
92353
|
+
{
|
|
92354
|
+
// ScreenText
|
|
92355
|
+
|
|
92356
|
+
options .push ("X3D_TEXTURE",
|
|
92357
|
+
"X3D_NUM_TEXTURES 1",
|
|
92358
|
+
"X3D_NUM_TEXTURE_TRANSFORMS 1",
|
|
92359
|
+
"X3D_NUM_TEXTURE_COORDINATES 1",
|
|
92360
|
+
"X3D_TEXTURE0_2D");
|
|
92116
92361
|
}
|
|
92117
92362
|
else
|
|
92118
92363
|
{
|
|
92119
|
-
if (
|
|
92120
|
-
{
|
|
92121
|
-
// ScreenText
|
|
92122
|
-
|
|
92123
|
-
options .push ("X3D_TEXTURE",
|
|
92124
|
-
"X3D_NUM_TEXTURES 1",
|
|
92125
|
-
"X3D_NUM_TEXTURE_TRANSFORMS 1",
|
|
92126
|
-
"X3D_NUM_TEXTURE_COORDINATES 1",
|
|
92127
|
-
"X3D_TEXTURE0_2D");
|
|
92128
|
-
}
|
|
92129
|
-
else if (+appearanceNode .getTextureBits ())
|
|
92364
|
+
if (+appearanceNode .getTextureBits () && !this .getBaseTexture ())
|
|
92130
92365
|
{
|
|
92131
92366
|
const textureNode = appearanceNode .getTexture ();
|
|
92132
92367
|
|
|
92133
92368
|
options .push ("X3D_TEXTURE");
|
|
92134
|
-
options .push ("X3D_NUM_TEXTURES "
|
|
92135
|
-
options .push ("X3D_NUM_TEXTURE_TRANSFORMS " + textureNode .getCount ());
|
|
92136
|
-
options .push ("X3D_NUM_TEXTURE_COORDINATES " + textureNode .getCount ());
|
|
92137
|
-
|
|
92138
|
-
textureNode .getShaderOptions (options);
|
|
92369
|
+
options .push ("X3D_NUM_TEXTURES " + textureNode .getCount ());
|
|
92139
92370
|
|
|
92140
92371
|
if (textureNode .getType () .includes (Base_X3DConstants.MultiTexture))
|
|
92141
92372
|
options .push ("X3D_MULTI_TEXTURING");
|
|
92373
|
+
|
|
92374
|
+
textureNode .getShaderOptions (options);
|
|
92142
92375
|
}
|
|
92376
|
+
|
|
92377
|
+
options .push ("X3D_NUM_TEXTURE_TRANSFORMS " + (appearanceNode .getTextureTransformMapping () .size || 1));
|
|
92378
|
+
options .push ("X3D_NUM_TEXTURE_COORDINATES " + (geometryContext .textureCoordinateMapping .size || 1));
|
|
92143
92379
|
}
|
|
92144
92380
|
|
|
92145
92381
|
switch (shapeNode .getShapeKey ())
|
|
@@ -92316,6 +92552,10 @@ X3DOneSidedMaterialNode .prototype = Object .assign (Object .create (Shape_X3DMa
|
|
|
92316
92552
|
{
|
|
92317
92553
|
this .setTransparent (Boolean (this .transparency));
|
|
92318
92554
|
},
|
|
92555
|
+
getBaseTexture: function ()
|
|
92556
|
+
{
|
|
92557
|
+
return this .getEmissiveTexture ();
|
|
92558
|
+
},
|
|
92319
92559
|
getEmissiveTexture: function ()
|
|
92320
92560
|
{
|
|
92321
92561
|
return this .emissiveTextureNode;
|
|
@@ -92959,15 +93199,9 @@ X3DSingleTextureTransformNode .prototype = Object .assign (Object .create (Textu
|
|
|
92959
93199
|
},
|
|
92960
93200
|
getTextureTransformMapping: function (textureTransformMapping, channel = 0)
|
|
92961
93201
|
{
|
|
92962
|
-
|
|
92963
|
-
textureTransformMapping .set (this ._mapping .getValue (), channel);
|
|
93202
|
+
textureTransformMapping .set (this ._mapping .getValue () || channel, channel);
|
|
92964
93203
|
},
|
|
92965
|
-
setShaderUniforms: function (gl, shaderObject)
|
|
92966
|
-
{
|
|
92967
|
-
for (let i = 0, length = shaderObject .x3d_MaxTextures; i < length; ++ i)
|
|
92968
|
-
this .setShaderUniformsToChannel (gl, shaderObject, i);
|
|
92969
|
-
},
|
|
92970
|
-
setShaderUniformsToChannel: function (gl, shaderObject, channel = 0)
|
|
93204
|
+
setShaderUniforms: function (gl, shaderObject, channel = 0)
|
|
92971
93205
|
{
|
|
92972
93206
|
gl .uniformMatrix4fv (shaderObject .x3d_TextureMatrix [channel], false, this .matrixArray);
|
|
92973
93207
|
},
|
|
@@ -93283,6 +93517,14 @@ X3DTexturingContext .prototype =
|
|
|
93283
93517
|
{
|
|
93284
93518
|
return this [_maxTextures];
|
|
93285
93519
|
},
|
|
93520
|
+
getMaxTextureTransforms: function ()
|
|
93521
|
+
{
|
|
93522
|
+
return 4;
|
|
93523
|
+
},
|
|
93524
|
+
getMaxTexCoords: function ()
|
|
93525
|
+
{
|
|
93526
|
+
return 4;
|
|
93527
|
+
},
|
|
93286
93528
|
getMinTextureSize: function ()
|
|
93287
93529
|
{
|
|
93288
93530
|
return 16;
|
|
@@ -109035,8 +109277,7 @@ X3DPointGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DG
|
|
|
109035
109277
|
attribNodes = this .getAttrib (),
|
|
109036
109278
|
attribBuffers = this .getAttribBuffers ();
|
|
109037
109279
|
|
|
109038
|
-
|
|
109039
|
-
blendModeNode .enable (gl);
|
|
109280
|
+
blendModeNode?.enable (gl);
|
|
109040
109281
|
|
|
109041
109282
|
// Setup shader.
|
|
109042
109283
|
|
|
@@ -109064,8 +109305,7 @@ X3DPointGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DG
|
|
|
109064
109305
|
|
|
109065
109306
|
gl .drawArrays (this .primitiveMode, 0, this .vertexCount);
|
|
109066
109307
|
|
|
109067
|
-
|
|
109068
|
-
blendModeNode .disable (gl);
|
|
109308
|
+
blendModeNode?.disable (gl);
|
|
109069
109309
|
},
|
|
109070
109310
|
displayParticles: function (gl, renderContext, particleSystem)
|
|
109071
109311
|
{
|
|
@@ -109076,8 +109316,7 @@ X3DPointGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DG
|
|
|
109076
109316
|
attribNodes = this .getAttrib (),
|
|
109077
109317
|
attribBuffers = this .getAttribBuffers ();
|
|
109078
109318
|
|
|
109079
|
-
|
|
109080
|
-
blendModeNode .enable (gl);
|
|
109319
|
+
blendModeNode?.enable (gl);
|
|
109081
109320
|
|
|
109082
109321
|
// Setup shader.
|
|
109083
109322
|
|
|
@@ -109116,8 +109355,7 @@ X3DPointGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DG
|
|
|
109116
109355
|
|
|
109117
109356
|
gl .drawArraysInstanced (this .primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
|
|
109118
109357
|
|
|
109119
|
-
|
|
109120
|
-
blendModeNode .disable (gl);
|
|
109358
|
+
blendModeNode?.disable (gl);
|
|
109121
109359
|
},
|
|
109122
109360
|
});
|
|
109123
109361
|
|
|
@@ -111227,6 +111465,10 @@ Material .prototype = Object .assign (Object .create (Shape_X3DOneSidedMaterialN
|
|
|
111227
111465
|
this .setTransparent (!!(this .getTransparency () ||
|
|
111228
111466
|
(this .diffuseTextureNode && this .diffuseTextureNode .isTransparent ())));
|
|
111229
111467
|
},
|
|
111468
|
+
getBaseTexture: function ()
|
|
111469
|
+
{
|
|
111470
|
+
return this .diffuseTexture;
|
|
111471
|
+
},
|
|
111230
111472
|
getTextureIndices: (function ()
|
|
111231
111473
|
{
|
|
111232
111474
|
let i = 0;
|
|
@@ -111586,6 +111828,10 @@ PhysicalMaterial .prototype = Object .assign (Object .create (Shape_X3DOneSidedM
|
|
|
111586
111828
|
this .setTransparent (!!(this .getTransparency () ||
|
|
111587
111829
|
(this .baseTextureNode && this .baseTextureNode .isTransparent ())));
|
|
111588
111830
|
},
|
|
111831
|
+
getBaseTexture: function ()
|
|
111832
|
+
{
|
|
111833
|
+
return this .baseTextureNode;
|
|
111834
|
+
},
|
|
111589
111835
|
getTextureIndices: (function ()
|
|
111590
111836
|
{
|
|
111591
111837
|
let i = 0;
|
|
@@ -111957,6 +112203,7 @@ TwoSidedMaterial .prototype = Object .assign (Object .create (Shape_X3DMaterialN
|
|
|
111957
112203
|
{
|
|
111958
112204
|
this .setTransparent (Boolean (this ._transparency .getValue () || (this ._separateBackColor .getValue () && this ._backTransparency .getValue ())));
|
|
111959
112205
|
},
|
|
112206
|
+
getBaseTexture: Shape_Material.prototype.getBaseTexture,
|
|
111960
112207
|
getMaterialKey: Shape_Material.prototype.getMaterialKey,
|
|
111961
112208
|
createShader: Shape_Material.prototype.createShader,
|
|
111962
112209
|
setShaderUniforms: function (gl, shaderObject, renderObject, textureTransformMapping, textureCoordinateMapping, front)
|
|
@@ -112497,7 +112744,7 @@ const X3DSoundSourceNode_default_ = X3DSoundSourceNode;
|
|
|
112497
112744
|
x_ite_Namespace.set ("x_ite/Components/Sound/X3DSoundSourceNode", X3DSoundSourceNode_default_);
|
|
112498
112745
|
/* harmony default export */ const Sound_X3DSoundSourceNode = (X3DSoundSourceNode_default_);
|
|
112499
112746
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Sound/AudioClip.js
|
|
112500
|
-
/* provided dependency */ var AudioClip_$ = __webpack_require__(
|
|
112747
|
+
/* provided dependency */ var AudioClip_$ = __webpack_require__(998);
|
|
112501
112748
|
/*******************************************************************************
|
|
112502
112749
|
*
|
|
112503
112750
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -115312,8 +115559,8 @@ const GIFMedia_default_ = GifMedia;
|
|
|
115312
115559
|
x_ite_Namespace.set ("x_ite/Browser/Texturing/GIFMedia", GIFMedia_default_);
|
|
115313
115560
|
/* harmony default export */ const GIFMedia = (GIFMedia_default_);
|
|
115314
115561
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
115315
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
115316
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
115562
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(998);
|
|
115563
|
+
/* provided dependency */ var SuperGif = __webpack_require__(921);
|
|
115317
115564
|
/*******************************************************************************
|
|
115318
115565
|
*
|
|
115319
115566
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -115657,6 +115904,9 @@ function MultiTexture (executionContext)
|
|
|
115657
115904
|
|
|
115658
115905
|
this .addChildObjects ("loadState", new x_ite_Fields.SFInt32 (Base_X3DConstants.NOT_STARTED_STATE));
|
|
115659
115906
|
|
|
115907
|
+
const browser = this .getBrowser ();
|
|
115908
|
+
|
|
115909
|
+
this .maxTextures = browser .getMaxTextures ()
|
|
115660
115910
|
this .color = new Float32Array (4);
|
|
115661
115911
|
this .modes = [ ];
|
|
115662
115912
|
this .alphaModes = [ ];
|
|
@@ -115712,7 +115962,7 @@ MultiTexture .prototype = Object .assign (Object .create (Texturing_X3DTextureNo
|
|
|
115712
115962
|
},
|
|
115713
115963
|
getCount: function ()
|
|
115714
115964
|
{
|
|
115715
|
-
return Math .min (this .
|
|
115965
|
+
return Math .min (this .maxTextures, this .textureNodes .length);
|
|
115716
115966
|
},
|
|
115717
115967
|
getMode: function (index)
|
|
115718
115968
|
{
|
|
@@ -115875,7 +116125,7 @@ MultiTexture .prototype = Object .assign (Object .create (Texturing_X3DTextureNo
|
|
|
115875
116125
|
updateTextureBits: function (textureBits)
|
|
115876
116126
|
{
|
|
115877
116127
|
const
|
|
115878
|
-
maxTextures = this .
|
|
116128
|
+
maxTextures = this .maxTextures,
|
|
115879
116129
|
textureNodes = this .textureNodes,
|
|
115880
116130
|
channels = Math .min (maxTextures, textureNodes .length);
|
|
115881
116131
|
|
|
@@ -115888,7 +116138,7 @@ MultiTexture .prototype = Object .assign (Object .create (Texturing_X3DTextureNo
|
|
|
115888
116138
|
{
|
|
115889
116139
|
const
|
|
115890
116140
|
textureNodes = this .textureNodes,
|
|
115891
|
-
channels = Math .min (this .
|
|
116141
|
+
channels = Math .min (this .maxTextures, textureNodes .length);
|
|
115892
116142
|
|
|
115893
116143
|
for (let i = 0; i < channels; ++ i)
|
|
115894
116144
|
textureNodes [i] .getShaderOptions (options, i);
|
|
@@ -115902,7 +116152,7 @@ MultiTexture .prototype = Object .assign (Object .create (Texturing_X3DTextureNo
|
|
|
115902
116152
|
{
|
|
115903
116153
|
const
|
|
115904
116154
|
textureNodes = this .textureNodes,
|
|
115905
|
-
channels = Math .min (this .
|
|
116155
|
+
channels = Math .min (this .maxTextures, textureNodes .length);
|
|
115906
116156
|
|
|
115907
116157
|
gl .uniform4fv (shaderObject .x3d_MultiTextureColor, this .color);
|
|
115908
116158
|
|
|
@@ -115984,6 +116234,9 @@ function MultiTextureCoordinate (executionContext)
|
|
|
115984
116234
|
|
|
115985
116235
|
this .addType (Base_X3DConstants.MultiTextureCoordinate);
|
|
115986
116236
|
|
|
116237
|
+
const browser = this .getBrowser ();
|
|
116238
|
+
|
|
116239
|
+
this .maxTexCoords = browser .getMaxTexCoords ();
|
|
115987
116240
|
this .textureCoordinateNodes = [ ];
|
|
115988
116241
|
}
|
|
115989
116242
|
|
|
@@ -116036,7 +116289,7 @@ MultiTextureCoordinate .prototype = Object .assign (Object .create (Texturing_X3
|
|
|
116036
116289
|
},
|
|
116037
116290
|
getCount: function ()
|
|
116038
116291
|
{
|
|
116039
|
-
return Math .min (this .
|
|
116292
|
+
return Math .min (this .maxTexCoords, this .textureCoordinateNodes .length);
|
|
116040
116293
|
},
|
|
116041
116294
|
isEmpty: function ()
|
|
116042
116295
|
{
|
|
@@ -116062,21 +116315,27 @@ MultiTextureCoordinate .prototype = Object .assign (Object .create (Texturing_X3
|
|
|
116062
116315
|
},
|
|
116063
116316
|
init: function (multiArray)
|
|
116064
116317
|
{
|
|
116065
|
-
|
|
116066
|
-
|
|
116318
|
+
const
|
|
116319
|
+
textureCoordinateNodes = this .textureCoordinateNodes,
|
|
116320
|
+
length = Math .min (this .maxTexCoords, textureCoordinateNodes .length);
|
|
116321
|
+
|
|
116322
|
+
for (let i = 0; i < length; ++ i)
|
|
116323
|
+
textureCoordinateNodes [i] .init (multiArray);
|
|
116067
116324
|
},
|
|
116068
116325
|
addPoint: function (index, multiArray)
|
|
116069
116326
|
{
|
|
116070
|
-
const
|
|
116327
|
+
const
|
|
116328
|
+
textureCoordinateNodes = this .textureCoordinateNodes,
|
|
116329
|
+
length = Math .min (this .maxTexCoords, textureCoordinateNodes .length);
|
|
116071
116330
|
|
|
116072
|
-
for (let i = 0
|
|
116331
|
+
for (let i = 0; i < length; ++ i)
|
|
116073
116332
|
textureCoordinateNodes [i] .addPointToChannel (index, multiArray [i]);
|
|
116074
116333
|
},
|
|
116075
116334
|
getTextureCoordinateMapping: function (textureCoordinateMapping)
|
|
116076
116335
|
{
|
|
116077
116336
|
const
|
|
116078
116337
|
textureCoordinateNodes = this .textureCoordinateNodes,
|
|
116079
|
-
length = Math .min (this .
|
|
116338
|
+
length = Math .min (this .maxTexCoords, textureCoordinateNodes .length);
|
|
116080
116339
|
|
|
116081
116340
|
for (let i = 0; i < length; ++ i)
|
|
116082
116341
|
textureCoordinateNodes [i] .getTextureCoordinateMapping (textureCoordinateMapping, i);
|
|
@@ -116085,22 +116344,16 @@ MultiTextureCoordinate .prototype = Object .assign (Object .create (Texturing_X3
|
|
|
116085
116344
|
{
|
|
116086
116345
|
const
|
|
116087
116346
|
textureCoordinateNodes = this .textureCoordinateNodes,
|
|
116088
|
-
length = Math .min (
|
|
116089
|
-
|
|
116090
|
-
for (let i = 0; i < length; ++ i)
|
|
116091
|
-
textureCoordinateNodes [i] .setShaderUniformsToChannel (gl, shaderObject, i);
|
|
116347
|
+
length = Math .min (this .maxTexCoords, textureCoordinateNodes .length);
|
|
116092
116348
|
|
|
116093
116349
|
if (length)
|
|
116094
116350
|
{
|
|
116095
|
-
|
|
116096
|
-
|
|
116097
|
-
for (let i = length, l = shaderObject .x3d_MaxTextures; i < l; ++ i)
|
|
116098
|
-
last .setShaderUniformsToChannel (gl, shaderObject, i);
|
|
116351
|
+
for (let i = 0; i < length; ++ i)
|
|
116352
|
+
textureCoordinateNodes [i] .setShaderUniforms (gl, shaderObject, i);
|
|
116099
116353
|
}
|
|
116100
116354
|
else
|
|
116101
116355
|
{
|
|
116102
|
-
|
|
116103
|
-
gl .uniform1i (shaderObject .x3d_TextureCoordinateGeneratorMode [i], 0);
|
|
116356
|
+
this .getBrowser () .getDefaultTextureCoordinate () .setShaderUniforms (gl, shaderObject, 0);
|
|
116104
116357
|
}
|
|
116105
116358
|
},
|
|
116106
116359
|
});
|
|
@@ -116165,13 +116418,15 @@ x_ite_Namespace.set ("x_ite/Components/Texturing/MultiTextureCoordinate", MultiT
|
|
|
116165
116418
|
|
|
116166
116419
|
|
|
116167
116420
|
|
|
116168
|
-
|
|
116169
116421
|
function MultiTextureTransform (executionContext)
|
|
116170
116422
|
{
|
|
116171
116423
|
Texturing_X3DTextureTransformNode.call (this, executionContext);
|
|
116172
116424
|
|
|
116173
116425
|
this .addType (Base_X3DConstants.MultiTextureTransform);
|
|
116174
116426
|
|
|
116427
|
+
const browser = this .getBrowser ();
|
|
116428
|
+
|
|
116429
|
+
this .maxTextureTransforms = browser .getMaxTextureTransforms ();
|
|
116175
116430
|
this .textureTransformNodes = [ ];
|
|
116176
116431
|
}
|
|
116177
116432
|
|
|
@@ -116215,53 +116470,35 @@ MultiTextureTransform .prototype = Object .assign (Object .create (Texturing_X3D
|
|
|
116215
116470
|
if (textureTransformNode)
|
|
116216
116471
|
textureTransformNodes .push (textureTransformNode);
|
|
116217
116472
|
}
|
|
116473
|
+
|
|
116474
|
+
if (!textureTransformNodes .length)
|
|
116475
|
+
textureTransformNodes .push (this .getBrowser () .getDefaultTextureTransform ());
|
|
116218
116476
|
},
|
|
116219
116477
|
getCount: function ()
|
|
116220
116478
|
{
|
|
116221
|
-
return Math .min (this .
|
|
116479
|
+
return Math .min (this .maxTextureTransforms, this .textureTransformNodes .length);
|
|
116222
116480
|
},
|
|
116223
116481
|
getTextureTransformMapping: function (textureTransformMapping)
|
|
116224
116482
|
{
|
|
116225
116483
|
const
|
|
116226
116484
|
textureTransformNodes = this .textureTransformNodes,
|
|
116227
|
-
length = Math .min (this .
|
|
116485
|
+
length = Math .min (this .maxTextureTransforms, textureTransformNodes .length);
|
|
116228
116486
|
|
|
116229
116487
|
for (let i = 0; i < length; ++ i)
|
|
116230
116488
|
textureTransformNodes [i] .getTextureTransformMapping (textureTransformMapping, i);
|
|
116231
116489
|
},
|
|
116232
|
-
setShaderUniforms:
|
|
116490
|
+
setShaderUniforms: function (gl, shaderObject)
|
|
116233
116491
|
{
|
|
116234
|
-
const
|
|
116235
|
-
|
|
116236
|
-
|
|
116237
|
-
{
|
|
116238
|
-
const
|
|
116239
|
-
textureTransformNodes = this .textureTransformNodes,
|
|
116240
|
-
length = Math .min (shaderObject .x3d_MaxTextures, textureTransformNodes .length);
|
|
116241
|
-
|
|
116242
|
-
for (let i = 0; i < length; ++ i)
|
|
116243
|
-
textureTransformNodes [i] .setShaderUniformsToChannel (gl, shaderObject, i);
|
|
116244
|
-
|
|
116245
|
-
if (length)
|
|
116246
|
-
{
|
|
116247
|
-
const last = textureTransformNodes .at (-1);
|
|
116492
|
+
const
|
|
116493
|
+
textureTransformNodes = this .textureTransformNodes,
|
|
116494
|
+
length = Math .min (this .maxTextureTransforms, textureTransformNodes .length);
|
|
116248
116495
|
|
|
116249
|
-
|
|
116250
|
-
|
|
116251
|
-
|
|
116252
|
-
else
|
|
116253
|
-
{
|
|
116254
|
-
for (let i = length, l = shaderObject .x3d_MaxTextures; i < l; ++ i)
|
|
116255
|
-
gl .uniformMatrix4fv (shaderObject .x3d_TextureMatrix [i], false, matrixArray);
|
|
116256
|
-
}
|
|
116257
|
-
};
|
|
116258
|
-
})(),
|
|
116496
|
+
for (let i = 0; i < length; ++ i)
|
|
116497
|
+
textureTransformNodes [i] .setShaderUniforms (gl, shaderObject, i);
|
|
116498
|
+
},
|
|
116259
116499
|
transformPoint: function (texCoord)
|
|
116260
116500
|
{
|
|
116261
|
-
|
|
116262
|
-
return this .textureTransformNodes [0] .transformPoint (texCoord);
|
|
116263
|
-
|
|
116264
|
-
return texCoord;
|
|
116501
|
+
return this .textureTransformNodes [0] .transformPoint (texCoord);
|
|
116265
116502
|
},
|
|
116266
116503
|
});
|
|
116267
116504
|
|
|
@@ -116271,7 +116508,7 @@ const MultiTextureTransform_default_ = MultiTextureTransform;
|
|
|
116271
116508
|
x_ite_Namespace.set ("x_ite/Components/Texturing/MultiTextureTransform", MultiTextureTransform_default_);
|
|
116272
116509
|
/* harmony default export */ const Texturing_MultiTextureTransform = (MultiTextureTransform_default_);
|
|
116273
116510
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/PixelTexture.js
|
|
116274
|
-
/* provided dependency */ var PixelTexture_$ = __webpack_require__(
|
|
116511
|
+
/* provided dependency */ var PixelTexture_$ = __webpack_require__(998);
|
|
116275
116512
|
/*******************************************************************************
|
|
116276
116513
|
*
|
|
116277
116514
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -116686,7 +116923,7 @@ TextureCoordinateGenerator .prototype = Object .assign (Object .create (Texturin
|
|
|
116686
116923
|
{
|
|
116687
116924
|
array .push (0, 0, 0, 1);
|
|
116688
116925
|
},
|
|
116689
|
-
|
|
116926
|
+
setShaderUniforms: function (gl, shaderObject, channel = 0)
|
|
116690
116927
|
{
|
|
116691
116928
|
gl .uniform1i (shaderObject .x3d_TextureCoordinateGeneratorMode [channel], this .mode);
|
|
116692
116929
|
gl .uniform1fv (shaderObject .x3d_TextureCoordinateGeneratorParameter [channel], this .parameter);
|
|
@@ -116974,7 +117211,7 @@ const Components_default_ = Components;
|
|
|
116974
117211
|
x_ite_Namespace.set ("x_ite/Components", Components_default_);
|
|
116975
117212
|
/* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
|
|
116976
117213
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
|
|
116977
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
117214
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(998);
|
|
116978
117215
|
/*******************************************************************************
|
|
116979
117216
|
* MIT License
|
|
116980
117217
|
*
|
|
@@ -118211,7 +118448,7 @@ const SupportedProfiles_default_ = SupportedProfiles;
|
|
|
118211
118448
|
x_ite_Namespace.set ("x_ite/Configuration/SupportedProfiles", SupportedProfiles_default_);
|
|
118212
118449
|
/* harmony default export */ const Configuration_SupportedProfiles = (SupportedProfiles_default_);
|
|
118213
118450
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
|
|
118214
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
118451
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(998);
|
|
118215
118452
|
/*******************************************************************************
|
|
118216
118453
|
*
|
|
118217
118454
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118870,7 +119107,7 @@ X3DBrowser .prototype = Object .assign (Object .create (Browser_X3DBrowserContex
|
|
|
118870
119107
|
if (!layerNode)
|
|
118871
119108
|
return;
|
|
118872
119109
|
|
|
118873
|
-
layerNode .
|
|
119110
|
+
layerNode .viewAll (1, this .getBrowserOption ("StraightenHorizon"));
|
|
118874
119111
|
},
|
|
118875
119112
|
firstViewpoint: function (layerNode)
|
|
118876
119113
|
{
|
|
@@ -119156,7 +119393,7 @@ const X3DBrowser_default_ = X3DBrowser;
|
|
|
119156
119393
|
x_ite_Namespace.set ("x_ite/Browser/X3DBrowser", X3DBrowser_default_);
|
|
119157
119394
|
/* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
|
|
119158
119395
|
;// CONCATENATED MODULE: ./src/x_ite/Fallback.js
|
|
119159
|
-
/* provided dependency */ var Fallback_$ = __webpack_require__(
|
|
119396
|
+
/* provided dependency */ var Fallback_$ = __webpack_require__(998);
|
|
119160
119397
|
/*******************************************************************************
|
|
119161
119398
|
*
|
|
119162
119399
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119335,8 +119572,8 @@ const MicroTime_default_ = undefined;
|
|
|
119335
119572
|
x_ite_Namespace.set ("standard/Time/MicroTime", MicroTime_default_);
|
|
119336
119573
|
/* harmony default export */ const MicroTime = ((/* unused pure expression or super */ null && (MicroTime_default_)));
|
|
119337
119574
|
;// CONCATENATED MODULE: ./src/lib/jquery.js
|
|
119338
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
119339
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
119575
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(998);
|
|
119576
|
+
/* provided dependency */ var pako = __webpack_require__(978);
|
|
119340
119577
|
jquery_$.decodeText = function (input)
|
|
119341
119578
|
{
|
|
119342
119579
|
if (typeof input === "string")
|
|
@@ -119363,14 +119600,14 @@ const jquery_default_ = jquery_$;
|
|
|
119363
119600
|
x_ite_Namespace.set ("lib/jquery", jquery_default_);
|
|
119364
119601
|
/* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
|
|
119365
119602
|
;// CONCATENATED MODULE: ./src/lib/libtess.js
|
|
119366
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
119603
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(422);
|
|
119367
119604
|
const libtess_default_ = libtess_libtess;
|
|
119368
119605
|
;
|
|
119369
119606
|
|
|
119370
119607
|
x_ite_Namespace.set ("lib/libtess", libtess_default_);
|
|
119371
119608
|
/* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
|
|
119372
119609
|
;// CONCATENATED MODULE: ./src/x_ite/X3D.js
|
|
119373
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
119610
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(998);
|
|
119374
119611
|
/*******************************************************************************
|
|
119375
119612
|
*
|
|
119376
119613
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119626,7 +119863,7 @@ const X3D_default_ = X3D;
|
|
|
119626
119863
|
x_ite_Namespace.set ("x_ite/X3D", X3D_default_);
|
|
119627
119864
|
/* harmony default export */ const x_ite_X3D = (X3D_default_);
|
|
119628
119865
|
;// CONCATENATED MODULE: ./src/x_ite/X3DCanvas.js
|
|
119629
|
-
/* provided dependency */ var X3DCanvas_$ = __webpack_require__(
|
|
119866
|
+
/* provided dependency */ var X3DCanvas_$ = __webpack_require__(998);
|
|
119630
119867
|
/*******************************************************************************
|
|
119631
119868
|
*
|
|
119632
119869
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119886,7 +120123,7 @@ x_ite_Namespace.set ("shim", shim_default_);
|
|
|
119886
120123
|
|
|
119887
120124
|
// Assign X3D to global namespace.
|
|
119888
120125
|
|
|
119889
|
-
window [Symbol .for ("X_ITE.X3D-8.6.
|
|
120126
|
+
window [Symbol .for ("X_ITE.X3D-8.6.9")] = x_ite_X3D;
|
|
119890
120127
|
|
|
119891
120128
|
x_ite_X3DCanvas.define ();
|
|
119892
120129
|
|