x_ite 8.6.3 → 8.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +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 +1047 -823
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +2 -2
- package/docs/_posts/getting-started.md +1 -1
- package/docs/_posts/laboratory/x3d-file-converter.md +1 -1
- package/docs/_tabs/laboratory.md +6 -0
- package/package.json +1 -1
- package/src/standard/Math/Numbers/Matrix4.js +7 -0
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Parser/OBJParser.js +29 -22
- package/src/x_ite/Parser/SVGParser.js +483 -273
- 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.5 */(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
3
|
module.exports = factory();
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/
|
|
14
|
+
/***/ 151:
|
|
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__(908);
|
|
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
|
+
/***/ 80:
|
|
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__(908);
|
|
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
|
+
/***/ 172:
|
|
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__(908)], __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
|
+
/***/ 908:
|
|
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
|
+
/***/ 323:
|
|
11816
11816
|
/***/ ((module) => {
|
|
11817
11817
|
|
|
11818
11818
|
/**
|
|
@@ -16591,7 +16591,7 @@ if (true) {
|
|
|
16591
16591
|
|
|
16592
16592
|
/***/ }),
|
|
16593
16593
|
|
|
16594
|
-
/***/
|
|
16594
|
+
/***/ 862:
|
|
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
|
+
/***/ 732:
|
|
19840
19840
|
/***/ (function(module, exports) {
|
|
19841
19841
|
|
|
19842
19842
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -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.5";
|
|
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__(908);
|
|
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__(908);
|
|
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__(80);
|
|
36898
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(908);
|
|
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__(908);
|
|
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__(908);
|
|
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__(323);
|
|
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__(908);
|
|
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__(908);
|
|
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__(908);
|
|
50247
50254
|
/*******************************************************************************
|
|
50248
50255
|
*
|
|
50249
50256
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -50518,37 +50525,44 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
50518
50525
|
},
|
|
50519
50526
|
mtllib: async function (path)
|
|
50520
50527
|
{
|
|
50521
|
-
|
|
50522
|
-
|
|
50523
|
-
|
|
50528
|
+
try
|
|
50529
|
+
{
|
|
50530
|
+
const
|
|
50531
|
+
scene = this .getExecutionContext (),
|
|
50532
|
+
url = new URL (path, scene .getWorldURL ());
|
|
50524
50533
|
|
|
50525
|
-
|
|
50526
|
-
|
|
50527
|
-
|
|
50528
|
-
|
|
50534
|
+
const input = await fetch (url)
|
|
50535
|
+
.then (response => response .arrayBuffer ())
|
|
50536
|
+
.then (arrayBuffer => OBJParser_$.decodeText (OBJParser_$.ungzip (arrayBuffer)))
|
|
50537
|
+
.catch (Function .prototype);
|
|
50529
50538
|
|
|
50530
|
-
|
|
50539
|
+
const parser = new MaterialParser (scene, input);
|
|
50531
50540
|
|
|
50532
|
-
|
|
50541
|
+
parser .parse ();
|
|
50533
50542
|
|
|
50534
|
-
|
|
50535
|
-
|
|
50536
|
-
|
|
50543
|
+
for (const [name, material] of parser .materials)
|
|
50544
|
+
{
|
|
50545
|
+
const nodeName = this .sanitizeName (name);
|
|
50537
50546
|
|
|
50538
|
-
|
|
50539
|
-
|
|
50547
|
+
if (nodeName)
|
|
50548
|
+
scene .addNamedNode (scene .getUniqueName (nodeName), material);
|
|
50540
50549
|
|
|
50541
|
-
|
|
50542
|
-
|
|
50550
|
+
this .materials .set (name, material);
|
|
50551
|
+
}
|
|
50543
50552
|
|
|
50544
|
-
|
|
50545
|
-
|
|
50546
|
-
|
|
50553
|
+
for (const [name, texture] of parser .textures)
|
|
50554
|
+
{
|
|
50555
|
+
const nodeName = this .sanitizeName (name);
|
|
50547
50556
|
|
|
50548
|
-
|
|
50549
|
-
|
|
50557
|
+
if (nodeName)
|
|
50558
|
+
scene .addNamedNode (scene .getUniqueName (nodeName), texture);
|
|
50550
50559
|
|
|
50551
|
-
|
|
50560
|
+
this .textures .set (name, texture);
|
|
50561
|
+
}
|
|
50562
|
+
}
|
|
50563
|
+
catch (error)
|
|
50564
|
+
{
|
|
50565
|
+
console .warn (error);
|
|
50552
50566
|
}
|
|
50553
50567
|
},
|
|
50554
50568
|
usemtl: function ()
|
|
@@ -51866,7 +51880,7 @@ const STLBParser_default_ = STLBParser;
|
|
|
51866
51880
|
|
|
51867
51881
|
x_ite_Namespace.set ("x_ite/Parser/STLBParser", STLBParser_default_);
|
|
51868
51882
|
/* harmony default export */ const Parser_STLBParser = (STLBParser_default_);
|
|
51869
|
-
;// CONCATENATED MODULE: ./src/standard/Math/
|
|
51883
|
+
;// CONCATENATED MODULE: ./src/standard/Math/Numbers/Complex.js
|
|
51870
51884
|
/*******************************************************************************
|
|
51871
51885
|
*
|
|
51872
51886
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -51914,199 +51928,413 @@ x_ite_Namespace.set ("x_ite/Parser/STLBParser", STLBParser_default_);
|
|
|
51914
51928
|
*
|
|
51915
51929
|
******************************************************************************/
|
|
51916
51930
|
|
|
51917
|
-
|
|
51918
|
-
|
|
51919
|
-
|
|
51920
|
-
function Box2 (size, center)
|
|
51931
|
+
function Complex (real, imag)
|
|
51921
51932
|
{
|
|
51922
|
-
this .
|
|
51923
|
-
|
|
51924
|
-
this .set (... arguments);
|
|
51933
|
+
this .real = real;
|
|
51934
|
+
this .imag = imag;
|
|
51925
51935
|
}
|
|
51926
51936
|
|
|
51927
|
-
|
|
51937
|
+
Complex .prototype =
|
|
51928
51938
|
{
|
|
51929
|
-
constructor:
|
|
51939
|
+
constructor: Complex,
|
|
51940
|
+
[Symbol .iterator]: function* ()
|
|
51941
|
+
{
|
|
51942
|
+
yield this .real;
|
|
51943
|
+
yield this .imag;
|
|
51944
|
+
},
|
|
51930
51945
|
copy: function ()
|
|
51931
51946
|
{
|
|
51932
|
-
const copy = Object .create (
|
|
51933
|
-
copy .
|
|
51947
|
+
const copy = Object .create (Complex .prototype);
|
|
51948
|
+
copy .real = this .real;
|
|
51949
|
+
copy .imag = this .imag;
|
|
51934
51950
|
return copy;
|
|
51935
51951
|
},
|
|
51936
|
-
assign: function (
|
|
51952
|
+
assign: function (complex)
|
|
51937
51953
|
{
|
|
51938
|
-
this .
|
|
51954
|
+
this .real = complex .real;
|
|
51955
|
+
this .imag = complex .imag;
|
|
51939
51956
|
return this;
|
|
51940
51957
|
},
|
|
51941
|
-
equals: function (
|
|
51958
|
+
equals: function (complex)
|
|
51942
51959
|
{
|
|
51943
|
-
return this .
|
|
51960
|
+
return this .real === complex .real &&
|
|
51961
|
+
this .imag === complex .imag;
|
|
51944
51962
|
},
|
|
51945
|
-
|
|
51963
|
+
setPolar: function (magnitude, angle)
|
|
51946
51964
|
{
|
|
51947
|
-
|
|
51948
|
-
|
|
51949
|
-
|
|
51950
|
-
{
|
|
51951
|
-
this .matrix .set (0, 0, 0,
|
|
51952
|
-
0, 0, 0,
|
|
51953
|
-
0, 0, 0);
|
|
51954
|
-
|
|
51955
|
-
return this;
|
|
51956
|
-
}
|
|
51957
|
-
case 2:
|
|
51958
|
-
{
|
|
51959
|
-
this .matrix .set (size .x / 2, 0, 0,
|
|
51960
|
-
0, size .y / 2, 0,
|
|
51961
|
-
center .x, center .y, 1);
|
|
51962
|
-
|
|
51963
|
-
return this;
|
|
51964
|
-
}
|
|
51965
|
-
case 3:
|
|
51966
|
-
{
|
|
51967
|
-
return this .setExtents (arguments [0], arguments [1]);
|
|
51968
|
-
}
|
|
51969
|
-
}
|
|
51965
|
+
this .real = magnitude * Math .cos (angle);
|
|
51966
|
+
this .imag = magnitude * Math .sin (angle);
|
|
51967
|
+
return this;
|
|
51970
51968
|
},
|
|
51971
|
-
|
|
51969
|
+
conjugate: function ()
|
|
51972
51970
|
{
|
|
51973
|
-
|
|
51974
|
-
sx = (max .x - min .x) / 2,
|
|
51975
|
-
sy = (max .y - min .y) / 2,
|
|
51976
|
-
cx = (max .x + min .x) / 2,
|
|
51977
|
-
cy = (max .y + min .y) / 2;
|
|
51978
|
-
|
|
51979
|
-
this .matrix .set (sx, 0, 0,
|
|
51980
|
-
0, sy, 0,
|
|
51981
|
-
cx, cy, 1);
|
|
51982
|
-
|
|
51971
|
+
this .imag = -this .imag;
|
|
51983
51972
|
return this;
|
|
51984
51973
|
},
|
|
51985
|
-
|
|
51974
|
+
negate: function ()
|
|
51986
51975
|
{
|
|
51987
|
-
|
|
51976
|
+
this .real = -this .real;
|
|
51977
|
+
this .imag = -this .imag;
|
|
51978
|
+
return this;
|
|
51988
51979
|
},
|
|
51989
|
-
|
|
51980
|
+
inverse: function ()
|
|
51990
51981
|
{
|
|
51991
|
-
const
|
|
51992
|
-
lhs_min = new Numbers_Vector2 (0, 0),
|
|
51993
|
-
lhs_max = new Numbers_Vector2 (0, 0),
|
|
51994
|
-
rhs_min = new Numbers_Vector2 (0, 0),
|
|
51995
|
-
rhs_max = new Numbers_Vector2 (0, 0);
|
|
51996
|
-
|
|
51997
|
-
return function (box)
|
|
51998
|
-
{
|
|
51999
|
-
if (this .isEmpty ())
|
|
52000
|
-
return this .assign (box);
|
|
52001
|
-
|
|
52002
|
-
if (box .isEmpty ())
|
|
52003
|
-
return this;
|
|
52004
|
-
|
|
52005
|
-
this .getExtents (lhs_min, lhs_max);
|
|
52006
|
-
box .getExtents (rhs_min, rhs_max);
|
|
51982
|
+
const d = this .real * this .real + this .imag * this .imag;
|
|
52007
51983
|
|
|
52008
|
-
|
|
52009
|
-
|
|
52010
|
-
|
|
52011
|
-
|
|
51984
|
+
this .real /= d;
|
|
51985
|
+
this .imag /= -d;
|
|
51986
|
+
return this;
|
|
51987
|
+
},
|
|
51988
|
+
add: function (value)
|
|
52012
51989
|
{
|
|
52013
|
-
this .
|
|
51990
|
+
this .real += value .real;
|
|
51991
|
+
this .imag += value .imag;
|
|
52014
51992
|
return this;
|
|
52015
51993
|
},
|
|
52016
|
-
|
|
51994
|
+
subtract: function (value)
|
|
52017
51995
|
{
|
|
52018
|
-
this .
|
|
51996
|
+
this .real -= value .real;
|
|
51997
|
+
this .imag -= value .imag;
|
|
52019
51998
|
return this;
|
|
52020
51999
|
},
|
|
52021
|
-
|
|
52000
|
+
multiply: function (value)
|
|
52022
52001
|
{
|
|
52023
|
-
this .
|
|
52024
|
-
|
|
52025
|
-
|
|
52026
|
-
max .add (this .center);
|
|
52002
|
+
this .real *= value;
|
|
52003
|
+
this .imag *= value;
|
|
52004
|
+
return this;
|
|
52027
52005
|
},
|
|
52028
|
-
|
|
52006
|
+
multComp: function (value)
|
|
52029
52007
|
{
|
|
52030
|
-
const
|
|
52031
|
-
|
|
52032
|
-
|
|
52033
|
-
{
|
|
52034
|
-
const
|
|
52035
|
-
m = this .matrix,
|
|
52036
|
-
x = m .xAxis,
|
|
52037
|
-
y = m .yAxis;
|
|
52038
|
-
|
|
52039
|
-
p1 .assign (x) .add (y);
|
|
52040
|
-
|
|
52041
|
-
const p2 = y .subtract (x);
|
|
52042
|
-
|
|
52043
|
-
min .assign (p1) .min (p2);
|
|
52044
|
-
max .assign (p1) .max (p2);
|
|
52045
|
-
|
|
52046
|
-
p1 .negate ();
|
|
52047
|
-
p2 .negate ();
|
|
52008
|
+
const
|
|
52009
|
+
{ real: ar, imag: ai } = this,
|
|
52010
|
+
{ real: br, imag: bi } = value;
|
|
52048
52011
|
|
|
52049
|
-
|
|
52050
|
-
|
|
52051
|
-
|
|
52052
|
-
}
|
|
52053
|
-
|
|
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)
|
|
52054
52021
|
{
|
|
52055
52022
|
const
|
|
52056
|
-
|
|
52057
|
-
|
|
52058
|
-
|
|
52059
|
-
return function (point)
|
|
52060
|
-
{
|
|
52061
|
-
this .getExtents (min, max);
|
|
52023
|
+
{ real: ar, imag: ai } = this,
|
|
52024
|
+
{ real: br, imag: bi } = value,
|
|
52025
|
+
d = br * br + bi * bi;
|
|
52062
52026
|
|
|
52063
|
-
|
|
52064
|
-
|
|
52065
|
-
|
|
52066
|
-
|
|
52067
|
-
};
|
|
52068
|
-
})(),
|
|
52027
|
+
this .real = (ar * br + ai * bi) / d;
|
|
52028
|
+
this .imag = (ai * br - ar * bi) / d;
|
|
52029
|
+
return this;
|
|
52030
|
+
},
|
|
52069
52031
|
toString: function ()
|
|
52070
52032
|
{
|
|
52071
|
-
|
|
52033
|
+
if (this .imag)
|
|
52034
|
+
return this .real + " " + this .imag + "i";
|
|
52035
|
+
|
|
52036
|
+
return String (this .real);
|
|
52072
52037
|
},
|
|
52073
52038
|
};
|
|
52074
52039
|
|
|
52075
|
-
Object .defineProperty (
|
|
52040
|
+
Object .defineProperty (Complex .prototype, "magnitude",
|
|
52076
52041
|
{
|
|
52077
|
-
get:
|
|
52042
|
+
get: function ()
|
|
52078
52043
|
{
|
|
52079
|
-
|
|
52080
|
-
min = new Numbers_Vector2 (0, 0),
|
|
52081
|
-
max = new Numbers_Vector2 (0, 0);
|
|
52082
|
-
|
|
52083
|
-
return function ()
|
|
52044
|
+
if (this .real)
|
|
52084
52045
|
{
|
|
52085
|
-
this .
|
|
52046
|
+
if (this .imag)
|
|
52047
|
+
return Math .hypot (this .real, this .imag);
|
|
52086
52048
|
|
|
52087
|
-
return
|
|
52088
|
-
}
|
|
52089
|
-
|
|
52090
|
-
|
|
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,
|
|
52091
52059
|
configurable: false
|
|
52092
52060
|
});
|
|
52093
52061
|
|
|
52094
|
-
Object .defineProperty (
|
|
52062
|
+
Object .defineProperty (Complex .prototype, "angle",
|
|
52095
52063
|
{
|
|
52096
52064
|
get: function ()
|
|
52097
52065
|
{
|
|
52098
|
-
return this .
|
|
52066
|
+
return Math .atan2 (this .imag, this .real);
|
|
52099
52067
|
},
|
|
52100
|
-
|
|
52068
|
+
set: function (angle)
|
|
52069
|
+
{
|
|
52070
|
+
this .setPolar (this .magnitude, angle);
|
|
52071
|
+
},
|
|
52072
|
+
enumerable: false,
|
|
52101
52073
|
configurable: false
|
|
52102
52074
|
});
|
|
52103
52075
|
|
|
52104
|
-
|
|
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;
|
|
52105
52093
|
;
|
|
52106
52094
|
|
|
52107
|
-
x_ite_Namespace.set ("standard/Math/
|
|
52108
|
-
/* harmony default export */ const
|
|
52109
|
-
;// 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
|
|
52110
52338
|
/*******************************************************************************
|
|
52111
52339
|
*
|
|
52112
52340
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -52343,9 +52571,128 @@ const Bezier_default_ = Bezier;
|
|
|
52343
52571
|
|
|
52344
52572
|
x_ite_Namespace.set ("standard/Math/Algorithms/Bezier", Bezier_default_);
|
|
52345
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_);
|
|
52346
52693
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
|
|
52347
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
52348
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
52694
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(908);
|
|
52695
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(323);
|
|
52349
52696
|
/*******************************************************************************
|
|
52350
52697
|
*
|
|
52351
52698
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -52408,6 +52755,8 @@ x_ite_Namespace.set ("standard/Math/Algorithms/Bezier", Bezier_default_);
|
|
|
52408
52755
|
|
|
52409
52756
|
|
|
52410
52757
|
|
|
52758
|
+
|
|
52759
|
+
|
|
52411
52760
|
/*
|
|
52412
52761
|
* Grammar
|
|
52413
52762
|
*/
|
|
@@ -52421,7 +52770,7 @@ const SVGParser_Grammar = Parser_Expressions ({
|
|
|
52421
52770
|
closeParenthesis: /\)/gy,
|
|
52422
52771
|
|
|
52423
52772
|
// Units
|
|
52424
|
-
length: /(em|ex|px|in|cm|mm|pt|pc)/gy,
|
|
52773
|
+
length: /(em|ex|px|in|cm|mm|pt|pc|%)/gy,
|
|
52425
52774
|
percent: /%/gy,
|
|
52426
52775
|
|
|
52427
52776
|
// Values
|
|
@@ -52444,16 +52793,14 @@ const SVGParser_Grammar = Parser_Expressions ({
|
|
|
52444
52793
|
*/
|
|
52445
52794
|
|
|
52446
52795
|
const
|
|
52447
|
-
MM
|
|
52448
|
-
CM
|
|
52449
|
-
INCH
|
|
52450
|
-
POINT
|
|
52451
|
-
PICA
|
|
52452
|
-
PIXEL
|
|
52453
|
-
EM
|
|
52454
|
-
|
|
52455
|
-
CIRCLE_STEPS = 64, // Subdivisions of a circle, used for arc.
|
|
52456
|
-
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.
|
|
52457
52804
|
|
|
52458
52805
|
/*
|
|
52459
52806
|
* Parser
|
|
@@ -52472,17 +52819,17 @@ function SVGParser (scene)
|
|
|
52472
52819
|
|
|
52473
52820
|
// Options
|
|
52474
52821
|
|
|
52475
|
-
this .solid = false; // Are 2D primitives solid
|
|
52822
|
+
this .solid = false; // Are 2D primitives solid?
|
|
52476
52823
|
|
|
52477
52824
|
// Globals
|
|
52478
52825
|
|
|
52479
|
-
this .
|
|
52480
|
-
this .
|
|
52481
|
-
this .
|
|
52482
|
-
this .
|
|
52483
|
-
|
|
52484
|
-
this .canvas .
|
|
52485
|
-
this .canvas .
|
|
52826
|
+
this .viewBox = new Numbers_Vector4 (0, 0, 100, 100);
|
|
52827
|
+
this .modelMatrix = new Utility_MatrixStack (Numbers_Matrix4);
|
|
52828
|
+
this .nodes = new Map ();
|
|
52829
|
+
this .lineProperties = new Map ();
|
|
52830
|
+
this .tessy = this .createTesselator ();
|
|
52831
|
+
this .canvas = document .createElement ("canvas");
|
|
52832
|
+
this .context = this .canvas .getContext ("2d");
|
|
52486
52833
|
|
|
52487
52834
|
this .styles = [{
|
|
52488
52835
|
display: "inline",
|
|
@@ -52491,7 +52838,7 @@ function SVGParser (scene)
|
|
|
52491
52838
|
fillURL: "",
|
|
52492
52839
|
fillOpacity: 1,
|
|
52493
52840
|
fillRule: "nonzero",
|
|
52494
|
-
strokeType: "
|
|
52841
|
+
strokeType: "none",
|
|
52495
52842
|
strokeColor: Numbers_Color4.Black,
|
|
52496
52843
|
strokeURL: "",
|
|
52497
52844
|
strokeOpacity: 1,
|
|
@@ -52499,7 +52846,44 @@ function SVGParser (scene)
|
|
|
52499
52846
|
opacity: 1,
|
|
52500
52847
|
stopColor: Numbers_Color4.Black,
|
|
52501
52848
|
stopOpacity: 1,
|
|
52849
|
+
vectorEffect: "none",
|
|
52502
52850
|
}];
|
|
52851
|
+
|
|
52852
|
+
// Constants
|
|
52853
|
+
|
|
52854
|
+
const browser = scene .getBrowser ()
|
|
52855
|
+
|
|
52856
|
+
switch (browser .getBrowserOption ("PrimitiveQuality"))
|
|
52857
|
+
{
|
|
52858
|
+
case "LOW":
|
|
52859
|
+
this .BEZIER_STEPS = 6; // Subdivisions of a span.
|
|
52860
|
+
this .CIRCLE_STEPS = 20; // Subdivisions of a circle, used for arc and rounded rect.
|
|
52861
|
+
break;
|
|
52862
|
+
case "HIGH":
|
|
52863
|
+
this .BEZIER_STEPS = 10; // Subdivisions of a span.
|
|
52864
|
+
this .CIRCLE_STEPS = 64; // Subdivisions of a circle, used for arc and rounded rect.
|
|
52865
|
+
break;
|
|
52866
|
+
default:
|
|
52867
|
+
this .BEZIER_STEPS = 8; // Subdivisions of a span.
|
|
52868
|
+
this .CIRCLE_STEPS = 32; // Subdivisions of a circle, used for arc and rounded rect.
|
|
52869
|
+
break;
|
|
52870
|
+
}
|
|
52871
|
+
|
|
52872
|
+
switch (browser .getBrowserOption ("TextureQuality"))
|
|
52873
|
+
{
|
|
52874
|
+
case "LOW":
|
|
52875
|
+
this .GRADIENT_SIZE = 128; // In pixels.
|
|
52876
|
+
break;
|
|
52877
|
+
case "HIGH":
|
|
52878
|
+
this .GRADIENT_SIZE = 512; // In pixels.
|
|
52879
|
+
break;
|
|
52880
|
+
default:
|
|
52881
|
+
this .GRADIENT_SIZE = 256; // In pixels.
|
|
52882
|
+
break;
|
|
52883
|
+
}
|
|
52884
|
+
|
|
52885
|
+
this .canvas .width = this .GRADIENT_SIZE;
|
|
52886
|
+
this .canvas .height = this .GRADIENT_SIZE;
|
|
52503
52887
|
}
|
|
52504
52888
|
|
|
52505
52889
|
SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototype),
|
|
@@ -52608,17 +52992,31 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52608
52992
|
// Get attributes of svg element.
|
|
52609
52993
|
|
|
52610
52994
|
const
|
|
52611
|
-
defaultWidth = this .lengthAttribute (xmlElement .getAttribute ("width",
|
|
52612
|
-
defaultHeight = this .lengthAttribute (xmlElement .getAttribute ("height",
|
|
52613
|
-
defaultViewBox =
|
|
52995
|
+
defaultWidth = this .lengthAttribute (xmlElement .getAttribute ("width"), 300, "width"),
|
|
52996
|
+
defaultHeight = this .lengthAttribute (xmlElement .getAttribute ("height"), 150, "height"),
|
|
52997
|
+
defaultViewBox = this .viewBox .set (0, 0, defaultWidth, defaultHeight),
|
|
52614
52998
|
viewBox = this .viewBoxAttribute (xmlElement .getAttribute ("viewBox"), defaultViewBox),
|
|
52615
|
-
width = this .lengthAttribute (xmlElement .getAttribute ("width",
|
|
52616
|
-
height = this .lengthAttribute (xmlElement .getAttribute ("height", viewBox [3])
|
|
52999
|
+
width = this .lengthAttribute (xmlElement .getAttribute ("width"), viewBox [2], "width"),
|
|
53000
|
+
height = this .lengthAttribute (xmlElement .getAttribute ("height"), viewBox [3], "height");
|
|
53001
|
+
|
|
53002
|
+
if (true) // default
|
|
53003
|
+
{
|
|
53004
|
+
// preserveAspectRatio = "xMidYMid meet"
|
|
53005
|
+
|
|
53006
|
+
const
|
|
53007
|
+
r = width / height,
|
|
53008
|
+
rv = viewBox [2] / viewBox [3];
|
|
53009
|
+
|
|
53010
|
+
if (rv > r)
|
|
53011
|
+
viewBox [3] += viewBox [2] / r - viewBox [3];
|
|
53012
|
+
else
|
|
53013
|
+
viewBox [2] += viewBox [3] * r - viewBox [2];
|
|
53014
|
+
}
|
|
52617
53015
|
|
|
52618
53016
|
// Create viewpoint.
|
|
52619
53017
|
|
|
52620
53018
|
const
|
|
52621
|
-
viewpoint = scene .createNode ("OrthoViewpoint"
|
|
53019
|
+
viewpoint = scene .createNode ("OrthoViewpoint"),
|
|
52622
53020
|
x = (viewBox .x + width / 2) * PIXEL,
|
|
52623
53021
|
y = -(viewBox .y + height / 2) * PIXEL;
|
|
52624
53022
|
|
|
@@ -52722,10 +53120,10 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52722
53120
|
// Create Transform node.
|
|
52723
53121
|
|
|
52724
53122
|
const
|
|
52725
|
-
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0),
|
|
52726
|
-
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0),
|
|
52727
|
-
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0),
|
|
52728
|
-
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0);
|
|
53123
|
+
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0, "width"),
|
|
53124
|
+
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0, "height"),
|
|
53125
|
+
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0, "width"),
|
|
53126
|
+
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0, "height");
|
|
52729
53127
|
|
|
52730
53128
|
const transformNode = this .createTransform (xmlElement, new Numbers_Vector2 (x, y));
|
|
52731
53129
|
|
|
@@ -52733,8 +53131,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52733
53131
|
|
|
52734
53132
|
this .element (usedElement);
|
|
52735
53133
|
|
|
52736
|
-
this .
|
|
52737
|
-
this .
|
|
53134
|
+
this .groupNodes .pop ();
|
|
53135
|
+
this .modelMatrix .pop ();
|
|
53136
|
+
this .styles .pop ();
|
|
52738
53137
|
|
|
52739
53138
|
// Add node.
|
|
52740
53139
|
|
|
@@ -52757,8 +53156,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52757
53156
|
|
|
52758
53157
|
this .elements (xmlElement);
|
|
52759
53158
|
|
|
52760
|
-
this .
|
|
52761
|
-
this .
|
|
53159
|
+
this .groupNodes .pop ();
|
|
53160
|
+
this .modelMatrix .pop ();
|
|
53161
|
+
this .styles .pop ();
|
|
52762
53162
|
|
|
52763
53163
|
// Add node.
|
|
52764
53164
|
|
|
@@ -52787,8 +53187,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52787
53187
|
|
|
52788
53188
|
this .elements (xmlElement);
|
|
52789
53189
|
|
|
52790
|
-
this .
|
|
52791
|
-
this .
|
|
53190
|
+
this .groupNodes .pop ();
|
|
53191
|
+
this .modelMatrix .pop ();
|
|
53192
|
+
this .styles .pop ();
|
|
52792
53193
|
|
|
52793
53194
|
// Add node.
|
|
52794
53195
|
|
|
@@ -52829,75 +53230,119 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52829
53230
|
|
|
52830
53231
|
this .elements (xmlElement);
|
|
52831
53232
|
|
|
52832
|
-
this .groupNodes
|
|
52833
|
-
this .
|
|
53233
|
+
this .groupNodes .pop ();
|
|
53234
|
+
this .modelMatrix .pop ();
|
|
53235
|
+
this .styles .pop ();
|
|
52834
53236
|
|
|
52835
53237
|
this .groupNodes .at (-1) .children .push (transformNode);
|
|
52836
53238
|
},
|
|
52837
53239
|
rectElement: function (xmlElement)
|
|
52838
53240
|
{
|
|
52839
|
-
// Determine style.
|
|
52840
|
-
|
|
52841
|
-
if (!this .styleAttributes (xmlElement))
|
|
52842
|
-
return;
|
|
52843
|
-
|
|
52844
53241
|
// Create Transform node.
|
|
52845
53242
|
|
|
52846
53243
|
const
|
|
52847
|
-
x = this .lengthAttribute (xmlElement .getAttribute ("x"),
|
|
52848
|
-
y = this .lengthAttribute (xmlElement .getAttribute ("y"),
|
|
52849
|
-
width = this .lengthAttribute (xmlElement .getAttribute ("width"),
|
|
52850
|
-
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0);
|
|
53244
|
+
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0, "width"),
|
|
53245
|
+
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0, "height"),
|
|
53246
|
+
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0, "width"),
|
|
53247
|
+
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0, "height");
|
|
52851
53248
|
|
|
52852
|
-
|
|
52853
|
-
|
|
52854
|
-
|
|
52855
|
-
center = new Numbers_Vector2 (x + width / 2, y + height / 2),
|
|
52856
|
-
bbox = new Geometry_Box2 (size, center),
|
|
52857
|
-
transformNode = this .createTransform (xmlElement, center);
|
|
53249
|
+
let
|
|
53250
|
+
rx = Math .max (0, this .lengthAttribute (xmlElement .getAttribute ("rx"), 0, "width")),
|
|
53251
|
+
ry = Math .max (0, this .lengthAttribute (xmlElement .getAttribute ("ry"), 0, "height"));
|
|
52858
53252
|
|
|
52859
|
-
|
|
53253
|
+
if (rx === 0 && ry === 0)
|
|
53254
|
+
{
|
|
53255
|
+
// Determine style.
|
|
52860
53256
|
|
|
52861
|
-
|
|
53257
|
+
if (!this .styleAttributes (xmlElement))
|
|
53258
|
+
return;
|
|
53259
|
+
|
|
53260
|
+
// Create Transform node.
|
|
52862
53261
|
|
|
52863
|
-
if (this .style .fillType !== "NONE")
|
|
52864
|
-
{
|
|
52865
53262
|
const
|
|
52866
|
-
|
|
52867
|
-
|
|
53263
|
+
scene = this .getExecutionContext (),
|
|
53264
|
+
size = new Numbers_Vector2 (width, height),
|
|
53265
|
+
center = new Numbers_Vector2 (x + width / 2, y + height / 2),
|
|
53266
|
+
bbox = new Geometry_Box2 (size, center),
|
|
53267
|
+
transformNode = this .createTransform (xmlElement, center);
|
|
52868
53268
|
|
|
52869
|
-
|
|
52870
|
-
shapeNode .geometry = rectangleNode;
|
|
52871
|
-
rectangleNode .solid = this .solid;
|
|
52872
|
-
rectangleNode .size = size;
|
|
53269
|
+
this .groupNodes .push (transformNode);
|
|
52873
53270
|
|
|
52874
|
-
|
|
52875
|
-
}
|
|
53271
|
+
// Create nodes.
|
|
52876
53272
|
|
|
52877
|
-
|
|
53273
|
+
if (this .style .fillType !== "none")
|
|
53274
|
+
{
|
|
53275
|
+
const
|
|
53276
|
+
shapeNode = scene .createNode ("Shape"),
|
|
53277
|
+
rectangleNode = scene .createNode ("Rectangle2D");
|
|
53278
|
+
|
|
53279
|
+
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
53280
|
+
shapeNode .geometry = rectangleNode;
|
|
53281
|
+
rectangleNode .solid = this .solid;
|
|
53282
|
+
rectangleNode .size = size;
|
|
53283
|
+
|
|
53284
|
+
transformNode .children .push (shapeNode);
|
|
53285
|
+
}
|
|
53286
|
+
|
|
53287
|
+
if (this .style .strokeType !== "none")
|
|
53288
|
+
{
|
|
53289
|
+
const
|
|
53290
|
+
shapeNode = scene .createNode ("Shape"),
|
|
53291
|
+
polylineNode = scene .createNode ("Polyline2D"),
|
|
53292
|
+
width1_2 = width / 2,
|
|
53293
|
+
height1_2 = height / 2;
|
|
53294
|
+
|
|
53295
|
+
shapeNode .appearance = this .createStrokeAppearance ();
|
|
53296
|
+
shapeNode .geometry = polylineNode;
|
|
53297
|
+
|
|
53298
|
+
polylineNode .lineSegments = [ width1_2, height1_2,
|
|
53299
|
+
-width1_2, height1_2,
|
|
53300
|
+
-width1_2, -height1_2,
|
|
53301
|
+
width1_2, -height1_2,
|
|
53302
|
+
width1_2, height1_2];
|
|
53303
|
+
|
|
53304
|
+
transformNode .children .push (shapeNode);
|
|
53305
|
+
}
|
|
53306
|
+
|
|
53307
|
+
this .groupNodes .pop ();
|
|
53308
|
+
this .modelMatrix .pop ();
|
|
53309
|
+
this .styles .pop ();
|
|
53310
|
+
|
|
53311
|
+
this .groupNodes .at (-1) .children .push (transformNode);
|
|
53312
|
+
}
|
|
53313
|
+
else
|
|
52878
53314
|
{
|
|
53315
|
+
// Create points.
|
|
53316
|
+
|
|
53317
|
+
if (rx && !ry) ry = rx;
|
|
53318
|
+
if (ry && !rx) rx = ry;
|
|
53319
|
+
|
|
53320
|
+
rx = Math .min (rx, width / 2);
|
|
53321
|
+
ry = Math .min (ry, height / 2);
|
|
53322
|
+
|
|
52879
53323
|
const
|
|
52880
|
-
|
|
52881
|
-
|
|
52882
|
-
|
|
52883
|
-
height1_2 = height / 2;
|
|
53324
|
+
xOffsets = [x + width - rx, x + rx , x + rx, x + width - rx],
|
|
53325
|
+
yOffsets = [y + height - ry, y + height - ry, y + ry, y + ry],
|
|
53326
|
+
points = Object .assign ([ ], { index: 0, closed: true });
|
|
52884
53327
|
|
|
52885
|
-
|
|
52886
|
-
|
|
53328
|
+
for (let c = 0; c < 4; ++ c)
|
|
53329
|
+
{
|
|
53330
|
+
const s = c * Math .PI / 2;
|
|
52887
53331
|
|
|
52888
|
-
|
|
52889
|
-
|
|
52890
|
-
|
|
52891
|
-
width1_2, -height1_2,
|
|
52892
|
-
width1_2, height1_2];
|
|
53332
|
+
for (let i = 0, N = this .CIRCLE_STEPS / 4; i < N; ++ i)
|
|
53333
|
+
{
|
|
53334
|
+
const p = Numbers_Complex.Polar (1, s + Math .PI / 2 * i / (N - 1));
|
|
52893
53335
|
|
|
52894
|
-
|
|
52895
|
-
|
|
53336
|
+
points .push (new Numbers_Vector3 (xOffsets [c] + p .real * rx, yOffsets [c] + p .imag * ry, 0));
|
|
53337
|
+
}
|
|
53338
|
+
}
|
|
52896
53339
|
|
|
52897
|
-
|
|
52898
|
-
this .styles .pop ();
|
|
53340
|
+
points .pop ();
|
|
52899
53341
|
|
|
52900
|
-
|
|
53342
|
+
// Create nodes.
|
|
53343
|
+
|
|
53344
|
+
this .pathLikeElement (xmlElement, [points]);
|
|
53345
|
+
}
|
|
52901
53346
|
},
|
|
52902
53347
|
circleElement: function (xmlElement)
|
|
52903
53348
|
{
|
|
@@ -52909,8 +53354,8 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52909
53354
|
// Create Transform node.
|
|
52910
53355
|
|
|
52911
53356
|
const
|
|
52912
|
-
cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), 0),
|
|
52913
|
-
cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), 0),
|
|
53357
|
+
cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), 0, "width"),
|
|
53358
|
+
cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), 0, "height"),
|
|
52914
53359
|
r = this .lengthAttribute (xmlElement .getAttribute ("r"), 0);
|
|
52915
53360
|
|
|
52916
53361
|
const
|
|
@@ -52922,7 +53367,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52922
53367
|
|
|
52923
53368
|
// Create nodes.
|
|
52924
53369
|
|
|
52925
|
-
if (this .style .fillType !== "
|
|
53370
|
+
if (this .style .fillType !== "none")
|
|
52926
53371
|
{
|
|
52927
53372
|
const
|
|
52928
53373
|
shapeNode = scene .createNode ("Shape"),
|
|
@@ -52936,7 +53381,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52936
53381
|
transformNode .children .push (shapeNode);
|
|
52937
53382
|
}
|
|
52938
53383
|
|
|
52939
|
-
if (this .style .strokeType !== "
|
|
53384
|
+
if (this .style .strokeType !== "none")
|
|
52940
53385
|
{
|
|
52941
53386
|
const
|
|
52942
53387
|
shapeNode = scene .createNode ("Shape"),
|
|
@@ -52949,8 +53394,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52949
53394
|
transformNode .children .push (shapeNode);
|
|
52950
53395
|
}
|
|
52951
53396
|
|
|
52952
|
-
this .groupNodes
|
|
52953
|
-
this .
|
|
53397
|
+
this .groupNodes .pop ();
|
|
53398
|
+
this .modelMatrix .pop ();
|
|
53399
|
+
this .styles .pop ();
|
|
52954
53400
|
|
|
52955
53401
|
this .groupNodes .at (-1) .children .push (transformNode);
|
|
52956
53402
|
},
|
|
@@ -52964,10 +53410,10 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52964
53410
|
// Create Transform node.
|
|
52965
53411
|
|
|
52966
53412
|
const
|
|
52967
|
-
cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), 0),
|
|
52968
|
-
cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), 0),
|
|
52969
|
-
rx = this .lengthAttribute (xmlElement .getAttribute ("rx"), 0),
|
|
52970
|
-
ry = this .lengthAttribute (xmlElement .getAttribute ("ry"), 0);
|
|
53413
|
+
cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), 0, "width"),
|
|
53414
|
+
cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), 0, "height"),
|
|
53415
|
+
rx = this .lengthAttribute (xmlElement .getAttribute ("rx"), 0, "width"),
|
|
53416
|
+
ry = this .lengthAttribute (xmlElement .getAttribute ("ry"), 0, "height");
|
|
52971
53417
|
|
|
52972
53418
|
const
|
|
52973
53419
|
scene = this .getExecutionContext (),
|
|
@@ -52979,7 +53425,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52979
53425
|
|
|
52980
53426
|
// Create nodes.
|
|
52981
53427
|
|
|
52982
|
-
if (this .style .fillType !== "
|
|
53428
|
+
if (this .style .fillType !== "none")
|
|
52983
53429
|
{
|
|
52984
53430
|
const
|
|
52985
53431
|
shapeNode = scene .createNode ("Shape"),
|
|
@@ -52993,7 +53439,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
52993
53439
|
transformNode .children .push (shapeNode);
|
|
52994
53440
|
}
|
|
52995
53441
|
|
|
52996
|
-
if (this .style .strokeType !== "
|
|
53442
|
+
if (this .style .strokeType !== "none")
|
|
52997
53443
|
{
|
|
52998
53444
|
const
|
|
52999
53445
|
shapeNode = scene .createNode ("Shape"),
|
|
@@ -53006,8 +53452,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53006
53452
|
transformNode .children .push (shapeNode);
|
|
53007
53453
|
}
|
|
53008
53454
|
|
|
53009
|
-
this .groupNodes
|
|
53010
|
-
this .
|
|
53455
|
+
this .groupNodes .pop ();
|
|
53456
|
+
this .modelMatrix .pop ();
|
|
53457
|
+
this .styles .pop ();
|
|
53011
53458
|
|
|
53012
53459
|
this .groupNodes .at (-1) .children .push (transformNode);
|
|
53013
53460
|
},
|
|
@@ -53017,13 +53464,18 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53017
53464
|
},
|
|
53018
53465
|
imageElement: function (xmlElement)
|
|
53019
53466
|
{
|
|
53467
|
+
// Determine style.
|
|
53468
|
+
|
|
53469
|
+
if (!this .styleAttributes (xmlElement))
|
|
53470
|
+
return;
|
|
53471
|
+
|
|
53020
53472
|
// Create Transform node.
|
|
53021
53473
|
|
|
53022
53474
|
const
|
|
53023
|
-
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0),
|
|
53024
|
-
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0),
|
|
53025
|
-
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0),
|
|
53026
|
-
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0),
|
|
53475
|
+
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0, "width"),
|
|
53476
|
+
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0, "height"),
|
|
53477
|
+
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0, "width"),
|
|
53478
|
+
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0, "height"),
|
|
53027
53479
|
href = xmlElement .getAttribute ("xlink:href");
|
|
53028
53480
|
|
|
53029
53481
|
const
|
|
@@ -53050,74 +53502,37 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53050
53502
|
|
|
53051
53503
|
transformNode .children .push (shapeNode);
|
|
53052
53504
|
|
|
53053
|
-
this .groupNodes
|
|
53505
|
+
this .groupNodes .pop ();
|
|
53506
|
+
this .modelMatrix .pop ();
|
|
53507
|
+
this .styles .pop ();
|
|
53508
|
+
|
|
53054
53509
|
this .groupNodes .at (-1) .children .push (transformNode);
|
|
53055
53510
|
},
|
|
53056
|
-
polylineElement: function (xmlElement
|
|
53511
|
+
polylineElement: function (xmlElement)
|
|
53057
53512
|
{
|
|
53513
|
+
// Get points.
|
|
53514
|
+
|
|
53058
53515
|
const points = Object .assign ([ ], { index: 0 });
|
|
53059
53516
|
|
|
53060
53517
|
if (!this .pointsAttribute (xmlElement .getAttribute ("points"), points))
|
|
53061
53518
|
return;
|
|
53062
53519
|
|
|
53063
|
-
// Determine style.
|
|
53064
|
-
|
|
53065
|
-
if (!this .styleAttributes (xmlElement))
|
|
53066
|
-
return;
|
|
53067
|
-
|
|
53068
|
-
// Create Transform node.
|
|
53069
|
-
|
|
53070
|
-
const
|
|
53071
|
-
scene = this .getExecutionContext (),
|
|
53072
|
-
transformNode = this .createTransform (xmlElement),
|
|
53073
|
-
bbox = new Geometry_Box2 (Numbers_Vector2.min (... points), Numbers_Vector2.max (... points), true);
|
|
53074
|
-
|
|
53075
|
-
this .groupNodes .push (transformNode);
|
|
53076
|
-
|
|
53077
53520
|
// Create nodes.
|
|
53078
53521
|
|
|
53079
|
-
|
|
53080
|
-
|
|
53081
|
-
|
|
53082
|
-
|
|
53083
|
-
|
|
53084
|
-
{
|
|
53085
|
-
const
|
|
53086
|
-
shapeNode = scene .createNode ("Shape"),
|
|
53087
|
-
geometryNode = scene .createNode ("IndexedTriangleSet");
|
|
53088
|
-
|
|
53089
|
-
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
53090
|
-
shapeNode .geometry = geometryNode;
|
|
53091
|
-
geometryNode .solid = this .solid;
|
|
53092
|
-
geometryNode .index = this .triangulatePolygon ([points], coordinateNode);
|
|
53093
|
-
geometryNode .texCoord = this .createTextureCoordinate (coordinateNode, bbox);
|
|
53094
|
-
geometryNode .coord = coordinateNode;
|
|
53095
|
-
|
|
53096
|
-
transformNode .children .push (shapeNode);
|
|
53097
|
-
}
|
|
53522
|
+
this .pathLikeElement (xmlElement, [points]);
|
|
53523
|
+
},
|
|
53524
|
+
polygonElement: function (xmlElement)
|
|
53525
|
+
{
|
|
53526
|
+
// Get points.
|
|
53098
53527
|
|
|
53099
|
-
|
|
53100
|
-
{
|
|
53101
|
-
const
|
|
53102
|
-
shapeNode = scene .createNode ("Shape"),
|
|
53103
|
-
geometryNode = scene .createNode ("IndexedLineSet");
|
|
53528
|
+
const points = Object .assign ([ ], { index: 0, closed: true });
|
|
53104
53529
|
|
|
53105
|
-
|
|
53106
|
-
|
|
53107
|
-
geometryNode .coordIndex = [... points .keys (), ... (closed ? [points [0]] : [ ]), -1];
|
|
53108
|
-
geometryNode .coord = coordinateNode;
|
|
53109
|
-
|
|
53110
|
-
transformNode .children .push (shapeNode);
|
|
53111
|
-
}
|
|
53530
|
+
if (!this .pointsAttribute (xmlElement .getAttribute ("points"), points))
|
|
53531
|
+
return;
|
|
53112
53532
|
|
|
53113
|
-
|
|
53114
|
-
this .styles .pop ();
|
|
53533
|
+
// Create nodes.
|
|
53115
53534
|
|
|
53116
|
-
this .
|
|
53117
|
-
},
|
|
53118
|
-
polygonElement: function (xmlElement)
|
|
53119
|
-
{
|
|
53120
|
-
this .polylineElement (xmlElement, true);
|
|
53535
|
+
this .pathLikeElement (xmlElement, [points]);
|
|
53121
53536
|
},
|
|
53122
53537
|
pathElement: function (xmlElement)
|
|
53123
53538
|
{
|
|
@@ -53128,6 +53543,12 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53128
53543
|
if (!this .dAttribute (xmlElement .getAttribute ("d"), contours))
|
|
53129
53544
|
return;
|
|
53130
53545
|
|
|
53546
|
+
// Create nodes.
|
|
53547
|
+
|
|
53548
|
+
this .pathLikeElement (xmlElement, contours);
|
|
53549
|
+
},
|
|
53550
|
+
pathLikeElement: function (xmlElement, contours)
|
|
53551
|
+
{
|
|
53131
53552
|
// Determine style.
|
|
53132
53553
|
|
|
53133
53554
|
if (!this .styleAttributes (xmlElement))
|
|
@@ -53152,7 +53573,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53152
53573
|
for (const points of contours)
|
|
53153
53574
|
coordinateNode .point .push (... points);
|
|
53154
53575
|
|
|
53155
|
-
if (this .style .fillType !== "
|
|
53576
|
+
if (this .style .fillType !== "none")
|
|
53156
53577
|
{
|
|
53157
53578
|
const
|
|
53158
53579
|
shapeNode = scene .createNode ("Shape"),
|
|
@@ -53168,47 +53589,49 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53168
53589
|
transformNode .children .push (shapeNode);
|
|
53169
53590
|
}
|
|
53170
53591
|
|
|
53171
|
-
if (this .style .strokeType !== "
|
|
53592
|
+
if (this .style .strokeType !== "none")
|
|
53172
53593
|
{
|
|
53173
53594
|
const
|
|
53174
53595
|
shapeNode = scene .createNode ("Shape"),
|
|
53175
53596
|
geometryNode = scene .createNode ("IndexedLineSet");
|
|
53176
53597
|
|
|
53177
|
-
shapeNode .appearance
|
|
53178
|
-
shapeNode .geometry
|
|
53179
|
-
geometryNode .coord
|
|
53598
|
+
shapeNode .appearance = this .createStrokeAppearance ();
|
|
53599
|
+
shapeNode .geometry = geometryNode;
|
|
53600
|
+
geometryNode .coord = coordinateNode;
|
|
53601
|
+
|
|
53602
|
+
// Create contour indices.
|
|
53603
|
+
|
|
53604
|
+
const indices = geometryNode .coordIndex;
|
|
53180
53605
|
|
|
53181
53606
|
for (const points of contours)
|
|
53182
53607
|
{
|
|
53183
53608
|
for (const i of points .keys ())
|
|
53184
|
-
|
|
53609
|
+
indices .push (points .index + i);
|
|
53185
53610
|
|
|
53186
53611
|
if (points .closed)
|
|
53187
|
-
|
|
53612
|
+
indices .push (points .index);
|
|
53188
53613
|
|
|
53189
|
-
|
|
53614
|
+
indices .push (-1);
|
|
53190
53615
|
}
|
|
53191
53616
|
|
|
53192
53617
|
transformNode .children .push (shapeNode);
|
|
53193
53618
|
}
|
|
53194
53619
|
|
|
53195
|
-
this .groupNodes
|
|
53196
|
-
this .
|
|
53620
|
+
this .groupNodes .pop ();
|
|
53621
|
+
this .modelMatrix .pop ();
|
|
53622
|
+
this .styles .pop ();
|
|
53197
53623
|
|
|
53198
53624
|
this .groupNodes .at (-1) .children .push (transformNode);
|
|
53199
53625
|
},
|
|
53200
|
-
|
|
53626
|
+
linearGradientElementUrl: function (xmlElement, bbox)
|
|
53201
53627
|
{
|
|
53202
53628
|
const
|
|
53203
|
-
g = this .linearGradientElement (xmlElement, { stops: [ ] }),
|
|
53629
|
+
g = this .linearGradientElement (xmlElement, bbox, { stops: [ ] }),
|
|
53204
53630
|
gradient = this .context .createLinearGradient (g .x1, g .y1, g .x2, g .y2);
|
|
53205
53631
|
|
|
53206
|
-
|
|
53207
|
-
gradient .addColorStop (o, `rgba(${c .r * 255},${c .g * 255},${c .b * 255},${a})`);
|
|
53208
|
-
|
|
53209
|
-
return this .drawGradient (gradient, g .transform, bbox, g .units);
|
|
53632
|
+
return this .drawGradient (gradient, g, bbox);
|
|
53210
53633
|
},
|
|
53211
|
-
linearGradientElement: function (xmlElement, gradient)
|
|
53634
|
+
linearGradientElement: function (xmlElement, bbox, gradient)
|
|
53212
53635
|
{
|
|
53213
53636
|
if (xmlElement .nodeName !== "linearGradient")
|
|
53214
53637
|
return;
|
|
@@ -53218,17 +53641,29 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53218
53641
|
const refElement = this .hrefAttribute (xmlElement .getAttribute ("xlink:href"));
|
|
53219
53642
|
|
|
53220
53643
|
if (refElement)
|
|
53221
|
-
this .gradientElement (refElement, gradient);
|
|
53644
|
+
this .gradientElement (refElement, bbox, gradient);
|
|
53222
53645
|
|
|
53223
53646
|
// Attributes
|
|
53224
53647
|
|
|
53225
|
-
gradient .x1 = this .lengthAttribute (xmlElement .getAttribute ("x1"), gradient .x1 || 0);
|
|
53226
|
-
gradient .y1 = this .lengthAttribute (xmlElement .getAttribute ("y1"), gradient .y1 || 0);
|
|
53227
|
-
gradient .x2 = this .lengthAttribute (xmlElement .getAttribute ("x2"), gradient .x2 || 1);
|
|
53228
|
-
gradient .y2 = this .lengthAttribute (xmlElement .getAttribute ("y2"), gradient .y2 || 0);
|
|
53648
|
+
gradient .x1 = this .lengthAttribute (xmlElement .getAttribute ("x1"), gradient .x1 || 0, "width");
|
|
53649
|
+
gradient .y1 = this .lengthAttribute (xmlElement .getAttribute ("y1"), gradient .y1 || 0, "height");
|
|
53650
|
+
gradient .x2 = this .lengthAttribute (xmlElement .getAttribute ("x2"), gradient .x2 || 1, "width");
|
|
53651
|
+
gradient .y2 = this .lengthAttribute (xmlElement .getAttribute ("y2"), gradient .y2 || 0, "height");
|
|
53229
53652
|
gradient .units = xmlElement .getAttribute ("gradientUnits") || "objectBoundingBox";
|
|
53230
53653
|
gradient .transform = this .transformAttribute (xmlElement .getAttribute ("gradientTransform"));
|
|
53231
53654
|
|
|
53655
|
+
// Spread matrix
|
|
53656
|
+
|
|
53657
|
+
const
|
|
53658
|
+
s = new Numbers_Matrix3 (),
|
|
53659
|
+
c = new Numbers_Vector2 (gradient .x1, gradient .y1);
|
|
53660
|
+
|
|
53661
|
+
s .translate (c);
|
|
53662
|
+
s .scale (new Numbers_Vector2 (SPREAD, SPREAD));
|
|
53663
|
+
s .translate (c .negate ());
|
|
53664
|
+
|
|
53665
|
+
gradient .spreadMatrix = s;
|
|
53666
|
+
|
|
53232
53667
|
// Stops
|
|
53233
53668
|
|
|
53234
53669
|
for (const childNode of xmlElement .childNodes)
|
|
@@ -53236,38 +53671,47 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53236
53671
|
|
|
53237
53672
|
return gradient;
|
|
53238
53673
|
},
|
|
53239
|
-
|
|
53674
|
+
radialGradientElementUrl: function (xmlElement, bbox)
|
|
53240
53675
|
{
|
|
53241
53676
|
const
|
|
53242
|
-
g = this .radialGradientElement (xmlElement, { stops: [ ] }),
|
|
53677
|
+
g = this .radialGradientElement (xmlElement, bbox, { stops: [ ] }),
|
|
53243
53678
|
gradient = this .context .createRadialGradient (g .fx, g .fy, g. fr, g .cx, g .cy, g .r);
|
|
53244
53679
|
|
|
53245
|
-
|
|
53246
|
-
gradient .addColorStop (o, `rgba(${c .r * 255},${c .g * 255},${c .b * 255},${a})`);
|
|
53247
|
-
|
|
53248
|
-
return this .drawGradient (gradient, g .transform, bbox, g .units);
|
|
53680
|
+
return this .drawGradient (gradient, g, bbox);
|
|
53249
53681
|
},
|
|
53250
|
-
radialGradientElement: function (xmlElement, gradient)
|
|
53682
|
+
radialGradientElement: function (xmlElement, bbox, gradient)
|
|
53251
53683
|
{
|
|
53252
53684
|
// Attribute xlink:href
|
|
53253
53685
|
|
|
53254
53686
|
const refElement = this .hrefAttribute (xmlElement .getAttribute ("xlink:href"));
|
|
53255
53687
|
|
|
53256
53688
|
if (refElement)
|
|
53257
|
-
this .gradientElement (refElement, gradient);
|
|
53689
|
+
this .gradientElement (refElement, bbox, gradient);
|
|
53258
53690
|
|
|
53259
53691
|
// Attributes
|
|
53260
53692
|
|
|
53261
|
-
gradient .cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), gradient .cx || 0.5),
|
|
53262
|
-
gradient .cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), gradient .cy || 0.5),
|
|
53693
|
+
gradient .cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), gradient .cx || 0.5, "width"),
|
|
53694
|
+
gradient .cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), gradient .cy || 0.5, "height"),
|
|
53263
53695
|
gradient .r = this .lengthAttribute (xmlElement .getAttribute ("r"), gradient .r || 0.5),
|
|
53264
|
-
gradient .fx = this .lengthAttribute (xmlElement .getAttribute ("fx"), gradient .fx || gradient .cx),
|
|
53265
|
-
gradient .fy = this .lengthAttribute (xmlElement .getAttribute ("fy"), gradient .fy || gradient .cy),
|
|
53696
|
+
gradient .fx = this .lengthAttribute (xmlElement .getAttribute ("fx"), gradient .fx || gradient .cx, "width"),
|
|
53697
|
+
gradient .fy = this .lengthAttribute (xmlElement .getAttribute ("fy"), gradient .fy || gradient .cy, "height"),
|
|
53266
53698
|
gradient .fr = this .lengthAttribute (xmlElement .getAttribute ("fr"), gradient .fr || 0),
|
|
53267
53699
|
gradient .units = xmlElement .getAttribute ("gradientUnits") || "objectBoundingBox";
|
|
53268
53700
|
gradient .spreadMethod = xmlElement .getAttribute ("spreadMethod");
|
|
53269
53701
|
gradient .transform = this .transformAttribute (xmlElement .getAttribute ("gradientTransform"));
|
|
53270
53702
|
|
|
53703
|
+
// Spread matrix
|
|
53704
|
+
|
|
53705
|
+
const
|
|
53706
|
+
s = new Numbers_Matrix3 (),
|
|
53707
|
+
c = new Numbers_Vector2 (gradient .fx, gradient .fy);
|
|
53708
|
+
|
|
53709
|
+
s .translate (c);
|
|
53710
|
+
s .scale (new Numbers_Vector2 (SPREAD, SPREAD));
|
|
53711
|
+
s .translate (c .negate ());
|
|
53712
|
+
|
|
53713
|
+
gradient .spreadMatrix = s;
|
|
53714
|
+
|
|
53271
53715
|
// Stops
|
|
53272
53716
|
|
|
53273
53717
|
for (const childNode of xmlElement .childNodes)
|
|
@@ -53275,7 +53719,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53275
53719
|
|
|
53276
53720
|
return gradient;
|
|
53277
53721
|
},
|
|
53278
|
-
gradientElement: function (xmlElement, gradient)
|
|
53722
|
+
gradientElement: function (xmlElement, bbox, gradient)
|
|
53279
53723
|
{
|
|
53280
53724
|
if (!xmlElement)
|
|
53281
53725
|
return;
|
|
@@ -53283,9 +53727,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53283
53727
|
switch (xmlElement .nodeName)
|
|
53284
53728
|
{
|
|
53285
53729
|
case "linearGradient":
|
|
53286
|
-
return this .linearGradientElement (xmlElement, gradient);
|
|
53730
|
+
return this .linearGradientElement (xmlElement, bbox, gradient);
|
|
53287
53731
|
case "radialGradient":
|
|
53288
|
-
return this .radialGradientElement (xmlElement, gradient);
|
|
53732
|
+
return this .radialGradientElement (xmlElement, bbox, gradient);
|
|
53289
53733
|
}
|
|
53290
53734
|
},
|
|
53291
53735
|
gradientChild: function (xmlElement, gradient)
|
|
@@ -53300,26 +53744,75 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53300
53744
|
|
|
53301
53745
|
const offset = this .percentAttribute (xmlElement .getAttribute ("offset"), 0);
|
|
53302
53746
|
|
|
53747
|
+
if (offset < 0 || offset > 1)
|
|
53748
|
+
return;
|
|
53749
|
+
|
|
53303
53750
|
const { stopColor, stopOpacity } = this .style;
|
|
53304
53751
|
|
|
53305
53752
|
gradient .stops .push ([offset, stopColor, stopOpacity]);
|
|
53306
53753
|
|
|
53307
53754
|
this .styles .pop ();
|
|
53308
53755
|
},
|
|
53309
|
-
drawGradient: function (gradient,
|
|
53756
|
+
drawGradient: function (gradient, g, bbox)
|
|
53310
53757
|
{
|
|
53758
|
+
// Add color stops.
|
|
53759
|
+
|
|
53760
|
+
const spreadMatrix = new Numbers_Matrix3 ();
|
|
53761
|
+
|
|
53762
|
+
switch (g .spreadMethod)
|
|
53763
|
+
{
|
|
53764
|
+
default: // pad
|
|
53765
|
+
{
|
|
53766
|
+
for (const [o, c, a] of g .stops)
|
|
53767
|
+
gradient .addColorStop (o, this .css (c, a));
|
|
53768
|
+
|
|
53769
|
+
break;
|
|
53770
|
+
}
|
|
53771
|
+
case "repeat":
|
|
53772
|
+
{
|
|
53773
|
+
spreadMatrix .assign (g .spreadMatrix);
|
|
53774
|
+
|
|
53775
|
+
for (let i = 0; i < SPREAD; ++ i)
|
|
53776
|
+
{
|
|
53777
|
+
const s = i / SPREAD;
|
|
53778
|
+
|
|
53779
|
+
for (const [o, c, a] of g .stops)
|
|
53780
|
+
gradient .addColorStop (s + o / SPREAD, this .css (c, a));
|
|
53781
|
+
}
|
|
53782
|
+
|
|
53783
|
+
break;
|
|
53784
|
+
}
|
|
53785
|
+
case "reflect":
|
|
53786
|
+
{
|
|
53787
|
+
spreadMatrix .assign (g .spreadMatrix);
|
|
53788
|
+
|
|
53789
|
+
for (let i = 0; i < SPREAD; ++ i)
|
|
53790
|
+
{
|
|
53791
|
+
const s = i / SPREAD;
|
|
53792
|
+
|
|
53793
|
+
for (const [o, c, a] of g .stops)
|
|
53794
|
+
gradient .addColorStop (s + (i % 2 ? 1 - o : o) / SPREAD, this .css (c, a));
|
|
53795
|
+
}
|
|
53796
|
+
|
|
53797
|
+
break;
|
|
53798
|
+
}
|
|
53799
|
+
}
|
|
53800
|
+
|
|
53801
|
+
// Create Matrix.
|
|
53802
|
+
|
|
53311
53803
|
const m = new Numbers_Matrix3 ();
|
|
53312
53804
|
|
|
53313
|
-
m .scale (new Numbers_Vector2 (GRADIENT_SIZE / 2, GRADIENT_SIZE / 2));
|
|
53805
|
+
m .scale (new Numbers_Vector2 (this .GRADIENT_SIZE / 2, this .GRADIENT_SIZE / 2));
|
|
53314
53806
|
m .translate (Numbers_Vector2.One);
|
|
53315
53807
|
m .scale (new Numbers_Vector2 (1, -1));
|
|
53316
53808
|
|
|
53317
|
-
if (units === "userSpaceOnUse")
|
|
53809
|
+
if (g .units === "userSpaceOnUse")
|
|
53318
53810
|
m .multLeft (Numbers_Matrix3.inverse (bbox .matrix));
|
|
53319
53811
|
else
|
|
53320
53812
|
m .multLeft (new Numbers_Matrix3 (2, 0, 0, 0, 2, 0, -1, -1, 1));
|
|
53321
53813
|
|
|
53322
|
-
m .multLeft (transform);
|
|
53814
|
+
m .multLeft (g .transform);
|
|
53815
|
+
m .multLeft (spreadMatrix);
|
|
53323
53816
|
|
|
53324
53817
|
// Paint.
|
|
53325
53818
|
|
|
@@ -53327,8 +53820,8 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53327
53820
|
|
|
53328
53821
|
cx .fillStyle = gradient;
|
|
53329
53822
|
cx .save ();
|
|
53330
|
-
cx .clearRect (0, 0, GRADIENT_SIZE, GRADIENT_SIZE);
|
|
53331
|
-
cx .rect (0, 0, GRADIENT_SIZE, GRADIENT_SIZE);
|
|
53823
|
+
cx .clearRect (0, 0, this .GRADIENT_SIZE, this .GRADIENT_SIZE);
|
|
53824
|
+
cx .rect (0, 0, this .GRADIENT_SIZE, this .GRADIENT_SIZE);
|
|
53332
53825
|
cx .transform (m [0], m [1], m [3], m [4], m [6], m [7]);
|
|
53333
53826
|
cx .fill ();
|
|
53334
53827
|
cx .restore ();
|
|
@@ -53336,6 +53829,10 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53336
53829
|
// Use PNG because image can have alpha channel.
|
|
53337
53830
|
return this .canvas .toDataURL ("image/png");
|
|
53338
53831
|
},
|
|
53832
|
+
patternUrl: function (xmlElement)
|
|
53833
|
+
{
|
|
53834
|
+
//console .debug ("pattern");
|
|
53835
|
+
},
|
|
53339
53836
|
idAttribute: function (attribute, node)
|
|
53340
53837
|
{
|
|
53341
53838
|
if (attribute === null)
|
|
@@ -53390,7 +53887,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53390
53887
|
|
|
53391
53888
|
return this .document .getElementById (hash);
|
|
53392
53889
|
},
|
|
53393
|
-
lengthAttribute: function (attribute, defaultValue)
|
|
53890
|
+
lengthAttribute: function (attribute, defaultValue, percent)
|
|
53394
53891
|
{
|
|
53395
53892
|
// Returns length in pixel.
|
|
53396
53893
|
|
|
@@ -53433,6 +53930,23 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53433
53930
|
case "pc":
|
|
53434
53931
|
value *= PICA / PIXEL;
|
|
53435
53932
|
break;
|
|
53933
|
+
case "%":
|
|
53934
|
+
{
|
|
53935
|
+
switch (percent)
|
|
53936
|
+
{
|
|
53937
|
+
case "width":
|
|
53938
|
+
value *= this .viewBox [2] / 100;
|
|
53939
|
+
break;
|
|
53940
|
+
case "height":
|
|
53941
|
+
value *= this .viewBox [3] / 100;
|
|
53942
|
+
break;
|
|
53943
|
+
default:
|
|
53944
|
+
value *= Math .hypot (this .viewBox [2], this .viewBox [3]) / 100;
|
|
53945
|
+
break;
|
|
53946
|
+
}
|
|
53947
|
+
|
|
53948
|
+
break;
|
|
53949
|
+
}
|
|
53436
53950
|
}
|
|
53437
53951
|
}
|
|
53438
53952
|
|
|
@@ -53698,7 +54212,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53698
54212
|
y += ay;
|
|
53699
54213
|
}
|
|
53700
54214
|
|
|
53701
|
-
Algorithms_Bezier.quadric (ax, ay, 0, x1, y1, 0, x, y, 0, BEZIER_STEPS, points);
|
|
54215
|
+
Algorithms_Bezier.quadric (ax, ay, 0, x1, y1, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
53702
54216
|
|
|
53703
54217
|
ax = x;
|
|
53704
54218
|
ay = y;
|
|
@@ -53759,7 +54273,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53759
54273
|
}
|
|
53760
54274
|
}
|
|
53761
54275
|
|
|
53762
|
-
Algorithms_Bezier.quadric (ax, ay, 0, x1, y1, 0, x, y, 0, BEZIER_STEPS, points);
|
|
54276
|
+
Algorithms_Bezier.quadric (ax, ay, 0, x1, y1, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
53763
54277
|
|
|
53764
54278
|
ax = x;
|
|
53765
54279
|
ay = y;
|
|
@@ -53825,7 +54339,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53825
54339
|
y += ay;
|
|
53826
54340
|
}
|
|
53827
54341
|
|
|
53828
|
-
Algorithms_Bezier.cubic (ax, ay, 0, x1, y1, 0, x2, y2, 0, x, y, 0, BEZIER_STEPS, points);
|
|
54342
|
+
Algorithms_Bezier.cubic (ax, ay, 0, x1, y1, 0, x2, y2, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
53829
54343
|
|
|
53830
54344
|
ax = x;
|
|
53831
54345
|
ay = y;
|
|
@@ -53902,7 +54416,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53902
54416
|
}
|
|
53903
54417
|
}
|
|
53904
54418
|
|
|
53905
|
-
Algorithms_Bezier.cubic (ax, ay, 0, x1, y1, 0, x2, y2, 0, x, y, 0, BEZIER_STEPS, points);
|
|
54419
|
+
Algorithms_Bezier.cubic (ax, ay, 0, x1, y1, 0, x2, y2, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
53906
54420
|
|
|
53907
54421
|
ax = x;
|
|
53908
54422
|
ay = y;
|
|
@@ -53974,7 +54488,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
53974
54488
|
y += ay;
|
|
53975
54489
|
}
|
|
53976
54490
|
|
|
53977
|
-
Algorithms_Bezier.arc (ax, ay, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y, CIRCLE_STEPS, points);
|
|
54491
|
+
Algorithms_Bezier.arc (ax, ay, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y, this .CIRCLE_STEPS, points);
|
|
53978
54492
|
|
|
53979
54493
|
ax = x;
|
|
53980
54494
|
ay = y;
|
|
@@ -54112,16 +54626,20 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54112
54626
|
{
|
|
54113
54627
|
if (this .double ())
|
|
54114
54628
|
{
|
|
54115
|
-
|
|
54629
|
+
var ty = this .value;
|
|
54630
|
+
}
|
|
54631
|
+
}
|
|
54632
|
+
else
|
|
54633
|
+
{
|
|
54634
|
+
var ty = 0;
|
|
54635
|
+
}
|
|
54116
54636
|
|
|
54117
|
-
|
|
54637
|
+
this .whitespaces ();
|
|
54118
54638
|
|
|
54119
|
-
|
|
54120
|
-
|
|
54121
|
-
|
|
54122
|
-
|
|
54123
|
-
}
|
|
54124
|
-
}
|
|
54639
|
+
if (SVGParser_Grammar .closeParenthesis .parse (this))
|
|
54640
|
+
{
|
|
54641
|
+
matrix .translate (new Numbers_Vector2 (tx, ty));
|
|
54642
|
+
continue;
|
|
54125
54643
|
}
|
|
54126
54644
|
}
|
|
54127
54645
|
}
|
|
@@ -54188,16 +54706,20 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54188
54706
|
{
|
|
54189
54707
|
if (this .double ())
|
|
54190
54708
|
{
|
|
54191
|
-
|
|
54709
|
+
var sy = this .value;
|
|
54710
|
+
}
|
|
54711
|
+
}
|
|
54712
|
+
else
|
|
54713
|
+
{
|
|
54714
|
+
var sy = sx;
|
|
54715
|
+
}
|
|
54192
54716
|
|
|
54193
|
-
|
|
54717
|
+
this .whitespaces ();
|
|
54194
54718
|
|
|
54195
|
-
|
|
54196
|
-
|
|
54197
|
-
|
|
54198
|
-
|
|
54199
|
-
}
|
|
54200
|
-
}
|
|
54719
|
+
if (SVGParser_Grammar .closeParenthesis .parse (this))
|
|
54720
|
+
{
|
|
54721
|
+
matrix .scale (new Numbers_Vector2 (sx, sy));
|
|
54722
|
+
continue;
|
|
54201
54723
|
}
|
|
54202
54724
|
}
|
|
54203
54725
|
}
|
|
@@ -54248,44 +54770,24 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54248
54770
|
|
|
54249
54771
|
return matrix;
|
|
54250
54772
|
},
|
|
54251
|
-
styleAttributes:
|
|
54252
|
-
{
|
|
54253
|
-
const
|
|
54254
|
-
"display",
|
|
54255
|
-
"fill",
|
|
54256
|
-
"fill-opacity",
|
|
54257
|
-
"fill-rule",
|
|
54258
|
-
"stroke",
|
|
54259
|
-
"stroke-opacity",
|
|
54260
|
-
"stroke-width",
|
|
54261
|
-
"opacity",
|
|
54262
|
-
"stop-color",
|
|
54263
|
-
"stop-opacity",
|
|
54264
|
-
];
|
|
54265
|
-
|
|
54266
|
-
return function (xmlElement)
|
|
54267
|
-
{
|
|
54268
|
-
const style = Object .assign ({ }, this .styles [0]);
|
|
54269
|
-
|
|
54270
|
-
if (this .style .display === "none")
|
|
54271
|
-
return false;
|
|
54773
|
+
styleAttributes: function (xmlElement)
|
|
54774
|
+
{
|
|
54775
|
+
const style = Object .assign ({ }, this .styles [0]);
|
|
54272
54776
|
|
|
54273
|
-
|
|
54777
|
+
if (this .style .display === "none")
|
|
54778
|
+
return false;
|
|
54274
54779
|
|
|
54275
|
-
|
|
54276
|
-
{
|
|
54277
|
-
const attribute = xmlElement .getAttribute (style);
|
|
54780
|
+
this .styles .push (style);
|
|
54278
54781
|
|
|
54279
|
-
|
|
54280
|
-
|
|
54782
|
+
for (const attribute of xmlElement .attributes)
|
|
54783
|
+
this .parseStyle (attribute .name, attribute .value)
|
|
54281
54784
|
|
|
54282
|
-
|
|
54785
|
+
// Style attribute has higher precedence.
|
|
54283
54786
|
|
|
54284
|
-
|
|
54787
|
+
this .styleAttribute (xmlElement .getAttribute ("style"));
|
|
54285
54788
|
|
|
54286
|
-
|
|
54287
|
-
|
|
54288
|
-
})(),
|
|
54789
|
+
return true;
|
|
54790
|
+
},
|
|
54289
54791
|
styleAttribute: function (attribute)
|
|
54290
54792
|
{
|
|
54291
54793
|
if (attribute === null)
|
|
@@ -54339,6 +54841,9 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54339
54841
|
case "stop-opacity":
|
|
54340
54842
|
this .stopOpacityStyle (value);
|
|
54341
54843
|
break;
|
|
54844
|
+
case "vector-effect":
|
|
54845
|
+
this .vectorEffectStyle (value);
|
|
54846
|
+
break;
|
|
54342
54847
|
}
|
|
54343
54848
|
},
|
|
54344
54849
|
displayStyle: function (value)
|
|
@@ -54368,19 +54873,19 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54368
54873
|
|
|
54369
54874
|
if (value === "transparent")
|
|
54370
54875
|
{
|
|
54371
|
-
this .style .fillType = "
|
|
54876
|
+
this .style .fillType = "none";
|
|
54372
54877
|
return;
|
|
54373
54878
|
}
|
|
54374
54879
|
|
|
54375
54880
|
if (value === "none")
|
|
54376
54881
|
{
|
|
54377
|
-
this .style .fillType ="
|
|
54882
|
+
this .style .fillType = "none";
|
|
54378
54883
|
return;
|
|
54379
54884
|
}
|
|
54380
54885
|
|
|
54381
54886
|
if (!value .match (/^(?:inherit|unset|default)$/))
|
|
54382
54887
|
{
|
|
54383
|
-
if (this .colorValue ())
|
|
54888
|
+
if (this .colorValue (this .styles .at (-1) .fillColor))
|
|
54384
54889
|
{
|
|
54385
54890
|
this .style .fillType = "COLOR";
|
|
54386
54891
|
this .style .fillColor = this .value .copy ();
|
|
@@ -54427,19 +54932,19 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54427
54932
|
|
|
54428
54933
|
if (value === "transparent")
|
|
54429
54934
|
{
|
|
54430
|
-
this .style .strokeType = "
|
|
54935
|
+
this .style .strokeType = "none";
|
|
54431
54936
|
return;
|
|
54432
54937
|
}
|
|
54433
54938
|
|
|
54434
54939
|
if (value === "none")
|
|
54435
54940
|
{
|
|
54436
|
-
this .style .strokeType ="
|
|
54941
|
+
this .style .strokeType = "none";
|
|
54437
54942
|
return;
|
|
54438
54943
|
}
|
|
54439
54944
|
|
|
54440
54945
|
if (!value .match (/^(?:inherit|unset|default)$/))
|
|
54441
54946
|
{
|
|
54442
|
-
if (this .colorValue ())
|
|
54947
|
+
if (this .colorValue (this .styles .at (-1) .strokeColor))
|
|
54443
54948
|
{
|
|
54444
54949
|
this .style .strokeType = "COLOR";
|
|
54445
54950
|
this .style .strokeColor = this .value .copy ();
|
|
@@ -54475,7 +54980,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54475
54980
|
{
|
|
54476
54981
|
if (this .double ())
|
|
54477
54982
|
{
|
|
54478
|
-
this .style .strokeWidth = this .
|
|
54983
|
+
this .style .strokeWidth = this .lengthAttribute (this .value, 1);
|
|
54479
54984
|
return;
|
|
54480
54985
|
}
|
|
54481
54986
|
|
|
@@ -54505,7 +55010,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54505
55010
|
},
|
|
54506
55011
|
stopColorStyle: function (value)
|
|
54507
55012
|
{
|
|
54508
|
-
if (this .colorValue ())
|
|
55013
|
+
if (this .colorValue (Numbers_Color4.Black))
|
|
54509
55014
|
{
|
|
54510
55015
|
this .style .stopColor = this .value .copy ();
|
|
54511
55016
|
return;
|
|
@@ -54525,6 +55030,18 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54525
55030
|
return;
|
|
54526
55031
|
}
|
|
54527
55032
|
},
|
|
55033
|
+
vectorEffectStyle: function (value)
|
|
55034
|
+
{
|
|
55035
|
+
if (value !== "inherit")
|
|
55036
|
+
{
|
|
55037
|
+
this .style .vectorEffect = value;
|
|
55038
|
+
return;
|
|
55039
|
+
}
|
|
55040
|
+
|
|
55041
|
+
// inherit
|
|
55042
|
+
|
|
55043
|
+
this .style .vectorEffect = this .styles .at (-1) .vectorEffect;
|
|
55044
|
+
},
|
|
54528
55045
|
parseValue: function (value)
|
|
54529
55046
|
{
|
|
54530
55047
|
this .input = value;
|
|
@@ -54579,12 +55096,14 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54579
55096
|
{
|
|
54580
55097
|
const color = new Numbers_Color4 (0, 0, 0, 0);
|
|
54581
55098
|
|
|
54582
|
-
return function ()
|
|
55099
|
+
return function (c)
|
|
54583
55100
|
{
|
|
54584
55101
|
if (!SVGParser_Grammar .color .parse (this))
|
|
54585
55102
|
return false;
|
|
54586
55103
|
|
|
54587
|
-
|
|
55104
|
+
const defaultColor = this .css (c);
|
|
55105
|
+
|
|
55106
|
+
this .value = color .set (... this .convertColor (this .result [1], defaultColor));
|
|
54588
55107
|
|
|
54589
55108
|
return true;
|
|
54590
55109
|
};
|
|
@@ -54593,13 +55112,20 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54593
55112
|
{
|
|
54594
55113
|
return SVGParser_Grammar .url .parse (this);
|
|
54595
55114
|
},
|
|
55115
|
+
css: function (c, a = c .a)
|
|
55116
|
+
{
|
|
55117
|
+
return `rgba(${c .r * 255},${c .g * 255},${c .b * 255},${a})`;
|
|
55118
|
+
},
|
|
54596
55119
|
createTransform: function (xmlElement, t = Numbers_Vector2.Zero, s = Numbers_Vector2.One)
|
|
54597
55120
|
{
|
|
54598
55121
|
// Determine matrix.
|
|
54599
55122
|
|
|
54600
55123
|
const
|
|
54601
|
-
scene
|
|
54602
|
-
m
|
|
55124
|
+
scene = this .getExecutionContext (),
|
|
55125
|
+
m = this .transformAttribute (xmlElement .getAttribute ("transform"));
|
|
55126
|
+
|
|
55127
|
+
this .modelMatrix .push ();
|
|
55128
|
+
this .modelMatrix .multLeft (Numbers_Matrix4.Matrix3 (m));
|
|
54603
55129
|
|
|
54604
55130
|
m .translate (t);
|
|
54605
55131
|
m .scale (s);
|
|
@@ -54608,7 +55134,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54608
55134
|
|
|
54609
55135
|
const
|
|
54610
55136
|
transformNode = scene .createNode ("Transform"),
|
|
54611
|
-
matrix =
|
|
55137
|
+
matrix = Numbers_Matrix4.Matrix3 (m),
|
|
54612
55138
|
translation = new Numbers_Vector3 (0, 0, 0),
|
|
54613
55139
|
rotation = new Numbers_Rotation4 (),
|
|
54614
55140
|
scale = new Numbers_Vector3 (1, 1, 1),
|
|
@@ -54639,7 +55165,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54639
55165
|
|
|
54640
55166
|
switch (this .style .fillType)
|
|
54641
55167
|
{
|
|
54642
|
-
case "
|
|
55168
|
+
case "none":
|
|
54643
55169
|
{
|
|
54644
55170
|
return null;
|
|
54645
55171
|
}
|
|
@@ -54687,10 +55213,13 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54687
55213
|
switch (xmlElement .nodeName)
|
|
54688
55214
|
{
|
|
54689
55215
|
case "linearGradient":
|
|
54690
|
-
return this .
|
|
55216
|
+
return this .linearGradientElementUrl (xmlElement, bbox);
|
|
54691
55217
|
|
|
54692
55218
|
case "radialGradient":
|
|
54693
|
-
return this .
|
|
55219
|
+
return this .radialGradientElementUrl (xmlElement, bbox);
|
|
55220
|
+
|
|
55221
|
+
case "pattern":
|
|
55222
|
+
return this .patternUrl (xmlElement);
|
|
54694
55223
|
}
|
|
54695
55224
|
},
|
|
54696
55225
|
createStrokeAppearance: function ()
|
|
@@ -54704,16 +55233,44 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
|
|
|
54704
55233
|
materialNode .emissiveColor = new Numbers_Color3 (... this .style .strokeColor);
|
|
54705
55234
|
materialNode .transparency = 1 - this .style .strokeOpacity * this .style .opacity;
|
|
54706
55235
|
|
|
54707
|
-
|
|
54708
|
-
|
|
54709
|
-
|
|
55236
|
+
const strokeWidth = this .vectorEffect === "non-scaling-stroke"
|
|
55237
|
+
? this .style .strokeWidth
|
|
55238
|
+
: this .getStokeWidth ();
|
|
54710
55239
|
|
|
54711
|
-
|
|
54712
|
-
|
|
54713
|
-
}
|
|
55240
|
+
if (strokeWidth > 1)
|
|
55241
|
+
appearanceNode .lineProperties = this .getLineProperties (strokeWidth);
|
|
54714
55242
|
|
|
54715
55243
|
return appearanceNode;
|
|
54716
55244
|
},
|
|
55245
|
+
getStokeWidth: function ()
|
|
55246
|
+
{
|
|
55247
|
+
const
|
|
55248
|
+
modelMatrix = this .modelMatrix .get (),
|
|
55249
|
+
strokeWidth = modelMatrix .multDirMatrix (new Numbers_Vector3 (this .style .strokeWidth, this .style .strokeWidth, 0));
|
|
55250
|
+
|
|
55251
|
+
return (strokeWidth .x + strokeWidth .y) / 2;
|
|
55252
|
+
},
|
|
55253
|
+
getLineProperties: function (strokeWidth)
|
|
55254
|
+
{
|
|
55255
|
+
const lineProperties = this .lineProperties .get (strokeWidth);
|
|
55256
|
+
|
|
55257
|
+
if (lineProperties)
|
|
55258
|
+
{
|
|
55259
|
+
return lineProperties;
|
|
55260
|
+
}
|
|
55261
|
+
else
|
|
55262
|
+
{
|
|
55263
|
+
const
|
|
55264
|
+
scene = this .getExecutionContext (),
|
|
55265
|
+
lineProperties = scene .createNode ("LineProperties");
|
|
55266
|
+
|
|
55267
|
+
lineProperties .linewidthScaleFactor = strokeWidth;
|
|
55268
|
+
|
|
55269
|
+
this .lineProperties .set (strokeWidth, lineProperties);
|
|
55270
|
+
|
|
55271
|
+
return lineProperties;
|
|
55272
|
+
}
|
|
55273
|
+
},
|
|
54717
55274
|
createTextureProperties: function ()
|
|
54718
55275
|
{
|
|
54719
55276
|
const
|
|
@@ -54811,7 +55368,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
54811
55368
|
x_ite_Namespace.set ("x_ite/Parser/SVGParser", SVGParser_default_);
|
|
54812
55369
|
/* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
|
|
54813
55370
|
;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
|
|
54814
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
55371
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(908);
|
|
54815
55372
|
/*******************************************************************************
|
|
54816
55373
|
*
|
|
54817
55374
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -56353,125 +56910,6 @@ const Line3_default_ = Line3;
|
|
|
56353
56910
|
|
|
56354
56911
|
x_ite_Namespace.set ("standard/Math/Geometry/Line3", Line3_default_);
|
|
56355
56912
|
/* harmony default export */ const Geometry_Line3 = (Line3_default_);
|
|
56356
|
-
;// CONCATENATED MODULE: ./src/standard/Math/Utility/MatrixStack.js
|
|
56357
|
-
/*******************************************************************************
|
|
56358
|
-
*
|
|
56359
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
56360
|
-
*
|
|
56361
|
-
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
56362
|
-
*
|
|
56363
|
-
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
56364
|
-
*
|
|
56365
|
-
* The copyright notice above does not evidence any actual of intended
|
|
56366
|
-
* publication of such source code, and is an unpublished work by create3000.
|
|
56367
|
-
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
56368
|
-
* create3000.
|
|
56369
|
-
*
|
|
56370
|
-
* No permission is granted to copy, distribute, or create derivative works from
|
|
56371
|
-
* the contents of this software, in whole or in part, without the prior written
|
|
56372
|
-
* permission of create3000.
|
|
56373
|
-
*
|
|
56374
|
-
* NON-MILITARY USE ONLY
|
|
56375
|
-
*
|
|
56376
|
-
* All create3000 software are effectively free software with a non-military use
|
|
56377
|
-
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
56378
|
-
* source in any way you please with the exception anything that uses it must be
|
|
56379
|
-
* marked to indicate is contains 'non-military use only' components.
|
|
56380
|
-
*
|
|
56381
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
56382
|
-
*
|
|
56383
|
-
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
56384
|
-
*
|
|
56385
|
-
* This file is part of the X_ITE Project.
|
|
56386
|
-
*
|
|
56387
|
-
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
56388
|
-
* terms of the GNU General Public License version 3 only, as published by the
|
|
56389
|
-
* Free Software Foundation.
|
|
56390
|
-
*
|
|
56391
|
-
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
56392
|
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
56393
|
-
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
56394
|
-
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
56395
|
-
*
|
|
56396
|
-
* You should have received a copy of the GNU General Public License version 3
|
|
56397
|
-
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
56398
|
-
* copy of the GPLv3 License.
|
|
56399
|
-
*
|
|
56400
|
-
* For Silvio, Joy and Adi.
|
|
56401
|
-
*
|
|
56402
|
-
******************************************************************************/
|
|
56403
|
-
|
|
56404
|
-
function MatrixStack (Type)
|
|
56405
|
-
{
|
|
56406
|
-
return Object .assign ([ new Type () ],
|
|
56407
|
-
{
|
|
56408
|
-
top: 0,
|
|
56409
|
-
set: function (matrix)
|
|
56410
|
-
{
|
|
56411
|
-
this [this .top] .assign (matrix);
|
|
56412
|
-
},
|
|
56413
|
-
get: function ()
|
|
56414
|
-
{
|
|
56415
|
-
return this [this .top];
|
|
56416
|
-
},
|
|
56417
|
-
push: function ()
|
|
56418
|
-
{
|
|
56419
|
-
const top = ++ this .top;
|
|
56420
|
-
|
|
56421
|
-
if (top < this .length)
|
|
56422
|
-
this [top] .assign (this [top - 1]);
|
|
56423
|
-
else
|
|
56424
|
-
this [top] = this [top - 1] .copy ();
|
|
56425
|
-
},
|
|
56426
|
-
pushMatrix: function (matrix)
|
|
56427
|
-
{
|
|
56428
|
-
const top = ++ this .top;
|
|
56429
|
-
|
|
56430
|
-
if (top < this .length)
|
|
56431
|
-
this [top] .assign (matrix);
|
|
56432
|
-
else
|
|
56433
|
-
this [top] = matrix .copy ();
|
|
56434
|
-
},
|
|
56435
|
-
pop: function ()
|
|
56436
|
-
{
|
|
56437
|
-
-- this .top;
|
|
56438
|
-
},
|
|
56439
|
-
clear: function ()
|
|
56440
|
-
{
|
|
56441
|
-
this .top = 0;
|
|
56442
|
-
},
|
|
56443
|
-
size: function ()
|
|
56444
|
-
{
|
|
56445
|
-
return this .top + 1;
|
|
56446
|
-
},
|
|
56447
|
-
identity: function ()
|
|
56448
|
-
{
|
|
56449
|
-
this [this .top] .identity ();
|
|
56450
|
-
},
|
|
56451
|
-
multLeft: function (matrix)
|
|
56452
|
-
{
|
|
56453
|
-
this [this .top] .multLeft (matrix);
|
|
56454
|
-
},
|
|
56455
|
-
translate: function (vector)
|
|
56456
|
-
{
|
|
56457
|
-
this [this .top] .translate (vector);
|
|
56458
|
-
},
|
|
56459
|
-
rotate: function (rotation)
|
|
56460
|
-
{
|
|
56461
|
-
this [this .top] .rotate (rotation);
|
|
56462
|
-
},
|
|
56463
|
-
scale: function (vector)
|
|
56464
|
-
{
|
|
56465
|
-
this [this .top] .scale (vector);
|
|
56466
|
-
},
|
|
56467
|
-
});
|
|
56468
|
-
}
|
|
56469
|
-
|
|
56470
|
-
const MatrixStack_default_ = MatrixStack;
|
|
56471
|
-
;
|
|
56472
|
-
|
|
56473
|
-
x_ite_Namespace.set ("standard/Math/Utility/MatrixStack", MatrixStack_default_);
|
|
56474
|
-
/* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
|
|
56475
56913
|
;// CONCATENATED MODULE: ./src/x_ite/Rendering/X3DRenderObject.js
|
|
56476
56914
|
/*******************************************************************************
|
|
56477
56915
|
*
|
|
@@ -60270,220 +60708,6 @@ const GeometryContext_default_ = GeometryContext;
|
|
|
60270
60708
|
|
|
60271
60709
|
x_ite_Namespace.set ("x_ite/Browser/Rendering/GeometryContext", GeometryContext_default_);
|
|
60272
60710
|
/* harmony default export */ const Rendering_GeometryContext = (GeometryContext_default_);
|
|
60273
|
-
;// CONCATENATED MODULE: ./src/standard/Math/Numbers/Complex.js
|
|
60274
|
-
/*******************************************************************************
|
|
60275
|
-
*
|
|
60276
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
60277
|
-
*
|
|
60278
|
-
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
60279
|
-
*
|
|
60280
|
-
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
60281
|
-
*
|
|
60282
|
-
* The copyright notice above does not evidence any actual of intended
|
|
60283
|
-
* publication of such source code, and is an unpublished work by create3000.
|
|
60284
|
-
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
60285
|
-
* create3000.
|
|
60286
|
-
*
|
|
60287
|
-
* No permission is granted to copy, distribute, or create derivative works from
|
|
60288
|
-
* the contents of this software, in whole or in part, without the prior written
|
|
60289
|
-
* permission of create3000.
|
|
60290
|
-
*
|
|
60291
|
-
* NON-MILITARY USE ONLY
|
|
60292
|
-
*
|
|
60293
|
-
* All create3000 software are effectively free software with a non-military use
|
|
60294
|
-
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
60295
|
-
* source in any way you please with the exception anything that uses it must be
|
|
60296
|
-
* marked to indicate is contains 'non-military use only' components.
|
|
60297
|
-
*
|
|
60298
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
60299
|
-
*
|
|
60300
|
-
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
60301
|
-
*
|
|
60302
|
-
* This file is part of the X_ITE Project.
|
|
60303
|
-
*
|
|
60304
|
-
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
60305
|
-
* terms of the GNU General Public License version 3 only, as published by the
|
|
60306
|
-
* Free Software Foundation.
|
|
60307
|
-
*
|
|
60308
|
-
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
60309
|
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
60310
|
-
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
60311
|
-
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
60312
|
-
*
|
|
60313
|
-
* You should have received a copy of the GNU General Public License version 3
|
|
60314
|
-
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
60315
|
-
* copy of the GPLv3 License.
|
|
60316
|
-
*
|
|
60317
|
-
* For Silvio, Joy and Adi.
|
|
60318
|
-
*
|
|
60319
|
-
******************************************************************************/
|
|
60320
|
-
|
|
60321
|
-
function Complex (real, imag)
|
|
60322
|
-
{
|
|
60323
|
-
this .real = real;
|
|
60324
|
-
this .imag = imag;
|
|
60325
|
-
}
|
|
60326
|
-
|
|
60327
|
-
Complex .prototype =
|
|
60328
|
-
{
|
|
60329
|
-
constructor: Complex,
|
|
60330
|
-
[Symbol .iterator]: function* ()
|
|
60331
|
-
{
|
|
60332
|
-
yield this .real;
|
|
60333
|
-
yield this .imag;
|
|
60334
|
-
},
|
|
60335
|
-
copy: function ()
|
|
60336
|
-
{
|
|
60337
|
-
const copy = Object .create (Complex .prototype);
|
|
60338
|
-
copy .real = this .real;
|
|
60339
|
-
copy .imag = this .imag;
|
|
60340
|
-
return copy;
|
|
60341
|
-
},
|
|
60342
|
-
assign: function (complex)
|
|
60343
|
-
{
|
|
60344
|
-
this .real = complex .real;
|
|
60345
|
-
this .imag = complex .imag;
|
|
60346
|
-
return this;
|
|
60347
|
-
},
|
|
60348
|
-
equals: function (complex)
|
|
60349
|
-
{
|
|
60350
|
-
return this .real === complex .real &&
|
|
60351
|
-
this .imag === complex .imag;
|
|
60352
|
-
},
|
|
60353
|
-
setPolar: function (magnitude, angle)
|
|
60354
|
-
{
|
|
60355
|
-
this .real = magnitude * Math .cos (angle);
|
|
60356
|
-
this .imag = magnitude * Math .sin (angle);
|
|
60357
|
-
return this;
|
|
60358
|
-
},
|
|
60359
|
-
conjugate: function ()
|
|
60360
|
-
{
|
|
60361
|
-
this .imag = -this .imag;
|
|
60362
|
-
return this;
|
|
60363
|
-
},
|
|
60364
|
-
negate: function ()
|
|
60365
|
-
{
|
|
60366
|
-
this .real = -this .real;
|
|
60367
|
-
this .imag = -this .imag;
|
|
60368
|
-
return this;
|
|
60369
|
-
},
|
|
60370
|
-
inverse: function ()
|
|
60371
|
-
{
|
|
60372
|
-
const d = this .real * this .real + this .imag * this .imag;
|
|
60373
|
-
|
|
60374
|
-
this .real /= d;
|
|
60375
|
-
this .imag /= -d;
|
|
60376
|
-
return this;
|
|
60377
|
-
},
|
|
60378
|
-
add: function (value)
|
|
60379
|
-
{
|
|
60380
|
-
this .real += value .real;
|
|
60381
|
-
this .imag += value .imag;
|
|
60382
|
-
return this;
|
|
60383
|
-
},
|
|
60384
|
-
subtract: function (value)
|
|
60385
|
-
{
|
|
60386
|
-
this .real -= value .real;
|
|
60387
|
-
this .imag -= value .imag;
|
|
60388
|
-
return this;
|
|
60389
|
-
},
|
|
60390
|
-
multiply: function (value)
|
|
60391
|
-
{
|
|
60392
|
-
this .real *= value;
|
|
60393
|
-
this .imag *= value;
|
|
60394
|
-
return this;
|
|
60395
|
-
},
|
|
60396
|
-
multComp: function (value)
|
|
60397
|
-
{
|
|
60398
|
-
const
|
|
60399
|
-
{ real: ar, imag: ai } = this,
|
|
60400
|
-
{ real: br, imag: bi } = value;
|
|
60401
|
-
|
|
60402
|
-
this .real = ar * br - ai * bi;
|
|
60403
|
-
this .imag = ar * bi + ai * br;
|
|
60404
|
-
return this;
|
|
60405
|
-
},
|
|
60406
|
-
//divide: function (value)
|
|
60407
|
-
//{
|
|
60408
|
-
// return this;
|
|
60409
|
-
//},
|
|
60410
|
-
divComp: function (value)
|
|
60411
|
-
{
|
|
60412
|
-
const
|
|
60413
|
-
{ real: ar, imag: ai } = this,
|
|
60414
|
-
{ real: br, imag: bi } = value,
|
|
60415
|
-
d = br * br + bi * bi;
|
|
60416
|
-
|
|
60417
|
-
this .real = (ar * br + ai * bi) / d;
|
|
60418
|
-
this .imag = (ai * br - ar * bi) / d;
|
|
60419
|
-
return this;
|
|
60420
|
-
},
|
|
60421
|
-
toString: function ()
|
|
60422
|
-
{
|
|
60423
|
-
if (this .imag)
|
|
60424
|
-
return this .real + " " + this .imag + "i";
|
|
60425
|
-
|
|
60426
|
-
return String (this .real);
|
|
60427
|
-
},
|
|
60428
|
-
};
|
|
60429
|
-
|
|
60430
|
-
Object .defineProperty (Complex .prototype, "magnitude",
|
|
60431
|
-
{
|
|
60432
|
-
get: function ()
|
|
60433
|
-
{
|
|
60434
|
-
if (this .real)
|
|
60435
|
-
{
|
|
60436
|
-
if (this .imag)
|
|
60437
|
-
return Math .hypot (this .real, this .imag);
|
|
60438
|
-
|
|
60439
|
-
return Math .abs (this .real);
|
|
60440
|
-
}
|
|
60441
|
-
|
|
60442
|
-
return Math .abs (this .imag);
|
|
60443
|
-
},
|
|
60444
|
-
set: function (magnitude)
|
|
60445
|
-
{
|
|
60446
|
-
this .setPolar (magnitude, this .angle);
|
|
60447
|
-
},
|
|
60448
|
-
enumerable: false,
|
|
60449
|
-
configurable: false
|
|
60450
|
-
});
|
|
60451
|
-
|
|
60452
|
-
Object .defineProperty (Complex .prototype, "angle",
|
|
60453
|
-
{
|
|
60454
|
-
get: function ()
|
|
60455
|
-
{
|
|
60456
|
-
return Math .atan2 (this .imag, this .real);
|
|
60457
|
-
},
|
|
60458
|
-
set: function (angle)
|
|
60459
|
-
{
|
|
60460
|
-
this .setPolar (this .magnitude, angle);
|
|
60461
|
-
},
|
|
60462
|
-
enumerable: false,
|
|
60463
|
-
configurable: false
|
|
60464
|
-
});
|
|
60465
|
-
|
|
60466
|
-
Object .assign (Complex,
|
|
60467
|
-
{
|
|
60468
|
-
Polar: function (magnitude, angle)
|
|
60469
|
-
{
|
|
60470
|
-
return Object .create (Complex .prototype) .setPolar (magnitude, angle);
|
|
60471
|
-
},
|
|
60472
|
-
multiply: function (lhs, rhs)
|
|
60473
|
-
{
|
|
60474
|
-
return lhs .copy () .multiply (rhs);
|
|
60475
|
-
},
|
|
60476
|
-
multComp: function (lhs, rhs)
|
|
60477
|
-
{
|
|
60478
|
-
return lhs .copy () .multComp (rhs);
|
|
60479
|
-
},
|
|
60480
|
-
});
|
|
60481
|
-
|
|
60482
|
-
const Complex_default_ = Complex;
|
|
60483
|
-
;
|
|
60484
|
-
|
|
60485
|
-
x_ite_Namespace.set ("standard/Math/Numbers/Complex", Complex_default_);
|
|
60486
|
-
/* harmony default export */ const Numbers_Complex = (Complex_default_);
|
|
60487
60711
|
;// CONCATENATED MODULE: ./src/standard/Utility/BitSet.js
|
|
60488
60712
|
/*******************************************************************************
|
|
60489
60713
|
*
|
|
@@ -61806,7 +62030,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
61806
62030
|
x_ite_Namespace.set ("x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
|
|
61807
62031
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
|
|
61808
62032
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
61809
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
62033
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(908);
|
|
61810
62034
|
/*******************************************************************************
|
|
61811
62035
|
*
|
|
61812
62036
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -66060,7 +66284,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
66060
66284
|
x_ite_Namespace.set ("x_ite/Execution/X3DWorld", X3DWorld_default_);
|
|
66061
66285
|
/* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
|
|
66062
66286
|
;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
|
|
66063
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
66287
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(908);
|
|
66064
66288
|
/*******************************************************************************
|
|
66065
66289
|
*
|
|
66066
66290
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -68417,7 +68641,7 @@ const URLs_default_ = URLs;
|
|
|
68417
68641
|
x_ite_Namespace.set ("x_ite/Browser/Networking/URLs", URLs_default_);
|
|
68418
68642
|
/* harmony default export */ const Networking_URLs = (URLs_default_);
|
|
68419
68643
|
;// CONCATENATED MODULE: ./src/x_ite/Configuration/ComponentInfo.js
|
|
68420
|
-
/* provided dependency */ var ComponentInfo_$ = __webpack_require__(
|
|
68644
|
+
/* provided dependency */ var ComponentInfo_$ = __webpack_require__(908);
|
|
68421
68645
|
/*******************************************************************************
|
|
68422
68646
|
*
|
|
68423
68647
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -70383,7 +70607,7 @@ const DataStorage_default_ = DataStorage;
|
|
|
70383
70607
|
x_ite_Namespace.set ("standard/Utility/DataStorage", DataStorage_default_);
|
|
70384
70608
|
/* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
|
|
70385
70609
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
70386
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
70610
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(908);
|
|
70387
70611
|
/*******************************************************************************
|
|
70388
70612
|
*
|
|
70389
70613
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -76873,8 +77097,8 @@ const OrientationChaser_default_ = OrientationChaser;
|
|
|
76873
77097
|
x_ite_Namespace.set ("x_ite/Components/Followers/OrientationChaser", OrientationChaser_default_);
|
|
76874
77098
|
/* harmony default export */ const Followers_OrientationChaser = (OrientationChaser_default_);
|
|
76875
77099
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
76876
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
76877
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
77100
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(172);
|
|
77101
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(908);
|
|
76878
77102
|
/*******************************************************************************
|
|
76879
77103
|
*
|
|
76880
77104
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -77738,8 +77962,8 @@ const ExamineViewer_default_ = ExamineViewer;
|
|
|
77738
77962
|
x_ite_Namespace.set ("x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
|
|
77739
77963
|
/* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
|
|
77740
77964
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
77741
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
77742
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
77965
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(172);
|
|
77966
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(908);
|
|
77743
77967
|
/*******************************************************************************
|
|
77744
77968
|
*
|
|
77745
77969
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -78689,8 +78913,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
78689
78913
|
x_ite_Namespace.set ("x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
|
|
78690
78914
|
/* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
|
|
78691
78915
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
78692
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
78693
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
78916
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(172);
|
|
78917
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(908);
|
|
78694
78918
|
/*******************************************************************************
|
|
78695
78919
|
*
|
|
78696
78920
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -78999,8 +79223,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
78999
79223
|
x_ite_Namespace.set ("x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
|
|
79000
79224
|
/* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
|
|
79001
79225
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
79002
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
79003
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
79226
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(172);
|
|
79227
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(908);
|
|
79004
79228
|
/*******************************************************************************
|
|
79005
79229
|
*
|
|
79006
79230
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -80603,8 +80827,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
80603
80827
|
x_ite_Namespace.set ("x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
|
|
80604
80828
|
/* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
|
|
80605
80829
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
80606
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
80607
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
80830
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(172);
|
|
80831
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(908);
|
|
80608
80832
|
/*******************************************************************************
|
|
80609
80833
|
*
|
|
80610
80834
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -81626,8 +81850,8 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
|
|
|
81626
81850
|
x_ite_Namespace.set ("x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
|
|
81627
81851
|
/* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
|
|
81628
81852
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
81629
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
81630
|
-
/* provided dependency */ var ResizeSensor = __webpack_require__(
|
|
81853
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(908);
|
|
81854
|
+
/* provided dependency */ var ResizeSensor = __webpack_require__(151);
|
|
81631
81855
|
/*******************************************************************************
|
|
81632
81856
|
*
|
|
81633
81857
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -90153,7 +90377,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
90153
90377
|
x_ite_Namespace.set ("x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
|
|
90154
90378
|
/* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
|
|
90155
90379
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
90156
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
90380
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(908);
|
|
90157
90381
|
/*******************************************************************************
|
|
90158
90382
|
*
|
|
90159
90383
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -112034,7 +112258,7 @@ const X3DSoundSourceNode_default_ = X3DSoundSourceNode;
|
|
|
112034
112258
|
x_ite_Namespace.set ("x_ite/Components/Sound/X3DSoundSourceNode", X3DSoundSourceNode_default_);
|
|
112035
112259
|
/* harmony default export */ const Sound_X3DSoundSourceNode = (X3DSoundSourceNode_default_);
|
|
112036
112260
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Sound/AudioClip.js
|
|
112037
|
-
/* provided dependency */ var AudioClip_$ = __webpack_require__(
|
|
112261
|
+
/* provided dependency */ var AudioClip_$ = __webpack_require__(908);
|
|
112038
112262
|
/*******************************************************************************
|
|
112039
112263
|
*
|
|
112040
112264
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -114849,8 +115073,8 @@ const GIFMedia_default_ = GifMedia;
|
|
|
114849
115073
|
x_ite_Namespace.set ("x_ite/Browser/Texturing/GIFMedia", GIFMedia_default_);
|
|
114850
115074
|
/* harmony default export */ const GIFMedia = (GIFMedia_default_);
|
|
114851
115075
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
114852
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
114853
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
115076
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(908);
|
|
115077
|
+
/* provided dependency */ var SuperGif = __webpack_require__(732);
|
|
114854
115078
|
/*******************************************************************************
|
|
114855
115079
|
*
|
|
114856
115080
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -115808,7 +116032,7 @@ const MultiTextureTransform_default_ = MultiTextureTransform;
|
|
|
115808
116032
|
x_ite_Namespace.set ("x_ite/Components/Texturing/MultiTextureTransform", MultiTextureTransform_default_);
|
|
115809
116033
|
/* harmony default export */ const Texturing_MultiTextureTransform = (MultiTextureTransform_default_);
|
|
115810
116034
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/PixelTexture.js
|
|
115811
|
-
/* provided dependency */ var PixelTexture_$ = __webpack_require__(
|
|
116035
|
+
/* provided dependency */ var PixelTexture_$ = __webpack_require__(908);
|
|
115812
116036
|
/*******************************************************************************
|
|
115813
116037
|
*
|
|
115814
116038
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -116511,7 +116735,7 @@ const Components_default_ = Components;
|
|
|
116511
116735
|
x_ite_Namespace.set ("x_ite/Components", Components_default_);
|
|
116512
116736
|
/* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
|
|
116513
116737
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
|
|
116514
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
116738
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(908);
|
|
116515
116739
|
/*******************************************************************************
|
|
116516
116740
|
* MIT License
|
|
116517
116741
|
*
|
|
@@ -117748,7 +117972,7 @@ const SupportedProfiles_default_ = SupportedProfiles;
|
|
|
117748
117972
|
x_ite_Namespace.set ("x_ite/Configuration/SupportedProfiles", SupportedProfiles_default_);
|
|
117749
117973
|
/* harmony default export */ const Configuration_SupportedProfiles = (SupportedProfiles_default_);
|
|
117750
117974
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
|
|
117751
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
117975
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(908);
|
|
117752
117976
|
/*******************************************************************************
|
|
117753
117977
|
*
|
|
117754
117978
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118686,7 +118910,7 @@ const X3DBrowser_default_ = X3DBrowser;
|
|
|
118686
118910
|
x_ite_Namespace.set ("x_ite/Browser/X3DBrowser", X3DBrowser_default_);
|
|
118687
118911
|
/* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
|
|
118688
118912
|
;// CONCATENATED MODULE: ./src/x_ite/Fallback.js
|
|
118689
|
-
/* provided dependency */ var Fallback_$ = __webpack_require__(
|
|
118913
|
+
/* provided dependency */ var Fallback_$ = __webpack_require__(908);
|
|
118690
118914
|
/*******************************************************************************
|
|
118691
118915
|
*
|
|
118692
118916
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -118865,8 +119089,8 @@ const MicroTime_default_ = undefined;
|
|
|
118865
119089
|
x_ite_Namespace.set ("standard/Time/MicroTime", MicroTime_default_);
|
|
118866
119090
|
/* harmony default export */ const MicroTime = ((/* unused pure expression or super */ null && (MicroTime_default_)));
|
|
118867
119091
|
;// CONCATENATED MODULE: ./src/lib/jquery.js
|
|
118868
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
118869
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
119092
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(908);
|
|
119093
|
+
/* provided dependency */ var pako = __webpack_require__(862);
|
|
118870
119094
|
jquery_$.decodeText = function (input)
|
|
118871
119095
|
{
|
|
118872
119096
|
if (typeof input === "string")
|
|
@@ -118893,14 +119117,14 @@ const jquery_default_ = jquery_$;
|
|
|
118893
119117
|
x_ite_Namespace.set ("lib/jquery", jquery_default_);
|
|
118894
119118
|
/* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
|
|
118895
119119
|
;// CONCATENATED MODULE: ./src/lib/libtess.js
|
|
118896
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
119120
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(323);
|
|
118897
119121
|
const libtess_default_ = libtess_libtess;
|
|
118898
119122
|
;
|
|
118899
119123
|
|
|
118900
119124
|
x_ite_Namespace.set ("lib/libtess", libtess_default_);
|
|
118901
119125
|
/* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
|
|
118902
119126
|
;// CONCATENATED MODULE: ./src/x_ite/X3D.js
|
|
118903
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
119127
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(908);
|
|
118904
119128
|
/*******************************************************************************
|
|
118905
119129
|
*
|
|
118906
119130
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119156,7 +119380,7 @@ const X3D_default_ = X3D;
|
|
|
119156
119380
|
x_ite_Namespace.set ("x_ite/X3D", X3D_default_);
|
|
119157
119381
|
/* harmony default export */ const x_ite_X3D = (X3D_default_);
|
|
119158
119382
|
;// CONCATENATED MODULE: ./src/x_ite/X3DCanvas.js
|
|
119159
|
-
/* provided dependency */ var X3DCanvas_$ = __webpack_require__(
|
|
119383
|
+
/* provided dependency */ var X3DCanvas_$ = __webpack_require__(908);
|
|
119160
119384
|
/*******************************************************************************
|
|
119161
119385
|
*
|
|
119162
119386
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -119416,7 +119640,7 @@ x_ite_Namespace.set ("shim", shim_default_);
|
|
|
119416
119640
|
|
|
119417
119641
|
// Assign X3D to global namespace.
|
|
119418
119642
|
|
|
119419
|
-
window [Symbol .for ("X_ITE.X3D-8.6.
|
|
119643
|
+
window [Symbol .for ("X_ITE.X3D-8.6.5")] = x_ite_X3D;
|
|
119420
119644
|
|
|
119421
119645
|
x_ite_X3DCanvas.define ();
|
|
119422
119646
|
|