x_ite 8.6.4 → 8.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +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 +23 -23
- 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 +1235 -1000
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +2 -2
- package/docs/_posts/components/Navigation/NavigationInfo.md +8 -3
- package/docs/_posts/laboratory/x3d-file-converter.md +2 -0
- package/package.json +1 -1
- package/src/standard/Math/Numbers/Matrix4.js +7 -0
- package/src/x_ite/Base/Events.js +10 -23
- package/src/x_ite/Base/X3DObject.js +29 -16
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Components/Shape/Material.js +2 -2
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +2 -2
- package/src/x_ite/Components/Shape/UnlitMaterial.js +2 -2
- package/src/x_ite/Components/Texturing/ImageTexture.js +3 -0
- package/src/x_ite/Parser/SVGParser.js +652 -427
- package/src/x_ite/Parser/X3DParser.js +2 -2
package/dist/x_ite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* X_ITE v8.6.
|
|
1
|
+
/* X_ITE v8.6.6 */(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
|
+
/***/ 856:
|
|
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__(765);
|
|
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
|
+
/***/ 359:
|
|
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__(765);
|
|
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
|
+
/***/ 474:
|
|
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__(765)], __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
|
+
/***/ 765:
|
|
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
|
+
/***/ 241:
|
|
11816
11816
|
/***/ ((module) => {
|
|
11817
11817
|
|
|
11818
11818
|
/**
|
|
@@ -16591,7 +16591,7 @@ if (true) {
|
|
|
16591
16591
|
|
|
16592
16592
|
/***/ }),
|
|
16593
16593
|
|
|
16594
|
-
/***/
|
|
16594
|
+
/***/ 467:
|
|
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
|
+
/***/ 681:
|
|
19840
19840
|
/***/ (function(module, exports) {
|
|
19841
19841
|
|
|
19842
19842
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -21844,13 +21844,16 @@ X3DObject .prototype =
|
|
|
21844
21844
|
},
|
|
21845
21845
|
getInterestId: function (callbackName, object)
|
|
21846
21846
|
{
|
|
21847
|
+
if (typeof callbackName === "symbol")
|
|
21848
|
+
return X3DObject .getId (object) + ".Symbol(" + SymbolId (callbackName) + ")";
|
|
21849
|
+
|
|
21847
21850
|
return X3DObject .getId (object) + "." + String (callbackName);
|
|
21848
21851
|
},
|
|
21849
21852
|
hasInterest: function (callbackName, object)
|
|
21850
21853
|
{
|
|
21851
21854
|
return this [_interests] .has (this .getInterestId (callbackName, object));
|
|
21852
21855
|
},
|
|
21853
|
-
addInterest: function (callbackName, object)
|
|
21856
|
+
addInterest: function (callbackName, object, ... args)
|
|
21854
21857
|
{
|
|
21855
21858
|
if (this [_interests] === X3DObject .prototype [_interests])
|
|
21856
21859
|
{
|
|
@@ -21862,19 +21865,7 @@ X3DObject .prototype =
|
|
|
21862
21865
|
interestId = this .getInterestId (callbackName, object),
|
|
21863
21866
|
callback = object [callbackName];
|
|
21864
21867
|
|
|
21865
|
-
|
|
21866
|
-
{
|
|
21867
|
-
const args = Array .prototype .slice .call (arguments, 2);
|
|
21868
|
-
|
|
21869
|
-
args .unshift (object);
|
|
21870
|
-
args .push (this);
|
|
21871
|
-
|
|
21872
|
-
this [_interests] .set (interestId, Function .prototype .bind .apply (callback, args));
|
|
21873
|
-
}
|
|
21874
|
-
else
|
|
21875
|
-
{
|
|
21876
|
-
this [_interests] .set (interestId, callback .bind (object, this));
|
|
21877
|
-
}
|
|
21868
|
+
this [_interests] .set (interestId, callback .bind (object, ... args, this));
|
|
21878
21869
|
},
|
|
21879
21870
|
removeInterest: function (callbackName, object)
|
|
21880
21871
|
{
|
|
@@ -21946,9 +21937,31 @@ X3DObject .prototype =
|
|
|
21946
21937
|
for (const key of Reflect .ownKeys (X3DObject .prototype))
|
|
21947
21938
|
Object .defineProperty (X3DObject .prototype, key, { enumerable: false });
|
|
21948
21939
|
|
|
21949
|
-
|
|
21940
|
+
Object .assign (X3DObject,
|
|
21941
|
+
{
|
|
21942
|
+
getId: (function ()
|
|
21943
|
+
{
|
|
21944
|
+
const map = new WeakMap ();
|
|
21945
|
+
|
|
21946
|
+
let counter = 0;
|
|
21947
|
+
|
|
21948
|
+
return function (object)
|
|
21949
|
+
{
|
|
21950
|
+
const id = map .get (object);
|
|
21951
|
+
|
|
21952
|
+
if (id !== undefined)
|
|
21953
|
+
return id;
|
|
21954
|
+
|
|
21955
|
+
map .set (object, ++ counter);
|
|
21956
|
+
|
|
21957
|
+
return counter;
|
|
21958
|
+
};
|
|
21959
|
+
})(),
|
|
21960
|
+
});
|
|
21961
|
+
|
|
21962
|
+
const SymbolId = (function ()
|
|
21950
21963
|
{
|
|
21951
|
-
const map = new
|
|
21964
|
+
const map = new Map ();
|
|
21952
21965
|
|
|
21953
21966
|
let counter = 0;
|
|
21954
21967
|
|
|
@@ -22145,20 +22158,13 @@ x_ite_Namespace.set ("x_ite/Base/X3DChildObject", X3DChildObject_default_);
|
|
|
22145
22158
|
*
|
|
22146
22159
|
******************************************************************************/
|
|
22147
22160
|
|
|
22148
|
-
const
|
|
22149
|
-
|
|
22150
|
-
function Events ()
|
|
22151
|
-
{
|
|
22152
|
-
this [_stack] = [ ];
|
|
22153
|
-
}
|
|
22154
|
-
|
|
22155
|
-
Events .prototype =
|
|
22161
|
+
const Events = Object .assign ([ ],
|
|
22156
22162
|
{
|
|
22157
22163
|
create: function (field)
|
|
22158
22164
|
{
|
|
22159
|
-
if (this
|
|
22165
|
+
if (this .length)
|
|
22160
22166
|
{
|
|
22161
|
-
const event = this
|
|
22167
|
+
const event = this .pop ();
|
|
22162
22168
|
|
|
22163
22169
|
event .field = field;
|
|
22164
22170
|
event .clear ();
|
|
@@ -22174,9 +22180,9 @@ Events .prototype =
|
|
|
22174
22180
|
},
|
|
22175
22181
|
copy: function (event)
|
|
22176
22182
|
{
|
|
22177
|
-
if (this
|
|
22183
|
+
if (this .length)
|
|
22178
22184
|
{
|
|
22179
|
-
const copy = this
|
|
22185
|
+
const copy = this .pop ();
|
|
22180
22186
|
|
|
22181
22187
|
copy .field = event .field;
|
|
22182
22188
|
copy .clear ();
|
|
@@ -22195,22 +22201,16 @@ Events .prototype =
|
|
|
22195
22201
|
|
|
22196
22202
|
return copy;
|
|
22197
22203
|
},
|
|
22198
|
-
push: function (event)
|
|
22199
|
-
{
|
|
22200
|
-
this [_stack] .push (event);
|
|
22201
|
-
},
|
|
22202
22204
|
clear: function ()
|
|
22203
22205
|
{
|
|
22204
|
-
this
|
|
22206
|
+
this .length = 0;
|
|
22205
22207
|
},
|
|
22206
|
-
};
|
|
22207
|
-
|
|
22208
|
-
for (const key of Reflect .ownKeys (Events .prototype))
|
|
22209
|
-
Object .defineProperty (Events .prototype, key, { enumerable: false });
|
|
22208
|
+
});
|
|
22210
22209
|
|
|
22211
|
-
const
|
|
22210
|
+
for (const key of Reflect .ownKeys (Events))
|
|
22211
|
+
Object .defineProperty (Events, key, { enumerable: false });
|
|
22212
22212
|
|
|
22213
|
-
const Events_default_ =
|
|
22213
|
+
const Events_default_ = Events;
|
|
22214
22214
|
;
|
|
22215
22215
|
|
|
22216
22216
|
x_ite_Namespace.set ("x_ite/Base/Events", Events_default_);
|
|
@@ -29879,6 +29879,13 @@ Object .assign (Matrix4_Matrix4,
|
|
|
29879
29879
|
return Object .create (this .prototype) .setQuaternion (quaternion);
|
|
29880
29880
|
},
|
|
29881
29881
|
Matrix3: function (matrix)
|
|
29882
|
+
{
|
|
29883
|
+
return new Matrix4_Matrix4 (matrix [0], matrix [1], 0, 0,
|
|
29884
|
+
matrix [3], matrix [4], 0, 0,
|
|
29885
|
+
0, 0, 1, 0,
|
|
29886
|
+
matrix [6], matrix [7], 0, 1);
|
|
29887
|
+
},
|
|
29888
|
+
SubMatrix: function (matrix)
|
|
29882
29889
|
{
|
|
29883
29890
|
return new Matrix4_Matrix4 (matrix [0], matrix [1], matrix [2], 0,
|
|
29884
29891
|
matrix [3], matrix [4], matrix [5], 0,
|
|
@@ -34905,7 +34912,7 @@ x_ite_Namespace.set ("x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
|
|
|
34905
34912
|
*
|
|
34906
34913
|
******************************************************************************/
|
|
34907
34914
|
|
|
34908
|
-
const VERSION_default_ = "8.6.
|
|
34915
|
+
const VERSION_default_ = "8.6.6";
|
|
34909
34916
|
;
|
|
34910
34917
|
|
|
34911
34918
|
x_ite_Namespace.set ("x_ite/Browser/VERSION", VERSION_default_);
|
|
@@ -35807,7 +35814,7 @@ const gettext_default_ = gettext;
|
|
|
35807
35814
|
x_ite_Namespace.set ("locale/gettext", gettext_default_);
|
|
35808
35815
|
/* harmony default export */ const locale_gettext = (gettext_default_);
|
|
35809
35816
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
|
|
35810
|
-
/* provided dependency */ var $ = __webpack_require__(
|
|
35817
|
+
/* provided dependency */ var $ = __webpack_require__(765);
|
|
35811
35818
|
/*******************************************************************************
|
|
35812
35819
|
*
|
|
35813
35820
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -36765,7 +36772,7 @@ const RenderingProperties_default_ = RenderingProperties;
|
|
|
36765
36772
|
x_ite_Namespace.set ("x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
|
|
36766
36773
|
/* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
|
|
36767
36774
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
|
|
36768
|
-
/* provided dependency */ var Notification_$ = __webpack_require__(
|
|
36775
|
+
/* provided dependency */ var Notification_$ = __webpack_require__(765);
|
|
36769
36776
|
/*******************************************************************************
|
|
36770
36777
|
*
|
|
36771
36778
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -36887,8 +36894,8 @@ const Notification_default_ = Notification;
|
|
|
36887
36894
|
x_ite_Namespace.set ("x_ite/Browser/Core/Notification", Notification_default_);
|
|
36888
36895
|
/* harmony default export */ const Core_Notification = (Notification_default_);
|
|
36889
36896
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
|
|
36890
|
-
/* provided dependency */ var jquery_fullscreen = __webpack_require__(
|
|
36891
|
-
/* provided dependency */ var ContextMenu_$ = __webpack_require__(
|
|
36897
|
+
/* provided dependency */ var jquery_fullscreen = __webpack_require__(359);
|
|
36898
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(765);
|
|
36892
36899
|
/*******************************************************************************
|
|
36893
36900
|
*
|
|
36894
36901
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -41890,7 +41897,7 @@ const X3DUrlObject_default_ = X3DUrlObject;
|
|
|
41890
41897
|
x_ite_Namespace.set ("x_ite/Components/Networking/X3DUrlObject", X3DUrlObject_default_);
|
|
41891
41898
|
/* harmony default export */ const Networking_X3DUrlObject = (X3DUrlObject_default_);
|
|
41892
41899
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
|
|
41893
|
-
/* provided dependency */ var X3DParser_$ = __webpack_require__(
|
|
41900
|
+
/* provided dependency */ var X3DParser_$ = __webpack_require__(765);
|
|
41894
41901
|
/*******************************************************************************
|
|
41895
41902
|
*
|
|
41896
41903
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -42032,10 +42039,10 @@ X3DParser .prototype = {
|
|
|
42032
42039
|
{
|
|
42033
42040
|
return this .scene .fromUnit (category, value);
|
|
42034
42041
|
},
|
|
42035
|
-
convertColor: function (value)
|
|
42042
|
+
convertColor: function (value, defaultColor = "white")
|
|
42036
42043
|
{
|
|
42037
42044
|
const
|
|
42038
|
-
wrap = X3DParser_$("<div></div>") .hide () .css ("color",
|
|
42045
|
+
wrap = X3DParser_$("<div></div>") .hide () .css ("color", defaultColor) .appendTo (X3DParser_$("body")),
|
|
42039
42046
|
div = X3DParser_$("<div></div>").css ("color", value) .appendTo (wrap),
|
|
42040
42047
|
rgb = window .getComputedStyle (div [0]) .color,
|
|
42041
42048
|
values = rgb .replace (/^rgba?\(|\)$/g, "") .split (/[\s,]+/) .map (s => parseFloat (s));
|
|
@@ -45067,7 +45074,7 @@ const VRMLParser_default_ = VRMLParser;
|
|
|
45067
45074
|
x_ite_Namespace.set ("x_ite/Parser/VRMLParser", VRMLParser_default_);
|
|
45068
45075
|
/* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
|
|
45069
45076
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
|
|
45070
|
-
/* provided dependency */ var XMLParser_$ = __webpack_require__(
|
|
45077
|
+
/* provided dependency */ var XMLParser_$ = __webpack_require__(765);
|
|
45071
45078
|
/*******************************************************************************
|
|
45072
45079
|
*
|
|
45073
45080
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -46953,7 +46960,7 @@ const X3DOptimizer_default_ = X3DOptimizer;
|
|
|
46953
46960
|
x_ite_Namespace.set ("x_ite/Parser/X3DOptimizer", X3DOptimizer_default_);
|
|
46954
46961
|
/* harmony default export */ const Parser_X3DOptimizer = (X3DOptimizer_default_);
|
|
46955
46962
|
;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
|
|
46956
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
46963
|
+
/* provided dependency */ var libtess = __webpack_require__(241);
|
|
46957
46964
|
/*******************************************************************************
|
|
46958
46965
|
*
|
|
46959
46966
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -47863,7 +47870,7 @@ const Box3_default_ = Box3;
|
|
|
47863
47870
|
x_ite_Namespace.set ("standard/Math/Geometry/Box3", Box3_default_);
|
|
47864
47871
|
/* harmony default export */ const Geometry_Box3 = (Box3_default_);
|
|
47865
47872
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
|
|
47866
|
-
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(
|
|
47873
|
+
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(765);
|
|
47867
47874
|
/*******************************************************************************
|
|
47868
47875
|
*
|
|
47869
47876
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -50090,7 +50097,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
|
|
|
50090
50097
|
x_ite_Namespace.set ("x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
|
|
50091
50098
|
/* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
|
|
50092
50099
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
|
|
50093
|
-
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(
|
|
50100
|
+
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(765);
|
|
50094
50101
|
/*******************************************************************************
|
|
50095
50102
|
*
|
|
50096
50103
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -50243,7 +50250,7 @@ const GLB2Parser_default_ = GLB2Parser;
|
|
|
50243
50250
|
x_ite_Namespace.set ("x_ite/Parser/GLB2Parser", GLB2Parser_default_);
|
|
50244
50251
|
/* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
|
|
50245
50252
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
|
|
50246
|
-
/* provided dependency */ var OBJParser_$ = __webpack_require__(
|
|
50253
|
+
/* provided dependency */ var OBJParser_$ = __webpack_require__(765);
|
|
50247
50254
|
/*******************************************************************************
|
|
50248
50255
|
*
|
|
50249
50256
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -51873,7 +51880,7 @@ const STLBParser_default_ = STLBParser;
|
|
|
51873
51880
|
|
|
51874
51881
|
x_ite_Namespace.set ("x_ite/Parser/STLBParser", STLBParser_default_);
|
|
51875
51882
|
/* harmony default export */ const Parser_STLBParser = (STLBParser_default_);
|
|
51876
|
-
;// CONCATENATED MODULE: ./src/standard/Math/
|
|
51883
|
+
;// CONCATENATED MODULE: ./src/standard/Math/Numbers/Complex.js
|
|
51877
51884
|
/*******************************************************************************
|
|
51878
51885
|
*
|
|
51879
51886
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -51921,199 +51928,413 @@ x_ite_Namespace.set ("x_ite/Parser/STLBParser", STLBParser_default_);
|
|
|
51921
51928
|
*
|
|
51922
51929
|
******************************************************************************/
|
|
51923
51930
|
|
|
51924
|
-
|
|
51925
|
-
|
|
51926
|
-
|
|
51927
|
-
function Box2 (size, center)
|
|
51931
|
+
function Complex (real, imag)
|
|
51928
51932
|
{
|
|
51929
|
-
this .
|
|
51930
|
-
|
|
51931
|
-
this .set (... arguments);
|
|
51933
|
+
this .real = real;
|
|
51934
|
+
this .imag = imag;
|
|
51932
51935
|
}
|
|
51933
51936
|
|
|
51934
|
-
|
|
51937
|
+
Complex .prototype =
|
|
51935
51938
|
{
|
|
51936
|
-
constructor:
|
|
51939
|
+
constructor: Complex,
|
|
51940
|
+
[Symbol .iterator]: function* ()
|
|
51941
|
+
{
|
|
51942
|
+
yield this .real;
|
|
51943
|
+
yield this .imag;
|
|
51944
|
+
},
|
|
51937
51945
|
copy: function ()
|
|
51938
51946
|
{
|
|
51939
|
-
const copy = Object .create (
|
|
51940
|
-
copy .
|
|
51947
|
+
const copy = Object .create (Complex .prototype);
|
|
51948
|
+
copy .real = this .real;
|
|
51949
|
+
copy .imag = this .imag;
|
|
51941
51950
|
return copy;
|
|
51942
51951
|
},
|
|
51943
|
-
assign: function (
|
|
51952
|
+
assign: function (complex)
|
|
51944
51953
|
{
|
|
51945
|
-
this .
|
|
51954
|
+
this .real = complex .real;
|
|
51955
|
+
this .imag = complex .imag;
|
|
51946
51956
|
return this;
|
|
51947
51957
|
},
|
|
51948
|
-
equals: function (
|
|
51958
|
+
equals: function (complex)
|
|
51949
51959
|
{
|
|
51950
|
-
return this .
|
|
51960
|
+
return this .real === complex .real &&
|
|
51961
|
+
this .imag === complex .imag;
|
|
51951
51962
|
},
|
|
51952
|
-
|
|
51963
|
+
setPolar: function (magnitude, angle)
|
|
51953
51964
|
{
|
|
51954
|
-
|
|
51955
|
-
|
|
51956
|
-
|
|
51957
|
-
{
|
|
51958
|
-
this .matrix .set (0, 0, 0,
|
|
51959
|
-
0, 0, 0,
|
|
51960
|
-
0, 0, 0);
|
|
51961
|
-
|
|
51962
|
-
return this;
|
|
51963
|
-
}
|
|
51964
|
-
case 2:
|
|
51965
|
-
{
|
|
51966
|
-
this .matrix .set (size .x / 2, 0, 0,
|
|
51967
|
-
0, size .y / 2, 0,
|
|
51968
|
-
center .x, center .y, 1);
|
|
51969
|
-
|
|
51970
|
-
return this;
|
|
51971
|
-
}
|
|
51972
|
-
case 3:
|
|
51973
|
-
{
|
|
51974
|
-
return this .setExtents (arguments [0], arguments [1]);
|
|
51975
|
-
}
|
|
51976
|
-
}
|
|
51965
|
+
this .real = magnitude * Math .cos (angle);
|
|
51966
|
+
this .imag = magnitude * Math .sin (angle);
|
|
51967
|
+
return this;
|
|
51977
51968
|
},
|
|
51978
|
-
|
|
51969
|
+
conjugate: function ()
|
|
51979
51970
|
{
|
|
51980
|
-
|
|
51981
|
-
sx = (max .x - min .x) / 2,
|
|
51982
|
-
sy = (max .y - min .y) / 2,
|
|
51983
|
-
cx = (max .x + min .x) / 2,
|
|
51984
|
-
cy = (max .y + min .y) / 2;
|
|
51985
|
-
|
|
51986
|
-
this .matrix .set (sx, 0, 0,
|
|
51987
|
-
0, sy, 0,
|
|
51988
|
-
cx, cy, 1);
|
|
51989
|
-
|
|
51971
|
+
this .imag = -this .imag;
|
|
51990
51972
|
return this;
|
|
51991
51973
|
},
|
|
51992
|
-
|
|
51974
|
+
negate: function ()
|
|
51993
51975
|
{
|
|
51994
|
-
|
|
51976
|
+
this .real = -this .real;
|
|
51977
|
+
this .imag = -this .imag;
|
|
51978
|
+
return this;
|
|
51995
51979
|
},
|
|
51996
|
-
|
|
51980
|
+
inverse: function ()
|
|
51997
51981
|
{
|
|
51998
|
-
const
|
|
51999
|
-
lhs_min = new Numbers_Vector2 (0, 0),
|
|
52000
|
-
lhs_max = new Numbers_Vector2 (0, 0),
|
|
52001
|
-
rhs_min = new Numbers_Vector2 (0, 0),
|
|
52002
|
-
rhs_max = new Numbers_Vector2 (0, 0);
|
|
52003
|
-
|
|
52004
|
-
return function (box)
|
|
52005
|
-
{
|
|
52006
|
-
if (this .isEmpty ())
|
|
52007
|
-
return this .assign (box);
|
|
52008
|
-
|
|
52009
|
-
if (box .isEmpty ())
|
|
52010
|
-
return this;
|
|
52011
|
-
|
|
52012
|
-
this .getExtents (lhs_min, lhs_max);
|
|
52013
|
-
box .getExtents (rhs_min, rhs_max);
|
|
51982
|
+
const d = this .real * this .real + this .imag * this .imag;
|
|
52014
51983
|
|
|
52015
|
-
|
|
52016
|
-
|
|
52017
|
-
|
|
52018
|
-
|
|
51984
|
+
this .real /= d;
|
|
51985
|
+
this .imag /= -d;
|
|
51986
|
+
return this;
|
|
51987
|
+
},
|
|
51988
|
+
add: function (value)
|
|
52019
51989
|
{
|
|
52020
|
-
this .
|
|
51990
|
+
this .real += value .real;
|
|
51991
|
+
this .imag += value .imag;
|
|
52021
51992
|
return this;
|
|
52022
51993
|
},
|
|
52023
|
-
|
|
51994
|
+
subtract: function (value)
|
|
52024
51995
|
{
|
|
52025
|
-
this .
|
|
51996
|
+
this .real -= value .real;
|
|
51997
|
+
this .imag -= value .imag;
|
|
52026
51998
|
return this;
|
|
52027
51999
|
},
|
|
52028
|
-
|
|
52000
|
+
multiply: function (value)
|
|
52029
52001
|
{
|
|
52030
|
-
this .
|
|
52031
|
-
|
|
52032
|
-
|
|
52033
|
-
max .add (this .center);
|
|
52002
|
+
this .real *= value;
|
|
52003
|
+
this .imag *= value;
|
|
52004
|
+
return this;
|
|
52034
52005
|
},
|
|
52035
|
-
|
|
52006
|
+
multComp: function (value)
|
|
52036
52007
|
{
|
|
52037
|
-
const
|
|
52038
|
-
|
|
52039
|
-
|
|
52040
|
-
{
|
|
52041
|
-
const
|
|
52042
|
-
m = this .matrix,
|
|
52043
|
-
x = m .xAxis,
|
|
52044
|
-
y = m .yAxis;
|
|
52045
|
-
|
|
52046
|
-
p1 .assign (x) .add (y);
|
|
52047
|
-
|
|
52048
|
-
const p2 = y .subtract (x);
|
|
52049
|
-
|
|
52050
|
-
min .assign (p1) .min (p2);
|
|
52051
|
-
max .assign (p1) .max (p2);
|
|
52052
|
-
|
|
52053
|
-
p1 .negate ();
|
|
52054
|
-
p2 .negate ();
|
|
52008
|
+
const
|
|
52009
|
+
{ real: ar, imag: ai } = this,
|
|
52010
|
+
{ real: br, imag: bi } = value;
|
|
52055
52011
|
|
|
52056
|
-
|
|
52057
|
-
|
|
52058
|
-
|
|
52059
|
-
}
|
|
52060
|
-
|
|
52012
|
+
this .real = ar * br - ai * bi;
|
|
52013
|
+
this .imag = ar * bi + ai * br;
|
|
52014
|
+
return this;
|
|
52015
|
+
},
|
|
52016
|
+
//divide: function (value)
|
|
52017
|
+
//{
|
|
52018
|
+
// return this;
|
|
52019
|
+
//},
|
|
52020
|
+
divComp: function (value)
|
|
52061
52021
|
{
|
|
52062
52022
|
const
|
|
52063
|
-
|
|
52064
|
-
|
|
52065
|
-
|
|
52066
|
-
return function (point)
|
|
52067
|
-
{
|
|
52068
|
-
this .getExtents (min, max);
|
|
52023
|
+
{ real: ar, imag: ai } = this,
|
|
52024
|
+
{ real: br, imag: bi } = value,
|
|
52025
|
+
d = br * br + bi * bi;
|
|
52069
52026
|
|
|
52070
|
-
|
|
52071
|
-
|
|
52072
|
-
|
|
52073
|
-
|
|
52074
|
-
};
|
|
52075
|
-
})(),
|
|
52027
|
+
this .real = (ar * br + ai * bi) / d;
|
|
52028
|
+
this .imag = (ai * br - ar * bi) / d;
|
|
52029
|
+
return this;
|
|
52030
|
+
},
|
|
52076
52031
|
toString: function ()
|
|
52077
52032
|
{
|
|
52078
|
-
|
|
52033
|
+
if (this .imag)
|
|
52034
|
+
return this .real + " " + this .imag + "i";
|
|
52035
|
+
|
|
52036
|
+
return String (this .real);
|
|
52079
52037
|
},
|
|
52080
52038
|
};
|
|
52081
52039
|
|
|
52082
|
-
Object .defineProperty (
|
|
52040
|
+
Object .defineProperty (Complex .prototype, "magnitude",
|
|
52083
52041
|
{
|
|
52084
|
-
get:
|
|
52042
|
+
get: function ()
|
|
52085
52043
|
{
|
|
52086
|
-
|
|
52087
|
-
min = new Numbers_Vector2 (0, 0),
|
|
52088
|
-
max = new Numbers_Vector2 (0, 0);
|
|
52089
|
-
|
|
52090
|
-
return function ()
|
|
52044
|
+
if (this .real)
|
|
52091
52045
|
{
|
|
52092
|
-
this .
|
|
52046
|
+
if (this .imag)
|
|
52047
|
+
return Math .hypot (this .real, this .imag);
|
|
52093
52048
|
|
|
52094
|
-
return
|
|
52095
|
-
}
|
|
52096
|
-
|
|
52097
|
-
|
|
52049
|
+
return Math .abs (this .real);
|
|
52050
|
+
}
|
|
52051
|
+
|
|
52052
|
+
return Math .abs (this .imag);
|
|
52053
|
+
},
|
|
52054
|
+
set: function (magnitude)
|
|
52055
|
+
{
|
|
52056
|
+
this .setPolar (magnitude, this .angle);
|
|
52057
|
+
},
|
|
52058
|
+
enumerable: false,
|
|
52098
52059
|
configurable: false
|
|
52099
52060
|
});
|
|
52100
52061
|
|
|
52101
|
-
Object .defineProperty (
|
|
52062
|
+
Object .defineProperty (Complex .prototype, "angle",
|
|
52102
52063
|
{
|
|
52103
52064
|
get: function ()
|
|
52104
52065
|
{
|
|
52105
|
-
return this .
|
|
52066
|
+
return Math .atan2 (this .imag, this .real);
|
|
52106
52067
|
},
|
|
52107
|
-
|
|
52068
|
+
set: function (angle)
|
|
52069
|
+
{
|
|
52070
|
+
this .setPolar (this .magnitude, angle);
|
|
52071
|
+
},
|
|
52072
|
+
enumerable: false,
|
|
52108
52073
|
configurable: false
|
|
52109
52074
|
});
|
|
52110
52075
|
|
|
52111
|
-
|
|
52076
|
+
Object .assign (Complex,
|
|
52077
|
+
{
|
|
52078
|
+
Polar: function (magnitude, angle)
|
|
52079
|
+
{
|
|
52080
|
+
return Object .create (Complex .prototype) .setPolar (magnitude, angle);
|
|
52081
|
+
},
|
|
52082
|
+
multiply: function (lhs, rhs)
|
|
52083
|
+
{
|
|
52084
|
+
return lhs .copy () .multiply (rhs);
|
|
52085
|
+
},
|
|
52086
|
+
multComp: function (lhs, rhs)
|
|
52087
|
+
{
|
|
52088
|
+
return lhs .copy () .multComp (rhs);
|
|
52089
|
+
},
|
|
52090
|
+
});
|
|
52091
|
+
|
|
52092
|
+
const Complex_default_ = Complex;
|
|
52112
52093
|
;
|
|
52113
52094
|
|
|
52114
|
-
x_ite_Namespace.set ("standard/Math/
|
|
52115
|
-
/* harmony default export */ const
|
|
52116
|
-
;// CONCATENATED MODULE: ./src/standard/Math/
|
|
52095
|
+
x_ite_Namespace.set ("standard/Math/Numbers/Complex", Complex_default_);
|
|
52096
|
+
/* harmony default export */ const Numbers_Complex = (Complex_default_);
|
|
52097
|
+
;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Box2.js
|
|
52098
|
+
/*******************************************************************************
|
|
52099
|
+
*
|
|
52100
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
52101
|
+
*
|
|
52102
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
52103
|
+
*
|
|
52104
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
52105
|
+
*
|
|
52106
|
+
* The copyright notice above does not evidence any actual of intended
|
|
52107
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
52108
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
52109
|
+
* create3000.
|
|
52110
|
+
*
|
|
52111
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
52112
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
52113
|
+
* permission of create3000.
|
|
52114
|
+
*
|
|
52115
|
+
* NON-MILITARY USE ONLY
|
|
52116
|
+
*
|
|
52117
|
+
* All create3000 software are effectively free software with a non-military use
|
|
52118
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
52119
|
+
* source in any way you please with the exception anything that uses it must be
|
|
52120
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
52121
|
+
*
|
|
52122
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
52123
|
+
*
|
|
52124
|
+
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
52125
|
+
*
|
|
52126
|
+
* This file is part of the X_ITE Project.
|
|
52127
|
+
*
|
|
52128
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
52129
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
52130
|
+
* Free Software Foundation.
|
|
52131
|
+
*
|
|
52132
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
52133
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
52134
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
52135
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
52136
|
+
*
|
|
52137
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
52138
|
+
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
52139
|
+
* copy of the GPLv3 License.
|
|
52140
|
+
*
|
|
52141
|
+
* For Silvio, Joy and Adi.
|
|
52142
|
+
*
|
|
52143
|
+
******************************************************************************/
|
|
52144
|
+
|
|
52145
|
+
|
|
52146
|
+
|
|
52147
|
+
|
|
52148
|
+
function Box2 (size, center)
|
|
52149
|
+
{
|
|
52150
|
+
this .matrix = new Numbers_Matrix3 ();
|
|
52151
|
+
|
|
52152
|
+
this .set (... arguments);
|
|
52153
|
+
}
|
|
52154
|
+
|
|
52155
|
+
Box2 .prototype =
|
|
52156
|
+
{
|
|
52157
|
+
constructor: Box2,
|
|
52158
|
+
copy: function ()
|
|
52159
|
+
{
|
|
52160
|
+
const copy = Object .create (Box2 .prototype);
|
|
52161
|
+
copy .matrix = this .matrix .copy ();
|
|
52162
|
+
return copy;
|
|
52163
|
+
},
|
|
52164
|
+
assign: function (box)
|
|
52165
|
+
{
|
|
52166
|
+
this .matrix .assign (box .matrix);
|
|
52167
|
+
return this;
|
|
52168
|
+
},
|
|
52169
|
+
equals: function (box)
|
|
52170
|
+
{
|
|
52171
|
+
return this .matrix .equals (box .matrix);
|
|
52172
|
+
},
|
|
52173
|
+
set: function (size, center)
|
|
52174
|
+
{
|
|
52175
|
+
switch (arguments .length)
|
|
52176
|
+
{
|
|
52177
|
+
case 0:
|
|
52178
|
+
{
|
|
52179
|
+
this .matrix .set (0, 0, 0,
|
|
52180
|
+
0, 0, 0,
|
|
52181
|
+
0, 0, 0);
|
|
52182
|
+
|
|
52183
|
+
return this;
|
|
52184
|
+
}
|
|
52185
|
+
case 2:
|
|
52186
|
+
{
|
|
52187
|
+
this .matrix .set (size .x / 2, 0, 0,
|
|
52188
|
+
0, size .y / 2, 0,
|
|
52189
|
+
center .x, center .y, 1);
|
|
52190
|
+
|
|
52191
|
+
return this;
|
|
52192
|
+
}
|
|
52193
|
+
case 3:
|
|
52194
|
+
{
|
|
52195
|
+
return this .setExtents (arguments [0], arguments [1]);
|
|
52196
|
+
}
|
|
52197
|
+
}
|
|
52198
|
+
},
|
|
52199
|
+
setExtents: function (min, max)
|
|
52200
|
+
{
|
|
52201
|
+
const
|
|
52202
|
+
sx = (max .x - min .x) / 2,
|
|
52203
|
+
sy = (max .y - min .y) / 2,
|
|
52204
|
+
cx = (max .x + min .x) / 2,
|
|
52205
|
+
cy = (max .y + min .y) / 2;
|
|
52206
|
+
|
|
52207
|
+
this .matrix .set (sx, 0, 0,
|
|
52208
|
+
0, sy, 0,
|
|
52209
|
+
cx, cy, 1);
|
|
52210
|
+
|
|
52211
|
+
return this;
|
|
52212
|
+
},
|
|
52213
|
+
isEmpty: function ()
|
|
52214
|
+
{
|
|
52215
|
+
return this .matrix [8] === 0;
|
|
52216
|
+
},
|
|
52217
|
+
add: (function ()
|
|
52218
|
+
{
|
|
52219
|
+
const
|
|
52220
|
+
lhs_min = new Numbers_Vector2 (0, 0),
|
|
52221
|
+
lhs_max = new Numbers_Vector2 (0, 0),
|
|
52222
|
+
rhs_min = new Numbers_Vector2 (0, 0),
|
|
52223
|
+
rhs_max = new Numbers_Vector2 (0, 0);
|
|
52224
|
+
|
|
52225
|
+
return function (box)
|
|
52226
|
+
{
|
|
52227
|
+
if (this .isEmpty ())
|
|
52228
|
+
return this .assign (box);
|
|
52229
|
+
|
|
52230
|
+
if (box .isEmpty ())
|
|
52231
|
+
return this;
|
|
52232
|
+
|
|
52233
|
+
this .getExtents (lhs_min, lhs_max);
|
|
52234
|
+
box .getExtents (rhs_min, rhs_max);
|
|
52235
|
+
|
|
52236
|
+
return this .set (lhs_min .min (rhs_min), lhs_max .max (rhs_max), true);
|
|
52237
|
+
};
|
|
52238
|
+
})(),
|
|
52239
|
+
multLeft: function (matrix)
|
|
52240
|
+
{
|
|
52241
|
+
this .matrix .multLeft (matrix);
|
|
52242
|
+
return this;
|
|
52243
|
+
},
|
|
52244
|
+
multRight: function (matrix)
|
|
52245
|
+
{
|
|
52246
|
+
this .matrix .multRight (matrix);
|
|
52247
|
+
return this;
|
|
52248
|
+
},
|
|
52249
|
+
getExtents: function (min, max)
|
|
52250
|
+
{
|
|
52251
|
+
this .getAbsoluteExtents (min, max);
|
|
52252
|
+
|
|
52253
|
+
min .add (this .center);
|
|
52254
|
+
max .add (this .center);
|
|
52255
|
+
},
|
|
52256
|
+
getAbsoluteExtents: (function ()
|
|
52257
|
+
{
|
|
52258
|
+
const p1 = new Numbers_Vector2 (0, 0);
|
|
52259
|
+
|
|
52260
|
+
return function (min, max)
|
|
52261
|
+
{
|
|
52262
|
+
const
|
|
52263
|
+
m = this .matrix,
|
|
52264
|
+
x = m .xAxis,
|
|
52265
|
+
y = m .yAxis;
|
|
52266
|
+
|
|
52267
|
+
p1 .assign (x) .add (y);
|
|
52268
|
+
|
|
52269
|
+
const p2 = y .subtract (x);
|
|
52270
|
+
|
|
52271
|
+
min .assign (p1) .min (p2);
|
|
52272
|
+
max .assign (p1) .max (p2);
|
|
52273
|
+
|
|
52274
|
+
p1 .negate ();
|
|
52275
|
+
p2 .negate ();
|
|
52276
|
+
|
|
52277
|
+
min .min (p1, p2);
|
|
52278
|
+
max .max (p1, p2);
|
|
52279
|
+
};
|
|
52280
|
+
})(),
|
|
52281
|
+
containsPoint: (function ()
|
|
52282
|
+
{
|
|
52283
|
+
const
|
|
52284
|
+
min = new Numbers_Vector2 (0, 0),
|
|
52285
|
+
max = new Numbers_Vector2 (0, 0);
|
|
52286
|
+
|
|
52287
|
+
return function (point)
|
|
52288
|
+
{
|
|
52289
|
+
this .getExtents (min, max);
|
|
52290
|
+
|
|
52291
|
+
return min .x <= point .x &&
|
|
52292
|
+
max .x >= point .x &&
|
|
52293
|
+
min .y <= point .y &&
|
|
52294
|
+
max .y >= point .y;
|
|
52295
|
+
};
|
|
52296
|
+
})(),
|
|
52297
|
+
toString: function ()
|
|
52298
|
+
{
|
|
52299
|
+
return this .size + ", " + this .center;
|
|
52300
|
+
},
|
|
52301
|
+
};
|
|
52302
|
+
|
|
52303
|
+
Object .defineProperty (Box2 .prototype, "size",
|
|
52304
|
+
{
|
|
52305
|
+
get: (function ()
|
|
52306
|
+
{
|
|
52307
|
+
const
|
|
52308
|
+
min = new Numbers_Vector2 (0, 0),
|
|
52309
|
+
max = new Numbers_Vector2 (0, 0);
|
|
52310
|
+
|
|
52311
|
+
return function ()
|
|
52312
|
+
{
|
|
52313
|
+
this .getAbsoluteExtents (min, max);
|
|
52314
|
+
|
|
52315
|
+
return max .subtract (min);
|
|
52316
|
+
};
|
|
52317
|
+
})(),
|
|
52318
|
+
enumerable: true,
|
|
52319
|
+
configurable: false
|
|
52320
|
+
});
|
|
52321
|
+
|
|
52322
|
+
Object .defineProperty (Box2 .prototype, "center",
|
|
52323
|
+
{
|
|
52324
|
+
get: function ()
|
|
52325
|
+
{
|
|
52326
|
+
return this .matrix .origin;
|
|
52327
|
+
},
|
|
52328
|
+
enumerable: true,
|
|
52329
|
+
configurable: false
|
|
52330
|
+
});
|
|
52331
|
+
|
|
52332
|
+
const Box2_default_ = Box2;
|
|
52333
|
+
;
|
|
52334
|
+
|
|
52335
|
+
x_ite_Namespace.set ("standard/Math/Geometry/Box2", Box2_default_);
|
|
52336
|
+
/* harmony default export */ const Geometry_Box2 = (Box2_default_);
|
|
52337
|
+
;// CONCATENATED MODULE: ./src/standard/Math/Algorithms/Bezier.js
|
|
52117
52338
|
/*******************************************************************************
|
|
52118
52339
|
*
|
|
52119
52340
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -52350,9 +52571,128 @@ const Bezier_default_ = Bezier;
|
|
|
52350
52571
|
|
|
52351
52572
|
x_ite_Namespace.set ("standard/Math/Algorithms/Bezier", Bezier_default_);
|
|
52352
52573
|
/* harmony default export */ const Algorithms_Bezier = (Bezier_default_);
|
|
52574
|
+
;// CONCATENATED MODULE: ./src/standard/Math/Utility/MatrixStack.js
|
|
52575
|
+
/*******************************************************************************
|
|
52576
|
+
*
|
|
52577
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
52578
|
+
*
|
|
52579
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
52580
|
+
*
|
|
52581
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
52582
|
+
*
|
|
52583
|
+
* The copyright notice above does not evidence any actual of intended
|
|
52584
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
52585
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
52586
|
+
* create3000.
|
|
52587
|
+
*
|
|
52588
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
52589
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
52590
|
+
* permission of create3000.
|
|
52591
|
+
*
|
|
52592
|
+
* NON-MILITARY USE ONLY
|
|
52593
|
+
*
|
|
52594
|
+
* All create3000 software are effectively free software with a non-military use
|
|
52595
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
52596
|
+
* source in any way you please with the exception anything that uses it must be
|
|
52597
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
52598
|
+
*
|
|
52599
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
52600
|
+
*
|
|
52601
|
+
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
52602
|
+
*
|
|
52603
|
+
* This file is part of the X_ITE Project.
|
|
52604
|
+
*
|
|
52605
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
52606
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
52607
|
+
* Free Software Foundation.
|
|
52608
|
+
*
|
|
52609
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
52610
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
52611
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
52612
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
52613
|
+
*
|
|
52614
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
52615
|
+
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
52616
|
+
* copy of the GPLv3 License.
|
|
52617
|
+
*
|
|
52618
|
+
* For Silvio, Joy and Adi.
|
|
52619
|
+
*
|
|
52620
|
+
******************************************************************************/
|
|
52621
|
+
|
|
52622
|
+
function MatrixStack (Type)
|
|
52623
|
+
{
|
|
52624
|
+
return Object .assign ([ new Type () ],
|
|
52625
|
+
{
|
|
52626
|
+
top: 0,
|
|
52627
|
+
set: function (matrix)
|
|
52628
|
+
{
|
|
52629
|
+
this [this .top] .assign (matrix);
|
|
52630
|
+
},
|
|
52631
|
+
get: function ()
|
|
52632
|
+
{
|
|
52633
|
+
return this [this .top];
|
|
52634
|
+
},
|
|
52635
|
+
push: function ()
|
|
52636
|
+
{
|
|
52637
|
+
const top = ++ this .top;
|
|
52638
|
+
|
|
52639
|
+
if (top < this .length)
|
|
52640
|
+
this [top] .assign (this [top - 1]);
|
|
52641
|
+
else
|
|
52642
|
+
this [top] = this [top - 1] .copy ();
|
|
52643
|
+
},
|
|
52644
|
+
pushMatrix: function (matrix)
|
|
52645
|
+
{
|
|
52646
|
+
const top = ++ this .top;
|
|
52647
|
+
|
|
52648
|
+
if (top < this .length)
|
|
52649
|
+
this [top] .assign (matrix);
|
|
52650
|
+
else
|
|
52651
|
+
this [top] = matrix .copy ();
|
|
52652
|
+
},
|
|
52653
|
+
pop: function ()
|
|
52654
|
+
{
|
|
52655
|
+
-- this .top;
|
|
52656
|
+
},
|
|
52657
|
+
clear: function ()
|
|
52658
|
+
{
|
|
52659
|
+
this .top = 0;
|
|
52660
|
+
},
|
|
52661
|
+
size: function ()
|
|
52662
|
+
{
|
|
52663
|
+
return this .top + 1;
|
|
52664
|
+
},
|
|
52665
|
+
identity: function ()
|
|
52666
|
+
{
|
|
52667
|
+
this [this .top] .identity ();
|
|
52668
|
+
},
|
|
52669
|
+
multLeft: function (matrix)
|
|
52670
|
+
{
|
|
52671
|
+
this [this .top] .multLeft (matrix);
|
|
52672
|
+
},
|
|
52673
|
+
translate: function (vector)
|
|
52674
|
+
{
|
|
52675
|
+
this [this .top] .translate (vector);
|
|
52676
|
+
},
|
|
52677
|
+
rotate: function (rotation)
|
|
52678
|
+
{
|
|
52679
|
+
this [this .top] .rotate (rotation);
|
|
52680
|
+
},
|
|
52681
|
+
scale: function (vector)
|
|
52682
|
+
{
|
|
52683
|
+
this [this .top] .scale (vector);
|
|
52684
|
+
},
|
|
52685
|
+
});
|
|
52686
|
+
}
|
|
52687
|
+
|
|
52688
|
+
const MatrixStack_default_ = MatrixStack;
|
|
52689
|
+
;
|
|
52690
|
+
|
|
52691
|
+
x_ite_Namespace.set ("standard/Math/Utility/MatrixStack", MatrixStack_default_);
|
|
52692
|
+
/* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
|
|
52353
52693
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
|
|
52354
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
52355
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
52694
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(765);
|
|
52695
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(241);
|
|
52356
52696
|
/*******************************************************************************
|
|
52357
52697
|
*
|
|
52358
52698
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -52415,6 +52755,8 @@ x_ite_Namespace.set ("standard/Math/Algorithms/Bezier", Bezier_default_);
|
|
|
52415
52755
|
|
|
52416
52756
|
|
|
52417
52757
|
|
|
52758
|
+
|
|
52759
|
+
|
|
52418
52760
|
/*
|
|
52419
52761
|
* Grammar
|
|
52420
52762
|
*/
|
|
@@ -52428,7 +52770,7 @@ const SVGParser_Grammar = Parser_Expressions ({
|
|
|
52428
52770
|
closeParenthesis: /\)/gy,
|
|
52429
52771
|
|
|
52430
52772
|
// Units
|
|
52431
|
-
length: /(em|ex|px|in|cm|mm|pt|pc)/gy,
|
|
52773
|
+
length: /(em|ex|px|in|cm|mm|pt|pc|%)/gy,
|
|
52432
52774
|
percent: /%/gy,
|
|
52433
52775
|
|
|
52434
52776
|
// Values
|
|
@@ -52451,16 +52793,14 @@ const SVGParser_Grammar = Parser_Expressions ({
|
|
|
52451
52793
|
*/
|
|
52452
52794
|
|
|
52453
52795
|
const
|
|
52454
|
-
MM
|
|
52455
|
-
CM
|
|
52456
|
-
INCH
|
|
52457
|
-
POINT
|
|
52458
|
-
PICA
|
|
52459
|
-
PIXEL
|
|
52460
|
-
EM
|
|
52461
|
-
|
|
52462
|
-
CIRCLE_STEPS = 64, // Subdivisions of a circle, used for arc.
|
|
52463
|
-
GRADIENT_SIZE = 256; // In pixels.
|
|
52796
|
+
MM = 0.001, // One mm in meters.
|
|
52797
|
+
CM = 0.01, // One cm in meters.
|
|
52798
|
+
INCH = 0.0254, // One inch in meters.
|
|
52799
|
+
POINT = INCH / 72, // One point in meters.
|
|
52800
|
+
PICA = INCH / 6, // One pica in meters.
|
|
52801
|
+
PIXEL = INCH / 90, // One pixel in meters.
|
|
52802
|
+
EM = 16, // One em in pixels.
|
|
52803
|
+
SPREAD = 16; // Spread factor, Integer.
|
|
52464
52804
|
|
|
52465
52805
|
/*
|
|
52466
52806
|
* Parser
|
|
@@ -52479,17 +52819,18 @@ function SVGParser (scene)
|
|
|
52479
52819
|
|
|
52480
52820
|
// Options
|
|
52481
52821
|
|
|
52482
|
-
this .solid = false; // Are 2D primitives solid
|
|
52822
|
+
this .solid = false; // Are 2D primitives solid?
|
|
52483
52823
|
|
|
52484
52824
|
// Globals
|
|
52485
52825
|
|
|
52486
|
-
this .
|
|
52487
|
-
this .
|
|
52488
|
-
this .
|
|
52489
|
-
this .
|
|
52490
|
-
|
|
52491
|
-
this .
|
|
52492
|
-
this .canvas .
|
|
52826
|
+
this .viewBox = new Numbers_Vector4 (0, 0, 100, 100);
|
|
52827
|
+
this .modelMatrix = new Utility_MatrixStack (Numbers_Matrix4);
|
|
52828
|
+
this .fillGeometries = new Map ();
|
|
52829
|
+
this .strokeGeometries = new Map ();
|
|
52830
|
+
this .lineProperties = new Map ();
|
|
52831
|
+
this .tessy = this .createTesselator ();
|
|
52832
|
+
this .canvas = document .createElement ("canvas");
|
|
52833
|
+
this .context = this .canvas .getContext ("2d");
|
|
52493
52834
|
|
|
52494
52835
|
this .styles = [{
|
|
52495
52836
|
display: "inline",
|
|
@@ -52508,6 +52849,42 @@ function SVGParser (scene)
|
|
|
52508
52849
|
stopOpacity: 1,
|
|
52509
52850
|
vectorEffect: "none",
|
|
52510
52851
|
}];
|
|
52852
|
+
|
|
52853
|
+
// Constants
|
|
52854
|
+
|
|
52855
|
+
const browser = scene .getBrowser ()
|
|
52856
|
+
|
|
52857
|
+
switch (browser .getBrowserOption ("PrimitiveQuality"))
|
|
52858
|
+
{
|
|
52859
|
+
case "LOW":
|
|
52860
|
+
this .BEZIER_STEPS = 6; // Subdivisions of a span.
|
|
52861
|
+
this .CIRCLE_STEPS = 20; // Subdivisions of a circle, used for arc and rounded rect.
|
|
52862
|
+
break;
|
|
52863
|
+
case "HIGH":
|
|
52864
|
+
this .BEZIER_STEPS = 10; // Subdivisions of a span.
|
|
52865
|
+
this .CIRCLE_STEPS = 64; // Subdivisions of a circle, used for arc and rounded rect.
|
|
52866
|
+
break;
|
|
52867
|
+
default:
|
|
52868
|
+
this .BEZIER_STEPS = 8; // Subdivisions of a span.
|
|
52869
|
+
this .CIRCLE_STEPS = 32; // Subdivisions of a circle, used for arc and rounded rect.
|
|
52870
|
+
break;
|
|
52871
|
+
}
|
|
52872
|
+
|
|
52873
|
+
switch (browser .getBrowserOption ("TextureQuality"))
|
|
52874
|
+
{
|
|
52875
|
+
case "LOW":
|
|
52876
|
+
this .GRADIENT_SIZE = 128; // In pixels.
|
|
52877
|
+
break;
|
|
52878
|
+
case "HIGH":
|
|
52879
|
+
this .GRADIENT_SIZE = 512; // In pixels.
|
|
52880
|
+
break;
|
|
52881
|
+
default:
|
|
52882
|
+
this .GRADIENT_SIZE = 256; // In pixels.
|
|
52883
|
+
break;
|
|
52884
|
+
}
|
|
52885
|
+
|
|
52886
|
+
this .canvas .width = this .GRADIENT_SIZE;
|
|
52887
|
+
this .canvas .height = this .GRADIENT_SIZE;
|
|
52511
52888
|
}
|
|
52512
52889
|
|
|
52513
52890
|
SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototype),
|
|
@@ -52616,16 +52993,16 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52616
52993
|
// Get attributes of svg element.
|
|
52617
52994
|
|
|
52618
52995
|
const
|
|
52619
|
-
defaultWidth = this .lengthAttribute (xmlElement .getAttribute ("width"),
|
|
52620
|
-
defaultHeight = this .lengthAttribute (xmlElement .getAttribute ("height"), 150),
|
|
52621
|
-
defaultViewBox =
|
|
52996
|
+
defaultWidth = this .lengthAttribute (xmlElement .getAttribute ("width"), 300, "width"),
|
|
52997
|
+
defaultHeight = this .lengthAttribute (xmlElement .getAttribute ("height"), 150, "height"),
|
|
52998
|
+
defaultViewBox = this .viewBox .set (0, 0, defaultWidth, defaultHeight),
|
|
52622
52999
|
viewBox = this .viewBoxAttribute (xmlElement .getAttribute ("viewBox"), defaultViewBox),
|
|
52623
|
-
width = this .lengthAttribute (xmlElement .getAttribute ("width"),
|
|
52624
|
-
height = this .lengthAttribute (xmlElement .getAttribute ("height"), viewBox [3]);
|
|
53000
|
+
width = this .lengthAttribute (xmlElement .getAttribute ("width"), viewBox [2], "width"),
|
|
53001
|
+
height = this .lengthAttribute (xmlElement .getAttribute ("height"), viewBox [3], "height");
|
|
52625
53002
|
|
|
52626
53003
|
if (true) // default
|
|
52627
53004
|
{
|
|
52628
|
-
// preserveAspectRatio="xMidYMid meet"
|
|
53005
|
+
// preserveAspectRatio = "xMidYMid meet"
|
|
52629
53006
|
|
|
52630
53007
|
const
|
|
52631
53008
|
r = width / height,
|
|
@@ -52685,9 +53062,6 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52685
53062
|
},
|
|
52686
53063
|
element: function (xmlElement)
|
|
52687
53064
|
{
|
|
52688
|
-
if (this .used (xmlElement))
|
|
52689
|
-
return;
|
|
52690
|
-
|
|
52691
53065
|
switch (xmlElement .nodeName)
|
|
52692
53066
|
{
|
|
52693
53067
|
case "use":
|
|
@@ -52716,22 +53090,11 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52716
53090
|
return this .pathElement (xmlElement);
|
|
52717
53091
|
}
|
|
52718
53092
|
},
|
|
52719
|
-
used: function (xmlElement)
|
|
52720
|
-
{
|
|
52721
|
-
const node = this .nodes .get (xmlElement);
|
|
52722
|
-
|
|
52723
|
-
if (!node)
|
|
52724
|
-
return false;
|
|
52725
|
-
|
|
52726
|
-
this .groupNodes .at (-1) .children .push (node);
|
|
52727
|
-
|
|
52728
|
-
return true;
|
|
52729
|
-
},
|
|
52730
53093
|
useElement: function (xmlElement)
|
|
52731
53094
|
{
|
|
52732
53095
|
// Get href.
|
|
52733
53096
|
|
|
52734
|
-
const usedElement = this .hrefAttribute (xmlElement .getAttribute ("xlink:href"));
|
|
53097
|
+
const usedElement = this .hrefAttribute (xmlElement .getAttribute ("href") || xmlElement .getAttribute ("xlink:href"));
|
|
52735
53098
|
|
|
52736
53099
|
if (!usedElement)
|
|
52737
53100
|
return;
|
|
@@ -52744,10 +53107,10 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52744
53107
|
// Create Transform node.
|
|
52745
53108
|
|
|
52746
53109
|
const
|
|
52747
|
-
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0),
|
|
52748
|
-
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0),
|
|
52749
|
-
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0),
|
|
52750
|
-
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0);
|
|
53110
|
+
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0, "width"),
|
|
53111
|
+
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0, "height"),
|
|
53112
|
+
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0, "width"),
|
|
53113
|
+
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0, "height");
|
|
52751
53114
|
|
|
52752
53115
|
const transformNode = this .createTransform (xmlElement, new Numbers_Vector2 (x, y));
|
|
52753
53116
|
|
|
@@ -52755,12 +53118,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52755
53118
|
|
|
52756
53119
|
this .element (usedElement);
|
|
52757
53120
|
|
|
52758
|
-
this .
|
|
52759
|
-
this .groupNodes .pop ();
|
|
52760
|
-
|
|
52761
|
-
// Add node.
|
|
52762
|
-
|
|
52763
|
-
this .groupNodes .at (-1) .children .push (transformNode);
|
|
53121
|
+
this .popAll ();
|
|
52764
53122
|
},
|
|
52765
53123
|
gElement: function (xmlElement)
|
|
52766
53124
|
{
|
|
@@ -52779,12 +53137,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52779
53137
|
|
|
52780
53138
|
this .elements (xmlElement);
|
|
52781
53139
|
|
|
52782
|
-
this .
|
|
52783
|
-
this .groupNodes .pop ();
|
|
52784
|
-
|
|
52785
|
-
// Add node.
|
|
52786
|
-
|
|
52787
|
-
this .groupNodes .at (-1) .children .push (transformNode);
|
|
53140
|
+
this .popAll ();
|
|
52788
53141
|
},
|
|
52789
53142
|
switchElement: function (xmlElement)
|
|
52790
53143
|
{
|
|
@@ -52809,12 +53162,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52809
53162
|
|
|
52810
53163
|
this .elements (xmlElement);
|
|
52811
53164
|
|
|
52812
|
-
this .
|
|
52813
|
-
this .groupNodes .pop ();
|
|
52814
|
-
|
|
52815
|
-
// Add node.
|
|
52816
|
-
|
|
52817
|
-
this .groupNodes .at (-1) .children .push (transformNode);
|
|
53165
|
+
this .popAll ();
|
|
52818
53166
|
},
|
|
52819
53167
|
aElement: function (xmlElement)
|
|
52820
53168
|
{
|
|
@@ -52826,8 +53174,8 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52826
53174
|
// Get attributes.
|
|
52827
53175
|
|
|
52828
53176
|
const
|
|
52829
|
-
href = xmlElement .getAttribute ("xlink:href"),
|
|
52830
|
-
title = xmlElement .getAttribute ("xlink:title"),
|
|
53177
|
+
href = xmlElement .getAttribute ("href") || xmlElement .getAttribute ("xlink:href"),
|
|
53178
|
+
title = xmlElement .getAttribute ("title") || xmlElement .getAttribute ("xlink:title"),
|
|
52831
53179
|
target = xmlElement .getAttribute ("target");
|
|
52832
53180
|
|
|
52833
53181
|
// Create Transform node.
|
|
@@ -52851,75 +53199,134 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52851
53199
|
|
|
52852
53200
|
this .elements (xmlElement);
|
|
52853
53201
|
|
|
52854
|
-
this .
|
|
52855
|
-
this .styles .pop ();
|
|
52856
|
-
|
|
52857
|
-
this .groupNodes .at (-1) .children .push (transformNode);
|
|
53202
|
+
this .popAll ();
|
|
52858
53203
|
},
|
|
52859
53204
|
rectElement: function (xmlElement)
|
|
52860
53205
|
{
|
|
52861
|
-
// Determine style.
|
|
52862
|
-
|
|
52863
|
-
if (!this .styleAttributes (xmlElement))
|
|
52864
|
-
return;
|
|
52865
|
-
|
|
52866
53206
|
// Create Transform node.
|
|
52867
53207
|
|
|
52868
53208
|
const
|
|
52869
|
-
x = this .lengthAttribute (xmlElement .getAttribute ("x"),
|
|
52870
|
-
y = this .lengthAttribute (xmlElement .getAttribute ("y"),
|
|
52871
|
-
width = this .lengthAttribute (xmlElement .getAttribute ("width"),
|
|
52872
|
-
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0);
|
|
53209
|
+
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0, "width"),
|
|
53210
|
+
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0, "height"),
|
|
53211
|
+
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0, "width"),
|
|
53212
|
+
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0, "height");
|
|
52873
53213
|
|
|
52874
|
-
|
|
52875
|
-
|
|
52876
|
-
|
|
52877
|
-
center = new Numbers_Vector2 (x + width / 2, y + height / 2),
|
|
52878
|
-
bbox = new Geometry_Box2 (size, center),
|
|
52879
|
-
transformNode = this .createTransform (xmlElement, center);
|
|
53214
|
+
let
|
|
53215
|
+
rx = Math .max (0, this .lengthAttribute (xmlElement .getAttribute ("rx"), 0, "width")),
|
|
53216
|
+
ry = Math .max (0, this .lengthAttribute (xmlElement .getAttribute ("ry"), 0, "height"));
|
|
52880
53217
|
|
|
52881
|
-
|
|
53218
|
+
if (rx === 0 && ry === 0)
|
|
53219
|
+
{
|
|
53220
|
+
// Determine style.
|
|
52882
53221
|
|
|
52883
|
-
|
|
53222
|
+
if (!this .styleAttributes (xmlElement))
|
|
53223
|
+
return;
|
|
53224
|
+
|
|
53225
|
+
// Create Transform node.
|
|
52884
53226
|
|
|
52885
|
-
if (this .style .fillType !== "none")
|
|
52886
|
-
{
|
|
52887
53227
|
const
|
|
52888
|
-
|
|
52889
|
-
|
|
53228
|
+
scene = this .getExecutionContext (),
|
|
53229
|
+
size = new Numbers_Vector2 (width, height),
|
|
53230
|
+
center = new Numbers_Vector2 (x + width / 2, y + height / 2),
|
|
53231
|
+
bbox = new Geometry_Box2 (size, center),
|
|
53232
|
+
transformNode = this .createTransform (xmlElement, center);
|
|
52890
53233
|
|
|
52891
|
-
|
|
52892
|
-
shapeNode .geometry = rectangleNode;
|
|
52893
|
-
rectangleNode .solid = this .solid;
|
|
52894
|
-
rectangleNode .size = size;
|
|
53234
|
+
this .groupNodes .push (transformNode);
|
|
52895
53235
|
|
|
52896
|
-
|
|
52897
|
-
}
|
|
53236
|
+
// Create nodes.
|
|
52898
53237
|
|
|
52899
|
-
|
|
53238
|
+
if (this .style .fillType !== "none")
|
|
53239
|
+
{
|
|
53240
|
+
const
|
|
53241
|
+
shapeNode = scene .createNode ("Shape"),
|
|
53242
|
+
rectangleNode = this .fillGeometries .get (xmlElement);
|
|
53243
|
+
|
|
53244
|
+
transformNode .children .push (shapeNode);
|
|
53245
|
+
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
53246
|
+
|
|
53247
|
+
if (rectangleNode)
|
|
53248
|
+
{
|
|
53249
|
+
shapeNode .geometry = rectangleNode;
|
|
53250
|
+
}
|
|
53251
|
+
else
|
|
53252
|
+
{
|
|
53253
|
+
const rectangleNode = scene .createNode ("Rectangle2D");
|
|
53254
|
+
|
|
53255
|
+
this .fillGeometries .set (xmlElement, rectangleNode);
|
|
53256
|
+
|
|
53257
|
+
shapeNode .geometry = rectangleNode;
|
|
53258
|
+
rectangleNode .solid = this .solid;
|
|
53259
|
+
rectangleNode .size = size;
|
|
53260
|
+
}
|
|
53261
|
+
}
|
|
53262
|
+
|
|
53263
|
+
if (this .style .strokeType !== "none")
|
|
53264
|
+
{
|
|
53265
|
+
const
|
|
53266
|
+
shapeNode = scene .createNode ("Shape"),
|
|
53267
|
+
polylineNode = this .strokeGeometries .get (xmlElement);
|
|
53268
|
+
|
|
53269
|
+
transformNode .children .push (shapeNode);
|
|
53270
|
+
shapeNode .appearance = this .createStrokeAppearance ();
|
|
53271
|
+
|
|
53272
|
+
if (polylineNode)
|
|
53273
|
+
{
|
|
53274
|
+
shapeNode .geometry = polylineNode;
|
|
53275
|
+
}
|
|
53276
|
+
else
|
|
53277
|
+
{
|
|
53278
|
+
const
|
|
53279
|
+
polylineNode = scene .createNode ("Polyline2D"),
|
|
53280
|
+
width1_2 = width / 2,
|
|
53281
|
+
height1_2 = height / 2;
|
|
53282
|
+
|
|
53283
|
+
this .strokeGeometries .set (xmlElement, polylineNode);
|
|
53284
|
+
|
|
53285
|
+
shapeNode .geometry = polylineNode;
|
|
53286
|
+
|
|
53287
|
+
polylineNode .lineSegments = [ width1_2, height1_2,
|
|
53288
|
+
-width1_2, height1_2,
|
|
53289
|
+
-width1_2, -height1_2,
|
|
53290
|
+
width1_2, -height1_2,
|
|
53291
|
+
width1_2, height1_2];
|
|
53292
|
+
}
|
|
53293
|
+
}
|
|
53294
|
+
|
|
53295
|
+
this .popAll ();
|
|
53296
|
+
}
|
|
53297
|
+
else
|
|
52900
53298
|
{
|
|
53299
|
+
// Create points.
|
|
53300
|
+
|
|
53301
|
+
if (rx && !ry) ry = rx;
|
|
53302
|
+
if (ry && !rx) rx = ry;
|
|
53303
|
+
|
|
53304
|
+
rx = Math .min (rx, width / 2);
|
|
53305
|
+
ry = Math .min (ry, height / 2);
|
|
53306
|
+
|
|
52901
53307
|
const
|
|
52902
|
-
|
|
52903
|
-
|
|
52904
|
-
|
|
52905
|
-
height1_2 = height / 2;
|
|
53308
|
+
xOffsets = [x + width - rx, x + rx , x + rx, x + width - rx],
|
|
53309
|
+
yOffsets = [y + height - ry, y + height - ry, y + ry, y + ry],
|
|
53310
|
+
points = Object .assign ([ ], { closed: true });
|
|
52906
53311
|
|
|
52907
|
-
|
|
52908
|
-
|
|
53312
|
+
for (let c = 0; c < 4; ++ c)
|
|
53313
|
+
{
|
|
53314
|
+
const s = c * Math .PI / 2;
|
|
52909
53315
|
|
|
52910
|
-
|
|
52911
|
-
|
|
52912
|
-
|
|
52913
|
-
width1_2, -height1_2,
|
|
52914
|
-
width1_2, height1_2];
|
|
53316
|
+
for (let i = 0, N = this .CIRCLE_STEPS / 4; i < N; ++ i)
|
|
53317
|
+
{
|
|
53318
|
+
const p = Numbers_Complex.Polar (1, s + Math .PI / 2 * i / (N - 1));
|
|
52915
53319
|
|
|
52916
|
-
|
|
52917
|
-
|
|
53320
|
+
points .push (new Numbers_Vector3 (xOffsets [c] + p .real * rx, yOffsets [c] + p .imag * ry, 0));
|
|
53321
|
+
}
|
|
53322
|
+
}
|
|
52918
53323
|
|
|
52919
|
-
|
|
52920
|
-
this .styles .pop ();
|
|
53324
|
+
points .pop ();
|
|
52921
53325
|
|
|
52922
|
-
|
|
53326
|
+
// Create nodes.
|
|
53327
|
+
|
|
53328
|
+
this .pathLikeElement (xmlElement, [points]);
|
|
53329
|
+
}
|
|
52923
53330
|
},
|
|
52924
53331
|
circleElement: function (xmlElement)
|
|
52925
53332
|
{
|
|
@@ -52931,8 +53338,8 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52931
53338
|
// Create Transform node.
|
|
52932
53339
|
|
|
52933
53340
|
const
|
|
52934
|
-
cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), 0),
|
|
52935
|
-
cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), 0),
|
|
53341
|
+
cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), 0, "width"),
|
|
53342
|
+
cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), 0, "height"),
|
|
52936
53343
|
r = this .lengthAttribute (xmlElement .getAttribute ("r"), 0);
|
|
52937
53344
|
|
|
52938
53345
|
const
|
|
@@ -52948,33 +53355,52 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52948
53355
|
{
|
|
52949
53356
|
const
|
|
52950
53357
|
shapeNode = scene .createNode ("Shape"),
|
|
52951
|
-
diskNode =
|
|
53358
|
+
diskNode = this .fillGeometries .get (xmlElement);
|
|
52952
53359
|
|
|
53360
|
+
transformNode .children .push (shapeNode);
|
|
52953
53361
|
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
52954
|
-
shapeNode .geometry = diskNode;
|
|
52955
|
-
diskNode .solid = this .solid;
|
|
52956
|
-
diskNode .outerRadius = r;
|
|
52957
53362
|
|
|
52958
|
-
|
|
53363
|
+
if (diskNode)
|
|
53364
|
+
{
|
|
53365
|
+
shapeNode .geometry = diskNode;
|
|
53366
|
+
}
|
|
53367
|
+
else
|
|
53368
|
+
{
|
|
53369
|
+
const diskNode = scene .createNode ("Disk2D");
|
|
53370
|
+
|
|
53371
|
+
this .fillGeometries .set (xmlElement, diskNode);
|
|
53372
|
+
|
|
53373
|
+
shapeNode .geometry = diskNode;
|
|
53374
|
+
diskNode .solid = this .solid;
|
|
53375
|
+
diskNode .outerRadius = r;
|
|
53376
|
+
}
|
|
52959
53377
|
}
|
|
52960
53378
|
|
|
52961
53379
|
if (this .style .strokeType !== "none")
|
|
52962
53380
|
{
|
|
52963
53381
|
const
|
|
52964
53382
|
shapeNode = scene .createNode ("Shape"),
|
|
52965
|
-
circleNode =
|
|
53383
|
+
circleNode = this .strokeGeometries .get (xmlElement);
|
|
52966
53384
|
|
|
53385
|
+
transformNode .children .push (shapeNode);
|
|
52967
53386
|
shapeNode .appearance = this .createStrokeAppearance ();
|
|
52968
|
-
shapeNode .geometry = circleNode;
|
|
52969
|
-
circleNode .radius = r;
|
|
52970
53387
|
|
|
52971
|
-
|
|
52972
|
-
|
|
53388
|
+
if (circleNode)
|
|
53389
|
+
{
|
|
53390
|
+
shapeNode .geometry = circleNode;
|
|
53391
|
+
}
|
|
53392
|
+
else
|
|
53393
|
+
{
|
|
53394
|
+
const circleNode = scene .createNode ("Circle2D");
|
|
52973
53395
|
|
|
52974
|
-
|
|
52975
|
-
this .styles .pop ();
|
|
53396
|
+
this .strokeGeometries .set (xmlElement, circleNode);
|
|
52976
53397
|
|
|
52977
|
-
|
|
53398
|
+
shapeNode .geometry = circleNode;
|
|
53399
|
+
circleNode .radius = r;
|
|
53400
|
+
}
|
|
53401
|
+
}
|
|
53402
|
+
|
|
53403
|
+
this .popAll ();
|
|
52978
53404
|
},
|
|
52979
53405
|
ellipseElement: function (xmlElement)
|
|
52980
53406
|
{
|
|
@@ -52986,10 +53412,10 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52986
53412
|
// Create Transform node.
|
|
52987
53413
|
|
|
52988
53414
|
const
|
|
52989
|
-
cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), 0),
|
|
52990
|
-
cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), 0),
|
|
52991
|
-
rx = this .lengthAttribute (xmlElement .getAttribute ("rx"), 0),
|
|
52992
|
-
ry = this .lengthAttribute (xmlElement .getAttribute ("ry"), 0);
|
|
53415
|
+
cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), 0, "width"),
|
|
53416
|
+
cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), 0, "height"),
|
|
53417
|
+
rx = this .lengthAttribute (xmlElement .getAttribute ("rx"), 0, "width"),
|
|
53418
|
+
ry = this .lengthAttribute (xmlElement .getAttribute ("ry"), 0, "height");
|
|
52993
53419
|
|
|
52994
53420
|
const
|
|
52995
53421
|
scene = this .getExecutionContext (),
|
|
@@ -53005,33 +53431,52 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53005
53431
|
{
|
|
53006
53432
|
const
|
|
53007
53433
|
shapeNode = scene .createNode ("Shape"),
|
|
53008
|
-
diskNode =
|
|
53434
|
+
diskNode = this .fillGeometries .get (xmlElement);
|
|
53009
53435
|
|
|
53436
|
+
transformNode .children .push (shapeNode);
|
|
53010
53437
|
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
53011
|
-
shapeNode .geometry = diskNode;
|
|
53012
|
-
diskNode .solid = this .solid;
|
|
53013
|
-
diskNode .outerRadius = rMin;
|
|
53014
53438
|
|
|
53015
|
-
|
|
53439
|
+
if (diskNode)
|
|
53440
|
+
{
|
|
53441
|
+
shapeNode .geometry = diskNode;
|
|
53442
|
+
}
|
|
53443
|
+
else
|
|
53444
|
+
{
|
|
53445
|
+
const diskNode = scene .createNode ("Disk2D");
|
|
53446
|
+
|
|
53447
|
+
this .fillGeometries .set (xmlElement, diskNode);
|
|
53448
|
+
|
|
53449
|
+
shapeNode .geometry = diskNode;
|
|
53450
|
+
diskNode .solid = this .solid;
|
|
53451
|
+
diskNode .outerRadius = rMin;
|
|
53452
|
+
}
|
|
53016
53453
|
}
|
|
53017
53454
|
|
|
53018
53455
|
if (this .style .strokeType !== "none")
|
|
53019
53456
|
{
|
|
53020
53457
|
const
|
|
53021
53458
|
shapeNode = scene .createNode ("Shape"),
|
|
53022
|
-
circleNode =
|
|
53459
|
+
circleNode = this .strokeGeometries .get (xmlElement);
|
|
53023
53460
|
|
|
53461
|
+
transformNode .children .push (shapeNode);
|
|
53024
53462
|
shapeNode .appearance = this .createStrokeAppearance ();
|
|
53025
|
-
shapeNode .geometry = circleNode;
|
|
53026
|
-
circleNode .radius = rMin;
|
|
53027
53463
|
|
|
53028
|
-
|
|
53029
|
-
|
|
53464
|
+
if (circleNode)
|
|
53465
|
+
{
|
|
53466
|
+
shapeNode .geometry = circleNode;
|
|
53467
|
+
}
|
|
53468
|
+
else
|
|
53469
|
+
{
|
|
53470
|
+
const circleNode = scene .createNode ("Circle2D");
|
|
53030
53471
|
|
|
53031
|
-
|
|
53032
|
-
this .styles .pop ();
|
|
53472
|
+
this .strokeGeometries .set (xmlElement, circleNode);
|
|
53033
53473
|
|
|
53034
|
-
|
|
53474
|
+
shapeNode .geometry = circleNode;
|
|
53475
|
+
circleNode .radius = rMin;
|
|
53476
|
+
}
|
|
53477
|
+
}
|
|
53478
|
+
|
|
53479
|
+
this .popAll ();
|
|
53035
53480
|
},
|
|
53036
53481
|
textElement: function (xmlElement)
|
|
53037
53482
|
{
|
|
@@ -53039,107 +53484,81 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53039
53484
|
},
|
|
53040
53485
|
imageElement: function (xmlElement)
|
|
53041
53486
|
{
|
|
53042
|
-
|
|
53487
|
+
const transformNode = this .fillGeometries .get (xmlElement);
|
|
53043
53488
|
|
|
53044
|
-
|
|
53045
|
-
|
|
53046
|
-
|
|
53047
|
-
|
|
53048
|
-
|
|
53049
|
-
|
|
53489
|
+
if (transformNode)
|
|
53490
|
+
{
|
|
53491
|
+
this .groupNodes .at (-1) .children .push (transformNode);
|
|
53492
|
+
}
|
|
53493
|
+
else
|
|
53494
|
+
{
|
|
53495
|
+
// Determine style.
|
|
53050
53496
|
|
|
53051
|
-
|
|
53052
|
-
|
|
53053
|
-
transformNode = this .createTransform (xmlElement, new Numbers_Vector2 (x + width / 2, y + height / 2), new Numbers_Vector2 (1, -1));
|
|
53497
|
+
if (!this .styleAttributes (xmlElement))
|
|
53498
|
+
return;
|
|
53054
53499
|
|
|
53055
|
-
|
|
53500
|
+
// Create Transform node.
|
|
53056
53501
|
|
|
53057
|
-
|
|
53502
|
+
const
|
|
53503
|
+
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0, "width"),
|
|
53504
|
+
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0, "height"),
|
|
53505
|
+
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0, "width"),
|
|
53506
|
+
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0, "height"),
|
|
53507
|
+
href = xmlElement .getAttribute ("href") || xmlElement .getAttribute ("xlink:href");
|
|
53058
53508
|
|
|
53059
|
-
|
|
53060
|
-
|
|
53061
|
-
|
|
53062
|
-
textureNode = scene .createNode ("ImageTexture"),
|
|
53063
|
-
rectangleNode = scene .createNode ("Rectangle2D");
|
|
53509
|
+
const
|
|
53510
|
+
scene = this .getExecutionContext (),
|
|
53511
|
+
transformNode = this .createTransform (xmlElement, new Numbers_Vector2 (x + width / 2, y + height / 2), new Numbers_Vector2 (1, -1));
|
|
53064
53512
|
|
|
53065
|
-
|
|
53066
|
-
|
|
53067
|
-
appearanceNode .texture = textureNode;
|
|
53068
|
-
textureNode .url = [href];
|
|
53069
|
-
textureNode .textureProperties = this .texturePropertiesNode;
|
|
53070
|
-
rectangleNode .solid = this .solid;
|
|
53071
|
-
rectangleNode .size = new Numbers_Vector2 (width, height);
|
|
53513
|
+
this .fillGeometries .set (xmlElement, transformNode);
|
|
53514
|
+
this .groupNodes .push (transformNode);
|
|
53072
53515
|
|
|
53073
|
-
|
|
53516
|
+
// Create nodes.
|
|
53074
53517
|
|
|
53075
|
-
|
|
53076
|
-
|
|
53518
|
+
const
|
|
53519
|
+
shapeNode = scene .createNode ("Shape"),
|
|
53520
|
+
appearanceNode = scene .createNode ("Appearance"),
|
|
53521
|
+
textureNode = scene .createNode ("ImageTexture"),
|
|
53522
|
+
rectangleNode = scene .createNode ("Rectangle2D");
|
|
53523
|
+
|
|
53524
|
+
shapeNode .appearance = appearanceNode;
|
|
53525
|
+
shapeNode .geometry = rectangleNode;
|
|
53526
|
+
appearanceNode .texture = textureNode;
|
|
53527
|
+
textureNode .url = [href];
|
|
53528
|
+
textureNode .textureProperties = this .texturePropertiesNode;
|
|
53529
|
+
rectangleNode .solid = this .solid;
|
|
53530
|
+
rectangleNode .size = new Numbers_Vector2 (width, height);
|
|
53531
|
+
|
|
53532
|
+
transformNode .children .push (shapeNode);
|
|
53533
|
+
|
|
53534
|
+
this .popAll ();
|
|
53535
|
+
}
|
|
53077
53536
|
},
|
|
53078
|
-
polylineElement: function (xmlElement
|
|
53537
|
+
polylineElement: function (xmlElement)
|
|
53079
53538
|
{
|
|
53080
|
-
|
|
53539
|
+
// Get points.
|
|
53081
53540
|
|
|
53082
|
-
|
|
53083
|
-
return;
|
|
53084
|
-
|
|
53085
|
-
// Determine style.
|
|
53541
|
+
const points = [ ];
|
|
53086
53542
|
|
|
53087
|
-
if (!this .
|
|
53543
|
+
if (!this .pointsAttribute (xmlElement .getAttribute ("points"), points))
|
|
53088
53544
|
return;
|
|
53089
53545
|
|
|
53090
|
-
// Create Transform node.
|
|
53091
|
-
|
|
53092
|
-
const
|
|
53093
|
-
scene = this .getExecutionContext (),
|
|
53094
|
-
transformNode = this .createTransform (xmlElement),
|
|
53095
|
-
bbox = new Geometry_Box2 (Numbers_Vector2.min (... points), Numbers_Vector2.max (... points), true);
|
|
53096
|
-
|
|
53097
|
-
this .groupNodes .push (transformNode);
|
|
53098
|
-
|
|
53099
53546
|
// Create nodes.
|
|
53100
53547
|
|
|
53101
|
-
|
|
53102
|
-
|
|
53103
|
-
|
|
53104
|
-
|
|
53105
|
-
|
|
53106
|
-
{
|
|
53107
|
-
const
|
|
53108
|
-
shapeNode = scene .createNode ("Shape"),
|
|
53109
|
-
geometryNode = scene .createNode ("IndexedTriangleSet");
|
|
53110
|
-
|
|
53111
|
-
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
53112
|
-
shapeNode .geometry = geometryNode;
|
|
53113
|
-
geometryNode .solid = this .solid;
|
|
53114
|
-
geometryNode .index = this .triangulatePolygon ([points], coordinateNode);
|
|
53115
|
-
geometryNode .texCoord = this .createTextureCoordinate (coordinateNode, bbox);
|
|
53116
|
-
geometryNode .coord = coordinateNode;
|
|
53117
|
-
|
|
53118
|
-
transformNode .children .push (shapeNode);
|
|
53119
|
-
}
|
|
53120
|
-
|
|
53121
|
-
if (this .style .strokeType !== "none")
|
|
53122
|
-
{
|
|
53123
|
-
const
|
|
53124
|
-
shapeNode = scene .createNode ("Shape"),
|
|
53125
|
-
geometryNode = scene .createNode ("IndexedLineSet");
|
|
53548
|
+
this .pathLikeElement (xmlElement, [points]);
|
|
53549
|
+
},
|
|
53550
|
+
polygonElement: function (xmlElement)
|
|
53551
|
+
{
|
|
53552
|
+
// Get points.
|
|
53126
53553
|
|
|
53127
|
-
|
|
53128
|
-
shapeNode .geometry = geometryNode;
|
|
53129
|
-
geometryNode .coordIndex = [... points .keys (), ... (closed ? [points [0]] : [ ]), -1];
|
|
53130
|
-
geometryNode .coord = coordinateNode;
|
|
53554
|
+
const points = Object .assign ([ ], { closed: true });
|
|
53131
53555
|
|
|
53132
|
-
|
|
53133
|
-
|
|
53556
|
+
if (!this .pointsAttribute (xmlElement .getAttribute ("points"), points))
|
|
53557
|
+
return;
|
|
53134
53558
|
|
|
53135
|
-
|
|
53136
|
-
this .styles .pop ();
|
|
53559
|
+
// Create nodes.
|
|
53137
53560
|
|
|
53138
|
-
this .
|
|
53139
|
-
},
|
|
53140
|
-
polygonElement: function (xmlElement)
|
|
53141
|
-
{
|
|
53142
|
-
this .polylineElement (xmlElement, true);
|
|
53561
|
+
this .pathLikeElement (xmlElement, [points]);
|
|
53143
53562
|
},
|
|
53144
53563
|
pathElement: function (xmlElement)
|
|
53145
53564
|
{
|
|
@@ -53150,11 +53569,41 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53150
53569
|
if (!this .dAttribute (xmlElement .getAttribute ("d"), contours))
|
|
53151
53570
|
return;
|
|
53152
53571
|
|
|
53572
|
+
// Create nodes.
|
|
53573
|
+
|
|
53574
|
+
this .pathLikeElement (xmlElement, contours);
|
|
53575
|
+
},
|
|
53576
|
+
pathLikeElement: function (xmlElement, contours)
|
|
53577
|
+
{
|
|
53153
53578
|
// Determine style.
|
|
53154
53579
|
|
|
53155
53580
|
if (!this .styleAttributes (xmlElement))
|
|
53156
53581
|
return;
|
|
53157
53582
|
|
|
53583
|
+
// Filter consecutive equal points.
|
|
53584
|
+
|
|
53585
|
+
const EPSILON = 1e-9; // Min point distance.
|
|
53586
|
+
|
|
53587
|
+
contours = contours .map (function (points)
|
|
53588
|
+
{
|
|
53589
|
+
if (points .closed)
|
|
53590
|
+
{
|
|
53591
|
+
return Object .assign (points .filter ((p, i, a) => p .distance (a [(i + 1) % a .length]) > EPSILON),
|
|
53592
|
+
{
|
|
53593
|
+
closed: true,
|
|
53594
|
+
});
|
|
53595
|
+
}
|
|
53596
|
+
else
|
|
53597
|
+
{
|
|
53598
|
+
return points .filter ((p, i, a) => !i || p .distance (a [i - 1]) > EPSILON);
|
|
53599
|
+
}
|
|
53600
|
+
})
|
|
53601
|
+
.filter (points => points .length > 2);
|
|
53602
|
+
|
|
53603
|
+
// Add index property to points.
|
|
53604
|
+
|
|
53605
|
+
contours .forEach ((points, i, a) => points .index = i ? a [i - 1] .index + a [i - 1] .length : 0);
|
|
53606
|
+
|
|
53158
53607
|
// Create Transform node.
|
|
53159
53608
|
|
|
53160
53609
|
const
|
|
@@ -53178,79 +53627,111 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53178
53627
|
{
|
|
53179
53628
|
const
|
|
53180
53629
|
shapeNode = scene .createNode ("Shape"),
|
|
53181
|
-
geometryNode =
|
|
53182
|
-
|
|
53183
|
-
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
53184
|
-
shapeNode .geometry = geometryNode;
|
|
53185
|
-
geometryNode .solid = this .solid;
|
|
53186
|
-
geometryNode .index = this .triangulatePolygon (contours, coordinateNode);
|
|
53187
|
-
geometryNode .texCoord = this .createTextureCoordinate (coordinateNode, bbox);
|
|
53188
|
-
geometryNode .coord = coordinateNode;
|
|
53630
|
+
geometryNode = this .fillGeometries .get (xmlElement);
|
|
53189
53631
|
|
|
53190
53632
|
transformNode .children .push (shapeNode);
|
|
53633
|
+
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
53634
|
+
|
|
53635
|
+
if (geometryNode)
|
|
53636
|
+
{
|
|
53637
|
+
shapeNode .geometry = geometryNode;
|
|
53638
|
+
}
|
|
53639
|
+
else
|
|
53640
|
+
{
|
|
53641
|
+
const geometryNode = scene .createNode ("IndexedTriangleSet");
|
|
53642
|
+
|
|
53643
|
+
this .fillGeometries .set (xmlElement, geometryNode);
|
|
53644
|
+
|
|
53645
|
+
shapeNode .geometry = geometryNode;
|
|
53646
|
+
geometryNode .solid = this .solid;
|
|
53647
|
+
geometryNode .index = this .triangulatePolygon (contours, coordinateNode);
|
|
53648
|
+
geometryNode .texCoord = this .createTextureCoordinate (coordinateNode, bbox);
|
|
53649
|
+
geometryNode .coord = coordinateNode;
|
|
53650
|
+
}
|
|
53191
53651
|
}
|
|
53192
53652
|
|
|
53193
53653
|
if (this .style .strokeType !== "none")
|
|
53194
53654
|
{
|
|
53195
53655
|
const
|
|
53196
53656
|
shapeNode = scene .createNode ("Shape"),
|
|
53197
|
-
geometryNode =
|
|
53657
|
+
geometryNode = this .strokeGeometries .get (xmlElement);
|
|
53198
53658
|
|
|
53659
|
+
transformNode .children .push (shapeNode);
|
|
53199
53660
|
shapeNode .appearance = this .createStrokeAppearance ();
|
|
53200
|
-
shapeNode .geometry = geometryNode;
|
|
53201
|
-
geometryNode .coord = coordinateNode;
|
|
53202
53661
|
|
|
53203
|
-
|
|
53662
|
+
if (geometryNode)
|
|
53663
|
+
{
|
|
53664
|
+
shapeNode .geometry = geometryNode;
|
|
53665
|
+
}
|
|
53666
|
+
else
|
|
53204
53667
|
{
|
|
53205
|
-
|
|
53206
|
-
geometryNode .coordIndex .push (points .index + i);
|
|
53668
|
+
const geometryNode = scene .createNode ("IndexedLineSet");
|
|
53207
53669
|
|
|
53208
|
-
|
|
53209
|
-
geometryNode .coordIndex .push (points .index);
|
|
53670
|
+
this .strokeGeometries .set (xmlElement, geometryNode);
|
|
53210
53671
|
|
|
53211
|
-
|
|
53212
|
-
|
|
53672
|
+
shapeNode .geometry = geometryNode;
|
|
53673
|
+
geometryNode .coord = coordinateNode;
|
|
53213
53674
|
|
|
53214
|
-
|
|
53215
|
-
}
|
|
53675
|
+
// Create contour indices.
|
|
53216
53676
|
|
|
53217
|
-
|
|
53218
|
-
this .styles .pop ();
|
|
53677
|
+
const indices = geometryNode .coordIndex;
|
|
53219
53678
|
|
|
53220
|
-
|
|
53679
|
+
for (const points of contours)
|
|
53680
|
+
{
|
|
53681
|
+
for (const i of points .keys ())
|
|
53682
|
+
indices .push (points .index + i);
|
|
53683
|
+
|
|
53684
|
+
if (points .closed)
|
|
53685
|
+
indices .push (points .index);
|
|
53686
|
+
|
|
53687
|
+
indices .push (-1);
|
|
53688
|
+
}
|
|
53689
|
+
}
|
|
53690
|
+
}
|
|
53691
|
+
|
|
53692
|
+
this .popAll ();
|
|
53221
53693
|
},
|
|
53222
|
-
|
|
53694
|
+
linearGradientElementUrl: function (xmlElement, bbox)
|
|
53223
53695
|
{
|
|
53224
53696
|
const
|
|
53225
|
-
g = this .linearGradientElement (xmlElement, { stops: [ ] }),
|
|
53697
|
+
g = this .linearGradientElement (xmlElement, bbox, { stops: [ ] }),
|
|
53226
53698
|
gradient = this .context .createLinearGradient (g .x1, g .y1, g .x2, g .y2);
|
|
53227
53699
|
|
|
53228
|
-
for (const [o, c, a] of g .stops)
|
|
53229
|
-
gradient .addColorStop (o, `rgba(${c .r * 255},${c .g * 255},${c .b * 255},${a})`);
|
|
53230
|
-
|
|
53231
53700
|
return this .drawGradient (gradient, g, bbox);
|
|
53232
53701
|
},
|
|
53233
|
-
linearGradientElement: function (xmlElement, gradient)
|
|
53702
|
+
linearGradientElement: function (xmlElement, bbox, gradient)
|
|
53234
53703
|
{
|
|
53235
53704
|
if (xmlElement .nodeName !== "linearGradient")
|
|
53236
53705
|
return;
|
|
53237
53706
|
|
|
53238
53707
|
// Attribute xlink:href
|
|
53239
53708
|
|
|
53240
|
-
const refElement = this .hrefAttribute (xmlElement .getAttribute ("xlink:href"));
|
|
53709
|
+
const refElement = this .hrefAttribute (xmlElement .getAttribute ("href") || xmlElement .getAttribute ("xlink:href"));
|
|
53241
53710
|
|
|
53242
53711
|
if (refElement)
|
|
53243
|
-
this .gradientElement (refElement, gradient);
|
|
53712
|
+
this .gradientElement (refElement, bbox, gradient);
|
|
53244
53713
|
|
|
53245
53714
|
// Attributes
|
|
53246
53715
|
|
|
53247
|
-
gradient .x1 = this .lengthAttribute (xmlElement .getAttribute ("x1"), gradient .x1 || 0);
|
|
53248
|
-
gradient .y1 = this .lengthAttribute (xmlElement .getAttribute ("y1"), gradient .y1 || 0);
|
|
53249
|
-
gradient .x2 = this .lengthAttribute (xmlElement .getAttribute ("x2"), gradient .x2 || 1);
|
|
53250
|
-
gradient .y2 = this .lengthAttribute (xmlElement .getAttribute ("y2"), gradient .y2 || 0);
|
|
53716
|
+
gradient .x1 = this .lengthAttribute (xmlElement .getAttribute ("x1"), gradient .x1 || 0, "width");
|
|
53717
|
+
gradient .y1 = this .lengthAttribute (xmlElement .getAttribute ("y1"), gradient .y1 || 0, "height");
|
|
53718
|
+
gradient .x2 = this .lengthAttribute (xmlElement .getAttribute ("x2"), gradient .x2 || 1, "width");
|
|
53719
|
+
gradient .y2 = this .lengthAttribute (xmlElement .getAttribute ("y2"), gradient .y2 || 0, "height");
|
|
53251
53720
|
gradient .units = xmlElement .getAttribute ("gradientUnits") || "objectBoundingBox";
|
|
53252
53721
|
gradient .transform = this .transformAttribute (xmlElement .getAttribute ("gradientTransform"));
|
|
53253
53722
|
|
|
53723
|
+
// Spread matrix
|
|
53724
|
+
|
|
53725
|
+
const
|
|
53726
|
+
s = new Numbers_Matrix3 (),
|
|
53727
|
+
c = new Numbers_Vector2 (gradient .x1, gradient .y1);
|
|
53728
|
+
|
|
53729
|
+
s .translate (c);
|
|
53730
|
+
s .scale (new Numbers_Vector2 (SPREAD, SPREAD));
|
|
53731
|
+
s .translate (c .negate ());
|
|
53732
|
+
|
|
53733
|
+
gradient .spreadMatrix = s;
|
|
53734
|
+
|
|
53254
53735
|
// Stops
|
|
53255
53736
|
|
|
53256
53737
|
for (const childNode of xmlElement .childNodes)
|
|
@@ -53258,38 +53739,47 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53258
53739
|
|
|
53259
53740
|
return gradient;
|
|
53260
53741
|
},
|
|
53261
|
-
|
|
53742
|
+
radialGradientElementUrl: function (xmlElement, bbox)
|
|
53262
53743
|
{
|
|
53263
53744
|
const
|
|
53264
|
-
g = this .radialGradientElement (xmlElement, { stops: [ ] }),
|
|
53745
|
+
g = this .radialGradientElement (xmlElement, bbox, { stops: [ ] }),
|
|
53265
53746
|
gradient = this .context .createRadialGradient (g .fx, g .fy, g. fr, g .cx, g .cy, g .r);
|
|
53266
53747
|
|
|
53267
|
-
for (const [o, c, a] of g .stops)
|
|
53268
|
-
gradient .addColorStop (o, `rgba(${c .r * 255},${c .g * 255},${c .b * 255},${a})`);
|
|
53269
|
-
|
|
53270
53748
|
return this .drawGradient (gradient, g, bbox);
|
|
53271
53749
|
},
|
|
53272
|
-
radialGradientElement: function (xmlElement, gradient)
|
|
53750
|
+
radialGradientElement: function (xmlElement, bbox, gradient)
|
|
53273
53751
|
{
|
|
53274
53752
|
// Attribute xlink:href
|
|
53275
53753
|
|
|
53276
|
-
const refElement = this .hrefAttribute (xmlElement .getAttribute ("xlink:href"));
|
|
53754
|
+
const refElement = this .hrefAttribute (xmlElement .getAttribute ("href") || xmlElement .getAttribute ("xlink:href"));
|
|
53277
53755
|
|
|
53278
53756
|
if (refElement)
|
|
53279
|
-
this .gradientElement (refElement, gradient);
|
|
53757
|
+
this .gradientElement (refElement, bbox, gradient);
|
|
53280
53758
|
|
|
53281
53759
|
// Attributes
|
|
53282
53760
|
|
|
53283
|
-
gradient .cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), gradient .cx || 0.5),
|
|
53284
|
-
gradient .cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), gradient .cy || 0.5),
|
|
53761
|
+
gradient .cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), gradient .cx || 0.5, "width"),
|
|
53762
|
+
gradient .cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), gradient .cy || 0.5, "height"),
|
|
53285
53763
|
gradient .r = this .lengthAttribute (xmlElement .getAttribute ("r"), gradient .r || 0.5),
|
|
53286
|
-
gradient .fx = this .lengthAttribute (xmlElement .getAttribute ("fx"), gradient .fx || gradient .cx),
|
|
53287
|
-
gradient .fy = this .lengthAttribute (xmlElement .getAttribute ("fy"), gradient .fy || gradient .cy),
|
|
53764
|
+
gradient .fx = this .lengthAttribute (xmlElement .getAttribute ("fx"), gradient .fx || gradient .cx, "width"),
|
|
53765
|
+
gradient .fy = this .lengthAttribute (xmlElement .getAttribute ("fy"), gradient .fy || gradient .cy, "height"),
|
|
53288
53766
|
gradient .fr = this .lengthAttribute (xmlElement .getAttribute ("fr"), gradient .fr || 0),
|
|
53289
53767
|
gradient .units = xmlElement .getAttribute ("gradientUnits") || "objectBoundingBox";
|
|
53290
53768
|
gradient .spreadMethod = xmlElement .getAttribute ("spreadMethod");
|
|
53291
53769
|
gradient .transform = this .transformAttribute (xmlElement .getAttribute ("gradientTransform"));
|
|
53292
53770
|
|
|
53771
|
+
// Spread matrix
|
|
53772
|
+
|
|
53773
|
+
const
|
|
53774
|
+
s = new Numbers_Matrix3 (),
|
|
53775
|
+
c = new Numbers_Vector2 (gradient .fx, gradient .fy);
|
|
53776
|
+
|
|
53777
|
+
s .translate (c);
|
|
53778
|
+
s .scale (new Numbers_Vector2 (SPREAD, SPREAD));
|
|
53779
|
+
s .translate (c .negate ());
|
|
53780
|
+
|
|
53781
|
+
gradient .spreadMatrix = s;
|
|
53782
|
+
|
|
53293
53783
|
// Stops
|
|
53294
53784
|
|
|
53295
53785
|
for (const childNode of xmlElement .childNodes)
|
|
@@ -53297,7 +53787,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53297
53787
|
|
|
53298
53788
|
return gradient;
|
|
53299
53789
|
},
|
|
53300
|
-
gradientElement: function (xmlElement, gradient)
|
|
53790
|
+
gradientElement: function (xmlElement, bbox, gradient)
|
|
53301
53791
|
{
|
|
53302
53792
|
if (!xmlElement)
|
|
53303
53793
|
return;
|
|
@@ -53305,9 +53795,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53305
53795
|
switch (xmlElement .nodeName)
|
|
53306
53796
|
{
|
|
53307
53797
|
case "linearGradient":
|
|
53308
|
-
return this .linearGradientElement (xmlElement, gradient);
|
|
53798
|
+
return this .linearGradientElement (xmlElement, bbox, gradient);
|
|
53309
53799
|
case "radialGradient":
|
|
53310
|
-
return this .radialGradientElement (xmlElement, gradient);
|
|
53800
|
+
return this .radialGradientElement (xmlElement, bbox, gradient);
|
|
53311
53801
|
}
|
|
53312
53802
|
},
|
|
53313
53803
|
gradientChild: function (xmlElement, gradient)
|
|
@@ -53322,6 +53812,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53322
53812
|
|
|
53323
53813
|
const offset = this .percentAttribute (xmlElement .getAttribute ("offset"), 0);
|
|
53324
53814
|
|
|
53815
|
+
if (offset < 0 || offset > 1)
|
|
53816
|
+
return;
|
|
53817
|
+
|
|
53325
53818
|
const { stopColor, stopOpacity } = this .style;
|
|
53326
53819
|
|
|
53327
53820
|
gradient .stops .push ([offset, stopColor, stopOpacity]);
|
|
@@ -53330,9 +53823,50 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53330
53823
|
},
|
|
53331
53824
|
drawGradient: function (gradient, g, bbox)
|
|
53332
53825
|
{
|
|
53826
|
+
// Add color stops.
|
|
53827
|
+
|
|
53828
|
+
switch (g .spreadMethod)
|
|
53829
|
+
{
|
|
53830
|
+
default: // pad
|
|
53831
|
+
{
|
|
53832
|
+
g .spreadMatrix .identity ();
|
|
53833
|
+
|
|
53834
|
+
for (const [o, c, a] of g .stops)
|
|
53835
|
+
gradient .addColorStop (o, this .cssColor (c, a));
|
|
53836
|
+
|
|
53837
|
+
break;
|
|
53838
|
+
}
|
|
53839
|
+
case "repeat":
|
|
53840
|
+
{
|
|
53841
|
+
for (let i = 0; i < SPREAD; ++ i)
|
|
53842
|
+
{
|
|
53843
|
+
const s = i / SPREAD;
|
|
53844
|
+
|
|
53845
|
+
for (const [o, c, a] of g .stops)
|
|
53846
|
+
gradient .addColorStop (s + o / SPREAD, this .cssColor (c, a));
|
|
53847
|
+
}
|
|
53848
|
+
|
|
53849
|
+
break;
|
|
53850
|
+
}
|
|
53851
|
+
case "reflect":
|
|
53852
|
+
{
|
|
53853
|
+
for (let i = 0; i < SPREAD; ++ i)
|
|
53854
|
+
{
|
|
53855
|
+
const s = i / SPREAD;
|
|
53856
|
+
|
|
53857
|
+
for (const [o, c, a] of g .stops)
|
|
53858
|
+
gradient .addColorStop (s + (i % 2 ? 1 - o : o) / SPREAD, this .cssColor (c, a));
|
|
53859
|
+
}
|
|
53860
|
+
|
|
53861
|
+
break;
|
|
53862
|
+
}
|
|
53863
|
+
}
|
|
53864
|
+
|
|
53865
|
+
// Create Matrix.
|
|
53866
|
+
|
|
53333
53867
|
const m = new Numbers_Matrix3 ();
|
|
53334
53868
|
|
|
53335
|
-
m .scale (new Numbers_Vector2 (GRADIENT_SIZE / 2, GRADIENT_SIZE / 2));
|
|
53869
|
+
m .scale (new Numbers_Vector2 (this .GRADIENT_SIZE / 2, this .GRADIENT_SIZE / 2));
|
|
53336
53870
|
m .translate (Numbers_Vector2.One);
|
|
53337
53871
|
m .scale (new Numbers_Vector2 (1, -1));
|
|
53338
53872
|
|
|
@@ -53342,6 +53876,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53342
53876
|
m .multLeft (new Numbers_Matrix3 (2, 0, 0, 0, 2, 0, -1, -1, 1));
|
|
53343
53877
|
|
|
53344
53878
|
m .multLeft (g .transform);
|
|
53879
|
+
m .multLeft (g .spreadMatrix);
|
|
53345
53880
|
|
|
53346
53881
|
// Paint.
|
|
53347
53882
|
|
|
@@ -53349,8 +53884,8 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53349
53884
|
|
|
53350
53885
|
cx .fillStyle = gradient;
|
|
53351
53886
|
cx .save ();
|
|
53352
|
-
cx .clearRect (0, 0, GRADIENT_SIZE, GRADIENT_SIZE);
|
|
53353
|
-
cx .rect (0, 0, GRADIENT_SIZE, GRADIENT_SIZE);
|
|
53887
|
+
cx .clearRect (0, 0, this .GRADIENT_SIZE, this .GRADIENT_SIZE);
|
|
53888
|
+
cx .rect (0, 0, this .GRADIENT_SIZE, this .GRADIENT_SIZE);
|
|
53354
53889
|
cx .transform (m [0], m [1], m [3], m [4], m [6], m [7]);
|
|
53355
53890
|
cx .fill ();
|
|
53356
53891
|
cx .restore ();
|
|
@@ -53358,6 +53893,10 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53358
53893
|
// Use PNG because image can have alpha channel.
|
|
53359
53894
|
return this .canvas .toDataURL ("image/png");
|
|
53360
53895
|
},
|
|
53896
|
+
patternUrl: function (xmlElement)
|
|
53897
|
+
{
|
|
53898
|
+
//console .debug ("pattern");
|
|
53899
|
+
},
|
|
53361
53900
|
idAttribute: function (attribute, node)
|
|
53362
53901
|
{
|
|
53363
53902
|
if (attribute === null)
|
|
@@ -53412,7 +53951,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53412
53951
|
|
|
53413
53952
|
return this .document .getElementById (hash);
|
|
53414
53953
|
},
|
|
53415
|
-
lengthAttribute: function (attribute, defaultValue)
|
|
53954
|
+
lengthAttribute: function (attribute, defaultValue, percent)
|
|
53416
53955
|
{
|
|
53417
53956
|
// Returns length in pixel.
|
|
53418
53957
|
|
|
@@ -53455,6 +53994,23 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53455
53994
|
case "pc":
|
|
53456
53995
|
value *= PICA / PIXEL;
|
|
53457
53996
|
break;
|
|
53997
|
+
case "%":
|
|
53998
|
+
{
|
|
53999
|
+
switch (percent)
|
|
54000
|
+
{
|
|
54001
|
+
case "width":
|
|
54002
|
+
value *= this .viewBox [2] / 100;
|
|
54003
|
+
break;
|
|
54004
|
+
case "height":
|
|
54005
|
+
value *= this .viewBox [3] / 100;
|
|
54006
|
+
break;
|
|
54007
|
+
default:
|
|
54008
|
+
value *= Math .hypot (this .viewBox [2], this .viewBox [3]) / 100;
|
|
54009
|
+
break;
|
|
54010
|
+
}
|
|
54011
|
+
|
|
54012
|
+
break;
|
|
54013
|
+
}
|
|
53458
54014
|
}
|
|
53459
54015
|
}
|
|
53460
54016
|
|
|
@@ -53522,7 +54078,6 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53522
54078
|
|
|
53523
54079
|
let
|
|
53524
54080
|
points = [ ],
|
|
53525
|
-
index = 0,
|
|
53526
54081
|
previous = "",
|
|
53527
54082
|
command = "",
|
|
53528
54083
|
relative = false,
|
|
@@ -53550,11 +54105,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53550
54105
|
// moveto
|
|
53551
54106
|
|
|
53552
54107
|
if (points .length > 2)
|
|
53553
|
-
|
|
53554
|
-
contours .push (Object .assign (points, { index: index, closed: false }));
|
|
53555
|
-
|
|
53556
|
-
index += points .length;
|
|
53557
|
-
}
|
|
54108
|
+
contours .push (Object .assign (points, { closed: false }));
|
|
53558
54109
|
|
|
53559
54110
|
points = [ ];
|
|
53560
54111
|
|
|
@@ -53720,7 +54271,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53720
54271
|
y += ay;
|
|
53721
54272
|
}
|
|
53722
54273
|
|
|
53723
|
-
Algorithms_Bezier.quadric (ax, ay, 0, x1, y1, 0, x, y, 0, BEZIER_STEPS, points);
|
|
54274
|
+
Algorithms_Bezier.quadric (ax, ay, 0, x1, y1, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
53724
54275
|
|
|
53725
54276
|
ax = x;
|
|
53726
54277
|
ay = y;
|
|
@@ -53781,7 +54332,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53781
54332
|
}
|
|
53782
54333
|
}
|
|
53783
54334
|
|
|
53784
|
-
Algorithms_Bezier.quadric (ax, ay, 0, x1, y1, 0, x, y, 0, BEZIER_STEPS, points);
|
|
54335
|
+
Algorithms_Bezier.quadric (ax, ay, 0, x1, y1, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
53785
54336
|
|
|
53786
54337
|
ax = x;
|
|
53787
54338
|
ay = y;
|
|
@@ -53847,7 +54398,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53847
54398
|
y += ay;
|
|
53848
54399
|
}
|
|
53849
54400
|
|
|
53850
|
-
Algorithms_Bezier.cubic (ax, ay, 0, x1, y1, 0, x2, y2, 0, x, y, 0, BEZIER_STEPS, points);
|
|
54401
|
+
Algorithms_Bezier.cubic (ax, ay, 0, x1, y1, 0, x2, y2, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
53851
54402
|
|
|
53852
54403
|
ax = x;
|
|
53853
54404
|
ay = y;
|
|
@@ -53924,7 +54475,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53924
54475
|
}
|
|
53925
54476
|
}
|
|
53926
54477
|
|
|
53927
|
-
Algorithms_Bezier.cubic (ax, ay, 0, x1, y1, 0, x2, y2, 0, x, y, 0, BEZIER_STEPS, points);
|
|
54478
|
+
Algorithms_Bezier.cubic (ax, ay, 0, x1, y1, 0, x2, y2, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
53928
54479
|
|
|
53929
54480
|
ax = x;
|
|
53930
54481
|
ay = y;
|
|
@@ -53996,7 +54547,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53996
54547
|
y += ay;
|
|
53997
54548
|
}
|
|
53998
54549
|
|
|
53999
|
-
Algorithms_Bezier.arc (ax, ay, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y, CIRCLE_STEPS, points);
|
|
54550
|
+
Algorithms_Bezier.arc (ax, ay, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y, this .CIRCLE_STEPS, points);
|
|
54000
54551
|
|
|
54001
54552
|
ax = x;
|
|
54002
54553
|
ay = y;
|
|
@@ -54026,9 +54577,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54026
54577
|
ax = points [0] .x;
|
|
54027
54578
|
ay = points [0] .y;
|
|
54028
54579
|
|
|
54029
|
-
contours .push (Object .assign (points, {
|
|
54030
|
-
|
|
54031
|
-
index += points .length;
|
|
54580
|
+
contours .push (Object .assign (points, { closed: true }));
|
|
54032
54581
|
}
|
|
54033
54582
|
|
|
54034
54583
|
points = [ ];
|
|
@@ -54042,7 +54591,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54042
54591
|
}
|
|
54043
54592
|
|
|
54044
54593
|
if (points .length > 2)
|
|
54045
|
-
contours .push (Object .assign (points, {
|
|
54594
|
+
contours .push (Object .assign (points, { closed: false }));
|
|
54046
54595
|
|
|
54047
54596
|
return !! contours .length;
|
|
54048
54597
|
},
|
|
@@ -54278,45 +54827,24 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54278
54827
|
|
|
54279
54828
|
return matrix;
|
|
54280
54829
|
},
|
|
54281
|
-
styleAttributes:
|
|
54282
|
-
{
|
|
54283
|
-
const
|
|
54284
|
-
"display",
|
|
54285
|
-
"fill",
|
|
54286
|
-
"fill-opacity",
|
|
54287
|
-
"fill-rule",
|
|
54288
|
-
"stroke",
|
|
54289
|
-
"stroke-opacity",
|
|
54290
|
-
"stroke-width",
|
|
54291
|
-
"opacity",
|
|
54292
|
-
"stop-color",
|
|
54293
|
-
"stop-opacity",
|
|
54294
|
-
"vector-effect",
|
|
54295
|
-
];
|
|
54296
|
-
|
|
54297
|
-
return function (xmlElement)
|
|
54298
|
-
{
|
|
54299
|
-
const style = Object .assign ({ }, this .styles [0]);
|
|
54300
|
-
|
|
54301
|
-
if (this .style .display === "none")
|
|
54302
|
-
return false;
|
|
54830
|
+
styleAttributes: function (xmlElement)
|
|
54831
|
+
{
|
|
54832
|
+
const style = Object .assign ({ }, this .styles .at (-1));
|
|
54303
54833
|
|
|
54304
|
-
|
|
54834
|
+
if (this .style .display === "none")
|
|
54835
|
+
return false;
|
|
54305
54836
|
|
|
54306
|
-
|
|
54307
|
-
{
|
|
54308
|
-
const attribute = xmlElement .getAttribute (style);
|
|
54837
|
+
this .styles .push (style);
|
|
54309
54838
|
|
|
54310
|
-
|
|
54311
|
-
|
|
54839
|
+
for (const attribute of xmlElement .attributes)
|
|
54840
|
+
this .parseStyle (attribute .name, attribute .value)
|
|
54312
54841
|
|
|
54313
|
-
|
|
54842
|
+
// Style attribute has higher precedence.
|
|
54314
54843
|
|
|
54315
|
-
|
|
54844
|
+
this .styleAttribute (xmlElement .getAttribute ("style"));
|
|
54316
54845
|
|
|
54317
|
-
|
|
54318
|
-
|
|
54319
|
-
})(),
|
|
54846
|
+
return true;
|
|
54847
|
+
},
|
|
54320
54848
|
styleAttribute: function (attribute)
|
|
54321
54849
|
{
|
|
54322
54850
|
if (attribute === null)
|
|
@@ -54336,6 +54864,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54336
54864
|
},
|
|
54337
54865
|
parseStyle: function (style, value)
|
|
54338
54866
|
{
|
|
54867
|
+
if (value === "inherit" || value == "unset")
|
|
54868
|
+
return;
|
|
54869
|
+
|
|
54339
54870
|
this .parseValue (value);
|
|
54340
54871
|
|
|
54341
54872
|
switch (style)
|
|
@@ -54377,15 +54908,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54377
54908
|
},
|
|
54378
54909
|
displayStyle: function (value)
|
|
54379
54910
|
{
|
|
54380
|
-
if (value === null)
|
|
54381
|
-
return;
|
|
54382
|
-
|
|
54383
54911
|
if (value === "default")
|
|
54384
|
-
return;
|
|
54385
|
-
|
|
54386
|
-
if (value === "inherit")
|
|
54387
54912
|
{
|
|
54388
|
-
this .style .display =
|
|
54913
|
+
this .style .display = "inline";
|
|
54389
54914
|
return;
|
|
54390
54915
|
}
|
|
54391
54916
|
|
|
@@ -54393,10 +54918,11 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54393
54918
|
},
|
|
54394
54919
|
fillStyle: function (value)
|
|
54395
54920
|
{
|
|
54396
|
-
if (
|
|
54921
|
+
if (value === "default")
|
|
54397
54922
|
{
|
|
54398
|
-
this .style .fillType
|
|
54399
|
-
this .style .
|
|
54923
|
+
this .style .fillType = this .styles [0] .fillType;
|
|
54924
|
+
this .style .fillColor = this .styles [0] .fillColor;
|
|
54925
|
+
this .style .fillURL = this .styles [0] .fillURL;
|
|
54400
54926
|
return;
|
|
54401
54927
|
}
|
|
54402
54928
|
|
|
@@ -54408,31 +54934,29 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54408
54934
|
|
|
54409
54935
|
if (value === "none")
|
|
54410
54936
|
{
|
|
54411
|
-
this .style .fillType ="none";
|
|
54937
|
+
this .style .fillType = "none";
|
|
54412
54938
|
return;
|
|
54413
54939
|
}
|
|
54414
54940
|
|
|
54415
|
-
if (
|
|
54941
|
+
if (this .urlValue ())
|
|
54416
54942
|
{
|
|
54417
|
-
|
|
54418
|
-
|
|
54419
|
-
|
|
54420
|
-
this .style .fillColor = this .value .copy ();
|
|
54421
|
-
return;
|
|
54422
|
-
}
|
|
54943
|
+
this .style .fillType = "URL";
|
|
54944
|
+
this .style .fillURL = this .result [1] .trim ();
|
|
54945
|
+
return;
|
|
54423
54946
|
}
|
|
54424
54947
|
|
|
54425
|
-
|
|
54426
|
-
|
|
54427
|
-
|
|
54428
|
-
|
|
54429
|
-
|
|
54948
|
+
if (this .colorValue (this .styles .at (-1) .fillColor))
|
|
54949
|
+
{
|
|
54950
|
+
this .style .fillType = "COLOR";
|
|
54951
|
+
this .style .fillColor = this .value .copy ();
|
|
54952
|
+
return;
|
|
54953
|
+
}
|
|
54430
54954
|
},
|
|
54431
54955
|
fillOpacityStyle: function (value)
|
|
54432
54956
|
{
|
|
54433
|
-
if (
|
|
54957
|
+
if (value === "default")
|
|
54434
54958
|
{
|
|
54435
|
-
this .style .fillOpacity =
|
|
54959
|
+
this .style .fillOpacity = this .styles [0] .fillOpacity;
|
|
54436
54960
|
return;
|
|
54437
54961
|
}
|
|
54438
54962
|
|
|
@@ -54442,20 +54966,29 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54442
54966
|
return;
|
|
54443
54967
|
}
|
|
54444
54968
|
|
|
54445
|
-
|
|
54446
|
-
|
|
54447
|
-
|
|
54969
|
+
if (this .double ())
|
|
54970
|
+
{
|
|
54971
|
+
this .style .fillOpacity = Algorithm.clamp (this .value, 0, 1);
|
|
54972
|
+
return;
|
|
54973
|
+
}
|
|
54448
54974
|
},
|
|
54449
54975
|
fillRuleStyle: function (value)
|
|
54450
54976
|
{
|
|
54977
|
+
if (value === "default")
|
|
54978
|
+
{
|
|
54979
|
+
this .style .fillRule = this .styles [0] .fillRule;
|
|
54980
|
+
return;
|
|
54981
|
+
}
|
|
54982
|
+
|
|
54451
54983
|
this .style .fillRule = value;
|
|
54452
54984
|
},
|
|
54453
54985
|
strokeStyle: function (value)
|
|
54454
54986
|
{
|
|
54455
|
-
if (
|
|
54987
|
+
if (value === "default")
|
|
54456
54988
|
{
|
|
54457
|
-
this .style .strokeType
|
|
54458
|
-
this .style .
|
|
54989
|
+
this .style .strokeType = this .styles [0] .strokeType;
|
|
54990
|
+
this .style .strokeColor = this .styles [0] .strokeColor;
|
|
54991
|
+
this .style .strokeURL = this .styles [0] .strokeURL;
|
|
54459
54992
|
return;
|
|
54460
54993
|
}
|
|
54461
54994
|
|
|
@@ -54467,31 +55000,29 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54467
55000
|
|
|
54468
55001
|
if (value === "none")
|
|
54469
55002
|
{
|
|
54470
|
-
this .style .strokeType ="none";
|
|
55003
|
+
this .style .strokeType = "none";
|
|
54471
55004
|
return;
|
|
54472
55005
|
}
|
|
54473
55006
|
|
|
54474
|
-
if (
|
|
55007
|
+
if (this .urlValue ())
|
|
54475
55008
|
{
|
|
54476
|
-
|
|
54477
|
-
|
|
54478
|
-
|
|
54479
|
-
this .style .strokeColor = this .value .copy ();
|
|
54480
|
-
return;
|
|
54481
|
-
}
|
|
55009
|
+
this .style .strokeType = "URL";
|
|
55010
|
+
this .style .strokeURL = this .result [1] .trim ();
|
|
55011
|
+
return;
|
|
54482
55012
|
}
|
|
54483
55013
|
|
|
54484
|
-
|
|
54485
|
-
|
|
54486
|
-
|
|
54487
|
-
|
|
54488
|
-
|
|
55014
|
+
if (this .colorValue (this .styles .at (-1) .strokeColor))
|
|
55015
|
+
{
|
|
55016
|
+
this .style .strokeType = "COLOR";
|
|
55017
|
+
this .style .strokeColor = this .value .copy ();
|
|
55018
|
+
return;
|
|
55019
|
+
}
|
|
54489
55020
|
},
|
|
54490
55021
|
strokeOpacityStyle: function (value)
|
|
54491
55022
|
{
|
|
54492
|
-
if (
|
|
55023
|
+
if (value === "default")
|
|
54493
55024
|
{
|
|
54494
|
-
this .style .strokeOpacity =
|
|
55025
|
+
this .style .strokeOpacity = this .styles [0] .strokeOpacity;
|
|
54495
55026
|
return;
|
|
54496
55027
|
}
|
|
54497
55028
|
|
|
@@ -54501,15 +55032,17 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54501
55032
|
return;
|
|
54502
55033
|
}
|
|
54503
55034
|
|
|
54504
|
-
|
|
54505
|
-
|
|
54506
|
-
|
|
55035
|
+
if (this .double ())
|
|
55036
|
+
{
|
|
55037
|
+
this .style .strokeOpacity = Algorithm.clamp (this .value, 0, 1);
|
|
55038
|
+
return;
|
|
55039
|
+
}
|
|
54507
55040
|
},
|
|
54508
55041
|
strokeWidthStyle: function (value)
|
|
54509
55042
|
{
|
|
54510
|
-
if (
|
|
55043
|
+
if (value === "default")
|
|
54511
55044
|
{
|
|
54512
|
-
this .style .strokeWidth = this .
|
|
55045
|
+
this .style .strokeWidth = this .styles [0] .strokeWidth;
|
|
54513
55046
|
return;
|
|
54514
55047
|
}
|
|
54515
55048
|
|
|
@@ -54519,15 +55052,17 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54519
55052
|
return;
|
|
54520
55053
|
}
|
|
54521
55054
|
|
|
54522
|
-
|
|
54523
|
-
|
|
54524
|
-
|
|
55055
|
+
if (this .double ())
|
|
55056
|
+
{
|
|
55057
|
+
this .style .strokeWidth = this .lengthAttribute (this .value, 1);
|
|
55058
|
+
return;
|
|
55059
|
+
}
|
|
54525
55060
|
},
|
|
54526
55061
|
opacityStyle: function (value)
|
|
54527
55062
|
{
|
|
54528
|
-
if (
|
|
55063
|
+
if (value === "default")
|
|
54529
55064
|
{
|
|
54530
|
-
this .style .opacity =
|
|
55065
|
+
this .style .opacity = this .styles [0] .opacity;
|
|
54531
55066
|
return;
|
|
54532
55067
|
}
|
|
54533
55068
|
|
|
@@ -54536,10 +55071,22 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54536
55071
|
this .style .opacity = 0;
|
|
54537
55072
|
return;
|
|
54538
55073
|
}
|
|
55074
|
+
|
|
55075
|
+
if (this .double ())
|
|
55076
|
+
{
|
|
55077
|
+
this .style .opacity = Algorithm.clamp (this .value, 0, 1) * this .styles .at (-1) .opacity;
|
|
55078
|
+
return;
|
|
55079
|
+
}
|
|
54539
55080
|
},
|
|
54540
55081
|
stopColorStyle: function (value)
|
|
54541
55082
|
{
|
|
54542
|
-
if (
|
|
55083
|
+
if (value === "default")
|
|
55084
|
+
{
|
|
55085
|
+
this .style .stopColor = this .styles [0] .stopColor;
|
|
55086
|
+
return;
|
|
55087
|
+
}
|
|
55088
|
+
|
|
55089
|
+
if (this .colorValue (Numbers_Color4.Black))
|
|
54543
55090
|
{
|
|
54544
55091
|
this .style .stopColor = this .value .copy ();
|
|
54545
55092
|
return;
|
|
@@ -54547,9 +55094,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54547
55094
|
},
|
|
54548
55095
|
stopOpacityStyle: function (value)
|
|
54549
55096
|
{
|
|
54550
|
-
if (
|
|
55097
|
+
if (value === "default")
|
|
54551
55098
|
{
|
|
54552
|
-
this .style .stopOpacity =
|
|
55099
|
+
this .style .stopOpacity = this .styles [0] .stopOpacity;
|
|
54553
55100
|
return;
|
|
54554
55101
|
}
|
|
54555
55102
|
|
|
@@ -54558,18 +55105,22 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54558
55105
|
this .style .stopOpacity = 0;
|
|
54559
55106
|
return;
|
|
54560
55107
|
}
|
|
55108
|
+
|
|
55109
|
+
if (this .double ())
|
|
55110
|
+
{
|
|
55111
|
+
this .style .stopOpacity = Algorithm.clamp (this .value, 0, 1);
|
|
55112
|
+
return;
|
|
55113
|
+
}
|
|
54561
55114
|
},
|
|
54562
55115
|
vectorEffectStyle: function (value)
|
|
54563
55116
|
{
|
|
54564
|
-
if (value
|
|
55117
|
+
if (value === "default")
|
|
54565
55118
|
{
|
|
54566
|
-
this .style .vectorEffect =
|
|
55119
|
+
this .style .vectorEffect = this .styles [0] .vectorEffect;
|
|
54567
55120
|
return;
|
|
54568
55121
|
}
|
|
54569
55122
|
|
|
54570
|
-
|
|
54571
|
-
|
|
54572
|
-
this .style .vectorEffect = this .styles .at (-1) .vectorEffect;
|
|
55123
|
+
this .style .vectorEffect = value;
|
|
54573
55124
|
},
|
|
54574
55125
|
parseValue: function (value)
|
|
54575
55126
|
{
|
|
@@ -54625,12 +55176,14 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54625
55176
|
{
|
|
54626
55177
|
const color = new Numbers_Color4 (0, 0, 0, 0);
|
|
54627
55178
|
|
|
54628
|
-
return function ()
|
|
55179
|
+
return function (c)
|
|
54629
55180
|
{
|
|
54630
55181
|
if (!SVGParser_Grammar .color .parse (this))
|
|
54631
55182
|
return false;
|
|
54632
55183
|
|
|
54633
|
-
|
|
55184
|
+
const defaultColor = this .cssColor (c);
|
|
55185
|
+
|
|
55186
|
+
this .value = color .set (... this .convertColor (this .result [1], defaultColor));
|
|
54634
55187
|
|
|
54635
55188
|
return true;
|
|
54636
55189
|
};
|
|
@@ -54639,13 +55192,20 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54639
55192
|
{
|
|
54640
55193
|
return SVGParser_Grammar .url .parse (this);
|
|
54641
55194
|
},
|
|
55195
|
+
cssColor: function (c, a = c .a)
|
|
55196
|
+
{
|
|
55197
|
+
return `rgba(${c .r * 255},${c .g * 255},${c .b * 255},${a})`;
|
|
55198
|
+
},
|
|
54642
55199
|
createTransform: function (xmlElement, t = Numbers_Vector2.Zero, s = Numbers_Vector2.One)
|
|
54643
55200
|
{
|
|
54644
55201
|
// Determine matrix.
|
|
54645
55202
|
|
|
54646
55203
|
const
|
|
54647
|
-
scene
|
|
54648
|
-
m
|
|
55204
|
+
scene = this .getExecutionContext (),
|
|
55205
|
+
m = this .transformAttribute (xmlElement .getAttribute ("transform"));
|
|
55206
|
+
|
|
55207
|
+
this .modelMatrix .push ();
|
|
55208
|
+
this .modelMatrix .multLeft (Numbers_Matrix4.Matrix3 (m));
|
|
54649
55209
|
|
|
54650
55210
|
m .translate (t);
|
|
54651
55211
|
m .scale (s);
|
|
@@ -54654,7 +55214,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54654
55214
|
|
|
54655
55215
|
const
|
|
54656
55216
|
transformNode = scene .createNode ("Transform"),
|
|
54657
|
-
matrix =
|
|
55217
|
+
matrix = Numbers_Matrix4.Matrix3 (m),
|
|
54658
55218
|
translation = new Numbers_Vector3 (0, 0, 0),
|
|
54659
55219
|
rotation = new Numbers_Rotation4 (),
|
|
54660
55220
|
scale = new Numbers_Vector3 (1, 1, 1),
|
|
@@ -54671,12 +55231,18 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54671
55231
|
|
|
54672
55232
|
this .idAttribute (xmlElement .getAttribute ("id"), transformNode);
|
|
54673
55233
|
|
|
54674
|
-
//
|
|
55234
|
+
// Add node to parent.
|
|
54675
55235
|
|
|
54676
|
-
this .
|
|
55236
|
+
this .groupNodes .at (-1) .children .push (transformNode);
|
|
54677
55237
|
|
|
54678
55238
|
return transformNode;
|
|
54679
55239
|
},
|
|
55240
|
+
popAll: function ()
|
|
55241
|
+
{
|
|
55242
|
+
this .groupNodes .pop ();
|
|
55243
|
+
this .modelMatrix .pop ();
|
|
55244
|
+
this .styles .pop ();
|
|
55245
|
+
},
|
|
54680
55246
|
createFillAppearance: function (bbox)
|
|
54681
55247
|
{
|
|
54682
55248
|
const
|
|
@@ -54733,10 +55299,13 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54733
55299
|
switch (xmlElement .nodeName)
|
|
54734
55300
|
{
|
|
54735
55301
|
case "linearGradient":
|
|
54736
|
-
return this .
|
|
55302
|
+
return this .linearGradientElementUrl (xmlElement, bbox);
|
|
54737
55303
|
|
|
54738
55304
|
case "radialGradient":
|
|
54739
|
-
return this .
|
|
55305
|
+
return this .radialGradientElementUrl (xmlElement, bbox);
|
|
55306
|
+
|
|
55307
|
+
case "pattern":
|
|
55308
|
+
return this .patternUrl (xmlElement);
|
|
54740
55309
|
}
|
|
54741
55310
|
},
|
|
54742
55311
|
createStrokeAppearance: function ()
|
|
@@ -54755,23 +55324,39 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54755
55324
|
: this .getStokeWidth ();
|
|
54756
55325
|
|
|
54757
55326
|
if (strokeWidth > 1)
|
|
54758
|
-
|
|
54759
|
-
const lineProperties = scene .createNode ("LineProperties");
|
|
54760
|
-
|
|
54761
|
-
appearanceNode .lineProperties = lineProperties;
|
|
54762
|
-
lineProperties .linewidthScaleFactor = strokeWidth;
|
|
54763
|
-
}
|
|
55327
|
+
appearanceNode .lineProperties = this .getLineProperties (strokeWidth);
|
|
54764
55328
|
|
|
54765
55329
|
return appearanceNode;
|
|
54766
55330
|
},
|
|
54767
55331
|
getStokeWidth: function ()
|
|
54768
55332
|
{
|
|
54769
55333
|
const
|
|
54770
|
-
modelMatrix = this .
|
|
55334
|
+
modelMatrix = this .modelMatrix .get (),
|
|
54771
55335
|
strokeWidth = modelMatrix .multDirMatrix (new Numbers_Vector3 (this .style .strokeWidth, this .style .strokeWidth, 0));
|
|
54772
55336
|
|
|
54773
55337
|
return (strokeWidth .x + strokeWidth .y) / 2;
|
|
54774
55338
|
},
|
|
55339
|
+
getLineProperties: function (strokeWidth)
|
|
55340
|
+
{
|
|
55341
|
+
const lineProperties = this .lineProperties .get (strokeWidth);
|
|
55342
|
+
|
|
55343
|
+
if (lineProperties)
|
|
55344
|
+
{
|
|
55345
|
+
return lineProperties;
|
|
55346
|
+
}
|
|
55347
|
+
else
|
|
55348
|
+
{
|
|
55349
|
+
const
|
|
55350
|
+
scene = this .getExecutionContext (),
|
|
55351
|
+
lineProperties = scene .createNode ("LineProperties");
|
|
55352
|
+
|
|
55353
|
+
lineProperties .linewidthScaleFactor = strokeWidth;
|
|
55354
|
+
|
|
55355
|
+
this .lineProperties .set (strokeWidth, lineProperties);
|
|
55356
|
+
|
|
55357
|
+
return lineProperties;
|
|
55358
|
+
}
|
|
55359
|
+
},
|
|
54775
55360
|
createTextureProperties: function ()
|
|
54776
55361
|
{
|
|
54777
55362
|
const
|
|
@@ -54800,26 +55385,6 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54800
55385
|
|
|
54801
55386
|
return texCoordNode;
|
|
54802
55387
|
},
|
|
54803
|
-
getModelMatrix: function ()
|
|
54804
|
-
{
|
|
54805
|
-
const modelMatrix = new Numbers_Matrix4 ();
|
|
54806
|
-
|
|
54807
|
-
for (let i = 1; i < this .groupNodes .length; ++ i)
|
|
54808
|
-
{
|
|
54809
|
-
const
|
|
54810
|
-
node = this .groupNodes [i],
|
|
54811
|
-
matrix = new Numbers_Matrix4 ();
|
|
54812
|
-
|
|
54813
|
-
matrix .set (node .translation .getValue (),
|
|
54814
|
-
node .rotation .getValue (),
|
|
54815
|
-
node .scale .getValue (),
|
|
54816
|
-
node .scaleOrientation .getValue ());
|
|
54817
|
-
|
|
54818
|
-
modelMatrix .multLeft (matrix);
|
|
54819
|
-
}
|
|
54820
|
-
|
|
54821
|
-
return modelMatrix;
|
|
54822
|
-
},
|
|
54823
55388
|
createTesselator: function ()
|
|
54824
55389
|
{
|
|
54825
55390
|
// Function called for each vertex of tessellator output.
|
|
@@ -54889,7 +55454,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
54889
55454
|
x_ite_Namespace.set ("x_ite/Parser/SVGParser", SVGParser_default_);
|
|
54890
55455
|
/* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
|
|
54891
55456
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
|
|
54892
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
55457
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(765);
|
|
54893
55458
|
/*******************************************************************************
|
|
54894
55459
|
*
|
|
54895
55460
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -56431,125 +56996,6 @@ const Line3_default_ = Line3;
|
|
|
56431
56996
|
|
|
56432
56997
|
x_ite_Namespace.set ("standard/Math/Geometry/Line3", Line3_default_);
|
|
56433
56998
|
/* harmony default export */ const Geometry_Line3 = (Line3_default_);
|
|
56434
|
-
;// CONCATENATED MODULE: ./src/standard/Math/Utility/MatrixStack.js
|
|
56435
|
-
/*******************************************************************************
|
|
56436
|
-
*
|
|
56437
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
56438
|
-
*
|
|
56439
|
-
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
56440
|
-
*
|
|
56441
|
-
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
56442
|
-
*
|
|
56443
|
-
* The copyright notice above does not evidence any actual of intended
|
|
56444
|
-
* publication of such source code, and is an unpublished work by create3000.
|
|
56445
|
-
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
56446
|
-
* create3000.
|
|
56447
|
-
*
|
|
56448
|
-
* No permission is granted to copy, distribute, or create derivative works from
|
|
56449
|
-
* the contents of this software, in whole or in part, without the prior written
|
|
56450
|
-
* permission of create3000.
|
|
56451
|
-
*
|
|
56452
|
-
* NON-MILITARY USE ONLY
|
|
56453
|
-
*
|
|
56454
|
-
* All create3000 software are effectively free software with a non-military use
|
|
56455
|
-
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
56456
|
-
* source in any way you please with the exception anything that uses it must be
|
|
56457
|
-
* marked to indicate is contains 'non-military use only' components.
|
|
56458
|
-
*
|
|
56459
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
56460
|
-
*
|
|
56461
|
-
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
56462
|
-
*
|
|
56463
|
-
* This file is part of the X_ITE Project.
|
|
56464
|
-
*
|
|
56465
|
-
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
56466
|
-
* terms of the GNU General Public License version 3 only, as published by the
|
|
56467
|
-
* Free Software Foundation.
|
|
56468
|
-
*
|
|
56469
|
-
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
56470
|
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
56471
|
-
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
56472
|
-
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
56473
|
-
*
|
|
56474
|
-
* You should have received a copy of the GNU General Public License version 3
|
|
56475
|
-
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
56476
|
-
* copy of the GPLv3 License.
|
|
56477
|
-
*
|
|
56478
|
-
* For Silvio, Joy and Adi.
|
|
56479
|
-
*
|
|
56480
|
-
******************************************************************************/
|
|
56481
|
-
|
|
56482
|
-
function MatrixStack (Type)
|
|
56483
|
-
{
|
|
56484
|
-
return Object .assign ([ new Type () ],
|
|
56485
|
-
{
|
|
56486
|
-
top: 0,
|
|
56487
|
-
set: function (matrix)
|
|
56488
|
-
{
|
|
56489
|
-
this [this .top] .assign (matrix);
|
|
56490
|
-
},
|
|
56491
|
-
get: function ()
|
|
56492
|
-
{
|
|
56493
|
-
return this [this .top];
|
|
56494
|
-
},
|
|
56495
|
-
push: function ()
|
|
56496
|
-
{
|
|
56497
|
-
const top = ++ this .top;
|
|
56498
|
-
|
|
56499
|
-
if (top < this .length)
|
|
56500
|
-
this [top] .assign (this [top - 1]);
|
|
56501
|
-
else
|
|
56502
|
-
this [top] = this [top - 1] .copy ();
|
|
56503
|
-
},
|
|
56504
|
-
pushMatrix: function (matrix)
|
|
56505
|
-
{
|
|
56506
|
-
const top = ++ this .top;
|
|
56507
|
-
|
|
56508
|
-
if (top < this .length)
|
|
56509
|
-
this [top] .assign (matrix);
|
|
56510
|
-
else
|
|
56511
|
-
this [top] = matrix .copy ();
|
|
56512
|
-
},
|
|
56513
|
-
pop: function ()
|
|
56514
|
-
{
|
|
56515
|
-
-- this .top;
|
|
56516
|
-
},
|
|
56517
|
-
clear: function ()
|
|
56518
|
-
{
|
|
56519
|
-
this .top = 0;
|
|
56520
|
-
},
|
|
56521
|
-
size: function ()
|
|
56522
|
-
{
|
|
56523
|
-
return this .top + 1;
|
|
56524
|
-
},
|
|
56525
|
-
identity: function ()
|
|
56526
|
-
{
|
|
56527
|
-
this [this .top] .identity ();
|
|
56528
|
-
},
|
|
56529
|
-
multLeft: function (matrix)
|
|
56530
|
-
{
|
|
56531
|
-
this [this .top] .multLeft (matrix);
|
|
56532
|
-
},
|
|
56533
|
-
translate: function (vector)
|
|
56534
|
-
{
|
|
56535
|
-
this [this .top] .translate (vector);
|
|
56536
|
-
},
|
|
56537
|
-
rotate: function (rotation)
|
|
56538
|
-
{
|
|
56539
|
-
this [this .top] .rotate (rotation);
|
|
56540
|
-
},
|
|
56541
|
-
scale: function (vector)
|
|
56542
|
-
{
|
|
56543
|
-
this [this .top] .scale (vector);
|
|
56544
|
-
},
|
|
56545
|
-
});
|
|
56546
|
-
}
|
|
56547
|
-
|
|
56548
|
-
const MatrixStack_default_ = MatrixStack;
|
|
56549
|
-
;
|
|
56550
|
-
|
|
56551
|
-
x_ite_Namespace.set ("standard/Math/Utility/MatrixStack", MatrixStack_default_);
|
|
56552
|
-
/* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
|
|
56553
56999
|
;// CONCATENATED MODULE: ./src/x_ite/Rendering/X3DRenderObject.js
|
|
56554
57000
|
/*******************************************************************************
|
|
56555
57001
|
*
|
|
@@ -60348,220 +60794,6 @@ const GeometryContext_default_ = GeometryContext;
|
|
|
60348
60794
|
|
|
60349
60795
|
x_ite_Namespace.set ("x_ite/Browser/Rendering/GeometryContext", GeometryContext_default_);
|
|
60350
60796
|
/* harmony default export */ const Rendering_GeometryContext = (GeometryContext_default_);
|
|
60351
|
-
;// CONCATENATED MODULE: ./src/standard/Math/Numbers/Complex.js
|
|
60352
|
-
/*******************************************************************************
|
|
60353
|
-
*
|
|
60354
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
60355
|
-
*
|
|
60356
|
-
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
60357
|
-
*
|
|
60358
|
-
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
60359
|
-
*
|
|
60360
|
-
* The copyright notice above does not evidence any actual of intended
|
|
60361
|
-
* publication of such source code, and is an unpublished work by create3000.
|
|
60362
|
-
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
60363
|
-
* create3000.
|
|
60364
|
-
*
|
|
60365
|
-
* No permission is granted to copy, distribute, or create derivative works from
|
|
60366
|
-
* the contents of this software, in whole or in part, without the prior written
|
|
60367
|
-
* permission of create3000.
|
|
60368
|
-
*
|
|
60369
|
-
* NON-MILITARY USE ONLY
|
|
60370
|
-
*
|
|
60371
|
-
* All create3000 software are effectively free software with a non-military use
|
|
60372
|
-
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
60373
|
-
* source in any way you please with the exception anything that uses it must be
|
|
60374
|
-
* marked to indicate is contains 'non-military use only' components.
|
|
60375
|
-
*
|
|
60376
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
60377
|
-
*
|
|
60378
|
-
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
60379
|
-
*
|
|
60380
|
-
* This file is part of the X_ITE Project.
|
|
60381
|
-
*
|
|
60382
|
-
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
60383
|
-
* terms of the GNU General Public License version 3 only, as published by the
|
|
60384
|
-
* Free Software Foundation.
|
|
60385
|
-
*
|
|
60386
|
-
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
60387
|
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
60388
|
-
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
60389
|
-
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
60390
|
-
*
|
|
60391
|
-
* You should have received a copy of the GNU General Public License version 3
|
|
60392
|
-
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
60393
|
-
* copy of the GPLv3 License.
|
|
60394
|
-
*
|
|
60395
|
-
* For Silvio, Joy and Adi.
|
|
60396
|
-
*
|
|
60397
|
-
******************************************************************************/
|
|
60398
|
-
|
|
60399
|
-
function Complex (real, imag)
|
|
60400
|
-
{
|
|
60401
|
-
this .real = real;
|
|
60402
|
-
this .imag = imag;
|
|
60403
|
-
}
|
|
60404
|
-
|
|
60405
|
-
Complex .prototype =
|
|
60406
|
-
{
|
|
60407
|
-
constructor: Complex,
|
|
60408
|
-
[Symbol .iterator]: function* ()
|
|
60409
|
-
{
|
|
60410
|
-
yield this .real;
|
|
60411
|
-
yield this .imag;
|
|
60412
|
-
},
|
|
60413
|
-
copy: function ()
|
|
60414
|
-
{
|
|
60415
|
-
const copy = Object .create (Complex .prototype);
|
|
60416
|
-
copy .real = this .real;
|
|
60417
|
-
copy .imag = this .imag;
|
|
60418
|
-
return copy;
|
|
60419
|
-
},
|
|
60420
|
-
assign: function (complex)
|
|
60421
|
-
{
|
|
60422
|
-
this .real = complex .real;
|
|
60423
|
-
this .imag = complex .imag;
|
|
60424
|
-
return this;
|
|
60425
|
-
},
|
|
60426
|
-
equals: function (complex)
|
|
60427
|
-
{
|
|
60428
|
-
return this .real === complex .real &&
|
|
60429
|
-
this .imag === complex .imag;
|
|
60430
|
-
},
|
|
60431
|
-
setPolar: function (magnitude, angle)
|
|
60432
|
-
{
|
|
60433
|
-
this .real = magnitude * Math .cos (angle);
|
|
60434
|
-
this .imag = magnitude * Math .sin (angle);
|
|
60435
|
-
return this;
|
|
60436
|
-
},
|
|
60437
|
-
conjugate: function ()
|
|
60438
|
-
{
|
|
60439
|
-
this .imag = -this .imag;
|
|
60440
|
-
return this;
|
|
60441
|
-
},
|
|
60442
|
-
negate: function ()
|
|
60443
|
-
{
|
|
60444
|
-
this .real = -this .real;
|
|
60445
|
-
this .imag = -this .imag;
|
|
60446
|
-
return this;
|
|
60447
|
-
},
|
|
60448
|
-
inverse: function ()
|
|
60449
|
-
{
|
|
60450
|
-
const d = this .real * this .real + this .imag * this .imag;
|
|
60451
|
-
|
|
60452
|
-
this .real /= d;
|
|
60453
|
-
this .imag /= -d;
|
|
60454
|
-
return this;
|
|
60455
|
-
},
|
|
60456
|
-
add: function (value)
|
|
60457
|
-
{
|
|
60458
|
-
this .real += value .real;
|
|
60459
|
-
this .imag += value .imag;
|
|
60460
|
-
return this;
|
|
60461
|
-
},
|
|
60462
|
-
subtract: function (value)
|
|
60463
|
-
{
|
|
60464
|
-
this .real -= value .real;
|
|
60465
|
-
this .imag -= value .imag;
|
|
60466
|
-
return this;
|
|
60467
|
-
},
|
|
60468
|
-
multiply: function (value)
|
|
60469
|
-
{
|
|
60470
|
-
this .real *= value;
|
|
60471
|
-
this .imag *= value;
|
|
60472
|
-
return this;
|
|
60473
|
-
},
|
|
60474
|
-
multComp: function (value)
|
|
60475
|
-
{
|
|
60476
|
-
const
|
|
60477
|
-
{ real: ar, imag: ai } = this,
|
|
60478
|
-
{ real: br, imag: bi } = value;
|
|
60479
|
-
|
|
60480
|
-
this .real = ar * br - ai * bi;
|
|
60481
|
-
this .imag = ar * bi + ai * br;
|
|
60482
|
-
return this;
|
|
60483
|
-
},
|
|
60484
|
-
//divide: function (value)
|
|
60485
|
-
//{
|
|
60486
|
-
// return this;
|
|
60487
|
-
//},
|
|
60488
|
-
divComp: function (value)
|
|
60489
|
-
{
|
|
60490
|
-
const
|
|
60491
|
-
{ real: ar, imag: ai } = this,
|
|
60492
|
-
{ real: br, imag: bi } = value,
|
|
60493
|
-
d = br * br + bi * bi;
|
|
60494
|
-
|
|
60495
|
-
this .real = (ar * br + ai * bi) / d;
|
|
60496
|
-
this .imag = (ai * br - ar * bi) / d;
|
|
60497
|
-
return this;
|
|
60498
|
-
},
|
|
60499
|
-
toString: function ()
|
|
60500
|
-
{
|
|
60501
|
-
if (this .imag)
|
|
60502
|
-
return this .real + " " + this .imag + "i";
|
|
60503
|
-
|
|
60504
|
-
return String (this .real);
|
|
60505
|
-
},
|
|
60506
|
-
};
|
|
60507
|
-
|
|
60508
|
-
Object .defineProperty (Complex .prototype, "magnitude",
|
|
60509
|
-
{
|
|
60510
|
-
get: function ()
|
|
60511
|
-
{
|
|
60512
|
-
if (this .real)
|
|
60513
|
-
{
|
|
60514
|
-
if (this .imag)
|
|
60515
|
-
return Math .hypot (this .real, this .imag);
|
|
60516
|
-
|
|
60517
|
-
return Math .abs (this .real);
|
|
60518
|
-
}
|
|
60519
|
-
|
|
60520
|
-
return Math .abs (this .imag);
|
|
60521
|
-
},
|
|
60522
|
-
set: function (magnitude)
|
|
60523
|
-
{
|
|
60524
|
-
this .setPolar (magnitude, this .angle);
|
|
60525
|
-
},
|
|
60526
|
-
enumerable: false,
|
|
60527
|
-
configurable: false
|
|
60528
|
-
});
|
|
60529
|
-
|
|
60530
|
-
Object .defineProperty (Complex .prototype, "angle",
|
|
60531
|
-
{
|
|
60532
|
-
get: function ()
|
|
60533
|
-
{
|
|
60534
|
-
return Math .atan2 (this .imag, this .real);
|
|
60535
|
-
},
|
|
60536
|
-
set: function (angle)
|
|
60537
|
-
{
|
|
60538
|
-
this .setPolar (this .magnitude, angle);
|
|
60539
|
-
},
|
|
60540
|
-
enumerable: false,
|
|
60541
|
-
configurable: false
|
|
60542
|
-
});
|
|
60543
|
-
|
|
60544
|
-
Object .assign (Complex,
|
|
60545
|
-
{
|
|
60546
|
-
Polar: function (magnitude, angle)
|
|
60547
|
-
{
|
|
60548
|
-
return Object .create (Complex .prototype) .setPolar (magnitude, angle);
|
|
60549
|
-
},
|
|
60550
|
-
multiply: function (lhs, rhs)
|
|
60551
|
-
{
|
|
60552
|
-
return lhs .copy () .multiply (rhs);
|
|
60553
|
-
},
|
|
60554
|
-
multComp: function (lhs, rhs)
|
|
60555
|
-
{
|
|
60556
|
-
return lhs .copy () .multComp (rhs);
|
|
60557
|
-
},
|
|
60558
|
-
});
|
|
60559
|
-
|
|
60560
|
-
const Complex_default_ = Complex;
|
|
60561
|
-
;
|
|
60562
|
-
|
|
60563
|
-
x_ite_Namespace.set ("standard/Math/Numbers/Complex", Complex_default_);
|
|
60564
|
-
/* harmony default export */ const Numbers_Complex = (Complex_default_);
|
|
60565
60797
|
;// CONCATENATED MODULE: ./src/standard/Utility/BitSet.js
|
|
60566
60798
|
/*******************************************************************************
|
|
60567
60799
|
*
|
|
@@ -61884,7 +62116,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
61884
62116
|
x_ite_Namespace.set ("x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
|
|
61885
62117
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
|
|
61886
62118
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
61887
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
62119
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(765);
|
|
61888
62120
|
/*******************************************************************************
|
|
61889
62121
|
*
|
|
61890
62122
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -62055,6 +62287,9 @@ ImageTexture .prototype = Object .assign (Object .create (Texturing_X3DTexture2D
|
|
|
62055
62287
|
width = image .width,
|
|
62056
62288
|
height = image .height;
|
|
62057
62289
|
|
|
62290
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/createImageBitmap
|
|
62291
|
+
// createImageBitmap
|
|
62292
|
+
|
|
62058
62293
|
// Scale image if needed and flip vertically.
|
|
62059
62294
|
|
|
62060
62295
|
if (gl .getVersion () >= 2 || (Algorithm.isPowerOfTwo (width) && Algorithm.isPowerOfTwo (height)))
|
|
@@ -66138,7 +66373,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
66138
66373
|
x_ite_Namespace.set ("x_ite/Execution/X3DWorld", X3DWorld_default_);
|
|
66139
66374
|
/* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
|
|
66140
66375
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
|
|
66141
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
66376
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(765);
|
|
66142
66377
|
/*******************************************************************************
|
|
66143
66378
|
*
|
|
66144
66379
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -68495,7 +68730,7 @@ const URLs_default_ = URLs;
|
|
|
68495
68730
|
x_ite_Namespace.set ("x_ite/Browser/Networking/URLs", URLs_default_);
|
|
68496
68731
|
/* harmony default export */ const Networking_URLs = (URLs_default_);
|
|
68497
68732
|
;// CONCATENATED MODULE: ./src/x_ite/Configuration/ComponentInfo.js
|
|
68498
|
-
/* provided dependency */ var ComponentInfo_$ = __webpack_require__(
|
|
68733
|
+
/* provided dependency */ var ComponentInfo_$ = __webpack_require__(765);
|
|
68499
68734
|
/*******************************************************************************
|
|
68500
68735
|
*
|
|
68501
68736
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -70461,7 +70696,7 @@ const DataStorage_default_ = DataStorage;
|
|
|
70461
70696
|
x_ite_Namespace.set ("standard/Utility/DataStorage", DataStorage_default_);
|
|
70462
70697
|
/* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
|
|
70463
70698
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
70464
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
70699
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(765);
|
|
70465
70700
|
/*******************************************************************************
|
|
70466
70701
|
*
|
|
70467
70702
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -76951,8 +77186,8 @@ const OrientationChaser_default_ = OrientationChaser;
|
|
|
76951
77186
|
x_ite_Namespace.set ("x_ite/Components/Followers/OrientationChaser", OrientationChaser_default_);
|
|
76952
77187
|
/* harmony default export */ const Followers_OrientationChaser = (OrientationChaser_default_);
|
|
76953
77188
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
76954
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
76955
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
77189
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(474);
|
|
77190
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(765);
|
|
76956
77191
|
/*******************************************************************************
|
|
76957
77192
|
*
|
|
76958
77193
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -77816,8 +78051,8 @@ const ExamineViewer_default_ = ExamineViewer;
|
|
|
77816
78051
|
x_ite_Namespace.set ("x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
|
|
77817
78052
|
/* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
|
|
77818
78053
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
77819
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
77820
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
78054
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(474);
|
|
78055
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(765);
|
|
77821
78056
|
/*******************************************************************************
|
|
77822
78057
|
*
|
|
77823
78058
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -78767,8 +79002,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
78767
79002
|
x_ite_Namespace.set ("x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
|
|
78768
79003
|
/* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
|
|
78769
79004
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
78770
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
78771
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
79005
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(474);
|
|
79006
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(765);
|
|
78772
79007
|
/*******************************************************************************
|
|
78773
79008
|
*
|
|
78774
79009
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -79077,8 +79312,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
79077
79312
|
x_ite_Namespace.set ("x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
|
|
79078
79313
|
/* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
|
|
79079
79314
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
79080
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
79081
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
79315
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(474);
|
|
79316
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(765);
|
|
79082
79317
|
/*******************************************************************************
|
|
79083
79318
|
*
|
|
79084
79319
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -80681,8 +80916,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
80681
80916
|
x_ite_Namespace.set ("x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
|
|
80682
80917
|
/* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
|
|
80683
80918
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
80684
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
80685
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
80919
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(474);
|
|
80920
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(765);
|
|
80686
80921
|
/*******************************************************************************
|
|
80687
80922
|
*
|
|
80688
80923
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -81704,8 +81939,8 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
|
|
|
81704
81939
|
x_ite_Namespace.set ("x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
|
|
81705
81940
|
/* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
|
|
81706
81941
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
81707
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
81708
|
-
/* provided dependency */ var ResizeSensor = __webpack_require__(
|
|
81942
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(765);
|
|
81943
|
+
/* provided dependency */ var ResizeSensor = __webpack_require__(856);
|
|
81709
81944
|
/*******************************************************************************
|
|
81710
81945
|
*
|
|
81711
81946
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -90231,7 +90466,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
90231
90466
|
x_ite_Namespace.set ("x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
|
|
90232
90467
|
/* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
|
|
90233
90468
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
90234
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
90469
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(765);
|
|
90235
90470
|
/*******************************************************************************
|
|
90236
90471
|
*
|
|
90237
90472
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -92121,8 +92356,8 @@ UnlitMaterial .prototype = Object .assign (Object .create (Shape_X3DOneSidedMate
|
|
|
92121
92356
|
},
|
|
92122
92357
|
set_transparent__: function ()
|
|
92123
92358
|
{
|
|
92124
|
-
this .setTransparent (
|
|
92125
|
-
|
|
92359
|
+
this .setTransparent (!!(this .getTransparency () ||
|
|
92360
|
+
(this .getEmissiveTexture () && this .getEmissiveTexture () .isTransparent ())));
|
|
92126
92361
|
},
|
|
92127
92362
|
getMaterialKey: function ()
|
|
92128
92363
|
{
|
|
@@ -110839,8 +111074,8 @@ Material .prototype = Object .assign (Object .create (Shape_X3DOneSidedMaterialN
|
|
|
110839
111074
|
},
|
|
110840
111075
|
set_transparent__: function ()
|
|
110841
111076
|
{
|
|
110842
|
-
this .setTransparent (
|
|
110843
|
-
|
|
111077
|
+
this .setTransparent (!!(this .getTransparency () ||
|
|
111078
|
+
(this .diffuseTextureNode && this .diffuseTextureNode .isTransparent ())));
|
|
110844
111079
|
},
|
|
110845
111080
|
getTextureIndices: (function ()
|
|
110846
111081
|
{
|
|
@@ -111198,8 +111433,8 @@ PhysicalMaterial .prototype = Object .assign (Object .create (Shape_X3DOneSidedM
|
|
|
111198
111433
|
},
|
|
111199
111434
|
set_transparent__: function ()
|
|
111200
111435
|
{
|
|
111201
|
-
this .setTransparent (
|
|
111202
|
-
|
|
111436
|
+
this .setTransparent (!!(this .getTransparency () ||
|
|
111437
|
+
(this .baseTextureNode && this .baseTextureNode .isTransparent ())));
|
|
111203
111438
|
},
|
|
111204
111439
|
getTextureIndices: (function ()
|
|
111205
111440
|
{
|
|
@@ -112112,7 +112347,7 @@ const X3DSoundSourceNode_default_ = X3DSoundSourceNode;
|
|
|
112112
112347
|
x_ite_Namespace.set ("x_ite/Components/Sound/X3DSoundSourceNode", X3DSoundSourceNode_default_);
|
|
112113
112348
|
/* harmony default export */ const Sound_X3DSoundSourceNode = (X3DSoundSourceNode_default_);
|
|
112114
112349
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Sound/AudioClip.js
|
|
112115
|
-
/* provided dependency */ var AudioClip_$ = __webpack_require__(
|
|
112350
|
+
/* provided dependency */ var AudioClip_$ = __webpack_require__(765);
|
|
112116
112351
|
/*******************************************************************************
|
|
112117
112352
|
*
|
|
112118
112353
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -114927,8 +115162,8 @@ const GIFMedia_default_ = GifMedia;
|
|
|
114927
115162
|
x_ite_Namespace.set ("x_ite/Browser/Texturing/GIFMedia", GIFMedia_default_);
|
|
114928
115163
|
/* harmony default export */ const GIFMedia = (GIFMedia_default_);
|
|
114929
115164
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
114930
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
114931
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
115165
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(765);
|
|
115166
|
+
/* provided dependency */ var SuperGif = __webpack_require__(681);
|
|
114932
115167
|
/*******************************************************************************
|
|
114933
115168
|
*
|
|
114934
115169
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -115886,7 +116121,7 @@ const MultiTextureTransform_default_ = MultiTextureTransform;
|
|
|
115886
116121
|
x_ite_Namespace.set ("x_ite/Components/Texturing/MultiTextureTransform", MultiTextureTransform_default_);
|
|
115887
116122
|
/* harmony default export */ const Texturing_MultiTextureTransform = (MultiTextureTransform_default_);
|
|
115888
116123
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/PixelTexture.js
|
|
115889
|
-
/* provided dependency */ var PixelTexture_$ = __webpack_require__(
|
|
116124
|
+
/* provided dependency */ var PixelTexture_$ = __webpack_require__(765);
|
|
115890
116125
|
/*******************************************************************************
|
|
115891
116126
|
*
|
|
115892
116127
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -116589,7 +116824,7 @@ const Components_default_ = Components;
|
|
|
116589
116824
|
x_ite_Namespace.set ("x_ite/Components", Components_default_);
|
|
116590
116825
|
/* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
|
|
116591
116826
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
|
|
116592
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
116827
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(765);
|
|
116593
116828
|
/*******************************************************************************
|
|
116594
116829
|
* MIT License
|
|
116595
116830
|
*
|
|
@@ -117826,7 +118061,7 @@ const SupportedProfiles_default_ = SupportedProfiles;
|
|
|
117826
118061
|
x_ite_Namespace.set ("x_ite/Configuration/SupportedProfiles", SupportedProfiles_default_);
|
|
117827
118062
|
/* harmony default export */ const Configuration_SupportedProfiles = (SupportedProfiles_default_);
|
|
117828
118063
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
|
|
117829
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
118064
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(765);
|
|
117830
118065
|
/*******************************************************************************
|
|
117831
118066
|
*
|
|
117832
118067
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118764,7 +118999,7 @@ const X3DBrowser_default_ = X3DBrowser;
|
|
|
118764
118999
|
x_ite_Namespace.set ("x_ite/Browser/X3DBrowser", X3DBrowser_default_);
|
|
118765
119000
|
/* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
|
|
118766
119001
|
;// CONCATENATED MODULE: ./src/x_ite/Fallback.js
|
|
118767
|
-
/* provided dependency */ var Fallback_$ = __webpack_require__(
|
|
119002
|
+
/* provided dependency */ var Fallback_$ = __webpack_require__(765);
|
|
118768
119003
|
/*******************************************************************************
|
|
118769
119004
|
*
|
|
118770
119005
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118943,8 +119178,8 @@ const MicroTime_default_ = undefined;
|
|
|
118943
119178
|
x_ite_Namespace.set ("standard/Time/MicroTime", MicroTime_default_);
|
|
118944
119179
|
/* harmony default export */ const MicroTime = ((/* unused pure expression or super */ null && (MicroTime_default_)));
|
|
118945
119180
|
;// CONCATENATED MODULE: ./src/lib/jquery.js
|
|
118946
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
118947
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
119181
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(765);
|
|
119182
|
+
/* provided dependency */ var pako = __webpack_require__(467);
|
|
118948
119183
|
jquery_$.decodeText = function (input)
|
|
118949
119184
|
{
|
|
118950
119185
|
if (typeof input === "string")
|
|
@@ -118971,14 +119206,14 @@ const jquery_default_ = jquery_$;
|
|
|
118971
119206
|
x_ite_Namespace.set ("lib/jquery", jquery_default_);
|
|
118972
119207
|
/* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
|
|
118973
119208
|
;// CONCATENATED MODULE: ./src/lib/libtess.js
|
|
118974
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
119209
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(241);
|
|
118975
119210
|
const libtess_default_ = libtess_libtess;
|
|
118976
119211
|
;
|
|
118977
119212
|
|
|
118978
119213
|
x_ite_Namespace.set ("lib/libtess", libtess_default_);
|
|
118979
119214
|
/* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
|
|
118980
119215
|
;// CONCATENATED MODULE: ./src/x_ite/X3D.js
|
|
118981
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
119216
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(765);
|
|
118982
119217
|
/*******************************************************************************
|
|
118983
119218
|
*
|
|
118984
119219
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119234,7 +119469,7 @@ const X3D_default_ = X3D;
|
|
|
119234
119469
|
x_ite_Namespace.set ("x_ite/X3D", X3D_default_);
|
|
119235
119470
|
/* harmony default export */ const x_ite_X3D = (X3D_default_);
|
|
119236
119471
|
;// CONCATENATED MODULE: ./src/x_ite/X3DCanvas.js
|
|
119237
|
-
/* provided dependency */ var X3DCanvas_$ = __webpack_require__(
|
|
119472
|
+
/* provided dependency */ var X3DCanvas_$ = __webpack_require__(765);
|
|
119238
119473
|
/*******************************************************************************
|
|
119239
119474
|
*
|
|
119240
119475
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119494,7 +119729,7 @@ x_ite_Namespace.set ("shim", shim_default_);
|
|
|
119494
119729
|
|
|
119495
119730
|
// Assign X3D to global namespace.
|
|
119496
119731
|
|
|
119497
|
-
window [Symbol .for ("X_ITE.X3D-8.6.
|
|
119732
|
+
window [Symbol .for ("X_ITE.X3D-8.6.6")] = x_ite_X3D;
|
|
119498
119733
|
|
|
119499
119734
|
x_ite_X3DCanvas.define ();
|
|
119500
119735
|
|