@antv/g-canvas 1.0.0-alpha.28 → 1.0.0-alpha.32
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/index.umd.js +16 -2221
- package/es/Canvas2DContextService.d.ts +16 -0
- package/es/Canvas2DContextService.js +87 -0
- package/es/ContextRegisterPlugin.d.ts +6 -0
- package/es/ContextRegisterPlugin.js +28 -0
- package/es/index.d.ts +9 -0
- package/es/index.js +38 -0
- package/es/utils/browser.d.ts +1 -0
- package/es/utils/browser.js +1 -0
- package/es/utils/dom.d.ts +1 -0
- package/es/utils/dom.js +8 -0
- package/lib/Canvas2DContextService.d.ts +16 -0
- package/lib/Canvas2DContextService.js +97 -0
- package/lib/ContextRegisterPlugin.d.ts +6 -0
- package/lib/ContextRegisterPlugin.js +37 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +4 -2
- package/lib/utils/browser.d.ts +1 -0
- package/lib/utils/browser.js +8 -0
- package/lib/utils/dom.d.ts +1 -0
- package/lib/utils/dom.js +17 -0
- package/package.json +11 -8
package/dist/index.umd.js
CHANGED
|
@@ -1,2221 +1,16 @@
|
|
|
1
|
-
(function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/******/ function __webpack_require__(moduleId) {
|
|
17
|
-
/******/
|
|
18
|
-
/******/ // Check if module is in cache
|
|
19
|
-
/******/ if(installedModules[moduleId]) {
|
|
20
|
-
/******/ return installedModules[moduleId].exports;
|
|
21
|
-
/******/ }
|
|
22
|
-
/******/ // Create a new module (and put it into the cache)
|
|
23
|
-
/******/ var module = installedModules[moduleId] = {
|
|
24
|
-
/******/ i: moduleId,
|
|
25
|
-
/******/ l: false,
|
|
26
|
-
/******/ exports: {}
|
|
27
|
-
/******/ };
|
|
28
|
-
/******/
|
|
29
|
-
/******/ // Execute the module function
|
|
30
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
31
|
-
/******/
|
|
32
|
-
/******/ // Flag the module as loaded
|
|
33
|
-
/******/ module.l = true;
|
|
34
|
-
/******/
|
|
35
|
-
/******/ // Return the exports of the module
|
|
36
|
-
/******/ return module.exports;
|
|
37
|
-
/******/ }
|
|
38
|
-
/******/
|
|
39
|
-
/******/
|
|
40
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
41
|
-
/******/ __webpack_require__.m = modules;
|
|
42
|
-
/******/
|
|
43
|
-
/******/ // expose the module cache
|
|
44
|
-
/******/ __webpack_require__.c = installedModules;
|
|
45
|
-
/******/
|
|
46
|
-
/******/ // define getter function for harmony exports
|
|
47
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
48
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
49
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
50
|
-
/******/ }
|
|
51
|
-
/******/ };
|
|
52
|
-
/******/
|
|
53
|
-
/******/ // define __esModule on exports
|
|
54
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
55
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
56
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
57
|
-
/******/ }
|
|
58
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
59
|
-
/******/ };
|
|
60
|
-
/******/
|
|
61
|
-
/******/ // create a fake namespace object
|
|
62
|
-
/******/ // mode & 1: value is a module id, require it
|
|
63
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
64
|
-
/******/ // mode & 4: return value when already ns object
|
|
65
|
-
/******/ // mode & 8|1: behave like require
|
|
66
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
67
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
68
|
-
/******/ if(mode & 8) return value;
|
|
69
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
70
|
-
/******/ var ns = Object.create(null);
|
|
71
|
-
/******/ __webpack_require__.r(ns);
|
|
72
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
73
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
74
|
-
/******/ return ns;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
78
|
-
/******/ __webpack_require__.n = function(module) {
|
|
79
|
-
/******/ var getter = module && module.__esModule ?
|
|
80
|
-
/******/ function getDefault() { return module['default']; } :
|
|
81
|
-
/******/ function getModuleExports() { return module; };
|
|
82
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
83
|
-
/******/ return getter;
|
|
84
|
-
/******/ };
|
|
85
|
-
/******/
|
|
86
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
87
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // __webpack_public_path__
|
|
90
|
-
/******/ __webpack_require__.p = "";
|
|
91
|
-
/******/
|
|
92
|
-
/******/
|
|
93
|
-
/******/ // Load entry module and return exports
|
|
94
|
-
/******/ return __webpack_require__(__webpack_require__.s = "./src/index.ts");
|
|
95
|
-
/******/ })
|
|
96
|
-
/************************************************************************/
|
|
97
|
-
/******/ ({
|
|
98
|
-
|
|
99
|
-
/***/ "../../node_modules/@antv/util/esm/augment.js":
|
|
100
|
-
/*!*******************************************************************************!*\
|
|
101
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/augment.js ***!
|
|
102
|
-
\*******************************************************************************/
|
|
103
|
-
/*! exports provided: default */
|
|
104
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
105
|
-
|
|
106
|
-
"use strict";
|
|
107
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _mix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mix */ \"../../node_modules/@antv/util/esm/mix.js\");\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n\n\nvar augment = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var c = args[0];\n for (var i = 1; i < args.length; i++) {\n var obj = args[i];\n if (Object(_is_function__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(obj)) {\n obj = obj.prototype;\n }\n Object(_mix__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(c.prototype, obj);\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (augment);\n//# sourceMappingURL=augment.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/augment.js?");
|
|
108
|
-
|
|
109
|
-
/***/ }),
|
|
110
|
-
|
|
111
|
-
/***/ "../../node_modules/@antv/util/esm/cache.js":
|
|
112
|
-
/*!*****************************************************************************!*\
|
|
113
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/cache.js ***!
|
|
114
|
-
\*****************************************************************************/
|
|
115
|
-
/*! exports provided: default */
|
|
116
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
117
|
-
|
|
118
|
-
"use strict";
|
|
119
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * k-v 存储\n */\nvar default_1 = /** @class */ (function () {\n function default_1() {\n this.map = {};\n }\n default_1.prototype.has = function (key) {\n return this.map[key] !== undefined;\n };\n default_1.prototype.get = function (key, def) {\n var v = this.map[key];\n return v === undefined ? def : v;\n };\n default_1.prototype.set = function (key, value) {\n this.map[key] = value;\n };\n default_1.prototype.clear = function () {\n this.map = {};\n };\n default_1.prototype.delete = function (key) {\n delete this.map[key];\n };\n default_1.prototype.size = function () {\n return Object.keys(this.map).length;\n };\n return default_1;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (default_1);\n//# sourceMappingURL=cache.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/cache.js?");
|
|
120
|
-
|
|
121
|
-
/***/ }),
|
|
122
|
-
|
|
123
|
-
/***/ "../../node_modules/@antv/util/esm/clamp.js":
|
|
124
|
-
/*!*****************************************************************************!*\
|
|
125
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/clamp.js ***!
|
|
126
|
-
\*****************************************************************************/
|
|
127
|
-
/*! exports provided: default */
|
|
128
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
129
|
-
|
|
130
|
-
"use strict";
|
|
131
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar clamp = function (a, min, max) {\n if (a < min) {\n return min;\n }\n else if (a > max) {\n return max;\n }\n return a;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (clamp);\n//# sourceMappingURL=clamp.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/clamp.js?");
|
|
132
|
-
|
|
133
|
-
/***/ }),
|
|
134
|
-
|
|
135
|
-
/***/ "../../node_modules/@antv/util/esm/clear-animation-frame.js":
|
|
136
|
-
/*!*********************************************************************************************!*\
|
|
137
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/clear-animation-frame.js ***!
|
|
138
|
-
\*********************************************************************************************/
|
|
139
|
-
/*! exports provided: default */
|
|
140
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
141
|
-
|
|
142
|
-
"use strict";
|
|
143
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cancelAnimationFrame; });\nfunction cancelAnimationFrame(handler) {\n var method = window.cancelAnimationFrame ||\n window.webkitCancelAnimationFrame ||\n // @ts-ignore\n window.mozCancelAnimationFrame ||\n // @ts-ignore\n window.msCancelAnimationFrame ||\n clearTimeout;\n method(handler);\n}\n;\n//# sourceMappingURL=clear-animation-frame.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/clear-animation-frame.js?");
|
|
144
|
-
|
|
145
|
-
/***/ }),
|
|
146
|
-
|
|
147
|
-
/***/ "../../node_modules/@antv/util/esm/clone.js":
|
|
148
|
-
/*!*****************************************************************************!*\
|
|
149
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/clone.js ***!
|
|
150
|
-
\*****************************************************************************/
|
|
151
|
-
/*! exports provided: default */
|
|
152
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
153
|
-
|
|
154
|
-
"use strict";
|
|
155
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n\nvar clone = function (obj) {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n var rst;\n if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(obj)) {\n rst = [];\n for (var i = 0, l = obj.length; i < l; i++) {\n if (typeof obj[i] === 'object' && obj[i] != null) {\n rst[i] = clone(obj[i]);\n }\n else {\n rst[i] = obj[i];\n }\n }\n }\n else {\n rst = {};\n for (var k in obj) {\n if (typeof obj[k] === 'object' && obj[k] != null) {\n rst[k] = clone(obj[k]);\n }\n else {\n rst[k] = obj[k];\n }\n }\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (clone);\n//# sourceMappingURL=clone.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/clone.js?");
|
|
156
|
-
|
|
157
|
-
/***/ }),
|
|
158
|
-
|
|
159
|
-
/***/ "../../node_modules/@antv/util/esm/contains.js":
|
|
160
|
-
/*!********************************************************************************!*\
|
|
161
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/contains.js ***!
|
|
162
|
-
\********************************************************************************/
|
|
163
|
-
/*! exports provided: default */
|
|
164
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
165
|
-
|
|
166
|
-
"use strict";
|
|
167
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n\nvar contains = function (arr, value) {\n if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n return false;\n }\n return arr.indexOf(value) > -1;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (contains);\n//# sourceMappingURL=contains.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/contains.js?");
|
|
168
|
-
|
|
169
|
-
/***/ }),
|
|
170
|
-
|
|
171
|
-
/***/ "../../node_modules/@antv/util/esm/debounce.js":
|
|
172
|
-
/*!********************************************************************************!*\
|
|
173
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/debounce.js ***!
|
|
174
|
-
\********************************************************************************/
|
|
175
|
-
/*! exports provided: default */
|
|
176
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
177
|
-
|
|
178
|
-
"use strict";
|
|
179
|
-
eval("__webpack_require__.r(__webpack_exports__);\nfunction debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this, args = arguments;\n var later = function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (debounce);\n//# sourceMappingURL=debounce.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/debounce.js?");
|
|
180
|
-
|
|
181
|
-
/***/ }),
|
|
182
|
-
|
|
183
|
-
/***/ "../../node_modules/@antv/util/esm/deep-mix.js":
|
|
184
|
-
/*!********************************************************************************!*\
|
|
185
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/deep-mix.js ***!
|
|
186
|
-
\********************************************************************************/
|
|
187
|
-
/*! exports provided: default */
|
|
188
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
189
|
-
|
|
190
|
-
"use strict";
|
|
191
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_plain_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-plain-object */ \"../../node_modules/@antv/util/esm/is-plain-object.js\");\n\n\nvar MAX_MIX_LEVEL = 5;\nfunction _deepMix(dist, src, level, maxLevel) {\n level = level || 0;\n maxLevel = maxLevel || MAX_MIX_LEVEL;\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n var value = src[key];\n if (value !== null && Object(_is_plain_object__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(value)) {\n if (!Object(_is_plain_object__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(dist[key])) {\n dist[key] = {};\n }\n if (level < maxLevel) {\n _deepMix(dist[key], value, level + 1, maxLevel);\n }\n else {\n dist[key] = src[key];\n }\n }\n else if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value)) {\n dist[key] = [];\n dist[key] = dist[key].concat(value);\n }\n else if (value !== undefined) {\n dist[key] = value;\n }\n }\n }\n}\n// todo 重写\nvar deepMix = function (rst) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < args.length; i += 1) {\n _deepMix(rst, args[i]);\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (deepMix);\n//# sourceMappingURL=deep-mix.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/deep-mix.js?");
|
|
192
|
-
|
|
193
|
-
/***/ }),
|
|
194
|
-
|
|
195
|
-
/***/ "../../node_modules/@antv/util/esm/difference.js":
|
|
196
|
-
/*!**********************************************************************************!*\
|
|
197
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/difference.js ***!
|
|
198
|
-
\**********************************************************************************/
|
|
199
|
-
/*! exports provided: default */
|
|
200
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
201
|
-
|
|
202
|
-
"use strict";
|
|
203
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filter */ \"../../node_modules/@antv/util/esm/filter.js\");\n/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contains */ \"../../node_modules/@antv/util/esm/contains.js\");\n\n\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to inspect.\n * @param {Array} values The values to exclude.\n * @return {Array} Returns the new array of filtered values.\n * @example\n * difference([2, 1], [2, 3]); // => [1]\n */\nvar difference = function (arr, values) {\n if (values === void 0) { values = []; }\n return Object(_filter__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr, function (value) { return !Object(_contains__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(values, value); });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (difference);\n//# sourceMappingURL=difference.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/difference.js?");
|
|
204
|
-
|
|
205
|
-
/***/ }),
|
|
206
|
-
|
|
207
|
-
/***/ "../../node_modules/@antv/util/esm/each.js":
|
|
208
|
-
/*!****************************************************************************!*\
|
|
209
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/each.js ***!
|
|
210
|
-
\****************************************************************************/
|
|
211
|
-
/*! exports provided: default */
|
|
212
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
213
|
-
|
|
214
|
-
"use strict";
|
|
215
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-object */ \"../../node_modules/@antv/util/esm/is-object.js\");\n\n\nfunction each(elements, func) {\n if (!elements) {\n return;\n }\n var rst;\n if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elements)) {\n for (var i = 0, len = elements.length; i < len; i++) {\n rst = func(elements[i], i);\n if (rst === false) {\n break;\n }\n }\n }\n else if (Object(_is_object__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(elements)) {\n for (var k in elements) {\n if (elements.hasOwnProperty(k)) {\n rst = func(elements[k], k);\n if (rst === false) {\n break;\n }\n }\n }\n }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (each);\n//# sourceMappingURL=each.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/each.js?");
|
|
216
|
-
|
|
217
|
-
/***/ }),
|
|
218
|
-
|
|
219
|
-
/***/ "../../node_modules/@antv/util/esm/ends-with.js":
|
|
220
|
-
/*!*********************************************************************************!*\
|
|
221
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/ends-with.js ***!
|
|
222
|
-
\*********************************************************************************/
|
|
223
|
-
/*! exports provided: default */
|
|
224
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
225
|
-
|
|
226
|
-
"use strict";
|
|
227
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ \"../../node_modules/@antv/util/esm/is-string.js\");\n\n\nfunction endsWith(arr, e) {\n return (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr) || Object(_is_string__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr)) ? arr[arr.length - 1] === e : false;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (endsWith);\n//# sourceMappingURL=ends-with.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/ends-with.js?");
|
|
228
|
-
|
|
229
|
-
/***/ }),
|
|
230
|
-
|
|
231
|
-
/***/ "../../node_modules/@antv/util/esm/every.js":
|
|
232
|
-
/*!*****************************************************************************!*\
|
|
233
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/every.js ***!
|
|
234
|
-
\*****************************************************************************/
|
|
235
|
-
/*! exports provided: default */
|
|
236
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
237
|
-
|
|
238
|
-
"use strict";
|
|
239
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * 只要有一个不满足条件就返回 false\n * @param arr\n * @param func\n */\nvar every = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (!func(arr[i], i))\n return false;\n }\n return true;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (every);\n//# sourceMappingURL=every.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/every.js?");
|
|
240
|
-
|
|
241
|
-
/***/ }),
|
|
242
|
-
|
|
243
|
-
/***/ "../../node_modules/@antv/util/esm/extend.js":
|
|
244
|
-
/*!******************************************************************************!*\
|
|
245
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/extend.js ***!
|
|
246
|
-
\******************************************************************************/
|
|
247
|
-
/*! exports provided: default */
|
|
248
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
249
|
-
|
|
250
|
-
"use strict";
|
|
251
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _mix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mix */ \"../../node_modules/@antv/util/esm/mix.js\");\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n\n\nvar extend = function (subclass, superclass, overrides, staticOverrides) {\n // 如果只提供父类构造函数,则自动生成子类构造函数\n if (!Object(_is_function__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(superclass)) {\n overrides = superclass;\n superclass = subclass;\n subclass = function () { };\n }\n var create = Object.create ?\n function (proto, c) {\n return Object.create(proto, {\n constructor: {\n value: c\n }\n });\n } :\n function (proto, c) {\n function Tmp() { }\n Tmp.prototype = proto;\n var o = new Tmp();\n o.constructor = c;\n return o;\n };\n var superObj = create(superclass.prototype, subclass); // new superclass(),//实例化父类作为子类的prototype\n subclass.prototype = Object(_mix__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(superObj, subclass.prototype); // 指定子类的prototype\n subclass.superclass = create(superclass.prototype, superclass);\n Object(_mix__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(superObj, overrides);\n Object(_mix__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(subclass, staticOverrides);\n return subclass;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (extend);\n//# sourceMappingURL=extend.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/extend.js?");
|
|
252
|
-
|
|
253
|
-
/***/ }),
|
|
254
|
-
|
|
255
|
-
/***/ "../../node_modules/@antv/util/esm/filter.js":
|
|
256
|
-
/*!******************************************************************************!*\
|
|
257
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/filter.js ***!
|
|
258
|
-
\******************************************************************************/
|
|
259
|
-
/*! exports provided: default */
|
|
260
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
261
|
-
|
|
262
|
-
"use strict";
|
|
263
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n\nvar filter = function (arr, func) {\n if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n if (func(value, index)) {\n result.push(value);\n }\n }\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (filter);\n//# sourceMappingURL=filter.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/filter.js?");
|
|
264
|
-
|
|
265
|
-
/***/ }),
|
|
266
|
-
|
|
267
|
-
/***/ "../../node_modules/@antv/util/esm/find-index.js":
|
|
268
|
-
/*!**********************************************************************************!*\
|
|
269
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/find-index.js ***!
|
|
270
|
-
\**********************************************************************************/
|
|
271
|
-
/*! exports provided: default */
|
|
272
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
273
|
-
|
|
274
|
-
"use strict";
|
|
275
|
-
eval("__webpack_require__.r(__webpack_exports__);\nfunction findIndex(arr, predicate, fromIndex) {\n if (fromIndex === void 0) { fromIndex = 0; }\n for (var i = fromIndex; i < arr.length; i++) {\n if (predicate(arr[i], i)) {\n // 找到终止循环\n return i;\n }\n }\n return -1;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (findIndex);\n//# sourceMappingURL=find-index.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/find-index.js?");
|
|
276
|
-
|
|
277
|
-
/***/ }),
|
|
278
|
-
|
|
279
|
-
/***/ "../../node_modules/@antv/util/esm/find.js":
|
|
280
|
-
/*!****************************************************************************!*\
|
|
281
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/find.js ***!
|
|
282
|
-
\****************************************************************************/
|
|
283
|
-
/*! exports provided: default */
|
|
284
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
285
|
-
|
|
286
|
-
"use strict";
|
|
287
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n/* harmony import */ var _is_match__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-match */ \"../../node_modules/@antv/util/esm/is-match.js\");\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_plain_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./is-plain-object */ \"../../node_modules/@antv/util/esm/is-plain-object.js\");\n\n\n\n\nfunction find(arr, predicate) {\n if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(arr))\n return null;\n var _predicate;\n if (Object(_is_function__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(predicate)) {\n _predicate = predicate;\n }\n if (Object(_is_plain_object__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(predicate)) {\n _predicate = function (a) { return Object(_is_match__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(a, predicate); };\n }\n if (_predicate) {\n for (var i = 0; i < arr.length; i += 1) {\n if (_predicate(arr[i])) {\n return arr[i];\n }\n }\n }\n return null;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (find);\n//# sourceMappingURL=find.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/find.js?");
|
|
288
|
-
|
|
289
|
-
/***/ }),
|
|
290
|
-
|
|
291
|
-
/***/ "../../node_modules/@antv/util/esm/first-value.js":
|
|
292
|
-
/*!***********************************************************************************!*\
|
|
293
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/first-value.js ***!
|
|
294
|
-
\***********************************************************************************/
|
|
295
|
-
/*! exports provided: default */
|
|
296
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
297
|
-
|
|
298
|
-
"use strict";
|
|
299
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ \"../../node_modules/@antv/util/esm/is-nil.js\");\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n\n\nvar firstValue = function (data, name) {\n var rst = null;\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value)) {\n if (Object(_is_array__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(value)) {\n rst = value[0]; // todo 这里是否应该使用递归,调用 firstValue @绝云\n }\n else {\n rst = value;\n }\n break;\n }\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (firstValue);\n//# sourceMappingURL=first-value.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/first-value.js?");
|
|
300
|
-
|
|
301
|
-
/***/ }),
|
|
302
|
-
|
|
303
|
-
/***/ "../../node_modules/@antv/util/esm/fixed-base.js":
|
|
304
|
-
/*!**********************************************************************************!*\
|
|
305
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/fixed-base.js ***!
|
|
306
|
-
\**********************************************************************************/
|
|
307
|
-
/*! exports provided: default */
|
|
308
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
309
|
-
|
|
310
|
-
"use strict";
|
|
311
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar fixedBase = function (v, base) {\n var str = base.toString();\n var index = str.indexOf('.');\n if (index === -1) {\n return Math.round(v);\n }\n var length = str.substr(index + 1).length;\n if (length > 20) {\n length = 20;\n }\n return parseFloat(v.toFixed(length));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (fixedBase);\n//# sourceMappingURL=fixed-base.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/fixed-base.js?");
|
|
312
|
-
|
|
313
|
-
/***/ }),
|
|
314
|
-
|
|
315
|
-
/***/ "../../node_modules/@antv/util/esm/flatten-deep.js":
|
|
316
|
-
/*!************************************************************************************!*\
|
|
317
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/flatten-deep.js ***!
|
|
318
|
-
\************************************************************************************/
|
|
319
|
-
/*! exports provided: default */
|
|
320
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
321
|
-
|
|
322
|
-
"use strict";
|
|
323
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @param {Array} result The array to return.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flattenDeep([1, [2, [3, [4]], 5]]); // => [1, 2, 3, 4, 5]\n */\nvar flattenDeep = function (arr, result) {\n if (result === void 0) { result = []; }\n if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n result.push(arr);\n }\n else {\n for (var i = 0; i < arr.length; i += 1) {\n flattenDeep(arr[i], result);\n }\n }\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (flattenDeep);\n//# sourceMappingURL=flatten-deep.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/flatten-deep.js?");
|
|
324
|
-
|
|
325
|
-
/***/ }),
|
|
326
|
-
|
|
327
|
-
/***/ "../../node_modules/@antv/util/esm/flatten.js":
|
|
328
|
-
/*!*******************************************************************************!*\
|
|
329
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/flatten.js ***!
|
|
330
|
-
\*******************************************************************************/
|
|
331
|
-
/*! exports provided: default */
|
|
332
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
333
|
-
|
|
334
|
-
"use strict";
|
|
335
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]\n */\nvar flatten = function (arr) {\n if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n return [];\n }\n var rst = [];\n for (var i = 0; i < arr.length; i++) {\n rst = rst.concat(arr[i]);\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (flatten);\n//# sourceMappingURL=flatten.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/flatten.js?");
|
|
336
|
-
|
|
337
|
-
/***/ }),
|
|
338
|
-
|
|
339
|
-
/***/ "../../node_modules/@antv/util/esm/for-in.js":
|
|
340
|
-
/*!******************************************************************************!*\
|
|
341
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/for-in.js ***!
|
|
342
|
-
\******************************************************************************/
|
|
343
|
-
/*! exports provided: default */
|
|
344
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
345
|
-
|
|
346
|
-
"use strict";
|
|
347
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ \"../../node_modules/@antv/util/esm/each.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_each__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n//# sourceMappingURL=for-in.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/for-in.js?");
|
|
348
|
-
|
|
349
|
-
/***/ }),
|
|
350
|
-
|
|
351
|
-
/***/ "../../node_modules/@antv/util/esm/get-ellipsis-text.js":
|
|
352
|
-
/*!*****************************************************************************************!*\
|
|
353
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/get-ellipsis-text.js ***!
|
|
354
|
-
\*****************************************************************************************/
|
|
355
|
-
/*! exports provided: default */
|
|
356
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
357
|
-
|
|
358
|
-
"use strict";
|
|
359
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-string */ \"../../node_modules/@antv/util/esm/is-string.js\");\n/* harmony import */ var _to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./to-string */ \"../../node_modules/@antv/util/esm/to-string.js\");\n/* harmony import */ var _measure_text_width__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./measure-text-width */ \"../../node_modules/@antv/util/esm/measure-text-width.js\");\n\n\n\n/**\n * 获取文本的 ... 文本。\n * 算法(减少每次 measureText 的长度,measureText 的性能跟字符串时间相关):\n * 1. 先通过 STEP 逐步计算,找到最后一个小于 maxWidth 的字符串\n * 2. 然后对最后这个字符串二分计算\n * @param text 需要计算的文本, 由于历史原因 除了支持string,还支持空值,number和数组等\n * @param maxWidth 最大宽度\n * @param font 字体\n * @param str 要替换的文本\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (text, maxWidth, font, str) {\n if (str === void 0) { str = '...'; }\n var STEP = 16; // 每次 16,调参工程师\n var PLACEHOLDER_WIDTH = Object(_measure_text_width__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(str, font);\n var leftText = !Object(_is_string__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(text) ? Object(_to_string__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(text) : text;\n var leftWidth = maxWidth;\n var r = []; // 最终的分段字符串\n var currentText;\n var currentWidth;\n if (Object(_measure_text_width__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(text, font) <= maxWidth) {\n return text;\n }\n // 首先通过 step 计算,找出最大的未超出长度的\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, STEP);\n // 计算宽度\n currentWidth = Object(_measure_text_width__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(currentText, font);\n // 超出剩余宽度,则停止\n if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {\n if (currentWidth > leftWidth) {\n break;\n }\n }\n r.push(currentText);\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(STEP);\n // 字符串整体没有超出\n if (!leftText) {\n return r.join('');\n }\n }\n // 最下的最后一个 STEP,使用 1 递增(用二分效果更高)\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, 1);\n // 计算宽度\n currentWidth = Object(_measure_text_width__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(currentText, font);\n // 超出剩余宽度,则停止\n if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {\n break;\n }\n r.push(currentText);\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(1);\n if (!leftText) {\n return r.join('');\n }\n }\n return \"\" + r.join('') + str;\n});\n//# sourceMappingURL=get-ellipsis-text.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/get-ellipsis-text.js?");
|
|
360
|
-
|
|
361
|
-
/***/ }),
|
|
362
|
-
|
|
363
|
-
/***/ "../../node_modules/@antv/util/esm/get-range.js":
|
|
364
|
-
/*!*********************************************************************************!*\
|
|
365
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/get-range.js ***!
|
|
366
|
-
\*********************************************************************************/
|
|
367
|
-
/*! exports provided: default */
|
|
368
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
369
|
-
|
|
370
|
-
"use strict";
|
|
371
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./max */ \"../../node_modules/@antv/util/esm/max.js\");\n/* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./min */ \"../../node_modules/@antv/util/esm/min.js\");\n\n\n\nvar getRange = function (values) {\n // 存在 NaN 时,min,max 判定会出问题\n var filterValues = values.filter(function (v) { return !isNaN(v); });\n if (!filterValues.length) {\n // 如果没有数值则直接返回0\n return {\n min: 0,\n max: 0,\n };\n }\n if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(values[0])) {\n var tmp = [];\n for (var i = 0; i < values.length; i++) {\n tmp = tmp.concat(values[i]);\n }\n filterValues = tmp;\n }\n var max = Object(_max__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(filterValues);\n var min = Object(_min__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(filterValues);\n return {\n min: min,\n max: max,\n };\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (getRange);\n//# sourceMappingURL=get-range.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/get-range.js?");
|
|
372
|
-
|
|
373
|
-
/***/ }),
|
|
374
|
-
|
|
375
|
-
/***/ "../../node_modules/@antv/util/esm/get-type.js":
|
|
376
|
-
/*!********************************************************************************!*\
|
|
377
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/get-type.js ***!
|
|
378
|
-
\********************************************************************************/
|
|
379
|
-
/*! exports provided: default */
|
|
380
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
381
|
-
|
|
382
|
-
"use strict";
|
|
383
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar toString = {}.toString;\nvar getType = function (value) {\n return toString.call(value).replace(/^\\[object /, '').replace(/]$/, '');\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (getType);\n//# sourceMappingURL=get-type.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/get-type.js?");
|
|
384
|
-
|
|
385
|
-
/***/ }),
|
|
386
|
-
|
|
387
|
-
/***/ "../../node_modules/@antv/util/esm/get-wrap-behavior.js":
|
|
388
|
-
/*!*****************************************************************************************!*\
|
|
389
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/get-wrap-behavior.js ***!
|
|
390
|
-
\*****************************************************************************************/
|
|
391
|
-
/*! exports provided: default */
|
|
392
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
393
|
-
|
|
394
|
-
"use strict";
|
|
395
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * 获取封装的事件\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction getWrapBehavior(obj, action) {\n return obj['_wrap_' + action];\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (getWrapBehavior);\n//# sourceMappingURL=get-wrap-behavior.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/get-wrap-behavior.js?");
|
|
396
|
-
|
|
397
|
-
/***/ }),
|
|
398
|
-
|
|
399
|
-
/***/ "../../node_modules/@antv/util/esm/get.js":
|
|
400
|
-
/*!***************************************************************************!*\
|
|
401
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/get.js ***!
|
|
402
|
-
\***************************************************************************/
|
|
403
|
-
/*! exports provided: default */
|
|
404
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
405
|
-
|
|
406
|
-
"use strict";
|
|
407
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-string */ \"../../node_modules/@antv/util/esm/is-string.js\");\n\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param key\n * @param defaultValue\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (obj, key, defaultValue) {\n var p = 0;\n var keyArr = Object(_is_string__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(key) ? key.split('.') : key;\n while (obj && p < keyArr.length) {\n obj = obj[keyArr[p++]];\n }\n return (obj === undefined || p < keyArr.length) ? defaultValue : obj;\n});\n//# sourceMappingURL=get.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/get.js?");
|
|
408
|
-
|
|
409
|
-
/***/ }),
|
|
410
|
-
|
|
411
|
-
/***/ "../../node_modules/@antv/util/esm/group-by.js":
|
|
412
|
-
/*!********************************************************************************!*\
|
|
413
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/group-by.js ***!
|
|
414
|
-
\********************************************************************************/
|
|
415
|
-
/*! exports provided: default */
|
|
416
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
417
|
-
|
|
418
|
-
"use strict";
|
|
419
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction groupBy(data, condition) {\n if (!condition || !Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(data)) {\n return {};\n }\n var result = {};\n // 兼容方法和 字符串的写法\n var predicate = Object(_is_function__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(condition) ? condition : function (item) { return item[condition]; };\n var key;\n for (var i = 0; i < data.length; i++) {\n var item = data[i];\n key = predicate(item);\n if (hasOwnProperty.call(result, key)) {\n result[key].push(item);\n }\n else {\n result[key] = [item];\n }\n }\n return result;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (groupBy);\n//# sourceMappingURL=group-by.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/group-by.js?");
|
|
420
|
-
|
|
421
|
-
/***/ }),
|
|
422
|
-
|
|
423
|
-
/***/ "../../node_modules/@antv/util/esm/group-to-map.js":
|
|
424
|
-
/*!************************************************************************************!*\
|
|
425
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/group-to-map.js ***!
|
|
426
|
-
\************************************************************************************/
|
|
427
|
-
/*! exports provided: default */
|
|
428
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
429
|
-
|
|
430
|
-
"use strict";
|
|
431
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return groupToMap; });\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n/* harmony import */ var _group_by__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./group-by */ \"../../node_modules/@antv/util/esm/group-by.js\");\n\n\n\n/**\n * 将数据分组成 map\n * @param data\n * @param condition\n */\nfunction groupToMap(data, condition) {\n if (!condition) {\n return {\n 0: data,\n };\n }\n if (!Object(_is_function__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(condition)) {\n // 如果是字符串,则按照 a*b 风格成数组\n var paramscondition_1 = Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(condition) ? condition : condition.replace(/\\s+/g, '').split('*');\n condition = function (row) {\n var unique = '_'; // 避免出现数字作为Key的情况,会进行按照数字的排序\n // 根据字段列表的值,拼接成 key\n for (var i = 0, l = paramscondition_1.length; i < l; i++) {\n unique += row[paramscondition_1[i]] && row[paramscondition_1[i]].toString();\n }\n return unique;\n };\n }\n return Object(_group_by__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(data, condition);\n}\n//# sourceMappingURL=group-to-map.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/group-to-map.js?");
|
|
432
|
-
|
|
433
|
-
/***/ }),
|
|
434
|
-
|
|
435
|
-
/***/ "../../node_modules/@antv/util/esm/group.js":
|
|
436
|
-
/*!*****************************************************************************!*\
|
|
437
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/group.js ***!
|
|
438
|
-
\*****************************************************************************/
|
|
439
|
-
/*! exports provided: default */
|
|
440
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
441
|
-
|
|
442
|
-
"use strict";
|
|
443
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _group_to_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./group-to-map */ \"../../node_modules/@antv/util/esm/group-to-map.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (data, condition) {\n if (!condition) {\n // 没有条件,则自身改成数组\n return [data];\n }\n var groups = Object(_group_to_map__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(data, condition);\n var array = [];\n for (var i in groups) {\n array.push(groups[i]);\n }\n return array;\n});\n//# sourceMappingURL=group.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/group.js?");
|
|
444
|
-
|
|
445
|
-
/***/ }),
|
|
446
|
-
|
|
447
|
-
/***/ "../../node_modules/@antv/util/esm/has-key.js":
|
|
448
|
-
/*!*******************************************************************************!*\
|
|
449
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/has-key.js ***!
|
|
450
|
-
\*******************************************************************************/
|
|
451
|
-
/*! exports provided: default */
|
|
452
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
453
|
-
|
|
454
|
-
"use strict";
|
|
455
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./has */ \"../../node_modules/@antv/util/esm/has.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_has__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n//# sourceMappingURL=has-key.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/has-key.js?");
|
|
456
|
-
|
|
457
|
-
/***/ }),
|
|
458
|
-
|
|
459
|
-
/***/ "../../node_modules/@antv/util/esm/has-value.js":
|
|
460
|
-
/*!*********************************************************************************!*\
|
|
461
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/has-value.js ***!
|
|
462
|
-
\*********************************************************************************/
|
|
463
|
-
/*! exports provided: default */
|
|
464
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
465
|
-
|
|
466
|
-
"use strict";
|
|
467
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contains */ \"../../node_modules/@antv/util/esm/contains.js\");\n/* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./values */ \"../../node_modules/@antv/util/esm/values.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (obj, value) { return Object(_contains__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Object(_values__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(obj), value); });\n//# sourceMappingURL=has-value.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/has-value.js?");
|
|
468
|
-
|
|
469
|
-
/***/ }),
|
|
470
|
-
|
|
471
|
-
/***/ "../../node_modules/@antv/util/esm/has.js":
|
|
472
|
-
/*!***************************************************************************!*\
|
|
473
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/has.js ***!
|
|
474
|
-
\***************************************************************************/
|
|
475
|
-
/*! exports provided: default */
|
|
476
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
477
|
-
|
|
478
|
-
"use strict";
|
|
479
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (obj, key) { return obj.hasOwnProperty(key); });\n//# sourceMappingURL=has.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/has.js?");
|
|
480
|
-
|
|
481
|
-
/***/ }),
|
|
482
|
-
|
|
483
|
-
/***/ "../../node_modules/@antv/util/esm/head.js":
|
|
484
|
-
/*!****************************************************************************!*\
|
|
485
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/head.js ***!
|
|
486
|
-
\****************************************************************************/
|
|
487
|
-
/*! exports provided: default */
|
|
488
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
489
|
-
|
|
490
|
-
"use strict";
|
|
491
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return head; });\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n\nfunction head(o) {\n if (Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(o)) {\n return o[0];\n }\n return undefined;\n}\n//# sourceMappingURL=head.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/head.js?");
|
|
492
|
-
|
|
493
|
-
/***/ }),
|
|
494
|
-
|
|
495
|
-
/***/ "../../node_modules/@antv/util/esm/identity.js":
|
|
496
|
-
/*!********************************************************************************!*\
|
|
497
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/identity.js ***!
|
|
498
|
-
\********************************************************************************/
|
|
499
|
-
/*! exports provided: default */
|
|
500
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
501
|
-
|
|
502
|
-
"use strict";
|
|
503
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (v) { return v; });\n//# sourceMappingURL=identity.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/identity.js?");
|
|
504
|
-
|
|
505
|
-
/***/ }),
|
|
506
|
-
|
|
507
|
-
/***/ "../../node_modules/@antv/util/esm/index-of.js":
|
|
508
|
-
/*!********************************************************************************!*\
|
|
509
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/index-of.js ***!
|
|
510
|
-
\********************************************************************************/
|
|
511
|
-
/*! exports provided: default */
|
|
512
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
513
|
-
|
|
514
|
-
"use strict";
|
|
515
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n\nvar indexOf = function (arr, obj) {\n if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n return -1;\n }\n var m = Array.prototype.indexOf;\n if (m) {\n return m.call(arr, obj);\n }\n var index = -1;\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] === obj) {\n index = i;\n break;\n }\n }\n return index;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (indexOf);\n//# sourceMappingURL=index-of.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/index-of.js?");
|
|
516
|
-
|
|
517
|
-
/***/ }),
|
|
518
|
-
|
|
519
|
-
/***/ "../../node_modules/@antv/util/esm/index.js":
|
|
520
|
-
/*!*****************************************************************************!*\
|
|
521
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/index.js ***!
|
|
522
|
-
\*****************************************************************************/
|
|
523
|
-
/*! exports provided: contains, includes, difference, find, findIndex, firstValue, flatten, flattenDeep, getRange, pull, pullAt, reduce, remove, sortBy, union, uniq, valuesOfKey, head, last, startsWith, endsWith, filter, every, some, group, groupBy, groupToMap, getWrapBehavior, wrapBehavior, number2color, parseRadius, clamp, fixedBase, isDecimal, isEven, isInteger, isNegative, isNumberEqual, isOdd, isPositive, max, maxBy, min, minBy, mod, toDegree, toInteger, toRadian, forIn, has, hasKey, hasValue, keys, isMatch, values, lowerCase, lowerFirst, substitute, upperCase, upperFirst, getType, isArguments, isArray, isArrayLike, isBoolean, isDate, isError, isFunction, isFinite, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isPrototype, isRegExp, isString, isType, isUndefined, isElement, requestAnimationFrame, clearAnimationFrame, augment, clone, debounce, memoize, deepMix, each, extend, indexOf, isEmpty, isEqual, isEqualWith, map, mapValues, mix, assign, get, set, pick, omit, throttle, toArray, toString, uniqueId, noop, identity, size, measureTextWidth, getEllipsisText, Cache */
|
|
524
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
525
|
-
|
|
526
|
-
"use strict";
|
|
527
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contains */ \"../../node_modules/@antv/util/esm/contains.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"contains\", function() { return _contains__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"includes\", function() { return _contains__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _difference__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./difference */ \"../../node_modules/@antv/util/esm/difference.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"difference\", function() { return _difference__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _find__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./find */ \"../../node_modules/@antv/util/esm/find.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"find\", function() { return _find__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _find_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./find-index */ \"../../node_modules/@antv/util/esm/find-index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findIndex\", function() { return _find_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _first_value__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./first-value */ \"../../node_modules/@antv/util/esm/first-value.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"firstValue\", function() { return _first_value__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _flatten__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./flatten */ \"../../node_modules/@antv/util/esm/flatten.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flatten\", function() { return _flatten__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _flatten_deep__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./flatten-deep */ \"../../node_modules/@antv/util/esm/flatten-deep.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flattenDeep\", function() { return _flatten_deep__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _get_range__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./get-range */ \"../../node_modules/@antv/util/esm/get-range.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getRange\", function() { return _get_range__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _pull__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./pull */ \"../../node_modules/@antv/util/esm/pull.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pull\", function() { return _pull__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _pull_at__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./pull-at */ \"../../node_modules/@antv/util/esm/pull-at.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pullAt\", function() { return _pull_at__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./reduce */ \"../../node_modules/@antv/util/esm/reduce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"reduce\", function() { return _reduce__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./remove */ \"../../node_modules/@antv/util/esm/remove.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"remove\", function() { return _remove__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _sort_by__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./sort-by */ \"../../node_modules/@antv/util/esm/sort-by.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortBy\", function() { return _sort_by__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _union__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./union */ \"../../node_modules/@antv/util/esm/union.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"union\", function() { return _union__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _uniq__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./uniq */ \"../../node_modules/@antv/util/esm/uniq.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uniq\", function() { return _uniq__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _values_of_key__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./values-of-key */ \"../../node_modules/@antv/util/esm/values-of-key.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"valuesOfKey\", function() { return _values_of_key__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _head__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./head */ \"../../node_modules/@antv/util/esm/head.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"head\", function() { return _head__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _last__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./last */ \"../../node_modules/@antv/util/esm/last.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"last\", function() { return _last__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _starts_with__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./starts-with */ \"../../node_modules/@antv/util/esm/starts-with.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"startsWith\", function() { return _starts_with__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _ends_with__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./ends-with */ \"../../node_modules/@antv/util/esm/ends-with.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"endsWith\", function() { return _ends_with__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./filter */ \"../../node_modules/@antv/util/esm/filter.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"filter\", function() { return _filter__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony import */ var _every__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./every */ \"../../node_modules/@antv/util/esm/every.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"every\", function() { return _every__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony import */ var _some__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./some */ \"../../node_modules/@antv/util/esm/some.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"some\", function() { return _some__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./group */ \"../../node_modules/@antv/util/esm/group.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"group\", function() { return _group__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony import */ var _group_by__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./group-by */ \"../../node_modules/@antv/util/esm/group-by.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groupBy\", function() { return _group_by__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony import */ var _group_to_map__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./group-to-map */ \"../../node_modules/@antv/util/esm/group-to-map.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"groupToMap\", function() { return _group_to_map__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony import */ var _get_wrap_behavior__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./get-wrap-behavior */ \"../../node_modules/@antv/util/esm/get-wrap-behavior.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getWrapBehavior\", function() { return _get_wrap_behavior__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony import */ var _wrap_behavior__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./wrap-behavior */ \"../../node_modules/@antv/util/esm/wrap-behavior.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"wrapBehavior\", function() { return _wrap_behavior__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony import */ var _number2color__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./number2color */ \"../../node_modules/@antv/util/esm/number2color.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"number2color\", function() { return _number2color__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony import */ var _parse_radius__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./parse-radius */ \"../../node_modules/@antv/util/esm/parse-radius.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"parseRadius\", function() { return _parse_radius__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony import */ var _clamp__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./clamp */ \"../../node_modules/@antv/util/esm/clamp.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"clamp\", function() { return _clamp__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony import */ var _fixed_base__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./fixed-base */ \"../../node_modules/@antv/util/esm/fixed-base.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fixedBase\", function() { return _fixed_base__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony import */ var _is_decimal__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./is-decimal */ \"../../node_modules/@antv/util/esm/is-decimal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isDecimal\", function() { return _is_decimal__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony import */ var _is_even__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./is-even */ \"../../node_modules/@antv/util/esm/is-even.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isEven\", function() { return _is_even__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony import */ var _is_integer__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./is-integer */ \"../../node_modules/@antv/util/esm/is-integer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isInteger\", function() { return _is_integer__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony import */ var _is_negative__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./is-negative */ \"../../node_modules/@antv/util/esm/is-negative.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isNegative\", function() { return _is_negative__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony import */ var _is_number_equal__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./is-number-equal */ \"../../node_modules/@antv/util/esm/is-number-equal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isNumberEqual\", function() { return _is_number_equal__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony import */ var _is_odd__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./is-odd */ \"../../node_modules/@antv/util/esm/is-odd.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isOdd\", function() { return _is_odd__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony import */ var _is_positive__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./is-positive */ \"../../node_modules/@antv/util/esm/is-positive.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isPositive\", function() { return _is_positive__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./max */ \"../../node_modules/@antv/util/esm/max.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return _max__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony import */ var _max_by__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./max-by */ \"../../node_modules/@antv/util/esm/max-by.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"maxBy\", function() { return _max_by__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./min */ \"../../node_modules/@antv/util/esm/min.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return _min__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* harmony import */ var _min_by__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./min-by */ \"../../node_modules/@antv/util/esm/min-by.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"minBy\", function() { return _min_by__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n/* harmony import */ var _mod__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./mod */ \"../../node_modules/@antv/util/esm/mod.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mod\", function() { return _mod__WEBPACK_IMPORTED_MODULE_43__[\"default\"]; });\n\n/* harmony import */ var _to_degree__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./to-degree */ \"../../node_modules/@antv/util/esm/to-degree.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toDegree\", function() { return _to_degree__WEBPACK_IMPORTED_MODULE_44__[\"default\"]; });\n\n/* harmony import */ var _to_integer__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./to-integer */ \"../../node_modules/@antv/util/esm/to-integer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toInteger\", function() { return _to_integer__WEBPACK_IMPORTED_MODULE_45__[\"default\"]; });\n\n/* harmony import */ var _to_radian__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./to-radian */ \"../../node_modules/@antv/util/esm/to-radian.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toRadian\", function() { return _to_radian__WEBPACK_IMPORTED_MODULE_46__[\"default\"]; });\n\n/* harmony import */ var _for_in__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./for-in */ \"../../node_modules/@antv/util/esm/for-in.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"forIn\", function() { return _for_in__WEBPACK_IMPORTED_MODULE_47__[\"default\"]; });\n\n/* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./has */ \"../../node_modules/@antv/util/esm/has.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"has\", function() { return _has__WEBPACK_IMPORTED_MODULE_48__[\"default\"]; });\n\n/* harmony import */ var _has_key__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./has-key */ \"../../node_modules/@antv/util/esm/has-key.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasKey\", function() { return _has_key__WEBPACK_IMPORTED_MODULE_49__[\"default\"]; });\n\n/* harmony import */ var _has_value__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./has-value */ \"../../node_modules/@antv/util/esm/has-value.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasValue\", function() { return _has_value__WEBPACK_IMPORTED_MODULE_50__[\"default\"]; });\n\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./keys */ \"../../node_modules/@antv/util/esm/keys.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"keys\", function() { return _keys__WEBPACK_IMPORTED_MODULE_51__[\"default\"]; });\n\n/* harmony import */ var _is_match__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./is-match */ \"../../node_modules/@antv/util/esm/is-match.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isMatch\", function() { return _is_match__WEBPACK_IMPORTED_MODULE_52__[\"default\"]; });\n\n/* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./values */ \"../../node_modules/@antv/util/esm/values.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"values\", function() { return _values__WEBPACK_IMPORTED_MODULE_53__[\"default\"]; });\n\n/* harmony import */ var _lower_case__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./lower-case */ \"../../node_modules/@antv/util/esm/lower-case.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lowerCase\", function() { return _lower_case__WEBPACK_IMPORTED_MODULE_54__[\"default\"]; });\n\n/* harmony import */ var _lower_first__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./lower-first */ \"../../node_modules/@antv/util/esm/lower-first.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lowerFirst\", function() { return _lower_first__WEBPACK_IMPORTED_MODULE_55__[\"default\"]; });\n\n/* harmony import */ var _substitute__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./substitute */ \"../../node_modules/@antv/util/esm/substitute.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"substitute\", function() { return _substitute__WEBPACK_IMPORTED_MODULE_56__[\"default\"]; });\n\n/* harmony import */ var _upper_case__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./upper-case */ \"../../node_modules/@antv/util/esm/upper-case.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"upperCase\", function() { return _upper_case__WEBPACK_IMPORTED_MODULE_57__[\"default\"]; });\n\n/* harmony import */ var _upper_first__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./upper-first */ \"../../node_modules/@antv/util/esm/upper-first.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"upperFirst\", function() { return _upper_first__WEBPACK_IMPORTED_MODULE_58__[\"default\"]; });\n\n/* harmony import */ var _get_type__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./get-type */ \"../../node_modules/@antv/util/esm/get-type.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getType\", function() { return _get_type__WEBPACK_IMPORTED_MODULE_59__[\"default\"]; });\n\n/* harmony import */ var _is_arguments__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./is-arguments */ \"../../node_modules/@antv/util/esm/is-arguments.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isArguments\", function() { return _is_arguments__WEBPACK_IMPORTED_MODULE_60__[\"default\"]; });\n\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isArray\", function() { return _is_array__WEBPACK_IMPORTED_MODULE_61__[\"default\"]; });\n\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isArrayLike\", function() { return _is_array_like__WEBPACK_IMPORTED_MODULE_62__[\"default\"]; });\n\n/* harmony import */ var _is_boolean__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./is-boolean */ \"../../node_modules/@antv/util/esm/is-boolean.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isBoolean\", function() { return _is_boolean__WEBPACK_IMPORTED_MODULE_63__[\"default\"]; });\n\n/* harmony import */ var _is_date__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./is-date */ \"../../node_modules/@antv/util/esm/is-date.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isDate\", function() { return _is_date__WEBPACK_IMPORTED_MODULE_64__[\"default\"]; });\n\n/* harmony import */ var _is_error__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./is-error */ \"../../node_modules/@antv/util/esm/is-error.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isError\", function() { return _is_error__WEBPACK_IMPORTED_MODULE_65__[\"default\"]; });\n\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isFunction\", function() { return _is_function__WEBPACK_IMPORTED_MODULE_66__[\"default\"]; });\n\n/* harmony import */ var _is_finite__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./is-finite */ \"../../node_modules/@antv/util/esm/is-finite.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isFinite\", function() { return _is_finite__WEBPACK_IMPORTED_MODULE_67__[\"default\"]; });\n\n/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./is-nil */ \"../../node_modules/@antv/util/esm/is-nil.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isNil\", function() { return _is_nil__WEBPACK_IMPORTED_MODULE_68__[\"default\"]; });\n\n/* harmony import */ var _is_null__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./is-null */ \"../../node_modules/@antv/util/esm/is-null.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isNull\", function() { return _is_null__WEBPACK_IMPORTED_MODULE_69__[\"default\"]; });\n\n/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./is-number */ \"../../node_modules/@antv/util/esm/is-number.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isNumber\", function() { return _is_number__WEBPACK_IMPORTED_MODULE_70__[\"default\"]; });\n\n/* harmony import */ var _is_object__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./is-object */ \"../../node_modules/@antv/util/esm/is-object.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isObject\", function() { return _is_object__WEBPACK_IMPORTED_MODULE_71__[\"default\"]; });\n\n/* harmony import */ var _is_object_like__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./is-object-like */ \"../../node_modules/@antv/util/esm/is-object-like.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isObjectLike\", function() { return _is_object_like__WEBPACK_IMPORTED_MODULE_72__[\"default\"]; });\n\n/* harmony import */ var _is_plain_object__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./is-plain-object */ \"../../node_modules/@antv/util/esm/is-plain-object.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isPlainObject\", function() { return _is_plain_object__WEBPACK_IMPORTED_MODULE_73__[\"default\"]; });\n\n/* harmony import */ var _is_prototype__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./is-prototype */ \"../../node_modules/@antv/util/esm/is-prototype.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isPrototype\", function() { return _is_prototype__WEBPACK_IMPORTED_MODULE_74__[\"default\"]; });\n\n/* harmony import */ var _is_reg_exp__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./is-reg-exp */ \"../../node_modules/@antv/util/esm/is-reg-exp.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isRegExp\", function() { return _is_reg_exp__WEBPACK_IMPORTED_MODULE_75__[\"default\"]; });\n\n/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./is-string */ \"../../node_modules/@antv/util/esm/is-string.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isString\", function() { return _is_string__WEBPACK_IMPORTED_MODULE_76__[\"default\"]; });\n\n/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./is-type */ \"../../node_modules/@antv/util/esm/is-type.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isType\", function() { return _is_type__WEBPACK_IMPORTED_MODULE_77__[\"default\"]; });\n\n/* harmony import */ var _is_undefined__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./is-undefined */ \"../../node_modules/@antv/util/esm/is-undefined.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isUndefined\", function() { return _is_undefined__WEBPACK_IMPORTED_MODULE_78__[\"default\"]; });\n\n/* harmony import */ var _is_element__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./is-element */ \"../../node_modules/@antv/util/esm/is-element.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isElement\", function() { return _is_element__WEBPACK_IMPORTED_MODULE_79__[\"default\"]; });\n\n/* harmony import */ var _request_animation_frame__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./request-animation-frame */ \"../../node_modules/@antv/util/esm/request-animation-frame.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"requestAnimationFrame\", function() { return _request_animation_frame__WEBPACK_IMPORTED_MODULE_80__[\"default\"]; });\n\n/* harmony import */ var _clear_animation_frame__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./clear-animation-frame */ \"../../node_modules/@antv/util/esm/clear-animation-frame.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"clearAnimationFrame\", function() { return _clear_animation_frame__WEBPACK_IMPORTED_MODULE_81__[\"default\"]; });\n\n/* harmony import */ var _augment__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./augment */ \"../../node_modules/@antv/util/esm/augment.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"augment\", function() { return _augment__WEBPACK_IMPORTED_MODULE_82__[\"default\"]; });\n\n/* harmony import */ var _clone__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./clone */ \"../../node_modules/@antv/util/esm/clone.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return _clone__WEBPACK_IMPORTED_MODULE_83__[\"default\"]; });\n\n/* harmony import */ var _debounce__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./debounce */ \"../../node_modules/@antv/util/esm/debounce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return _debounce__WEBPACK_IMPORTED_MODULE_84__[\"default\"]; });\n\n/* harmony import */ var _memoize__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./memoize */ \"../../node_modules/@antv/util/esm/memoize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"memoize\", function() { return _memoize__WEBPACK_IMPORTED_MODULE_85__[\"default\"]; });\n\n/* harmony import */ var _deep_mix__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./deep-mix */ \"../../node_modules/@antv/util/esm/deep-mix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deepMix\", function() { return _deep_mix__WEBPACK_IMPORTED_MODULE_86__[\"default\"]; });\n\n/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./each */ \"../../node_modules/@antv/util/esm/each.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"each\", function() { return _each__WEBPACK_IMPORTED_MODULE_87__[\"default\"]; });\n\n/* harmony import */ var _extend__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./extend */ \"../../node_modules/@antv/util/esm/extend.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return _extend__WEBPACK_IMPORTED_MODULE_88__[\"default\"]; });\n\n/* harmony import */ var _index_of__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./index-of */ \"../../node_modules/@antv/util/esm/index-of.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"indexOf\", function() { return _index_of__WEBPACK_IMPORTED_MODULE_89__[\"default\"]; });\n\n/* harmony import */ var _is_empty__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./is-empty */ \"../../node_modules/@antv/util/esm/is-empty.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isEmpty\", function() { return _is_empty__WEBPACK_IMPORTED_MODULE_90__[\"default\"]; });\n\n/* harmony import */ var _is_equal__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./is-equal */ \"../../node_modules/@antv/util/esm/is-equal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isEqual\", function() { return _is_equal__WEBPACK_IMPORTED_MODULE_91__[\"default\"]; });\n\n/* harmony import */ var _is_equal_with__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./is-equal-with */ \"../../node_modules/@antv/util/esm/is-equal-with.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isEqualWith\", function() { return _is_equal_with__WEBPACK_IMPORTED_MODULE_92__[\"default\"]; });\n\n/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./map */ \"../../node_modules/@antv/util/esm/map.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return _map__WEBPACK_IMPORTED_MODULE_93__[\"default\"]; });\n\n/* harmony import */ var _map_values__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./map-values */ \"../../node_modules/@antv/util/esm/map-values.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mapValues\", function() { return _map_values__WEBPACK_IMPORTED_MODULE_94__[\"default\"]; });\n\n/* harmony import */ var _mix__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./mix */ \"../../node_modules/@antv/util/esm/mix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mix\", function() { return _mix__WEBPACK_IMPORTED_MODULE_95__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"assign\", function() { return _mix__WEBPACK_IMPORTED_MODULE_95__[\"default\"]; });\n\n/* harmony import */ var _get__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./get */ \"../../node_modules/@antv/util/esm/get.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"get\", function() { return _get__WEBPACK_IMPORTED_MODULE_96__[\"default\"]; });\n\n/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./set */ \"../../node_modules/@antv/util/esm/set.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return _set__WEBPACK_IMPORTED_MODULE_97__[\"default\"]; });\n\n/* harmony import */ var _pick__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./pick */ \"../../node_modules/@antv/util/esm/pick.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pick\", function() { return _pick__WEBPACK_IMPORTED_MODULE_98__[\"default\"]; });\n\n/* harmony import */ var _omit__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./omit */ \"../../node_modules/@antv/util/esm/omit.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"omit\", function() { return _omit__WEBPACK_IMPORTED_MODULE_99__[\"default\"]; });\n\n/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./throttle */ \"../../node_modules/@antv/util/esm/throttle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"throttle\", function() { return _throttle__WEBPACK_IMPORTED_MODULE_100__[\"default\"]; });\n\n/* harmony import */ var _to_array__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./to-array */ \"../../node_modules/@antv/util/esm/to-array.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toArray\", function() { return _to_array__WEBPACK_IMPORTED_MODULE_101__[\"default\"]; });\n\n/* harmony import */ var _to_string__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./to-string */ \"../../node_modules/@antv/util/esm/to-string.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toString\", function() { return _to_string__WEBPACK_IMPORTED_MODULE_102__[\"default\"]; });\n\n/* harmony import */ var _unique_id__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./unique-id */ \"../../node_modules/@antv/util/esm/unique-id.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uniqueId\", function() { return _unique_id__WEBPACK_IMPORTED_MODULE_103__[\"default\"]; });\n\n/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./noop */ \"../../node_modules/@antv/util/esm/noop.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"noop\", function() { return _noop__WEBPACK_IMPORTED_MODULE_104__[\"default\"]; });\n\n/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./identity */ \"../../node_modules/@antv/util/esm/identity.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return _identity__WEBPACK_IMPORTED_MODULE_105__[\"default\"]; });\n\n/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./size */ \"../../node_modules/@antv/util/esm/size.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"size\", function() { return _size__WEBPACK_IMPORTED_MODULE_106__[\"default\"]; });\n\n/* harmony import */ var _measure_text_width__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./measure-text-width */ \"../../node_modules/@antv/util/esm/measure-text-width.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"measureTextWidth\", function() { return _measure_text_width__WEBPACK_IMPORTED_MODULE_107__[\"default\"]; });\n\n/* harmony import */ var _get_ellipsis_text__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./get-ellipsis-text */ \"../../node_modules/@antv/util/esm/get-ellipsis-text.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getEllipsisText\", function() { return _get_ellipsis_text__WEBPACK_IMPORTED_MODULE_108__[\"default\"]; });\n\n/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./cache */ \"../../node_modules/@antv/util/esm/cache.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Cache\", function() { return _cache__WEBPACK_IMPORTED_MODULE_109__[\"default\"]; });\n\n// array\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// event\n\n\n// format\n\n\n// math\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// object\n\n\n\n\n\n\n\n// string\n\n\n\n\n\n// type\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// other\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// text\n\n\n// 不知道为什么,需要把这个 export,不然 ts 会报类型错误\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/index.js?");
|
|
528
|
-
|
|
529
|
-
/***/ }),
|
|
530
|
-
|
|
531
|
-
/***/ "../../node_modules/@antv/util/esm/is-arguments.js":
|
|
532
|
-
/*!************************************************************************************!*\
|
|
533
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-arguments.js ***!
|
|
534
|
-
\************************************************************************************/
|
|
535
|
-
/*! exports provided: default */
|
|
536
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
537
|
-
|
|
538
|
-
"use strict";
|
|
539
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ \"../../node_modules/@antv/util/esm/is-type.js\");\n/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\n\nvar isArguments = function (value) {\n return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, 'Arguments');\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isArguments);\n//# sourceMappingURL=is-arguments.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-arguments.js?");
|
|
540
|
-
|
|
541
|
-
/***/ }),
|
|
542
|
-
|
|
543
|
-
/***/ "../../node_modules/@antv/util/esm/is-array-like.js":
|
|
544
|
-
/*!*************************************************************************************!*\
|
|
545
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-array-like.js ***!
|
|
546
|
-
\*************************************************************************************/
|
|
547
|
-
/*! exports provided: default */
|
|
548
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
549
|
-
|
|
550
|
-
"use strict";
|
|
551
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar isArrayLike = function (value) {\n /**\n * isArrayLike([1, 2, 3]) => true\n * isArrayLike(document.body.children) => true\n * isArrayLike('abc') => true\n * isArrayLike(Function) => false\n */\n return value !== null && typeof value !== 'function' && isFinite(value.length);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isArrayLike);\n//# sourceMappingURL=is-array-like.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-array-like.js?");
|
|
552
|
-
|
|
553
|
-
/***/ }),
|
|
554
|
-
|
|
555
|
-
/***/ "../../node_modules/@antv/util/esm/is-array.js":
|
|
556
|
-
/*!********************************************************************************!*\
|
|
557
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-array.js ***!
|
|
558
|
-
\********************************************************************************/
|
|
559
|
-
/*! exports provided: default */
|
|
560
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
561
|
-
|
|
562
|
-
"use strict";
|
|
563
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ \"../../node_modules/@antv/util/esm/is-type.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (value) {\n return Array.isArray ?\n Array.isArray(value) :\n Object(_is_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, 'Array');\n});\n//# sourceMappingURL=is-array.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-array.js?");
|
|
564
|
-
|
|
565
|
-
/***/ }),
|
|
566
|
-
|
|
567
|
-
/***/ "../../node_modules/@antv/util/esm/is-boolean.js":
|
|
568
|
-
/*!**********************************************************************************!*\
|
|
569
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-boolean.js ***!
|
|
570
|
-
\**********************************************************************************/
|
|
571
|
-
/*! exports provided: default */
|
|
572
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
573
|
-
|
|
574
|
-
"use strict";
|
|
575
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ \"../../node_modules/@antv/util/esm/is-type.js\");\n/**\n * 是否是布尔类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\n\nvar isBoolean = function (value) {\n return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, 'Boolean');\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isBoolean);\n//# sourceMappingURL=is-boolean.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-boolean.js?");
|
|
576
|
-
|
|
577
|
-
/***/ }),
|
|
578
|
-
|
|
579
|
-
/***/ "../../node_modules/@antv/util/esm/is-date.js":
|
|
580
|
-
/*!*******************************************************************************!*\
|
|
581
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-date.js ***!
|
|
582
|
-
\*******************************************************************************/
|
|
583
|
-
/*! exports provided: default */
|
|
584
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
585
|
-
|
|
586
|
-
"use strict";
|
|
587
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ \"../../node_modules/@antv/util/esm/is-type.js\");\n\nvar isDate = function (value) {\n return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, 'Date');\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isDate);\n//# sourceMappingURL=is-date.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-date.js?");
|
|
588
|
-
|
|
589
|
-
/***/ }),
|
|
590
|
-
|
|
591
|
-
/***/ "../../node_modules/@antv/util/esm/is-decimal.js":
|
|
592
|
-
/*!**********************************************************************************!*\
|
|
593
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-decimal.js ***!
|
|
594
|
-
\**********************************************************************************/
|
|
595
|
-
/*! exports provided: default */
|
|
596
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
597
|
-
|
|
598
|
-
"use strict";
|
|
599
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ \"../../node_modules/@antv/util/esm/is-number.js\");\n\nvar isDecimal = function (num) {\n return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(num) && num % 1 !== 0;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isDecimal);\n//# sourceMappingURL=is-decimal.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-decimal.js?");
|
|
600
|
-
|
|
601
|
-
/***/ }),
|
|
602
|
-
|
|
603
|
-
/***/ "../../node_modules/@antv/util/esm/is-element.js":
|
|
604
|
-
/*!**********************************************************************************!*\
|
|
605
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-element.js ***!
|
|
606
|
-
\**********************************************************************************/
|
|
607
|
-
/*! exports provided: default */
|
|
608
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
609
|
-
|
|
610
|
-
"use strict";
|
|
611
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * 判断是否HTML元素\n * @return {Boolean} 是否HTML元素\n */\nvar isElement = function (o) {\n return o instanceof Element || o instanceof HTMLDocument;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isElement);\n//# sourceMappingURL=is-element.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-element.js?");
|
|
612
|
-
|
|
613
|
-
/***/ }),
|
|
614
|
-
|
|
615
|
-
/***/ "../../node_modules/@antv/util/esm/is-empty.js":
|
|
616
|
-
/*!********************************************************************************!*\
|
|
617
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-empty.js ***!
|
|
618
|
-
\********************************************************************************/
|
|
619
|
-
/*! exports provided: default */
|
|
620
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
621
|
-
|
|
622
|
-
"use strict";
|
|
623
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ \"../../node_modules/@antv/util/esm/is-nil.js\");\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n/* harmony import */ var _get_type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-type */ \"../../node_modules/@antv/util/esm/get-type.js\");\n/* harmony import */ var _is_prototype__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./is-prototype */ \"../../node_modules/@antv/util/esm/is-prototype.js\");\n\n\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction isEmpty(value) {\n /**\n * isEmpty(null) => true\n * isEmpty() => true\n * isEmpty(true) => true\n * isEmpty(1) => true\n * isEmpty([1, 2, 3]) => false\n * isEmpty('abc') => false\n * isEmpty({ a: 1 }) => false\n */\n if (Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value)) {\n return true;\n }\n if (Object(_is_array_like__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(value)) {\n return !value.length;\n }\n var type = Object(_get_type__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(value);\n if (type === 'Map' || type === 'Set') {\n return !value.size;\n }\n if (Object(_is_prototype__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(value)) {\n return !Object.keys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (isEmpty);\n//# sourceMappingURL=is-empty.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-empty.js?");
|
|
624
|
-
|
|
625
|
-
/***/ }),
|
|
626
|
-
|
|
627
|
-
/***/ "../../node_modules/@antv/util/esm/is-equal-with.js":
|
|
628
|
-
/*!*************************************************************************************!*\
|
|
629
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-equal-with.js ***!
|
|
630
|
-
\*************************************************************************************/
|
|
631
|
-
/*! exports provided: default */
|
|
632
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
633
|
-
|
|
634
|
-
"use strict";
|
|
635
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n/* harmony import */ var _is_equal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-equal */ \"../../node_modules/@antv/util/esm/is-equal.js\");\n\n\n/**\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [fn] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * isEqualWith(array, other, customizer); // => true\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (value, other, fn) {\n if (!Object(_is_function__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(fn)) {\n return Object(_is_equal__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(value, other);\n }\n return !!fn(value, other);\n});\n//# sourceMappingURL=is-equal-with.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-equal-with.js?");
|
|
636
|
-
|
|
637
|
-
/***/ }),
|
|
638
|
-
|
|
639
|
-
/***/ "../../node_modules/@antv/util/esm/is-equal.js":
|
|
640
|
-
/*!********************************************************************************!*\
|
|
641
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-equal.js ***!
|
|
642
|
-
\********************************************************************************/
|
|
643
|
-
/*! exports provided: default */
|
|
644
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
645
|
-
|
|
646
|
-
"use strict";
|
|
647
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_object_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-object-like */ \"../../node_modules/@antv/util/esm/is-object-like.js\");\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-string */ \"../../node_modules/@antv/util/esm/is-string.js\");\n\n\n\nvar isEqual = function (value, other) {\n if (value === other) {\n return true;\n }\n if (!value || !other) {\n return false;\n }\n if (Object(_is_string__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(value) || Object(_is_string__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(other)) {\n return false;\n }\n if (Object(_is_array_like__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(value) || Object(_is_array_like__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(other)) {\n if (value.length !== other.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < value.length; i++) {\n rst = isEqual(value[i], other[i]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n if (Object(_is_object_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) || Object(_is_object_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(other)) {\n var valueKeys = Object.keys(value);\n var otherKeys = Object.keys(other);\n if (valueKeys.length !== otherKeys.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < valueKeys.length; i++) {\n rst = isEqual(value[valueKeys[i]], other[valueKeys[i]]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n return false;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isEqual);\n//# sourceMappingURL=is-equal.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-equal.js?");
|
|
648
|
-
|
|
649
|
-
/***/ }),
|
|
650
|
-
|
|
651
|
-
/***/ "../../node_modules/@antv/util/esm/is-error.js":
|
|
652
|
-
/*!********************************************************************************!*\
|
|
653
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-error.js ***!
|
|
654
|
-
\********************************************************************************/
|
|
655
|
-
/*! exports provided: default */
|
|
656
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
657
|
-
|
|
658
|
-
"use strict";
|
|
659
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ \"../../node_modules/@antv/util/esm/is-type.js\");\n/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\n\nvar isError = function (value) {\n return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, 'Error');\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isError);\n//# sourceMappingURL=is-error.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-error.js?");
|
|
660
|
-
|
|
661
|
-
/***/ }),
|
|
662
|
-
|
|
663
|
-
/***/ "../../node_modules/@antv/util/esm/is-even.js":
|
|
664
|
-
/*!*******************************************************************************!*\
|
|
665
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-even.js ***!
|
|
666
|
-
\*******************************************************************************/
|
|
667
|
-
/*! exports provided: default */
|
|
668
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
669
|
-
|
|
670
|
-
"use strict";
|
|
671
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ \"../../node_modules/@antv/util/esm/is-number.js\");\n\nvar isEven = function (num) {\n return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(num) && num % 2 === 0;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isEven);\n//# sourceMappingURL=is-even.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-even.js?");
|
|
672
|
-
|
|
673
|
-
/***/ }),
|
|
674
|
-
|
|
675
|
-
/***/ "../../node_modules/@antv/util/esm/is-finite.js":
|
|
676
|
-
/*!*********************************************************************************!*\
|
|
677
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-finite.js ***!
|
|
678
|
-
\*********************************************************************************/
|
|
679
|
-
/*! exports provided: default */
|
|
680
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
681
|
-
|
|
682
|
-
"use strict";
|
|
683
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ \"../../node_modules/@antv/util/esm/is-number.js\");\n/**\n * 判断是否为有限数\n * @return {Boolean}\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (value) {\n return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) && isFinite(value);\n});\n//# sourceMappingURL=is-finite.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-finite.js?");
|
|
684
|
-
|
|
685
|
-
/***/ }),
|
|
686
|
-
|
|
687
|
-
/***/ "../../node_modules/@antv/util/esm/is-function.js":
|
|
688
|
-
/*!***********************************************************************************!*\
|
|
689
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-function.js ***!
|
|
690
|
-
\***********************************************************************************/
|
|
691
|
-
/*! exports provided: default */
|
|
692
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
693
|
-
|
|
694
|
-
"use strict";
|
|
695
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ \"../../node_modules/@antv/util/esm/is-type.js\");\n/**\n * 是否为函数\n * @param {*} fn 对象\n * @return {Boolean} 是否函数\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (value) {\n return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, 'Function');\n});\n//# sourceMappingURL=is-function.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-function.js?");
|
|
696
|
-
|
|
697
|
-
/***/ }),
|
|
698
|
-
|
|
699
|
-
/***/ "../../node_modules/@antv/util/esm/is-integer.js":
|
|
700
|
-
/*!**********************************************************************************!*\
|
|
701
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-integer.js ***!
|
|
702
|
-
\**********************************************************************************/
|
|
703
|
-
/*! exports provided: default */
|
|
704
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
705
|
-
|
|
706
|
-
"use strict";
|
|
707
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ \"../../node_modules/@antv/util/esm/is-number.js\");\n\nvar isInteger = Number.isInteger ? Number.isInteger : function (num) {\n return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(num) && num % 1 === 0;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isInteger);\n//# sourceMappingURL=is-integer.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-integer.js?");
|
|
708
|
-
|
|
709
|
-
/***/ }),
|
|
710
|
-
|
|
711
|
-
/***/ "../../node_modules/@antv/util/esm/is-match.js":
|
|
712
|
-
/*!********************************************************************************!*\
|
|
713
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-match.js ***!
|
|
714
|
-
\********************************************************************************/
|
|
715
|
-
/*! exports provided: default */
|
|
716
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
717
|
-
|
|
718
|
-
"use strict";
|
|
719
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ \"../../node_modules/@antv/util/esm/is-nil.js\");\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys */ \"../../node_modules/@antv/util/esm/keys.js\");\n\n\nfunction isMatch(obj, attrs) {\n var _keys = Object(_keys__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(attrs);\n var length = _keys.length;\n if (Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(obj))\n return !length;\n for (var i = 0; i < length; i += 1) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) {\n return false;\n }\n }\n return true;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (isMatch);\n//# sourceMappingURL=is-match.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-match.js?");
|
|
720
|
-
|
|
721
|
-
/***/ }),
|
|
722
|
-
|
|
723
|
-
/***/ "../../node_modules/@antv/util/esm/is-negative.js":
|
|
724
|
-
/*!***********************************************************************************!*\
|
|
725
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-negative.js ***!
|
|
726
|
-
\***********************************************************************************/
|
|
727
|
-
/*! exports provided: default */
|
|
728
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
729
|
-
|
|
730
|
-
"use strict";
|
|
731
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ \"../../node_modules/@antv/util/esm/is-number.js\");\n\nvar isNegative = function (num) {\n return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(num) && num < 0;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isNegative);\n//# sourceMappingURL=is-negative.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-negative.js?");
|
|
732
|
-
|
|
733
|
-
/***/ }),
|
|
734
|
-
|
|
735
|
-
/***/ "../../node_modules/@antv/util/esm/is-nil.js":
|
|
736
|
-
/*!******************************************************************************!*\
|
|
737
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-nil.js ***!
|
|
738
|
-
\******************************************************************************/
|
|
739
|
-
/*! exports provided: default */
|
|
740
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
741
|
-
|
|
742
|
-
"use strict";
|
|
743
|
-
eval("__webpack_require__.r(__webpack_exports__);\n// isFinite,\nvar isNil = function (value) {\n /**\n * isNil(null) => true\n * isNil() => true\n */\n return value === null || value === undefined;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isNil);\n//# sourceMappingURL=is-nil.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-nil.js?");
|
|
744
|
-
|
|
745
|
-
/***/ }),
|
|
746
|
-
|
|
747
|
-
/***/ "../../node_modules/@antv/util/esm/is-null.js":
|
|
748
|
-
/*!*******************************************************************************!*\
|
|
749
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-null.js ***!
|
|
750
|
-
\*******************************************************************************/
|
|
751
|
-
/*! exports provided: default */
|
|
752
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
753
|
-
|
|
754
|
-
"use strict";
|
|
755
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar isNull = function (value) {\n return value === null;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isNull);\n//# sourceMappingURL=is-null.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-null.js?");
|
|
756
|
-
|
|
757
|
-
/***/ }),
|
|
758
|
-
|
|
759
|
-
/***/ "../../node_modules/@antv/util/esm/is-number-equal.js":
|
|
760
|
-
/*!***************************************************************************************!*\
|
|
761
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-number-equal.js ***!
|
|
762
|
-
\***************************************************************************************/
|
|
763
|
-
/*! exports provided: default */
|
|
764
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
765
|
-
|
|
766
|
-
"use strict";
|
|
767
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return isNumberEqual; });\nvar PRECISION = 0.00001; // numbers less than this is considered as 0\nfunction isNumberEqual(a, b, precision) {\n if (precision === void 0) { precision = PRECISION; }\n return Math.abs((a - b)) < precision;\n}\n;\n//# sourceMappingURL=is-number-equal.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-number-equal.js?");
|
|
768
|
-
|
|
769
|
-
/***/ }),
|
|
770
|
-
|
|
771
|
-
/***/ "../../node_modules/@antv/util/esm/is-number.js":
|
|
772
|
-
/*!*********************************************************************************!*\
|
|
773
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-number.js ***!
|
|
774
|
-
\*********************************************************************************/
|
|
775
|
-
/*! exports provided: default */
|
|
776
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
777
|
-
|
|
778
|
-
"use strict";
|
|
779
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ \"../../node_modules/@antv/util/esm/is-type.js\");\n/**\n * 判断是否数字\n * @return {Boolean} 是否数字\n */\n\nvar isNumber = function (value) {\n return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value, 'Number');\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isNumber);\n//# sourceMappingURL=is-number.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-number.js?");
|
|
780
|
-
|
|
781
|
-
/***/ }),
|
|
782
|
-
|
|
783
|
-
/***/ "../../node_modules/@antv/util/esm/is-object-like.js":
|
|
784
|
-
/*!**************************************************************************************!*\
|
|
785
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-object-like.js ***!
|
|
786
|
-
\**************************************************************************************/
|
|
787
|
-
/*! exports provided: default */
|
|
788
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
789
|
-
|
|
790
|
-
"use strict";
|
|
791
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar isObjectLike = function (value) {\n /**\n * isObjectLike({}) => true\n * isObjectLike([1, 2, 3]) => true\n * isObjectLike(Function) => false\n * isObjectLike(null) => false\n */\n return typeof value === 'object' && value !== null;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isObjectLike);\n//# sourceMappingURL=is-object-like.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-object-like.js?");
|
|
792
|
-
|
|
793
|
-
/***/ }),
|
|
794
|
-
|
|
795
|
-
/***/ "../../node_modules/@antv/util/esm/is-object.js":
|
|
796
|
-
/*!*********************************************************************************!*\
|
|
797
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-object.js ***!
|
|
798
|
-
\*********************************************************************************/
|
|
799
|
-
/*! exports provided: default */
|
|
800
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
801
|
-
|
|
802
|
-
"use strict";
|
|
803
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (value) {\n /**\n * isObject({}) => true\n * isObject([1, 2, 3]) => true\n * isObject(Function) => true\n * isObject(null) => false\n */\n var type = typeof value;\n return value !== null && type === 'object' || type === 'function';\n});\n//# sourceMappingURL=is-object.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-object.js?");
|
|
804
|
-
|
|
805
|
-
/***/ }),
|
|
806
|
-
|
|
807
|
-
/***/ "../../node_modules/@antv/util/esm/is-odd.js":
|
|
808
|
-
/*!******************************************************************************!*\
|
|
809
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-odd.js ***!
|
|
810
|
-
\******************************************************************************/
|
|
811
|
-
/*! exports provided: default */
|
|
812
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
813
|
-
|
|
814
|
-
"use strict";
|
|
815
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ \"../../node_modules/@antv/util/esm/is-number.js\");\n\nvar isOdd = function (num) {\n return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(num) && num % 2 !== 0;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isOdd);\n//# sourceMappingURL=is-odd.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-odd.js?");
|
|
816
|
-
|
|
817
|
-
/***/ }),
|
|
818
|
-
|
|
819
|
-
/***/ "../../node_modules/@antv/util/esm/is-plain-object.js":
|
|
820
|
-
/*!***************************************************************************************!*\
|
|
821
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-plain-object.js ***!
|
|
822
|
-
\***************************************************************************************/
|
|
823
|
-
/*! exports provided: default */
|
|
824
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
825
|
-
|
|
826
|
-
"use strict";
|
|
827
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_object_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-object-like */ \"../../node_modules/@antv/util/esm/is-object-like.js\");\n/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-type */ \"../../node_modules/@antv/util/esm/is-type.js\");\n\n\nvar isPlainObject = function (value) {\n /**\n * isObjectLike(new Foo) => false\n * isObjectLike([1, 2, 3]) => false\n * isObjectLike({ x: 0, y: 0 }) => true\n * isObjectLike(Object.create(null)) => true\n */\n if (!Object(_is_object_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) || !Object(_is_type__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(value, 'Object')) {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n var proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isPlainObject);\n//# sourceMappingURL=is-plain-object.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-plain-object.js?");
|
|
828
|
-
|
|
829
|
-
/***/ }),
|
|
830
|
-
|
|
831
|
-
/***/ "../../node_modules/@antv/util/esm/is-positive.js":
|
|
832
|
-
/*!***********************************************************************************!*\
|
|
833
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-positive.js ***!
|
|
834
|
-
\***********************************************************************************/
|
|
835
|
-
/*! exports provided: default */
|
|
836
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
837
|
-
|
|
838
|
-
"use strict";
|
|
839
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ \"../../node_modules/@antv/util/esm/is-number.js\");\n\nvar isPositive = function (num) {\n return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(num) && num > 0;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isPositive);\n//# sourceMappingURL=is-positive.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-positive.js?");
|
|
840
|
-
|
|
841
|
-
/***/ }),
|
|
842
|
-
|
|
843
|
-
/***/ "../../node_modules/@antv/util/esm/is-prototype.js":
|
|
844
|
-
/*!************************************************************************************!*\
|
|
845
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-prototype.js ***!
|
|
846
|
-
\************************************************************************************/
|
|
847
|
-
/*! exports provided: default */
|
|
848
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
849
|
-
|
|
850
|
-
"use strict";
|
|
851
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar objectProto = Object.prototype;\nvar isPrototype = function (value) {\n var Ctor = value && value.constructor;\n var proto = (typeof Ctor === 'function' && Ctor.prototype) || objectProto;\n return value === proto;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isPrototype);\n//# sourceMappingURL=is-prototype.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-prototype.js?");
|
|
852
|
-
|
|
853
|
-
/***/ }),
|
|
854
|
-
|
|
855
|
-
/***/ "../../node_modules/@antv/util/esm/is-reg-exp.js":
|
|
856
|
-
/*!**********************************************************************************!*\
|
|
857
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-reg-exp.js ***!
|
|
858
|
-
\**********************************************************************************/
|
|
859
|
-
/*! exports provided: default */
|
|
860
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
861
|
-
|
|
862
|
-
"use strict";
|
|
863
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ \"../../node_modules/@antv/util/esm/is-type.js\");\n\nvar isRegExp = function (str) {\n return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(str, 'RegExp');\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isRegExp);\n//# sourceMappingURL=is-reg-exp.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-reg-exp.js?");
|
|
864
|
-
|
|
865
|
-
/***/ }),
|
|
866
|
-
|
|
867
|
-
/***/ "../../node_modules/@antv/util/esm/is-string.js":
|
|
868
|
-
/*!*********************************************************************************!*\
|
|
869
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-string.js ***!
|
|
870
|
-
\*********************************************************************************/
|
|
871
|
-
/*! exports provided: default */
|
|
872
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
873
|
-
|
|
874
|
-
"use strict";
|
|
875
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ \"../../node_modules/@antv/util/esm/is-type.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (str) {\n return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(str, 'String');\n});\n//# sourceMappingURL=is-string.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-string.js?");
|
|
876
|
-
|
|
877
|
-
/***/ }),
|
|
878
|
-
|
|
879
|
-
/***/ "../../node_modules/@antv/util/esm/is-type.js":
|
|
880
|
-
/*!*******************************************************************************!*\
|
|
881
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-type.js ***!
|
|
882
|
-
\*******************************************************************************/
|
|
883
|
-
/*! exports provided: default */
|
|
884
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
885
|
-
|
|
886
|
-
"use strict";
|
|
887
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar toString = {}.toString;\nvar isType = function (value, type) { return toString.call(value) === '[object ' + type + ']'; };\n/* harmony default export */ __webpack_exports__[\"default\"] = (isType);\n//# sourceMappingURL=is-type.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-type.js?");
|
|
888
|
-
|
|
889
|
-
/***/ }),
|
|
890
|
-
|
|
891
|
-
/***/ "../../node_modules/@antv/util/esm/is-undefined.js":
|
|
892
|
-
/*!************************************************************************************!*\
|
|
893
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-undefined.js ***!
|
|
894
|
-
\************************************************************************************/
|
|
895
|
-
/*! exports provided: default */
|
|
896
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
897
|
-
|
|
898
|
-
"use strict";
|
|
899
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar isUndefined = function (value) {\n return value === undefined;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (isUndefined);\n//# sourceMappingURL=is-undefined.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/is-undefined.js?");
|
|
900
|
-
|
|
901
|
-
/***/ }),
|
|
902
|
-
|
|
903
|
-
/***/ "../../node_modules/@antv/util/esm/keys.js":
|
|
904
|
-
/*!****************************************************************************!*\
|
|
905
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/keys.js ***!
|
|
906
|
-
\****************************************************************************/
|
|
907
|
-
/*! exports provided: default */
|
|
908
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
909
|
-
|
|
910
|
-
"use strict";
|
|
911
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ \"../../node_modules/@antv/util/esm/each.js\");\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n\n\nvar keys = Object.keys ? function (obj) { return Object.keys(obj); } : function (obj) {\n var result = [];\n Object(_each__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(obj, function (value, key) {\n if (!(Object(_is_function__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(obj) && key === 'prototype')) {\n result.push(key);\n }\n });\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (keys);\n//# sourceMappingURL=keys.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/keys.js?");
|
|
912
|
-
|
|
913
|
-
/***/ }),
|
|
914
|
-
|
|
915
|
-
/***/ "../../node_modules/@antv/util/esm/last.js":
|
|
916
|
-
/*!****************************************************************************!*\
|
|
917
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/last.js ***!
|
|
918
|
-
\****************************************************************************/
|
|
919
|
-
/*! exports provided: default */
|
|
920
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
921
|
-
|
|
922
|
-
"use strict";
|
|
923
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return last; });\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n\nfunction last(o) {\n if (Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(o)) {\n var arr = o;\n return arr[arr.length - 1];\n }\n return undefined;\n}\n//# sourceMappingURL=last.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/last.js?");
|
|
924
|
-
|
|
925
|
-
/***/ }),
|
|
926
|
-
|
|
927
|
-
/***/ "../../node_modules/@antv/util/esm/lower-case.js":
|
|
928
|
-
/*!**********************************************************************************!*\
|
|
929
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/lower-case.js ***!
|
|
930
|
-
\**********************************************************************************/
|
|
931
|
-
/*! exports provided: default */
|
|
932
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
933
|
-
|
|
934
|
-
"use strict";
|
|
935
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./to-string */ \"../../node_modules/@antv/util/esm/to-string.js\");\n\nvar lowerCase = function (str) {\n return Object(_to_string__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(str).toLowerCase();\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (lowerCase);\n//# sourceMappingURL=lower-case.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/lower-case.js?");
|
|
936
|
-
|
|
937
|
-
/***/ }),
|
|
938
|
-
|
|
939
|
-
/***/ "../../node_modules/@antv/util/esm/lower-first.js":
|
|
940
|
-
/*!***********************************************************************************!*\
|
|
941
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/lower-first.js ***!
|
|
942
|
-
\***********************************************************************************/
|
|
943
|
-
/*! exports provided: default */
|
|
944
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
945
|
-
|
|
946
|
-
"use strict";
|
|
947
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./to-string */ \"../../node_modules/@antv/util/esm/to-string.js\");\n\nvar lowerFirst = function (value) {\n var str = Object(_to_string__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value);\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (lowerFirst);\n//# sourceMappingURL=lower-first.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/lower-first.js?");
|
|
948
|
-
|
|
949
|
-
/***/ }),
|
|
950
|
-
|
|
951
|
-
/***/ "../../node_modules/@antv/util/esm/map-values.js":
|
|
952
|
-
/*!**********************************************************************************!*\
|
|
953
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/map-values.js ***!
|
|
954
|
-
\**********************************************************************************/
|
|
955
|
-
/*! exports provided: default */
|
|
956
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
957
|
-
|
|
958
|
-
"use strict";
|
|
959
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ \"../../node_modules/@antv/util/esm/is-nil.js\");\n/* harmony import */ var _is_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-object */ \"../../node_modules/@antv/util/esm/is-object.js\");\n\n\nvar identity = function (v) { return v; };\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (object, func) {\n if (func === void 0) { func = identity; }\n var r = {};\n if (Object(_is_object__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object) && !Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(object)) {\n Object.keys(object).forEach(function (key) {\n // @ts-ignore\n r[key] = func(object[key], key);\n });\n }\n return r;\n});\n//# sourceMappingURL=map-values.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/map-values.js?");
|
|
960
|
-
|
|
961
|
-
/***/ }),
|
|
962
|
-
|
|
963
|
-
/***/ "../../node_modules/@antv/util/esm/map.js":
|
|
964
|
-
/*!***************************************************************************!*\
|
|
965
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/map.js ***!
|
|
966
|
-
\***************************************************************************/
|
|
967
|
-
/*! exports provided: default */
|
|
968
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
969
|
-
|
|
970
|
-
"use strict";
|
|
971
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n\nvar map = function (arr, func) {\n if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n // @ts-ignore\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n result.push(func(value, index));\n }\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (map);\n//# sourceMappingURL=map.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/map.js?");
|
|
972
|
-
|
|
973
|
-
/***/ }),
|
|
974
|
-
|
|
975
|
-
/***/ "../../node_modules/@antv/util/esm/max-by.js":
|
|
976
|
-
/*!******************************************************************************!*\
|
|
977
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/max-by.js ***!
|
|
978
|
-
\******************************************************************************/
|
|
979
|
-
/*! exports provided: default */
|
|
980
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
981
|
-
|
|
982
|
-
"use strict";
|
|
983
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n\n\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (arr, fn) {\n if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n return undefined;\n }\n var maxItem;\n var max = -Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = Object(_is_function__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(fn) ? fn(item) : item[fn];\n if (v > max) {\n maxItem = item;\n max = v;\n }\n }\n return maxItem;\n});\n//# sourceMappingURL=max-by.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/max-by.js?");
|
|
984
|
-
|
|
985
|
-
/***/ }),
|
|
986
|
-
|
|
987
|
-
/***/ "../../node_modules/@antv/util/esm/max.js":
|
|
988
|
-
/*!***************************************************************************!*\
|
|
989
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/max.js ***!
|
|
990
|
-
\***************************************************************************/
|
|
991
|
-
/*! exports provided: default */
|
|
992
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
993
|
-
|
|
994
|
-
"use strict";
|
|
995
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the maximum value.\n * @example\n *\n * max([1, 2]);\n * // => 2\n *\n * max([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * max(data);\n * // => 1250010\n * // Math.max(...data) will encounter \"Maximum call stack size exceeded\" error\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (arr) {\n if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.max(prev, curr);\n }, arr[0]);\n});\n//# sourceMappingURL=max.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/max.js?");
|
|
996
|
-
|
|
997
|
-
/***/ }),
|
|
998
|
-
|
|
999
|
-
/***/ "../../node_modules/@antv/util/esm/measure-text-width.js":
|
|
1000
|
-
/*!******************************************************************************************!*\
|
|
1001
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/measure-text-width.js ***!
|
|
1002
|
-
\******************************************************************************************/
|
|
1003
|
-
/*! exports provided: default */
|
|
1004
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1005
|
-
|
|
1006
|
-
"use strict";
|
|
1007
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n/* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./values */ \"../../node_modules/@antv/util/esm/values.js\");\n/* harmony import */ var _memoize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./memoize */ \"../../node_modules/@antv/util/esm/memoize.js\");\n/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./is-string */ \"../../node_modules/@antv/util/esm/is-string.js\");\n\n\n\n\nvar ctx;\n/**\n * 计算文本的宽度\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_memoize__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function (text, font) {\n if (font === void 0) { font = {}; }\n var fontSize = font.fontSize, fontFamily = font.fontFamily, fontWeight = font.fontWeight, fontStyle = font.fontStyle, fontVariant = font.fontVariant;\n if (!ctx) {\n ctx = document.createElement('canvas').getContext('2d');\n }\n ctx.font = [fontStyle, fontVariant, fontWeight, fontSize + \"px\", fontFamily].join(' ');\n return ctx.measureText(Object(_is_string__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(text) ? text : '').width;\n}, function (text, font) {\n if (font === void 0) { font = {}; }\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spreadArrays\"])([text], Object(_values__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(font)).join('');\n}));\n//# sourceMappingURL=measure-text-width.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/measure-text-width.js?");
|
|
1008
|
-
|
|
1009
|
-
/***/ }),
|
|
1010
|
-
|
|
1011
|
-
/***/ "../../node_modules/@antv/util/esm/memoize.js":
|
|
1012
|
-
/*!*******************************************************************************!*\
|
|
1013
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/memoize.js ***!
|
|
1014
|
-
\*******************************************************************************/
|
|
1015
|
-
/*! exports provided: default */
|
|
1016
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1017
|
-
|
|
1018
|
-
"use strict";
|
|
1019
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n\n/**\n * _.memoize(calColor);\n * _.memoize(calColor, (...args) => args[0]);\n * @param f\n * @param resolver\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (f, resolver) {\n if (!Object(_is_function__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(f)) {\n throw new TypeError('Expected a function');\n }\n var memoized = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // 使用方法构造 key,如果不存在 resolver,则直接取第一个参数作为 key\n var key = resolver ? resolver.apply(this, args) : args[0];\n var cache = memoized.cache;\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = f.apply(this, args);\n // 缓存起来\n cache.set(key, result);\n return result;\n };\n memoized.cache = new Map();\n return memoized;\n});\n//# sourceMappingURL=memoize.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/memoize.js?");
|
|
1020
|
-
|
|
1021
|
-
/***/ }),
|
|
1022
|
-
|
|
1023
|
-
/***/ "../../node_modules/@antv/util/esm/min-by.js":
|
|
1024
|
-
/*!******************************************************************************!*\
|
|
1025
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/min-by.js ***!
|
|
1026
|
-
\******************************************************************************/
|
|
1027
|
-
/*! exports provided: default */
|
|
1028
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1029
|
-
|
|
1030
|
-
"use strict";
|
|
1031
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n\n\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * minBy(objects, 'n');\n * // => { 'n': 1 }\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (arr, fn) {\n if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n return undefined;\n }\n var minItem;\n var min = Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = Object(_is_function__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(fn) ? fn(item) : item[fn];\n if (v < min) {\n minItem = item;\n min = v;\n }\n }\n return minItem;\n});\n//# sourceMappingURL=min-by.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/min-by.js?");
|
|
1032
|
-
|
|
1033
|
-
/***/ }),
|
|
1034
|
-
|
|
1035
|
-
/***/ "../../node_modules/@antv/util/esm/min.js":
|
|
1036
|
-
/*!***************************************************************************!*\
|
|
1037
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/min.js ***!
|
|
1038
|
-
\***************************************************************************/
|
|
1039
|
-
/*! exports provided: default */
|
|
1040
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1041
|
-
|
|
1042
|
-
"use strict";
|
|
1043
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the minimum value.\n * @example\n *\n * min([1, 2]);\n * // => 1\n *\n * min([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * min(data);\n * // => 1250010\n * // Math.min(...data) will encounter \"Maximum call stack size exceeded\" error\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (arr) {\n if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.min(prev, curr);\n }, arr[0]);\n});\n//# sourceMappingURL=min.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/min.js?");
|
|
1044
|
-
|
|
1045
|
-
/***/ }),
|
|
1046
|
-
|
|
1047
|
-
/***/ "../../node_modules/@antv/util/esm/mix.js":
|
|
1048
|
-
/*!***************************************************************************!*\
|
|
1049
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/mix.js ***!
|
|
1050
|
-
\***************************************************************************/
|
|
1051
|
-
/*! exports provided: default */
|
|
1052
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1053
|
-
|
|
1054
|
-
"use strict";
|
|
1055
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return mix; });\n// FIXME: Mutable param should be forbidden in static lang.\nfunction _mix(dist, obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) {\n dist[key] = obj[key];\n }\n }\n}\nfunction mix(dist, src1, src2, src3) {\n if (src1)\n _mix(dist, src1);\n if (src2)\n _mix(dist, src2);\n if (src3)\n _mix(dist, src3);\n return dist;\n}\n//# sourceMappingURL=mix.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/mix.js?");
|
|
1056
|
-
|
|
1057
|
-
/***/ }),
|
|
1058
|
-
|
|
1059
|
-
/***/ "../../node_modules/@antv/util/esm/mod.js":
|
|
1060
|
-
/*!***************************************************************************!*\
|
|
1061
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/mod.js ***!
|
|
1062
|
-
\***************************************************************************/
|
|
1063
|
-
/*! exports provided: default */
|
|
1064
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1065
|
-
|
|
1066
|
-
"use strict";
|
|
1067
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar mod = function (n, m) {\n return ((n % m) + m) % m;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (mod);\n//# sourceMappingURL=mod.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/mod.js?");
|
|
1068
|
-
|
|
1069
|
-
/***/ }),
|
|
1070
|
-
|
|
1071
|
-
/***/ "../../node_modules/@antv/util/esm/noop.js":
|
|
1072
|
-
/*!****************************************************************************!*\
|
|
1073
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/noop.js ***!
|
|
1074
|
-
\****************************************************************************/
|
|
1075
|
-
/*! exports provided: default */
|
|
1076
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1077
|
-
|
|
1078
|
-
"use strict";
|
|
1079
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () { });\n//# sourceMappingURL=noop.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/noop.js?");
|
|
1080
|
-
|
|
1081
|
-
/***/ }),
|
|
1082
|
-
|
|
1083
|
-
/***/ "../../node_modules/@antv/util/esm/number2color.js":
|
|
1084
|
-
/*!************************************************************************************!*\
|
|
1085
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/number2color.js ***!
|
|
1086
|
-
\************************************************************************************/
|
|
1087
|
-
/*! exports provided: default */
|
|
1088
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1089
|
-
|
|
1090
|
-
"use strict";
|
|
1091
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar numColorCache = {};\nfunction numberToColor(num) {\n // 增加缓存\n var color = numColorCache[num];\n if (!color) {\n var str = num.toString(16);\n for (var i = str.length; i < 6; i++) {\n str = '0' + str;\n }\n color = '#' + str;\n numColorCache[num] = color;\n }\n return color;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (numberToColor);\n//# sourceMappingURL=number2color.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/number2color.js?");
|
|
1092
|
-
|
|
1093
|
-
/***/ }),
|
|
1094
|
-
|
|
1095
|
-
/***/ "../../node_modules/@antv/util/esm/omit.js":
|
|
1096
|
-
/*!****************************************************************************!*\
|
|
1097
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/omit.js ***!
|
|
1098
|
-
\****************************************************************************/
|
|
1099
|
-
/*! exports provided: default */
|
|
1100
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1101
|
-
|
|
1102
|
-
"use strict";
|
|
1103
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ \"../../node_modules/@antv/util/esm/reduce.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (obj, keys) {\n return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(obj, function (r, curr, key) {\n if (!keys.includes(key)) {\n r[key] = curr;\n }\n return r;\n }, {});\n});\n//# sourceMappingURL=omit.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/omit.js?");
|
|
1104
|
-
|
|
1105
|
-
/***/ }),
|
|
1106
|
-
|
|
1107
|
-
/***/ "../../node_modules/@antv/util/esm/parse-radius.js":
|
|
1108
|
-
/*!************************************************************************************!*\
|
|
1109
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/parse-radius.js ***!
|
|
1110
|
-
\************************************************************************************/
|
|
1111
|
-
/*! exports provided: default */
|
|
1112
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1113
|
-
|
|
1114
|
-
"use strict";
|
|
1115
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n\nfunction parseRadius(radius) {\n var r1 = 0, r2 = 0, r3 = 0, r4 = 0;\n if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n }\n else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n }\n else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n }\n else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n }\n else {\n r1 = r2 = r3 = r4 = radius;\n }\n return {\n r1: r1,\n r2: r2,\n r3: r3,\n r4: r4\n };\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (parseRadius);\n//# sourceMappingURL=parse-radius.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/parse-radius.js?");
|
|
1116
|
-
|
|
1117
|
-
/***/ }),
|
|
1118
|
-
|
|
1119
|
-
/***/ "../../node_modules/@antv/util/esm/pick.js":
|
|
1120
|
-
/*!****************************************************************************!*\
|
|
1121
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/pick.js ***!
|
|
1122
|
-
\****************************************************************************/
|
|
1123
|
-
/*! exports provided: default */
|
|
1124
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1125
|
-
|
|
1126
|
-
"use strict";
|
|
1127
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ \"../../node_modules/@antv/util/esm/each.js\");\n/* harmony import */ var _is_plain_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-plain-object */ \"../../node_modules/@antv/util/esm/is-plain-object.js\");\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (object, keys) {\n if (object === null || !Object(_is_plain_object__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(object)) {\n return {};\n }\n var result = {};\n Object(_each__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(keys, function (key) {\n if (hasOwnProperty.call(object, key)) {\n result[key] = object[key];\n }\n });\n return result;\n});\n//# sourceMappingURL=pick.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/pick.js?");
|
|
1128
|
-
|
|
1129
|
-
/***/ }),
|
|
1130
|
-
|
|
1131
|
-
/***/ "../../node_modules/@antv/util/esm/pull-at.js":
|
|
1132
|
-
/*!*******************************************************************************!*\
|
|
1133
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/pull-at.js ***!
|
|
1134
|
-
\*******************************************************************************/
|
|
1135
|
-
/*! exports provided: default */
|
|
1136
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1137
|
-
|
|
1138
|
-
"use strict";
|
|
1139
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n\nvar splice = Array.prototype.splice;\nvar pullAt = function pullAt(arr, indexes) {\n if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n return [];\n }\n var length = arr ? indexes.length : 0;\n var last = length - 1;\n while (length--) {\n var previous = void 0;\n var index = indexes[length];\n if (length === last || index !== previous) {\n previous = index;\n splice.call(arr, index, 1);\n }\n }\n return arr;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (pullAt);\n//# sourceMappingURL=pull-at.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/pull-at.js?");
|
|
1140
|
-
|
|
1141
|
-
/***/ }),
|
|
1142
|
-
|
|
1143
|
-
/***/ "../../node_modules/@antv/util/esm/pull.js":
|
|
1144
|
-
/*!****************************************************************************!*\
|
|
1145
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/pull.js ***!
|
|
1146
|
-
\****************************************************************************/
|
|
1147
|
-
/*! exports provided: default */
|
|
1148
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1149
|
-
|
|
1150
|
-
"use strict";
|
|
1151
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar arrPrototype = Array.prototype;\nvar splice = arrPrototype.splice;\nvar indexOf = arrPrototype.indexOf;\nvar pull = function (arr) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n var fromIndex = -1;\n while ((fromIndex = indexOf.call(arr, value)) > -1) {\n splice.call(arr, fromIndex, 1);\n }\n }\n return arr;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (pull);\n//# sourceMappingURL=pull.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/pull.js?");
|
|
1152
|
-
|
|
1153
|
-
/***/ }),
|
|
1154
|
-
|
|
1155
|
-
/***/ "../../node_modules/@antv/util/esm/reduce.js":
|
|
1156
|
-
/*!******************************************************************************!*\
|
|
1157
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/reduce.js ***!
|
|
1158
|
-
\******************************************************************************/
|
|
1159
|
-
/*! exports provided: default */
|
|
1160
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1161
|
-
|
|
1162
|
-
"use strict";
|
|
1163
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ \"../../node_modules/@antv/util/esm/each.js\");\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_plain_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-plain-object */ \"../../node_modules/@antv/util/esm/is-plain-object.js\");\n\n\n\nvar reduce = function (arr, fn, init) {\n if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr) && !Object(_is_plain_object__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(arr)) {\n return arr;\n }\n var result = init;\n Object(_each__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr, function (data, i) {\n result = fn(result, data, i);\n });\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (reduce);\n//# sourceMappingURL=reduce.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/reduce.js?");
|
|
1164
|
-
|
|
1165
|
-
/***/ }),
|
|
1166
|
-
|
|
1167
|
-
/***/ "../../node_modules/@antv/util/esm/remove.js":
|
|
1168
|
-
/*!******************************************************************************!*\
|
|
1169
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/remove.js ***!
|
|
1170
|
-
\******************************************************************************/
|
|
1171
|
-
/*! exports provided: default */
|
|
1172
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1173
|
-
|
|
1174
|
-
"use strict";
|
|
1175
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n/* harmony import */ var _pull_at__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pull-at */ \"../../node_modules/@antv/util/esm/pull-at.js\");\n\n\nvar remove = function (arr, predicate) {\n /**\n * const arr = [1, 2, 3, 4]\n * const evens = remove(arr, n => n % 2 == 0)\n * console.log(arr) // => [1, 3]\n * console.log(evens) // => [2, 4]\n */\n var result = [];\n if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr)) {\n return result;\n }\n var i = -1;\n var indexes = [];\n var length = arr.length;\n while (++i < length) {\n var value = arr[i];\n if (predicate(value, i, arr)) {\n result.push(value);\n indexes.push(i);\n }\n }\n Object(_pull_at__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr, indexes);\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (remove);\n//# sourceMappingURL=remove.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/remove.js?");
|
|
1176
|
-
|
|
1177
|
-
/***/ }),
|
|
1178
|
-
|
|
1179
|
-
/***/ "../../node_modules/@antv/util/esm/request-animation-frame.js":
|
|
1180
|
-
/*!***********************************************************************************************!*\
|
|
1181
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/request-animation-frame.js ***!
|
|
1182
|
-
\***********************************************************************************************/
|
|
1183
|
-
/*! exports provided: default */
|
|
1184
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1185
|
-
|
|
1186
|
-
"use strict";
|
|
1187
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return requestAnimationFrame; });\nfunction requestAnimationFrame(fn) {\n var method = window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n // @ts-ignore\n window.mozRequestAnimationFrame ||\n // @ts-ignore\n window.msRequestAnimationFrame ||\n function (f) {\n return setTimeout(f, 16);\n };\n return method(fn);\n}\n;\n//# sourceMappingURL=request-animation-frame.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/request-animation-frame.js?");
|
|
1188
|
-
|
|
1189
|
-
/***/ }),
|
|
1190
|
-
|
|
1191
|
-
/***/ "../../node_modules/@antv/util/esm/set.js":
|
|
1192
|
-
/*!***************************************************************************!*\
|
|
1193
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/set.js ***!
|
|
1194
|
-
\***************************************************************************/
|
|
1195
|
-
/*! exports provided: default */
|
|
1196
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1197
|
-
|
|
1198
|
-
"use strict";
|
|
1199
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-object */ \"../../node_modules/@antv/util/esm/is-object.js\");\n/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ \"../../node_modules/@antv/util/esm/is-string.js\");\n/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-number */ \"../../node_modules/@antv/util/esm/is-number.js\");\n\n\n\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param path\n * @param value\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (obj, path, value) {\n var o = obj;\n var keyArr = Object(_is_string__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(path) ? path.split('.') : path;\n keyArr.forEach(function (key, idx) {\n // 不是最后一个\n if (idx < keyArr.length - 1) {\n if (!Object(_is_object__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(o[key])) {\n o[key] = Object(_is_number__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(keyArr[idx + 1]) ? [] : {};\n }\n o = o[key];\n }\n else {\n o[key] = value;\n }\n });\n return obj;\n});\n//# sourceMappingURL=set.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/set.js?");
|
|
1200
|
-
|
|
1201
|
-
/***/ }),
|
|
1202
|
-
|
|
1203
|
-
/***/ "../../node_modules/@antv/util/esm/size.js":
|
|
1204
|
-
/*!****************************************************************************!*\
|
|
1205
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/size.js ***!
|
|
1206
|
-
\****************************************************************************/
|
|
1207
|
-
/*! exports provided: default */
|
|
1208
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1209
|
-
|
|
1210
|
-
"use strict";
|
|
1211
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return size; });\n/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ \"../../node_modules/@antv/util/esm/is-nil.js\");\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n\n\nfunction size(o) {\n if (Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(o)) {\n return 0;\n }\n if (Object(_is_array_like__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(o)) {\n return o.length;\n }\n return Object.keys(o).length;\n}\n//# sourceMappingURL=size.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/size.js?");
|
|
1212
|
-
|
|
1213
|
-
/***/ }),
|
|
1214
|
-
|
|
1215
|
-
/***/ "../../node_modules/@antv/util/esm/some.js":
|
|
1216
|
-
/*!****************************************************************************!*\
|
|
1217
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/some.js ***!
|
|
1218
|
-
\****************************************************************************/
|
|
1219
|
-
/*! exports provided: default */
|
|
1220
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1221
|
-
|
|
1222
|
-
"use strict";
|
|
1223
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * 只要有一个满足条件就返回 true\n * @param arr\n * @param func\n */\nvar some = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (func(arr[i], i))\n return true;\n }\n return false;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (some);\n//# sourceMappingURL=some.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/some.js?");
|
|
1224
|
-
|
|
1225
|
-
/***/ }),
|
|
1226
|
-
|
|
1227
|
-
/***/ "../../node_modules/@antv/util/esm/sort-by.js":
|
|
1228
|
-
/*!*******************************************************************************!*\
|
|
1229
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/sort-by.js ***!
|
|
1230
|
-
\*******************************************************************************/
|
|
1231
|
-
/*! exports provided: default */
|
|
1232
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1233
|
-
|
|
1234
|
-
"use strict";
|
|
1235
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ \"../../node_modules/@antv/util/esm/is-string.js\");\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n\n\n\nfunction sortBy(arr, key) {\n var comparer;\n if (Object(_is_function__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(key)) {\n comparer = function (a, b) { return key(a) - key(b); };\n }\n else {\n var keys_1 = [];\n if (Object(_is_string__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(key)) {\n keys_1.push(key);\n }\n else if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(key)) {\n keys_1 = key;\n }\n comparer = function (a, b) {\n for (var i = 0; i < keys_1.length; i += 1) {\n var prop = keys_1[i];\n if (a[prop] > b[prop]) {\n return 1;\n }\n if (a[prop] < b[prop]) {\n return -1;\n }\n }\n return 0;\n };\n }\n arr.sort(comparer);\n return arr;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (sortBy);\n//# sourceMappingURL=sort-by.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/sort-by.js?");
|
|
1236
|
-
|
|
1237
|
-
/***/ }),
|
|
1238
|
-
|
|
1239
|
-
/***/ "../../node_modules/@antv/util/esm/starts-with.js":
|
|
1240
|
-
/*!***********************************************************************************!*\
|
|
1241
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/starts-with.js ***!
|
|
1242
|
-
\***********************************************************************************/
|
|
1243
|
-
/*! exports provided: default */
|
|
1244
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1245
|
-
|
|
1246
|
-
"use strict";
|
|
1247
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ \"../../node_modules/@antv/util/esm/is-string.js\");\n\n\nfunction startsWith(arr, e) {\n return (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr) || Object(_is_string__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr)) ? arr[0] === e : false;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (startsWith);\n//# sourceMappingURL=starts-with.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/starts-with.js?");
|
|
1248
|
-
|
|
1249
|
-
/***/ }),
|
|
1250
|
-
|
|
1251
|
-
/***/ "../../node_modules/@antv/util/esm/substitute.js":
|
|
1252
|
-
/*!**********************************************************************************!*\
|
|
1253
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/substitute.js ***!
|
|
1254
|
-
\**********************************************************************************/
|
|
1255
|
-
/*! exports provided: default */
|
|
1256
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1257
|
-
|
|
1258
|
-
"use strict";
|
|
1259
|
-
eval("__webpack_require__.r(__webpack_exports__);\nfunction substitute(str, o) {\n if (!str || !o) {\n return str;\n }\n return str.replace(/\\\\?\\{([^{}]+)\\}/g, function (match, name) {\n if (match.charAt(0) === '\\\\') {\n return match.slice(1);\n }\n return (o[name] === undefined) ? '' : o[name];\n });\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (substitute);\n//# sourceMappingURL=substitute.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/substitute.js?");
|
|
1260
|
-
|
|
1261
|
-
/***/ }),
|
|
1262
|
-
|
|
1263
|
-
/***/ "../../node_modules/@antv/util/esm/throttle.js":
|
|
1264
|
-
/*!********************************************************************************!*\
|
|
1265
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/throttle.js ***!
|
|
1266
|
-
\********************************************************************************/
|
|
1267
|
-
/*! exports provided: default */
|
|
1268
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1269
|
-
|
|
1270
|
-
"use strict";
|
|
1271
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options)\n options = {};\n var later = function () {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout)\n context = args = null;\n };\n var throttled = function () {\n var now = Date.now();\n if (!previous && options.leading === false)\n previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout)\n context = args = null;\n }\n else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n throttled.cancel = function () {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n return throttled;\n});\n//# sourceMappingURL=throttle.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/throttle.js?");
|
|
1272
|
-
|
|
1273
|
-
/***/ }),
|
|
1274
|
-
|
|
1275
|
-
/***/ "../../node_modules/@antv/util/esm/to-array.js":
|
|
1276
|
-
/*!********************************************************************************!*\
|
|
1277
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/to-array.js ***!
|
|
1278
|
-
\********************************************************************************/
|
|
1279
|
-
/*! exports provided: default */
|
|
1280
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1281
|
-
|
|
1282
|
-
"use strict";
|
|
1283
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ \"../../node_modules/@antv/util/esm/is-array-like.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (value) {\n return Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value) ? Array.prototype.slice.call(value) : [];\n});\n//# sourceMappingURL=to-array.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/to-array.js?");
|
|
1284
|
-
|
|
1285
|
-
/***/ }),
|
|
1286
|
-
|
|
1287
|
-
/***/ "../../node_modules/@antv/util/esm/to-degree.js":
|
|
1288
|
-
/*!*********************************************************************************!*\
|
|
1289
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/to-degree.js ***!
|
|
1290
|
-
\*********************************************************************************/
|
|
1291
|
-
/*! exports provided: default */
|
|
1292
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1293
|
-
|
|
1294
|
-
"use strict";
|
|
1295
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar DEGREE = 180 / Math.PI;\nvar toDegree = function (radian) {\n return DEGREE * radian;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (toDegree);\n//# sourceMappingURL=to-degree.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/to-degree.js?");
|
|
1296
|
-
|
|
1297
|
-
/***/ }),
|
|
1298
|
-
|
|
1299
|
-
/***/ "../../node_modules/@antv/util/esm/to-integer.js":
|
|
1300
|
-
/*!**********************************************************************************!*\
|
|
1301
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/to-integer.js ***!
|
|
1302
|
-
\**********************************************************************************/
|
|
1303
|
-
/*! exports provided: default */
|
|
1304
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1305
|
-
|
|
1306
|
-
"use strict";
|
|
1307
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (parseInt);\n//# sourceMappingURL=to-integer.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/to-integer.js?");
|
|
1308
|
-
|
|
1309
|
-
/***/ }),
|
|
1310
|
-
|
|
1311
|
-
/***/ "../../node_modules/@antv/util/esm/to-radian.js":
|
|
1312
|
-
/*!*********************************************************************************!*\
|
|
1313
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/to-radian.js ***!
|
|
1314
|
-
\*********************************************************************************/
|
|
1315
|
-
/*! exports provided: default */
|
|
1316
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1317
|
-
|
|
1318
|
-
"use strict";
|
|
1319
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar RADIAN = Math.PI / 180;\nvar toRadian = function (degree) {\n return RADIAN * degree;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (toRadian);\n//# sourceMappingURL=to-radian.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/to-radian.js?");
|
|
1320
|
-
|
|
1321
|
-
/***/ }),
|
|
1322
|
-
|
|
1323
|
-
/***/ "../../node_modules/@antv/util/esm/to-string.js":
|
|
1324
|
-
/*!*********************************************************************************!*\
|
|
1325
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/to-string.js ***!
|
|
1326
|
-
\*********************************************************************************/
|
|
1327
|
-
/*! exports provided: default */
|
|
1328
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1329
|
-
|
|
1330
|
-
"use strict";
|
|
1331
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ \"../../node_modules/@antv/util/esm/is-nil.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (value) {\n if (Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value))\n return '';\n return value.toString();\n});\n//# sourceMappingURL=to-string.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/to-string.js?");
|
|
1332
|
-
|
|
1333
|
-
/***/ }),
|
|
1334
|
-
|
|
1335
|
-
/***/ "../../node_modules/@antv/util/esm/union.js":
|
|
1336
|
-
/*!*****************************************************************************!*\
|
|
1337
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/union.js ***!
|
|
1338
|
-
\*****************************************************************************/
|
|
1339
|
-
/*! exports provided: default */
|
|
1340
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1341
|
-
|
|
1342
|
-
"use strict";
|
|
1343
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _uniq__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uniq */ \"../../node_modules/@antv/util/esm/uniq.js\");\n\nvar union = function () {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return Object(_uniq__WEBPACK_IMPORTED_MODULE_0__[\"default\"])([].concat.apply([], sources));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (union);\n//# sourceMappingURL=union.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/union.js?");
|
|
1344
|
-
|
|
1345
|
-
/***/ }),
|
|
1346
|
-
|
|
1347
|
-
/***/ "../../node_modules/@antv/util/esm/uniq.js":
|
|
1348
|
-
/*!****************************************************************************!*\
|
|
1349
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/uniq.js ***!
|
|
1350
|
-
\****************************************************************************/
|
|
1351
|
-
/*! exports provided: default */
|
|
1352
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1353
|
-
|
|
1354
|
-
"use strict";
|
|
1355
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return uniq; });\nfunction uniq(arr, cache) {\n if (cache === void 0) { cache = new Map(); }\n var r = [];\n if (Array.isArray(arr)) {\n for (var i = 0, len = arr.length; i < len; i++) {\n var item = arr[i];\n // 加一个 cache,提升性能\n if (!cache.has(item)) {\n r.push(item);\n cache.set(item, true);\n }\n }\n }\n return r;\n}\n//# sourceMappingURL=uniq.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/uniq.js?");
|
|
1356
|
-
|
|
1357
|
-
/***/ }),
|
|
1358
|
-
|
|
1359
|
-
/***/ "../../node_modules/@antv/util/esm/unique-id.js":
|
|
1360
|
-
/*!*********************************************************************************!*\
|
|
1361
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/unique-id.js ***!
|
|
1362
|
-
\*********************************************************************************/
|
|
1363
|
-
/*! exports provided: default */
|
|
1364
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1365
|
-
|
|
1366
|
-
"use strict";
|
|
1367
|
-
eval("__webpack_require__.r(__webpack_exports__);\nvar map = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (prefix) {\n prefix = prefix || 'g';\n if (!map[prefix]) {\n map[prefix] = 1;\n }\n else {\n map[prefix] += 1;\n }\n return prefix + map[prefix];\n});\n//# sourceMappingURL=unique-id.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/unique-id.js?");
|
|
1368
|
-
|
|
1369
|
-
/***/ }),
|
|
1370
|
-
|
|
1371
|
-
/***/ "../../node_modules/@antv/util/esm/upper-case.js":
|
|
1372
|
-
/*!**********************************************************************************!*\
|
|
1373
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/upper-case.js ***!
|
|
1374
|
-
\**********************************************************************************/
|
|
1375
|
-
/*! exports provided: default */
|
|
1376
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1377
|
-
|
|
1378
|
-
"use strict";
|
|
1379
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./to-string */ \"../../node_modules/@antv/util/esm/to-string.js\");\n\nvar upperCase = function (str) {\n return Object(_to_string__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(str).toUpperCase();\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (upperCase);\n//# sourceMappingURL=upper-case.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/upper-case.js?");
|
|
1380
|
-
|
|
1381
|
-
/***/ }),
|
|
1382
|
-
|
|
1383
|
-
/***/ "../../node_modules/@antv/util/esm/upper-first.js":
|
|
1384
|
-
/*!***********************************************************************************!*\
|
|
1385
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/upper-first.js ***!
|
|
1386
|
-
\***********************************************************************************/
|
|
1387
|
-
/*! exports provided: default */
|
|
1388
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1389
|
-
|
|
1390
|
-
"use strict";
|
|
1391
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./to-string */ \"../../node_modules/@antv/util/esm/to-string.js\");\n\nvar upperFirst = function (value) {\n var str = Object(_to_string__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value);\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (upperFirst);\n//# sourceMappingURL=upper-first.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/upper-first.js?");
|
|
1392
|
-
|
|
1393
|
-
/***/ }),
|
|
1394
|
-
|
|
1395
|
-
/***/ "../../node_modules/@antv/util/esm/values-of-key.js":
|
|
1396
|
-
/*!*************************************************************************************!*\
|
|
1397
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/values-of-key.js ***!
|
|
1398
|
-
\*************************************************************************************/
|
|
1399
|
-
/*! exports provided: default */
|
|
1400
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1401
|
-
|
|
1402
|
-
"use strict";
|
|
1403
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ \"../../node_modules/@antv/util/esm/is-array.js\");\n/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-nil */ \"../../node_modules/@antv/util/esm/is-nil.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (data, name) {\n var rst = [];\n var tmpMap = {};\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!Object(_is_nil__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(value)) {\n // flatten\n if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value)) {\n value = [value];\n }\n for (var j = 0; j < value.length; j++) {\n var val = value[j];\n // unique\n if (!tmpMap[val]) {\n rst.push(val);\n tmpMap[val] = true;\n }\n }\n }\n }\n return rst;\n});\n//# sourceMappingURL=values-of-key.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/values-of-key.js?");
|
|
1404
|
-
|
|
1405
|
-
/***/ }),
|
|
1406
|
-
|
|
1407
|
-
/***/ "../../node_modules/@antv/util/esm/values.js":
|
|
1408
|
-
/*!******************************************************************************!*\
|
|
1409
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/values.js ***!
|
|
1410
|
-
\******************************************************************************/
|
|
1411
|
-
/*! exports provided: default */
|
|
1412
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1413
|
-
|
|
1414
|
-
"use strict";
|
|
1415
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ \"../../node_modules/@antv/util/esm/each.js\");\n/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ \"../../node_modules/@antv/util/esm/is-function.js\");\n\n\n// @ts-ignore\nvar values = Object.values ? function (obj) { return Object.values(obj); } : function (obj) {\n var result = [];\n Object(_each__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(obj, function (value, key) {\n if (!(Object(_is_function__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(obj) && key === 'prototype')) {\n result.push(value);\n }\n });\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (values);\n//# sourceMappingURL=values.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/values.js?");
|
|
1416
|
-
|
|
1417
|
-
/***/ }),
|
|
1418
|
-
|
|
1419
|
-
/***/ "../../node_modules/@antv/util/esm/wrap-behavior.js":
|
|
1420
|
-
/*!*************************************************************************************!*\
|
|
1421
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/wrap-behavior.js ***!
|
|
1422
|
-
\*************************************************************************************/
|
|
1423
|
-
/*! exports provided: default */
|
|
1424
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1425
|
-
|
|
1426
|
-
"use strict";
|
|
1427
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * 封装事件,便于使用上下文this,和便于解除事件时使用\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction wrapBehavior(obj, action) {\n if (obj['_wrap_' + action]) {\n return obj['_wrap_' + action];\n }\n var method = function (e) {\n obj[action](e);\n };\n obj['_wrap_' + action] = method;\n return method;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (wrapBehavior);\n//# sourceMappingURL=wrap-behavior.js.map\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/@antv/util/esm/wrap-behavior.js?");
|
|
1428
|
-
|
|
1429
|
-
/***/ }),
|
|
1430
|
-
|
|
1431
|
-
/***/ "../../node_modules/gl-matrix/esm/common.js":
|
|
1432
|
-
/*!*****************************************************************************!*\
|
|
1433
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/common.js ***!
|
|
1434
|
-
\*****************************************************************************/
|
|
1435
|
-
/*! exports provided: EPSILON, ARRAY_TYPE, RANDOM, setMatrixArrayType, toRadian, equals */
|
|
1436
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1437
|
-
|
|
1438
|
-
"use strict";
|
|
1439
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EPSILON\", function() { return EPSILON; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ARRAY_TYPE\", function() { return ARRAY_TYPE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RANDOM\", function() { return RANDOM; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setMatrixArrayType\", function() { return setMatrixArrayType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toRadian\", function() { return toRadian; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equals\", function() { return equals; });\n/**\n * Common utilities\n * @module glMatrix\n */\n// Configuration Constants\nvar EPSILON = 0.000001;\nvar ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nvar RANDOM = Math.random;\n/**\n * Sets the type of array used when creating new vectors and matrices\n *\n * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array\n */\n\nfunction setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\nvar degree = Math.PI / 180;\n/**\n * Convert Degree To Radian\n *\n * @param {Number} a Angle in Degrees\n */\n\nfunction toRadian(a) {\n return a * degree;\n}\n/**\n * Tests whether or not the arguments have approximately the same value, within an absolute\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\n * than or equal to 1.0, and a relative tolerance is used for larger values)\n *\n * @param {Number} a The first number to test.\n * @param {Number} b The second number to test.\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\n */\n\nfunction equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\nif (!Math.hypot) Math.hypot = function () {\n var y = 0,\n i = arguments.length;\n\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n\n return Math.sqrt(y);\n};\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/common.js?");
|
|
1440
|
-
|
|
1441
|
-
/***/ }),
|
|
1442
|
-
|
|
1443
|
-
/***/ "../../node_modules/gl-matrix/esm/index.js":
|
|
1444
|
-
/*!****************************************************************************!*\
|
|
1445
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/index.js ***!
|
|
1446
|
-
\****************************************************************************/
|
|
1447
|
-
/*! exports provided: glMatrix, mat2, mat2d, mat3, mat4, quat, quat2, vec2, vec3, vec4 */
|
|
1448
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1449
|
-
|
|
1450
|
-
"use strict";
|
|
1451
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"../../node_modules/gl-matrix/esm/common.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"glMatrix\", function() { return _common_js__WEBPACK_IMPORTED_MODULE_0__; });\n/* harmony import */ var _mat2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mat2.js */ \"../../node_modules/gl-matrix/esm/mat2.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"mat2\", function() { return _mat2_js__WEBPACK_IMPORTED_MODULE_1__; });\n/* harmony import */ var _mat2d_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mat2d.js */ \"../../node_modules/gl-matrix/esm/mat2d.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"mat2d\", function() { return _mat2d_js__WEBPACK_IMPORTED_MODULE_2__; });\n/* harmony import */ var _mat3_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mat3.js */ \"../../node_modules/gl-matrix/esm/mat3.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"mat3\", function() { return _mat3_js__WEBPACK_IMPORTED_MODULE_3__; });\n/* harmony import */ var _mat4_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mat4.js */ \"../../node_modules/gl-matrix/esm/mat4.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"mat4\", function() { return _mat4_js__WEBPACK_IMPORTED_MODULE_4__; });\n/* harmony import */ var _quat_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./quat.js */ \"../../node_modules/gl-matrix/esm/quat.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"quat\", function() { return _quat_js__WEBPACK_IMPORTED_MODULE_5__; });\n/* harmony import */ var _quat2_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./quat2.js */ \"../../node_modules/gl-matrix/esm/quat2.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"quat2\", function() { return _quat2_js__WEBPACK_IMPORTED_MODULE_6__; });\n/* harmony import */ var _vec2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vec2.js */ \"../../node_modules/gl-matrix/esm/vec2.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"vec2\", function() { return _vec2_js__WEBPACK_IMPORTED_MODULE_7__; });\n/* harmony import */ var _vec3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./vec3.js */ \"../../node_modules/gl-matrix/esm/vec3.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"vec3\", function() { return _vec3_js__WEBPACK_IMPORTED_MODULE_8__; });\n/* harmony import */ var _vec4_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./vec4.js */ \"../../node_modules/gl-matrix/esm/vec4.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"vec4\", function() { return _vec4_js__WEBPACK_IMPORTED_MODULE_9__; });\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/index.js?");
|
|
1452
|
-
|
|
1453
|
-
/***/ }),
|
|
1454
|
-
|
|
1455
|
-
/***/ "../../node_modules/gl-matrix/esm/mat2.js":
|
|
1456
|
-
/*!***************************************************************************!*\
|
|
1457
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/mat2.js ***!
|
|
1458
|
-
\***************************************************************************/
|
|
1459
|
-
/*! exports provided: create, clone, copy, identity, fromValues, set, transpose, invert, adjoint, determinant, multiply, rotate, scale, fromRotation, fromScaling, str, frob, LDU, add, subtract, exactEquals, equals, multiplyScalar, multiplyScalarAndAdd, mul, sub */
|
|
1460
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1461
|
-
|
|
1462
|
-
"use strict";
|
|
1463
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return create; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return clone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromValues\", function() { return fromValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return transpose; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"invert\", function() { return invert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"adjoint\", function() { return adjoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"determinant\", function() { return determinant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiply\", function() { return multiply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotate\", function() { return rotate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scale\", function() { return scale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromRotation\", function() { return fromRotation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromScaling\", function() { return fromScaling; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"str\", function() { return str; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"frob\", function() { return frob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LDU\", function() { return LDU; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return add; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"subtract\", function() { return subtract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exactEquals\", function() { return exactEquals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equals\", function() { return equals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiplyScalar\", function() { return multiplyScalar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiplyScalarAndAdd\", function() { return multiplyScalarAndAdd; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mul\", function() { return mul; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sub\", function() { return sub; });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"../../node_modules/gl-matrix/esm/common.js\");\n\n/**\n * 2x2 Matrix\n * @module mat2\n */\n\n/**\n * Creates a new identity mat2\n *\n * @returns {mat2} a new 2x2 matrix\n */\n\nfunction create() {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](4);\n\n if (_common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"] != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n }\n\n out[0] = 1;\n out[3] = 1;\n return out;\n}\n/**\n * Creates a new mat2 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat2} a matrix to clone\n * @returns {mat2} a new 2x2 matrix\n */\n\nfunction clone(a) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Copy the values from one mat2 to another\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nfunction copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Set a mat2 to the identity matrix\n *\n * @param {mat2} out the receiving matrix\n * @returns {mat2} out\n */\n\nfunction identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n/**\n * Create a new mat2 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out A new 2x2 matrix\n */\n\nfunction fromValues(m00, m01, m10, m11) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](4);\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\n/**\n * Set the components of a mat2 to the given values\n *\n * @param {mat2} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out\n */\n\nfunction set(out, m00, m01, m10, m11) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\n/**\n * Transpose the values of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nfunction transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache\n // some values\n if (out === a) {\n var a1 = a[1];\n out[1] = a[2];\n out[2] = a1;\n } else {\n out[0] = a[0];\n out[1] = a[2];\n out[2] = a[1];\n out[3] = a[3];\n }\n\n return out;\n}\n/**\n * Inverts a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nfunction invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3]; // Calculate the determinant\n\n var det = a0 * a3 - a2 * a1;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = a3 * det;\n out[1] = -a1 * det;\n out[2] = -a2 * det;\n out[3] = a0 * det;\n return out;\n}\n/**\n * Calculates the adjugate of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nfunction adjoint(out, a) {\n // Caching this value is nessecary if out == a\n var a0 = a[0];\n out[0] = a[3];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a0;\n return out;\n}\n/**\n * Calculates the determinant of a mat2\n *\n * @param {ReadonlyMat2} a the source matrix\n * @returns {Number} determinant of a\n */\n\nfunction determinant(a) {\n return a[0] * a[3] - a[2] * a[1];\n}\n/**\n * Multiplies two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\n\nfunction multiply(out, a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n return out;\n}\n/**\n * Rotates a mat2 by the given angle\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\n\nfunction rotate(out, a, rad) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n}\n/**\n * Scales the mat2 by the dimensions in the given vec2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to rotate\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat2} out\n **/\n\nfunction scale(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n}\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.rotate(dest, dest, rad);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\n\nfunction fromRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.scale(dest, dest, vec);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat2} out\n */\n\nfunction fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n return out;\n}\n/**\n * Returns a string representation of a mat2\n *\n * @param {ReadonlyMat2} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nfunction str(a) {\n return \"mat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat2\n *\n * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nfunction frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3]);\n}\n/**\n * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\n * @param {ReadonlyMat2} L the lower triangular matrix\n * @param {ReadonlyMat2} D the diagonal matrix\n * @param {ReadonlyMat2} U the upper triangular matrix\n * @param {ReadonlyMat2} a the input matrix to factorize\n */\n\nfunction LDU(L, D, U, a) {\n L[2] = a[2] / a[0];\n U[0] = a[0];\n U[1] = a[1];\n U[3] = a[3] - L[2] * U[1];\n return [L, D, U];\n}\n/**\n * Adds two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\n\nfunction add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\n\nfunction subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat2} a The first matrix.\n * @param {ReadonlyMat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nfunction exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat2} a The first matrix.\n * @param {ReadonlyMat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nfunction equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat2} out\n */\n\nfunction multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n/**\n * Adds two mat2's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat2} out the receiving vector\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat2} out\n */\n\nfunction multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n/**\n * Alias for {@link mat2.multiply}\n * @function\n */\n\nvar mul = multiply;\n/**\n * Alias for {@link mat2.subtract}\n * @function\n */\n\nvar sub = subtract;\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/mat2.js?");
|
|
1464
|
-
|
|
1465
|
-
/***/ }),
|
|
1466
|
-
|
|
1467
|
-
/***/ "../../node_modules/gl-matrix/esm/mat2d.js":
|
|
1468
|
-
/*!****************************************************************************!*\
|
|
1469
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/mat2d.js ***!
|
|
1470
|
-
\****************************************************************************/
|
|
1471
|
-
/*! exports provided: create, clone, copy, identity, fromValues, set, invert, determinant, multiply, rotate, scale, translate, fromRotation, fromScaling, fromTranslation, str, frob, add, subtract, multiplyScalar, multiplyScalarAndAdd, exactEquals, equals, mul, sub */
|
|
1472
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1473
|
-
|
|
1474
|
-
"use strict";
|
|
1475
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return create; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return clone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromValues\", function() { return fromValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"invert\", function() { return invert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"determinant\", function() { return determinant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiply\", function() { return multiply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotate\", function() { return rotate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scale\", function() { return scale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"translate\", function() { return translate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromRotation\", function() { return fromRotation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromScaling\", function() { return fromScaling; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromTranslation\", function() { return fromTranslation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"str\", function() { return str; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"frob\", function() { return frob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return add; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"subtract\", function() { return subtract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiplyScalar\", function() { return multiplyScalar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiplyScalarAndAdd\", function() { return multiplyScalarAndAdd; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exactEquals\", function() { return exactEquals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equals\", function() { return equals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mul\", function() { return mul; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sub\", function() { return sub; });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"../../node_modules/gl-matrix/esm/common.js\");\n\n/**\n * 2x3 Matrix\n * @module mat2d\n * @description\n * A mat2d contains six elements defined as:\n * <pre>\n * [a, b,\n * c, d,\n * tx, ty]\n * </pre>\n * This is a short form for the 3x3 matrix:\n * <pre>\n * [a, b, 0,\n * c, d, 0,\n * tx, ty, 1]\n * </pre>\n * The last column is ignored so the array is shorter and operations are faster.\n */\n\n/**\n * Creates a new identity mat2d\n *\n * @returns {mat2d} a new 2x3 matrix\n */\n\nfunction create() {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](6);\n\n if (_common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"] != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[4] = 0;\n out[5] = 0;\n }\n\n out[0] = 1;\n out[3] = 1;\n return out;\n}\n/**\n * Creates a new mat2d initialized with values from an existing matrix\n *\n * @param {ReadonlyMat2d} a matrix to clone\n * @returns {mat2d} a new 2x3 matrix\n */\n\nfunction clone(a) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](6);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n}\n/**\n * Copy the values from one mat2d to another\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the source matrix\n * @returns {mat2d} out\n */\n\nfunction copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n}\n/**\n * Set a mat2d to the identity matrix\n *\n * @param {mat2d} out the receiving matrix\n * @returns {mat2d} out\n */\n\nfunction identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\n * Create a new mat2d with the given values\n *\n * @param {Number} a Component A (index 0)\n * @param {Number} b Component B (index 1)\n * @param {Number} c Component C (index 2)\n * @param {Number} d Component D (index 3)\n * @param {Number} tx Component TX (index 4)\n * @param {Number} ty Component TY (index 5)\n * @returns {mat2d} A new mat2d\n */\n\nfunction fromValues(a, b, c, d, tx, ty) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](6);\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n}\n/**\n * Set the components of a mat2d to the given values\n *\n * @param {mat2d} out the receiving matrix\n * @param {Number} a Component A (index 0)\n * @param {Number} b Component B (index 1)\n * @param {Number} c Component C (index 2)\n * @param {Number} d Component D (index 3)\n * @param {Number} tx Component TX (index 4)\n * @param {Number} ty Component TY (index 5)\n * @returns {mat2d} out\n */\n\nfunction set(out, a, b, c, d, tx, ty) {\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n}\n/**\n * Inverts a mat2d\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the source matrix\n * @returns {mat2d} out\n */\n\nfunction invert(out, a) {\n var aa = a[0],\n ab = a[1],\n ac = a[2],\n ad = a[3];\n var atx = a[4],\n aty = a[5];\n var det = aa * ad - ab * ac;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n}\n/**\n * Calculates the determinant of a mat2d\n *\n * @param {ReadonlyMat2d} a the source matrix\n * @returns {Number} determinant of a\n */\n\nfunction determinant(a) {\n return a[0] * a[3] - a[1] * a[2];\n}\n/**\n * Multiplies two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @returns {mat2d} out\n */\n\nfunction multiply(out, a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n out[4] = a0 * b4 + a2 * b5 + a4;\n out[5] = a1 * b4 + a3 * b5 + a5;\n return out;\n}\n/**\n * Rotates a mat2d by the given angle\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\n\nfunction rotate(out, a, rad) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n out[4] = a4;\n out[5] = a5;\n return out;\n}\n/**\n * Scales the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to translate\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat2d} out\n **/\n\nfunction scale(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n out[4] = a4;\n out[5] = a5;\n return out;\n}\n/**\n * Translates the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to translate\n * @param {ReadonlyVec2} v the vec2 to translate the matrix by\n * @returns {mat2d} out\n **/\n\nfunction translate(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = a0 * v0 + a2 * v1 + a4;\n out[5] = a1 * v0 + a3 * v1 + a5;\n return out;\n}\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.rotate(dest, dest, rad);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\n\nfunction fromRotation(out, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.scale(dest, dest, vec);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat2d} out\n */\n\nfunction fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.translate(dest, dest, vec);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {ReadonlyVec2} v Translation vector\n * @returns {mat2d} out\n */\n\nfunction fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = v[0];\n out[5] = v[1];\n return out;\n}\n/**\n * Returns a string representation of a mat2d\n *\n * @param {ReadonlyMat2d} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nfunction str(a) {\n return \"mat2d(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat2d\n *\n * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nfunction frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);\n}\n/**\n * Adds two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @returns {mat2d} out\n */\n\nfunction add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @returns {mat2d} out\n */\n\nfunction subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n return out;\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat2d} out\n */\n\nfunction multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n return out;\n}\n/**\n * Adds two mat2d's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat2d} out the receiving vector\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat2d} out\n */\n\nfunction multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat2d} a The first matrix.\n * @param {ReadonlyMat2d} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nfunction exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat2d} a The first matrix.\n * @param {ReadonlyMat2d} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nfunction equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5];\n return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a5), Math.abs(b5));\n}\n/**\n * Alias for {@link mat2d.multiply}\n * @function\n */\n\nvar mul = multiply;\n/**\n * Alias for {@link mat2d.subtract}\n * @function\n */\n\nvar sub = subtract;\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/mat2d.js?");
|
|
1476
|
-
|
|
1477
|
-
/***/ }),
|
|
1478
|
-
|
|
1479
|
-
/***/ "../../node_modules/gl-matrix/esm/mat3.js":
|
|
1480
|
-
/*!***************************************************************************!*\
|
|
1481
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/mat3.js ***!
|
|
1482
|
-
\***************************************************************************/
|
|
1483
|
-
/*! exports provided: create, fromMat4, clone, copy, fromValues, set, identity, transpose, invert, adjoint, determinant, multiply, translate, rotate, scale, fromTranslation, fromRotation, fromScaling, fromMat2d, fromQuat, normalFromMat4, projection, str, frob, add, subtract, multiplyScalar, multiplyScalarAndAdd, exactEquals, equals, mul, sub */
|
|
1484
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1485
|
-
|
|
1486
|
-
"use strict";
|
|
1487
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return create; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromMat4\", function() { return fromMat4; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return clone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromValues\", function() { return fromValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return transpose; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"invert\", function() { return invert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"adjoint\", function() { return adjoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"determinant\", function() { return determinant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiply\", function() { return multiply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"translate\", function() { return translate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotate\", function() { return rotate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scale\", function() { return scale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromTranslation\", function() { return fromTranslation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromRotation\", function() { return fromRotation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromScaling\", function() { return fromScaling; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromMat2d\", function() { return fromMat2d; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromQuat\", function() { return fromQuat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalFromMat4\", function() { return normalFromMat4; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"projection\", function() { return projection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"str\", function() { return str; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"frob\", function() { return frob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return add; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"subtract\", function() { return subtract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiplyScalar\", function() { return multiplyScalar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiplyScalarAndAdd\", function() { return multiplyScalarAndAdd; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exactEquals\", function() { return exactEquals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equals\", function() { return equals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mul\", function() { return mul; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sub\", function() { return sub; });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"../../node_modules/gl-matrix/esm/common.js\");\n\n/**\n * 3x3 Matrix\n * @module mat3\n */\n\n/**\n * Creates a new identity mat3\n *\n * @returns {mat3} a new 3x3 matrix\n */\n\nfunction create() {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](9);\n\n if (_common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"] != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n }\n\n out[0] = 1;\n out[4] = 1;\n out[8] = 1;\n return out;\n}\n/**\n * Copies the upper-left 3x3 values into the given mat3.\n *\n * @param {mat3} out the receiving 3x3 matrix\n * @param {ReadonlyMat4} a the source 4x4 matrix\n * @returns {mat3} out\n */\n\nfunction fromMat4(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n}\n/**\n * Creates a new mat3 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat3} a matrix to clone\n * @returns {mat3} a new 3x3 matrix\n */\n\nfunction clone(a) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\n * Copy the values from one mat3 to another\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nfunction copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\n * Create a new mat3 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} A new mat3\n */\n\nfunction fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](9);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\n * Set the components of a mat3 to the given values\n *\n * @param {mat3} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} out\n */\n\nfunction set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\n * Set a mat3 to the identity matrix\n *\n * @param {mat3} out the receiving matrix\n * @returns {mat3} out\n */\n\nfunction identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\n * Transpose the values of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nfunction transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n\n return out;\n}\n/**\n * Inverts a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nfunction invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20; // Calculate the determinant\n\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n}\n/**\n * Calculates the adjugate of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nfunction adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n out[0] = a11 * a22 - a12 * a21;\n out[1] = a02 * a21 - a01 * a22;\n out[2] = a01 * a12 - a02 * a11;\n out[3] = a12 * a20 - a10 * a22;\n out[4] = a00 * a22 - a02 * a20;\n out[5] = a02 * a10 - a00 * a12;\n out[6] = a10 * a21 - a11 * a20;\n out[7] = a01 * a20 - a00 * a21;\n out[8] = a00 * a11 - a01 * a10;\n return out;\n}\n/**\n * Calculates the determinant of a mat3\n *\n * @param {ReadonlyMat3} a the source matrix\n * @returns {Number} determinant of a\n */\n\nfunction determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n}\n/**\n * Multiplies two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\n\nfunction multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b00 = b[0],\n b01 = b[1],\n b02 = b[2];\n var b10 = b[3],\n b11 = b[4],\n b12 = b[5];\n var b20 = b[6],\n b21 = b[7],\n b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n}\n/**\n * Translate a mat3 by the given vector\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to translate\n * @param {ReadonlyVec2} v vector to translate by\n * @returns {mat3} out\n */\n\nfunction translate(out, a, v) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n x = v[0],\n y = v[1];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n}\n/**\n * Rotates a mat3 by the given angle\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\n\nfunction rotate(out, a, rad) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n}\n/**\n * Scales the mat3 by the dimensions in the given vec2\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to rotate\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat3} out\n **/\n\nfunction scale(out, a, v) {\n var x = v[0],\n y = v[1];\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.translate(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyVec2} v Translation vector\n * @returns {mat3} out\n */\n\nfunction fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = v[0];\n out[7] = v[1];\n out[8] = 1;\n return out;\n}\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.rotate(dest, dest, rad);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\n\nfunction fromRotation(out, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.scale(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat3} out\n */\n\nfunction fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = v[1];\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\n * Copies the values from a mat2d into a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to copy\n * @returns {mat3} out\n **/\n\nfunction fromMat2d(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n}\n/**\n * Calculates a 3x3 matrix from the given quaternion\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyQuat} q Quaternion to create matrix from\n *\n * @returns {mat3} out\n */\n\nfunction fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n return out;\n}\n/**\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from\n *\n * @returns {mat3} out\n */\n\nfunction normalFromMat4(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n return out;\n}\n/**\n * Generates a 2D projection matrix with the given bounds\n *\n * @param {mat3} out mat3 frustum matrix will be written into\n * @param {number} width Width of your gl context\n * @param {number} height Height of gl context\n * @returns {mat3} out\n */\n\nfunction projection(out, width, height) {\n out[0] = 2 / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = -2 / height;\n out[5] = 0;\n out[6] = -1;\n out[7] = 1;\n out[8] = 1;\n return out;\n}\n/**\n * Returns a string representation of a mat3\n *\n * @param {ReadonlyMat3} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nfunction str(a) {\n return \"mat3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat3\n *\n * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nfunction frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);\n}\n/**\n * Adds two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\n\nfunction add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\n\nfunction subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n return out;\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat3} out\n */\n\nfunction multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n return out;\n}\n/**\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat3} out the receiving vector\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat3} out\n */\n\nfunction multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat3} a The first matrix.\n * @param {ReadonlyMat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nfunction exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat3} a The first matrix.\n * @param {ReadonlyMat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nfunction equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7],\n a8 = a[8];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7],\n b8 = b[8];\n return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n}\n/**\n * Alias for {@link mat3.multiply}\n * @function\n */\n\nvar mul = multiply;\n/**\n * Alias for {@link mat3.subtract}\n * @function\n */\n\nvar sub = subtract;\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/mat3.js?");
|
|
1488
|
-
|
|
1489
|
-
/***/ }),
|
|
1490
|
-
|
|
1491
|
-
/***/ "../../node_modules/gl-matrix/esm/mat4.js":
|
|
1492
|
-
/*!***************************************************************************!*\
|
|
1493
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/mat4.js ***!
|
|
1494
|
-
\***************************************************************************/
|
|
1495
|
-
/*! exports provided: create, clone, copy, fromValues, set, identity, transpose, invert, adjoint, determinant, multiply, translate, scale, rotate, rotateX, rotateY, rotateZ, fromTranslation, fromScaling, fromRotation, fromXRotation, fromYRotation, fromZRotation, fromRotationTranslation, fromQuat2, getTranslation, getScaling, getRotation, fromRotationTranslationScale, fromRotationTranslationScaleOrigin, fromQuat, frustum, perspectiveNO, perspective, perspectiveZO, perspectiveFromFieldOfView, orthoNO, ortho, orthoZO, lookAt, targetTo, str, frob, add, subtract, multiplyScalar, multiplyScalarAndAdd, exactEquals, equals, mul, sub */
|
|
1496
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1497
|
-
|
|
1498
|
-
"use strict";
|
|
1499
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return create; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return clone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromValues\", function() { return fromValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transpose\", function() { return transpose; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"invert\", function() { return invert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"adjoint\", function() { return adjoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"determinant\", function() { return determinant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiply\", function() { return multiply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"translate\", function() { return translate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scale\", function() { return scale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotate\", function() { return rotate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateX\", function() { return rotateX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateY\", function() { return rotateY; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateZ\", function() { return rotateZ; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromTranslation\", function() { return fromTranslation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromScaling\", function() { return fromScaling; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromRotation\", function() { return fromRotation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromXRotation\", function() { return fromXRotation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromYRotation\", function() { return fromYRotation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromZRotation\", function() { return fromZRotation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromRotationTranslation\", function() { return fromRotationTranslation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromQuat2\", function() { return fromQuat2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTranslation\", function() { return getTranslation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getScaling\", function() { return getScaling; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getRotation\", function() { return getRotation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromRotationTranslationScale\", function() { return fromRotationTranslationScale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromRotationTranslationScaleOrigin\", function() { return fromRotationTranslationScaleOrigin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromQuat\", function() { return fromQuat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"frustum\", function() { return frustum; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"perspectiveNO\", function() { return perspectiveNO; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"perspective\", function() { return perspective; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"perspectiveZO\", function() { return perspectiveZO; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"perspectiveFromFieldOfView\", function() { return perspectiveFromFieldOfView; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orthoNO\", function() { return orthoNO; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ortho\", function() { return ortho; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orthoZO\", function() { return orthoZO; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lookAt\", function() { return lookAt; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"targetTo\", function() { return targetTo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"str\", function() { return str; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"frob\", function() { return frob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return add; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"subtract\", function() { return subtract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiplyScalar\", function() { return multiplyScalar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiplyScalarAndAdd\", function() { return multiplyScalarAndAdd; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exactEquals\", function() { return exactEquals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equals\", function() { return equals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mul\", function() { return mul; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sub\", function() { return sub; });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"../../node_modules/gl-matrix/esm/common.js\");\n\n/**\n * 4x4 Matrix<br>Format: column-major, when typed out it looks like row-major<br>The matrices are being post multiplied.\n * @module mat4\n */\n\n/**\n * Creates a new identity mat4\n *\n * @returns {mat4} a new 4x4 matrix\n */\n\nfunction create() {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](16);\n\n if (_common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"] != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\n\nfunction clone(a) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\n * Copy the values from one mat4 to another\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nfunction copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\n * Create a new mat4 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} A new mat4\n */\n\nfunction fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\n * Set the components of a mat4 to the given values\n *\n * @param {mat4} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} out\n */\n\nfunction set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\n\nfunction identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nfunction transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a12 = a[6],\n a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nfunction invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n/**\n * Calculates the adjugate of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nfunction adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n}\n/**\n * Calculates the determinant of a mat4\n *\n * @param {ReadonlyMat4} a the source matrix\n * @returns {Number} determinant of a\n */\n\nfunction determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\n/**\n * Multiplies two mat4s\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\n\nfunction multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15]; // Cache only the current line of the second matrix\n\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n/**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to translate\n * @param {ReadonlyVec3} v vector to translate by\n * @returns {mat4} out\n */\n\nfunction translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n/**\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to scale\n * @param {ReadonlyVec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\n\nfunction scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\n * Rotates a mat4 by the given angle around the given axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @returns {mat4} out\n */\n\nfunction rotate(out, a, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n\n if (len < _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"]) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nfunction rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n/**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nfunction rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n/**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nfunction rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyVec3} v Translation vector\n * @returns {mat4} out\n */\n\nfunction fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.scale(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyVec3} v Scaling vector\n * @returns {mat4} out\n */\n\nfunction fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a given angle around a given axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotate(dest, dest, rad, axis);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @returns {mat4} out\n */\n\nfunction fromRotation(out, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n\n if (len < _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"]) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from the given angle around the X axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateX(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nfunction fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from the given angle around the Y axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateY(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nfunction fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from the given angle around the Z axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateZ(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nfunction fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @returns {mat4} out\n */\n\nfunction fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\n * Creates a new mat4 from a dual quat.\n *\n * @param {mat4} out Matrix\n * @param {ReadonlyQuat2} a Dual Quaternion\n * @returns {mat4} mat4 receiving operation result\n */\n\nfunction fromQuat2(out, a) {\n var translation = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](3);\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n\n fromRotationTranslation(out, a, translation);\n return out;\n}\n/**\n * Returns the translation vector component of a transformation\n * matrix. If a matrix is built with fromRotationTranslation,\n * the returned vector will be the same as the translation vector\n * originally supplied.\n * @param {vec3} out Vector to receive translation component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\n\nfunction getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\n/**\n * Returns the scaling factor component of a transformation\n * matrix. If a matrix is built with fromRotationTranslationScale\n * with a normalized Quaternion paramter, the returned vector will be\n * the same as the scaling vector\n * originally supplied.\n * @param {vec3} out Vector to receive scaling factor component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\n\nfunction getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n}\n/**\n * Returns a quaternion representing the rotational component\n * of a transformation matrix. If a matrix is built with\n * fromRotationTranslation, the returned quaternion will be the\n * same as the quaternion originally supplied.\n * @param {quat} out Quaternion to receive the rotation component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {quat} out\n */\n\nfunction getRotation(out, mat) {\n var scaling = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n\n return out;\n}\n/**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @param {ReadonlyVec3} s Scaling vector\n * @returns {mat4} out\n */\n\nfunction fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * mat4.translate(dest, origin);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n * mat4.translate(dest, negativeOrigin);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @param {ReadonlyVec3} s Scaling vector\n * @param {ReadonlyVec3} o The origin vector around which to scale and rotate\n * @returns {mat4} out\n */\n\nfunction fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\n/**\n * Calculates a 4x4 matrix from the given quaternion\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyQuat} q Quaternion to create matrix from\n *\n * @returns {mat4} out\n */\n\nfunction fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Generates a frustum matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Number} left Left bound of the frustum\n * @param {Number} right Right bound of the frustum\n * @param {Number} bottom Bottom bound of the frustum\n * @param {Number} top Top bound of the frustum\n * @param {Number} near Near bound of the frustum\n * @param {Number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nfunction frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n/**\n * Generates a perspective projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],\n * which matches WebGL/OpenGL's clip volume.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\n\nfunction perspectiveNO(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n\n return out;\n}\n/**\n * Alias for {@link mat4.perspectiveNO}\n * @function\n */\n\nvar perspective = perspectiveNO;\n/**\n * Generates a perspective projection matrix suitable for WebGPU with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],\n * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\n\nfunction perspectiveZO(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = far * nf;\n out[14] = far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -near;\n }\n\n return out;\n}\n/**\n * Generates a perspective projection matrix with the given field of view.\n * This is primarily useful for generating projection matrices to be used\n * with the still experiemental WebVR API.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nfunction perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\n/**\n * Generates a orthogonal projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],\n * which matches WebGL/OpenGL's clip volume.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nfunction orthoNO(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n/**\n * Alias for {@link mat4.orthoNO}\n * @function\n */\n\nvar ortho = orthoNO;\n/**\n * Generates a orthogonal projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],\n * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nfunction orthoZO(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = near * nf;\n out[15] = 1;\n return out;\n}\n/**\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {ReadonlyVec3} eye Position of the viewer\n * @param {ReadonlyVec3} center Point the viewer is looking at\n * @param {ReadonlyVec3} up vec3 pointing up\n * @returns {mat4} out\n */\n\nfunction lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n\n if (Math.abs(eyex - centerx) < _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] && Math.abs(eyey - centery) < _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] && Math.abs(eyez - centerz) < _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"]) {\n return identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\n/**\n * Generates a matrix that makes something look at something else.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {ReadonlyVec3} eye Position of the viewer\n * @param {ReadonlyVec3} center Point the viewer is looking at\n * @param {ReadonlyVec3} up vec3 pointing up\n * @returns {mat4} out\n */\n\nfunction targetTo(out, eye, target, up) {\n var eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2];\n var z0 = eyex - target[0],\n z1 = eyey - target[1],\n z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n\n var x0 = upy * z2 - upz * z1,\n x1 = upz * z0 - upx * z2,\n x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n/**\n * Returns a string representation of a mat4\n *\n * @param {ReadonlyMat4} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nfunction str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat4\n *\n * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nfunction frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\n/**\n * Adds two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\n\nfunction add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\n\nfunction subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat4} out\n */\n\nfunction multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n/**\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat4} out the receiving vector\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat4} out\n */\n\nfunction multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat4} a The first matrix.\n * @param {ReadonlyMat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nfunction exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat4} a The first matrix.\n * @param {ReadonlyMat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nfunction equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var a8 = a[8],\n a9 = a[9],\n a10 = a[10],\n a11 = a[11];\n var a12 = a[12],\n a13 = a[13],\n a14 = a[14],\n a15 = a[15];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n var b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n var b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11];\n var b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n/**\n * Alias for {@link mat4.multiply}\n * @function\n */\n\nvar mul = multiply;\n/**\n * Alias for {@link mat4.subtract}\n * @function\n */\n\nvar sub = subtract;\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/mat4.js?");
|
|
1500
|
-
|
|
1501
|
-
/***/ }),
|
|
1502
|
-
|
|
1503
|
-
/***/ "../../node_modules/gl-matrix/esm/quat.js":
|
|
1504
|
-
/*!***************************************************************************!*\
|
|
1505
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/quat.js ***!
|
|
1506
|
-
\***************************************************************************/
|
|
1507
|
-
/*! exports provided: create, identity, setAxisAngle, getAxisAngle, getAngle, multiply, rotateX, rotateY, rotateZ, calculateW, exp, ln, pow, slerp, random, invert, conjugate, fromMat3, fromEuler, str, clone, fromValues, copy, set, add, mul, scale, dot, lerp, length, len, squaredLength, sqrLen, normalize, exactEquals, equals, rotationTo, sqlerp, setAxes */
|
|
1508
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1509
|
-
|
|
1510
|
-
"use strict";
|
|
1511
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return create; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setAxisAngle\", function() { return setAxisAngle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getAxisAngle\", function() { return getAxisAngle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getAngle\", function() { return getAngle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiply\", function() { return multiply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateX\", function() { return rotateX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateY\", function() { return rotateY; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateZ\", function() { return rotateZ; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calculateW\", function() { return calculateW; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exp\", function() { return exp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ln\", function() { return ln; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pow\", function() { return pow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slerp\", function() { return slerp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"random\", function() { return random; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"invert\", function() { return invert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conjugate\", function() { return conjugate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromMat3\", function() { return fromMat3; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromEuler\", function() { return fromEuler; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"str\", function() { return str; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return clone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromValues\", function() { return fromValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return add; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mul\", function() { return mul; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scale\", function() { return scale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dot\", function() { return dot; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lerp\", function() { return lerp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"length\", function() { return length; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"len\", function() { return len; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"squaredLength\", function() { return squaredLength; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrLen\", function() { return sqrLen; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalize\", function() { return normalize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exactEquals\", function() { return exactEquals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equals\", function() { return equals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotationTo\", function() { return rotationTo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqlerp\", function() { return sqlerp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setAxes\", function() { return setAxes; });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"../../node_modules/gl-matrix/esm/common.js\");\n/* harmony import */ var _mat3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mat3.js */ \"../../node_modules/gl-matrix/esm/mat3.js\");\n/* harmony import */ var _vec3_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vec3.js */ \"../../node_modules/gl-matrix/esm/vec3.js\");\n/* harmony import */ var _vec4_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./vec4.js */ \"../../node_modules/gl-matrix/esm/vec4.js\");\n\n\n\n\n/**\n * Quaternion\n * @module quat\n */\n\n/**\n * Creates a new identity quat\n *\n * @returns {quat} a new quaternion\n */\n\nfunction create() {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](4);\n\n if (_common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"] != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n out[3] = 1;\n return out;\n}\n/**\n * Set a quat to the identity quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\n\nfunction identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n/**\n * Sets a quat from the given angle and rotation axis,\n * then returns it.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyVec3} axis the axis around which to rotate\n * @param {Number} rad the angle in radians\n * @returns {quat} out\n **/\n\nfunction setAxisAngle(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n}\n/**\n * Gets the rotation axis and angle for a given\n * quaternion. If a quaternion is created with\n * setAxisAngle, this method will return the same\n * values as providied in the original parameter list\n * OR functionally equivalent values.\n * Example: The quaternion formed by axis [0, 0, 1] and\n * angle -90 is the same as the quaternion formed by\n * [0, 0, 1] and 270. This method favors the latter.\n * @param {vec3} out_axis Vector receiving the axis of rotation\n * @param {ReadonlyQuat} q Quaternion to be decomposed\n * @return {Number} Angle, in radians, of the rotation\n */\n\nfunction getAxisAngle(out_axis, q) {\n var rad = Math.acos(q[3]) * 2.0;\n var s = Math.sin(rad / 2.0);\n\n if (s > _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"]) {\n out_axis[0] = q[0] / s;\n out_axis[1] = q[1] / s;\n out_axis[2] = q[2] / s;\n } else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n out_axis[0] = 1;\n out_axis[1] = 0;\n out_axis[2] = 0;\n }\n\n return rad;\n}\n/**\n * Gets the angular distance between two unit quaternions\n *\n * @param {ReadonlyQuat} a Origin unit quaternion\n * @param {ReadonlyQuat} b Destination unit quaternion\n * @return {Number} Angle, in radians, between the two quaternions\n */\n\nfunction getAngle(a, b) {\n var dotproduct = dot(a, b);\n return Math.acos(2 * dotproduct * dotproduct - 1);\n}\n/**\n * Multiplies two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {quat} out\n */\n\nfunction multiply(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n/**\n * Rotates a quaternion by the given angle about the X axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n\nfunction rotateX(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n}\n/**\n * Rotates a quaternion by the given angle about the Y axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n\nfunction rotateY(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var by = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n}\n/**\n * Rotates a quaternion by the given angle about the Z axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n\nfunction rotateZ(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bz = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n}\n/**\n * Calculates the W component of a quat from the X, Y, and Z components.\n * Assumes that quaternion is 1 unit in length.\n * Any existing W component will be ignored.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate W component of\n * @returns {quat} out\n */\n\nfunction calculateW(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n}\n/**\n * Calculate the exponential of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @returns {quat} out\n */\n\nfunction exp(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var et = Math.exp(w);\n var s = r > 0 ? et * Math.sin(r) / r : 0;\n out[0] = x * s;\n out[1] = y * s;\n out[2] = z * s;\n out[3] = et * Math.cos(r);\n return out;\n}\n/**\n * Calculate the natural logarithm of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @returns {quat} out\n */\n\nfunction ln(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var t = r > 0 ? Math.atan2(r, w) / r : 0;\n out[0] = x * t;\n out[1] = y * t;\n out[2] = z * t;\n out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);\n return out;\n}\n/**\n * Calculate the scalar power of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @param {Number} b amount to scale the quaternion by\n * @returns {quat} out\n */\n\nfunction pow(out, a, b) {\n ln(out, a);\n scale(out, out, b);\n exp(out, out);\n return out;\n}\n/**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\n\nfunction slerp(out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n var omega, cosom, sinom, scale0, scale1; // calc cosine\n\n cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary)\n\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n } // calculate coefficients\n\n\n if (1.0 - cosom > _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"]) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n } // calculate final values\n\n\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n}\n/**\n * Generates a random unit quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\n\nfunction random(out) {\n // Implementation of http://planning.cs.uiuc.edu/node198.html\n // TODO: Calling random 3 times is probably not the fastest solution\n var u1 = _common_js__WEBPACK_IMPORTED_MODULE_0__[\"RANDOM\"]();\n var u2 = _common_js__WEBPACK_IMPORTED_MODULE_0__[\"RANDOM\"]();\n var u3 = _common_js__WEBPACK_IMPORTED_MODULE_0__[\"RANDOM\"]();\n var sqrt1MinusU1 = Math.sqrt(1 - u1);\n var sqrtU1 = Math.sqrt(u1);\n out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);\n out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);\n out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);\n out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);\n return out;\n}\n/**\n * Calculates the inverse of a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate inverse of\n * @returns {quat} out\n */\n\nfunction invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out[0] = -a0 * invDot;\n out[1] = -a1 * invDot;\n out[2] = -a2 * invDot;\n out[3] = a3 * invDot;\n return out;\n}\n/**\n * Calculates the conjugate of a quat\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate conjugate of\n * @returns {quat} out\n */\n\nfunction conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Creates a quaternion from the given 3x3 rotation matrix.\n *\n * NOTE: The resultant quaternion is not normalized, so you should be sure\n * to renormalize the quaternion yourself where necessary.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyMat3} m rotation matrix\n * @returns {quat} out\n * @function\n */\n\nfunction fromMat3(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if (fTrace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\n out[3] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot; // 1/(4w)\n\n out[0] = (m[5] - m[7]) * fRoot;\n out[1] = (m[6] - m[2]) * fRoot;\n out[2] = (m[1] - m[3]) * fRoot;\n } else {\n // |w| <= 1/2\n var i = 0;\n if (m[4] > m[0]) i = 1;\n if (m[8] > m[i * 3 + i]) i = 2;\n var j = (i + 1) % 3;\n var k = (i + 2) % 3;\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n }\n\n return out;\n}\n/**\n * Creates a quaternion from the given euler angle x, y, z.\n *\n * @param {quat} out the receiving quaternion\n * @param {x} Angle to rotate around X axis in degrees.\n * @param {y} Angle to rotate around Y axis in degrees.\n * @param {z} Angle to rotate around Z axis in degrees.\n * @returns {quat} out\n * @function\n */\n\nfunction fromEuler(out, x, y, z) {\n var halfToRad = 0.5 * Math.PI / 180.0;\n x *= halfToRad;\n y *= halfToRad;\n z *= halfToRad;\n var sx = Math.sin(x);\n var cx = Math.cos(x);\n var sy = Math.sin(y);\n var cy = Math.cos(y);\n var sz = Math.sin(z);\n var cz = Math.cos(z);\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n return out;\n}\n/**\n * Returns a string representation of a quatenion\n *\n * @param {ReadonlyQuat} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nfunction str(a) {\n return \"quat(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {ReadonlyQuat} a quaternion to clone\n * @returns {quat} a new quaternion\n * @function\n */\n\nvar clone = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"clone\"];\n/**\n * Creates a new quat initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} a new quaternion\n * @function\n */\n\nvar fromValues = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"fromValues\"];\n/**\n * Copy the values from one quat to another\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the source quaternion\n * @returns {quat} out\n * @function\n */\n\nvar copy = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"copy\"];\n/**\n * Set the components of a quat to the given values\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} out\n * @function\n */\n\nvar set = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"set\"];\n/**\n * Adds two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {quat} out\n * @function\n */\n\nvar add = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"add\"];\n/**\n * Alias for {@link quat.multiply}\n * @function\n */\n\nvar mul = multiply;\n/**\n * Scales a quat by a scalar number\n *\n * @param {quat} out the receiving vector\n * @param {ReadonlyQuat} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {quat} out\n * @function\n */\n\nvar scale = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"scale\"];\n/**\n * Calculates the dot product of two quat's\n *\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\n\nvar dot = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"dot\"];\n/**\n * Performs a linear interpolation between two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n * @function\n */\n\nvar lerp = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"lerp\"];\n/**\n * Calculates the length of a quat\n *\n * @param {ReadonlyQuat} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nvar length = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"length\"];\n/**\n * Alias for {@link quat.length}\n * @function\n */\n\nvar len = length;\n/**\n * Calculates the squared length of a quat\n *\n * @param {ReadonlyQuat} a vector to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\n\nvar squaredLength = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"squaredLength\"];\n/**\n * Alias for {@link quat.squaredLength}\n * @function\n */\n\nvar sqrLen = squaredLength;\n/**\n * Normalize a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quaternion to normalize\n * @returns {quat} out\n * @function\n */\n\nvar normalize = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"normalize\"];\n/**\n * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyQuat} a The first quaternion.\n * @param {ReadonlyQuat} b The second quaternion.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nvar exactEquals = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"exactEquals\"];\n/**\n * Returns whether or not the quaternions have approximately the same elements in the same position.\n *\n * @param {ReadonlyQuat} a The first vector.\n * @param {ReadonlyQuat} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nvar equals = _vec4_js__WEBPACK_IMPORTED_MODULE_3__[\"equals\"];\n/**\n * Sets a quaternion to represent the shortest rotation from one\n * vector to another.\n *\n * Both vectors are assumed to be unit length.\n *\n * @param {quat} out the receiving quaternion.\n * @param {ReadonlyVec3} a the initial vector\n * @param {ReadonlyVec3} b the destination vector\n * @returns {quat} out\n */\n\nvar rotationTo = function () {\n var tmpvec3 = _vec3_js__WEBPACK_IMPORTED_MODULE_2__[\"create\"]();\n var xUnitVec3 = _vec3_js__WEBPACK_IMPORTED_MODULE_2__[\"fromValues\"](1, 0, 0);\n var yUnitVec3 = _vec3_js__WEBPACK_IMPORTED_MODULE_2__[\"fromValues\"](0, 1, 0);\n return function (out, a, b) {\n var dot = _vec3_js__WEBPACK_IMPORTED_MODULE_2__[\"dot\"](a, b);\n\n if (dot < -0.999999) {\n _vec3_js__WEBPACK_IMPORTED_MODULE_2__[\"cross\"](tmpvec3, xUnitVec3, a);\n if (_vec3_js__WEBPACK_IMPORTED_MODULE_2__[\"len\"](tmpvec3) < 0.000001) _vec3_js__WEBPACK_IMPORTED_MODULE_2__[\"cross\"](tmpvec3, yUnitVec3, a);\n _vec3_js__WEBPACK_IMPORTED_MODULE_2__[\"normalize\"](tmpvec3, tmpvec3);\n setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n } else {\n _vec3_js__WEBPACK_IMPORTED_MODULE_2__[\"cross\"](tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return normalize(out, out);\n }\n };\n}();\n/**\n * Performs a spherical linear interpolation with two control points\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {ReadonlyQuat} c the third operand\n * @param {ReadonlyQuat} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\n\nvar sqlerp = function () {\n var temp1 = create();\n var temp2 = create();\n return function (out, a, b, c, d, t) {\n slerp(temp1, a, d, t);\n slerp(temp2, b, c, t);\n slerp(out, temp1, temp2, 2 * t * (1 - t));\n return out;\n };\n}();\n/**\n * Sets the specified quaternion with values corresponding to the given\n * axes. Each axis is a vec3 and is expected to be unit length and\n * perpendicular to all other specified axes.\n *\n * @param {ReadonlyVec3} view the vector representing the viewing direction\n * @param {ReadonlyVec3} right the vector representing the local \"right\" direction\n * @param {ReadonlyVec3} up the vector representing the local \"up\" direction\n * @returns {quat} out\n */\n\nvar setAxes = function () {\n var matr = _mat3_js__WEBPACK_IMPORTED_MODULE_1__[\"create\"]();\n return function (out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n return normalize(out, fromMat3(out, matr));\n };\n}();\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/quat.js?");
|
|
1512
|
-
|
|
1513
|
-
/***/ }),
|
|
1514
|
-
|
|
1515
|
-
/***/ "../../node_modules/gl-matrix/esm/quat2.js":
|
|
1516
|
-
/*!****************************************************************************!*\
|
|
1517
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/quat2.js ***!
|
|
1518
|
-
\****************************************************************************/
|
|
1519
|
-
/*! exports provided: create, clone, fromValues, fromRotationTranslationValues, fromRotationTranslation, fromTranslation, fromRotation, fromMat4, copy, identity, set, getReal, getDual, setReal, setDual, getTranslation, translate, rotateX, rotateY, rotateZ, rotateByQuatAppend, rotateByQuatPrepend, rotateAroundAxis, add, multiply, mul, scale, dot, lerp, invert, conjugate, length, len, squaredLength, sqrLen, normalize, str, exactEquals, equals */
|
|
1520
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1521
|
-
|
|
1522
|
-
"use strict";
|
|
1523
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return create; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return clone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromValues\", function() { return fromValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromRotationTranslationValues\", function() { return fromRotationTranslationValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromRotationTranslation\", function() { return fromRotationTranslation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromTranslation\", function() { return fromTranslation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromRotation\", function() { return fromRotation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromMat4\", function() { return fromMat4; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getReal\", function() { return getReal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDual\", function() { return getDual; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setReal\", function() { return setReal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setDual\", function() { return setDual; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTranslation\", function() { return getTranslation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"translate\", function() { return translate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateX\", function() { return rotateX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateY\", function() { return rotateY; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateZ\", function() { return rotateZ; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateByQuatAppend\", function() { return rotateByQuatAppend; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateByQuatPrepend\", function() { return rotateByQuatPrepend; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateAroundAxis\", function() { return rotateAroundAxis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return add; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiply\", function() { return multiply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mul\", function() { return mul; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scale\", function() { return scale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dot\", function() { return dot; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lerp\", function() { return lerp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"invert\", function() { return invert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"conjugate\", function() { return conjugate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"length\", function() { return length; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"len\", function() { return len; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"squaredLength\", function() { return squaredLength; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrLen\", function() { return sqrLen; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalize\", function() { return normalize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"str\", function() { return str; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exactEquals\", function() { return exactEquals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equals\", function() { return equals; });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"../../node_modules/gl-matrix/esm/common.js\");\n/* harmony import */ var _quat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quat.js */ \"../../node_modules/gl-matrix/esm/quat.js\");\n/* harmony import */ var _mat4_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mat4.js */ \"../../node_modules/gl-matrix/esm/mat4.js\");\n\n\n\n/**\n * Dual Quaternion<br>\n * Format: [real, dual]<br>\n * Quaternion format: XYZW<br>\n * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.<br>\n * @module quat2\n */\n\n/**\n * Creates a new identity dual quat\n *\n * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation]\n */\n\nfunction create() {\n var dq = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](8);\n\n if (_common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"] != Float32Array) {\n dq[0] = 0;\n dq[1] = 0;\n dq[2] = 0;\n dq[4] = 0;\n dq[5] = 0;\n dq[6] = 0;\n dq[7] = 0;\n }\n\n dq[3] = 1;\n return dq;\n}\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {ReadonlyQuat2} a dual quaternion to clone\n * @returns {quat2} new dual quaternion\n * @function\n */\n\nfunction clone(a) {\n var dq = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](8);\n dq[0] = a[0];\n dq[1] = a[1];\n dq[2] = a[2];\n dq[3] = a[3];\n dq[4] = a[4];\n dq[5] = a[5];\n dq[6] = a[6];\n dq[7] = a[7];\n return dq;\n}\n/**\n * Creates a new dual quat initialized with the given values\n *\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component\n * @param {Number} y2 Y component\n * @param {Number} z2 Z component\n * @param {Number} w2 W component\n * @returns {quat2} new dual quaternion\n * @function\n */\n\nfunction fromValues(x1, y1, z1, w1, x2, y2, z2, w2) {\n var dq = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n dq[4] = x2;\n dq[5] = y2;\n dq[6] = z2;\n dq[7] = w2;\n return dq;\n}\n/**\n * Creates a new dual quat from the given values (quat and translation)\n *\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component (translation)\n * @param {Number} y2 Y component (translation)\n * @param {Number} z2 Z component (translation)\n * @returns {quat2} new dual quaternion\n * @function\n */\n\nfunction fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) {\n var dq = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n var ax = x2 * 0.5,\n ay = y2 * 0.5,\n az = z2 * 0.5;\n dq[4] = ax * w1 + ay * z1 - az * y1;\n dq[5] = ay * w1 + az * x1 - ax * z1;\n dq[6] = az * w1 + ax * y1 - ay * x1;\n dq[7] = -ax * x1 - ay * y1 - az * z1;\n return dq;\n}\n/**\n * Creates a dual quat from a quaternion and a translation\n *\n * @param {ReadonlyQuat2} dual quaternion receiving operation result\n * @param {ReadonlyQuat} q a normalized quaternion\n * @param {ReadonlyVec3} t tranlation vector\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n\nfunction fromRotationTranslation(out, q, t) {\n var ax = t[0] * 0.5,\n ay = t[1] * 0.5,\n az = t[2] * 0.5,\n bx = q[0],\n by = q[1],\n bz = q[2],\n bw = q[3];\n out[0] = bx;\n out[1] = by;\n out[2] = bz;\n out[3] = bw;\n out[4] = ax * bw + ay * bz - az * by;\n out[5] = ay * bw + az * bx - ax * bz;\n out[6] = az * bw + ax * by - ay * bx;\n out[7] = -ax * bx - ay * by - az * bz;\n return out;\n}\n/**\n * Creates a dual quat from a translation\n *\n * @param {ReadonlyQuat2} dual quaternion receiving operation result\n * @param {ReadonlyVec3} t translation vector\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n\nfunction fromTranslation(out, t) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = t[0] * 0.5;\n out[5] = t[1] * 0.5;\n out[6] = t[2] * 0.5;\n out[7] = 0;\n return out;\n}\n/**\n * Creates a dual quat from a quaternion\n *\n * @param {ReadonlyQuat2} dual quaternion receiving operation result\n * @param {ReadonlyQuat} q the quaternion\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n\nfunction fromRotation(out, q) {\n out[0] = q[0];\n out[1] = q[1];\n out[2] = q[2];\n out[3] = q[3];\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n}\n/**\n * Creates a new dual quat from a matrix (4x4)\n *\n * @param {quat2} out the dual quaternion\n * @param {ReadonlyMat4} a the matrix\n * @returns {quat2} dual quat receiving operation result\n * @function\n */\n\nfunction fromMat4(out, a) {\n //TODO Optimize this\n var outer = _quat_js__WEBPACK_IMPORTED_MODULE_1__[\"create\"]();\n _mat4_js__WEBPACK_IMPORTED_MODULE_2__[\"getRotation\"](outer, a);\n var t = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](3);\n _mat4_js__WEBPACK_IMPORTED_MODULE_2__[\"getTranslation\"](t, a);\n fromRotationTranslation(out, outer, t);\n return out;\n}\n/**\n * Copy the values from one dual quat to another\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the source dual quaternion\n * @returns {quat2} out\n * @function\n */\n\nfunction copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n return out;\n}\n/**\n * Set a dual quat to the identity dual quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @returns {quat2} out\n */\n\nfunction identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n}\n/**\n * Set the components of a dual quat to the given values\n *\n * @param {quat2} out the receiving quaternion\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component\n * @param {Number} y2 Y component\n * @param {Number} z2 Z component\n * @param {Number} w2 W component\n * @returns {quat2} out\n * @function\n */\n\nfunction set(out, x1, y1, z1, w1, x2, y2, z2, w2) {\n out[0] = x1;\n out[1] = y1;\n out[2] = z1;\n out[3] = w1;\n out[4] = x2;\n out[5] = y2;\n out[6] = z2;\n out[7] = w2;\n return out;\n}\n/**\n * Gets the real part of a dual quat\n * @param {quat} out real part\n * @param {ReadonlyQuat2} a Dual Quaternion\n * @return {quat} real part\n */\n\nvar getReal = _quat_js__WEBPACK_IMPORTED_MODULE_1__[\"copy\"];\n/**\n * Gets the dual part of a dual quat\n * @param {quat} out dual part\n * @param {ReadonlyQuat2} a Dual Quaternion\n * @return {quat} dual part\n */\n\nfunction getDual(out, a) {\n out[0] = a[4];\n out[1] = a[5];\n out[2] = a[6];\n out[3] = a[7];\n return out;\n}\n/**\n * Set the real component of a dual quat to the given quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @param {ReadonlyQuat} q a quaternion representing the real part\n * @returns {quat2} out\n * @function\n */\n\nvar setReal = _quat_js__WEBPACK_IMPORTED_MODULE_1__[\"copy\"];\n/**\n * Set the dual component of a dual quat to the given quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @param {ReadonlyQuat} q a quaternion representing the dual part\n * @returns {quat2} out\n * @function\n */\n\nfunction setDual(out, q) {\n out[4] = q[0];\n out[5] = q[1];\n out[6] = q[2];\n out[7] = q[3];\n return out;\n}\n/**\n * Gets the translation of a normalized dual quat\n * @param {vec3} out translation\n * @param {ReadonlyQuat2} a Dual Quaternion to be decomposed\n * @return {vec3} translation\n */\n\nfunction getTranslation(out, a) {\n var ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3];\n out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n return out;\n}\n/**\n * Translates a dual quat by the given vector\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to translate\n * @param {ReadonlyVec3} v vector to translate by\n * @returns {quat2} out\n */\n\nfunction translate(out, a, v) {\n var ax1 = a[0],\n ay1 = a[1],\n az1 = a[2],\n aw1 = a[3],\n bx1 = v[0] * 0.5,\n by1 = v[1] * 0.5,\n bz1 = v[2] * 0.5,\n ax2 = a[4],\n ay2 = a[5],\n az2 = a[6],\n aw2 = a[7];\n out[0] = ax1;\n out[1] = ay1;\n out[2] = az1;\n out[3] = aw1;\n out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2;\n out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2;\n out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2;\n out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2;\n return out;\n}\n/**\n * Rotates a dual quat around the X axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n\nfunction rotateX(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n _quat_js__WEBPACK_IMPORTED_MODULE_1__[\"rotateX\"](out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\n * Rotates a dual quat around the Y axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n\nfunction rotateY(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n _quat_js__WEBPACK_IMPORTED_MODULE_1__[\"rotateY\"](out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\n * Rotates a dual quat around the Z axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n\nfunction rotateZ(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n _quat_js__WEBPACK_IMPORTED_MODULE_1__[\"rotateZ\"](out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\n * Rotates a dual quat by a given quaternion (a * q)\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {ReadonlyQuat} q quaternion to rotate by\n * @returns {quat2} out\n */\n\nfunction rotateByQuatAppend(out, a, q) {\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3],\n ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n out[0] = ax * qw + aw * qx + ay * qz - az * qy;\n out[1] = ay * qw + aw * qy + az * qx - ax * qz;\n out[2] = az * qw + aw * qz + ax * qy - ay * qx;\n out[3] = aw * qw - ax * qx - ay * qy - az * qz;\n ax = a[4];\n ay = a[5];\n az = a[6];\n aw = a[7];\n out[4] = ax * qw + aw * qx + ay * qz - az * qy;\n out[5] = ay * qw + aw * qy + az * qx - ax * qz;\n out[6] = az * qw + aw * qz + ax * qy - ay * qx;\n out[7] = aw * qw - ax * qx - ay * qy - az * qz;\n return out;\n}\n/**\n * Rotates a dual quat by a given quaternion (q * a)\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat} q quaternion to rotate by\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @returns {quat2} out\n */\n\nfunction rotateByQuatPrepend(out, q, a) {\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3],\n bx = a[0],\n by = a[1],\n bz = a[2],\n bw = a[3];\n out[0] = qx * bw + qw * bx + qy * bz - qz * by;\n out[1] = qy * bw + qw * by + qz * bx - qx * bz;\n out[2] = qz * bw + qw * bz + qx * by - qy * bx;\n out[3] = qw * bw - qx * bx - qy * by - qz * bz;\n bx = a[4];\n by = a[5];\n bz = a[6];\n bw = a[7];\n out[4] = qx * bw + qw * bx + qy * bz - qz * by;\n out[5] = qy * bw + qw * by + qz * bx - qx * bz;\n out[6] = qz * bw + qw * bz + qx * by - qy * bx;\n out[7] = qw * bw - qx * bx - qy * by - qz * bz;\n return out;\n}\n/**\n * Rotates a dual quat around a given axis. Does the normalisation automatically\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @param {Number} rad how far the rotation should be\n * @returns {quat2} out\n */\n\nfunction rotateAroundAxis(out, a, axis, rad) {\n //Special case for rad = 0\n if (Math.abs(rad) < _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"]) {\n return copy(out, a);\n }\n\n var axisLength = Math.hypot(axis[0], axis[1], axis[2]);\n rad = rad * 0.5;\n var s = Math.sin(rad);\n var bx = s * axis[0] / axisLength;\n var by = s * axis[1] / axisLength;\n var bz = s * axis[2] / axisLength;\n var bw = Math.cos(rad);\n var ax1 = a[0],\n ay1 = a[1],\n az1 = a[2],\n aw1 = a[3];\n out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n var ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n out[4] = ax * bw + aw * bx + ay * bz - az * by;\n out[5] = ay * bw + aw * by + az * bx - ax * bz;\n out[6] = az * bw + aw * bz + ax * by - ay * bx;\n out[7] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n/**\n * Adds two dual quat's\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @returns {quat2} out\n * @function\n */\n\nfunction add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n return out;\n}\n/**\n * Multiplies two dual quat's\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @returns {quat2} out\n */\n\nfunction multiply(out, a, b) {\n var ax0 = a[0],\n ay0 = a[1],\n az0 = a[2],\n aw0 = a[3],\n bx1 = b[4],\n by1 = b[5],\n bz1 = b[6],\n bw1 = b[7],\n ax1 = a[4],\n ay1 = a[5],\n az1 = a[6],\n aw1 = a[7],\n bx0 = b[0],\n by0 = b[1],\n bz0 = b[2],\n bw0 = b[3];\n out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0;\n out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0;\n out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0;\n out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0;\n out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0;\n out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0;\n out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0;\n out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0;\n return out;\n}\n/**\n * Alias for {@link quat2.multiply}\n * @function\n */\n\nvar mul = multiply;\n/**\n * Scales a dual quat by a scalar number\n *\n * @param {quat2} out the receiving dual quat\n * @param {ReadonlyQuat2} a the dual quat to scale\n * @param {Number} b amount to scale the dual quat by\n * @returns {quat2} out\n * @function\n */\n\nfunction scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n return out;\n}\n/**\n * Calculates the dot product of two dual quat's (The dot product of the real parts)\n *\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\n\nvar dot = _quat_js__WEBPACK_IMPORTED_MODULE_1__[\"dot\"];\n/**\n * Performs a linear interpolation between two dual quats's\n * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5)\n *\n * @param {quat2} out the receiving dual quat\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat2} out\n */\n\nfunction lerp(out, a, b, t) {\n var mt = 1 - t;\n if (dot(a, b) < 0) t = -t;\n out[0] = a[0] * mt + b[0] * t;\n out[1] = a[1] * mt + b[1] * t;\n out[2] = a[2] * mt + b[2] * t;\n out[3] = a[3] * mt + b[3] * t;\n out[4] = a[4] * mt + b[4] * t;\n out[5] = a[5] * mt + b[5] * t;\n out[6] = a[6] * mt + b[6] * t;\n out[7] = a[7] * mt + b[7] * t;\n return out;\n}\n/**\n * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a dual quat to calculate inverse of\n * @returns {quat2} out\n */\n\nfunction invert(out, a) {\n var sqlen = squaredLength(a);\n out[0] = -a[0] / sqlen;\n out[1] = -a[1] / sqlen;\n out[2] = -a[2] / sqlen;\n out[3] = a[3] / sqlen;\n out[4] = -a[4] / sqlen;\n out[5] = -a[5] / sqlen;\n out[6] = -a[6] / sqlen;\n out[7] = a[7] / sqlen;\n return out;\n}\n/**\n * Calculates the conjugate of a dual quat\n * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result.\n *\n * @param {quat2} out the receiving quaternion\n * @param {ReadonlyQuat2} a quat to calculate conjugate of\n * @returns {quat2} out\n */\n\nfunction conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n out[4] = -a[4];\n out[5] = -a[5];\n out[6] = -a[6];\n out[7] = a[7];\n return out;\n}\n/**\n * Calculates the length of a dual quat\n *\n * @param {ReadonlyQuat2} a dual quat to calculate length of\n * @returns {Number} length of a\n * @function\n */\n\nvar length = _quat_js__WEBPACK_IMPORTED_MODULE_1__[\"length\"];\n/**\n * Alias for {@link quat2.length}\n * @function\n */\n\nvar len = length;\n/**\n * Calculates the squared length of a dual quat\n *\n * @param {ReadonlyQuat2} a dual quat to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\n\nvar squaredLength = _quat_js__WEBPACK_IMPORTED_MODULE_1__[\"squaredLength\"];\n/**\n * Alias for {@link quat2.squaredLength}\n * @function\n */\n\nvar sqrLen = squaredLength;\n/**\n * Normalize a dual quat\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a dual quaternion to normalize\n * @returns {quat2} out\n * @function\n */\n\nfunction normalize(out, a) {\n var magnitude = squaredLength(a);\n\n if (magnitude > 0) {\n magnitude = Math.sqrt(magnitude);\n var a0 = a[0] / magnitude;\n var a1 = a[1] / magnitude;\n var a2 = a[2] / magnitude;\n var a3 = a[3] / magnitude;\n var b0 = a[4];\n var b1 = a[5];\n var b2 = a[6];\n var b3 = a[7];\n var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3;\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = (b0 - a0 * a_dot_b) / magnitude;\n out[5] = (b1 - a1 * a_dot_b) / magnitude;\n out[6] = (b2 - a2 * a_dot_b) / magnitude;\n out[7] = (b3 - a3 * a_dot_b) / magnitude;\n }\n\n return out;\n}\n/**\n * Returns a string representation of a dual quatenion\n *\n * @param {ReadonlyQuat2} a dual quaternion to represent as a string\n * @returns {String} string representation of the dual quat\n */\n\nfunction str(a) {\n return \"quat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \")\";\n}\n/**\n * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyQuat2} a the first dual quaternion.\n * @param {ReadonlyQuat2} b the second dual quaternion.\n * @returns {Boolean} true if the dual quaternions are equal, false otherwise.\n */\n\nfunction exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7];\n}\n/**\n * Returns whether or not the dual quaternions have approximately the same elements in the same position.\n *\n * @param {ReadonlyQuat2} a the first dual quat.\n * @param {ReadonlyQuat2} b the second dual quat.\n * @returns {Boolean} true if the dual quats are equal, false otherwise.\n */\n\nfunction equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a7), Math.abs(b7));\n}\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/quat2.js?");
|
|
1524
|
-
|
|
1525
|
-
/***/ }),
|
|
1526
|
-
|
|
1527
|
-
/***/ "../../node_modules/gl-matrix/esm/vec2.js":
|
|
1528
|
-
/*!***************************************************************************!*\
|
|
1529
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/vec2.js ***!
|
|
1530
|
-
\***************************************************************************/
|
|
1531
|
-
/*! exports provided: create, clone, fromValues, copy, set, add, subtract, multiply, divide, ceil, floor, min, max, round, scale, scaleAndAdd, distance, squaredDistance, length, squaredLength, negate, inverse, normalize, dot, cross, lerp, random, transformMat2, transformMat2d, transformMat3, transformMat4, rotate, angle, zero, str, exactEquals, equals, len, sub, mul, div, dist, sqrDist, sqrLen, forEach */
|
|
1532
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1533
|
-
|
|
1534
|
-
"use strict";
|
|
1535
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return create; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return clone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromValues\", function() { return fromValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return add; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"subtract\", function() { return subtract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiply\", function() { return multiply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"divide\", function() { return divide; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ceil\", function() { return ceil; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"floor\", function() { return floor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return min; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return max; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"round\", function() { return round; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scale\", function() { return scale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleAndAdd\", function() { return scaleAndAdd; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"distance\", function() { return distance; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"squaredDistance\", function() { return squaredDistance; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"length\", function() { return length; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"squaredLength\", function() { return squaredLength; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"negate\", function() { return negate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalize\", function() { return normalize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dot\", function() { return dot; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return cross; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lerp\", function() { return lerp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"random\", function() { return random; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformMat2\", function() { return transformMat2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformMat2d\", function() { return transformMat2d; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformMat3\", function() { return transformMat3; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformMat4\", function() { return transformMat4; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotate\", function() { return rotate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"angle\", function() { return angle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"zero\", function() { return zero; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"str\", function() { return str; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exactEquals\", function() { return exactEquals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equals\", function() { return equals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"len\", function() { return len; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sub\", function() { return sub; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mul\", function() { return mul; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"div\", function() { return div; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dist\", function() { return dist; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrDist\", function() { return sqrDist; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrLen\", function() { return sqrLen; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forEach\", function() { return forEach; });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"../../node_modules/gl-matrix/esm/common.js\");\n\n/**\n * 2 Dimensional Vector\n * @module vec2\n */\n\n/**\n * Creates a new, empty vec2\n *\n * @returns {vec2} a new 2D vector\n */\n\nfunction create() {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](2);\n\n if (_common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"] != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n\n return out;\n}\n/**\n * Creates a new vec2 initialized with values from an existing vector\n *\n * @param {ReadonlyVec2} a vector to clone\n * @returns {vec2} a new 2D vector\n */\n\nfunction clone(a) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\n * Creates a new vec2 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} a new 2D vector\n */\n\nfunction fromValues(x, y) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\n * Copy the values from one vec2 to another\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the source vector\n * @returns {vec2} out\n */\n\nfunction copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\n * Set the components of a vec2 to the given values\n *\n * @param {vec2} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} out\n */\n\nfunction set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\n * Adds two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nfunction add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nfunction subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n/**\n * Multiplies two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nfunction multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n/**\n * Divides two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nfunction divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n/**\n * Math.ceil the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to ceil\n * @returns {vec2} out\n */\n\nfunction ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n/**\n * Math.floor the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to floor\n * @returns {vec2} out\n */\n\nfunction floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n/**\n * Returns the minimum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nfunction min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n/**\n * Returns the maximum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nfunction max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n/**\n * Math.round the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to round\n * @returns {vec2} out\n */\n\nfunction round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n}\n/**\n * Scales a vec2 by a scalar number\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec2} out\n */\n\nfunction scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n/**\n * Adds two vec2's after scaling the second operand by a scalar value\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec2} out\n */\n\nfunction scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n/**\n * Calculates the euclidian distance between two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} distance between a and b\n */\n\nfunction distance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.hypot(x, y);\n}\n/**\n * Calculates the squared euclidian distance between two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} squared distance between a and b\n */\n\nfunction squaredDistance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x * x + y * y;\n}\n/**\n * Calculates the length of a vec2\n *\n * @param {ReadonlyVec2} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nfunction length(a) {\n var x = a[0],\n y = a[1];\n return Math.hypot(x, y);\n}\n/**\n * Calculates the squared length of a vec2\n *\n * @param {ReadonlyVec2} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n\nfunction squaredLength(a) {\n var x = a[0],\n y = a[1];\n return x * x + y * y;\n}\n/**\n * Negates the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to negate\n * @returns {vec2} out\n */\n\nfunction negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n/**\n * Returns the inverse of the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to invert\n * @returns {vec2} out\n */\n\nfunction inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n/**\n * Normalize a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to normalize\n * @returns {vec2} out\n */\n\nfunction normalize(out, a) {\n var x = a[0],\n y = a[1];\n var len = x * x + y * y;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n/**\n * Calculates the dot product of two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} dot product of a and b\n */\n\nfunction dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n/**\n * Computes the cross product of two vec2's\n * Note that the cross product must by definition produce a 3D vector\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec3} out\n */\n\nfunction cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n/**\n * Performs a linear interpolation between two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec2} out\n */\n\nfunction lerp(out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec2} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec2} out\n */\n\nfunction random(out, scale) {\n scale = scale || 1.0;\n var r = _common_js__WEBPACK_IMPORTED_MODULE_0__[\"RANDOM\"]() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n/**\n * Transforms the vec2 with a mat2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat2} m matrix to transform with\n * @returns {vec2} out\n */\n\nfunction transformMat2(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n/**\n * Transforms the vec2 with a mat2d\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat2d} m matrix to transform with\n * @returns {vec2} out\n */\n\nfunction transformMat2d(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n/**\n * Transforms the vec2 with a mat3\n * 3rd vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat3} m matrix to transform with\n * @returns {vec2} out\n */\n\nfunction transformMat3(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\n * Transforms the vec2 with a mat4\n * 3rd vector component is implicitly '0'\n * 4th vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec2} out\n */\n\nfunction transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n/**\n * Rotate a 2D vector\n * @param {vec2} out The receiving vec2\n * @param {ReadonlyVec2} a The vec2 point to rotate\n * @param {ReadonlyVec2} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec2} out\n */\n\nfunction rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0],\n p1 = a[1] - b[1],\n sinC = Math.sin(rad),\n cosC = Math.cos(rad); //perform rotation and translate to correct position\n\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\n/**\n * Get the angle between two 2D vectors\n * @param {ReadonlyVec2} a The first operand\n * @param {ReadonlyVec2} b The second operand\n * @returns {Number} The angle in radians\n */\n\nfunction angle(a, b) {\n var x1 = a[0],\n y1 = a[1],\n x2 = b[0],\n y2 = b[1],\n // mag is the product of the magnitudes of a and b\n mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2),\n // mag &&.. short circuits if mag == 0\n cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\n * Set the components of a vec2 to zero\n *\n * @param {vec2} out the receiving vector\n * @returns {vec2} out\n */\n\nfunction zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec2} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nfunction str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n}\n/**\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec2} a The first vector.\n * @param {ReadonlyVec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nfunction exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec2} a The first vector.\n * @param {ReadonlyVec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nfunction equals(a, b) {\n var a0 = a[0],\n a1 = a[1];\n var b0 = b[0],\n b1 = b[1];\n return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\n/**\n * Alias for {@link vec2.length}\n * @function\n */\n\nvar len = length;\n/**\n * Alias for {@link vec2.subtract}\n * @function\n */\n\nvar sub = subtract;\n/**\n * Alias for {@link vec2.multiply}\n * @function\n */\n\nvar mul = multiply;\n/**\n * Alias for {@link vec2.divide}\n * @function\n */\n\nvar div = divide;\n/**\n * Alias for {@link vec2.distance}\n * @function\n */\n\nvar dist = distance;\n/**\n * Alias for {@link vec2.squaredDistance}\n * @function\n */\n\nvar sqrDist = squaredDistance;\n/**\n * Alias for {@link vec2.squaredLength}\n * @function\n */\n\nvar sqrLen = squaredLength;\n/**\n * Perform some operation over an array of vec2s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n\nvar forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 2;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n\n return a;\n };\n}();\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/vec2.js?");
|
|
1536
|
-
|
|
1537
|
-
/***/ }),
|
|
1538
|
-
|
|
1539
|
-
/***/ "../../node_modules/gl-matrix/esm/vec3.js":
|
|
1540
|
-
/*!***************************************************************************!*\
|
|
1541
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/vec3.js ***!
|
|
1542
|
-
\***************************************************************************/
|
|
1543
|
-
/*! exports provided: create, clone, length, fromValues, copy, set, add, subtract, multiply, divide, ceil, floor, min, max, round, scale, scaleAndAdd, distance, squaredDistance, squaredLength, negate, inverse, normalize, dot, cross, lerp, hermite, bezier, random, transformMat4, transformMat3, transformQuat, rotateX, rotateY, rotateZ, angle, zero, str, exactEquals, equals, sub, mul, div, dist, sqrDist, len, sqrLen, forEach */
|
|
1544
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1545
|
-
|
|
1546
|
-
"use strict";
|
|
1547
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return create; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return clone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"length\", function() { return length; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromValues\", function() { return fromValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return add; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"subtract\", function() { return subtract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiply\", function() { return multiply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"divide\", function() { return divide; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ceil\", function() { return ceil; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"floor\", function() { return floor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return min; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return max; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"round\", function() { return round; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scale\", function() { return scale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleAndAdd\", function() { return scaleAndAdd; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"distance\", function() { return distance; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"squaredDistance\", function() { return squaredDistance; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"squaredLength\", function() { return squaredLength; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"negate\", function() { return negate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalize\", function() { return normalize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dot\", function() { return dot; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return cross; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lerp\", function() { return lerp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hermite\", function() { return hermite; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bezier\", function() { return bezier; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"random\", function() { return random; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformMat4\", function() { return transformMat4; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformMat3\", function() { return transformMat3; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformQuat\", function() { return transformQuat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateX\", function() { return rotateX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateY\", function() { return rotateY; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rotateZ\", function() { return rotateZ; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"angle\", function() { return angle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"zero\", function() { return zero; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"str\", function() { return str; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exactEquals\", function() { return exactEquals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equals\", function() { return equals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sub\", function() { return sub; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mul\", function() { return mul; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"div\", function() { return div; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dist\", function() { return dist; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrDist\", function() { return sqrDist; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"len\", function() { return len; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrLen\", function() { return sqrLen; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forEach\", function() { return forEach; });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"../../node_modules/gl-matrix/esm/common.js\");\n\n/**\n * 3 Dimensional Vector\n * @module vec3\n */\n\n/**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\n\nfunction create() {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](3);\n\n if (_common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"] != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n return out;\n}\n/**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {ReadonlyVec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\n\nfunction clone(a) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\n * Calculates the length of a vec3\n *\n * @param {ReadonlyVec3} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nfunction length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n}\n/**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\n\nfunction fromValues(x, y, z) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the source vector\n * @returns {vec3} out\n */\n\nfunction copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\n\nfunction set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nfunction add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nfunction subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n/**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nfunction multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n/**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nfunction divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n/**\n * Math.ceil the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to ceil\n * @returns {vec3} out\n */\n\nfunction ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n/**\n * Math.floor the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to floor\n * @returns {vec3} out\n */\n\nfunction floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n/**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nfunction min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n/**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nfunction max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n/**\n * Math.round the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to round\n * @returns {vec3} out\n */\n\nfunction round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n}\n/**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\n\nfunction scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n/**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\n\nfunction scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n/**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} distance between a and b\n */\n\nfunction distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n}\n/**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\n\nfunction squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n/**\n * Calculates the squared length of a vec3\n *\n * @param {ReadonlyVec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n\nfunction squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\n/**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to negate\n * @returns {vec3} out\n */\n\nfunction negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n/**\n * Returns the inverse of the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to invert\n * @returns {vec3} out\n */\n\nfunction inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n/**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to normalize\n * @returns {vec3} out\n */\n\nfunction normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n/**\n * Calculates the dot product of two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} dot product of a and b\n */\n\nfunction dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n/**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nfunction cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n var bx = b[0],\n by = b[1],\n bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n/**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n\nfunction lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n/**\n * Performs a hermite interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {ReadonlyVec3} c the third operand\n * @param {ReadonlyVec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n\nfunction hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\n * Performs a bezier interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {ReadonlyVec3} c the third operand\n * @param {ReadonlyVec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n\nfunction bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec3} out\n */\n\nfunction random(out, scale) {\n scale = scale || 1.0;\n var r = _common_js__WEBPACK_IMPORTED_MODULE_0__[\"RANDOM\"]() * 2.0 * Math.PI;\n var z = _common_js__WEBPACK_IMPORTED_MODULE_0__[\"RANDOM\"]() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n/**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec3} out\n */\n\nfunction transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n/**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyMat3} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\n\nfunction transformMat3(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n/**\n * Transforms the vec3 with a quat\n * Can also be used for dual quaternions. (Multiply it with the real part)\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyQuat} q quaternion to transform with\n * @returns {vec3} out\n */\n\nfunction transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var x = a[0],\n y = a[1],\n z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n\n var uvx = qy * z - qz * y,\n uvy = qz * x - qx * z,\n uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n\n var uuvx = qy * uvz - qz * uvy,\n uuvy = qz * uvx - qx * uvz,\n uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\n/**\n * Rotate a 3D vector around the x-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n\nfunction rotateX(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\n * Rotate a 3D vector around the y-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n\nfunction rotateY(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\n * Rotate a 3D vector around the z-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n\nfunction rotateZ(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2]; //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\n * Get the angle between two 3D vectors\n * @param {ReadonlyVec3} a The first operand\n * @param {ReadonlyVec3} b The second operand\n * @returns {Number} The angle in radians\n */\n\nfunction angle(a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n bx = b[0],\n by = b[1],\n bz = b[2],\n mag1 = Math.sqrt(ax * ax + ay * ay + az * az),\n mag2 = Math.sqrt(bx * bx + by * by + bz * bz),\n mag = mag1 * mag2,\n cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\n * Set the components of a vec3 to zero\n *\n * @param {vec3} out the receiving vector\n * @returns {vec3} out\n */\n\nfunction zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec3} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nfunction str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\n/**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec3} a The first vector.\n * @param {ReadonlyVec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nfunction exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec3} a The first vector.\n * @param {ReadonlyVec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nfunction equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2];\n return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n/**\n * Alias for {@link vec3.subtract}\n * @function\n */\n\nvar sub = subtract;\n/**\n * Alias for {@link vec3.multiply}\n * @function\n */\n\nvar mul = multiply;\n/**\n * Alias for {@link vec3.divide}\n * @function\n */\n\nvar div = divide;\n/**\n * Alias for {@link vec3.distance}\n * @function\n */\n\nvar dist = distance;\n/**\n * Alias for {@link vec3.squaredDistance}\n * @function\n */\n\nvar sqrDist = squaredDistance;\n/**\n * Alias for {@link vec3.length}\n * @function\n */\n\nvar len = length;\n/**\n * Alias for {@link vec3.squaredLength}\n * @function\n */\n\nvar sqrLen = squaredLength;\n/**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n\nvar forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 3;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n\n return a;\n };\n}();\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/vec3.js?");
|
|
1548
|
-
|
|
1549
|
-
/***/ }),
|
|
1550
|
-
|
|
1551
|
-
/***/ "../../node_modules/gl-matrix/esm/vec4.js":
|
|
1552
|
-
/*!***************************************************************************!*\
|
|
1553
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/vec4.js ***!
|
|
1554
|
-
\***************************************************************************/
|
|
1555
|
-
/*! exports provided: create, clone, fromValues, copy, set, add, subtract, multiply, divide, ceil, floor, min, max, round, scale, scaleAndAdd, distance, squaredDistance, length, squaredLength, negate, inverse, normalize, dot, cross, lerp, random, transformMat4, transformQuat, zero, str, exactEquals, equals, sub, mul, div, dist, sqrDist, len, sqrLen, forEach */
|
|
1556
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1557
|
-
|
|
1558
|
-
"use strict";
|
|
1559
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return create; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return clone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromValues\", function() { return fromValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return set; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"add\", function() { return add; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"subtract\", function() { return subtract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"multiply\", function() { return multiply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"divide\", function() { return divide; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ceil\", function() { return ceil; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"floor\", function() { return floor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return min; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return max; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"round\", function() { return round; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scale\", function() { return scale; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scaleAndAdd\", function() { return scaleAndAdd; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"distance\", function() { return distance; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"squaredDistance\", function() { return squaredDistance; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"length\", function() { return length; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"squaredLength\", function() { return squaredLength; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"negate\", function() { return negate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inverse\", function() { return inverse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalize\", function() { return normalize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dot\", function() { return dot; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cross\", function() { return cross; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lerp\", function() { return lerp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"random\", function() { return random; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformMat4\", function() { return transformMat4; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"transformQuat\", function() { return transformQuat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"zero\", function() { return zero; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"str\", function() { return str; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exactEquals\", function() { return exactEquals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"equals\", function() { return equals; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sub\", function() { return sub; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mul\", function() { return mul; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"div\", function() { return div; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dist\", function() { return dist; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrDist\", function() { return sqrDist; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"len\", function() { return len; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sqrLen\", function() { return sqrLen; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forEach\", function() { return forEach; });\n/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ \"../../node_modules/gl-matrix/esm/common.js\");\n\n/**\n * 4 Dimensional Vector\n * @module vec4\n */\n\n/**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\n\nfunction create() {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](4);\n\n if (_common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"] != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n\n return out;\n}\n/**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {ReadonlyVec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\n\nfunction clone(a) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\n\nfunction fromValues(x, y, z, w) {\n var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__[\"ARRAY_TYPE\"](4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the source vector\n * @returns {vec4} out\n */\n\nfunction copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\n\nfunction set(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nfunction add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nfunction subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n/**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nfunction multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n}\n/**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nfunction divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n}\n/**\n * Math.ceil the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to ceil\n * @returns {vec4} out\n */\n\nfunction ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n}\n/**\n * Math.floor the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to floor\n * @returns {vec4} out\n */\n\nfunction floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n}\n/**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nfunction min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n}\n/**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nfunction max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n}\n/**\n * Math.round the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to round\n * @returns {vec4} out\n */\n\nfunction round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n out[3] = Math.round(a[3]);\n return out;\n}\n/**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\n\nfunction scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n/**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\n\nfunction scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n/**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} distance between a and b\n */\n\nfunction distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\n\nfunction squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\n * Calculates the length of a vec4\n *\n * @param {ReadonlyVec4} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nfunction length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\n * Calculates the squared length of a vec4\n *\n * @param {ReadonlyVec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n\nfunction squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to negate\n * @returns {vec4} out\n */\n\nfunction negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n}\n/**\n * Returns the inverse of the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to invert\n * @returns {vec4} out\n */\n\nfunction inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n}\n/**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to normalize\n * @returns {vec4} out\n */\n\nfunction normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n}\n/**\n * Calculates the dot product of two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} dot product of a and b\n */\n\nfunction dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\n/**\n * Returns the cross-product of three vectors in a 4-dimensional space\n *\n * @param {ReadonlyVec4} result the receiving vector\n * @param {ReadonlyVec4} U the first vector\n * @param {ReadonlyVec4} V the second vector\n * @param {ReadonlyVec4} W the third vector\n * @returns {vec4} result\n */\n\nfunction cross(out, u, v, w) {\n var A = v[0] * w[1] - v[1] * w[0],\n B = v[0] * w[2] - v[2] * w[0],\n C = v[0] * w[3] - v[3] * w[0],\n D = v[1] * w[2] - v[2] * w[1],\n E = v[1] * w[3] - v[3] * w[1],\n F = v[2] * w[3] - v[3] * w[2];\n var G = u[0];\n var H = u[1];\n var I = u[2];\n var J = u[3];\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n return out;\n}\n/**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec4} out\n */\n\nfunction lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n}\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec4} out\n */\n\nfunction random(out, scale) {\n scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n\n var v1, v2, v3, v4;\n var s1, s2;\n\n do {\n v1 = _common_js__WEBPACK_IMPORTED_MODULE_0__[\"RANDOM\"]() * 2 - 1;\n v2 = _common_js__WEBPACK_IMPORTED_MODULE_0__[\"RANDOM\"]() * 2 - 1;\n s1 = v1 * v1 + v2 * v2;\n } while (s1 >= 1);\n\n do {\n v3 = _common_js__WEBPACK_IMPORTED_MODULE_0__[\"RANDOM\"]() * 2 - 1;\n v4 = _common_js__WEBPACK_IMPORTED_MODULE_0__[\"RANDOM\"]() * 2 - 1;\n s2 = v3 * v3 + v4 * v4;\n } while (s2 >= 1);\n\n var d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n}\n/**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec4} out\n */\n\nfunction transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n}\n/**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to transform\n * @param {ReadonlyQuat} q quaternion to transform with\n * @returns {vec4} out\n */\n\nfunction transformQuat(out, a, q) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3]; // calculate quat * vec\n\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n out[3] = a[3];\n return out;\n}\n/**\n * Set the components of a vec4 to zero\n *\n * @param {vec4} out the receiving vector\n * @returns {vec4} out\n */\n\nfunction zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n}\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec4} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nfunction str(a) {\n return \"vec4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec4} a The first vector.\n * @param {ReadonlyVec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nfunction exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec4} a The first vector.\n * @param {ReadonlyVec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nfunction equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__[\"EPSILON\"] * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n/**\n * Alias for {@link vec4.subtract}\n * @function\n */\n\nvar sub = subtract;\n/**\n * Alias for {@link vec4.multiply}\n * @function\n */\n\nvar mul = multiply;\n/**\n * Alias for {@link vec4.divide}\n * @function\n */\n\nvar div = divide;\n/**\n * Alias for {@link vec4.distance}\n * @function\n */\n\nvar dist = distance;\n/**\n * Alias for {@link vec4.squaredDistance}\n * @function\n */\n\nvar sqrDist = squaredDistance;\n/**\n * Alias for {@link vec4.length}\n * @function\n */\n\nvar len = length;\n/**\n * Alias for {@link vec4.squaredLength}\n * @function\n */\n\nvar sqrLen = squaredLength;\n/**\n * Perform some operation over an array of vec4s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n\nvar forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 4;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n\n return a;\n };\n}();\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/gl-matrix/esm/vec4.js?");
|
|
1560
|
-
|
|
1561
|
-
/***/ }),
|
|
1562
|
-
|
|
1563
|
-
/***/ "../../node_modules/rbush/rbush.min.js":
|
|
1564
|
-
/*!************************************************************************!*\
|
|
1565
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/rbush/rbush.min.js ***!
|
|
1566
|
-
\************************************************************************/
|
|
1567
|
-
/*! no static exports found */
|
|
1568
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1569
|
-
|
|
1570
|
-
eval("!function(t,i){ true?module.exports=i():undefined}(this,function(){\"use strict\";function t(t,r,e,a,h){!function t(n,r,e,a,h){for(;a>e;){if(a-e>600){var o=a-e+1,s=r-e+1,l=Math.log(o),f=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*f*(o-f)/o)*(s-o/2<0?-1:1),m=Math.max(e,Math.floor(r-s*f/o+u)),c=Math.min(a,Math.floor(r+(o-s)*f/o+u));t(n,r,m,c,h)}var p=n[r],d=e,x=a;for(i(n,e,r),h(n[a],p)>0&&i(n,e,a);d<x;){for(i(n,d,x),d++,x--;h(n[d],p)<0;)d++;for(;h(n[x],p)>0;)x--}0===h(n[e],p)?i(n,e,x):i(n,++x,a),x<=r&&(e=x+1),r<=x&&(a=x-1)}}(t,r,e||0,a||t.length-1,h||n)}function i(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function n(t,i){return t<i?-1:t>i?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function e(t,i,n){if(!n)return i.indexOf(t);for(var r=0;r<i.length;r++)if(n(t,i[r]))return r;return-1}function a(t,i){h(t,0,t.children.length,i,t)}function h(t,i,n,r,e){e||(e=p(null)),e.minX=1/0,e.minY=1/0,e.maxX=-1/0,e.maxY=-1/0;for(var a=i;a<n;a++){var h=t.children[a];o(e,t.leaf?r(h):h)}return e}function o(t,i){return t.minX=Math.min(t.minX,i.minX),t.minY=Math.min(t.minY,i.minY),t.maxX=Math.max(t.maxX,i.maxX),t.maxY=Math.max(t.maxY,i.maxY),t}function s(t,i){return t.minX-i.minX}function l(t,i){return t.minY-i.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function c(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,e,a){for(var h=[n,r];h.length;)if(!((r=h.pop())-(n=h.pop())<=e)){var o=n+Math.ceil((r-n)/e/2)*e;t(i,o,n,r,a),h.push(n,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var i=this.data,n=[];if(!c(t,i))return n;for(var r=this.toBBox,e=[];i;){for(var a=0;a<i.children.length;a++){var h=i.children[a],o=i.leaf?r(h):h;c(t,o)&&(i.leaf?n.push(h):m(t,o)?this._all(h,n):e.push(h))}i=e.pop()}return n},r.prototype.collides=function(t){var i=this.data;if(!c(t,i))return!1;for(var n=[];i;){for(var r=0;r<i.children.length;r++){var e=i.children[r],a=i.leaf?this.toBBox(e):e;if(c(t,a)){if(i.leaf||m(t,a))return!0;n.push(e)}}i=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var i=0;i<t.length;i++)this.insert(t[i]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,i){if(!t)return this;for(var n,r,a,h=this.data,o=this.toBBox(t),s=[],l=[];h||s.length;){if(h||(h=s.pop(),r=s[s.length-1],n=l.pop(),a=!0),h.leaf){var f=e(t,h.children,i);if(-1!==f)return h.children.splice(f,1),s.push(h),this._condense(s),this}a||h.leaf||!m(h,o)?r?(n++,h=r.children[n],a=!1):h=null:(s.push(h),l.push(n),n=0,r=h,h=h.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,i){return t.minX-i.minX},r.prototype.compareMinY=function(t,i){return t.minY-i.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,i){for(var n=[];t;)t.leaf?i.push.apply(i,t.children):n.push.apply(n,t.children),t=n.pop();return i},r.prototype._build=function(t,i,n,r){var e,h=n-i+1,o=this._maxEntries;if(h<=o)return a(e=p(t.slice(i,n+1)),this.toBBox),e;r||(r=Math.ceil(Math.log(h)/Math.log(o)),o=Math.ceil(h/Math.pow(o,r-1))),(e=p([])).leaf=!1,e.height=r;var s=Math.ceil(h/o),l=s*Math.ceil(Math.sqrt(o));d(t,i,n,l,this.compareMinX);for(var f=i;f<=n;f+=l){var u=Math.min(f+l-1,n);d(t,f,u,s,this.compareMinY);for(var m=f;m<=u;m+=s){var c=Math.min(m+s-1,u);e.children.push(this._build(t,m,c,r-1))}}return a(e,this.toBBox),e},r.prototype._chooseSubtree=function(t,i,n,r){for(;r.push(i),!i.leaf&&r.length-1!==n;){for(var e=1/0,a=1/0,h=void 0,o=0;o<i.children.length;o++){var s=i.children[o],l=f(s),u=(m=t,c=s,(Math.max(c.maxX,m.maxX)-Math.min(c.minX,m.minX))*(Math.max(c.maxY,m.maxY)-Math.min(c.minY,m.minY))-l);u<a?(a=u,e=l<e?l:e,h=s):u===a&&l<e&&(e=l,h=s)}i=h||i.children[0]}var m,c;return i},r.prototype._insert=function(t,i,n){var r=n?t:this.toBBox(t),e=[],a=this._chooseSubtree(r,this.data,i,e);for(a.children.push(t),o(a,r);i>=0&&e[i].children.length>this._maxEntries;)this._split(e,i),i--;this._adjustParentBBoxes(r,e,i)},r.prototype._split=function(t,i){var n=t[i],r=n.children.length,e=this._minEntries;this._chooseSplitAxis(n,e,r);var h=this._chooseSplitIndex(n,e,r),o=p(n.children.splice(h,n.children.length-h));o.height=n.height,o.leaf=n.leaf,a(n,this.toBBox),a(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(n,o)},r.prototype._splitRoot=function(t,i){this.data=p([t,i]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,i,n){for(var r,e,a,o,s,l,u,m=1/0,c=1/0,p=i;p<=n-i;p++){var d=h(t,0,p,this.toBBox),x=h(t,p,n,this.toBBox),v=(e=d,a=x,o=void 0,s=void 0,l=void 0,u=void 0,o=Math.max(e.minX,a.minX),s=Math.max(e.minY,a.minY),l=Math.min(e.maxX,a.maxX),u=Math.min(e.maxY,a.maxY),Math.max(0,l-o)*Math.max(0,u-s)),M=f(d)+f(x);v<m?(m=v,r=p,c=M<c?M:c):v===m&&M<c&&(c=M,r=p)}return r||n-i},r.prototype._chooseSplitAxis=function(t,i,n){var r=t.leaf?this.compareMinX:s,e=t.leaf?this.compareMinY:l;this._allDistMargin(t,i,n,r)<this._allDistMargin(t,i,n,e)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,i,n,r){t.children.sort(r);for(var e=this.toBBox,a=h(t,0,i,e),s=h(t,n-i,n,e),l=u(a)+u(s),f=i;f<n-i;f++){var m=t.children[f];o(a,t.leaf?e(m):m),l+=u(a)}for(var c=n-i-1;c>=i;c--){var p=t.children[c];o(s,t.leaf?e(p):p),l+=u(s)}return l},r.prototype._adjustParentBBoxes=function(t,i,n){for(var r=n;r>=0;r--)o(i[r],t)},r.prototype._condense=function(t){for(var i=t.length-1,n=void 0;i>=0;i--)0===t[i].children.length?i>0?(n=t[i-1].children).splice(n.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},r});\n\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/rbush/rbush.min.js?");
|
|
1571
|
-
|
|
1572
|
-
/***/ }),
|
|
1573
|
-
|
|
1574
|
-
/***/ "../../node_modules/tslib/tslib.es6.js":
|
|
1575
|
-
/*!************************************************************************!*\
|
|
1576
|
-
!*** /Users/panyuqi/Documents/webgl/g/node_modules/tslib/tslib.es6.js ***!
|
|
1577
|
-
\************************************************************************/
|
|
1578
|
-
/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */
|
|
1579
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1580
|
-
|
|
1581
|
-
"use strict";
|
|
1582
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__extends\", function() { return __extends; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__assign\", function() { return __assign; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__rest\", function() { return __rest; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__decorate\", function() { return __decorate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__param\", function() { return __param; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__metadata\", function() { return __metadata; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__awaiter\", function() { return __awaiter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__generator\", function() { return __generator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__createBinding\", function() { return __createBinding; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__exportStar\", function() { return __exportStar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__values\", function() { return __values; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__read\", function() { return __read; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spread\", function() { return __spread; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spreadArrays\", function() { return __spreadArrays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__spreadArray\", function() { return __spreadArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__await\", function() { return __await; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncGenerator\", function() { return __asyncGenerator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncDelegator\", function() { return __asyncDelegator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__asyncValues\", function() { return __asyncValues; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__makeTemplateObject\", function() { return __makeTemplateObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__importStar\", function() { return __importStar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__importDefault\", function() { return __importDefault; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__classPrivateFieldGet\", function() { return __classPrivateFieldGet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__classPrivateFieldSet\", function() { return __classPrivateFieldSet; });\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nfunction __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nvar __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nfunction __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nfunction __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nfunction __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nfunction __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nfunction __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nfunction __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nfunction __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nfunction __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nfunction __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nfunction __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nfunction __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nfunction __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nfunction __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\n\n//# sourceURL=webpack://G.Canvas2D//Users/panyuqi/Documents/webgl/g/node_modules/tslib/tslib.es6.js?");
|
|
1583
|
-
|
|
1584
|
-
/***/ }),
|
|
1585
|
-
|
|
1586
|
-
/***/ "../g-math/lib/arc.js":
|
|
1587
|
-
/*!****************************!*\
|
|
1588
|
-
!*** ../g-math/lib/arc.js ***!
|
|
1589
|
-
\****************************/
|
|
1590
|
-
/*! no static exports found */
|
|
1591
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1592
|
-
|
|
1593
|
-
"use strict";
|
|
1594
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _util = __webpack_require__(/*! ./util */ \"../g-math/lib/util.js\");\n\nvar _ellipse = _interopRequireDefault(__webpack_require__(/*! ./ellipse */ \"../g-math/lib/ellipse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// 偏导数 x\nfunction derivativeXAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle) {\n return -1 * rx * Math.cos(xRotation) * Math.sin(angle) - ry * Math.sin(xRotation) * Math.cos(angle);\n} // 偏导数 y\n\n\nfunction derivativeYAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle) {\n return -1 * rx * Math.sin(xRotation) * Math.sin(angle) + ry * Math.cos(xRotation) * Math.cos(angle);\n} // x 的极值\n\n\nfunction xExtrema(rx, ry, xRotation) {\n return Math.atan(-ry / rx * Math.tan(xRotation));\n} // y 的极值\n\n\nfunction yExtrema(rx, ry, xRotation) {\n return Math.atan(ry / (rx * Math.tan(xRotation)));\n} // 根据角度求 x 坐标\n\n\nfunction xAt(cx, cy, rx, ry, xRotation, angle) {\n return rx * Math.cos(xRotation) * Math.cos(angle) - ry * Math.sin(xRotation) * Math.sin(angle) + cx;\n} // 根据角度求 y 坐标\n\n\nfunction yAt(cx, cy, rx, ry, xRotation, angle) {\n return rx * Math.sin(xRotation) * Math.cos(angle) + ry * Math.cos(xRotation) * Math.sin(angle) + cy;\n} // 获取点在椭圆上的角度\n\n\nfunction getAngle(rx, ry, x0, y0) {\n var angle = Math.atan2(y0 * rx, x0 * ry); // 转换到 0 - 2PI 内\n\n return (angle + Math.PI * 2) % (Math.PI * 2);\n} // 根据角度获取,x,y\n\n\nfunction getPoint(rx, ry, angle) {\n return {\n x: rx * Math.cos(angle),\n y: ry * Math.sin(angle)\n };\n} // 旋转\n\n\nfunction rotate(x, y, angle) {\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n return [x * cos - y * sin, x * sin + y * cos];\n}\n\nvar _default = {\n /**\n * 计算包围盒\n * @param {number} cx 圆心 x\n * @param {number} cy 圆心 y\n * @param {number} rx x 轴方向的半径\n * @param {number} ry y 轴方向的半径\n * @param {number} xRotation 旋转角度\n * @param {number} startAngle 起始角度\n * @param {number} endAngle 结束角度\n * @return {object} 包围盒对象\n */\n box: function box(cx, cy, rx, ry, xRotation, startAngle, endAngle) {\n var xDim = xExtrema(rx, ry, xRotation);\n var minX = Infinity;\n var maxX = -Infinity;\n var xs = [startAngle, endAngle];\n\n for (var i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) {\n var xAngle = xDim + i;\n\n if (startAngle < endAngle) {\n if (startAngle < xAngle && xAngle < endAngle) {\n xs.push(xAngle);\n }\n } else {\n if (endAngle < xAngle && xAngle < startAngle) {\n xs.push(xAngle);\n }\n }\n }\n\n for (var i = 0; i < xs.length; i++) {\n var x = xAt(cx, cy, rx, ry, xRotation, xs[i]);\n\n if (x < minX) {\n minX = x;\n }\n\n if (x > maxX) {\n maxX = x;\n }\n }\n\n var yDim = yExtrema(rx, ry, xRotation);\n var minY = Infinity;\n var maxY = -Infinity;\n var ys = [startAngle, endAngle];\n\n for (var i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) {\n var yAngle = yDim + i;\n\n if (startAngle < endAngle) {\n if (startAngle < yAngle && yAngle < endAngle) {\n ys.push(yAngle);\n }\n } else {\n if (endAngle < yAngle && yAngle < startAngle) {\n ys.push(yAngle);\n }\n }\n }\n\n for (var i = 0; i < ys.length; i++) {\n var y = yAt(cx, cy, rx, ry, xRotation, ys[i]);\n\n if (y < minY) {\n minY = y;\n }\n\n if (y > maxY) {\n maxY = y;\n }\n }\n\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n },\n\n /**\n * 获取圆弧的长度,计算圆弧长度时不考虑旋转角度,\n * 仅跟 rx, ry, startAngle, endAngle 相关\n * @param {number} cx 圆心 x\n * @param {number} cy 圆心 y\n * @param {number} rx x 轴方向的半径\n * @param {number} ry y 轴方向的半径\n * @param {number} xRotation 旋转角度\n * @param {number} startAngle 起始角度\n * @param {number} endAngle 结束角度\n */\n length: function length(cx, cy, rx, ry, xRotation, startAngle, endAngle) {},\n\n /**\n * 获取指定点到圆弧的最近距离的点\n * @param {number} cx 圆心 x\n * @param {number} cy 圆心 y\n * @param {number} rx x 轴方向的半径\n * @param {number} ry y 轴方向的半径\n * @param {number} xRotation 旋转角度\n * @param {number} startAngle 起始角度\n * @param {number} endAngle 结束角度\n * @param {number} x0 指定点的 x\n * @param {number} y0 指定点的 y\n * @return {object} 到指定点最近距离的点\n */\n nearestPoint: function nearestPoint(cx, cy, rx, ry, xRotation, startAngle, endAngle, x0, y0) {\n // 将最近距离问题转换成到椭圆中心 0,0 没有旋转的椭圆问题\n var relativeVector = rotate(x0 - cx, y0 - cy, -xRotation);\n\n var _a = (0, _tslib.__read)(relativeVector, 2),\n x1 = _a[0],\n y1 = _a[1]; // 计算点到椭圆的最近的点\n\n\n var relativePoint = _ellipse.default.nearestPoint(0, 0, rx, ry, x1, y1); // 获取点在椭圆上的角度\n\n\n var angle = getAngle(rx, ry, relativePoint.x, relativePoint.y); // 点没有在圆弧上\n\n if (angle < startAngle) {\n // 小于起始圆弧\n relativePoint = getPoint(rx, ry, startAngle);\n } else if (angle > endAngle) {\n // 大于结束圆弧\n relativePoint = getPoint(rx, ry, endAngle);\n } // 旋转到 xRotation 的角度\n\n\n var vector = rotate(relativePoint.x, relativePoint.y, xRotation);\n return {\n x: vector[0] + cx,\n y: vector[1] + cy\n };\n },\n pointDistance: function pointDistance(cx, cy, rx, ry, xRotation, startAngle, endAngle, x0, y0) {\n var nearestPoint = this.nearestPoint(cx, cy, rx, ry, xRotation, startAngle, endAngle, x0, y0);\n return (0, _util.distance)(nearestPoint.x, nearestPoint.y, x0, y0);\n },\n pointAt: function pointAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, t) {\n var angle = (endAngle - startAngle) * t + startAngle;\n return {\n x: xAt(cx, cy, rx, ry, xRotation, angle),\n y: yAt(cx, cy, rx, ry, xRotation, angle)\n };\n },\n tangentAngle: function tangentAngle(cx, cy, rx, ry, xRotation, startAngle, endAngle, t) {\n var angle = (endAngle - startAngle) * t + startAngle;\n var dx = derivativeXAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle);\n var dy = derivativeYAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle);\n return (0, _util.piMod)(Math.atan2(dy, dx));\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://G.Canvas2D/../g-math/lib/arc.js?");
|
|
1595
|
-
|
|
1596
|
-
/***/ }),
|
|
1597
|
-
|
|
1598
|
-
/***/ "../g-math/lib/bezier.js":
|
|
1599
|
-
/*!*******************************!*\
|
|
1600
|
-
!*** ../g-math/lib/bezier.js ***!
|
|
1601
|
-
\*******************************/
|
|
1602
|
-
/*! no static exports found */
|
|
1603
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1604
|
-
|
|
1605
|
-
"use strict";
|
|
1606
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.nearestPoint = nearestPoint;\nexports.snapLength = snapLength;\n\nvar _util = __webpack_require__(/*! ./util */ \"../g-math/lib/util.js\");\n\nvar EPSILON = 0.0001;\n/**\n * 使用牛顿切割法求最近的点\n * @param {number[]} xArr 点的 x 数组\n * @param {number[]} yArr 点的 y 数组\n * @param {number} x 指定的点 x\n * @param {number} y 指定的点 y\n * @param {Function} tCallback 差值函数\n */\n\nfunction nearestPoint(xArr, yArr, x, y, tCallback, length) {\n var t = -1;\n var d = Infinity;\n var v0 = [x, y];\n var segNum = 20;\n\n if (length && length > 200) {\n segNum = length / 10;\n }\n\n var increaseRate = 1 / segNum;\n var interval = increaseRate / 10;\n\n for (var i = 0; i <= segNum; i++) {\n var _t = i * increaseRate;\n\n var v1 = [tCallback.apply(null, xArr.concat([_t])), tCallback.apply(null, yArr.concat([_t]))];\n var d1 = (0, _util.distance)(v0[0], v0[1], v1[0], v1[1]);\n\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n } // 提前终止\n\n\n if (t === 0) {\n return {\n x: xArr[0],\n y: yArr[0]\n };\n }\n\n if (t === 1) {\n var count = xArr.length;\n return {\n x: xArr[count - 1],\n y: yArr[count - 1]\n };\n }\n\n d = Infinity;\n\n for (var i = 0; i < 32; i++) {\n if (interval < EPSILON) {\n break;\n }\n\n var prev = t - interval;\n var next = t + interval;\n var v1 = [tCallback.apply(null, xArr.concat([prev])), tCallback.apply(null, yArr.concat([prev]))];\n var d1 = (0, _util.distance)(v0[0], v0[1], v1[0], v1[1]);\n\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n } else {\n var v2 = [tCallback.apply(null, xArr.concat([next])), tCallback.apply(null, yArr.concat([next]))];\n var d2 = (0, _util.distance)(v0[0], v0[1], v2[0], v2[1]);\n\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n } else {\n interval *= 0.5;\n }\n }\n }\n\n return {\n x: tCallback.apply(null, xArr.concat([t])),\n y: tCallback.apply(null, yArr.concat([t]))\n };\n} // 近似求解 https://community.khronos.org/t/3d-cubic-bezier-segment-length/62363/2\n\n\nfunction snapLength(xArr, yArr) {\n var totalLength = 0;\n var count = xArr.length;\n\n for (var i = 0; i < count; i++) {\n var x = xArr[i];\n var y = yArr[i];\n var nextX = xArr[(i + 1) % count];\n var nextY = yArr[(i + 1) % count];\n totalLength += (0, _util.distance)(x, y, nextX, nextY);\n }\n\n return totalLength / 2;\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-math/lib/bezier.js?");
|
|
1607
|
-
|
|
1608
|
-
/***/ }),
|
|
1609
|
-
|
|
1610
|
-
/***/ "../g-math/lib/cubic.js":
|
|
1611
|
-
/*!******************************!*\
|
|
1612
|
-
!*** ../g-math/lib/cubic.js ***!
|
|
1613
|
-
\******************************/
|
|
1614
|
-
/*! no static exports found */
|
|
1615
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1616
|
-
|
|
1617
|
-
"use strict";
|
|
1618
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _util = __webpack_require__(/*! ./util */ \"../g-math/lib/util.js\");\n\nvar _line = _interopRequireDefault(__webpack_require__(/*! ./line */ \"../g-math/lib/line.js\"));\n\nvar _bezier = __webpack_require__(/*! ./bezier */ \"../g-math/lib/bezier.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction cubicAt(p0, p1, p2, p3, t) {\n var onet = 1 - t; // t * t * t 的性能大概是 Math.pow(t, 3) 的三倍\n\n return onet * onet * onet * p0 + 3 * p1 * t * onet * onet + 3 * p2 * t * t * onet + p3 * t * t * t;\n}\n\nfunction derivativeAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return 3 * (onet * onet * (p1 - p0) + 2 * onet * t * (p2 - p1) + t * t * (p3 - p2));\n}\n\nfunction extrema(p0, p1, p2, p3) {\n var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;\n var b = 6 * p0 - 12 * p1 + 6 * p2;\n var c = 3 * p1 - 3 * p0;\n var extremas = [];\n var t1;\n var t2;\n var discSqrt;\n\n if ((0, _util.isNumberEqual)(a, 0)) {\n if (!(0, _util.isNumberEqual)(b, 0)) {\n t1 = -c / b;\n\n if (t1 >= 0 && t1 <= 1) {\n extremas.push(t1);\n }\n }\n } else {\n var disc = b * b - 4 * a * c;\n\n if ((0, _util.isNumberEqual)(disc, 0)) {\n extremas.push(-b / (2 * a));\n } else if (disc > 0) {\n discSqrt = Math.sqrt(disc);\n t1 = (-b + discSqrt) / (2 * a);\n t2 = (-b - discSqrt) / (2 * a);\n\n if (t1 >= 0 && t1 <= 1) {\n extremas.push(t1);\n }\n\n if (t2 >= 0 && t2 <= 1) {\n extremas.push(t2);\n }\n }\n }\n\n return extremas;\n} // 分割贝塞尔曲线\n\n\nfunction divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, t) {\n // 划分点\n var xt = cubicAt(x1, x2, x3, x4, t);\n var yt = cubicAt(y1, y2, y3, y4, t); // 计算两点之间的差值点\n\n var c1 = _line.default.pointAt(x1, y1, x2, y2, t);\n\n var c2 = _line.default.pointAt(x2, y2, x3, y3, t);\n\n var c3 = _line.default.pointAt(x3, y3, x4, y4, t);\n\n var c12 = _line.default.pointAt(c1.x, c1.y, c2.x, c2.y, t);\n\n var c23 = _line.default.pointAt(c2.x, c2.y, c3.x, c3.y, t);\n\n return [[x1, y1, c1.x, c1.y, c12.x, c12.y, xt, yt], [xt, yt, c23.x, c23.y, c3.x, c3.y, x4, y4]];\n} // 使用迭代法取贝塞尔曲线的长度,二阶和三阶分开写,更清晰和便于调试\n\n\nfunction cubicLength(x1, y1, x2, y2, x3, y3, x4, y4, iterationCount) {\n if (iterationCount === 0) {\n return (0, _bezier.snapLength)([x1, x2, x3, x4], [y1, y2, y3, y4]);\n }\n\n var cubics = divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, 0.5);\n var left = (0, _tslib.__spreadArray)((0, _tslib.__spreadArray)([], (0, _tslib.__read)(cubics[0]), false), [iterationCount - 1], false);\n var right = (0, _tslib.__spreadArray)((0, _tslib.__spreadArray)([], (0, _tslib.__read)(cubics[1]), false), [iterationCount - 1], false);\n return cubicLength.apply(null, left) + cubicLength.apply(null, right);\n}\n\nvar _default = {\n extrema: extrema,\n box: function box(x1, y1, x2, y2, x3, y3, x4, y4) {\n var xArr = [x1, x4];\n var yArr = [y1, y4];\n var xExtrema = extrema(x1, x2, x3, x4);\n var yExtrema = extrema(y1, y2, y3, y4);\n\n for (var i = 0; i < xExtrema.length; i++) {\n xArr.push(cubicAt(x1, x2, x3, x4, xExtrema[i]));\n }\n\n for (var i = 0; i < yExtrema.length; i++) {\n yArr.push(cubicAt(y1, y2, y3, y4, yExtrema[i]));\n }\n\n return (0, _util.getBBoxByArray)(xArr, yArr);\n },\n length: function length(x1, y1, x2, y2, x3, y3, x4, y4) {\n // 迭代三次,划分成 8 段求长度\n return cubicLength(x1, y1, x2, y2, x3, y3, x4, y4, 3);\n },\n nearestPoint: function nearestPoint(x1, y1, x2, y2, x3, y3, x4, y4, x0, y0, length) {\n return (0, _bezier.nearestPoint)([x1, x2, x3, x4], [y1, y2, y3, y4], x0, y0, cubicAt, length);\n },\n pointDistance: function pointDistance(x1, y1, x2, y2, x3, y3, x4, y4, x0, y0, length) {\n var point = this.nearestPoint(x1, y1, x2, y2, x3, y3, x4, y4, x0, y0, length);\n return (0, _util.distance)(point.x, point.y, x0, y0);\n },\n interpolationAt: cubicAt,\n pointAt: function pointAt(x1, y1, x2, y2, x3, y3, x4, y4, t) {\n return {\n x: cubicAt(x1, x2, x3, x4, t),\n y: cubicAt(y1, y2, y3, y4, t)\n };\n },\n divide: function divide(x1, y1, x2, y2, x3, y3, x4, y4, t) {\n return divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, t);\n },\n tangentAngle: function tangentAngle(x1, y1, x2, y2, x3, y3, x4, y4, t) {\n var dx = derivativeAt(x1, x2, x3, x4, t);\n var dy = derivativeAt(y1, y2, y3, y4, t);\n return (0, _util.piMod)(Math.atan2(dy, dx));\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://G.Canvas2D/../g-math/lib/cubic.js?");
|
|
1619
|
-
|
|
1620
|
-
/***/ }),
|
|
1621
|
-
|
|
1622
|
-
/***/ "../g-math/lib/ellipse.js":
|
|
1623
|
-
/*!********************************!*\
|
|
1624
|
-
!*** ../g-math/lib/ellipse.js ***!
|
|
1625
|
-
\********************************/
|
|
1626
|
-
/*! no static exports found */
|
|
1627
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1628
|
-
|
|
1629
|
-
"use strict";
|
|
1630
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _util = __webpack_require__(/*! ./util */ \"../g-math/lib/util.js\");\n\n/**\n * @fileoverview 椭圆的一些计算,\n * - 周长计算参考:https://www.mathsisfun.com/geometry/ellipse-perimeter.html\n * - 距离计算参考:https://wet-robots.ghost.io/simple-method-for-distance-to-ellipse/\n * @author dxq613@gmail.com\n */\nfunction copysign(v1, v2) {\n var absv = Math.abs(v1);\n return v2 > 0 ? absv : absv * -1;\n}\n\nvar _default = {\n /**\n * 包围盒计算\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @return {object} 包围盒\n */\n box: function box(x, y, rx, ry) {\n return {\n x: x - rx,\n y: y - ry,\n width: rx * 2,\n height: ry * 2\n };\n },\n\n /**\n * 计算周长,使用近似法\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @return {number} 椭圆周长\n */\n length: function length(x, y, rx, ry) {\n return Math.PI * (3 * (rx + ry) - Math.sqrt((3 * rx + ry) * (rx + 3 * ry)));\n },\n\n /**\n * 距离椭圆最近的点\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} x0 指定的点 x\n * @param {number} y0 指定的点 y\n * @return {object} 椭圆上距离指定点最近的点\n */\n nearestPoint: function nearestPoint(x, y, rx, ry, x0, y0) {\n var a = rx;\n var b = ry; // 假如椭圆半径为0则返回圆心\n\n if (a === 0 || b === 0) {\n return {\n x: x,\n y: y\n };\n } // 转换成 0, 0 为中心的椭圆计算\n\n\n var relativeX = x0 - x;\n var relativeY = y0 - y;\n var px = Math.abs(relativeX);\n var py = Math.abs(relativeY);\n var squareA = a * a;\n var squareB = b * b; // const angle0 = Math.atan2(relativeY, relativeX);\n\n var t = Math.PI / 4;\n var nearestX = 0; // 椭圆上的任一点\n\n var nearestY = 0; // 迭代 4 次\n\n for (var i = 0; i < 4; i++) {\n nearestX = a * Math.cos(t);\n nearestY = b * Math.sin(t);\n var ex = (squareA - squareB) * Math.pow(Math.cos(t), 3) / a;\n var ey = (squareB - squareA) * Math.pow(Math.sin(t), 3) / b;\n var rx1 = nearestX - ex;\n var ry1 = nearestY - ey;\n var qx = px - ex;\n var qy = py - ey;\n var r = Math.hypot(ry1, rx1);\n var q = Math.hypot(qy, qx);\n var delta_c = r * Math.asin((rx1 * qy - ry1 * qx) / (r * q));\n var delta_t = delta_c / Math.sqrt(squareA + squareB - nearestX * nearestX - nearestY * nearestY);\n t += delta_t;\n t = Math.min(Math.PI / 2, Math.max(0, t));\n }\n\n return {\n x: x + copysign(nearestX, relativeX),\n y: y + copysign(nearestY, relativeY)\n };\n },\n\n /**\n * 点到椭圆最近的距离\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} x0 指定的点 x\n * @param {number} y0 指定的点 y\n * @return {number} 点到椭圆的距离\n */\n pointDistance: function pointDistance(x, y, rx, ry, x0, y0) {\n var nearestPoint = this.nearestPoint(x, y, rx, ry, x0, y0);\n return (0, _util.distance)(nearestPoint.x, nearestPoint.y, x0, y0);\n },\n\n /**\n * 根据比例获取点\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} t 指定比例,x轴方向为 0\n * @return {object} 点\n */\n pointAt: function pointAt(x, y, rx, ry, t) {\n var angle = 2 * Math.PI * t; // 按照角度进行计算,而不按照周长计算\n\n return {\n x: x + rx * Math.cos(angle),\n y: y + ry * Math.sin(angle)\n };\n },\n\n /**\n * 根据比例计算切线角度\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} t 指定比例 0 - 1 之间,x轴方向为 0。在 0-1 范围之外是循环还是返回 null,还需要调整\n * @return {number} 角度,在 0 - 2PI 之间\n */\n tangentAngle: function tangentAngle(x, y, rx, ry, t) {\n var angle = 2 * Math.PI * t; // 按照角度进行计算,而不按照周长计算\n // 直接使用 x,y 的导数计算, x' = -rx * sin(t); y' = ry * cos(t);\n\n var tangentAngle = Math.atan2(ry * Math.cos(angle), -rx * Math.sin(angle)); // 也可以使用指定点的切线方程计算,成本有些高\n // const point = this.pointAt(0, 0, rx, ry, t); // 椭圆的切线同椭圆的中心不相关\n // let tangentAngle = -1 * Math.atan((ry * ry * point.x) / (rx * rx * point.y));\n // if (angle >= 0 && angle <= Math.PI) {\n // tangentAngle += Math.PI;\n // }\n\n return (0, _util.piMod)(tangentAngle);\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://G.Canvas2D/../g-math/lib/ellipse.js?");
|
|
1631
|
-
|
|
1632
|
-
/***/ }),
|
|
1633
|
-
|
|
1634
|
-
/***/ "../g-math/lib/index.js":
|
|
1635
|
-
/*!******************************!*\
|
|
1636
|
-
!*** ../g-math/lib/index.js ***!
|
|
1637
|
-
\******************************/
|
|
1638
|
-
/*! no static exports found */
|
|
1639
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1640
|
-
|
|
1641
|
-
"use strict";
|
|
1642
|
-
eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Quad\", {\n enumerable: true,\n get: function get() {\n return _quadratic.default;\n }\n});\nObject.defineProperty(exports, \"Cubic\", {\n enumerable: true,\n get: function get() {\n return _cubic.default;\n }\n});\nObject.defineProperty(exports, \"Arc\", {\n enumerable: true,\n get: function get() {\n return _arc.default;\n }\n});\nObject.defineProperty(exports, \"Line\", {\n enumerable: true,\n get: function get() {\n return _line.default;\n }\n});\nObject.defineProperty(exports, \"Polygon\", {\n enumerable: true,\n get: function get() {\n return _polygon.default;\n }\n});\nObject.defineProperty(exports, \"Polyline\", {\n enumerable: true,\n get: function get() {\n return _polyline.default;\n }\n});\nexports.Util = void 0;\n\nvar _quadratic = _interopRequireDefault(__webpack_require__(/*! ./quadratic */ \"../g-math/lib/quadratic.js\"));\n\nvar _cubic = _interopRequireDefault(__webpack_require__(/*! ./cubic */ \"../g-math/lib/cubic.js\"));\n\nvar _arc = _interopRequireDefault(__webpack_require__(/*! ./arc */ \"../g-math/lib/arc.js\"));\n\nvar _line = _interopRequireDefault(__webpack_require__(/*! ./line */ \"../g-math/lib/line.js\"));\n\nvar _polygon = _interopRequireDefault(__webpack_require__(/*! ./polygon */ \"../g-math/lib/polygon.js\"));\n\nvar _polyline = _interopRequireDefault(__webpack_require__(/*! ./polyline */ \"../g-math/lib/polyline.js\"));\n\nvar Util = _interopRequireWildcard(__webpack_require__(/*! ./util */ \"../g-math/lib/util.js\"));\n\nexports.Util = Util;\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n//# sourceURL=webpack://G.Canvas2D/../g-math/lib/index.js?");
|
|
1643
|
-
|
|
1644
|
-
/***/ }),
|
|
1645
|
-
|
|
1646
|
-
/***/ "../g-math/lib/line.js":
|
|
1647
|
-
/*!*****************************!*\
|
|
1648
|
-
!*** ../g-math/lib/line.js ***!
|
|
1649
|
-
\*****************************/
|
|
1650
|
-
/*! no static exports found */
|
|
1651
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1652
|
-
|
|
1653
|
-
"use strict";
|
|
1654
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _util = __webpack_require__(/*! ./util */ \"../g-math/lib/util.js\");\n\nvar _glMatrix = __webpack_require__(/*! gl-matrix */ \"../../node_modules/gl-matrix/esm/index.js\");\n\nvar _default = {\n /**\n * 计算线段的包围盒\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {object} 包围盒对象\n */\n box: function box(x1, y1, x2, y2) {\n return (0, _util.getBBoxByArray)([x1, x2], [y1, y2]);\n },\n\n /**\n * 线段的长度\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {number} 距离\n */\n length: function length(x1, y1, x2, y2) {\n return (0, _util.distance)(x1, y1, x2, y2);\n },\n\n /**\n * 根据比例获取点\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @param {number} t 指定比例\n * @return {object} 包含 x, y 的点\n */\n pointAt: function pointAt(x1, y1, x2, y2, t) {\n return {\n x: (1 - t) * x1 + t * x2,\n y: (1 - t) * y1 + t * y2\n };\n },\n\n /**\n * 点到线段的距离\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @param {number} x 测试点 x\n * @param {number} y 测试点 y\n * @return {number} 距离\n */\n pointDistance: function pointDistance(x1, y1, x2, y2, x, y) {\n // 投影距离 x1, y1 的向量,假设 p, p1, p2 三个点,投影点为 a\n // p1a = p1p.p1p2/|p1p2| * (p1p 的单位向量)\n var cross = (x2 - x1) * (x - x1) + (y2 - y1) * (y - y1);\n\n if (cross < 0) {\n return (0, _util.distance)(x1, y1, x, y);\n }\n\n var lengthSquare = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);\n\n if (cross > lengthSquare) {\n return (0, _util.distance)(x2, y2, x, y);\n }\n\n return this.pointToLine(x1, y1, x2, y2, x, y);\n },\n\n /**\n * 点到直线的距离,而不是点到线段的距离\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @param {number} x 测试点 x\n * @param {number} y 测试点 y\n * @return {number} 距离\n */\n pointToLine: function pointToLine(x1, y1, x2, y2, x, y) {\n var d = [x2 - x1, y2 - y1]; // 如果端点相等,则判定点到点的距离\n\n if (_glMatrix.vec2.exactEquals(d, [0, 0])) {\n return Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));\n }\n\n var u = [-d[1], d[0]];\n\n _glMatrix.vec2.normalize(u, u);\n\n var a = [x - x1, y - y1];\n return Math.abs(_glMatrix.vec2.dot(a, u));\n },\n\n /**\n * 线段的角度\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {number} 导数\n */\n tangentAngle: function tangentAngle(x1, y1, x2, y2) {\n return Math.atan2(y2 - y1, x2 - x1);\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://G.Canvas2D/../g-math/lib/line.js?");
|
|
1655
|
-
|
|
1656
|
-
/***/ }),
|
|
1657
|
-
|
|
1658
|
-
/***/ "../g-math/lib/polygon.js":
|
|
1659
|
-
/*!********************************!*\
|
|
1660
|
-
!*** ../g-math/lib/polygon.js ***!
|
|
1661
|
-
\********************************/
|
|
1662
|
-
/*! no static exports found */
|
|
1663
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1664
|
-
|
|
1665
|
-
"use strict";
|
|
1666
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _segments = __webpack_require__(/*! ./segments */ \"../g-math/lib/segments.js\");\n\nvar _polyline = _interopRequireDefault(__webpack_require__(/*! ./polyline */ \"../g-math/lib/polyline.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getAllPoints(points) {\n var tmp = points.slice(0);\n\n if (points.length) {\n tmp.push(points[0]);\n }\n\n return tmp;\n}\n\nvar _default = {\n /**\n * 计算多边形的包围盒\n * @param {array} points 点的集合 [x,y] 的形式\n * @return {object} 包围盒\n */\n box: function box(points) {\n return _polyline.default.box(points);\n },\n\n /**\n * 计算多边形的长度\n * @param {array} points 点的集合 [x,y] 的形式\n * @return {object} 多边形边的长度\n */\n length: function length(points) {\n return (0, _segments.lengthOfSegment)(getAllPoints(points));\n },\n\n /**\n * 根据比例获取多边形的点\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} t 在多边形的长度上的比例\n * @return {object} 根据比例值计算出来的点\n */\n pointAt: function pointAt(points, t) {\n return (0, _segments.pointAtSegments)(getAllPoints(points), t);\n },\n\n /**\n * 指定点到多边形的距离\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} x 指定点的 x\n * @param {number} y 指定点的 y\n * @return {number} 点到多边形的距离\n */\n pointDistance: function pointDistance(points, x, y) {\n return (0, _segments.distanceAtSegment)(getAllPoints(points), x, y);\n },\n\n /**\n * 根据比例获取多边形的切线角度\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} t 在多边形的长度上的比例\n * @return {object} 根据比例值计算出来的角度\n */\n tangentAngle: function tangentAngle(points, t) {\n return (0, _segments.angleAtSegments)(getAllPoints(points), t);\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://G.Canvas2D/../g-math/lib/polygon.js?");
|
|
1667
|
-
|
|
1668
|
-
/***/ }),
|
|
1669
|
-
|
|
1670
|
-
/***/ "../g-math/lib/polyline.js":
|
|
1671
|
-
/*!*********************************!*\
|
|
1672
|
-
!*** ../g-math/lib/polyline.js ***!
|
|
1673
|
-
\*********************************/
|
|
1674
|
-
/*! no static exports found */
|
|
1675
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1676
|
-
|
|
1677
|
-
"use strict";
|
|
1678
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _segments = __webpack_require__(/*! ./segments */ \"../g-math/lib/segments.js\");\n\nvar _util = __webpack_require__(/*! ./util */ \"../g-math/lib/util.js\");\n\nvar _default = {\n /**\n * 计算多折线的包围盒\n * @param {array} points 点的集合 [x,y] 的形式\n * @return {object} 包围盒\n */\n box: function box(points) {\n var xArr = [];\n var yArr = [];\n\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n xArr.push(point[0]);\n yArr.push(point[1]);\n }\n\n return (0, _util.getBBoxByArray)(xArr, yArr);\n },\n\n /**\n * 计算多折线的长度\n * @param {array} points 点的集合 [x,y] 的形式\n * @return {object} 多条边的长度\n */\n length: function length(points) {\n return (0, _segments.lengthOfSegment)(points);\n },\n\n /**\n * 根据比例获取多折线的点\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} t 在多折线的长度上的比例\n * @return {object} 根据比例值计算出来的点\n */\n pointAt: function pointAt(points, t) {\n return (0, _segments.pointAtSegments)(points, t);\n },\n\n /**\n * 指定点到多折线的距离\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} x 指定点的 x\n * @param {number} y 指定点的 y\n * @return {number} 点到多折线的距离\n */\n pointDistance: function pointDistance(points, x, y) {\n return (0, _segments.distanceAtSegment)(points, x, y);\n },\n\n /**\n * 根据比例获取多折线的切线角度\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} t 在多折线的长度上的比例\n * @return {object} 根据比例值计算出来的角度\n */\n tangentAngle: function tangentAngle(points, t) {\n return (0, _segments.angleAtSegments)(points, t);\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://G.Canvas2D/../g-math/lib/polyline.js?");
|
|
1679
|
-
|
|
1680
|
-
/***/ }),
|
|
1681
|
-
|
|
1682
|
-
/***/ "../g-math/lib/quadratic.js":
|
|
1683
|
-
/*!**********************************!*\
|
|
1684
|
-
!*** ../g-math/lib/quadratic.js ***!
|
|
1685
|
-
\**********************************/
|
|
1686
|
-
/*! no static exports found */
|
|
1687
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1688
|
-
|
|
1689
|
-
"use strict";
|
|
1690
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _line = _interopRequireDefault(__webpack_require__(/*! ./line */ \"../g-math/lib/line.js\"));\n\nvar _util = __webpack_require__(/*! ./util */ \"../g-math/lib/util.js\");\n\nvar _bezier = __webpack_require__(/*! ./bezier */ \"../g-math/lib/bezier.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// 差值公式\nfunction quadraticAt(p0, p1, p2, t) {\n var onet = 1 - t;\n return onet * onet * p0 + 2 * t * onet * p1 + t * t * p2;\n} // 求极值\n\n\nfunction extrema(p0, p1, p2) {\n var a = p0 + p2 - 2 * p1;\n\n if ((0, _util.isNumberEqual)(a, 0)) {\n return [0.5];\n }\n\n var rst = (p0 - p1) / a;\n\n if (rst <= 1 && rst >= 0) {\n return [rst];\n }\n\n return [];\n}\n\nfunction derivativeAt(p0, p1, p2, t) {\n return 2 * (1 - t) * (p1 - p0) + 2 * t * (p2 - p1);\n} // 分割贝塞尔曲线\n\n\nfunction divideQuadratic(x1, y1, x2, y2, x3, y3, t) {\n // 划分点\n var xt = quadraticAt(x1, x2, x3, t);\n var yt = quadraticAt(y1, y2, y3, t); // 分割的第一条曲线的控制点\n\n var controlPoint1 = _line.default.pointAt(x1, y1, x2, y2, t); // 分割的第二条曲线的控制点\n\n\n var controlPoint2 = _line.default.pointAt(x2, y2, x3, y3, t);\n\n return [[x1, y1, controlPoint1.x, controlPoint1.y, xt, yt], [xt, yt, controlPoint2.x, controlPoint2.y, x3, y3]];\n} // 使用迭代法取贝塞尔曲线的长度\n\n\nfunction quadraticLength(x1, y1, x2, y2, x3, y3, iterationCount) {\n if (iterationCount === 0) {\n return ((0, _util.distance)(x1, y1, x2, y2) + (0, _util.distance)(x2, y2, x3, y3) + (0, _util.distance)(x1, y1, x3, y3)) / 2;\n }\n\n var quadratics = divideQuadratic(x1, y1, x2, y2, x3, y3, 0.5);\n var left = quadratics[0];\n var right = quadratics[1];\n left.push(iterationCount - 1);\n right.push(iterationCount - 1); // @ts-ignore\n\n return quadraticLength.apply(null, left) + quadraticLength.apply(null, right);\n}\n\nvar _default = {\n box: function box(x1, y1, x2, y2, x3, y3) {\n var xExtrema = extrema(x1, x2, x3)[0];\n var yExtrema = extrema(y1, y2, y3)[0]; // 控制点不加入 box 的计算\n\n var xArr = [x1, x3];\n var yArr = [y1, y3];\n\n if (xExtrema !== undefined) {\n xArr.push(quadraticAt(x1, x2, x3, xExtrema));\n }\n\n if (yExtrema !== undefined) {\n yArr.push(quadraticAt(y1, y2, y3, yExtrema));\n }\n\n return (0, _util.getBBoxByArray)(xArr, yArr);\n },\n length: function length(x1, y1, x2, y2, x3, y3) {\n return quadraticLength(x1, y1, x2, y2, x3, y3, 3);\n },\n nearestPoint: function nearestPoint(x1, y1, x2, y2, x3, y3, x0, y0) {\n return (0, _bezier.nearestPoint)([x1, x2, x3], [y1, y2, y3], x0, y0, quadraticAt);\n },\n pointDistance: function pointDistance(x1, y1, x2, y2, x3, y3, x0, y0) {\n var point = this.nearestPoint(x1, y1, x2, y2, x3, y3, x0, y0);\n return (0, _util.distance)(point.x, point.y, x0, y0);\n },\n interpolationAt: quadraticAt,\n pointAt: function pointAt(x1, y1, x2, y2, x3, y3, t) {\n return {\n x: quadraticAt(x1, x2, x3, t),\n y: quadraticAt(y1, y2, y3, t)\n };\n },\n divide: function divide(x1, y1, x2, y2, x3, y3, t) {\n return divideQuadratic(x1, y1, x2, y2, x3, y3, t);\n },\n tangentAngle: function tangentAngle(x1, y1, x2, y2, x3, y3, t) {\n var dx = derivativeAt(x1, x2, x3, t);\n var dy = derivativeAt(y1, y2, y3, t);\n var angle = Math.atan2(dy, dx);\n return (0, _util.piMod)(angle);\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://G.Canvas2D/../g-math/lib/quadratic.js?");
|
|
1691
|
-
|
|
1692
|
-
/***/ }),
|
|
1693
|
-
|
|
1694
|
-
/***/ "../g-math/lib/segments.js":
|
|
1695
|
-
/*!*********************************!*\
|
|
1696
|
-
!*** ../g-math/lib/segments.js ***!
|
|
1697
|
-
\*********************************/
|
|
1698
|
-
/*! no static exports found */
|
|
1699
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1700
|
-
|
|
1701
|
-
"use strict";
|
|
1702
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.lengthOfSegment = lengthOfSegment;\nexports.pointAtSegments = pointAtSegments;\nexports.angleAtSegments = angleAtSegments;\nexports.distanceAtSegment = distanceAtSegment;\n\nvar _line = _interopRequireDefault(__webpack_require__(/*! ./line */ \"../g-math/lib/line.js\"));\n\nvar _util = __webpack_require__(/*! ./util */ \"../g-math/lib/util.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction analyzePoints(points) {\n // 计算每段的长度和总的长度\n var totalLength = 0;\n var segments = [];\n\n for (var i = 0; i < points.length - 1; i++) {\n var from = points[i];\n var to = points[i + 1];\n var length_1 = (0, _util.distance)(from[0], from[1], to[0], to[1]);\n var seg = {\n from: from,\n to: to,\n length: length_1\n };\n segments.push(seg);\n totalLength += length_1;\n }\n\n return {\n segments: segments,\n totalLength: totalLength\n };\n}\n\nfunction lengthOfSegment(points) {\n if (points.length < 2) {\n return 0;\n }\n\n var totalLength = 0;\n\n for (var i = 0; i < points.length - 1; i++) {\n var from = points[i];\n var to = points[i + 1];\n totalLength += (0, _util.distance)(from[0], from[1], to[0], to[1]);\n }\n\n return totalLength;\n}\n/**\n * 按照比例在数据片段中获取点\n * @param {array} points 点的集合\n * @param {number} t 百分比 0-1\n * @return {object} 点的坐标\n */\n\n\nfunction pointAtSegments(points, t) {\n // 边界判断\n if (t > 1 || t < 0 || points.length < 2) {\n return null;\n }\n\n var _a = analyzePoints(points),\n segments = _a.segments,\n totalLength = _a.totalLength; // 多个点有可能重合\n\n\n if (totalLength === 0) {\n return {\n x: points[0][0],\n y: points[0][1]\n };\n } // 计算比例\n\n\n var startRatio = 0;\n var point = null;\n\n for (var i = 0; i < segments.length; i++) {\n var seg = segments[i];\n var from = seg.from,\n to = seg.to;\n var currentRatio = seg.length / totalLength;\n\n if (t >= startRatio && t <= startRatio + currentRatio) {\n var localRatio = (t - startRatio) / currentRatio;\n point = _line.default.pointAt(from[0], from[1], to[0], to[1], localRatio);\n break;\n }\n\n startRatio += currentRatio;\n }\n\n return point;\n}\n/**\n * 按照比例在数据片段中获取切线的角度\n * @param {array} points 点的集合\n * @param {number} t 百分比 0-1\n */\n\n\nfunction angleAtSegments(points, t) {\n // 边界判断\n if (t > 1 || t < 0 || points.length < 2) {\n return 0;\n }\n\n var _a = analyzePoints(points),\n segments = _a.segments,\n totalLength = _a.totalLength; // 计算比例\n\n\n var startRatio = 0;\n var angle = 0;\n\n for (var i = 0; i < segments.length; i++) {\n var seg = segments[i];\n var from = seg.from,\n to = seg.to;\n var currentRatio = seg.length / totalLength;\n\n if (t >= startRatio && t <= startRatio + currentRatio) {\n angle = Math.atan2(to[1] - from[1], to[0] - from[0]);\n break;\n }\n\n startRatio += currentRatio;\n }\n\n return angle;\n}\n\nfunction distanceAtSegment(points, x, y) {\n var minDistance = Infinity;\n\n for (var i = 0; i < points.length - 1; i++) {\n var point = points[i];\n var nextPoint = points[i + 1];\n\n var distance_1 = _line.default.pointDistance(point[0], point[1], nextPoint[0], nextPoint[1], x, y);\n\n if (distance_1 < minDistance) {\n minDistance = distance_1;\n }\n }\n\n return minDistance;\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-math/lib/segments.js?");
|
|
1703
|
-
|
|
1704
|
-
/***/ }),
|
|
1705
|
-
|
|
1706
|
-
/***/ "../g-math/lib/util.js":
|
|
1707
|
-
/*!*****************************!*\
|
|
1708
|
-
!*** ../g-math/lib/util.js ***!
|
|
1709
|
-
\*****************************/
|
|
1710
|
-
/*! no static exports found */
|
|
1711
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1712
|
-
|
|
1713
|
-
"use strict";
|
|
1714
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.distance = distance;\nexports.isNumberEqual = isNumberEqual;\nexports.getBBoxByArray = getBBoxByArray;\nexports.getBBoxRange = getBBoxRange;\nexports.piMod = piMod;\n\nvar _util = __webpack_require__(/*! @antv/util */ \"../../node_modules/@antv/util/esm/index.js\");\n\n/**\n * 两点之间的距离\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {number} 距离\n */\nfunction distance(x1, y1, x2, y2) {\n var dx = x1 - x2;\n var dy = y1 - y2;\n return Math.sqrt(dx * dx + dy * dy);\n}\n\nfunction isNumberEqual(v1, v2) {\n return Math.abs(v1 - v2) < 0.001;\n}\n\nfunction getBBoxByArray(xArr, yArr) {\n var minX = (0, _util.min)(xArr);\n var minY = (0, _util.min)(yArr);\n var maxX = (0, _util.max)(xArr);\n var maxY = (0, _util.max)(yArr);\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\n\nfunction getBBoxRange(x1, y1, x2, y2) {\n return {\n minX: (0, _util.min)([x1, x2]),\n maxX: (0, _util.max)([x1, x2]),\n minY: (0, _util.min)([y1, y2]),\n maxY: (0, _util.max)([y1, y2])\n };\n}\n\nfunction piMod(angle) {\n return (angle + Math.PI * 2) % (Math.PI * 2);\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-math/lib/util.js?");
|
|
1715
|
-
|
|
1716
|
-
/***/ }),
|
|
1717
|
-
|
|
1718
|
-
/***/ "../g-plugin-canvas-picker/lib/CanvasPickerPlugin.js":
|
|
1719
|
-
/*!***********************************************************!*\
|
|
1720
|
-
!*** ../g-plugin-canvas-picker/lib/CanvasPickerPlugin.js ***!
|
|
1721
|
-
\***********************************************************/
|
|
1722
|
-
/*! no static exports found */
|
|
1723
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1724
|
-
|
|
1725
|
-
"use strict";
|
|
1726
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CanvasPickerPlugin = exports.PointInPathPickerFactory = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _g = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar _gPluginCanvasRenderer = __webpack_require__(/*! @antv/g-plugin-canvas-renderer */ \"../g-plugin-canvas-renderer/lib/index.js\");\n\nvar _glMatrix = __webpack_require__(/*! gl-matrix */ \"../../node_modules/gl-matrix/esm/index.js\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar PointInPathPickerFactory = 'PointInPathPicker';\n/**\n * pick shape(s) with Mouse/Touch event\n *\n * 1. find AABB with r-tree\n * 2. do math calculation with geometry in an accurate way\n */\n\nexports.PointInPathPickerFactory = PointInPathPickerFactory;\n\nvar CanvasPickerPlugin = function () {\n function CanvasPickerPlugin() {\n var _this = this;\n\n this.isHit = function (displayObject, position, worldTransform) {\n // use picker for current shape's type\n var pick = _this.pointInPathPickerFactory(displayObject.nodeName);\n\n if (pick) {\n // invert with world matrix\n var invertWorldMat = _glMatrix.mat4.invert(_glMatrix.mat4.create(), worldTransform); // transform client position to local space, do picking in local space\n\n\n var localPosition = _glMatrix.vec3.transformMat4(_glMatrix.vec3.create(), _glMatrix.vec3.fromValues(position[0], position[1], 0), invertWorldMat); // account for anchor\n\n\n var halfExtents = displayObject.getGeometryBounds().halfExtents;\n var _a = displayObject.parsedStyle.anchor,\n anchor = _a === void 0 ? [0, 0] : _a;\n localPosition[0] += anchor[0] * halfExtents[0] * 2;\n localPosition[1] += anchor[1] * halfExtents[1] * 2;\n\n if (pick(displayObject, new _g.Point(localPosition[0], localPosition[1]), _this.isPointInPath)) {\n return true;\n }\n }\n\n return false;\n };\n /**\n * use native picking method\n * @see https://developer.mozilla.org/zh-CN/docs/Web/API/CanvasRenderingContext2D/isPointInPath\n */\n\n\n this.isPointInPath = function (displayObject, position) {\n var context = _this.offscreenCanvas.getOrCreateContext();\n\n var generatePath = _this.pathGeneratorFactory(displayObject.nodeName);\n\n if (generatePath) {\n generatePath(context, displayObject.parsedStyle);\n }\n\n return context.isPointInPath(position.x, position.y);\n };\n }\n\n CanvasPickerPlugin_1 = CanvasPickerPlugin;\n\n CanvasPickerPlugin.prototype.apply = function (renderingService) {\n var _this = this;\n\n renderingService.hooks.pick.tap(CanvasPickerPlugin_1.tag, function (result) {\n // position in world space\n var _a = result.position,\n x = _a.x,\n y = _a.y;\n\n var position = _glMatrix.vec3.fromValues(x, y, 0);\n\n var pickedDisplayObjects = []; // query by AABB first with spatial index(r-tree)\n\n var rBushNodes = _this.rBush.search({\n minX: position[0],\n minY: position[1],\n maxX: position[0],\n maxY: position[1]\n });\n\n var queriedNames = rBushNodes.map(function (node) {\n return node.name;\n });\n rBushNodes.forEach(function (_a) {\n var name = _a.name;\n\n var displayObject = _this.displayObjectPool.getByName(name);\n\n if (displayObject.isVisible() && displayObject.interactive) {\n // parent is not included, eg. parent is clipped\n if (displayObject.parentNode && queriedNames.indexOf(displayObject.parentNode.entity.getName()) === -1) {\n return;\n } // test with clip path\n\n\n var objectToTest = displayObject.style.clipPath || displayObject;\n var worldTransform = displayObject.getWorldTransform(); // clipped's world matrix * clipPath's local matrix\n\n if (displayObject.style.clipPath) {\n worldTransform = _glMatrix.mat4.multiply(_glMatrix.mat4.create(), worldTransform, displayObject.style.clipPath.getLocalTransform());\n }\n\n if (_this.isHit(objectToTest, position, worldTransform)) {\n pickedDisplayObjects.push(displayObject);\n }\n }\n }); // find group with max z-index\n\n pickedDisplayObjects.sort(_this.sceneGraphService.sort);\n result.picked = pickedDisplayObjects[pickedDisplayObjects.length - 1] || null;\n return result;\n });\n };\n\n var CanvasPickerPlugin_1;\n CanvasPickerPlugin.tag = 'CanvasPickerPlugin';\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.SceneGraphService), (0, _tslib.__metadata)(\"design:type\", Object)], CanvasPickerPlugin.prototype, \"sceneGraphService\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.DisplayObjectPool), (0, _tslib.__metadata)(\"design:type\", _g.DisplayObjectPool)], CanvasPickerPlugin.prototype, \"displayObjectPool\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.OffscreenCanvasCreator), (0, _tslib.__metadata)(\"design:type\", _g.OffscreenCanvasCreator)], CanvasPickerPlugin.prototype, \"offscreenCanvas\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_gPluginCanvasRenderer.RBushRoot), (0, _tslib.__metadata)(\"design:type\", Function)], CanvasPickerPlugin.prototype, \"rBush\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_gPluginCanvasRenderer.PathGeneratorFactory), (0, _tslib.__metadata)(\"design:type\", Function)], CanvasPickerPlugin.prototype, \"pathGeneratorFactory\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(PointInPathPickerFactory), (0, _tslib.__metadata)(\"design:type\", Function)], CanvasPickerPlugin.prototype, \"pointInPathPickerFactory\", void 0);\n CanvasPickerPlugin = CanvasPickerPlugin_1 = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({\n contrib: _g.RenderingPluginContribution\n })], CanvasPickerPlugin);\n return CanvasPickerPlugin;\n}();\n\nexports.CanvasPickerPlugin = CanvasPickerPlugin;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-picker/lib/CanvasPickerPlugin.js?");
|
|
1727
|
-
|
|
1728
|
-
/***/ }),
|
|
1729
|
-
|
|
1730
|
-
/***/ "../g-plugin-canvas-picker/lib/Circle.js":
|
|
1731
|
-
/*!***********************************************!*\
|
|
1732
|
-
!*** ../g-plugin-canvas-picker/lib/Circle.js ***!
|
|
1733
|
-
\***********************************************/
|
|
1734
|
-
/*! no static exports found */
|
|
1735
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1736
|
-
|
|
1737
|
-
"use strict";
|
|
1738
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isPointInPath = isPointInPath;\n\nvar _math = __webpack_require__(/*! ./utils/math */ \"../g-plugin-canvas-picker/lib/utils/math.js\");\n\nfunction isPointInPath(displayObject, position) {\n var _a = displayObject.parsedStyle,\n _b = _a.r,\n r = _b === void 0 ? 0 : _b,\n fill = _a.fill,\n stroke = _a.stroke,\n _c = _a.lineWidth,\n lineWidth = _c === void 0 ? 0 : _c,\n clipPathTargets = _a.clipPathTargets;\n var halfLineWidth = lineWidth / 2;\n var absDistance = (0, _math.distance)(r, r, position.x, position.y);\n var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length); // 直接用距离,如果同时存在边和填充时,可以减少两次计算\n\n if (fill && stroke || isClipPath) {\n return absDistance <= r + halfLineWidth;\n }\n\n if (fill) {\n return absDistance <= r;\n }\n\n if (stroke) {\n return absDistance >= r - halfLineWidth && absDistance <= r + halfLineWidth;\n }\n\n return false;\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-picker/lib/Circle.js?");
|
|
1739
|
-
|
|
1740
|
-
/***/ }),
|
|
1741
|
-
|
|
1742
|
-
/***/ "../g-plugin-canvas-picker/lib/Ellipse.js":
|
|
1743
|
-
/*!************************************************!*\
|
|
1744
|
-
!*** ../g-plugin-canvas-picker/lib/Ellipse.js ***!
|
|
1745
|
-
\************************************************/
|
|
1746
|
-
/*! no static exports found */
|
|
1747
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1748
|
-
|
|
1749
|
-
"use strict";
|
|
1750
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isPointInPath = isPointInPath;\n\nfunction ellipseDistance(squareX, squareY, rx, ry) {\n return squareX / (rx * rx) + squareY / (ry * ry);\n}\n\nfunction isPointInPath(displayObject, _a) {\n var x = _a.x,\n y = _a.y;\n var _b = displayObject.parsedStyle,\n _c = _b.rx,\n rx = _c === void 0 ? 0 : _c,\n _d = _b.ry,\n ry = _d === void 0 ? 0 : _d,\n fill = _b.fill,\n stroke = _b.stroke,\n _e = _b.lineWidth,\n lineWidth = _e === void 0 ? 0 : _e,\n clipPathTargets = _b.clipPathTargets;\n var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length);\n var halfLineWith = lineWidth / 2;\n var squareX = (x - rx) * (x - rx);\n var squareY = (y - ry) * (y - ry); // 使用椭圆的公式: x*x/rx*rx + y*y/ry*ry = 1;\n\n if (fill && stroke || isClipPath) {\n return ellipseDistance(squareX, squareY, rx + halfLineWith, ry + halfLineWith) <= 1;\n }\n\n if (fill) {\n return ellipseDistance(squareX, squareY, rx, ry) <= 1;\n }\n\n if (stroke) {\n return ellipseDistance(squareX, squareY, rx - halfLineWith, ry - halfLineWith) >= 1 && ellipseDistance(squareX, squareY, rx + halfLineWith, ry + halfLineWith) <= 1;\n }\n\n return false;\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-picker/lib/Ellipse.js?");
|
|
1751
|
-
|
|
1752
|
-
/***/ }),
|
|
1753
|
-
|
|
1754
|
-
/***/ "../g-plugin-canvas-picker/lib/Line.js":
|
|
1755
|
-
/*!*********************************************!*\
|
|
1756
|
-
!*** ../g-plugin-canvas-picker/lib/Line.js ***!
|
|
1757
|
-
\*********************************************/
|
|
1758
|
-
/*! no static exports found */
|
|
1759
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1760
|
-
|
|
1761
|
-
"use strict";
|
|
1762
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isPointInPath = isPointInPath;\n\nvar _math = __webpack_require__(/*! ./utils/math */ \"../g-plugin-canvas-picker/lib/utils/math.js\");\n\nfunction isPointInPath(displayObject, position) {\n var _a = displayObject.parsedStyle,\n x1 = _a.x1,\n y1 = _a.y1,\n x2 = _a.x2,\n y2 = _a.y2,\n _b = _a.lineWidth,\n lineWidth = _b === void 0 ? 0 : _b,\n _c = _a.defX,\n x = _c === void 0 ? 0 : _c,\n _d = _a.defY,\n y = _d === void 0 ? 0 : _d;\n return (0, _math.inLine)(x1, y1, x2, y2, lineWidth, position.x + x, position.y + y);\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-picker/lib/Line.js?");
|
|
1763
|
-
|
|
1764
|
-
/***/ }),
|
|
1765
|
-
|
|
1766
|
-
/***/ "../g-plugin-canvas-picker/lib/Path.js":
|
|
1767
|
-
/*!*********************************************!*\
|
|
1768
|
-
!*** ../g-plugin-canvas-picker/lib/Path.js ***!
|
|
1769
|
-
\*********************************************/
|
|
1770
|
-
/*! no static exports found */
|
|
1771
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1772
|
-
|
|
1773
|
-
"use strict";
|
|
1774
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isPointInPath = isPointInPath;\n\nvar _glMatrix = __webpack_require__(/*! gl-matrix */ \"../../node_modules/gl-matrix/esm/index.js\");\n\nvar _gMath = __webpack_require__(/*! @antv/g-math */ \"../g-math/lib/index.js\");\n\nvar _math = __webpack_require__(/*! ./utils/math */ \"../g-plugin-canvas-picker/lib/utils/math.js\");\n\nfunction isPointInStroke(segments, lineWidth, px, py, length, x, y) {\n var isHit = false;\n var halfWidth = lineWidth / 2;\n\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n var currentPoint = segment.currentPoint,\n params = segment.params,\n prePoint = segment.prePoint,\n box = segment.box; // 如果在前面已经生成过包围盒,直接按照包围盒计算\n\n if (box && !(0, _math.inBox)(box.x - halfWidth, box.y - halfWidth, box.width + lineWidth, box.height + lineWidth, px, py)) {\n continue;\n }\n\n switch (segment.command) {\n // L 和 Z 都是直线, M 不进行拾取\n case 'L':\n case 'Z':\n isHit = (0, _math.inLine)(prePoint[0], prePoint[1], currentPoint[0], currentPoint[1], lineWidth, px, py);\n break;\n\n case 'Q':\n var qDistance = _gMath.Quad.pointDistance(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4], px, py);\n\n isHit = qDistance <= lineWidth / 2;\n break;\n\n case 'C':\n var cDistance = _gMath.Cubic.pointDistance(prePoint[0], // 上一段结束位置, 即 C 的起始点\n prePoint[1], params[1], // 'C' 的参数,1、2 为第一个控制点,3、4 为第二个控制点,5、6 为结束点\n params[2], params[3], params[4], params[5], params[6], px, py, length);\n\n isHit = cDistance <= lineWidth / 2;\n break;\n\n case 'A':\n // 计算点到椭圆圆弧的距离,暂时使用近似算法,后面可以改成切割法求最近距离\n var arcParams = segment.arcParams;\n var cx = arcParams.cx,\n cy = arcParams.cy,\n rx = arcParams.rx,\n ry = arcParams.ry,\n startAngle = arcParams.startAngle,\n endAngle = arcParams.endAngle,\n xRotation = arcParams.xRotation;\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1; // const m = transform(null, [\n // ['t', -cx, -cy],\n // ['r', -xRotation],\n // ['s', 1 / scaleX, 1 / scaleY],\n // ]);\n // FIXME\n\n var m = _glMatrix.mat3.fromTranslation(_glMatrix.mat3.create(), [-cx, -cy]);\n\n _glMatrix.mat3.multiply(m, _glMatrix.mat3.fromRotation(_glMatrix.mat3.create(), -xRotation), m);\n\n _glMatrix.mat3.multiply(m, _glMatrix.mat3.fromScaling(_glMatrix.mat3.create(), [1 / scaleX, 1 / scaleY]), m);\n\n var p = _glMatrix.vec2.fromValues(px, py);\n\n p = _glMatrix.vec2.transformMat3(p, p, m); // isHit = inArc(cx, cy, r, startAngle, endAngle, lineWidth, px, py);\n // console.log(m, p[0], px - cx);\n // isHit = inArc(cx, cy, r, startAngle, endAngle, lineWidth, px, py);\n\n isHit = (0, _math.inArc)(0, 0, r, startAngle, endAngle, lineWidth, p[0], p[1]);\n break;\n\n default:\n break;\n }\n\n if (isHit) {\n break;\n }\n }\n\n return isHit;\n}\n\nfunction isPointInPath(displayObject, position, isPointInPath) {\n var _a = displayObject.parsedStyle,\n _b = _a.lineWidth,\n lineWidth = _b === void 0 ? 0 : _b,\n stroke = _a.stroke,\n fill = _a.fill,\n _c = _a.defX,\n x = _c === void 0 ? 0 : _c,\n _d = _a.defY,\n y = _d === void 0 ? 0 : _d,\n clipPathTargets = _a.clipPathTargets,\n path = _a.path;\n var segments = path.segments,\n hasArc = path.hasArc,\n polylines = path.polylines,\n polygons = path.polygons,\n totalLength = path.totalLength;\n var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length);\n var isHit = false;\n\n if (stroke || isClipPath) {\n isHit = isPointInStroke(segments, lineWidth, position.x + x, position.y + y, totalLength, x, y);\n }\n\n if (!isHit && (fill || isClipPath)) {\n if (hasArc) {\n // 存在曲线时,暂时使用 canvas 的 api 计算,后续可以进行多边形切割\n isHit = isPointInPath(displayObject, position);\n } else {\n // 提取出来的多边形包含闭合的和非闭合的,在这里统一按照多边形处理\n isHit = (0, _math.inPolygons)(polygons, position.x + x, position.y + y) || (0, _math.inPolygons)(polylines, position.x + x, position.y + y);\n }\n }\n\n return isHit;\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-picker/lib/Path.js?");
|
|
1775
|
-
|
|
1776
|
-
/***/ }),
|
|
1777
|
-
|
|
1778
|
-
/***/ "../g-plugin-canvas-picker/lib/Polygon.js":
|
|
1779
|
-
/*!************************************************!*\
|
|
1780
|
-
!*** ../g-plugin-canvas-picker/lib/Polygon.js ***!
|
|
1781
|
-
\************************************************/
|
|
1782
|
-
/*! no static exports found */
|
|
1783
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1784
|
-
|
|
1785
|
-
"use strict";
|
|
1786
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isPointInPath = isPointInPath;\n\nvar _math = __webpack_require__(/*! ./utils/math */ \"../g-plugin-canvas-picker/lib/utils/math.js\");\n\nfunction isPointInPath(displayObject, position) {\n var _a = displayObject.parsedStyle,\n stroke = _a.stroke,\n fill = _a.fill,\n _b = _a.lineWidth,\n lineWidth = _b === void 0 ? 0 : _b,\n points = _a.points,\n _c = _a.defX,\n x = _c === void 0 ? 0 : _c,\n _d = _a.defY,\n y = _d === void 0 ? 0 : _d,\n clipPathTargets = _a.clipPathTargets;\n var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length);\n var isHit = false;\n\n if (stroke || isClipPath) {\n isHit = (0, _math.inPolyline)(points.points, lineWidth, position.x + x, position.y + y, true);\n }\n\n if (!isHit && (fill || isClipPath)) {\n isHit = (0, _math.inPolygon)(points.points, position.x + x, position.y + y);\n }\n\n return isHit;\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-picker/lib/Polygon.js?");
|
|
1787
|
-
|
|
1788
|
-
/***/ }),
|
|
1789
|
-
|
|
1790
|
-
/***/ "../g-plugin-canvas-picker/lib/Polyline.js":
|
|
1791
|
-
/*!*************************************************!*\
|
|
1792
|
-
!*** ../g-plugin-canvas-picker/lib/Polyline.js ***!
|
|
1793
|
-
\*************************************************/
|
|
1794
|
-
/*! no static exports found */
|
|
1795
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1796
|
-
|
|
1797
|
-
"use strict";
|
|
1798
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isPointInPath = isPointInPath;\n\nvar _math = __webpack_require__(/*! ./utils/math */ \"../g-plugin-canvas-picker/lib/utils/math.js\");\n\nfunction isPointInPath(displayObject, position) {\n var _a = displayObject.parsedStyle,\n stroke = _a.stroke,\n _b = _a.lineWidth,\n lineWidth = _b === void 0 ? 0 : _b,\n points = _a.points,\n _c = _a.defX,\n x = _c === void 0 ? 0 : _c,\n _d = _a.defY,\n y = _d === void 0 ? 0 : _d,\n clipPathTargets = _a.clipPathTargets;\n var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length);\n\n if (!stroke && !isClipPath || !lineWidth) {\n return false;\n }\n\n return (0, _math.inPolyline)(points.points, lineWidth, position.x + x, position.y + y, false);\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-picker/lib/Polyline.js?");
|
|
1799
|
-
|
|
1800
|
-
/***/ }),
|
|
1801
|
-
|
|
1802
|
-
/***/ "../g-plugin-canvas-picker/lib/Rect.js":
|
|
1803
|
-
/*!*********************************************!*\
|
|
1804
|
-
!*** ../g-plugin-canvas-picker/lib/Rect.js ***!
|
|
1805
|
-
\*********************************************/
|
|
1806
|
-
/*! no static exports found */
|
|
1807
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1808
|
-
|
|
1809
|
-
"use strict";
|
|
1810
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isPointInPath = isPointInPath;\n\nvar _math = __webpack_require__(/*! ./utils/math */ \"../g-plugin-canvas-picker/lib/utils/math.js\");\n\nfunction isPointInPath(displayObject, position, isPointInPath) {\n var _a = displayObject.parsedStyle,\n radius = _a.radius,\n fill = _a.fill,\n stroke = _a.stroke,\n _b = _a.lineWidth,\n lineWidth = _b === void 0 ? 0 : _b,\n width = _a.width,\n height = _a.height,\n clipPathTargets = _a.clipPathTargets;\n var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length); // 无圆角时的策略\n\n if (!radius) {\n var halfWidth = lineWidth / 2; // 同时填充和带有边框\n\n if (fill && stroke || isClipPath) {\n return (0, _math.inBox)(0 - halfWidth, 0 - halfWidth, width + halfWidth, height + halfWidth, position.x, position.y);\n } // 仅填充\n\n\n if (fill) {\n return (0, _math.inBox)(0, 0, width, height, position.x, position.y);\n }\n\n if (stroke) {\n return (0, _math.inRect)(0, 0, width, height, lineWidth, position.x, position.y);\n }\n } else {\n var isHit = false;\n\n if (stroke || isClipPath) {\n isHit = inRectWithRadius(0, 0, width, height, radius, lineWidth, position.x, position.y);\n } // 仅填充时带有圆角的矩形直接通过图形拾取\n // 以后可以改成纯数学的近似拾取,将圆弧切割成多边形\n\n\n if (!isHit && (fill || isClipPath)) {\n isHit = isPointInPath(displayObject, position);\n }\n\n return isHit;\n }\n\n return false;\n}\n\nfunction inRectWithRadius(minX, minY, width, height, radius, lineWidth, x, y) {\n return (0, _math.inLine)(minX + radius, minY, minX + width - radius, minY, lineWidth, x, y) || (0, _math.inLine)(minX + width, minY + radius, minX + width, minY + height - radius, lineWidth, x, y) || (0, _math.inLine)(minX + width - radius, minY + height, minX + radius, minY + height, lineWidth, x, y) || (0, _math.inLine)(minX, minY + height - radius, minX, minY + radius, lineWidth, x, y) || (0, _math.inArc)(minX + width - radius, minY + radius, radius, 1.5 * Math.PI, 2 * Math.PI, lineWidth, x, y) || (0, _math.inArc)(minX + width - radius, minY + height - radius, radius, 0, 0.5 * Math.PI, lineWidth, x, y) || (0, _math.inArc)(minX + radius, minY + height - radius, radius, 0.5 * Math.PI, Math.PI, lineWidth, x, y) || (0, _math.inArc)(minX + radius, minY + radius, radius, Math.PI, 1.5 * Math.PI, lineWidth, x, y);\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-picker/lib/Rect.js?");
|
|
1811
|
-
|
|
1812
|
-
/***/ }),
|
|
1813
|
-
|
|
1814
|
-
/***/ "../g-plugin-canvas-picker/lib/index.js":
|
|
1815
|
-
/*!**********************************************!*\
|
|
1816
|
-
!*** ../g-plugin-canvas-picker/lib/index.js ***!
|
|
1817
|
-
\**********************************************/
|
|
1818
|
-
/*! no static exports found */
|
|
1819
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1820
|
-
|
|
1821
|
-
"use strict";
|
|
1822
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Plugin = void 0;\n\nvar _g = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar _CanvasPickerPlugin = __webpack_require__(/*! ./CanvasPickerPlugin */ \"../g-plugin-canvas-picker/lib/CanvasPickerPlugin.js\");\n\nvar _Circle = __webpack_require__(/*! ./Circle */ \"../g-plugin-canvas-picker/lib/Circle.js\");\n\nvar _Ellipse = __webpack_require__(/*! ./Ellipse */ \"../g-plugin-canvas-picker/lib/Ellipse.js\");\n\nvar _Line = __webpack_require__(/*! ./Line */ \"../g-plugin-canvas-picker/lib/Line.js\");\n\nvar _Polyline = __webpack_require__(/*! ./Polyline */ \"../g-plugin-canvas-picker/lib/Polyline.js\");\n\nvar _Path = __webpack_require__(/*! ./Path */ \"../g-plugin-canvas-picker/lib/Path.js\");\n\nvar _Rect = __webpack_require__(/*! ./Rect */ \"../g-plugin-canvas-picker/lib/Rect.js\");\n\nvar _Polygon = __webpack_require__(/*! ./Polygon */ \"../g-plugin-canvas-picker/lib/Polygon.js\");\n\nvar containerModule = (0, _manaSyringe.Module)(function (register) {\n register({\n token: _CanvasPickerPlugin.PointInPathPickerFactory,\n useFactory: function useFactory(context) {\n return function (tagName) {\n if (tagName === _g.SHAPE.Circle) {\n return _Circle.isPointInPath;\n } else if (tagName === _g.SHAPE.Ellipse) {\n return _Ellipse.isPointInPath;\n } else if (tagName === _g.SHAPE.Rect) {\n return _Rect.isPointInPath;\n } else if (tagName === _g.SHAPE.Line) {\n return _Line.isPointInPath;\n } else if (tagName === _g.SHAPE.Polyline) {\n return _Polyline.isPointInPath;\n } else if (tagName === _g.SHAPE.Polygon) {\n return _Polygon.isPointInPath;\n } else if (tagName === _g.SHAPE.Path) {\n return _Path.isPointInPath;\n } else if (tagName === _g.SHAPE.Image || tagName === _g.SHAPE.Text // tagName === SHAPE.Group\n ) {\n return function () {\n return true;\n };\n }\n\n return null;\n };\n }\n });\n register(_CanvasPickerPlugin.CanvasPickerPlugin);\n});\n\nvar Plugin = function () {\n function Plugin() {}\n\n Plugin.prototype.init = function (container) {\n container.load(containerModule);\n };\n\n Plugin.prototype.destroy = function (container) {// // container.unload(containerModule);\n // container.remove(PointInPathPickerFactory);\n // container.remove(CanvasPickerPlugin);\n // @ts-ignore\n // container.container.unload(containerModule);\n };\n\n return Plugin;\n}();\n\nexports.Plugin = Plugin;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-picker/lib/index.js?");
|
|
1823
|
-
|
|
1824
|
-
/***/ }),
|
|
1825
|
-
|
|
1826
|
-
/***/ "../g-plugin-canvas-picker/lib/utils/math.js":
|
|
1827
|
-
/*!***************************************************!*\
|
|
1828
|
-
!*** ../g-plugin-canvas-picker/lib/utils/math.js ***!
|
|
1829
|
-
\***************************************************/
|
|
1830
|
-
/*! no static exports found */
|
|
1831
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1832
|
-
|
|
1833
|
-
"use strict";
|
|
1834
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.distance = distance;\nexports.inBox = inBox;\nexports.inRect = inRect;\nexports.inArc = inArc;\nexports.inLine = inLine;\nexports.inPolyline = inPolyline;\nexports.inPolygon = inPolygon;\nexports.inPolygons = inPolygons;\n\nvar _gMath = __webpack_require__(/*! @antv/g-math */ \"../g-math/lib/index.js\");\n\nfunction distance(x1, y1, x2, y2) {\n var dx = x1 - x2;\n var dy = y1 - y2;\n return Math.sqrt(dx * dx + dy * dy);\n}\n\nfunction inBox(minX, minY, width, height, x, y) {\n return x >= minX && x <= minX + width && y >= minY && y <= minY + height;\n}\n\nfunction inRect(minX, minY, width, height, lineWidth, x, y) {\n var halfWidth = lineWidth / 2; // 将四个边看做矩形来检测,比边的检测算法要快\n\n return inBox(minX - halfWidth, minY - halfWidth, width, lineWidth, x, y) || // 上边\n inBox(minX + width - halfWidth, minY - halfWidth, lineWidth, height, x, y) || // 右边\n inBox(minX + halfWidth, minY + height - halfWidth, width, lineWidth, x, y) || // 下边\n inBox(minX - halfWidth, minY + halfWidth, lineWidth, height, x, y); // 左边\n}\n\nfunction inArc(cx, cy, r, startAngle, endAngle, lineWidth, x, y) {\n var angle = (Math.atan2(y - cy, x - cx) + Math.PI * 2) % (Math.PI * 2); // 转换到 0 - 2 * Math.PI 之间\n\n if (angle < startAngle || angle > endAngle) {\n return false;\n }\n\n var point = {\n x: cx + r * Math.cos(angle),\n y: cy + r * Math.sin(angle)\n };\n return distance(point.x, point.y, x, y) <= lineWidth / 2;\n}\n\nfunction inLine(x1, y1, x2, y2, lineWidth, x, y) {\n var minX = Math.min(x1, x2);\n var maxX = Math.max(x1, x2);\n var minY = Math.min(y1, y2);\n var maxY = Math.max(y1, y2);\n var halfWidth = lineWidth / 2; // 因为目前的方案是计算点到直线的距离,而有可能会在延长线上,所以要先判断是否在包围盒内\n // 这种方案会在水平或者竖直的情况下载线的延长线上有半 lineWidth 的误差\n\n if (!(x >= minX - halfWidth && x <= maxX + halfWidth && y >= minY - halfWidth && y <= maxY + halfWidth)) {\n return false;\n } // 因为已经计算了包围盒,所以仅需要计算到直线的距离即可,可以显著提升性能\n\n\n return _gMath.Line.pointToLine(x1, y1, x2, y2, x, y) <= lineWidth / 2;\n}\n\nfunction inPolyline(points, lineWidth, x, y, isClose) {\n var count = points.length;\n\n if (count < 2) {\n return false;\n }\n\n for (var i = 0; i < count - 1; i++) {\n var x1 = points[i][0];\n var y1 = points[i][1];\n var x2 = points[i + 1][0];\n var y2 = points[i + 1][1];\n\n if (inLine(x1, y1, x2, y2, lineWidth, x, y)) {\n return true;\n }\n } // 如果封闭,则计算起始点和结束点的边\n\n\n if (isClose) {\n var first = points[0];\n var last = points[count - 1];\n\n if (inLine(first[0], first[1], last[0], last[1], lineWidth, x, y)) {\n return true;\n }\n }\n\n return false;\n} // 多边形的射线检测,参考:https://blog.csdn.net/WilliamSun0122/article/details/77994526\n\n\nvar tolerance = 1e-6; // 三态函数,判断两个double在eps精度下的大小关系\n\nfunction dcmp(x) {\n if (Math.abs(x) < tolerance) {\n return 0;\n }\n\n return x < 0 ? -1 : 1;\n} // 判断点Q是否在p1和p2的线段上\n\n\nfunction onSegment(p1, p2, q) {\n if ((q[0] - p1[0]) * (p2[1] - p1[1]) === (p2[0] - p1[0]) * (q[1] - p1[1]) && Math.min(p1[0], p2[0]) <= q[0] && q[0] <= Math.max(p1[0], p2[0]) && Math.min(p1[1], p2[1]) <= q[1] && q[1] <= Math.max(p1[1], p2[1])) {\n return true;\n }\n\n return false;\n} // 判断点P在多边形内-射线法\n\n\nfunction inPolygon(points, x, y) {\n var isHit = false;\n var n = points.length;\n\n if (n <= 2) {\n // svg 中点小于 3 个时,不显示,也无法被拾取\n return false;\n }\n\n for (var i = 0; i < n; i++) {\n var p1 = points[i];\n var p2 = points[(i + 1) % n];\n\n if (onSegment(p1, p2, [x, y])) {\n // 点在多边形一条边上\n return true;\n } // 前一个判断min(p1[1],p2[1])<P.y<=max(p1[1],p2[1])\n // 后一个判断被测点 在 射线与边交点 的左边\n\n\n if (dcmp(p1[1] - y) > 0 !== dcmp(p2[1] - y) > 0 && dcmp(x - (y - p1[1]) * (p1[0] - p2[0]) / (p1[1] - p2[1]) - p1[0]) < 0) {\n isHit = !isHit;\n }\n }\n\n return isHit;\n}\n\nfunction inPolygons(polygons, x, y) {\n var isHit = false;\n\n for (var i = 0; i < polygons.length; i++) {\n var points = polygons[i];\n isHit = inPolygon(points, x, y);\n\n if (isHit) {\n break;\n }\n }\n\n return isHit;\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-picker/lib/utils/math.js?");
|
|
1835
|
-
|
|
1836
|
-
/***/ }),
|
|
1837
|
-
|
|
1838
|
-
/***/ "../g-plugin-canvas-renderer/lib/CanvasRendererPlugin.js":
|
|
1839
|
-
/*!***************************************************************!*\
|
|
1840
|
-
!*** ../g-plugin-canvas-renderer/lib/CanvasRendererPlugin.js ***!
|
|
1841
|
-
\***************************************************************/
|
|
1842
|
-
/*! no static exports found */
|
|
1843
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1844
|
-
|
|
1845
|
-
"use strict";
|
|
1846
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CanvasRendererPlugin = exports.RBushRoot = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _g = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar _util = __webpack_require__(/*! @antv/util */ \"../../node_modules/@antv/util/esm/index.js\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar _glMatrix = __webpack_require__(/*! gl-matrix */ \"../../node_modules/gl-matrix/esm/index.js\");\n\nvar _rbush = _interopRequireDefault(__webpack_require__(/*! rbush */ \"../../node_modules/rbush/rbush.min.js\"));\n\nvar _paths = __webpack_require__(/*! ./shapes/paths */ \"../g-plugin-canvas-renderer/lib/shapes/paths/index.js\");\n\nvar _styles = __webpack_require__(/*! ./shapes/styles */ \"../g-plugin-canvas-renderer/lib/shapes/styles/index.js\");\n\nvar _GradientPool = __webpack_require__(/*! ./shapes/GradientPool */ \"../g-plugin-canvas-renderer/lib/shapes/GradientPool.js\");\n\nvar _ImagePool = __webpack_require__(/*! ./shapes/ImagePool */ \"../g-plugin-canvas-renderer/lib/shapes/ImagePool.js\");\n\nvar _RBushNode = __webpack_require__(/*! ./components/RBushNode */ \"../g-plugin-canvas-renderer/lib/components/RBushNode.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar RBushRoot = 'RBushRoot';\nexports.RBushRoot = RBushRoot;\nvar SHAPE_ATTRS_MAP = {\n fill: 'fillStyle',\n stroke: 'strokeStyle',\n opacity: 'globalAlpha'\n};\n/**\n * support 2 modes in rendering:\n * * immediate\n * * delayed: render at the end of frame with dirty-rectangle\n */\n\nvar CanvasRendererPlugin = function () {\n function CanvasRendererPlugin() {\n this.renderQueue = [];\n this.restoreStack = [];\n this.clearFullScreen = false;\n }\n\n CanvasRendererPlugin_1 = CanvasRendererPlugin;\n\n CanvasRendererPlugin.prototype.apply = function (renderingService) {\n var _this = this;\n\n var handleMounted = function handleMounted(e) {\n // const { enableDirtyRectangleRendering } = this.canvasConfig.renderer.getConfig();\n // if (!enableDirtyRectangleRendering) {\n // return;\n // }\n var object = e.target;\n object.entity.addComponent(_RBushNode.RBushNode);\n handleBoundsChanged(e);\n };\n\n var handleUnmounted = function handleUnmounted(e) {\n // const { enableDirtyRectangleRendering } = this.canvasConfig.renderer.getConfig();\n // if (!enableDirtyRectangleRendering) {\n // return;\n // }\n var object = e.target; // remove r-bush node\n\n var rBushNode = object.entity.getComponent(_RBushNode.RBushNode);\n\n _this.rBush.remove(rBushNode.aabb); // this.rBush.remove(rBushNode.aabb, (a: RBushNodeAABB, b: RBushNodeAABB) => a.name === b.name);\n\n\n object.entity.removeComponent(_RBushNode.RBushNode);\n };\n\n var handleBoundsChanged = function handleBoundsChanged(e) {\n // const { enableDirtyRectangleRendering } = this.canvasConfig.renderer.getConfig();\n // // don not use rbush when dirty-rectangle rendering disabled\n // if (!enableDirtyRectangleRendering) {\n // return;\n // }\n var _a;\n\n var object = e.target; // skip if this object mounted on another scenegraph root\n\n if (((_a = object.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) !== _this.renderingContext.root) {\n return;\n } // skip Document & Canvas\n\n\n var path = e.composedPath().slice(0, -2);\n path.forEach(function (node) {\n _this.insertRBushNode(node);\n });\n };\n\n renderingService.hooks.init.tap(CanvasRendererPlugin_1.tag, function () {\n var context = _this.contextService.getContext();\n\n var dpr = _this.contextService.getDPR(); // scale all drawing operations by the dpr\n // @see https://www.html5rocks.com/en/tutorials/canvas/hidpi/\n\n\n context && context.scale(dpr, dpr);\n\n _this.renderingContext.root.addEventListener(_g.ElementEvent.MOUNTED, handleMounted);\n\n _this.renderingContext.root.addEventListener(_g.ElementEvent.UNMOUNTED, handleUnmounted);\n\n _this.renderingContext.root.addEventListener(_g.ElementEvent.BOUNDS_CHANGED, handleBoundsChanged);\n });\n renderingService.hooks.destroy.tap(CanvasRendererPlugin_1.tag, function () {\n _this.renderingContext.root.removeEventListener(_g.ElementEvent.MOUNTED, handleMounted);\n\n _this.renderingContext.root.removeEventListener(_g.ElementEvent.UNMOUNTED, handleUnmounted);\n\n _this.renderingContext.root.removeEventListener(_g.ElementEvent.BOUNDS_CHANGED, handleBoundsChanged);\n });\n renderingService.hooks.beginFrame.tap(CanvasRendererPlugin_1.tag, function () {\n var context = _this.contextService.getContext();\n\n var _a = _this.canvasConfig.renderer.getConfig(),\n enableDirtyRectangleRendering = _a.enableDirtyRectangleRendering,\n enableDirtyRectangleRenderingDebug = _a.enableDirtyRectangleRenderingDebug; // clear fullscreen when:\n // 1. dirty rectangle rendering disabled\n // 2. camera changed\n\n\n _this.clearFullScreen = !enableDirtyRectangleRendering || _this.renderingContext.renderReasons.has(_g.RENDER_REASON.CameraChanged);\n\n if (context) {\n context.save();\n\n if (_this.clearFullScreen) {\n context.clearRect(0, 0, _this.canvasConfig.width, _this.canvasConfig.height);\n } // account for camera's world matrix\n\n\n _this.applyTransform(context, _this.camera.getOrthoMatrix());\n }\n }); // render at the end of frame\n\n renderingService.hooks.endFrame.tap(CanvasRendererPlugin_1.tag, function () {\n var enableDirtyRectangleRendering = _this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering;\n\n var context = _this.contextService.getContext();\n\n if (enableDirtyRectangleRendering) {\n // merge removed AABB\n var dirtyRenderBounds = _this.safeMergeAABB.apply(_this, (0, _tslib.__spreadArray)([_this.mergeDirtyAABBs(_this.renderQueue)], (0, _tslib.__read)(_this.renderingContext.removedRenderBoundsList), false));\n\n _this.renderingContext.removedRenderBoundsList = [];\n\n if (!dirtyRenderBounds) {\n return;\n } // clear & clip dirty rectangle\n\n\n var _a = _this.convertAABB2Rect(dirtyRenderBounds),\n x = _a.x,\n y = _a.y,\n width = _a.width,\n height = _a.height;\n\n context.clearRect(x, y, width, height);\n context.beginPath();\n context.rect(x, y, width, height);\n context.clip(); // search objects intersect with dirty rectangle\n\n var dirtyObjects = _this.searchDirtyObjects(dirtyRenderBounds); // // append uncullable objects in renderQueue\n // const uncullableObjects = this.renderQueue.filter(\n // (object) => !object.entity.getComponent(Cullable).enable,\n // );\n // dirtyObjects.push(...uncullableObjects);\n // do rendering\n\n\n dirtyObjects // .filter((object) => object && object.isConnected)\n // sort by z-index\n .sort(_this.sceneGraphService.sort).forEach(function (object) {\n if (object.isVisible()) {\n _this.renderDisplayObject(object, renderingService);\n }\n }); // save dirty AABBs in last frame\n\n _this.renderQueue.forEach(function (object) {\n _this.saveDirtyAABB(object);\n }); // clear queue\n\n\n _this.renderQueue = [];\n } // pop restore stack, eg. root -> parent -> child\n\n\n _this.restoreStack.forEach(function (s) {\n context.restore();\n }); // clear restore stack\n\n\n _this.restoreStack = [];\n context.restore();\n });\n renderingService.hooks.render.tap(CanvasRendererPlugin_1.tag, function (object) {\n var enableDirtyRectangleRendering = _this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering;\n\n if (!enableDirtyRectangleRendering) {\n // render immediately\n _this.renderDisplayObject(object, renderingService);\n } else {\n // render at the end of frame\n _this.renderQueue.push(object);\n }\n });\n };\n\n CanvasRendererPlugin.prototype.renderDisplayObject = function (object, renderingService) {\n var _this = this;\n\n var context = this.contextService.getContext(); // restore to its parent\n\n var parent = this.restoreStack[this.restoreStack.length - 1];\n\n while (parent && object.parentNode !== parent) {\n context.restore();\n this.restoreStack.pop();\n parent = this.restoreStack[this.restoreStack.length - 1];\n }\n\n var nodeName = object.nodeName; // reset transformation\n\n context.save(); // apply RTS transformation in world space\n\n this.applyTransform(context, object.getLocalTransform()); // clip path\n\n var clipPathShape = object.style.clipPath;\n\n if (clipPathShape) {\n context.save(); // apply clip shape's RTS\n\n this.applyTransform(context, clipPathShape.getLocalTransform()); // generate path in local space\n\n var generatePath_1 = this.pathGeneratorFactory(clipPathShape.nodeName);\n\n if (generatePath_1) {\n this.useAnchor(context, clipPathShape, function () {\n generatePath_1(context, clipPathShape.parsedStyle);\n });\n }\n\n context.restore();\n context.clip();\n } // apply attributes to context\n\n\n context.save();\n this.applyAttributesToContext(context, object, renderingService); // apply anchor in local space\n\n this.useAnchor(context, object, function () {\n // generate path in local space\n var generatePath = _this.pathGeneratorFactory(object.nodeName);\n\n if (generatePath) {\n generatePath(context, object.parsedStyle);\n } // fill & stroke\n\n\n var styleRenderer = _this.styleRendererFactory(nodeName);\n\n if (styleRenderer) {\n styleRenderer.render(context, object.parsedStyle, object);\n }\n }); // restore applied attributes, eg. shadowBlur shadowColor...\n\n context.restore(); // finish rendering, clear dirty flag\n\n var renderable = object.entity.getComponent(_g.Renderable);\n renderable.dirty = false;\n this.restoreStack.push(object);\n };\n\n CanvasRendererPlugin.prototype.convertAABB2Rect = function (aabb) {\n var min = aabb.getMin();\n var max = aabb.getMax(); // expand the rectangle a bit to avoid artifacts\n // @see https://www.yuque.com/antv/ou292n/bi8nix#ExvCu\n\n var minX = Math.floor(min[0]);\n var minY = Math.floor(min[1]);\n var maxX = Math.ceil(max[0]);\n var maxY = Math.ceil(max[1]);\n var width = maxX - minX;\n var height = maxY - minY;\n return {\n x: minX,\n y: minY,\n width: width,\n height: height\n };\n };\n\n CanvasRendererPlugin.prototype.insertRBushNode = function (object) {\n var rBushNode = object.entity.getComponent(_RBushNode.RBushNode);\n\n if (rBushNode) {\n // insert node in RTree\n this.rBush.remove(rBushNode.aabb); // this.rBush.remove(rBushNode.aabb, (a: RBushNodeAABB, b: RBushNodeAABB) => a.name === b.name);\n\n var renderBounds = object.getRenderBounds();\n\n if (renderBounds) {\n var _a = (0, _tslib.__read)(renderBounds.getMin(), 2),\n minX = _a[0],\n minY = _a[1];\n\n var _b = (0, _tslib.__read)(renderBounds.getMax(), 2),\n maxX = _b[0],\n maxY = _b[1];\n\n rBushNode.aabb = {\n name: object.entity.getName(),\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY\n };\n } // sync rbush node with object's bounds\n\n\n this.rBush.insert(rBushNode.aabb);\n }\n };\n /**\n * TODO: merge dirty rectangles with some strategies.\n * For now, we just simply merge all the rectangles into one.\n * @see https://idom.me/articles/841.html\n */\n\n\n CanvasRendererPlugin.prototype.mergeDirtyAABBs = function (dirtyObjects) {\n // merge into a big AABB\n var dirtyRectangle;\n dirtyObjects.forEach(function (object) {\n var renderBounds = object.getRenderBounds();\n\n if (renderBounds) {\n if (!dirtyRectangle) {\n dirtyRectangle = new _g.AABB(renderBounds.center, renderBounds.halfExtents);\n } else {\n dirtyRectangle.add(renderBounds);\n }\n }\n\n var dirtyRenderBounds = object.entity.getComponent(_g.Renderable).dirtyRenderBounds;\n\n if (dirtyRenderBounds) {\n if (!dirtyRectangle) {\n dirtyRectangle = new _g.AABB(dirtyRenderBounds.center, dirtyRenderBounds.halfExtents);\n } else {\n dirtyRectangle.add(dirtyRenderBounds);\n }\n }\n });\n return dirtyRectangle;\n };\n\n CanvasRendererPlugin.prototype.searchDirtyObjects = function (dirtyRectangle) {\n var _this = this; // search in r-tree, get all affected nodes\n\n\n var _a = (0, _tslib.__read)(dirtyRectangle.getMin(), 2),\n minX = _a[0],\n minY = _a[1];\n\n var _b = (0, _tslib.__read)(dirtyRectangle.getMax(), 2),\n maxX = _b[0],\n maxY = _b[1];\n\n var rBushNodes = this.rBush.search({\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY\n });\n return rBushNodes.map(function (_a) {\n var name = _a.name;\n return _this.displayObjectPool.getByName(name);\n });\n };\n\n CanvasRendererPlugin.prototype.saveDirtyAABB = function (object) {\n var renderable = object.entity.getComponent(_g.Renderable);\n\n if (!renderable.dirtyRenderBounds) {\n renderable.dirtyRenderBounds = new _g.AABB();\n }\n\n var renderBounds = object.getRenderBounds();\n\n if (renderBounds) {\n // save last dirty aabb\n renderable.dirtyRenderBounds.update(renderBounds.center, renderBounds.halfExtents);\n }\n };\n\n CanvasRendererPlugin.prototype.drawDirtyRectangle = function (context, _a) {\n var x = _a.x,\n y = _a.y,\n width = _a.width,\n height = _a.height;\n context.beginPath();\n context.rect(x + 1, y + 1, width - 1, height - 1);\n context.closePath();\n context.lineWidth = 1;\n context.stroke();\n };\n\n CanvasRendererPlugin.prototype.applyTransform = function (context, transform) {\n var _a = (0, _tslib.__read)(_glMatrix.mat4.getTranslation(_glMatrix.vec3.create(), transform), 2),\n tx = _a[0],\n ty = _a[1];\n\n var _b = (0, _tslib.__read)(_glMatrix.mat4.getScaling(_glMatrix.vec3.create(), transform), 2),\n sx = _b[0],\n sy = _b[1];\n\n var rotation = _glMatrix.mat4.getRotation(_glMatrix.quat.create(), transform);\n\n var _c = (0, _tslib.__read)((0, _g.getEuler)(_glMatrix.vec3.create(), rotation), 3),\n eux = _c[0],\n euy = _c[1],\n euz = _c[2]; // gimbal lock at 90 degrees\n\n\n var rts = (0, _g.fromRotationTranslationScale)(eux || euz, tx, ty, sx, sy); // @see https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Transformations\n\n context.transform(rts[0], rts[1], rts[3], rts[4], rts[6], rts[7]);\n };\n\n CanvasRendererPlugin.prototype.applyAttributesToContext = function (context, object, renderingService) {\n var attributes = object.attributes,\n parsedStyle = object.parsedStyle;\n\n for (var k in attributes) {\n // reserved keywords in Canvas2DContext\n if (k === 'transform') {\n continue;\n }\n\n var v = attributes[k]; // 转换一下不与 canvas 兼容的属性名\n\n var name_1 = SHAPE_ATTRS_MAP[k] ? SHAPE_ATTRS_MAP[k] : k;\n\n if (name_1 === 'lineDash' && context.setLineDash) {\n (0, _util.isArray)(v) && context.setLineDash(v);\n } else {\n if (name_1 === 'strokeStyle' || name_1 === 'fillStyle') {\n var parsedColor = parsedStyle[k];\n\n if (parsedColor.type === _g.PARSED_COLOR_TYPE.LinearGradient || parsedColor.type === _g.PARSED_COLOR_TYPE.RadialGradient) {\n var bounds = object.getGeometryBounds();\n var width = bounds && bounds.halfExtents[0] * 2 || 0;\n var height = bounds && bounds.halfExtents[1] * 2 || 0;\n v = this.gradientPool.getOrCreateGradient((0, _tslib.__assign)((0, _tslib.__assign)({\n type: parsedColor.type\n }, parsedColor.value), {\n width: width,\n height: height\n }), context);\n } else if (parsedColor.type === _g.PARSED_COLOR_TYPE.Pattern) {\n var pattern = this.imagePool.getPatternSync(parsedColor.value);\n\n if (pattern) {\n v = pattern;\n } else {\n this.imagePool.createPattern(parsedColor.value, context).then(function () {\n // set dirty rectangle flag\n object.entity.getComponent(_g.Renderable).dirty = true;\n renderingService.dirtify();\n });\n }\n } else {\n // constant, eg. rgba(255,255,255,1)\n v = parsedColor.formatted;\n }\n } else if (name_1 === 'globalAlpha') {\n // opacity 效果可以叠加,子元素的 opacity 需要与父元素 opacity 相乘\n v = v * context.globalAlpha;\n } // @ts-ignore\n\n\n context[name_1] = v;\n }\n }\n };\n\n CanvasRendererPlugin.prototype.useAnchor = function (context, object, callback) {\n var contentBounds = object.getGeometryBounds();\n\n if (contentBounds) {\n var halfExtents = contentBounds.halfExtents;\n context.save(); // apply anchor, use true size, not include stroke,\n // eg. bounds = true size + half lineWidth\n\n var _a = (object.parsedStyle || {}).anchor,\n anchor = _a === void 0 ? [0, 0] : _a; // context.translate(-anchor[0] * width, -anchor[1] * height);\n\n context.translate(-anchor[0] * halfExtents[0] * 2, -anchor[1] * halfExtents[1] * 2);\n callback();\n context.restore();\n } else {\n callback();\n }\n };\n\n CanvasRendererPlugin.prototype.safeMergeAABB = function () {\n var aabbs = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n aabbs[_i] = arguments[_i];\n }\n\n var merged;\n aabbs.forEach(function (aabb) {\n if (aabb) {\n if (!merged) {\n merged = aabb;\n } else {\n merged.add(aabb);\n }\n }\n });\n return merged;\n };\n\n var CanvasRendererPlugin_1;\n CanvasRendererPlugin.tag = 'CanvasRendererPlugin';\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.CanvasConfig), (0, _tslib.__metadata)(\"design:type\", Object)], CanvasRendererPlugin.prototype, \"canvasConfig\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.DefaultCamera), (0, _tslib.__metadata)(\"design:type\", _g.Camera)], CanvasRendererPlugin.prototype, \"camera\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.ContextService), (0, _tslib.__metadata)(\"design:type\", Object)], CanvasRendererPlugin.prototype, \"contextService\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.SceneGraphService), (0, _tslib.__metadata)(\"design:type\", Object)], CanvasRendererPlugin.prototype, \"sceneGraphService\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.RenderingContext), (0, _tslib.__metadata)(\"design:type\", Object)], CanvasRendererPlugin.prototype, \"renderingContext\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_ImagePool.ImagePool), (0, _tslib.__metadata)(\"design:type\", _ImagePool.ImagePool)], CanvasRendererPlugin.prototype, \"imagePool\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_GradientPool.GradientPool), (0, _tslib.__metadata)(\"design:type\", _GradientPool.GradientPool)], CanvasRendererPlugin.prototype, \"gradientPool\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_paths.PathGeneratorFactory), (0, _tslib.__metadata)(\"design:type\", Function)], CanvasRendererPlugin.prototype, \"pathGeneratorFactory\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_styles.StyleRendererFactory), (0, _tslib.__metadata)(\"design:type\", Function)], CanvasRendererPlugin.prototype, \"styleRendererFactory\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.DisplayObjectPool), (0, _tslib.__metadata)(\"design:type\", _g.DisplayObjectPool)], CanvasRendererPlugin.prototype, \"displayObjectPool\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(RBushRoot), (0, _tslib.__metadata)(\"design:type\", _rbush.default)], CanvasRendererPlugin.prototype, \"rBush\", void 0);\n CanvasRendererPlugin = CanvasRendererPlugin_1 = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({\n contrib: _g.RenderingPluginContribution\n })], CanvasRendererPlugin);\n return CanvasRendererPlugin;\n}();\n\nexports.CanvasRendererPlugin = CanvasRendererPlugin;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/CanvasRendererPlugin.js?");
|
|
1847
|
-
|
|
1848
|
-
/***/ }),
|
|
1849
|
-
|
|
1850
|
-
/***/ "../g-plugin-canvas-renderer/lib/LoadImagePlugin.js":
|
|
1851
|
-
/*!**********************************************************!*\
|
|
1852
|
-
!*** ../g-plugin-canvas-renderer/lib/LoadImagePlugin.js ***!
|
|
1853
|
-
\**********************************************************/
|
|
1854
|
-
/*! no static exports found */
|
|
1855
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1856
|
-
|
|
1857
|
-
"use strict";
|
|
1858
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.LoadImagePlugin = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar _g = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar _ImagePool = __webpack_require__(/*! ./shapes/ImagePool */ \"../g-plugin-canvas-renderer/lib/shapes/ImagePool.js\");\n\nvar _util = __webpack_require__(/*! @antv/util */ \"../../node_modules/@antv/util/esm/index.js\");\n\nvar LoadImagePlugin = function () {\n function LoadImagePlugin() {}\n\n LoadImagePlugin_1 = LoadImagePlugin;\n\n LoadImagePlugin.prototype.apply = function (renderingService) {\n var _this = this;\n\n var handleMounted = function handleMounted(e) {\n var object = e.target;\n var nodeName = object.nodeName,\n attributes = object.attributes;\n\n if (nodeName === _g.SHAPE.Image) {\n var img = attributes.img;\n\n if ((0, _util.isString)(img)) {\n _this.imagePool.getOrCreateImage(img).then(function () {\n // set dirty rectangle flag\n object.entity.getComponent(_g.Renderable).dirty = true;\n renderingService.dirtify();\n });\n }\n }\n };\n\n var handleAttributeChanged = function handleAttributeChanged(e) {\n var object = e.target;\n var _a = e.detail,\n attributeName = _a.attributeName,\n newValue = _a.newValue;\n\n if (object.nodeName === _g.SHAPE.Image) {\n if (attributeName === 'img') {\n if ((0, _util.isString)(newValue)) {\n _this.imagePool.getOrCreateImage(newValue).then(function () {\n // set dirty rectangle flag\n object.entity.getComponent(_g.Renderable).dirty = true;\n renderingService.dirtify();\n });\n }\n }\n }\n };\n\n renderingService.hooks.init.tap(LoadImagePlugin_1.tag, function () {\n _this.renderingContext.root.addEventListener(_g.ElementEvent.MOUNTED, handleMounted);\n\n _this.renderingContext.root.addEventListener(_g.ElementEvent.ATTRIBUTE_CHANGED, handleAttributeChanged);\n });\n renderingService.hooks.destroy.tap(LoadImagePlugin_1.tag, function () {\n _this.renderingContext.root.removeEventListener(_g.ElementEvent.MOUNTED, handleMounted);\n\n _this.renderingContext.root.removeEventListener(_g.ElementEvent.ATTRIBUTE_CHANGED, handleAttributeChanged);\n });\n };\n\n var LoadImagePlugin_1;\n LoadImagePlugin.tag = 'LoadImagePlugin';\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_ImagePool.ImagePool), (0, _tslib.__metadata)(\"design:type\", _ImagePool.ImagePool)], LoadImagePlugin.prototype, \"imagePool\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.RenderingContext), (0, _tslib.__metadata)(\"design:type\", Object)], LoadImagePlugin.prototype, \"renderingContext\", void 0);\n LoadImagePlugin = LoadImagePlugin_1 = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({\n contrib: _g.RenderingPluginContribution\n })], LoadImagePlugin);\n return LoadImagePlugin;\n}();\n\nexports.LoadImagePlugin = LoadImagePlugin;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/LoadImagePlugin.js?");
|
|
1859
|
-
|
|
1860
|
-
/***/ }),
|
|
1861
|
-
|
|
1862
|
-
/***/ "../g-plugin-canvas-renderer/lib/components/RBushNode.js":
|
|
1863
|
-
/*!***************************************************************!*\
|
|
1864
|
-
!*** ../g-plugin-canvas-renderer/lib/components/RBushNode.js ***!
|
|
1865
|
-
\***************************************************************/
|
|
1866
|
-
/*! no static exports found */
|
|
1867
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1868
|
-
|
|
1869
|
-
"use strict";
|
|
1870
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.RBushNode = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _g = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar RBushNode = function (_super) {\n (0, _tslib.__extends)(RBushNode, _super);\n\n function RBushNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n RBushNode.tag = 'c-canvas-rbush-node';\n return RBushNode;\n}(_g.Component);\n\nexports.RBushNode = RBushNode;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/components/RBushNode.js?");
|
|
1871
|
-
|
|
1872
|
-
/***/ }),
|
|
1873
|
-
|
|
1874
|
-
/***/ "../g-plugin-canvas-renderer/lib/index.js":
|
|
1875
|
-
/*!************************************************!*\
|
|
1876
|
-
!*** ../g-plugin-canvas-renderer/lib/index.js ***!
|
|
1877
|
-
\************************************************/
|
|
1878
|
-
/*! no static exports found */
|
|
1879
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1880
|
-
|
|
1881
|
-
"use strict";
|
|
1882
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"RBush\", {\n enumerable: true,\n get: function get() {\n return _rbush.default;\n }\n});\nObject.defineProperty(exports, \"StyleRenderer\", {\n enumerable: true,\n get: function get() {\n return _styles.StyleRenderer;\n }\n});\nObject.defineProperty(exports, \"PathGeneratorFactory\", {\n enumerable: true,\n get: function get() {\n return _paths.PathGeneratorFactory;\n }\n});\nObject.defineProperty(exports, \"PathGenerator\", {\n enumerable: true,\n get: function get() {\n return _paths.PathGenerator;\n }\n});\nObject.defineProperty(exports, \"RBushRoot\", {\n enumerable: true,\n get: function get() {\n return _CanvasRendererPlugin.RBushRoot;\n }\n});\nObject.defineProperty(exports, \"RBushNode\", {\n enumerable: true,\n get: function get() {\n return _RBushNode.RBushNode;\n }\n});\nexports.Plugin = void 0;\n\nvar _g = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar _rbush = _interopRequireDefault(__webpack_require__(/*! rbush */ \"../../node_modules/rbush/rbush.min.js\"));\n\nvar _styles = __webpack_require__(/*! ./shapes/styles */ \"../g-plugin-canvas-renderer/lib/shapes/styles/index.js\");\n\nvar _Image = __webpack_require__(/*! ./shapes/styles/Image */ \"../g-plugin-canvas-renderer/lib/shapes/styles/Image.js\");\n\nvar _GradientPool = __webpack_require__(/*! ./shapes/GradientPool */ \"../g-plugin-canvas-renderer/lib/shapes/GradientPool.js\");\n\nvar _ImagePool = __webpack_require__(/*! ./shapes/ImagePool */ \"../g-plugin-canvas-renderer/lib/shapes/ImagePool.js\");\n\nvar _paths = __webpack_require__(/*! ./shapes/paths */ \"../g-plugin-canvas-renderer/lib/shapes/paths/index.js\");\n\nvar _Text = __webpack_require__(/*! ./shapes/styles/Text */ \"../g-plugin-canvas-renderer/lib/shapes/styles/Text.js\");\n\nvar _CanvasRendererPlugin = __webpack_require__(/*! ./CanvasRendererPlugin */ \"../g-plugin-canvas-renderer/lib/CanvasRendererPlugin.js\");\n\nvar _LoadImagePlugin = __webpack_require__(/*! ./LoadImagePlugin */ \"../g-plugin-canvas-renderer/lib/LoadImagePlugin.js\");\n\nvar _RBushNode = __webpack_require__(/*! ./components/RBushNode */ \"../g-plugin-canvas-renderer/lib/components/RBushNode.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_g.world.registerComponent(_RBushNode.RBushNode);\n/**\n * register shape renderers\n */\n\n\n_g.globalContainer.register({\n token: {\n token: _paths.PathGenerator,\n named: _g.SHAPE.Circle\n },\n useValue: _paths.CirclePath\n});\n\n_g.globalContainer.register({\n token: {\n token: _paths.PathGenerator,\n named: _g.SHAPE.Ellipse\n },\n useValue: _paths.EllipsePath\n});\n\n_g.globalContainer.register({\n token: {\n token: _paths.PathGenerator,\n named: _g.SHAPE.Rect\n },\n useValue: _paths.RectPath\n});\n\n_g.globalContainer.register({\n token: {\n token: _paths.PathGenerator,\n named: _g.SHAPE.Line\n },\n useValue: _paths.LinePath\n});\n\n_g.globalContainer.register({\n token: {\n token: _paths.PathGenerator,\n named: _g.SHAPE.Polyline\n },\n useValue: _paths.PolylinePath\n});\n\n_g.globalContainer.register({\n token: {\n token: _paths.PathGenerator,\n named: _g.SHAPE.Polygon\n },\n useValue: _paths.PolygonPath\n});\n\n_g.globalContainer.register({\n token: {\n token: _paths.PathGenerator,\n named: _g.SHAPE.Path\n },\n useValue: _paths.PathPath\n});\n\n_g.globalContainer.register({\n token: _paths.PathGeneratorFactory,\n useFactory: function useFactory(ctx) {\n return function (tagName) {\n if (ctx.container.isBoundNamed(_paths.PathGenerator, tagName)) {\n return ctx.container.getNamed(_paths.PathGenerator, tagName);\n }\n\n return null;\n };\n }\n});\n\nvar containerModule = (0, _manaSyringe.Module)(function (register) {\n register(_ImagePool.ImagePool);\n register({\n token: _CanvasRendererPlugin.RBushRoot,\n useValue: new _rbush.default()\n });\n register(_styles.DefaultRenderer);\n register(_Image.ImageRenderer);\n register(_Text.TextRenderer);\n register({\n token: _styles.StyleRendererFactory,\n useFactory: function useFactory(ctx) {\n return function (tagName) {\n if (ctx.container.isBoundNamed(_styles.StyleRenderer, tagName)) {\n return ctx.container.getNamed(_styles.StyleRenderer, tagName);\n }\n\n return null;\n };\n }\n });\n register(_GradientPool.GradientPool);\n register(_CanvasRendererPlugin.CanvasRendererPlugin);\n register(_LoadImagePlugin.LoadImagePlugin);\n});\n\nvar Plugin = function () {\n function Plugin() {}\n\n Plugin.prototype.init = function (container) {\n container.load(containerModule);\n };\n\n Plugin.prototype.destroy = function (container) {// @ts-ignore\n // container.container.unload(containerModule);\n // // container.unload(containerModule);\n // container.remove(ImagePool);\n // container.remove(RBushRoot);\n // container.remove(DefaultRenderer);\n // container.remove(ImageRenderer);\n // container.remove(TextRenderer);\n // container.remove(StyleRendererFactory);\n // container.remove(GradientPool);\n // container.remove(CanvasRendererPlugin);\n // container.remove(LoadImagePlugin);\n };\n\n return Plugin;\n}();\n\nexports.Plugin = Plugin;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/index.js?");
|
|
1883
|
-
|
|
1884
|
-
/***/ }),
|
|
1885
|
-
|
|
1886
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/GradientPool.js":
|
|
1887
|
-
/*!**************************************************************!*\
|
|
1888
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/GradientPool.js ***!
|
|
1889
|
-
\**************************************************************/
|
|
1890
|
-
/*! no static exports found */
|
|
1891
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1892
|
-
|
|
1893
|
-
"use strict";
|
|
1894
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.GradientPool = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _g = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar GradientPool = function () {\n function GradientPool() {\n this.gradientCache = {};\n }\n\n GradientPool.prototype.getOrCreateGradient = function (params, context) {\n var key = this.generateCacheKey(params);\n var type = params.type,\n x0 = params.x0,\n y0 = params.y0,\n x1 = params.x1,\n y1 = params.y1,\n steps = params.steps,\n width = params.width,\n height = params.height;\n\n if (this.gradientCache[key]) {\n return this.gradientCache[key];\n }\n\n var gradient = null;\n\n if (type === _g.PARSED_COLOR_TYPE.LinearGradient) {\n // @see https://developer.mozilla.org/zh-CN/docs/Web/API/CanvasRenderingContext2D/createLinearGradient\n gradient = context.createLinearGradient(x0 * width, y0 * height, x1 * width, y1 * height);\n } else if (type === _g.PARSED_COLOR_TYPE.RadialGradient) {\n var r = Math.sqrt(width * width + height * height) / 2; // @see https://developer.mozilla.org/zh-CN/docs/Web/API/CanvasRenderingContext2D/createRadialGradient\n\n gradient = context.createRadialGradient(x0 * width, y0 * height, 0, x1 * width, y1 * height, params.r1 * r);\n }\n\n if (gradient) {\n steps.forEach(function (_a) {\n var _b = (0, _tslib.__read)(_a, 2),\n offset = _b[0],\n color = _b[1];\n\n gradient === null || gradient === void 0 ? void 0 : gradient.addColorStop(Number(offset), color);\n });\n this.gradientCache[key] = gradient;\n }\n\n return this.gradientCache[key];\n };\n\n GradientPool.prototype.generateCacheKey = function (params) {\n // @ts-ignore\n var type = params.type,\n x0 = params.x0,\n y0 = params.y0,\n x1 = params.x1,\n y1 = params.y1,\n r1 = params.r1,\n steps = params.steps,\n width = params.width,\n height = params.height;\n return \"gradient-\" + type + \"-\" + x0 + \"-\" + y0 + \"-\" + x1 + \"-\" + y1 + \"-\" + (r1 || 0) + \"-\" + width + \"-\" + height + \"-\" + steps.map(function (step) {\n return step.join('');\n }).join('-');\n };\n\n GradientPool = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], GradientPool);\n return GradientPool;\n}();\n\nexports.GradientPool = GradientPool;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/GradientPool.js?");
|
|
1895
|
-
|
|
1896
|
-
/***/ }),
|
|
1897
|
-
|
|
1898
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/ImagePool.js":
|
|
1899
|
-
/*!***********************************************************!*\
|
|
1900
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/ImagePool.js ***!
|
|
1901
|
-
\***********************************************************/
|
|
1902
|
-
/*! no static exports found */
|
|
1903
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1904
|
-
|
|
1905
|
-
"use strict";
|
|
1906
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ImagePool = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar ImagePool = function () {\n function ImagePool() {\n this.imageCache = {};\n this.patternCache = {};\n }\n\n ImagePool.prototype.getImageSync = function (src) {\n return this.imageCache[src];\n };\n\n ImagePool.prototype.getOrCreateImage = function (src) {\n var _this = this;\n\n if (this.imageCache[src]) {\n return Promise.resolve(this.imageCache[src]);\n }\n\n return new Promise(function (resolve, reject) {\n var image = new window.Image();\n\n image.onload = function () {\n resolve(image);\n };\n\n image.onerror = function (ev) {\n reject(ev);\n };\n\n image.crossOrigin = 'Anonymous';\n image.src = src;\n _this.imageCache[src] = image;\n });\n };\n\n ImagePool.prototype.getPatternSync = function (pattern) {\n var patternKey = this.generatePatternKey(pattern);\n\n if (this.patternCache[patternKey]) {\n return this.patternCache[patternKey];\n }\n };\n\n ImagePool.prototype.createPattern = function (patternParams, context) {\n var _this = this;\n\n return this.getOrCreateImage(patternParams.src).then(function (image) {\n var patternKey = _this.generatePatternKey(patternParams); // @see https://developer.mozilla.org/zh-CN/docs/Web/API/CanvasRenderingContext2D/createPattern\n\n\n var pattern = context.createPattern(image, patternParams.repetition);\n\n if (pattern) {\n _this.patternCache[patternKey] = pattern;\n }\n\n return _this.patternCache[patternKey];\n });\n };\n\n ImagePool.prototype.generatePatternKey = function (pattern) {\n var src = pattern.src,\n repetition = pattern.repetition;\n return \"pattern-\" + src + \"-\" + repetition;\n };\n\n ImagePool = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], ImagePool);\n return ImagePool;\n}();\n\nexports.ImagePool = ImagePool;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/ImagePool.js?");
|
|
1907
|
-
|
|
1908
|
-
/***/ }),
|
|
1909
|
-
|
|
1910
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/paths/Circle.js":
|
|
1911
|
-
/*!**************************************************************!*\
|
|
1912
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/paths/Circle.js ***!
|
|
1913
|
-
\**************************************************************/
|
|
1914
|
-
/*! no static exports found */
|
|
1915
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1916
|
-
|
|
1917
|
-
"use strict";
|
|
1918
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generatePath = generatePath;\n\nfunction generatePath(context, parsedStyle) {\n context.beginPath();\n var _a = parsedStyle.r,\n r = _a === void 0 ? 0 : _a;\n context.arc(r, r, r, 0, Math.PI * 2, false);\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/paths/Circle.js?");
|
|
1919
|
-
|
|
1920
|
-
/***/ }),
|
|
1921
|
-
|
|
1922
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/paths/Ellipse.js":
|
|
1923
|
-
/*!***************************************************************!*\
|
|
1924
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/paths/Ellipse.js ***!
|
|
1925
|
-
\***************************************************************/
|
|
1926
|
-
/*! no static exports found */
|
|
1927
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1928
|
-
|
|
1929
|
-
"use strict";
|
|
1930
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generatePath = generatePath;\n\nfunction generatePath(context, attributes) {\n var rx = attributes.rx,\n ry = attributes.ry;\n context.beginPath(); // @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/ellipse\n\n if (context.ellipse) {\n context.ellipse(rx, ry, rx, ry, 0, 0, Math.PI * 2, false);\n } else {\n // 如果不支持,则使用圆来绘制,进行变形\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n context.save();\n context.scale(scaleX, scaleY);\n context.arc(0, 0, r, 0, Math.PI * 2);\n context.closePath();\n context.restore();\n }\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/paths/Ellipse.js?");
|
|
1931
|
-
|
|
1932
|
-
/***/ }),
|
|
1933
|
-
|
|
1934
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/paths/Line.js":
|
|
1935
|
-
/*!************************************************************!*\
|
|
1936
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/paths/Line.js ***!
|
|
1937
|
-
\************************************************************/
|
|
1938
|
-
/*! no static exports found */
|
|
1939
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1940
|
-
|
|
1941
|
-
"use strict";
|
|
1942
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generatePath = generatePath;\n\nfunction generatePath(context, parsedStyle) {\n var x1 = parsedStyle.x1,\n y1 = parsedStyle.y1,\n x2 = parsedStyle.x2,\n y2 = parsedStyle.y2,\n _a = parsedStyle.defX,\n defX = _a === void 0 ? 0 : _a,\n _b = parsedStyle.defY,\n defY = _b === void 0 ? 0 : _b;\n context.beginPath();\n context.moveTo(x1 - defX, y1 - defY);\n context.lineTo(x2 - defX, y2 - defY);\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/paths/Line.js?");
|
|
1943
|
-
|
|
1944
|
-
/***/ }),
|
|
1945
|
-
|
|
1946
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/paths/Path.js":
|
|
1947
|
-
/*!************************************************************!*\
|
|
1948
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/paths/Path.js ***!
|
|
1949
|
-
\************************************************************/
|
|
1950
|
-
/*! no static exports found */
|
|
1951
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1952
|
-
|
|
1953
|
-
"use strict";
|
|
1954
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generatePath = generatePath;\n\nfunction generatePath(context, parsedStyle) {\n var _a = parsedStyle.defX,\n x = _a === void 0 ? 0 : _a,\n _b = parsedStyle.defY,\n y = _b === void 0 ? 0 : _b;\n var _c = parsedStyle.path,\n curve = _c.curve,\n zCommandIndexes = _c.zCommandIndexes;\n var path = curve;\n zCommandIndexes.forEach(function (zIndex, index) {\n path.splice(zIndex + index, 0, ['Z']);\n });\n var currentPoint = [-x, -y]; // 当前图形\n\n var startMovePoint = [-x, -y]; // 开始 M 的点,可能会有多个\n\n context.beginPath();\n\n for (var i = 0; i < path.length; i++) {\n var params = path[i]; // eg. M 100 200\n\n var command = params[0]; // V,H,S,T 都在前面被转换成标准形式\n\n switch (command) {\n case 'M':\n context.moveTo(params[1] - x, params[2] - y);\n startMovePoint = [params[1] - x, params[2] - y];\n break;\n // case 'L':\n // context.lineTo(params[1]! - x, params[2]! - y);\n // break;\n // case 'Q':\n // context.quadraticCurveTo(params[1]! - x, params[2]! - y, params[3]! - x, params[4]! - y);\n // break;\n\n case 'C':\n context.bezierCurveTo(params[1] - x, params[2] - y, params[3] - x, params[4] - y, params[5] - x, params[6] - y);\n break;\n // case 'A': {\n // let arcParams: ArcParams;\n // // 为了加速绘制,可以提供参数的缓存,各个图形自己缓存\n // if (arcParamsCache) {\n // arcParams = arcParamsCache[i];\n // if (!arcParams) {\n // arcParams = getArcParams(currentPoint, params, x, y);\n // arcParamsCache[i] = arcParams;\n // }\n // } else {\n // arcParams = getArcParams(currentPoint, params, x, y);\n // }\n // const { cx, cy, rx, ry, startAngle, endAngle, xRotation, sweepFlag } = arcParams;\n // // 直接使用椭圆的 api\n // if (context.ellipse) {\n // context.ellipse(cx, cy, rx, ry, xRotation, startAngle, endAngle, !!(1 - sweepFlag));\n // } else {\n // // 如果不支持,则使用圆来绘制,进行变形\n // const r = rx > ry ? rx : ry;\n // const scaleX = rx > ry ? 1 : rx / ry;\n // const scaleY = rx > ry ? ry / rx : 1;\n // context.translate(cx, cy);\n // context.rotate(xRotation);\n // context.scale(scaleX, scaleY);\n // context.arc(0, 0, r, startAngle, endAngle, !!(1 - sweepFlag));\n // context.scale(1 / scaleX, 1 / scaleY);\n // context.rotate(-xRotation);\n // context.translate(-cx, -cy);\n // }\n // break;\n // }\n\n case 'Z':\n context.closePath();\n break;\n\n default:\n break;\n } // 有了 Z 后,当前节点从开始 M 的点开始\n\n\n if (command === 'Z') {\n currentPoint = startMovePoint;\n } else {\n var len = params.length;\n currentPoint = [params[len - 2] - x, params[len - 1] - y];\n }\n }\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/paths/Path.js?");
|
|
1955
|
-
|
|
1956
|
-
/***/ }),
|
|
1957
|
-
|
|
1958
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/paths/Polygon.js":
|
|
1959
|
-
/*!***************************************************************!*\
|
|
1960
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/paths/Polygon.js ***!
|
|
1961
|
-
\***************************************************************/
|
|
1962
|
-
/*! no static exports found */
|
|
1963
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1964
|
-
|
|
1965
|
-
"use strict";
|
|
1966
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generatePath = generatePath;\n\nfunction generatePath(context, parsedStyle) {\n var _a = parsedStyle.defX,\n x = _a === void 0 ? 0 : _a,\n _b = parsedStyle.defY,\n y = _b === void 0 ? 0 : _b;\n var points = parsedStyle.points.points;\n var length = points.length;\n var x1 = points[0][0] - x;\n var y1 = points[0][1] - y;\n var x2 = points[length - 1][0] - x;\n var y2 = points[length - 1][1] - y;\n context.beginPath();\n context.moveTo(x1, y1);\n\n for (var i = 0; i < length - 1; i++) {\n var point = points[i];\n context.lineTo(point[0] - x, point[1] - y);\n }\n\n context.lineTo(x2, y2);\n context.closePath();\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/paths/Polygon.js?");
|
|
1967
|
-
|
|
1968
|
-
/***/ }),
|
|
1969
|
-
|
|
1970
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/paths/Polyline.js":
|
|
1971
|
-
/*!****************************************************************!*\
|
|
1972
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/paths/Polyline.js ***!
|
|
1973
|
-
\****************************************************************/
|
|
1974
|
-
/*! no static exports found */
|
|
1975
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1976
|
-
|
|
1977
|
-
"use strict";
|
|
1978
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generatePath = generatePath;\n\nfunction generatePath(context, parsedStyle) {\n var _a = parsedStyle.defX,\n x = _a === void 0 ? 0 : _a,\n _b = parsedStyle.defY,\n y = _b === void 0 ? 0 : _b;\n var points = parsedStyle.points.points;\n var length = points.length;\n var x1 = points[0][0] - x;\n var y1 = points[0][1] - y;\n var x2 = points[length - 1][0] - x;\n var y2 = points[length - 1][1] - y;\n context.beginPath();\n context.moveTo(x1, y1);\n\n for (var i = 0; i < length - 1; i++) {\n var point = points[i];\n context.lineTo(point[0] - x, point[1] - y);\n }\n\n context.lineTo(x2, y2);\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/paths/Polyline.js?");
|
|
1979
|
-
|
|
1980
|
-
/***/ }),
|
|
1981
|
-
|
|
1982
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/paths/Rect.js":
|
|
1983
|
-
/*!************************************************************!*\
|
|
1984
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/paths/Rect.js ***!
|
|
1985
|
-
\************************************************************/
|
|
1986
|
-
/*! no static exports found */
|
|
1987
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1988
|
-
|
|
1989
|
-
"use strict";
|
|
1990
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generatePath = generatePath;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _parse = __webpack_require__(/*! ../../utils/parse */ \"../g-plugin-canvas-renderer/lib/utils/parse.js\");\n\nfunction generatePath(context, attributes) {\n var _a = attributes.radius,\n radius = _a === void 0 ? 0 : _a,\n _b = attributes.width,\n width = _b === void 0 ? 0 : _b,\n _c = attributes.height,\n height = _c === void 0 ? 0 : _c;\n context.beginPath();\n\n if (radius === 0) {\n context.rect(0, 0, width, height);\n } else {\n var _d = (0, _tslib.__read)((0, _parse.parseRadius)(radius), 4),\n r1 = _d[0],\n r2 = _d[1],\n r3 = _d[2],\n r4 = _d[3];\n\n context.moveTo(r1, 0);\n context.lineTo(width - r2, 0);\n r2 !== 0 && context.arc(width - r2, r2, r2, -Math.PI / 2, 0);\n context.lineTo(width, height - r3);\n r3 !== 0 && context.arc(width - r3, height - r3, r3, 0, Math.PI / 2);\n context.lineTo(r4, height);\n r4 !== 0 && context.arc(r4, height - r4, r4, Math.PI / 2, Math.PI);\n context.lineTo(0, r1);\n r1 !== 0 && context.arc(r1, r1, r1, Math.PI, Math.PI * 1.5);\n context.closePath();\n }\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/paths/Rect.js?");
|
|
1991
|
-
|
|
1992
|
-
/***/ }),
|
|
1993
|
-
|
|
1994
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/paths/index.js":
|
|
1995
|
-
/*!*************************************************************!*\
|
|
1996
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/paths/index.js ***!
|
|
1997
|
-
\*************************************************************/
|
|
1998
|
-
/*! no static exports found */
|
|
1999
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2000
|
-
|
|
2001
|
-
"use strict";
|
|
2002
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"CirclePath\", {\n enumerable: true,\n get: function get() {\n return _Circle.generatePath;\n }\n});\nObject.defineProperty(exports, \"EllipsePath\", {\n enumerable: true,\n get: function get() {\n return _Ellipse.generatePath;\n }\n});\nObject.defineProperty(exports, \"RectPath\", {\n enumerable: true,\n get: function get() {\n return _Rect.generatePath;\n }\n});\nObject.defineProperty(exports, \"LinePath\", {\n enumerable: true,\n get: function get() {\n return _Line.generatePath;\n }\n});\nObject.defineProperty(exports, \"PolylinePath\", {\n enumerable: true,\n get: function get() {\n return _Polyline.generatePath;\n }\n});\nObject.defineProperty(exports, \"PolygonPath\", {\n enumerable: true,\n get: function get() {\n return _Polygon.generatePath;\n }\n});\nObject.defineProperty(exports, \"PathPath\", {\n enumerable: true,\n get: function get() {\n return _Path.generatePath;\n }\n});\nexports.PathGenerator = exports.PathGeneratorFactory = void 0;\n\nvar _Circle = __webpack_require__(/*! ./Circle */ \"../g-plugin-canvas-renderer/lib/shapes/paths/Circle.js\");\n\nvar _Ellipse = __webpack_require__(/*! ./Ellipse */ \"../g-plugin-canvas-renderer/lib/shapes/paths/Ellipse.js\");\n\nvar _Rect = __webpack_require__(/*! ./Rect */ \"../g-plugin-canvas-renderer/lib/shapes/paths/Rect.js\");\n\nvar _Line = __webpack_require__(/*! ./Line */ \"../g-plugin-canvas-renderer/lib/shapes/paths/Line.js\");\n\nvar _Polyline = __webpack_require__(/*! ./Polyline */ \"../g-plugin-canvas-renderer/lib/shapes/paths/Polyline.js\");\n\nvar _Polygon = __webpack_require__(/*! ./Polygon */ \"../g-plugin-canvas-renderer/lib/shapes/paths/Polygon.js\");\n\nvar _Path = __webpack_require__(/*! ./Path */ \"../g-plugin-canvas-renderer/lib/shapes/paths/Path.js\");\n\nvar PathGeneratorFactory = 'PathGeneratorFactory';\nexports.PathGeneratorFactory = PathGeneratorFactory;\nvar PathGenerator = 'PathGenerator';\nexports.PathGenerator = PathGenerator;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/paths/index.js?");
|
|
2003
|
-
|
|
2004
|
-
/***/ }),
|
|
2005
|
-
|
|
2006
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/styles/Default.js":
|
|
2007
|
-
/*!****************************************************************!*\
|
|
2008
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/styles/Default.js ***!
|
|
2009
|
-
\****************************************************************/
|
|
2010
|
-
/*! no static exports found */
|
|
2011
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2012
|
-
|
|
2013
|
-
"use strict";
|
|
2014
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DefaultRenderer = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _g = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar _util = __webpack_require__(/*! @antv/util */ \"../../node_modules/@antv/util/esm/index.js\");\n\nvar _interfaces = __webpack_require__(/*! ./interfaces */ \"../g-plugin-canvas-renderer/lib/shapes/styles/interfaces.js\");\n\nvar DefaultRenderer = function () {\n function DefaultRenderer() {}\n\n DefaultRenderer.prototype.render = function (context, parsedStyle) {\n var fill = parsedStyle.fill,\n opacity = parsedStyle.opacity,\n fillOpacity = parsedStyle.fillOpacity,\n stroke = parsedStyle.stroke,\n strokeOpacity = parsedStyle.strokeOpacity,\n lineWidth = parsedStyle.lineWidth,\n lineCap = parsedStyle.lineCap,\n lineJoin = parsedStyle.lineJoin;\n\n if (!(0, _util.isNil)(fill)) {\n if (!(0, _util.isNil)(fillOpacity) && fillOpacity !== 1) {\n context.globalAlpha = fillOpacity;\n context.fill();\n context.globalAlpha = opacity;\n } else {\n context.fill();\n }\n }\n\n if (!(0, _util.isNil)(stroke)) {\n if (lineWidth && lineWidth > 0) {\n var applyOpacity = !(0, _util.isNil)(strokeOpacity) && strokeOpacity !== 1;\n\n if (applyOpacity) {\n context.globalAlpha = strokeOpacity;\n }\n\n context.lineWidth = lineWidth;\n\n if (!(0, _util.isNil)(lineCap)) {\n context.lineCap = lineCap;\n }\n\n if (!(0, _util.isNil)(lineJoin)) {\n context.lineJoin = lineJoin;\n } // prevent inner shadow when drawing stroke, toggle shadowBlur & filter(drop-shadow)\n // save shadow blur\n\n\n var shadowBlur = context.shadowBlur;\n var shadowColor = context.shadowColor;\n\n if (!(0, _util.isNil)(shadowBlur)) {\n context.shadowColor = 'transparent';\n context.shadowBlur = 0;\n } // save drop-shadow filter\n\n\n var filter = context.filter;\n\n if (!(0, _util.isNil)(filter) && filter.indexOf('drop-shadow') > -1) {\n context.filter = filter.replace(/drop-shadow\\([^)]*\\)/, '').trim() || 'none';\n }\n\n context.stroke(); // restore shadow blur\n\n if (!(0, _util.isNil)(shadowBlur)) {\n context.shadowColor = shadowColor;\n context.shadowBlur = shadowBlur;\n } // restore filters\n\n\n if (!(0, _util.isNil)(filter)) {\n context.filter = filter;\n }\n }\n }\n };\n\n DefaultRenderer = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({\n token: [{\n token: _interfaces.StyleRenderer,\n named: _g.SHAPE.Circle\n }, {\n token: _interfaces.StyleRenderer,\n named: _g.SHAPE.Ellipse\n }, {\n token: _interfaces.StyleRenderer,\n named: _g.SHAPE.Rect\n }, {\n token: _interfaces.StyleRenderer,\n named: _g.SHAPE.Line\n }, {\n token: _interfaces.StyleRenderer,\n named: _g.SHAPE.Polyline\n }, {\n token: _interfaces.StyleRenderer,\n named: _g.SHAPE.Polygon\n }, {\n token: _interfaces.StyleRenderer,\n named: _g.SHAPE.Path\n }]\n })], DefaultRenderer);\n return DefaultRenderer;\n}();\n\nexports.DefaultRenderer = DefaultRenderer;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/styles/Default.js?");
|
|
2015
|
-
|
|
2016
|
-
/***/ }),
|
|
2017
|
-
|
|
2018
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/styles/Image.js":
|
|
2019
|
-
/*!**************************************************************!*\
|
|
2020
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/styles/Image.js ***!
|
|
2021
|
-
\**************************************************************/
|
|
2022
|
-
/*! no static exports found */
|
|
2023
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2024
|
-
|
|
2025
|
-
"use strict";
|
|
2026
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ImageRenderer = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _g = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar _util = __webpack_require__(/*! @antv/util */ \"../../node_modules/@antv/util/esm/index.js\");\n\nvar _ImagePool = __webpack_require__(/*! ../ImagePool */ \"../g-plugin-canvas-renderer/lib/shapes/ImagePool.js\");\n\nvar _interfaces = __webpack_require__(/*! ./interfaces */ \"../g-plugin-canvas-renderer/lib/shapes/styles/interfaces.js\");\n\nvar ImageRenderer = function () {\n function ImageRenderer() {}\n\n ImageRenderer.prototype.render = function (context, parsedStyle) {\n var _a = parsedStyle.width,\n width = _a === void 0 ? 0 : _a,\n _b = parsedStyle.height,\n height = _b === void 0 ? 0 : _b,\n img = parsedStyle.img;\n var image;\n var iw = width;\n var ih = height;\n\n if ((0, _util.isString)(img)) {\n // image has been loaded in `mounted` hook\n image = this.imagePool.getImageSync(img);\n } else {\n iw || (iw = img.width);\n ih || (ih = img.height);\n image = img;\n } // if (!isNil(sx) && !isNil(sy) && !isNil(swidth) && !isNil(sheight)) {\n // // context.drawImage(image, sx, sy, swidth, sheight, -anchor[0] * iw, -anchor[1] * ih, iw, ih);\n // context.drawImage(image, sx, sy, swidth, sheight, 0, 0, iw, ih);\n // } else {\n\n\n context.drawImage(image, 0, 0, iw, ih); // }\n };\n\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_ImagePool.ImagePool), (0, _tslib.__metadata)(\"design:type\", _ImagePool.ImagePool)], ImageRenderer.prototype, \"imagePool\", void 0);\n ImageRenderer = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({\n token: {\n token: _interfaces.StyleRenderer,\n named: _g.SHAPE.Image\n }\n })], ImageRenderer);\n return ImageRenderer;\n}();\n\nexports.ImageRenderer = ImageRenderer;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/styles/Image.js?");
|
|
2027
|
-
|
|
2028
|
-
/***/ }),
|
|
2029
|
-
|
|
2030
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/styles/Text.js":
|
|
2031
|
-
/*!*************************************************************!*\
|
|
2032
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/styles/Text.js ***!
|
|
2033
|
-
\*************************************************************/
|
|
2034
|
-
/*! no static exports found */
|
|
2035
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2036
|
-
|
|
2037
|
-
"use strict";
|
|
2038
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.TextRenderer = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _g = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar _util = __webpack_require__(/*! @antv/util */ \"../../node_modules/@antv/util/esm/index.js\");\n\nvar _interfaces = __webpack_require__(/*! ./interfaces */ \"../g-plugin-canvas-renderer/lib/shapes/styles/interfaces.js\");\n\nvar TextRenderer = function () {\n function TextRenderer() {}\n\n TextRenderer.prototype.render = function (context, parsedStyle) {\n var _a = parsedStyle.text,\n text = _a === void 0 ? '' : _a,\n _b = parsedStyle.lineWidth,\n lineWidth = _b === void 0 ? 0 : _b,\n textAlign = parsedStyle.textAlign,\n textBaseline = parsedStyle.textBaseline,\n lineJoin = parsedStyle.lineJoin,\n _c = parsedStyle.miterLimit,\n miterLimit = _c === void 0 ? 0 : _c,\n _d = parsedStyle.padding,\n padding = _d === void 0 ? 0 : _d,\n _e = parsedStyle.letterSpacing,\n letterSpacing = _e === void 0 ? 0 : _e,\n stroke = parsedStyle.stroke,\n fill = parsedStyle.fill,\n fillOpacity = parsedStyle.fillOpacity,\n strokeOpacity = parsedStyle.strokeOpacity,\n opacity = parsedStyle.opacity,\n metrics = parsedStyle.metrics;\n var font = metrics.font,\n lines = metrics.lines,\n height = metrics.height,\n lineHeight = metrics.lineHeight;\n context.font = font;\n context.lineWidth = lineWidth;\n context.textBaseline = textBaseline;\n context.lineJoin = lineJoin;\n context.miterLimit = miterLimit;\n var linePositionY = 0; // handle vertical text baseline\n\n if (textBaseline === 'middle') {\n linePositionY = -height / 2 - lineHeight / 2;\n } else if (textBaseline === 'bottom' || textBaseline === 'alphabetic' || textBaseline === 'ideographic') {\n linePositionY = -height;\n } else if (textBaseline === 'top' || textBaseline === 'hanging') {\n linePositionY = -lineHeight;\n } // draw lines line by line\n\n\n for (var i = 0; i < lines.length; i++) {\n var linePositionX = lineWidth / 2;\n linePositionY += lineHeight; // no need to re-position X, cause we already set text align\n // @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textAlign\n\n if (!(0, _util.isNil)(stroke) && lineWidth) {\n this.drawLetterSpacing(context, lines[i], linePositionX + padding, linePositionY + padding, letterSpacing, fillOpacity, strokeOpacity, opacity, true);\n }\n\n if (!(0, _util.isNil)(fill)) {\n this.drawLetterSpacing(context, lines[i], linePositionX + padding, linePositionY + padding, letterSpacing, fillOpacity, strokeOpacity, opacity);\n }\n }\n };\n\n TextRenderer.prototype.drawLetterSpacing = function (context, text, x, y, letterSpacing, fillOpacity, strokeOpacity, opacity, isStroke) {\n if (isStroke === void 0) {\n isStroke = false;\n } // letterSpacing of 0 means normal\n\n\n if (letterSpacing === 0) {\n if (isStroke) {\n this.strokeText(context, text, x, y, strokeOpacity);\n } else {\n this.fillText(context, text, x, y, fillOpacity, opacity);\n }\n\n return;\n }\n\n var currentPosition = x;\n var stringArray = Array.from(text);\n var previousWidth = context.measureText(text).width;\n var currentWidth = 0;\n\n for (var i = 0; i < stringArray.length; ++i) {\n var currentChar = stringArray[i];\n\n if (isStroke) {\n this.strokeText(context, currentChar, currentPosition, y, strokeOpacity);\n } else {\n this.fillText(context, currentChar, currentPosition, y, fillOpacity, opacity);\n }\n\n currentWidth = context.measureText(text.substring(i + 1)).width;\n currentPosition += previousWidth - currentWidth + letterSpacing;\n previousWidth = currentWidth;\n }\n };\n\n TextRenderer.prototype.fillText = function (context, text, x, y, fillOpacity, opacity) {\n var applyOpacity = !(0, _util.isNil)(fillOpacity) && fillOpacity !== 1;\n\n if (applyOpacity) {\n context.globalAlpha = fillOpacity;\n }\n\n context.fillText(text, x, y);\n\n if (applyOpacity) {\n context.globalAlpha = opacity;\n }\n };\n\n TextRenderer.prototype.strokeText = function (context, text, x, y, strokeOpacity) {\n var applyOpacity = !(0, _util.isNil)(strokeOpacity) && strokeOpacity !== 1;\n\n if (applyOpacity) {\n context.globalAlpha = strokeOpacity;\n }\n\n context.strokeText(text, x, y);\n };\n\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.TextService), (0, _tslib.__metadata)(\"design:type\", _g.TextService)], TextRenderer.prototype, \"textService\", void 0);\n TextRenderer = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({\n token: {\n token: _interfaces.StyleRenderer,\n named: _g.SHAPE.Text\n }\n })], TextRenderer);\n return TextRenderer;\n}();\n\nexports.TextRenderer = TextRenderer;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/styles/Text.js?");
|
|
2039
|
-
|
|
2040
|
-
/***/ }),
|
|
2041
|
-
|
|
2042
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/styles/index.js":
|
|
2043
|
-
/*!**************************************************************!*\
|
|
2044
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/styles/index.js ***!
|
|
2045
|
-
\**************************************************************/
|
|
2046
|
-
/*! no static exports found */
|
|
2047
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2048
|
-
|
|
2049
|
-
"use strict";
|
|
2050
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _interfaces = __webpack_require__(/*! ./interfaces */ \"../g-plugin-canvas-renderer/lib/shapes/styles/interfaces.js\");\n\nObject.keys(_interfaces).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _interfaces[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _interfaces[key];\n }\n });\n});\n\nvar _Default = __webpack_require__(/*! ./Default */ \"../g-plugin-canvas-renderer/lib/shapes/styles/Default.js\");\n\nObject.keys(_Default).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _Default[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _Default[key];\n }\n });\n});\n\nvar _Image = __webpack_require__(/*! ./Image */ \"../g-plugin-canvas-renderer/lib/shapes/styles/Image.js\");\n\nObject.keys(_Image).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _Image[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _Image[key];\n }\n });\n});\n\nvar _Text = __webpack_require__(/*! ./Text */ \"../g-plugin-canvas-renderer/lib/shapes/styles/Text.js\");\n\nObject.keys(_Text).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _Text[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _Text[key];\n }\n });\n});\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/styles/index.js?");
|
|
2051
|
-
|
|
2052
|
-
/***/ }),
|
|
2053
|
-
|
|
2054
|
-
/***/ "../g-plugin-canvas-renderer/lib/shapes/styles/interfaces.js":
|
|
2055
|
-
/*!*******************************************************************!*\
|
|
2056
|
-
!*** ../g-plugin-canvas-renderer/lib/shapes/styles/interfaces.js ***!
|
|
2057
|
-
\*******************************************************************/
|
|
2058
|
-
/*! no static exports found */
|
|
2059
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2060
|
-
|
|
2061
|
-
"use strict";
|
|
2062
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.StyleRenderer = exports.StyleRendererFactory = void 0;\nvar StyleRendererFactory = 'StyleRendererFactory';\nexports.StyleRendererFactory = StyleRendererFactory;\nvar StyleRenderer = 'StyleRenderer';\nexports.StyleRenderer = StyleRenderer;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/shapes/styles/interfaces.js?");
|
|
2063
|
-
|
|
2064
|
-
/***/ }),
|
|
2065
|
-
|
|
2066
|
-
/***/ "../g-plugin-canvas-renderer/lib/utils/parse.js":
|
|
2067
|
-
/*!******************************************************!*\
|
|
2068
|
-
!*** ../g-plugin-canvas-renderer/lib/utils/parse.js ***!
|
|
2069
|
-
\******************************************************/
|
|
2070
|
-
/*! no static exports found */
|
|
2071
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2072
|
-
|
|
2073
|
-
"use strict";
|
|
2074
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.parseRadius = parseRadius;\n\nvar _util = __webpack_require__(/*! @antv/util */ \"../../node_modules/@antv/util/esm/index.js\");\n\nfunction parseRadius(radius) {\n var r1 = 0;\n var r2 = 0;\n var r3 = 0;\n var r4 = 0;\n\n if ((0, _util.isArray)(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n } else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n } else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n } else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n } else {\n r1 = r2 = r3 = r4 = radius;\n }\n\n return [r1, r2, r3, r4];\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-canvas-renderer/lib/utils/parse.js?");
|
|
2075
|
-
|
|
2076
|
-
/***/ }),
|
|
2077
|
-
|
|
2078
|
-
/***/ "../g-plugin-dom-interaction/lib/DOMInteractionPlugin.js":
|
|
2079
|
-
/*!***************************************************************!*\
|
|
2080
|
-
!*** ../g-plugin-dom-interaction/lib/DOMInteractionPlugin.js ***!
|
|
2081
|
-
\***************************************************************/
|
|
2082
|
-
/*! no static exports found */
|
|
2083
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2084
|
-
|
|
2085
|
-
"use strict";
|
|
2086
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DOMInteractionPlugin = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _g = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar _utils = __webpack_require__(/*! ./utils */ \"../g-plugin-dom-interaction/lib/utils/index.js\");\n\n/**\n * listen to mouse/touch/pointer events on DOM wrapper, trigger pointer events\n */\nvar DOMInteractionPlugin = function () {\n function DOMInteractionPlugin() {}\n\n DOMInteractionPlugin_1 = DOMInteractionPlugin;\n\n DOMInteractionPlugin.prototype.apply = function (renderingService) {\n var _this = this;\n\n var onPointerMove = function onPointerMove(ev) {\n renderingService.hooks.pointerMove.call(ev);\n };\n\n var onPointerUp = function onPointerUp(ev) {\n renderingService.hooks.pointerUp.call(ev);\n };\n\n var onPointerDown = function onPointerDown(ev) {\n renderingService.hooks.pointerDown.call(ev);\n };\n\n var onPointerOver = function onPointerOver(ev) {\n renderingService.hooks.pointerOver.call(ev);\n };\n\n var onPointerOut = function onPointerOut(ev) {\n renderingService.hooks.pointerOut.call(ev);\n };\n\n var onPointerWheel = function onPointerWheel(ev) {\n renderingService.hooks.pointerWheel.call(ev);\n };\n\n renderingService.hooks.init.tap(DOMInteractionPlugin_1.tag, function () {\n var $el = _this.contextService.getDomElement();\n\n if (_utils.supportsPointerEvents) {\n self.document.addEventListener('pointermove', onPointerMove, true);\n $el.addEventListener('pointerdown', onPointerDown, true);\n $el.addEventListener('pointerleave', onPointerOut, true);\n $el.addEventListener('pointerover', onPointerOver, true);\n self.addEventListener('pointerup', onPointerUp, true);\n } else {\n self.document.addEventListener('mousemove', onPointerMove, true);\n $el.addEventListener('mousedown', onPointerDown, true);\n $el.addEventListener('mouseout', onPointerOut, true);\n $el.addEventListener('mouseover', onPointerOver, true);\n self.addEventListener('mouseup', onPointerUp, true);\n } // always look directly for touch events so that we can provide original data\n // In a future version we should change this to being just a fallback and rely solely on\n // PointerEvents whenever available\n\n\n if (_utils.supportsTouchEvents) {\n $el.addEventListener('touchstart', onPointerDown, true);\n $el.addEventListener('touchend', onPointerUp, true);\n $el.addEventListener('touchmove', onPointerMove, true);\n } // use passive event listeners\n // @see https://zhuanlan.zhihu.com/p/24555031\n\n\n $el.addEventListener('wheel', onPointerWheel, {\n passive: true,\n capture: true\n });\n });\n renderingService.hooks.destroy.tap(DOMInteractionPlugin_1.tag, function () {\n var $el = _this.contextService.getDomElement();\n\n if (_utils.supportsPointerEvents) {\n self.document.removeEventListener('pointermove', onPointerMove, true);\n $el.removeEventListener('pointerdown', onPointerDown, true);\n $el.removeEventListener('pointerleave', onPointerOut, true);\n $el.removeEventListener('pointerover', onPointerOver, true);\n self.removeEventListener('pointerup', onPointerUp, true);\n } else {\n self.document.removeEventListener('mousemove', onPointerMove, true);\n $el.removeEventListener('mousedown', onPointerDown, true);\n $el.removeEventListener('mouseout', onPointerOut, true);\n $el.removeEventListener('mouseover', onPointerOver, true);\n self.removeEventListener('mouseup', onPointerUp, true);\n }\n\n if (_utils.supportsTouchEvents) {\n $el.removeEventListener('touchstart', onPointerDown, true);\n $el.removeEventListener('touchend', onPointerUp, true);\n $el.removeEventListener('touchmove', onPointerMove, true);\n }\n\n $el.removeEventListener('wheel', onPointerWheel, true);\n });\n };\n\n var DOMInteractionPlugin_1;\n DOMInteractionPlugin.tag = 'DOMInteractionPlugin';\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g.ContextService), (0, _tslib.__metadata)(\"design:type\", Object)], DOMInteractionPlugin.prototype, \"contextService\", void 0);\n DOMInteractionPlugin = DOMInteractionPlugin_1 = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({\n contrib: _g.RenderingPluginContribution\n })], DOMInteractionPlugin);\n return DOMInteractionPlugin;\n}();\n\nexports.DOMInteractionPlugin = DOMInteractionPlugin;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-dom-interaction/lib/DOMInteractionPlugin.js?");
|
|
2087
|
-
|
|
2088
|
-
/***/ }),
|
|
2089
|
-
|
|
2090
|
-
/***/ "../g-plugin-dom-interaction/lib/index.js":
|
|
2091
|
-
/*!************************************************!*\
|
|
2092
|
-
!*** ../g-plugin-dom-interaction/lib/index.js ***!
|
|
2093
|
-
\************************************************/
|
|
2094
|
-
/*! no static exports found */
|
|
2095
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2096
|
-
|
|
2097
|
-
"use strict";
|
|
2098
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Plugin = void 0;\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar _DOMInteractionPlugin = __webpack_require__(/*! ./DOMInteractionPlugin */ \"../g-plugin-dom-interaction/lib/DOMInteractionPlugin.js\");\n\nvar containerModule = (0, _manaSyringe.Module)(function (register) {\n register(_DOMInteractionPlugin.DOMInteractionPlugin);\n});\n\nvar Plugin = function () {\n function Plugin() {}\n\n Plugin.prototype.init = function (container) {\n container.load(containerModule);\n };\n\n Plugin.prototype.destroy = function (container) {// @ts-ignore\n // container.container.unload(containerModule);\n // // container.unload(containerModule);\n // container.remove(DOMInteractionPlugin);\n };\n\n return Plugin;\n}();\n\nexports.Plugin = Plugin;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-dom-interaction/lib/index.js?");
|
|
2099
|
-
|
|
2100
|
-
/***/ }),
|
|
2101
|
-
|
|
2102
|
-
/***/ "../g-plugin-dom-interaction/lib/utils/index.js":
|
|
2103
|
-
/*!******************************************************!*\
|
|
2104
|
-
!*** ../g-plugin-dom-interaction/lib/utils/index.js ***!
|
|
2105
|
-
\******************************************************/
|
|
2106
|
-
/*! no static exports found */
|
|
2107
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2108
|
-
|
|
2109
|
-
"use strict";
|
|
2110
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isTouchEvent = isTouchEvent;\nexports.isMouseEvent = isMouseEvent;\nexports.supportsPointerEvents = exports.supportsTouchEvents = void 0;\n// use `self` instead of `window`, account for non-window contexts, such as in Web Workers\n// @see https://developer.mozilla.org/en-US/docs/Web/API/Window/self\nvar supportsTouchEvents = ('ontouchstart' in self);\nexports.supportsTouchEvents = supportsTouchEvents;\nvar supportsPointerEvents = !!self.PointerEvent;\nexports.supportsPointerEvents = supportsPointerEvents;\n\nfunction isTouchEvent(event) {\n return supportsTouchEvents && event instanceof TouchEvent;\n}\n\nfunction isMouseEvent(event) {\n return !self.MouseEvent || event instanceof MouseEvent && (!supportsPointerEvents || !(event instanceof self.PointerEvent));\n}\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-dom-interaction/lib/utils/index.js?");
|
|
2111
|
-
|
|
2112
|
-
/***/ }),
|
|
2113
|
-
|
|
2114
|
-
/***/ "../g-plugin-html-renderer/lib/HTMLRenderingPlugin.js":
|
|
2115
|
-
/*!************************************************************!*\
|
|
2116
|
-
!*** ../g-plugin-html-renderer/lib/HTMLRenderingPlugin.js ***!
|
|
2117
|
-
\************************************************************/
|
|
2118
|
-
/*! no static exports found */
|
|
2119
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2120
|
-
|
|
2121
|
-
"use strict";
|
|
2122
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.HTMLRenderingPlugin = void 0;\n\nvar _tslib = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar _g2 = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n\nvar _util = __webpack_require__(/*! @antv/util */ \"../../node_modules/@antv/util/esm/index.js\");\n\nvar HTML_PREFIX = 'g-html-';\n\nvar HTMLRenderingPlugin = function () {\n function HTMLRenderingPlugin() {}\n\n HTMLRenderingPlugin_1 = HTMLRenderingPlugin;\n\n HTMLRenderingPlugin.prototype.apply = function (renderingService) {\n var _this = this;\n\n var handleMounted = function handleMounted(e) {\n var object = e.target;\n\n if (object.nodeName === _g2.SHAPE.HTML) {\n var innerHTML = object.parsedStyle.innerHTML;\n var existedId = HTML_PREFIX + object.entity.getName();\n\n var $container = _this.contextService.getDomElement().parentNode;\n\n var $existedElement = $container.querySelector('#' + existedId);\n\n if (!$existedElement) {\n var $div = document.createElement('div');\n object.parsedStyle.$el = $div;\n $div.id = existedId;\n\n if ((0, _util.isString)(innerHTML)) {\n $div.innerHTML = innerHTML;\n } else {\n $div.appendChild(innerHTML);\n }\n\n $container.appendChild($div);\n }\n }\n };\n\n var handleUnmounted = function handleUnmounted(e) {\n var object = e.target;\n\n if (object.nodeName === _g2.SHAPE.HTML) {\n var existedId = HTML_PREFIX + object.entity.getName();\n\n var $container = _this.contextService.getDomElement().parentNode;\n\n var $existedElement = $container.querySelector('#' + existedId);\n\n if ($existedElement) {\n $container.removeChild($existedElement);\n }\n }\n };\n\n renderingService.hooks.init.tap(HTMLRenderingPlugin_1.tag, function () {\n _this.renderingContext.root.addEventListener(_g2.ElementEvent.MOUNTED, handleMounted);\n\n _this.renderingContext.root.addEventListener(_g2.ElementEvent.UNMOUNTED, handleUnmounted);\n });\n renderingService.hooks.destroy.tap(HTMLRenderingPlugin_1.tag, function () {\n _this.renderingContext.root.removeEventListener(_g2.ElementEvent.MOUNTED, handleMounted);\n\n _this.renderingContext.root.removeEventListener(_g2.ElementEvent.UNMOUNTED, handleUnmounted);\n });\n renderingService.hooks.render.tap(HTMLRenderingPlugin_1.tag, function (object) {\n if (object.nodeName === _g2.SHAPE.HTML) {\n var existedId = HTML_PREFIX + object.entity.getName();\n\n var $container = _this.contextService.getDomElement().parentNode;\n\n var $existedElement = $container.querySelector('#' + existedId);\n\n _this.updateCSSStyle($existedElement, object.parsedStyle, object);\n }\n });\n };\n\n HTMLRenderingPlugin.prototype.updateCSSStyle = function ($el, parsedStyle, object) {\n var _a = parsedStyle.zIndex,\n zIndex = _a === void 0 ? 0 : _a,\n _b = parsedStyle.visibility,\n visibility = _b === void 0 ? 'visible' : _b,\n _c = parsedStyle.opacity,\n opacity = _c === void 0 ? 1 : _c,\n fill = parsedStyle.fill,\n _d = parsedStyle.lineWidth,\n lineWidth = _d === void 0 ? 0 : _d,\n lineDash = parsedStyle.lineDash,\n stroke = parsedStyle.stroke,\n anchor = parsedStyle.anchor,\n _e = parsedStyle.width,\n width = _e === void 0 ? 0 : _e,\n _f = parsedStyle.height,\n height = _f === void 0 ? 0 : _f,\n _g = parsedStyle.style,\n initialStyle = _g === void 0 ? '' : _g,\n _h = parsedStyle.className,\n className = _h === void 0 ? '' : _h;\n var style = {}; // use absolute position\n\n style.position = 'absolute';\n style.top = 0;\n style.left = 0;\n style.width = width + \"px\";\n style.height = height + \"px\"; // use transform\n\n style.transform = \"matrix3d(\" + object.getWorldTransform().join(',') + \")\";\n\n if (anchor) {\n style.transform += \" translate(\" + anchor[0] * 100 + \"%, \" + anchor[0] * 100 + \"%)\";\n } // use unparsed transform origin\n\n\n if (object.style.transformOrigin) {\n style['transform-origin'] = object.style.transformOrigin;\n } // z-index\n\n\n style['z-index'] = zIndex; // visibility\n\n style.visibility = visibility; // opacity\n\n style.opacity = opacity; // backgroundColor\n\n if (fill) {\n var color = '';\n\n if (fill.type === _g2.PARSED_COLOR_TYPE.Constant) {\n color = fill.formatted;\n } else if (fill.type === _g2.PARSED_COLOR_TYPE.LinearGradient) {\n var steps = fill.value.steps.map(function (cur) {\n // ['0', '#ffffff'],\n return cur[1] + \" \" + Number(cur[0]) * 100 + \"%\";\n }).join(','); // @see https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient()\n\n color = \"linear-gradient(to right, \" + steps + \");\";\n } else if (fill.type === _g2.PARSED_COLOR_TYPE.RadialGradient) {} else if (fill.type === _g2.PARSED_COLOR_TYPE.Pattern) {}\n\n style.background = color;\n } // border\n\n\n style['border-width'] = lineWidth + \"px\";\n\n if (stroke && stroke.type === _g2.PARSED_COLOR_TYPE.Constant) {\n style['border-color'] = stroke.formatted;\n style['border-style'] = 'solid';\n }\n\n if (lineDash) {\n style['border-style'] = 'dashed';\n } // filters\n\n\n if (object.style.filter) {\n // use unparsed filter directly\n style.filter = object.style.filter;\n }\n\n if (className) {\n if (Array.isArray(className)) {\n className.forEach(function (c) {\n $el.classList.add(c);\n });\n } else {\n $el.classList.add(className);\n }\n }\n\n $el.setAttribute('style', Object.keys(style).map(function (key) {\n return key + \":\" + style[key];\n }).join(';') + initialStyle);\n };\n\n var HTMLRenderingPlugin_1;\n HTMLRenderingPlugin.tag = 'HTMLRenderingPlugin';\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g2.ContextService), (0, _tslib.__metadata)(\"design:type\", Object)], HTMLRenderingPlugin.prototype, \"contextService\", void 0);\n (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_g2.RenderingContext), (0, _tslib.__metadata)(\"design:type\", Object)], HTMLRenderingPlugin.prototype, \"renderingContext\", void 0);\n HTMLRenderingPlugin = HTMLRenderingPlugin_1 = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({\n contrib: _g2.RenderingPluginContribution\n })], HTMLRenderingPlugin);\n return HTMLRenderingPlugin;\n}();\n\nexports.HTMLRenderingPlugin = HTMLRenderingPlugin;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-html-renderer/lib/HTMLRenderingPlugin.js?");
|
|
2123
|
-
|
|
2124
|
-
/***/ }),
|
|
2125
|
-
|
|
2126
|
-
/***/ "../g-plugin-html-renderer/lib/index.js":
|
|
2127
|
-
/*!**********************************************!*\
|
|
2128
|
-
!*** ../g-plugin-html-renderer/lib/index.js ***!
|
|
2129
|
-
\**********************************************/
|
|
2130
|
-
/*! no static exports found */
|
|
2131
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2132
|
-
|
|
2133
|
-
"use strict";
|
|
2134
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Plugin = void 0;\n\nvar _manaSyringe = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n\nvar _HTMLRenderingPlugin = __webpack_require__(/*! ./HTMLRenderingPlugin */ \"../g-plugin-html-renderer/lib/HTMLRenderingPlugin.js\");\n\nvar containerModule = (0, _manaSyringe.Module)(function (register) {\n register(_HTMLRenderingPlugin.HTMLRenderingPlugin);\n});\n\nvar Plugin = function () {\n function Plugin() {}\n\n Plugin.prototype.init = function (container) {\n container.load(containerModule);\n };\n\n Plugin.prototype.destroy = function (container) {// @ts-ignore\n // container.container.unload(containerModule);\n // // container.unload(containerModule);\n // container.remove(HTMLRenderingPlugin);\n };\n\n return Plugin;\n}();\n\nexports.Plugin = Plugin;\n\n//# sourceURL=webpack://G.Canvas2D/../g-plugin-html-renderer/lib/index.js?");
|
|
2135
|
-
|
|
2136
|
-
/***/ }),
|
|
2137
|
-
|
|
2138
|
-
/***/ "./src/Canvas2DContextService.ts":
|
|
2139
|
-
/*!***************************************!*\
|
|
2140
|
-
!*** ./src/Canvas2DContextService.ts ***!
|
|
2141
|
-
\***************************************/
|
|
2142
|
-
/*! exports provided: Canvas2DContextService */
|
|
2143
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2144
|
-
|
|
2145
|
-
"use strict";
|
|
2146
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Canvas2DContextService\", function() { return Canvas2DContextService; });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n/* harmony import */ var _antv_g__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n/* harmony import */ var _antv_g__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_g__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mana_syringe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n/* harmony import */ var mana_syringe__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(mana_syringe__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/util */ \"../../node_modules/@antv/util/esm/index.js\");\n/* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/dom */ \"./src/utils/dom.ts\");\n\n\n\n\n\nvar Canvas2DContextService = /** @class */ (function () {\n function Canvas2DContextService() {\n }\n Canvas2DContextService.prototype.init = function () {\n var _a = this.canvasConfig, container = _a.container, width = _a.width, height = _a.height;\n // create container\n this.$container = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__[\"isString\"])(container) ? document.getElementById(container) : container;\n if (this.$container) {\n // create canvas\n var $canvas = document.createElement('canvas');\n this.context = $canvas.getContext('2d');\n this.$container.appendChild($canvas);\n if (!this.$container.style.position) {\n this.$container.style.position = 'relative';\n }\n this.$canvas = $canvas;\n var dpr = window.devicePixelRatio || 1;\n dpr = dpr >= 1 ? Math.ceil(dpr) : 1;\n this.dpr = dpr;\n this.resize(width, height);\n }\n };\n Canvas2DContextService.prototype.getContext = function () {\n return this.context;\n };\n Canvas2DContextService.prototype.getDomElement = function () {\n return this.$canvas;\n };\n Canvas2DContextService.prototype.getDPR = function () {\n return this.dpr;\n };\n Canvas2DContextService.prototype.getBoundingClientRect = function () {\n var _a;\n return (_a = this.$canvas) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();\n };\n Canvas2DContextService.prototype.destroy = function () {\n if (this.$container && this.$canvas && this.$canvas.parentNode) {\n // destroy context\n this.$container.removeChild(this.$canvas);\n }\n };\n Canvas2DContextService.prototype.resize = function (width, height) {\n if (this.$canvas) {\n // set canvas width & height\n this.$canvas.width = this.dpr * width;\n this.$canvas.height = this.dpr * height;\n // set CSS style width & height\n Object(_utils_dom__WEBPACK_IMPORTED_MODULE_4__[\"setDOMSize\"])(this.$canvas, width, height);\n }\n };\n Canvas2DContextService.prototype.applyCursorStyle = function (cursor) {\n if (this.$container) {\n this.$container.style.cursor = cursor;\n }\n };\n Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__decorate\"])([\n Object(mana_syringe__WEBPACK_IMPORTED_MODULE_2__[\"inject\"])(_antv_g__WEBPACK_IMPORTED_MODULE_1__[\"CanvasConfig\"]),\n Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__metadata\"])(\"design:type\", Object)\n ], Canvas2DContextService.prototype, \"canvasConfig\", void 0);\n Canvas2DContextService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__decorate\"])([\n Object(mana_syringe__WEBPACK_IMPORTED_MODULE_2__[\"singleton\"])({ token: _antv_g__WEBPACK_IMPORTED_MODULE_1__[\"ContextService\"] })\n ], Canvas2DContextService);\n return Canvas2DContextService;\n}());\n\n\n\n//# sourceURL=webpack://G.Canvas2D/./src/Canvas2DContextService.ts?");
|
|
2147
|
-
|
|
2148
|
-
/***/ }),
|
|
2149
|
-
|
|
2150
|
-
/***/ "./src/ContextRegisterPlugin.ts":
|
|
2151
|
-
/*!**************************************!*\
|
|
2152
|
-
!*** ./src/ContextRegisterPlugin.ts ***!
|
|
2153
|
-
\**************************************/
|
|
2154
|
-
/*! exports provided: ContextRegisterPlugin */
|
|
2155
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2156
|
-
|
|
2157
|
-
"use strict";
|
|
2158
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ContextRegisterPlugin\", function() { return ContextRegisterPlugin; });\n/* harmony import */ var mana_syringe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mana-syringe */ \"mana-syringe\");\n/* harmony import */ var mana_syringe__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(mana_syringe__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Canvas2DContextService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Canvas2DContextService */ \"./src/Canvas2DContextService.ts\");\n\n\nvar containerModule = Object(mana_syringe__WEBPACK_IMPORTED_MODULE_0__[\"Module\"])(function (register) {\n /**\n * implements ContextService\n */\n register(_Canvas2DContextService__WEBPACK_IMPORTED_MODULE_1__[\"Canvas2DContextService\"]);\n});\nvar ContextRegisterPlugin = /** @class */ (function () {\n function ContextRegisterPlugin() {\n }\n ContextRegisterPlugin.prototype.init = function (container) {\n container.load(containerModule);\n };\n ContextRegisterPlugin.prototype.destroy = function (container) {\n // @ts-ignore\n // container.container.unload(containerModule);\n // container.remove(Canvas2DContextService);\n };\n return ContextRegisterPlugin;\n}());\n\n\n\n//# sourceURL=webpack://G.Canvas2D/./src/ContextRegisterPlugin.ts?");
|
|
2159
|
-
|
|
2160
|
-
/***/ }),
|
|
2161
|
-
|
|
2162
|
-
/***/ "./src/index.ts":
|
|
2163
|
-
/*!**********************!*\
|
|
2164
|
-
!*** ./src/index.ts ***!
|
|
2165
|
-
\**********************/
|
|
2166
|
-
/*! exports provided: DomInteraction, CanvasRenderer, CanvasPicker, HTMLRenderer, Renderer */
|
|
2167
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2168
|
-
|
|
2169
|
-
"use strict";
|
|
2170
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Renderer\", function() { return Renderer; });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.js\");\n/* harmony import */ var _antv_g__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/g */ \"@antv/g\");\n/* harmony import */ var _antv_g__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_g__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _antv_g_plugin_dom_interaction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/g-plugin-dom-interaction */ \"../g-plugin-dom-interaction/lib/index.js\");\n/* harmony import */ var _antv_g_plugin_dom_interaction__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_antv_g_plugin_dom_interaction__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"DomInteraction\", function() { return _antv_g_plugin_dom_interaction__WEBPACK_IMPORTED_MODULE_2__; });\n/* harmony import */ var _antv_g_plugin_canvas_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/g-plugin-canvas-renderer */ \"../g-plugin-canvas-renderer/lib/index.js\");\n/* harmony import */ var _antv_g_plugin_canvas_renderer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_antv_g_plugin_canvas_renderer__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"CanvasRenderer\", function() { return _antv_g_plugin_canvas_renderer__WEBPACK_IMPORTED_MODULE_3__; });\n/* harmony import */ var _antv_g_plugin_canvas_picker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @antv/g-plugin-canvas-picker */ \"../g-plugin-canvas-picker/lib/index.js\");\n/* harmony import */ var _antv_g_plugin_canvas_picker__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_antv_g_plugin_canvas_picker__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"CanvasPicker\", function() { return _antv_g_plugin_canvas_picker__WEBPACK_IMPORTED_MODULE_4__; });\n/* harmony import */ var _antv_g_plugin_html_renderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @antv/g-plugin-html-renderer */ \"../g-plugin-html-renderer/lib/index.js\");\n/* harmony import */ var _antv_g_plugin_html_renderer__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_antv_g_plugin_html_renderer__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"HTMLRenderer\", function() { return _antv_g_plugin_html_renderer__WEBPACK_IMPORTED_MODULE_5__; });\n/* harmony import */ var _ContextRegisterPlugin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ContextRegisterPlugin */ \"./src/ContextRegisterPlugin.ts\");\n\n\n\n\n\n\n\n\nvar Renderer = /** @class */ (function (_super) {\n Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__extends\"])(Renderer, _super);\n function Renderer(config) {\n var _this = _super.call(this, config) || this;\n // register Canvas2DContext\n _this.registerPlugin(new _ContextRegisterPlugin__WEBPACK_IMPORTED_MODULE_6__[\"ContextRegisterPlugin\"]());\n // enable rendering with Canvas2D API\n _this.registerPlugin(new _antv_g_plugin_canvas_renderer__WEBPACK_IMPORTED_MODULE_3__[\"Plugin\"]());\n _this.registerPlugin(new _antv_g_plugin_dom_interaction__WEBPACK_IMPORTED_MODULE_2__[\"Plugin\"]());\n // enable picking with Canvas2D API\n _this.registerPlugin(new _antv_g_plugin_canvas_picker__WEBPACK_IMPORTED_MODULE_4__[\"Plugin\"]());\n // render HTML component\n _this.registerPlugin(new _antv_g_plugin_html_renderer__WEBPACK_IMPORTED_MODULE_5__[\"Plugin\"]());\n return _this;\n }\n return Renderer;\n}(_antv_g__WEBPACK_IMPORTED_MODULE_1__[\"AbstractRenderer\"]));\n\n\n\n//# sourceURL=webpack://G.Canvas2D/./src/index.ts?");
|
|
2171
|
-
|
|
2172
|
-
/***/ }),
|
|
2173
|
-
|
|
2174
|
-
/***/ "./src/utils/browser.ts":
|
|
2175
|
-
/*!******************************!*\
|
|
2176
|
-
!*** ./src/utils/browser.ts ***!
|
|
2177
|
-
\******************************/
|
|
2178
|
-
/*! exports provided: isBrowser */
|
|
2179
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2180
|
-
|
|
2181
|
-
"use strict";
|
|
2182
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isBrowser\", function() { return isBrowser; });\nvar isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\n\n\n//# sourceURL=webpack://G.Canvas2D/./src/utils/browser.ts?");
|
|
2183
|
-
|
|
2184
|
-
/***/ }),
|
|
2185
|
-
|
|
2186
|
-
/***/ "./src/utils/dom.ts":
|
|
2187
|
-
/*!**************************!*\
|
|
2188
|
-
!*** ./src/utils/dom.ts ***!
|
|
2189
|
-
\**************************/
|
|
2190
|
-
/*! exports provided: setDOMSize */
|
|
2191
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2192
|
-
|
|
2193
|
-
"use strict";
|
|
2194
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setDOMSize\", function() { return setDOMSize; });\n/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser */ \"./src/utils/browser.ts\");\n\nvar PX_SUFFIX = 'px';\nfunction setDOMSize($el, width, height) {\n if (_browser__WEBPACK_IMPORTED_MODULE_0__[\"isBrowser\"]) {\n $el.style.width = width + PX_SUFFIX;\n $el.style.height = height + PX_SUFFIX;\n }\n}\n\n\n//# sourceURL=webpack://G.Canvas2D/./src/utils/dom.ts?");
|
|
2195
|
-
|
|
2196
|
-
/***/ }),
|
|
2197
|
-
|
|
2198
|
-
/***/ "@antv/g":
|
|
2199
|
-
/*!****************************************************************************************!*\
|
|
2200
|
-
!*** external {"commonjs":"@antv/g","commonjs2":"@antv/g","amd":"@antv/g","root":"G"} ***!
|
|
2201
|
-
\****************************************************************************************/
|
|
2202
|
-
/*! no static exports found */
|
|
2203
|
-
/***/ (function(module, exports) {
|
|
2204
|
-
|
|
2205
|
-
eval("module.exports = __WEBPACK_EXTERNAL_MODULE__antv_g__;\n\n//# sourceURL=webpack://G.Canvas2D/external_%7B%22commonjs%22:%22@antv/g%22,%22commonjs2%22:%22@antv/g%22,%22amd%22:%22@antv/g%22,%22root%22:%22G%22%7D?");
|
|
2206
|
-
|
|
2207
|
-
/***/ }),
|
|
2208
|
-
|
|
2209
|
-
/***/ "mana-syringe":
|
|
2210
|
-
/*!***********************************************************************************************************************!*\
|
|
2211
|
-
!*** external {"commonjs":"mana-syringe","commonjs2":"mana-syringe","amd":"mana-syringe","root":["G","ManaSyringe"]} ***!
|
|
2212
|
-
\***********************************************************************************************************************/
|
|
2213
|
-
/*! no static exports found */
|
|
2214
|
-
/***/ (function(module, exports) {
|
|
2215
|
-
|
|
2216
|
-
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_mana_syringe__;\n\n//# sourceURL=webpack://G.Canvas2D/external_%7B%22commonjs%22:%22mana-syringe%22,%22commonjs2%22:%22mana-syringe%22,%22amd%22:%22mana-syringe%22,%22root%22:%5B%22G%22,%22ManaSyringe%22%5D%7D?");
|
|
2217
|
-
|
|
2218
|
-
/***/ })
|
|
2219
|
-
|
|
2220
|
-
/******/ });
|
|
2221
|
-
});
|
|
1
|
+
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("mana-syringe"),require("@antv/g")):"function"==typeof define&&define.amd?define(["mana-syringe","@antv/g"],n):"object"==typeof exports?exports.Canvas2D=n(require("mana-syringe"),require("@antv/g")):(t.G=t.G||{},t.G.Canvas2D=n(t.G.ManaSyringe,t.G))}(window,(function(t,n){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=52)}([function(t,n,e){"use strict";e.r(n),e.d(n,"__extends",(function(){return o})),e.d(n,"__assign",(function(){return i})),e.d(n,"__rest",(function(){return a})),e.d(n,"__decorate",(function(){return u})),e.d(n,"__param",(function(){return c})),e.d(n,"__metadata",(function(){return f})),e.d(n,"__awaiter",(function(){return s})),e.d(n,"__generator",(function(){return d})),e.d(n,"__createBinding",(function(){return l})),e.d(n,"__exportStar",(function(){return h})),e.d(n,"__values",(function(){return v})),e.d(n,"__read",(function(){return p})),e.d(n,"__spread",(function(){return y})),e.d(n,"__spreadArrays",(function(){return m})),e.d(n,"__spreadArray",(function(){return g})),e.d(n,"__await",(function(){return M})),e.d(n,"__asyncGenerator",(function(){return b})),e.d(n,"__asyncDelegator",(function(){return P})),e.d(n,"__asyncValues",(function(){return _})),e.d(n,"__makeTemplateObject",(function(){return x})),e.d(n,"__importStar",(function(){return E})),e.d(n,"__importDefault",(function(){return S})),e.d(n,"__classPrivateFieldGet",(function(){return A})),e.d(n,"__classPrivateFieldSet",(function(){return j}));
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */
|
|
16
|
+
var r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)};function o(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var i=function(){return(i=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};function a(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}function u(t,n,e,r){var o,i=arguments.length,a=i<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,n,e,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(n,e,a):o(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a}function c(t,n){return function(e,r){n(e,r,t)}}function f(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}function s(t,n,e,r){return new(e||(e=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function u(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}c((r=r.apply(t,n||[])).next())}))}function d(t,n){var e,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=n.call(t,a)}catch(t){i=[6,t],r=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var l=Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]};function h(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||l(n,t,e)}function v(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,o,i=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(p(arguments[n]));return t}function m(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<e;n++)for(var i=arguments[n],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function g(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}function M(t){return this instanceof M?(this.v=t,this):new M(t)}function b(t,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=e.apply(t,n||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){o[t]&&(r[t]=function(n){return new Promise((function(e,r){i.push([t,n,e,r])>1||u(t,n)}))})}function u(t,n){try{(e=o[t](n)).value instanceof M?Promise.resolve(e.value.v).then(c,f):s(i[0][2],e)}catch(t){s(i[0][3],t)}var e}function c(t){u("next",t)}function f(t){u("throw",t)}function s(t,n){t(n),i.shift(),i.length&&u(i[0][0],i[0][1])}}function P(t){var n,e;return n={},r("next"),r("throw",(function(t){throw t})),r("return"),n[Symbol.iterator]=function(){return this},n;function r(r,o){n[r]=t[r]?function(n){return(e=!e)?{value:M(t[r](n)),done:"return"===r}:o?o(n):n}:o}}function _(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t=v(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(e){n[e]=t[e]&&function(n){return new Promise((function(r,o){(function(t,n,e,r){Promise.resolve(r).then((function(n){t({value:n,done:e})}),n)})(r,o,(n=t[e](n)).done,n.value)}))}}}function x(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t}var O=Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n};function E(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&l(n,t,e);return O(n,t),n}function S(t){return t&&t.__esModule?t:{default:t}}function A(t,n,e,r){if("a"===e&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?r:"a"===e?r.call(t):r?r.value:n.get(t)}function j(t,n,e,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!o:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(t,e):o?o.value=e:n.set(t,e),e}},function(n,e){n.exports=t},function(t,e){t.exports=n},function(t,n,e){"use strict";e.r(n),e.d(n,"contains",(function(){return o})),e.d(n,"includes",(function(){return o})),e.d(n,"difference",(function(){return a})),e.d(n,"find",(function(){return g})),e.d(n,"findIndex",(function(){return M})),e.d(n,"firstValue",(function(){return b})),e.d(n,"flatten",(function(){return P})),e.d(n,"flattenDeep",(function(){return x})),e.d(n,"getRange",(function(){return S})),e.d(n,"pull",(function(){return R})),e.d(n,"pullAt",(function(){return T})),e.d(n,"reduce",(function(){return B})),e.d(n,"remove",(function(){return k})),e.d(n,"sortBy",(function(){return L})),e.d(n,"union",(function(){return N})),e.d(n,"uniq",(function(){return D})),e.d(n,"valuesOfKey",(function(){return q})),e.d(n,"head",(function(){return F})),e.d(n,"last",(function(){return Y})),e.d(n,"startsWith",(function(){return G})),e.d(n,"endsWith",(function(){return X})),e.d(n,"filter",(function(){return i})),e.d(n,"every",(function(){return H})),e.d(n,"some",(function(){return V})),e.d(n,"group",(function(){return $})),e.d(n,"groupBy",(function(){return U})),e.d(n,"groupToMap",(function(){return z})),e.d(n,"getWrapBehavior",(function(){return Q})),e.d(n,"wrapBehavior",(function(){return Z})),e.d(n,"number2color",(function(){return J})),e.d(n,"parseRadius",(function(){return tt})),e.d(n,"clamp",(function(){return nt})),e.d(n,"fixedBase",(function(){return et})),e.d(n,"isDecimal",(function(){return ot})),e.d(n,"isEven",(function(){return it})),e.d(n,"isInteger",(function(){return at})),e.d(n,"isNegative",(function(){return ut})),e.d(n,"isNumberEqual",(function(){return ct})),e.d(n,"isOdd",(function(){return ft})),e.d(n,"isPositive",(function(){return st})),e.d(n,"max",(function(){return O})),e.d(n,"maxBy",(function(){return dt})),e.d(n,"min",(function(){return E})),e.d(n,"minBy",(function(){return lt})),e.d(n,"mod",(function(){return ht})),e.d(n,"toDegree",(function(){return pt})),e.d(n,"toInteger",(function(){return yt})),e.d(n,"toRadian",(function(){return gt})),e.d(n,"forIn",(function(){return Mt})),e.d(n,"has",(function(){return bt})),e.d(n,"hasKey",(function(){return Pt})),e.d(n,"hasValue",(function(){return xt})),e.d(n,"keys",(function(){return v})),e.d(n,"isMatch",(function(){return p})),e.d(n,"values",(function(){return _t})),e.d(n,"lowerCase",(function(){return Et})),e.d(n,"lowerFirst",(function(){return St})),e.d(n,"substitute",(function(){return At})),e.d(n,"upperCase",(function(){return jt})),e.d(n,"upperFirst",(function(){return wt})),e.d(n,"getType",(function(){return Ct})),e.d(n,"isArguments",(function(){return Tt})),e.d(n,"isArray",(function(){return d})),e.d(n,"isArrayLike",(function(){return r})),e.d(n,"isBoolean",(function(){return Bt})),e.d(n,"isDate",(function(){return kt})),e.d(n,"isError",(function(){return It})),e.d(n,"isFunction",(function(){return f})),e.d(n,"isFinite",(function(){return Lt})),e.d(n,"isNil",(function(){return s})),e.d(n,"isNull",(function(){return Dt})),e.d(n,"isNumber",(function(){return rt})),e.d(n,"isObject",(function(){return l})),e.d(n,"isObjectLike",(function(){return y})),e.d(n,"isPlainObject",(function(){return m})),e.d(n,"isPrototype",(function(){return qt})),e.d(n,"isRegExp",(function(){return Ft})),e.d(n,"isString",(function(){return I})),e.d(n,"isType",(function(){return c})),e.d(n,"isUndefined",(function(){return Yt})),e.d(n,"isElement",(function(){return Gt})),e.d(n,"requestAnimationFrame",(function(){return Xt})),e.d(n,"clearAnimationFrame",(function(){return Ht})),e.d(n,"augment",(function(){return Ut})),e.d(n,"clone",(function(){return $t})),e.d(n,"debounce",(function(){return Qt})),e.d(n,"memoize",(function(){return Zt})),e.d(n,"deepMix",(function(){return Jt})),e.d(n,"each",(function(){return h})),e.d(n,"extend",(function(){return tn})),e.d(n,"indexOf",(function(){return nn})),e.d(n,"isEmpty",(function(){return rn})),e.d(n,"isEqual",(function(){return an})),e.d(n,"isEqualWith",(function(){return un})),e.d(n,"map",(function(){return cn})),e.d(n,"mapValues",(function(){return sn})),e.d(n,"mix",(function(){return Wt})),e.d(n,"assign",(function(){return Wt})),e.d(n,"get",(function(){return dn})),e.d(n,"set",(function(){return ln})),e.d(n,"pick",(function(){return vn})),e.d(n,"omit",(function(){return pn})),e.d(n,"throttle",(function(){return yn})),e.d(n,"toArray",(function(){return mn})),e.d(n,"toString",(function(){return Ot})),e.d(n,"uniqueId",(function(){return Mn})),e.d(n,"noop",(function(){return bn})),e.d(n,"identity",(function(){return Pn})),e.d(n,"size",(function(){return _n})),e.d(n,"measureTextWidth",(function(){return En})),e.d(n,"getEllipsisText",(function(){return Sn})),e.d(n,"Cache",(function(){return An}));var r=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},o=function(t,n){return!!r(t)&&t.indexOf(n)>-1},i=function(t,n){if(!r(t))return t;for(var e=[],o=0;o<t.length;o++){var i=t[o];n(i,o)&&e.push(i)}return e},a=function(t,n){return void 0===n&&(n=[]),i(t,(function(t){return!o(n,t)}))},u={}.toString,c=function(t,n){return u.call(t)==="[object "+n+"]"},f=function(t){return c(t,"Function")},s=function(t){return null==t},d=function(t){return Array.isArray?Array.isArray(t):c(t,"Array")},l=function(t){var n=typeof t;return null!==t&&"object"===n||"function"===n};var h=function(t,n){if(t)if(d(t))for(var e=0,r=t.length;e<r&&!1!==n(t[e],e);e++);else if(l(t))for(var o in t)if(t.hasOwnProperty(o)&&!1===n(t[o],o))break},v=Object.keys?function(t){return Object.keys(t)}:function(t){var n=[];return h(t,(function(e,r){f(t)&&"prototype"===r||n.push(r)})),n};var p=function(t,n){var e=v(n),r=e.length;if(s(t))return!r;for(var o=0;o<r;o+=1){var i=e[o];if(n[i]!==t[i]||!(i in t))return!1}return!0},y=function(t){return"object"==typeof t&&null!==t},m=function(t){if(!y(t)||!c(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n};var g=function(t,n){if(!d(t))return null;var e;if(f(n)&&(e=n),m(n)&&(e=function(t){return p(t,n)}),e)for(var r=0;r<t.length;r+=1)if(e(t[r]))return t[r];return null};var M=function(t,n,e){void 0===e&&(e=0);for(var r=e;r<t.length;r++)if(n(t[r],r))return r;return-1},b=function(t,n){for(var e=null,r=0;r<t.length;r++){var o=t[r][n];if(!s(o)){e=d(o)?o[0]:o;break}}return e},P=function(t){if(!d(t))return[];for(var n=[],e=0;e<t.length;e++)n=n.concat(t[e]);return n},_=function(t,n){if(void 0===n&&(n=[]),d(t))for(var e=0;e<t.length;e+=1)_(t[e],n);else n.push(t);return n},x=_,O=function(t){if(d(t))return t.reduce((function(t,n){return Math.max(t,n)}),t[0])},E=function(t){if(d(t))return t.reduce((function(t,n){return Math.min(t,n)}),t[0])},S=function(t){var n=t.filter((function(t){return!isNaN(t)}));if(!n.length)return{min:0,max:0};if(d(t[0])){for(var e=[],r=0;r<t.length;r++)e=e.concat(t[r]);n=e}var o=O(n);return{min:E(n),max:o}},A=Array.prototype,j=A.splice,w=A.indexOf,R=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var r=0;r<n.length;r++)for(var o=n[r],i=-1;(i=w.call(t,o))>-1;)j.call(t,i,1);return t},C=Array.prototype.splice,T=function(t,n){if(!r(t))return[];for(var e=t?n.length:0,o=e-1;e--;){var i=void 0,a=n[e];e!==o&&a===i||(i=a,C.call(t,a,1))}return t},B=function(t,n,e){if(!d(t)&&!m(t))return t;var r=e;return h(t,(function(t,e){r=n(r,t,e)})),r},k=function(t,n){var e=[];if(!r(t))return e;for(var o=-1,i=[],a=t.length;++o<a;){var u=t[o];n(u,o,t)&&(e.push(u),i.push(o))}return T(t,i),e},I=function(t){return c(t,"String")};var L=function(t,n){var e;if(f(n))e=function(t,e){return n(t)-n(e)};else{var r=[];I(n)?r.push(n):d(n)&&(r=n),e=function(t,n){for(var e=0;e<r.length;e+=1){var o=r[e];if(t[o]>n[o])return 1;if(t[o]<n[o])return-1}return 0}}return t.sort(e),t};function D(t,n){void 0===n&&(n=new Map);var e=[];if(Array.isArray(t))for(var r=0,o=t.length;r<o;r++){var i=t[r];n.has(i)||(e.push(i),n.set(i,!0))}return e}var N=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return D([].concat.apply([],t))},q=function(t,n){for(var e=[],r={},o=0;o<t.length;o++){var i=t[o][n];if(!s(i)){d(i)||(i=[i]);for(var a=0;a<i.length;a++){var u=i[a];r[u]||(e.push(u),r[u]=!0)}}}return e};function F(t){if(r(t))return t[0]}function Y(t){if(r(t)){return t[t.length-1]}}var G=function(t,n){return!(!d(t)&&!I(t))&&t[0]===n};var X=function(t,n){return!(!d(t)&&!I(t))&&t[t.length-1]===n},H=function(t,n){for(var e=0;e<t.length;e++)if(!n(t[e],e))return!1;return!0},V=function(t,n){for(var e=0;e<t.length;e++)if(n(t[e],e))return!0;return!1},W=Object.prototype.hasOwnProperty;var U=function(t,n){if(!n||!d(t))return{};for(var e,r={},o=f(n)?n:function(t){return t[n]},i=0;i<t.length;i++){var a=t[i];e=o(a),W.call(r,e)?r[e].push(a):r[e]=[a]}return r};function z(t,n){if(!n)return{0:t};if(!f(n)){var e=d(n)?n:n.replace(/\s+/g,"").split("*");n=function(t){for(var n="_",r=0,o=e.length;r<o;r++)n+=t[e[r]]&&t[e[r]].toString();return n}}return U(t,n)}var $=function(t,n){if(!n)return[t];var e=z(t,n),r=[];for(var o in e)r.push(e[o]);return r};var Q=function(t,n){return t["_wrap_"+n]};var Z=function(t,n){if(t["_wrap_"+n])return t["_wrap_"+n];var e=function(e){t[n](e)};return t["_wrap_"+n]=e,e},K={};var J=function(t){var n=K[t];if(!n){for(var e=t.toString(16),r=e.length;r<6;r++)e="0"+e;n="#"+e,K[t]=n}return n};var tt=function(t){var n=0,e=0,r=0,o=0;return d(t)?1===t.length?n=e=r=o=t[0]:2===t.length?(n=r=t[0],e=o=t[1]):3===t.length?(n=t[0],e=o=t[1],r=t[2]):(n=t[0],e=t[1],r=t[2],o=t[3]):n=e=r=o=t,{r1:n,r2:e,r3:r,r4:o}},nt=function(t,n,e){return t<n?n:t>e?e:t},et=function(t,n){var e=n.toString(),r=e.indexOf(".");if(-1===r)return Math.round(t);var o=e.substr(r+1).length;return o>20&&(o=20),parseFloat(t.toFixed(o))},rt=function(t){return c(t,"Number")},ot=function(t){return rt(t)&&t%1!=0},it=function(t){return rt(t)&&t%2==0},at=Number.isInteger?Number.isInteger:function(t){return rt(t)&&t%1==0},ut=function(t){return rt(t)&&t<0};function ct(t,n,e){return void 0===e&&(e=1e-5),Math.abs(t-n)<e}var ft=function(t){return rt(t)&&t%2!=0},st=function(t){return rt(t)&&t>0},dt=function(t,n){if(d(t)){for(var e,r=-1/0,o=0;o<t.length;o++){var i=t[o],a=f(n)?n(i):i[n];a>r&&(e=i,r=a)}return e}},lt=function(t,n){if(d(t)){for(var e,r=1/0,o=0;o<t.length;o++){var i=t[o],a=f(n)?n(i):i[n];a<r&&(e=i,r=a)}return e}},ht=function(t,n){return(t%n+n)%n},vt=180/Math.PI,pt=function(t){return vt*t},yt=parseInt,mt=Math.PI/180,gt=function(t){return mt*t},Mt=h,bt=function(t,n){return t.hasOwnProperty(n)},Pt=bt,_t=Object.values?function(t){return Object.values(t)}:function(t){var n=[];return h(t,(function(e,r){f(t)&&"prototype"===r||n.push(e)})),n},xt=function(t,n){return o(_t(t),n)},Ot=function(t){return s(t)?"":t.toString()},Et=function(t){return Ot(t).toLowerCase()},St=function(t){var n=Ot(t);return n.charAt(0).toLowerCase()+n.substring(1)};var At=function(t,n){return t&&n?t.replace(/\\?\{([^{}]+)\}/g,(function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]})):t},jt=function(t){return Ot(t).toUpperCase()},wt=function(t){var n=Ot(t);return n.charAt(0).toUpperCase()+n.substring(1)},Rt={}.toString,Ct=function(t){return Rt.call(t).replace(/^\[object /,"").replace(/]$/,"")},Tt=function(t){return c(t,"Arguments")},Bt=function(t){return c(t,"Boolean")},kt=function(t){return c(t,"Date")},It=function(t){return c(t,"Error")},Lt=function(t){return rt(t)&&isFinite(t)},Dt=function(t){return null===t},Nt=Object.prototype,qt=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Nt)},Ft=function(t){return c(t,"RegExp")},Yt=function(t){return void 0===t},Gt=function(t){return t instanceof Element||t instanceof HTMLDocument};function Xt(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,16)})(t)}function Ht(t){(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout)(t)}function Vt(t,n){for(var e in n)n.hasOwnProperty(e)&&"constructor"!==e&&void 0!==n[e]&&(t[e]=n[e])}function Wt(t,n,e,r){return n&&Vt(t,n),e&&Vt(t,e),r&&Vt(t,r),t}var Ut=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var e=t[0],r=1;r<t.length;r++){var o=t[r];f(o)&&(o=o.prototype),Wt(e.prototype,o)}},zt=function(t){if("object"!=typeof t||null===t)return t;var n;if(d(t)){n=[];for(var e=0,r=t.length;e<r;e++)"object"==typeof t[e]&&null!=t[e]?n[e]=zt(t[e]):n[e]=t[e]}else for(var o in n={},t)"object"==typeof t[o]&&null!=t[o]?n[o]=zt(t[o]):n[o]=t[o];return n},$t=zt;var Qt=function(t,n,e){var r;return function(){var o=this,i=arguments,a=function(){r=null,e||t.apply(o,i)},u=e&&!r;clearTimeout(r),r=setTimeout(a,n),u&&t.apply(o,i)}},Zt=function(t,n){if(!f(t))throw new TypeError("Expected a function");var e=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=n?n.apply(this,r):r[0],a=e.cache;if(a.has(i))return a.get(i);var u=t.apply(this,r);return a.set(i,u),u};return e.cache=new Map,e};function Kt(t,n,e,r){for(var o in e=e||0,r=r||5,n)if(n.hasOwnProperty(o)){var i=n[o];null!==i&&m(i)?(m(t[o])||(t[o]={}),e<r?Kt(t[o],i,e+1,r):t[o]=n[o]):d(i)?(t[o]=[],t[o]=t[o].concat(i)):void 0!==i&&(t[o]=i)}}var Jt=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var r=0;r<n.length;r+=1)Kt(t,n[r]);return t},tn=function(t,n,e,r){f(n)||(e=n,n=t,t=function(){});var o=Object.create?function(t,n){return Object.create(t,{constructor:{value:n}})}:function(t,n){function e(){}e.prototype=t;var r=new e;return r.constructor=n,r},i=o(n.prototype,t);return t.prototype=Wt(i,t.prototype),t.superclass=o(n.prototype,n),Wt(i,e),Wt(t,r),t},nn=function(t,n){if(!r(t))return-1;var e=Array.prototype.indexOf;if(e)return e.call(t,n);for(var o=-1,i=0;i<t.length;i++)if(t[i]===n){o=i;break}return o},en=Object.prototype.hasOwnProperty;var rn=function(t){if(s(t))return!0;if(r(t))return!t.length;var n=Ct(t);if("Map"===n||"Set"===n)return!t.size;if(qt(t))return!Object.keys(t).length;for(var e in t)if(en.call(t,e))return!1;return!0},on=function(t,n){if(t===n)return!0;if(!t||!n)return!1;if(I(t)||I(n))return!1;if(r(t)||r(n)){if(t.length!==n.length)return!1;for(var e=!0,o=0;o<t.length&&(e=on(t[o],n[o]));o++);return e}if(y(t)||y(n)){var i=Object.keys(t),a=Object.keys(n);if(i.length!==a.length)return!1;for(e=!0,o=0;o<i.length&&(e=on(t[i[o]],n[i[o]]));o++);return e}return!1},an=on,un=function(t,n,e){return f(e)?!!e(t,n):an(t,n)},cn=function(t,n){if(!r(t))return t;for(var e=[],o=0;o<t.length;o++){var i=t[o];e.push(n(i,o))}return e},fn=function(t){return t},sn=function(t,n){void 0===n&&(n=fn);var e={};return l(t)&&!s(t)&&Object.keys(t).forEach((function(r){e[r]=n(t[r],r)})),e},dn=function(t,n,e){for(var r=0,o=I(n)?n.split("."):n;t&&r<o.length;)t=t[o[r++]];return void 0===t||r<o.length?e:t},ln=function(t,n,e){var r=t,o=I(n)?n.split("."):n;return o.forEach((function(t,n){n<o.length-1?(l(r[t])||(r[t]=rt(o[n+1])?[]:{}),r=r[t]):r[t]=e})),t},hn=Object.prototype.hasOwnProperty,vn=function(t,n){if(null===t||!m(t))return{};var e={};return h(n,(function(n){hn.call(t,n)&&(e[n]=t[n])})),e},pn=function(t,n){return B(t,(function(t,e,r){return n.includes(r)||(t[r]=e),t}),{})},yn=function(t,n,e){var r,o,i,a,u=0;e||(e={});var c=function(){u=!1===e.leading?0:Date.now(),r=null,a=t.apply(o,i),r||(o=i=null)},f=function(){var f=Date.now();u||!1!==e.leading||(u=f);var s=n-(f-u);return o=this,i=arguments,s<=0||s>n?(r&&(clearTimeout(r),r=null),u=f,a=t.apply(o,i),r||(o=i=null)):r||!1===e.trailing||(r=setTimeout(c,s)),a};return f.cancel=function(){clearTimeout(r),u=0,r=o=i=null},f},mn=function(t){return r(t)?Array.prototype.slice.call(t):[]},gn={},Mn=function(t){return gn[t=t||"g"]?gn[t]+=1:gn[t]=1,t+gn[t]},bn=function(){},Pn=function(t){return t};function _n(t){return s(t)?0:r(t)?t.length:Object.keys(t).length}var xn,On=e(0),En=Zt((function(t,n){void 0===n&&(n={});var e=n.fontSize,r=n.fontFamily,o=n.fontWeight,i=n.fontStyle,a=n.fontVariant;return xn||(xn=document.createElement("canvas").getContext("2d")),xn.font=[i,a,o,e+"px",r].join(" "),xn.measureText(I(t)?t:"").width}),(function(t,n){return void 0===n&&(n={}),Object(On.__spreadArrays)([t],_t(n)).join("")})),Sn=function(t,n,e,r){void 0===r&&(r="...");var o,i,a=En(r,e),u=I(t)?t:Ot(t),c=n,f=[];if(En(t,e)<=n)return t;for(;o=u.substr(0,16),!((i=En(o,e))+a>c&&i>c);)if(f.push(o),c-=i,!(u=u.substr(16)))return f.join("");for(;o=u.substr(0,1),!((i=En(o,e))+a>c);)if(f.push(o),c-=i,!(u=u.substr(1)))return f.join("");return""+f.join("")+r},An=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,n){var e=this.map[t];return void 0===e?n:e},t.prototype.set=function(t,n){this.map[t]=n},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}()},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.distance=function(t,n,e,r){var o=t-e,i=n-r;return Math.sqrt(o*o+i*i)},n.getBBoxByArray=function(t,n){var e=(0,r.min)(t),o=(0,r.min)(n),i=(0,r.max)(t),a=(0,r.max)(n);return{x:e,y:o,width:i-e,height:a-o}},n.getBBoxRange=function(t,n,e,o){return{minX:(0,r.min)([t,e]),maxX:(0,r.max)([t,e]),minY:(0,r.min)([n,o]),maxY:(0,r.max)([n,o])}},n.isNumberEqual=function(t,n){return Math.abs(t-n)<.001},n.piMod=function(t){return(t+2*Math.PI)%(2*Math.PI)};var r=e(3)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.distance=o,n.inArc=function(t,n,e,r,i,a,u,c){var f=(Math.atan2(c-n,u-t)+2*Math.PI)%(2*Math.PI);if(f<r||f>i)return!1;var s={x:t+e*Math.cos(f),y:n+e*Math.sin(f)};return o(s.x,s.y,u,c)<=a/2},n.inBox=i,n.inLine=a,n.inPolygon=f,n.inPolygons=function(t,n,e){for(var r=!1,o=0;o<t.length;o++){var i=t[o];if(r=f(i,n,e))break}return r},n.inPolyline=function(t,n,e,r,o){var i=t.length;if(i<2)return!1;for(var u=0;u<i-1;u++){var c=t[u][0],f=t[u][1],s=t[u+1][0],d=t[u+1][1];if(a(c,f,s,d,n,e,r))return!0}if(o){var l=t[0],h=t[i-1];if(a(l[0],l[1],h[0],h[1],n,e,r))return!0}return!1},n.inRect=function(t,n,e,r,o,a,u){var c=o/2;return i(t-c,n-c,e,o,a,u)||i(t+e-c,n-c,o,r,a,u)||i(t+c,n+r-c,e,o,a,u)||i(t-c,n+c,o,r,a,u)};var r=e(21);function o(t,n,e,r){var o=t-e,i=n-r;return Math.sqrt(o*o+i*i)}function i(t,n,e,r,o,i){return o>=t&&o<=t+e&&i>=n&&i<=n+r}function a(t,n,e,o,i,a,u){var c=Math.min(t,e),f=Math.max(t,e),s=Math.min(n,o),d=Math.max(n,o),l=i/2;return a>=c-l&&a<=f+l&&u>=s-l&&u<=d+l&&r.Line.pointToLine(t,n,e,o,a,u)<=i/2}function u(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function c(t,n,e){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])&&Math.min(t[0],n[0])<=e[0]&&e[0]<=Math.max(t[0],n[0])&&Math.min(t[1],n[1])<=e[1]&&e[1]<=Math.max(t[1],n[1])}function f(t,n,e){var r=!1,o=t.length;if(o<=2)return!1;for(var i=0;i<o;i++){var a=t[i],f=t[(i+1)%o];if(c(a,f,[n,e]))return!0;u(a[1]-e)>0!=u(f[1]-e)>0&&u(n-(e-a[1])*(a[0]-f[0])/(a[1]-f[1])-a[0])<0&&(r=!r)}return r}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.StyleRendererFactory=n.StyleRenderer=void 0;var r=e(1),o=r.Syringe.defineToken("StyleRendererFactory");n.StyleRendererFactory=o;var i=r.Syringe.defineToken("StyleRenderer");n.StyleRenderer=i},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ImagePool=void 0;var r=e(0),o=e(1),i=function(){function t(){this.imageCache={},this.patternCache={}}return t.prototype.getImageSync=function(t){return this.imageCache[t]},t.prototype.getOrCreateImage=function(t){var n=this;return this.imageCache[t]?Promise.resolve(this.imageCache[t]):new Promise((function(e,r){var o=new window.Image;o.onload=function(){e(o)},o.onerror=function(t){r(t)},o.crossOrigin="Anonymous",o.src=t,n.imageCache[t]=o}))},t.prototype.getPatternSync=function(t){var n=this.generatePatternKey(t);if(this.patternCache[n])return this.patternCache[n]},t.prototype.createPattern=function(t,n){var e=this;return this.getOrCreateImage(t.src).then((function(r){var o=e.generatePatternKey(t),i=n.createPattern(r,t.repetition);return i&&(e.patternCache[o]=i),e.patternCache[o]}))},t.prototype.generatePatternKey=function(t){return"pattern-"+t.src+"-"+t.repetition},t=(0,r.__decorate)([(0,o.singleton)()],t)}();n.ImagePool=i},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e(4),o=e(9),i={box:function(t,n,e,o){return(0,r.getBBoxByArray)([t,e],[n,o])},length:function(t,n,e,o){return(0,r.distance)(t,n,e,o)},pointAt:function(t,n,e,r,o){return{x:(1-o)*t+o*e,y:(1-o)*n+o*r}},pointDistance:function(t,n,e,o,i,a){var u=(e-t)*(i-t)+(o-n)*(a-n);return u<0?(0,r.distance)(t,n,i,a):u>(e-t)*(e-t)+(o-n)*(o-n)?(0,r.distance)(e,o,i,a):this.pointToLine(t,n,e,o,i,a)},pointToLine:function(t,n,e,r,i,a){var u=[e-t,r-n];if(o.vec2.exactEquals(u,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-n)*(a-n));var c=[-u[1],u[0]];o.vec2.normalize(c,c);var f=[i-t,a-n];return Math.abs(o.vec2.dot(f,c))},tangentAngle:function(t,n,e,r){return Math.atan2(r-n,e-t)}};n.default=i},function(t,n,e){"use strict";e.r(n),e.d(n,"glMatrix",(function(){return r})),e.d(n,"mat2",(function(){return o})),e.d(n,"mat2d",(function(){return i})),e.d(n,"mat3",(function(){return a})),e.d(n,"mat4",(function(){return u})),e.d(n,"quat",(function(){return s})),e.d(n,"quat2",(function(){return d})),e.d(n,"vec2",(function(){return l})),e.d(n,"vec3",(function(){return c})),e.d(n,"vec4",(function(){return f}));var r={};e.r(r),e.d(r,"EPSILON",(function(){return h})),e.d(r,"ARRAY_TYPE",(function(){return v})),e.d(r,"RANDOM",(function(){return p})),e.d(r,"setMatrixArrayType",(function(){return y})),e.d(r,"toRadian",(function(){return g})),e.d(r,"equals",(function(){return M}));var o={};e.r(o),e.d(o,"create",(function(){return b})),e.d(o,"clone",(function(){return P})),e.d(o,"copy",(function(){return _})),e.d(o,"identity",(function(){return x})),e.d(o,"fromValues",(function(){return O})),e.d(o,"set",(function(){return E})),e.d(o,"transpose",(function(){return S})),e.d(o,"invert",(function(){return A})),e.d(o,"adjoint",(function(){return j})),e.d(o,"determinant",(function(){return w})),e.d(o,"multiply",(function(){return R})),e.d(o,"rotate",(function(){return C})),e.d(o,"scale",(function(){return T})),e.d(o,"fromRotation",(function(){return B})),e.d(o,"fromScaling",(function(){return k})),e.d(o,"str",(function(){return I})),e.d(o,"frob",(function(){return L})),e.d(o,"LDU",(function(){return D})),e.d(o,"add",(function(){return N})),e.d(o,"subtract",(function(){return q})),e.d(o,"exactEquals",(function(){return F})),e.d(o,"equals",(function(){return Y})),e.d(o,"multiplyScalar",(function(){return G})),e.d(o,"multiplyScalarAndAdd",(function(){return X})),e.d(o,"mul",(function(){return H})),e.d(o,"sub",(function(){return V}));var i={};e.r(i),e.d(i,"create",(function(){return W})),e.d(i,"clone",(function(){return U})),e.d(i,"copy",(function(){return z})),e.d(i,"identity",(function(){return $})),e.d(i,"fromValues",(function(){return Q})),e.d(i,"set",(function(){return Z})),e.d(i,"invert",(function(){return K})),e.d(i,"determinant",(function(){return J})),e.d(i,"multiply",(function(){return tt})),e.d(i,"rotate",(function(){return nt})),e.d(i,"scale",(function(){return et})),e.d(i,"translate",(function(){return rt})),e.d(i,"fromRotation",(function(){return ot})),e.d(i,"fromScaling",(function(){return it})),e.d(i,"fromTranslation",(function(){return at})),e.d(i,"str",(function(){return ut})),e.d(i,"frob",(function(){return ct})),e.d(i,"add",(function(){return ft})),e.d(i,"subtract",(function(){return st})),e.d(i,"multiplyScalar",(function(){return dt})),e.d(i,"multiplyScalarAndAdd",(function(){return lt})),e.d(i,"exactEquals",(function(){return ht})),e.d(i,"equals",(function(){return vt})),e.d(i,"mul",(function(){return pt})),e.d(i,"sub",(function(){return yt}));var a={};e.r(a),e.d(a,"create",(function(){return mt})),e.d(a,"fromMat4",(function(){return gt})),e.d(a,"clone",(function(){return Mt})),e.d(a,"copy",(function(){return bt})),e.d(a,"fromValues",(function(){return Pt})),e.d(a,"set",(function(){return _t})),e.d(a,"identity",(function(){return xt})),e.d(a,"transpose",(function(){return Ot})),e.d(a,"invert",(function(){return Et})),e.d(a,"adjoint",(function(){return St})),e.d(a,"determinant",(function(){return At})),e.d(a,"multiply",(function(){return jt})),e.d(a,"translate",(function(){return wt})),e.d(a,"rotate",(function(){return Rt})),e.d(a,"scale",(function(){return Ct})),e.d(a,"fromTranslation",(function(){return Tt})),e.d(a,"fromRotation",(function(){return Bt})),e.d(a,"fromScaling",(function(){return kt})),e.d(a,"fromMat2d",(function(){return It})),e.d(a,"fromQuat",(function(){return Lt})),e.d(a,"normalFromMat4",(function(){return Dt})),e.d(a,"projection",(function(){return Nt})),e.d(a,"str",(function(){return qt})),e.d(a,"frob",(function(){return Ft})),e.d(a,"add",(function(){return Yt})),e.d(a,"subtract",(function(){return Gt})),e.d(a,"multiplyScalar",(function(){return Xt})),e.d(a,"multiplyScalarAndAdd",(function(){return Ht})),e.d(a,"exactEquals",(function(){return Vt})),e.d(a,"equals",(function(){return Wt})),e.d(a,"mul",(function(){return Ut})),e.d(a,"sub",(function(){return zt}));var u={};e.r(u),e.d(u,"create",(function(){return $t})),e.d(u,"clone",(function(){return Qt})),e.d(u,"copy",(function(){return Zt})),e.d(u,"fromValues",(function(){return Kt})),e.d(u,"set",(function(){return Jt})),e.d(u,"identity",(function(){return tn})),e.d(u,"transpose",(function(){return nn})),e.d(u,"invert",(function(){return en})),e.d(u,"adjoint",(function(){return rn})),e.d(u,"determinant",(function(){return on})),e.d(u,"multiply",(function(){return an})),e.d(u,"translate",(function(){return un})),e.d(u,"scale",(function(){return cn})),e.d(u,"rotate",(function(){return fn})),e.d(u,"rotateX",(function(){return sn})),e.d(u,"rotateY",(function(){return dn})),e.d(u,"rotateZ",(function(){return ln})),e.d(u,"fromTranslation",(function(){return hn})),e.d(u,"fromScaling",(function(){return vn})),e.d(u,"fromRotation",(function(){return pn})),e.d(u,"fromXRotation",(function(){return yn})),e.d(u,"fromYRotation",(function(){return mn})),e.d(u,"fromZRotation",(function(){return gn})),e.d(u,"fromRotationTranslation",(function(){return Mn})),e.d(u,"fromQuat2",(function(){return bn})),e.d(u,"getTranslation",(function(){return Pn})),e.d(u,"getScaling",(function(){return _n})),e.d(u,"getRotation",(function(){return xn})),e.d(u,"fromRotationTranslationScale",(function(){return On})),e.d(u,"fromRotationTranslationScaleOrigin",(function(){return En})),e.d(u,"fromQuat",(function(){return Sn})),e.d(u,"frustum",(function(){return An})),e.d(u,"perspectiveNO",(function(){return jn})),e.d(u,"perspective",(function(){return wn})),e.d(u,"perspectiveZO",(function(){return Rn})),e.d(u,"perspectiveFromFieldOfView",(function(){return Cn})),e.d(u,"orthoNO",(function(){return Tn})),e.d(u,"ortho",(function(){return Bn})),e.d(u,"orthoZO",(function(){return kn})),e.d(u,"lookAt",(function(){return In})),e.d(u,"targetTo",(function(){return Ln})),e.d(u,"str",(function(){return Dn})),e.d(u,"frob",(function(){return Nn})),e.d(u,"add",(function(){return qn})),e.d(u,"subtract",(function(){return Fn})),e.d(u,"multiplyScalar",(function(){return Yn})),e.d(u,"multiplyScalarAndAdd",(function(){return Gn})),e.d(u,"exactEquals",(function(){return Xn})),e.d(u,"equals",(function(){return Hn})),e.d(u,"mul",(function(){return Vn})),e.d(u,"sub",(function(){return Wn}));var c={};e.r(c),e.d(c,"create",(function(){return Un})),e.d(c,"clone",(function(){return zn})),e.d(c,"length",(function(){return $n})),e.d(c,"fromValues",(function(){return Qn})),e.d(c,"copy",(function(){return Zn})),e.d(c,"set",(function(){return Kn})),e.d(c,"add",(function(){return Jn})),e.d(c,"subtract",(function(){return te})),e.d(c,"multiply",(function(){return ne})),e.d(c,"divide",(function(){return ee})),e.d(c,"ceil",(function(){return re})),e.d(c,"floor",(function(){return oe})),e.d(c,"min",(function(){return ie})),e.d(c,"max",(function(){return ae})),e.d(c,"round",(function(){return ue})),e.d(c,"scale",(function(){return ce})),e.d(c,"scaleAndAdd",(function(){return fe})),e.d(c,"distance",(function(){return se})),e.d(c,"squaredDistance",(function(){return de})),e.d(c,"squaredLength",(function(){return le})),e.d(c,"negate",(function(){return he})),e.d(c,"inverse",(function(){return ve})),e.d(c,"normalize",(function(){return pe})),e.d(c,"dot",(function(){return ye})),e.d(c,"cross",(function(){return me})),e.d(c,"lerp",(function(){return ge})),e.d(c,"hermite",(function(){return Me})),e.d(c,"bezier",(function(){return be})),e.d(c,"random",(function(){return Pe})),e.d(c,"transformMat4",(function(){return _e})),e.d(c,"transformMat3",(function(){return xe})),e.d(c,"transformQuat",(function(){return Oe})),e.d(c,"rotateX",(function(){return Ee})),e.d(c,"rotateY",(function(){return Se})),e.d(c,"rotateZ",(function(){return Ae})),e.d(c,"angle",(function(){return je})),e.d(c,"zero",(function(){return we})),e.d(c,"str",(function(){return Re})),e.d(c,"exactEquals",(function(){return Ce})),e.d(c,"equals",(function(){return Te})),e.d(c,"sub",(function(){return ke})),e.d(c,"mul",(function(){return Ie})),e.d(c,"div",(function(){return Le})),e.d(c,"dist",(function(){return De})),e.d(c,"sqrDist",(function(){return Ne})),e.d(c,"len",(function(){return qe})),e.d(c,"sqrLen",(function(){return Fe})),e.d(c,"forEach",(function(){return Ye}));var f={};e.r(f),e.d(f,"create",(function(){return Ge})),e.d(f,"clone",(function(){return Xe})),e.d(f,"fromValues",(function(){return He})),e.d(f,"copy",(function(){return Ve})),e.d(f,"set",(function(){return We})),e.d(f,"add",(function(){return Ue})),e.d(f,"subtract",(function(){return ze})),e.d(f,"multiply",(function(){return $e})),e.d(f,"divide",(function(){return Qe})),e.d(f,"ceil",(function(){return Ze})),e.d(f,"floor",(function(){return Ke})),e.d(f,"min",(function(){return Je})),e.d(f,"max",(function(){return tr})),e.d(f,"round",(function(){return nr})),e.d(f,"scale",(function(){return er})),e.d(f,"scaleAndAdd",(function(){return rr})),e.d(f,"distance",(function(){return or})),e.d(f,"squaredDistance",(function(){return ir})),e.d(f,"length",(function(){return ar})),e.d(f,"squaredLength",(function(){return ur})),e.d(f,"negate",(function(){return cr})),e.d(f,"inverse",(function(){return fr})),e.d(f,"normalize",(function(){return sr})),e.d(f,"dot",(function(){return dr})),e.d(f,"cross",(function(){return lr})),e.d(f,"lerp",(function(){return hr})),e.d(f,"random",(function(){return vr})),e.d(f,"transformMat4",(function(){return pr})),e.d(f,"transformQuat",(function(){return yr})),e.d(f,"zero",(function(){return mr})),e.d(f,"str",(function(){return gr})),e.d(f,"exactEquals",(function(){return Mr})),e.d(f,"equals",(function(){return br})),e.d(f,"sub",(function(){return Pr})),e.d(f,"mul",(function(){return _r})),e.d(f,"div",(function(){return xr})),e.d(f,"dist",(function(){return Or})),e.d(f,"sqrDist",(function(){return Er})),e.d(f,"len",(function(){return Sr})),e.d(f,"sqrLen",(function(){return Ar})),e.d(f,"forEach",(function(){return jr}));var s={};e.r(s),e.d(s,"create",(function(){return wr})),e.d(s,"identity",(function(){return Rr})),e.d(s,"setAxisAngle",(function(){return Cr})),e.d(s,"getAxisAngle",(function(){return Tr})),e.d(s,"getAngle",(function(){return Br})),e.d(s,"multiply",(function(){return kr})),e.d(s,"rotateX",(function(){return Ir})),e.d(s,"rotateY",(function(){return Lr})),e.d(s,"rotateZ",(function(){return Dr})),e.d(s,"calculateW",(function(){return Nr})),e.d(s,"exp",(function(){return qr})),e.d(s,"ln",(function(){return Fr})),e.d(s,"pow",(function(){return Yr})),e.d(s,"slerp",(function(){return Gr})),e.d(s,"random",(function(){return Xr})),e.d(s,"invert",(function(){return Hr})),e.d(s,"conjugate",(function(){return Vr})),e.d(s,"fromMat3",(function(){return Wr})),e.d(s,"fromEuler",(function(){return Ur})),e.d(s,"str",(function(){return zr})),e.d(s,"clone",(function(){return no})),e.d(s,"fromValues",(function(){return eo})),e.d(s,"copy",(function(){return ro})),e.d(s,"set",(function(){return oo})),e.d(s,"add",(function(){return io})),e.d(s,"mul",(function(){return ao})),e.d(s,"scale",(function(){return uo})),e.d(s,"dot",(function(){return co})),e.d(s,"lerp",(function(){return fo})),e.d(s,"length",(function(){return so})),e.d(s,"len",(function(){return lo})),e.d(s,"squaredLength",(function(){return ho})),e.d(s,"sqrLen",(function(){return vo})),e.d(s,"normalize",(function(){return po})),e.d(s,"exactEquals",(function(){return yo})),e.d(s,"equals",(function(){return mo})),e.d(s,"rotationTo",(function(){return go})),e.d(s,"sqlerp",(function(){return Mo})),e.d(s,"setAxes",(function(){return bo}));var d={};e.r(d),e.d(d,"create",(function(){return Po})),e.d(d,"clone",(function(){return _o})),e.d(d,"fromValues",(function(){return xo})),e.d(d,"fromRotationTranslationValues",(function(){return Oo})),e.d(d,"fromRotationTranslation",(function(){return Eo})),e.d(d,"fromTranslation",(function(){return So})),e.d(d,"fromRotation",(function(){return Ao})),e.d(d,"fromMat4",(function(){return jo})),e.d(d,"copy",(function(){return wo})),e.d(d,"identity",(function(){return Ro})),e.d(d,"set",(function(){return Co})),e.d(d,"getReal",(function(){return To})),e.d(d,"getDual",(function(){return Bo})),e.d(d,"setReal",(function(){return ko})),e.d(d,"setDual",(function(){return Io})),e.d(d,"getTranslation",(function(){return Lo})),e.d(d,"translate",(function(){return Do})),e.d(d,"rotateX",(function(){return No})),e.d(d,"rotateY",(function(){return qo})),e.d(d,"rotateZ",(function(){return Fo})),e.d(d,"rotateByQuatAppend",(function(){return Yo})),e.d(d,"rotateByQuatPrepend",(function(){return Go})),e.d(d,"rotateAroundAxis",(function(){return Xo})),e.d(d,"add",(function(){return Ho})),e.d(d,"multiply",(function(){return Vo})),e.d(d,"mul",(function(){return Wo})),e.d(d,"scale",(function(){return Uo})),e.d(d,"dot",(function(){return zo})),e.d(d,"lerp",(function(){return $o})),e.d(d,"invert",(function(){return Qo})),e.d(d,"conjugate",(function(){return Zo})),e.d(d,"length",(function(){return Ko})),e.d(d,"len",(function(){return Jo})),e.d(d,"squaredLength",(function(){return ti})),e.d(d,"sqrLen",(function(){return ni})),e.d(d,"normalize",(function(){return ei})),e.d(d,"str",(function(){return ri})),e.d(d,"exactEquals",(function(){return oi})),e.d(d,"equals",(function(){return ii}));var l={};e.r(l),e.d(l,"create",(function(){return ai})),e.d(l,"clone",(function(){return ui})),e.d(l,"fromValues",(function(){return ci})),e.d(l,"copy",(function(){return fi})),e.d(l,"set",(function(){return si})),e.d(l,"add",(function(){return di})),e.d(l,"subtract",(function(){return li})),e.d(l,"multiply",(function(){return hi})),e.d(l,"divide",(function(){return vi})),e.d(l,"ceil",(function(){return pi})),e.d(l,"floor",(function(){return yi})),e.d(l,"min",(function(){return mi})),e.d(l,"max",(function(){return gi})),e.d(l,"round",(function(){return Mi})),e.d(l,"scale",(function(){return bi})),e.d(l,"scaleAndAdd",(function(){return Pi})),e.d(l,"distance",(function(){return _i})),e.d(l,"squaredDistance",(function(){return xi})),e.d(l,"length",(function(){return Oi})),e.d(l,"squaredLength",(function(){return Ei})),e.d(l,"negate",(function(){return Si})),e.d(l,"inverse",(function(){return Ai})),e.d(l,"normalize",(function(){return ji})),e.d(l,"dot",(function(){return wi})),e.d(l,"cross",(function(){return Ri})),e.d(l,"lerp",(function(){return Ci})),e.d(l,"random",(function(){return Ti})),e.d(l,"transformMat2",(function(){return Bi})),e.d(l,"transformMat2d",(function(){return ki})),e.d(l,"transformMat3",(function(){return Ii})),e.d(l,"transformMat4",(function(){return Li})),e.d(l,"rotate",(function(){return Di})),e.d(l,"angle",(function(){return Ni})),e.d(l,"zero",(function(){return qi})),e.d(l,"str",(function(){return Fi})),e.d(l,"exactEquals",(function(){return Yi})),e.d(l,"equals",(function(){return Gi})),e.d(l,"len",(function(){return Xi})),e.d(l,"sub",(function(){return Hi})),e.d(l,"mul",(function(){return Vi})),e.d(l,"div",(function(){return Wi})),e.d(l,"dist",(function(){return Ui})),e.d(l,"sqrDist",(function(){return zi})),e.d(l,"sqrLen",(function(){return $i})),e.d(l,"forEach",(function(){return Qi}));var h=1e-6,v="undefined"!=typeof Float32Array?Float32Array:Array,p=Math.random;function y(t){v=t}var m=Math.PI/180;function g(t){return t*m}function M(t,n){return Math.abs(t-n)<=h*Math.max(1,Math.abs(t),Math.abs(n))}function b(){var t=new v(4);return v!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t}function P(t){var n=new v(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n}function _(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function x(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t}function O(t,n,e,r){var o=new v(4);return o[0]=t,o[1]=n,o[2]=e,o[3]=r,o}function E(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t}function S(t,n){if(t===n){var e=n[1];t[1]=n[2],t[2]=e}else t[0]=n[0],t[1]=n[2],t[2]=n[1],t[3]=n[3];return t}function A(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=e*i-o*r;return a?(a=1/a,t[0]=i*a,t[1]=-r*a,t[2]=-o*a,t[3]=e*a,t):null}function j(t,n){var e=n[0];return t[0]=n[3],t[1]=-n[1],t[2]=-n[2],t[3]=e,t}function w(t){return t[0]*t[3]-t[2]*t[1]}function R(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=e[0],c=e[1],f=e[2],s=e[3];return t[0]=r*u+i*c,t[1]=o*u+a*c,t[2]=r*f+i*s,t[3]=o*f+a*s,t}function C(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=Math.sin(e),c=Math.cos(e);return t[0]=r*c+i*u,t[1]=o*c+a*u,t[2]=r*-u+i*c,t[3]=o*-u+a*c,t}function T(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=e[0],c=e[1];return t[0]=r*u,t[1]=o*u,t[2]=i*c,t[3]=a*c,t}function B(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=-e,t[3]=r,t}function k(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t}function I(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function L(t){return Math.hypot(t[0],t[1],t[2],t[3])}function D(t,n,e,r){return t[2]=r[2]/r[0],e[0]=r[0],e[1]=r[1],e[3]=r[3]-t[2]*e[1],[t,n,e]}function N(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function q(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function F(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function Y(t,n){var e=t[0],r=t[1],o=t[2],i=t[3],a=n[0],u=n[1],c=n[2],f=n[3];return Math.abs(e-a)<=h*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-u)<=h*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(o-c)<=h*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(i-f)<=h*Math.max(1,Math.abs(i),Math.abs(f))}function G(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function X(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t}Math.hypot||(Math.hypot=function(){for(var t=0,n=arguments.length;n--;)t+=arguments[n]*arguments[n];return Math.sqrt(t)});var H=R,V=q;function W(){var t=new v(6);return v!=Float32Array&&(t[1]=0,t[2]=0,t[4]=0,t[5]=0),t[0]=1,t[3]=1,t}function U(t){var n=new v(6);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n}function z(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function $(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Q(t,n,e,r,o,i){var a=new v(6);return a[0]=t,a[1]=n,a[2]=e,a[3]=r,a[4]=o,a[5]=i,a}function Z(t,n,e,r,o,i,a){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t[4]=i,t[5]=a,t}function K(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],u=n[5],c=e*i-r*o;return c?(c=1/c,t[0]=i*c,t[1]=-r*c,t[2]=-o*c,t[3]=e*c,t[4]=(o*u-i*a)*c,t[5]=(r*a-e*u)*c,t):null}function J(t){return t[0]*t[3]-t[1]*t[2]}function tt(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],c=n[5],f=e[0],s=e[1],d=e[2],l=e[3],h=e[4],v=e[5];return t[0]=r*f+i*s,t[1]=o*f+a*s,t[2]=r*d+i*l,t[3]=o*d+a*l,t[4]=r*h+i*v+u,t[5]=o*h+a*v+c,t}function nt(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],c=n[5],f=Math.sin(e),s=Math.cos(e);return t[0]=r*s+i*f,t[1]=o*s+a*f,t[2]=r*-f+i*s,t[3]=o*-f+a*s,t[4]=u,t[5]=c,t}function et(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],c=n[5],f=e[0],s=e[1];return t[0]=r*f,t[1]=o*f,t[2]=i*s,t[3]=a*s,t[4]=u,t[5]=c,t}function rt(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],c=n[5],f=e[0],s=e[1];return t[0]=r,t[1]=o,t[2]=i,t[3]=a,t[4]=r*f+i*s+u,t[5]=o*f+a*s+c,t}function ot(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=-e,t[3]=r,t[4]=0,t[5]=0,t}function it(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t[4]=0,t[5]=0,t}function at(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=n[0],t[5]=n[1],t}function ut(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"}function ct(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],1)}function ft(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t}function st(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t}function dt(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t}function lt(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t}function ht(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]}function vt(t,n){var e=t[0],r=t[1],o=t[2],i=t[3],a=t[4],u=t[5],c=n[0],f=n[1],s=n[2],d=n[3],l=n[4],v=n[5];return Math.abs(e-c)<=h*Math.max(1,Math.abs(e),Math.abs(c))&&Math.abs(r-f)<=h*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-s)<=h*Math.max(1,Math.abs(o),Math.abs(s))&&Math.abs(i-d)<=h*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(a-l)<=h*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(u-v)<=h*Math.max(1,Math.abs(u),Math.abs(v))}var pt=tt,yt=st;function mt(){var t=new v(9);return v!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function gt(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function Mt(t){var n=new v(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n}function bt(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t}function Pt(t,n,e,r,o,i,a,u,c){var f=new v(9);return f[0]=t,f[1]=n,f[2]=e,f[3]=r,f[4]=o,f[5]=i,f[6]=a,f[7]=u,f[8]=c,f}function _t(t,n,e,r,o,i,a,u,c,f){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t[4]=i,t[5]=a,t[6]=u,t[7]=c,t[8]=f,t}function xt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Ot(t,n){if(t===n){var e=n[1],r=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function Et(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],u=n[5],c=n[6],f=n[7],s=n[8],d=s*a-u*f,l=-s*i+u*c,h=f*i-a*c,v=e*d+r*l+o*h;return v?(v=1/v,t[0]=d*v,t[1]=(-s*r+o*f)*v,t[2]=(u*r-o*a)*v,t[3]=l*v,t[4]=(s*e-o*c)*v,t[5]=(-u*e+o*i)*v,t[6]=h*v,t[7]=(-f*e+r*c)*v,t[8]=(a*e-r*i)*v,t):null}function St(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],u=n[5],c=n[6],f=n[7],s=n[8];return t[0]=a*s-u*f,t[1]=o*f-r*s,t[2]=r*u-o*a,t[3]=u*c-i*s,t[4]=e*s-o*c,t[5]=o*i-e*u,t[6]=i*f-a*c,t[7]=r*c-e*f,t[8]=e*a-r*i,t}function At(t){var n=t[0],e=t[1],r=t[2],o=t[3],i=t[4],a=t[5],u=t[6],c=t[7],f=t[8];return n*(f*i-a*c)+e*(-f*o+a*u)+r*(c*o-i*u)}function jt(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],c=n[5],f=n[6],s=n[7],d=n[8],l=e[0],h=e[1],v=e[2],p=e[3],y=e[4],m=e[5],g=e[6],M=e[7],b=e[8];return t[0]=l*r+h*a+v*f,t[1]=l*o+h*u+v*s,t[2]=l*i+h*c+v*d,t[3]=p*r+y*a+m*f,t[4]=p*o+y*u+m*s,t[5]=p*i+y*c+m*d,t[6]=g*r+M*a+b*f,t[7]=g*o+M*u+b*s,t[8]=g*i+M*c+b*d,t}function wt(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],c=n[5],f=n[6],s=n[7],d=n[8],l=e[0],h=e[1];return t[0]=r,t[1]=o,t[2]=i,t[3]=a,t[4]=u,t[5]=c,t[6]=l*r+h*a+f,t[7]=l*o+h*u+s,t[8]=l*i+h*c+d,t}function Rt(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],c=n[5],f=n[6],s=n[7],d=n[8],l=Math.sin(e),h=Math.cos(e);return t[0]=h*r+l*a,t[1]=h*o+l*u,t[2]=h*i+l*c,t[3]=h*a-l*r,t[4]=h*u-l*o,t[5]=h*c-l*i,t[6]=f,t[7]=s,t[8]=d,t}function Ct(t,n,e){var r=e[0],o=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t}function Tt(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t}function Bt(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function kt(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function It(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t}function Lt(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=e+e,u=r+r,c=o+o,f=e*a,s=r*a,d=r*u,l=o*a,h=o*u,v=o*c,p=i*a,y=i*u,m=i*c;return t[0]=1-d-v,t[3]=s-m,t[6]=l+y,t[1]=s+m,t[4]=1-f-v,t[7]=h-p,t[2]=l-y,t[5]=h+p,t[8]=1-f-d,t}function Dt(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],u=n[5],c=n[6],f=n[7],s=n[8],d=n[9],l=n[10],h=n[11],v=n[12],p=n[13],y=n[14],m=n[15],g=e*u-r*a,M=e*c-o*a,b=e*f-i*a,P=r*c-o*u,_=r*f-i*u,x=o*f-i*c,O=s*p-d*v,E=s*y-l*v,S=s*m-h*v,A=d*y-l*p,j=d*m-h*p,w=l*m-h*y,R=g*w-M*j+b*A+P*S-_*E+x*O;return R?(R=1/R,t[0]=(u*w-c*j+f*A)*R,t[1]=(c*S-a*w-f*E)*R,t[2]=(a*j-u*S+f*O)*R,t[3]=(o*j-r*w-i*A)*R,t[4]=(e*w-o*S+i*E)*R,t[5]=(r*S-e*j-i*O)*R,t[6]=(p*x-y*_+m*P)*R,t[7]=(y*b-v*x-m*M)*R,t[8]=(v*_-p*b+m*g)*R,t):null}function Nt(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function qt(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function Ft(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function Yt(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t}function Gt(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}function Xt(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t}function Ht(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t}function Vt(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]}function Wt(t,n){var e=t[0],r=t[1],o=t[2],i=t[3],a=t[4],u=t[5],c=t[6],f=t[7],s=t[8],d=n[0],l=n[1],v=n[2],p=n[3],y=n[4],m=n[5],g=n[6],M=n[7],b=n[8];return Math.abs(e-d)<=h*Math.max(1,Math.abs(e),Math.abs(d))&&Math.abs(r-l)<=h*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-v)<=h*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-p)<=h*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(a-y)<=h*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(u-m)<=h*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(c-g)<=h*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(f-M)<=h*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(s-b)<=h*Math.max(1,Math.abs(s),Math.abs(b))}var Ut=jt,zt=Gt;function $t(){var t=new v(16);return v!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Qt(t){var n=new v(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n}function Zt(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function Kt(t,n,e,r,o,i,a,u,c,f,s,d,l,h,p,y){var m=new v(16);return m[0]=t,m[1]=n,m[2]=e,m[3]=r,m[4]=o,m[5]=i,m[6]=a,m[7]=u,m[8]=c,m[9]=f,m[10]=s,m[11]=d,m[12]=l,m[13]=h,m[14]=p,m[15]=y,m}function Jt(t,n,e,r,o,i,a,u,c,f,s,d,l,h,v,p,y){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t[4]=i,t[5]=a,t[6]=u,t[7]=c,t[8]=f,t[9]=s,t[10]=d,t[11]=l,t[12]=h,t[13]=v,t[14]=p,t[15]=y,t}function tn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function nn(t,n){if(t===n){var e=n[1],r=n[2],o=n[3],i=n[6],a=n[7],u=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=e,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=i,t[11]=n[14],t[12]=o,t[13]=a,t[14]=u}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function en(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],u=n[5],c=n[6],f=n[7],s=n[8],d=n[9],l=n[10],h=n[11],v=n[12],p=n[13],y=n[14],m=n[15],g=e*u-r*a,M=e*c-o*a,b=e*f-i*a,P=r*c-o*u,_=r*f-i*u,x=o*f-i*c,O=s*p-d*v,E=s*y-l*v,S=s*m-h*v,A=d*y-l*p,j=d*m-h*p,w=l*m-h*y,R=g*w-M*j+b*A+P*S-_*E+x*O;return R?(R=1/R,t[0]=(u*w-c*j+f*A)*R,t[1]=(o*j-r*w-i*A)*R,t[2]=(p*x-y*_+m*P)*R,t[3]=(l*_-d*x-h*P)*R,t[4]=(c*S-a*w-f*E)*R,t[5]=(e*w-o*S+i*E)*R,t[6]=(y*b-v*x-m*M)*R,t[7]=(s*x-l*b+h*M)*R,t[8]=(a*j-u*S+f*O)*R,t[9]=(r*S-e*j-i*O)*R,t[10]=(v*_-p*b+m*g)*R,t[11]=(d*b-s*_-h*g)*R,t[12]=(u*E-a*A-c*O)*R,t[13]=(e*A-r*E+o*O)*R,t[14]=(p*M-v*P-y*g)*R,t[15]=(s*P-d*M+l*g)*R,t):null}function rn(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],u=n[5],c=n[6],f=n[7],s=n[8],d=n[9],l=n[10],h=n[11],v=n[12],p=n[13],y=n[14],m=n[15];return t[0]=u*(l*m-h*y)-d*(c*m-f*y)+p*(c*h-f*l),t[1]=-(r*(l*m-h*y)-d*(o*m-i*y)+p*(o*h-i*l)),t[2]=r*(c*m-f*y)-u*(o*m-i*y)+p*(o*f-i*c),t[3]=-(r*(c*h-f*l)-u*(o*h-i*l)+d*(o*f-i*c)),t[4]=-(a*(l*m-h*y)-s*(c*m-f*y)+v*(c*h-f*l)),t[5]=e*(l*m-h*y)-s*(o*m-i*y)+v*(o*h-i*l),t[6]=-(e*(c*m-f*y)-a*(o*m-i*y)+v*(o*f-i*c)),t[7]=e*(c*h-f*l)-a*(o*h-i*l)+s*(o*f-i*c),t[8]=a*(d*m-h*p)-s*(u*m-f*p)+v*(u*h-f*d),t[9]=-(e*(d*m-h*p)-s*(r*m-i*p)+v*(r*h-i*d)),t[10]=e*(u*m-f*p)-a*(r*m-i*p)+v*(r*f-i*u),t[11]=-(e*(u*h-f*d)-a*(r*h-i*d)+s*(r*f-i*u)),t[12]=-(a*(d*y-l*p)-s*(u*y-c*p)+v*(u*l-c*d)),t[13]=e*(d*y-l*p)-s*(r*y-o*p)+v*(r*l-o*d),t[14]=-(e*(u*y-c*p)-a*(r*y-o*p)+v*(r*c-o*u)),t[15]=e*(u*l-c*d)-a*(r*l-o*d)+s*(r*c-o*u),t}function on(t){var n=t[0],e=t[1],r=t[2],o=t[3],i=t[4],a=t[5],u=t[6],c=t[7],f=t[8],s=t[9],d=t[10],l=t[11],h=t[12],v=t[13],p=t[14],y=t[15];return(n*a-e*i)*(d*y-l*p)-(n*u-r*i)*(s*y-l*v)+(n*c-o*i)*(s*p-d*v)+(e*u-r*a)*(f*y-l*h)-(e*c-o*a)*(f*p-d*h)+(r*c-o*u)*(f*v-s*h)}function an(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],c=n[5],f=n[6],s=n[7],d=n[8],l=n[9],h=n[10],v=n[11],p=n[12],y=n[13],m=n[14],g=n[15],M=e[0],b=e[1],P=e[2],_=e[3];return t[0]=M*r+b*u+P*d+_*p,t[1]=M*o+b*c+P*l+_*y,t[2]=M*i+b*f+P*h+_*m,t[3]=M*a+b*s+P*v+_*g,M=e[4],b=e[5],P=e[6],_=e[7],t[4]=M*r+b*u+P*d+_*p,t[5]=M*o+b*c+P*l+_*y,t[6]=M*i+b*f+P*h+_*m,t[7]=M*a+b*s+P*v+_*g,M=e[8],b=e[9],P=e[10],_=e[11],t[8]=M*r+b*u+P*d+_*p,t[9]=M*o+b*c+P*l+_*y,t[10]=M*i+b*f+P*h+_*m,t[11]=M*a+b*s+P*v+_*g,M=e[12],b=e[13],P=e[14],_=e[15],t[12]=M*r+b*u+P*d+_*p,t[13]=M*o+b*c+P*l+_*y,t[14]=M*i+b*f+P*h+_*m,t[15]=M*a+b*s+P*v+_*g,t}function un(t,n,e){var r,o,i,a,u,c,f,s,d,l,h,v,p=e[0],y=e[1],m=e[2];return n===t?(t[12]=n[0]*p+n[4]*y+n[8]*m+n[12],t[13]=n[1]*p+n[5]*y+n[9]*m+n[13],t[14]=n[2]*p+n[6]*y+n[10]*m+n[14],t[15]=n[3]*p+n[7]*y+n[11]*m+n[15]):(r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],c=n[5],f=n[6],s=n[7],d=n[8],l=n[9],h=n[10],v=n[11],t[0]=r,t[1]=o,t[2]=i,t[3]=a,t[4]=u,t[5]=c,t[6]=f,t[7]=s,t[8]=d,t[9]=l,t[10]=h,t[11]=v,t[12]=r*p+u*y+d*m+n[12],t[13]=o*p+c*y+l*m+n[13],t[14]=i*p+f*y+h*m+n[14],t[15]=a*p+s*y+v*m+n[15]),t}function cn(t,n,e){var r=e[0],o=e[1],i=e[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=n[7]*o,t[8]=n[8]*i,t[9]=n[9]*i,t[10]=n[10]*i,t[11]=n[11]*i,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function fn(t,n,e,r){var o,i,a,u,c,f,s,d,l,v,p,y,m,g,M,b,P,_,x,O,E,S,A,j,w=r[0],R=r[1],C=r[2],T=Math.hypot(w,R,C);return T<h?null:(w*=T=1/T,R*=T,C*=T,o=Math.sin(e),a=1-(i=Math.cos(e)),u=n[0],c=n[1],f=n[2],s=n[3],d=n[4],l=n[5],v=n[6],p=n[7],y=n[8],m=n[9],g=n[10],M=n[11],b=w*w*a+i,P=R*w*a+C*o,_=C*w*a-R*o,x=w*R*a-C*o,O=R*R*a+i,E=C*R*a+w*o,S=w*C*a+R*o,A=R*C*a-w*o,j=C*C*a+i,t[0]=u*b+d*P+y*_,t[1]=c*b+l*P+m*_,t[2]=f*b+v*P+g*_,t[3]=s*b+p*P+M*_,t[4]=u*x+d*O+y*E,t[5]=c*x+l*O+m*E,t[6]=f*x+v*O+g*E,t[7]=s*x+p*O+M*E,t[8]=u*S+d*A+y*j,t[9]=c*S+l*A+m*j,t[10]=f*S+v*A+g*j,t[11]=s*S+p*A+M*j,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)}function sn(t,n,e){var r=Math.sin(e),o=Math.cos(e),i=n[4],a=n[5],u=n[6],c=n[7],f=n[8],s=n[9],d=n[10],l=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=i*o+f*r,t[5]=a*o+s*r,t[6]=u*o+d*r,t[7]=c*o+l*r,t[8]=f*o-i*r,t[9]=s*o-a*r,t[10]=d*o-u*r,t[11]=l*o-c*r,t}function dn(t,n,e){var r=Math.sin(e),o=Math.cos(e),i=n[0],a=n[1],u=n[2],c=n[3],f=n[8],s=n[9],d=n[10],l=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=i*o-f*r,t[1]=a*o-s*r,t[2]=u*o-d*r,t[3]=c*o-l*r,t[8]=i*r+f*o,t[9]=a*r+s*o,t[10]=u*r+d*o,t[11]=c*r+l*o,t}function ln(t,n,e){var r=Math.sin(e),o=Math.cos(e),i=n[0],a=n[1],u=n[2],c=n[3],f=n[4],s=n[5],d=n[6],l=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=i*o+f*r,t[1]=a*o+s*r,t[2]=u*o+d*r,t[3]=c*o+l*r,t[4]=f*o-i*r,t[5]=s*o-a*r,t[6]=d*o-u*r,t[7]=l*o-c*r,t}function hn(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function vn(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function pn(t,n,e){var r,o,i,a=e[0],u=e[1],c=e[2],f=Math.hypot(a,u,c);return f<h?null:(a*=f=1/f,u*=f,c*=f,r=Math.sin(n),i=1-(o=Math.cos(n)),t[0]=a*a*i+o,t[1]=u*a*i+c*r,t[2]=c*a*i-u*r,t[3]=0,t[4]=a*u*i-c*r,t[5]=u*u*i+o,t[6]=c*u*i+a*r,t[7]=0,t[8]=a*c*i+u*r,t[9]=u*c*i-a*r,t[10]=c*c*i+o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function yn(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=e,t[7]=0,t[8]=0,t[9]=-e,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function mn(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-e,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=e,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function gn(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=0,t[4]=-e,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Mn(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=r+r,c=o+o,f=i+i,s=r*u,d=r*c,l=r*f,h=o*c,v=o*f,p=i*f,y=a*u,m=a*c,g=a*f;return t[0]=1-(h+p),t[1]=d+g,t[2]=l-m,t[3]=0,t[4]=d-g,t[5]=1-(s+p),t[6]=v+y,t[7]=0,t[8]=l+m,t[9]=v-y,t[10]=1-(s+h),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function bn(t,n){var e=new v(3),r=-n[0],o=-n[1],i=-n[2],a=n[3],u=n[4],c=n[5],f=n[6],s=n[7],d=r*r+o*o+i*i+a*a;return d>0?(e[0]=2*(u*a+s*r+c*i-f*o)/d,e[1]=2*(c*a+s*o+f*r-u*i)/d,e[2]=2*(f*a+s*i+u*o-c*r)/d):(e[0]=2*(u*a+s*r+c*i-f*o),e[1]=2*(c*a+s*o+f*r-u*i),e[2]=2*(f*a+s*i+u*o-c*r)),Mn(t,n,e),t}function Pn(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function _n(t,n){var e=n[0],r=n[1],o=n[2],i=n[4],a=n[5],u=n[6],c=n[8],f=n[9],s=n[10];return t[0]=Math.hypot(e,r,o),t[1]=Math.hypot(i,a,u),t[2]=Math.hypot(c,f,s),t}function xn(t,n){var e=new v(3);_n(e,n);var r=1/e[0],o=1/e[1],i=1/e[2],a=n[0]*r,u=n[1]*o,c=n[2]*i,f=n[4]*r,s=n[5]*o,d=n[6]*i,l=n[8]*r,h=n[9]*o,p=n[10]*i,y=a+s+p,m=0;return y>0?(m=2*Math.sqrt(y+1),t[3]=.25*m,t[0]=(d-h)/m,t[1]=(l-c)/m,t[2]=(u-f)/m):a>s&&a>p?(m=2*Math.sqrt(1+a-s-p),t[3]=(d-h)/m,t[0]=.25*m,t[1]=(u+f)/m,t[2]=(l+c)/m):s>p?(m=2*Math.sqrt(1+s-a-p),t[3]=(l-c)/m,t[0]=(u+f)/m,t[1]=.25*m,t[2]=(d+h)/m):(m=2*Math.sqrt(1+p-a-s),t[3]=(u-f)/m,t[0]=(l+c)/m,t[1]=(d+h)/m,t[2]=.25*m),t}function On(t,n,e,r){var o=n[0],i=n[1],a=n[2],u=n[3],c=o+o,f=i+i,s=a+a,d=o*c,l=o*f,h=o*s,v=i*f,p=i*s,y=a*s,m=u*c,g=u*f,M=u*s,b=r[0],P=r[1],_=r[2];return t[0]=(1-(v+y))*b,t[1]=(l+M)*b,t[2]=(h-g)*b,t[3]=0,t[4]=(l-M)*P,t[5]=(1-(d+y))*P,t[6]=(p+m)*P,t[7]=0,t[8]=(h+g)*_,t[9]=(p-m)*_,t[10]=(1-(d+v))*_,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function En(t,n,e,r,o){var i=n[0],a=n[1],u=n[2],c=n[3],f=i+i,s=a+a,d=u+u,l=i*f,h=i*s,v=i*d,p=a*s,y=a*d,m=u*d,g=c*f,M=c*s,b=c*d,P=r[0],_=r[1],x=r[2],O=o[0],E=o[1],S=o[2],A=(1-(p+m))*P,j=(h+b)*P,w=(v-M)*P,R=(h-b)*_,C=(1-(l+m))*_,T=(y+g)*_,B=(v+M)*x,k=(y-g)*x,I=(1-(l+p))*x;return t[0]=A,t[1]=j,t[2]=w,t[3]=0,t[4]=R,t[5]=C,t[6]=T,t[7]=0,t[8]=B,t[9]=k,t[10]=I,t[11]=0,t[12]=e[0]+O-(A*O+R*E+B*S),t[13]=e[1]+E-(j*O+C*E+k*S),t[14]=e[2]+S-(w*O+T*E+I*S),t[15]=1,t}function Sn(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=e+e,u=r+r,c=o+o,f=e*a,s=r*a,d=r*u,l=o*a,h=o*u,v=o*c,p=i*a,y=i*u,m=i*c;return t[0]=1-d-v,t[1]=s+m,t[2]=l-y,t[3]=0,t[4]=s-m,t[5]=1-f-v,t[6]=h+p,t[7]=0,t[8]=l+y,t[9]=h-p,t[10]=1-f-d,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function An(t,n,e,r,o,i,a){var u=1/(e-n),c=1/(o-r),f=1/(i-a);return t[0]=2*i*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*c,t[6]=0,t[7]=0,t[8]=(e+n)*u,t[9]=(o+r)*c,t[10]=(a+i)*f,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*i*2*f,t[15]=0,t}function jn(t,n,e,r,o){var i,a=1/Math.tan(n/2);return t[0]=a/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(i=1/(r-o),t[10]=(o+r)*i,t[14]=2*o*r*i):(t[10]=-1,t[14]=-2*r),t}var wn=jn;function Rn(t,n,e,r,o){var i,a=1/Math.tan(n/2);return t[0]=a/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(i=1/(r-o),t[10]=o*i,t[14]=o*r*i):(t[10]=-1,t[14]=-r),t}function Cn(t,n,e,r){var o=Math.tan(n.upDegrees*Math.PI/180),i=Math.tan(n.downDegrees*Math.PI/180),a=Math.tan(n.leftDegrees*Math.PI/180),u=Math.tan(n.rightDegrees*Math.PI/180),c=2/(a+u),f=2/(o+i);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=f,t[6]=0,t[7]=0,t[8]=-(a-u)*c*.5,t[9]=(o-i)*f*.5,t[10]=r/(e-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*e/(e-r),t[15]=0,t}function Tn(t,n,e,r,o,i,a){var u=1/(n-e),c=1/(r-o),f=1/(i-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*f,t[11]=0,t[12]=(n+e)*u,t[13]=(o+r)*c,t[14]=(a+i)*f,t[15]=1,t}var Bn=Tn;function kn(t,n,e,r,o,i,a){var u=1/(n-e),c=1/(r-o),f=1/(i-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=f,t[11]=0,t[12]=(n+e)*u,t[13]=(o+r)*c,t[14]=i*f,t[15]=1,t}function In(t,n,e,r){var o,i,a,u,c,f,s,d,l,v,p=n[0],y=n[1],m=n[2],g=r[0],M=r[1],b=r[2],P=e[0],_=e[1],x=e[2];return Math.abs(p-P)<h&&Math.abs(y-_)<h&&Math.abs(m-x)<h?tn(t):(s=p-P,d=y-_,l=m-x,o=M*(l*=v=1/Math.hypot(s,d,l))-b*(d*=v),i=b*(s*=v)-g*l,a=g*d-M*s,(v=Math.hypot(o,i,a))?(o*=v=1/v,i*=v,a*=v):(o=0,i=0,a=0),u=d*a-l*i,c=l*o-s*a,f=s*i-d*o,(v=Math.hypot(u,c,f))?(u*=v=1/v,c*=v,f*=v):(u=0,c=0,f=0),t[0]=o,t[1]=u,t[2]=s,t[3]=0,t[4]=i,t[5]=c,t[6]=d,t[7]=0,t[8]=a,t[9]=f,t[10]=l,t[11]=0,t[12]=-(o*p+i*y+a*m),t[13]=-(u*p+c*y+f*m),t[14]=-(s*p+d*y+l*m),t[15]=1,t)}function Ln(t,n,e,r){var o=n[0],i=n[1],a=n[2],u=r[0],c=r[1],f=r[2],s=o-e[0],d=i-e[1],l=a-e[2],h=s*s+d*d+l*l;h>0&&(s*=h=1/Math.sqrt(h),d*=h,l*=h);var v=c*l-f*d,p=f*s-u*l,y=u*d-c*s;return(h=v*v+p*p+y*y)>0&&(v*=h=1/Math.sqrt(h),p*=h,y*=h),t[0]=v,t[1]=p,t[2]=y,t[3]=0,t[4]=d*y-l*p,t[5]=l*v-s*y,t[6]=s*p-d*v,t[7]=0,t[8]=s,t[9]=d,t[10]=l,t[11]=0,t[12]=o,t[13]=i,t[14]=a,t[15]=1,t}function Dn(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function Nn(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function qn(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t[9]=n[9]+e[9],t[10]=n[10]+e[10],t[11]=n[11]+e[11],t[12]=n[12]+e[12],t[13]=n[13]+e[13],t[14]=n[14]+e[14],t[15]=n[15]+e[15],t}function Fn(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t[9]=n[9]-e[9],t[10]=n[10]-e[10],t[11]=n[11]-e[11],t[12]=n[12]-e[12],t[13]=n[13]-e[13],t[14]=n[14]-e[14],t[15]=n[15]-e[15],t}function Yn(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12]*e,t[13]=n[13]*e,t[14]=n[14]*e,t[15]=n[15]*e,t}function Gn(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t[9]=n[9]+e[9]*r,t[10]=n[10]+e[10]*r,t[11]=n[11]+e[11]*r,t[12]=n[12]+e[12]*r,t[13]=n[13]+e[13]*r,t[14]=n[14]+e[14]*r,t[15]=n[15]+e[15]*r,t}function Xn(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function Hn(t,n){var e=t[0],r=t[1],o=t[2],i=t[3],a=t[4],u=t[5],c=t[6],f=t[7],s=t[8],d=t[9],l=t[10],v=t[11],p=t[12],y=t[13],m=t[14],g=t[15],M=n[0],b=n[1],P=n[2],_=n[3],x=n[4],O=n[5],E=n[6],S=n[7],A=n[8],j=n[9],w=n[10],R=n[11],C=n[12],T=n[13],B=n[14],k=n[15];return Math.abs(e-M)<=h*Math.max(1,Math.abs(e),Math.abs(M))&&Math.abs(r-b)<=h*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(o-P)<=h*Math.max(1,Math.abs(o),Math.abs(P))&&Math.abs(i-_)<=h*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(a-x)<=h*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(u-O)<=h*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(c-E)<=h*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(f-S)<=h*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(s-A)<=h*Math.max(1,Math.abs(s),Math.abs(A))&&Math.abs(d-j)<=h*Math.max(1,Math.abs(d),Math.abs(j))&&Math.abs(l-w)<=h*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(v-R)<=h*Math.max(1,Math.abs(v),Math.abs(R))&&Math.abs(p-C)<=h*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(y-T)<=h*Math.max(1,Math.abs(y),Math.abs(T))&&Math.abs(m-B)<=h*Math.max(1,Math.abs(m),Math.abs(B))&&Math.abs(g-k)<=h*Math.max(1,Math.abs(g),Math.abs(k))}var Vn=an,Wn=Fn;function Un(){var t=new v(3);return v!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function zn(t){var n=new v(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function $n(t){var n=t[0],e=t[1],r=t[2];return Math.hypot(n,e,r)}function Qn(t,n,e){var r=new v(3);return r[0]=t,r[1]=n,r[2]=e,r}function Zn(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function Kn(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function Jn(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function te(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function ne(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function ee(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function re(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function oe(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function ie(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function ae(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function ue(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function ce(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function fe(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function se(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return Math.hypot(e,r,o)}function de(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return e*e+r*r+o*o}function le(t){var n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function he(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function ve(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function pe(t,n){var e=n[0],r=n[1],o=n[2],i=e*e+r*r+o*o;return i>0&&(i=1/Math.sqrt(i)),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t}function ye(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function me(t,n,e){var r=n[0],o=n[1],i=n[2],a=e[0],u=e[1],c=e[2];return t[0]=o*c-i*u,t[1]=i*a-r*c,t[2]=r*u-o*a,t}function ge(t,n,e,r){var o=n[0],i=n[1],a=n[2];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t}function Me(t,n,e,r,o,i){var a=i*i,u=a*(2*i-3)+1,c=a*(i-2)+i,f=a*(i-1),s=a*(3-2*i);return t[0]=n[0]*u+e[0]*c+r[0]*f+o[0]*s,t[1]=n[1]*u+e[1]*c+r[1]*f+o[1]*s,t[2]=n[2]*u+e[2]*c+r[2]*f+o[2]*s,t}function be(t,n,e,r,o,i){var a=1-i,u=a*a,c=i*i,f=u*a,s=3*i*u,d=3*c*a,l=c*i;return t[0]=n[0]*f+e[0]*s+r[0]*d+o[0]*l,t[1]=n[1]*f+e[1]*s+r[1]*d+o[1]*l,t[2]=n[2]*f+e[2]*s+r[2]*d+o[2]*l,t}function Pe(t,n){n=n||1;var e=2*p()*Math.PI,r=2*p()-1,o=Math.sqrt(1-r*r)*n;return t[0]=Math.cos(e)*o,t[1]=Math.sin(e)*o,t[2]=r*n,t}function _e(t,n,e){var r=n[0],o=n[1],i=n[2],a=e[3]*r+e[7]*o+e[11]*i+e[15];return a=a||1,t[0]=(e[0]*r+e[4]*o+e[8]*i+e[12])/a,t[1]=(e[1]*r+e[5]*o+e[9]*i+e[13])/a,t[2]=(e[2]*r+e[6]*o+e[10]*i+e[14])/a,t}function xe(t,n,e){var r=n[0],o=n[1],i=n[2];return t[0]=r*e[0]+o*e[3]+i*e[6],t[1]=r*e[1]+o*e[4]+i*e[7],t[2]=r*e[2]+o*e[5]+i*e[8],t}function Oe(t,n,e){var r=e[0],o=e[1],i=e[2],a=e[3],u=n[0],c=n[1],f=n[2],s=o*f-i*c,d=i*u-r*f,l=r*c-o*u,h=o*l-i*d,v=i*s-r*l,p=r*d-o*s,y=2*a;return s*=y,d*=y,l*=y,h*=2,v*=2,p*=2,t[0]=u+s+h,t[1]=c+d+v,t[2]=f+l+p,t}function Ee(t,n,e,r){var o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t}function Se(t,n,e,r){var o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t}function Ae(t,n,e,r){var o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t}function je(t,n){var e=t[0],r=t[1],o=t[2],i=n[0],a=n[1],u=n[2],c=Math.sqrt(e*e+r*r+o*o)*Math.sqrt(i*i+a*a+u*u),f=c&&ye(t,n)/c;return Math.acos(Math.min(Math.max(f,-1),1))}function we(t){return t[0]=0,t[1]=0,t[2]=0,t}function Re(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Ce(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function Te(t,n){var e=t[0],r=t[1],o=t[2],i=n[0],a=n[1],u=n[2];return Math.abs(e-i)<=h*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-a)<=h*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(o-u)<=h*Math.max(1,Math.abs(o),Math.abs(u))}var Be,ke=te,Ie=ne,Le=ee,De=se,Ne=de,qe=$n,Fe=le,Ye=(Be=Un(),function(t,n,e,r,o,i){var a,u;for(n||(n=3),e||(e=0),u=r?Math.min(r*n+e,t.length):t.length,a=e;a<u;a+=n)Be[0]=t[a],Be[1]=t[a+1],Be[2]=t[a+2],o(Be,Be,i),t[a]=Be[0],t[a+1]=Be[1],t[a+2]=Be[2];return t});function Ge(){var t=new v(4);return v!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Xe(t){var n=new v(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n}function He(t,n,e,r){var o=new v(4);return o[0]=t,o[1]=n,o[2]=e,o[3]=r,o}function Ve(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function We(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t}function Ue(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function ze(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function $e(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t}function Qe(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t}function Ze(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t}function Ke(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t}function Je(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t}function tr(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t}function nr(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t}function er(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function rr(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t}function or(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return Math.hypot(e,r,o,i)}function ir(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return e*e+r*r+o*o+i*i}function ar(t){var n=t[0],e=t[1],r=t[2],o=t[3];return Math.hypot(n,e,r,o)}function ur(t){var n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o}function cr(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t}function fr(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t}function sr(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=e*e+r*r+o*o+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=e*a,t[1]=r*a,t[2]=o*a,t[3]=i*a,t}function dr(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function lr(t,n,e,r){var o=e[0]*r[1]-e[1]*r[0],i=e[0]*r[2]-e[2]*r[0],a=e[0]*r[3]-e[3]*r[0],u=e[1]*r[2]-e[2]*r[1],c=e[1]*r[3]-e[3]*r[1],f=e[2]*r[3]-e[3]*r[2],s=n[0],d=n[1],l=n[2],h=n[3];return t[0]=d*f-l*c+h*u,t[1]=-s*f+l*a-h*i,t[2]=s*c-d*a+h*o,t[3]=-s*u+d*i-l*o,t}function hr(t,n,e,r){var o=n[0],i=n[1],a=n[2],u=n[3];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t[3]=u+r*(e[3]-u),t}function vr(t,n){var e,r,o,i,a,u;n=n||1;do{a=(e=2*p()-1)*e+(r=2*p()-1)*r}while(a>=1);do{u=(o=2*p()-1)*o+(i=2*p()-1)*i}while(u>=1);var c=Math.sqrt((1-a)/u);return t[0]=n*e,t[1]=n*r,t[2]=n*o*c,t[3]=n*i*c,t}function pr(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*o+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*o+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*o+e[11]*i+e[15]*a,t}function yr(t,n,e){var r=n[0],o=n[1],i=n[2],a=e[0],u=e[1],c=e[2],f=e[3],s=f*r+u*i-c*o,d=f*o+c*r-a*i,l=f*i+a*o-u*r,h=-a*r-u*o-c*i;return t[0]=s*f+h*-a+d*-c-l*-u,t[1]=d*f+h*-u+l*-a-s*-c,t[2]=l*f+h*-c+s*-u-d*-a,t[3]=n[3],t}function mr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function gr(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function Mr(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function br(t,n){var e=t[0],r=t[1],o=t[2],i=t[3],a=n[0],u=n[1],c=n[2],f=n[3];return Math.abs(e-a)<=h*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-u)<=h*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(o-c)<=h*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(i-f)<=h*Math.max(1,Math.abs(i),Math.abs(f))}var Pr=ze,_r=$e,xr=Qe,Or=or,Er=ir,Sr=ar,Ar=ur,jr=function(){var t=Ge();return function(n,e,r,o,i,a){var u,c;for(e||(e=4),r||(r=0),c=o?Math.min(o*e+r,n.length):n.length,u=r;u<c;u+=e)t[0]=n[u],t[1]=n[u+1],t[2]=n[u+2],t[3]=n[u+3],i(t,t,a),n[u]=t[0],n[u+1]=t[1],n[u+2]=t[2],n[u+3]=t[3];return n}}();function wr(){var t=new v(4);return v!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Rr(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Cr(t,n,e){e*=.5;var r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t}function Tr(t,n){var e=2*Math.acos(n[3]),r=Math.sin(e/2);return r>h?(t[0]=n[0]/r,t[1]=n[1]/r,t[2]=n[2]/r):(t[0]=1,t[1]=0,t[2]=0),e}function Br(t,n){var e=co(t,n);return Math.acos(2*e*e-1)}function kr(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=e[0],c=e[1],f=e[2],s=e[3];return t[0]=r*s+a*u+o*f-i*c,t[1]=o*s+a*c+i*u-r*f,t[2]=i*s+a*f+r*c-o*u,t[3]=a*s-r*u-o*c-i*f,t}function Ir(t,n,e){e*=.5;var r=n[0],o=n[1],i=n[2],a=n[3],u=Math.sin(e),c=Math.cos(e);return t[0]=r*c+a*u,t[1]=o*c+i*u,t[2]=i*c-o*u,t[3]=a*c-r*u,t}function Lr(t,n,e){e*=.5;var r=n[0],o=n[1],i=n[2],a=n[3],u=Math.sin(e),c=Math.cos(e);return t[0]=r*c-i*u,t[1]=o*c+a*u,t[2]=i*c+r*u,t[3]=a*c-o*u,t}function Dr(t,n,e){e*=.5;var r=n[0],o=n[1],i=n[2],a=n[3],u=Math.sin(e),c=Math.cos(e);return t[0]=r*c+o*u,t[1]=o*c-r*u,t[2]=i*c+a*u,t[3]=a*c-i*u,t}function Nr(t,n){var e=n[0],r=n[1],o=n[2];return t[0]=e,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-e*e-r*r-o*o)),t}function qr(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=Math.sqrt(e*e+r*r+o*o),u=Math.exp(i),c=a>0?u*Math.sin(a)/a:0;return t[0]=e*c,t[1]=r*c,t[2]=o*c,t[3]=u*Math.cos(a),t}function Fr(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=Math.sqrt(e*e+r*r+o*o),u=a>0?Math.atan2(a,i)/a:0;return t[0]=e*u,t[1]=r*u,t[2]=o*u,t[3]=.5*Math.log(e*e+r*r+o*o+i*i),t}function Yr(t,n,e){return Fr(t,n),uo(t,t,e),qr(t,t),t}function Gr(t,n,e,r){var o,i,a,u,c,f=n[0],s=n[1],d=n[2],l=n[3],v=e[0],p=e[1],y=e[2],m=e[3];return(i=f*v+s*p+d*y+l*m)<0&&(i=-i,v=-v,p=-p,y=-y,m=-m),1-i>h?(o=Math.acos(i),a=Math.sin(o),u=Math.sin((1-r)*o)/a,c=Math.sin(r*o)/a):(u=1-r,c=r),t[0]=u*f+c*v,t[1]=u*s+c*p,t[2]=u*d+c*y,t[3]=u*l+c*m,t}function Xr(t){var n=p(),e=p(),r=p(),o=Math.sqrt(1-n),i=Math.sqrt(n);return t[0]=o*Math.sin(2*Math.PI*e),t[1]=o*Math.cos(2*Math.PI*e),t[2]=i*Math.sin(2*Math.PI*r),t[3]=i*Math.cos(2*Math.PI*r),t}function Hr(t,n){var e=n[0],r=n[1],o=n[2],i=n[3],a=e*e+r*r+o*o+i*i,u=a?1/a:0;return t[0]=-e*u,t[1]=-r*u,t[2]=-o*u,t[3]=i*u,t}function Vr(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function Wr(t,n){var e,r=n[0]+n[4]+n[8];if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{var o=0;n[4]>n[0]&&(o=1),n[8]>n[3*o+o]&&(o=2);var i=(o+1)%3,a=(o+2)%3;e=Math.sqrt(n[3*o+o]-n[3*i+i]-n[3*a+a]+1),t[o]=.5*e,e=.5/e,t[3]=(n[3*i+a]-n[3*a+i])*e,t[i]=(n[3*i+o]+n[3*o+i])*e,t[a]=(n[3*a+o]+n[3*o+a])*e}return t}function Ur(t,n,e,r){var o=.5*Math.PI/180;n*=o,e*=o,r*=o;var i=Math.sin(n),a=Math.cos(n),u=Math.sin(e),c=Math.cos(e),f=Math.sin(r),s=Math.cos(r);return t[0]=i*c*s-a*u*f,t[1]=a*u*s+i*c*f,t[2]=a*c*f-i*u*s,t[3]=a*c*s+i*u*f,t}function zr(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var $r,Qr,Zr,Kr,Jr,to,no=Xe,eo=He,ro=Ve,oo=We,io=Ue,ao=kr,uo=er,co=dr,fo=hr,so=ar,lo=so,ho=ur,vo=ho,po=sr,yo=Mr,mo=br,go=($r=Un(),Qr=Qn(1,0,0),Zr=Qn(0,1,0),function(t,n,e){var r=ye(n,e);return r<-.999999?(me($r,Qr,n),qe($r)<1e-6&&me($r,Zr,n),pe($r,$r),Cr(t,$r,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(me($r,n,e),t[0]=$r[0],t[1]=$r[1],t[2]=$r[2],t[3]=1+r,po(t,t))}),Mo=(Kr=wr(),Jr=wr(),function(t,n,e,r,o,i){return Gr(Kr,n,o,i),Gr(Jr,e,r,i),Gr(t,Kr,Jr,2*i*(1-i)),t}),bo=(to=mt(),function(t,n,e,r){return to[0]=e[0],to[3]=e[1],to[6]=e[2],to[1]=r[0],to[4]=r[1],to[7]=r[2],to[2]=-n[0],to[5]=-n[1],to[8]=-n[2],po(t,Wr(t,to))});function Po(){var t=new v(8);return v!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0),t[3]=1,t}function _o(t){var n=new v(8);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n}function xo(t,n,e,r,o,i,a,u){var c=new v(8);return c[0]=t,c[1]=n,c[2]=e,c[3]=r,c[4]=o,c[5]=i,c[6]=a,c[7]=u,c}function Oo(t,n,e,r,o,i,a){var u=new v(8);u[0]=t,u[1]=n,u[2]=e,u[3]=r;var c=.5*o,f=.5*i,s=.5*a;return u[4]=c*r+f*e-s*n,u[5]=f*r+s*t-c*e,u[6]=s*r+c*n-f*t,u[7]=-c*t-f*n-s*e,u}function Eo(t,n,e){var r=.5*e[0],o=.5*e[1],i=.5*e[2],a=n[0],u=n[1],c=n[2],f=n[3];return t[0]=a,t[1]=u,t[2]=c,t[3]=f,t[4]=r*f+o*c-i*u,t[5]=o*f+i*a-r*c,t[6]=i*f+r*u-o*a,t[7]=-r*a-o*u-i*c,t}function So(t,n){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=.5*n[0],t[5]=.5*n[1],t[6]=.5*n[2],t[7]=0,t}function Ao(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=0,t[5]=0,t[6]=0,t[7]=0,t}function jo(t,n){var e=wr();xn(e,n);var r=new v(3);return Pn(r,n),Eo(t,e,r),t}function wo(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t}function Ro(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t}function Co(t,n,e,r,o,i,a,u,c){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t[4]=i,t[5]=a,t[6]=u,t[7]=c,t}var To=ro;function Bo(t,n){return t[0]=n[4],t[1]=n[5],t[2]=n[6],t[3]=n[7],t}var ko=ro;function Io(t,n){return t[4]=n[0],t[5]=n[1],t[6]=n[2],t[7]=n[3],t}function Lo(t,n){var e=n[4],r=n[5],o=n[6],i=n[7],a=-n[0],u=-n[1],c=-n[2],f=n[3];return t[0]=2*(e*f+i*a+r*c-o*u),t[1]=2*(r*f+i*u+o*a-e*c),t[2]=2*(o*f+i*c+e*u-r*a),t}function Do(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=.5*e[0],c=.5*e[1],f=.5*e[2],s=n[4],d=n[5],l=n[6],h=n[7];return t[0]=r,t[1]=o,t[2]=i,t[3]=a,t[4]=a*u+o*f-i*c+s,t[5]=a*c+i*u-r*f+d,t[6]=a*f+r*c-o*u+l,t[7]=-r*u-o*c-i*f+h,t}function No(t,n,e){var r=-n[0],o=-n[1],i=-n[2],a=n[3],u=n[4],c=n[5],f=n[6],s=n[7],d=u*a+s*r+c*i-f*o,l=c*a+s*o+f*r-u*i,h=f*a+s*i+u*o-c*r,v=s*a-u*r-c*o-f*i;return Ir(t,n,e),r=t[0],o=t[1],i=t[2],a=t[3],t[4]=d*a+v*r+l*i-h*o,t[5]=l*a+v*o+h*r-d*i,t[6]=h*a+v*i+d*o-l*r,t[7]=v*a-d*r-l*o-h*i,t}function qo(t,n,e){var r=-n[0],o=-n[1],i=-n[2],a=n[3],u=n[4],c=n[5],f=n[6],s=n[7],d=u*a+s*r+c*i-f*o,l=c*a+s*o+f*r-u*i,h=f*a+s*i+u*o-c*r,v=s*a-u*r-c*o-f*i;return Lr(t,n,e),r=t[0],o=t[1],i=t[2],a=t[3],t[4]=d*a+v*r+l*i-h*o,t[5]=l*a+v*o+h*r-d*i,t[6]=h*a+v*i+d*o-l*r,t[7]=v*a-d*r-l*o-h*i,t}function Fo(t,n,e){var r=-n[0],o=-n[1],i=-n[2],a=n[3],u=n[4],c=n[5],f=n[6],s=n[7],d=u*a+s*r+c*i-f*o,l=c*a+s*o+f*r-u*i,h=f*a+s*i+u*o-c*r,v=s*a-u*r-c*o-f*i;return Dr(t,n,e),r=t[0],o=t[1],i=t[2],a=t[3],t[4]=d*a+v*r+l*i-h*o,t[5]=l*a+v*o+h*r-d*i,t[6]=h*a+v*i+d*o-l*r,t[7]=v*a-d*r-l*o-h*i,t}function Yo(t,n,e){var r=e[0],o=e[1],i=e[2],a=e[3],u=n[0],c=n[1],f=n[2],s=n[3];return t[0]=u*a+s*r+c*i-f*o,t[1]=c*a+s*o+f*r-u*i,t[2]=f*a+s*i+u*o-c*r,t[3]=s*a-u*r-c*o-f*i,u=n[4],c=n[5],f=n[6],s=n[7],t[4]=u*a+s*r+c*i-f*o,t[5]=c*a+s*o+f*r-u*i,t[6]=f*a+s*i+u*o-c*r,t[7]=s*a-u*r-c*o-f*i,t}function Go(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=e[0],c=e[1],f=e[2],s=e[3];return t[0]=r*s+a*u+o*f-i*c,t[1]=o*s+a*c+i*u-r*f,t[2]=i*s+a*f+r*c-o*u,t[3]=a*s-r*u-o*c-i*f,u=e[4],c=e[5],f=e[6],s=e[7],t[4]=r*s+a*u+o*f-i*c,t[5]=o*s+a*c+i*u-r*f,t[6]=i*s+a*f+r*c-o*u,t[7]=a*s-r*u-o*c-i*f,t}function Xo(t,n,e,r){if(Math.abs(r)<h)return wo(t,n);var o=Math.hypot(e[0],e[1],e[2]);r*=.5;var i=Math.sin(r),a=i*e[0]/o,u=i*e[1]/o,c=i*e[2]/o,f=Math.cos(r),s=n[0],d=n[1],l=n[2],v=n[3];t[0]=s*f+v*a+d*c-l*u,t[1]=d*f+v*u+l*a-s*c,t[2]=l*f+v*c+s*u-d*a,t[3]=v*f-s*a-d*u-l*c;var p=n[4],y=n[5],m=n[6],g=n[7];return t[4]=p*f+g*a+y*c-m*u,t[5]=y*f+g*u+m*a-p*c,t[6]=m*f+g*c+p*u-y*a,t[7]=g*f-p*a-y*u-m*c,t}function Ho(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t}function Vo(t,n,e){var r=n[0],o=n[1],i=n[2],a=n[3],u=e[4],c=e[5],f=e[6],s=e[7],d=n[4],l=n[5],h=n[6],v=n[7],p=e[0],y=e[1],m=e[2],g=e[3];return t[0]=r*g+a*p+o*m-i*y,t[1]=o*g+a*y+i*p-r*m,t[2]=i*g+a*m+r*y-o*p,t[3]=a*g-r*p-o*y-i*m,t[4]=r*s+a*u+o*f-i*c+d*g+v*p+l*m-h*y,t[5]=o*s+a*c+i*u-r*f+l*g+v*y+h*p-d*m,t[6]=i*s+a*f+r*c-o*u+h*g+v*m+d*y-l*p,t[7]=a*s-r*u-o*c-i*f+v*g-d*p-l*y-h*m,t}var Wo=Vo;function Uo(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t}var zo=co;function $o(t,n,e,r){var o=1-r;return zo(n,e)<0&&(r=-r),t[0]=n[0]*o+e[0]*r,t[1]=n[1]*o+e[1]*r,t[2]=n[2]*o+e[2]*r,t[3]=n[3]*o+e[3]*r,t[4]=n[4]*o+e[4]*r,t[5]=n[5]*o+e[5]*r,t[6]=n[6]*o+e[6]*r,t[7]=n[7]*o+e[7]*r,t}function Qo(t,n){var e=ti(n);return t[0]=-n[0]/e,t[1]=-n[1]/e,t[2]=-n[2]/e,t[3]=n[3]/e,t[4]=-n[4]/e,t[5]=-n[5]/e,t[6]=-n[6]/e,t[7]=n[7]/e,t}function Zo(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t[4]=-n[4],t[5]=-n[5],t[6]=-n[6],t[7]=n[7],t}var Ko=so,Jo=Ko,ti=ho,ni=ti;function ei(t,n){var e=ti(n);if(e>0){e=Math.sqrt(e);var r=n[0]/e,o=n[1]/e,i=n[2]/e,a=n[3]/e,u=n[4],c=n[5],f=n[6],s=n[7],d=r*u+o*c+i*f+a*s;t[0]=r,t[1]=o,t[2]=i,t[3]=a,t[4]=(u-r*d)/e,t[5]=(c-o*d)/e,t[6]=(f-i*d)/e,t[7]=(s-a*d)/e}return t}function ri(t){return"quat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+")"}function oi(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]}function ii(t,n){var e=t[0],r=t[1],o=t[2],i=t[3],a=t[4],u=t[5],c=t[6],f=t[7],s=n[0],d=n[1],l=n[2],v=n[3],p=n[4],y=n[5],m=n[6],g=n[7];return Math.abs(e-s)<=h*Math.max(1,Math.abs(e),Math.abs(s))&&Math.abs(r-d)<=h*Math.max(1,Math.abs(r),Math.abs(d))&&Math.abs(o-l)<=h*Math.max(1,Math.abs(o),Math.abs(l))&&Math.abs(i-v)<=h*Math.max(1,Math.abs(i),Math.abs(v))&&Math.abs(a-p)<=h*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(u-y)<=h*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-m)<=h*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(f-g)<=h*Math.max(1,Math.abs(f),Math.abs(g))}function ai(){var t=new v(2);return v!=Float32Array&&(t[0]=0,t[1]=0),t}function ui(t){var n=new v(2);return n[0]=t[0],n[1]=t[1],n}function ci(t,n){var e=new v(2);return e[0]=t,e[1]=n,e}function fi(t,n){return t[0]=n[0],t[1]=n[1],t}function si(t,n,e){return t[0]=n,t[1]=e,t}function di(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t}function li(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t}function hi(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t}function vi(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t}function pi(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t}function yi(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t}function mi(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t}function gi(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t}function Mi(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t}function bi(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t}function Pi(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t}function _i(t,n){var e=n[0]-t[0],r=n[1]-t[1];return Math.hypot(e,r)}function xi(t,n){var e=n[0]-t[0],r=n[1]-t[1];return e*e+r*r}function Oi(t){var n=t[0],e=t[1];return Math.hypot(n,e)}function Ei(t){var n=t[0],e=t[1];return n*n+e*e}function Si(t,n){return t[0]=-n[0],t[1]=-n[1],t}function Ai(t,n){return t[0]=1/n[0],t[1]=1/n[1],t}function ji(t,n){var e=n[0],r=n[1],o=e*e+r*r;return o>0&&(o=1/Math.sqrt(o)),t[0]=n[0]*o,t[1]=n[1]*o,t}function wi(t,n){return t[0]*n[0]+t[1]*n[1]}function Ri(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t}function Ci(t,n,e,r){var o=n[0],i=n[1];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t}function Ti(t,n){n=n||1;var e=2*p()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t}function Bi(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o,t[1]=e[1]*r+e[3]*o,t}function ki(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o+e[4],t[1]=e[1]*r+e[3]*o+e[5],t}function Ii(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[3]*o+e[6],t[1]=e[1]*r+e[4]*o+e[7],t}function Li(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[4]*o+e[12],t[1]=e[1]*r+e[5]*o+e[13],t}function Di(t,n,e,r){var o=n[0]-e[0],i=n[1]-e[1],a=Math.sin(r),u=Math.cos(r);return t[0]=o*u-i*a+e[0],t[1]=o*a+i*u+e[1],t}function Ni(t,n){var e=t[0],r=t[1],o=n[0],i=n[1],a=Math.sqrt(e*e+r*r)*Math.sqrt(o*o+i*i),u=a&&(e*o+r*i)/a;return Math.acos(Math.min(Math.max(u,-1),1))}function qi(t){return t[0]=0,t[1]=0,t}function Fi(t){return"vec2("+t[0]+", "+t[1]+")"}function Yi(t,n){return t[0]===n[0]&&t[1]===n[1]}function Gi(t,n){var e=t[0],r=t[1],o=n[0],i=n[1];return Math.abs(e-o)<=h*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(r-i)<=h*Math.max(1,Math.abs(r),Math.abs(i))}var Xi=Oi,Hi=li,Vi=hi,Wi=vi,Ui=_i,zi=xi,$i=Ei,Qi=function(){var t=ai();return function(n,e,r,o,i,a){var u,c;for(e||(e=2),r||(r=0),c=o?Math.min(o*e+r,n.length):n.length,u=r;u<c;u+=e)t[0]=n[u],t[1]=n[u+1],i(t,t,a),n[u]=t[0],n[u+1]=t[1];return n}}()},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PathGenerator",{enumerable:!0,get:function(){return d.PathGenerator}}),Object.defineProperty(n,"PathGeneratorFactory",{enumerable:!0,get:function(){return d.PathGeneratorFactory}}),n.Plugin=void 0,Object.defineProperty(n,"RBush",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"RBushNode",{enumerable:!0,get:function(){return p.RBushNode}}),Object.defineProperty(n,"RBushRoot",{enumerable:!0,get:function(){return h.RBushRoot}}),Object.defineProperty(n,"StyleRenderer",{enumerable:!0,get:function(){return u.StyleRenderer}});var r,o=e(2),i=e(1),a=(r=e(14))&&r.__esModule?r:{default:r},u=e(15),c=e(16),f=e(18),s=e(7),d=e(19),l=e(17),h=e(36),v=e(37),p=e(20);o.world.registerComponent(p.RBushNode),o.globalContainer.register({token:{token:d.PathGenerator,named:o.SHAPE.Circle},useValue:d.CirclePath}),o.globalContainer.register({token:{token:d.PathGenerator,named:o.SHAPE.Ellipse},useValue:d.EllipsePath}),o.globalContainer.register({token:{token:d.PathGenerator,named:o.SHAPE.Rect},useValue:d.RectPath}),o.globalContainer.register({token:{token:d.PathGenerator,named:o.SHAPE.Line},useValue:d.LinePath}),o.globalContainer.register({token:{token:d.PathGenerator,named:o.SHAPE.Polyline},useValue:d.PolylinePath}),o.globalContainer.register({token:{token:d.PathGenerator,named:o.SHAPE.Polygon},useValue:d.PolygonPath}),o.globalContainer.register({token:{token:d.PathGenerator,named:o.SHAPE.Path},useValue:d.PathPath}),o.globalContainer.register({token:d.PathGeneratorFactory,useFactory:function(t){return function(n){return t.container.isBoundNamed(d.PathGenerator,n)?t.container.getNamed(d.PathGenerator,n):null}}});var y=(0,i.Module)((function(t){t(s.ImagePool),t({token:h.RBushRoot,useValue:new a.default}),t(u.DefaultRenderer),t(c.ImageRenderer),t(l.TextRenderer),t({token:u.StyleRendererFactory,useFactory:function(t){return function(n){return t.container.isBoundNamed(u.StyleRenderer,n)?t.container.getNamed(u.StyleRenderer,n):null}}}),t(f.GradientPool),t(h.CanvasRendererPlugin),t(v.LoadImagePlugin)})),m=function(){function t(){}return t.prototype.init=function(t){t.load(y,!0)},t.prototype.destroy=function(t){t.remove(s.ImagePool),t.remove(h.RBushRoot),t.remove(u.DefaultRenderer),t.remove(c.ImageRenderer),t.remove(l.TextRenderer),t.remove(u.StyleRenderer),t.remove(u.StyleRendererFactory),t.remove(f.GradientPool),t.remove(h.CanvasRendererPlugin),t.remove(v.LoadImagePlugin)},t}();n.Plugin=m},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Plugin=void 0;var r=e(1),o=e(25),i=(0,r.Module)((function(t){t(o.DOMInteractionPlugin)})),a=function(){function t(){}return t.prototype.init=function(t){t.load(i,!0)},t.prototype.destroy=function(t){t.remove(o.DOMInteractionPlugin)},t}();n.Plugin=a},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Plugin=void 0;var r=e(2),o=e(1),i=e(38),a=e(39),u=e(45),c=e(46),f=e(47),s=e(48),d=e(49),l=e(50),h=(0,o.Module)((function(t){t({token:i.PointInPathPickerFactory,useFactory:function(t){return function(t){return t===r.SHAPE.Circle?a.isPointInPath:t===r.SHAPE.Ellipse?u.isPointInPath:t===r.SHAPE.Rect?d.isPointInPath:t===r.SHAPE.Line?c.isPointInPath:t===r.SHAPE.Polyline?f.isPointInPath:t===r.SHAPE.Polygon?l.isPointInPath:t===r.SHAPE.Path?s.isPointInPath:t===r.SHAPE.Image||t===r.SHAPE.Text?function(){return!0}:null}}}),t(i.CanvasPickerPlugin)})),v=function(){function t(){}return t.prototype.init=function(t){t.load(h,!0)},t.prototype.destroy=function(t){t.remove(i.PointInPathPickerFactory),t.remove(i.CanvasPickerPlugin)},t}();n.Plugin=v},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Plugin=void 0;var r=e(1),o=e(51),i=(0,r.Module)((function(t){t(o.HTMLRenderingPlugin)})),a=function(){function t(){}return t.prototype.init=function(t){t.load(i,!0)},t.prototype.destroy=function(t){t.remove(o.HTMLRenderingPlugin)},t}();n.Plugin=a},function(t,n,e){t.exports=function(){"use strict";function t(t,r,o,i,a){!function t(e,r,o,i,a){for(;i>o;){if(i-o>600){var u=i-o+1,c=r-o+1,f=Math.log(u),s=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*s*(u-s)/u)*(c-u/2<0?-1:1);t(e,r,Math.max(o,Math.floor(r-c*s/u+d)),Math.min(i,Math.floor(r+(u-c)*s/u+d)),a)}var l=e[r],h=o,v=i;for(n(e,o,r),a(e[i],l)>0&&n(e,o,i);h<v;){for(n(e,h,v),h++,v--;a(e[h],l)<0;)h++;for(;a(e[v],l)>0;)v--}0===a(e[o],l)?n(e,o,v):n(e,++v,i),v<=r&&(o=v+1),r<=v&&(i=v-1)}}(t,r,o||0,i||t.length-1,a||e)}function n(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function e(t,n){return t<n?-1:t>n?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(t,n,e){if(!e)return n.indexOf(t);for(var r=0;r<n.length;r++)if(e(t,n[r]))return r;return-1}function i(t,n){a(t,0,t.children.length,n,t)}function a(t,n,e,r,o){o||(o=v(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(var i=n;i<e;i++){var a=t.children[i];u(o,t.leaf?r(a):a)}return o}function u(t,n){return t.minX=Math.min(t.minX,n.minX),t.minY=Math.min(t.minY,n.minY),t.maxX=Math.max(t.maxX,n.maxX),t.maxY=Math.max(t.maxY,n.maxY),t}function c(t,n){return t.minX-n.minX}function f(t,n){return t.minY-n.minY}function s(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function l(t,n){return t.minX<=n.minX&&t.minY<=n.minY&&n.maxX<=t.maxX&&n.maxY<=t.maxY}function h(t,n){return n.minX<=t.maxX&&n.minY<=t.maxY&&n.maxX>=t.minX&&n.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function p(n,e,r,o,i){for(var a=[e,r];a.length;)if(!((r=a.pop())-(e=a.pop())<=o)){var u=e+Math.ceil((r-e)/o/2)*o;t(n,u,e,r,i),a.push(e,u,u,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var n=this.data,e=[];if(!h(t,n))return e;for(var r=this.toBBox,o=[];n;){for(var i=0;i<n.children.length;i++){var a=n.children[i],u=n.leaf?r(a):a;h(t,u)&&(n.leaf?e.push(a):l(t,u)?this._all(a,e):o.push(a))}n=o.pop()}return e},r.prototype.collides=function(t){var n=this.data;if(!h(t,n))return!1;for(var e=[];n;){for(var r=0;r<n.children.length;r++){var o=n.children[r],i=n.leaf?this.toBBox(o):o;if(h(t,i)){if(n.leaf||l(t,i))return!0;e.push(o)}}n=e.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var n=0;n<t.length;n++)this.insert(t[n]);return this}var e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){var r=this.data;this.data=e,e=r}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=v([]),this},r.prototype.remove=function(t,n){if(!t)return this;for(var e,r,i,a=this.data,u=this.toBBox(t),c=[],f=[];a||c.length;){if(a||(a=c.pop(),r=c[c.length-1],e=f.pop(),i=!0),a.leaf){var s=o(t,a.children,n);if(-1!==s)return a.children.splice(s,1),c.push(a),this._condense(c),this}i||a.leaf||!l(a,u)?r?(e++,a=r.children[e],i=!1):a=null:(c.push(a),f.push(e),e=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,n){return t.minX-n.minX},r.prototype.compareMinY=function(t,n){return t.minY-n.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,n){for(var e=[];t;)t.leaf?n.push.apply(n,t.children):e.push.apply(e,t.children),t=e.pop();return n},r.prototype._build=function(t,n,e,r){var o,a=e-n+1,u=this._maxEntries;if(a<=u)return i(o=v(t.slice(n,e+1)),this.toBBox),o;r||(r=Math.ceil(Math.log(a)/Math.log(u)),u=Math.ceil(a/Math.pow(u,r-1))),(o=v([])).leaf=!1,o.height=r;var c=Math.ceil(a/u),f=c*Math.ceil(Math.sqrt(u));p(t,n,e,f,this.compareMinX);for(var s=n;s<=e;s+=f){var d=Math.min(s+f-1,e);p(t,s,d,c,this.compareMinY);for(var l=s;l<=d;l+=c){var h=Math.min(l+c-1,d);o.children.push(this._build(t,l,h,r-1))}}return i(o,this.toBBox),o},r.prototype._chooseSubtree=function(t,n,e,r){for(;r.push(n),!n.leaf&&r.length-1!==e;){for(var o=1/0,i=1/0,a=void 0,u=0;u<n.children.length;u++){var c=n.children[u],f=s(c),d=(l=t,h=c,(Math.max(h.maxX,l.maxX)-Math.min(h.minX,l.minX))*(Math.max(h.maxY,l.maxY)-Math.min(h.minY,l.minY))-f);d<i?(i=d,o=f<o?f:o,a=c):d===i&&f<o&&(o=f,a=c)}n=a||n.children[0]}var l,h;return n},r.prototype._insert=function(t,n,e){var r=e?t:this.toBBox(t),o=[],i=this._chooseSubtree(r,this.data,n,o);for(i.children.push(t),u(i,r);n>=0&&o[n].children.length>this._maxEntries;)this._split(o,n),n--;this._adjustParentBBoxes(r,o,n)},r.prototype._split=function(t,n){var e=t[n],r=e.children.length,o=this._minEntries;this._chooseSplitAxis(e,o,r);var a=this._chooseSplitIndex(e,o,r),u=v(e.children.splice(a,e.children.length-a));u.height=e.height,u.leaf=e.leaf,i(e,this.toBBox),i(u,this.toBBox),n?t[n-1].children.push(u):this._splitRoot(e,u)},r.prototype._splitRoot=function(t,n){this.data=v([t,n]),this.data.height=t.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,n,e){for(var r,o,i,u,c,f,d,l=1/0,h=1/0,v=n;v<=e-n;v++){var p=a(t,0,v,this.toBBox),y=a(t,v,e,this.toBBox),m=(o=p,i=y,u=Math.max(o.minX,i.minX),c=Math.max(o.minY,i.minY),f=Math.min(o.maxX,i.maxX),d=Math.min(o.maxY,i.maxY),Math.max(0,f-u)*Math.max(0,d-c)),g=s(p)+s(y);m<l?(l=m,r=v,h=g<h?g:h):m===l&&g<h&&(h=g,r=v)}return r||e-n},r.prototype._chooseSplitAxis=function(t,n,e){var r=t.leaf?this.compareMinX:c,o=t.leaf?this.compareMinY:f;this._allDistMargin(t,n,e,r)<this._allDistMargin(t,n,e,o)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,n,e,r){t.children.sort(r);for(var o=this.toBBox,i=a(t,0,n,o),c=a(t,e-n,e,o),f=d(i)+d(c),s=n;s<e-n;s++){var l=t.children[s];u(i,t.leaf?o(l):l),f+=d(i)}for(var h=e-n-1;h>=n;h--){var v=t.children[h];u(c,t.leaf?o(v):v),f+=d(c)}return f},r.prototype._adjustParentBBoxes=function(t,n,e){for(var r=e;r>=0;r--)u(n[r],t)},r.prototype._condense=function(t){for(var n=t.length-1,e=void 0;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():i(t[n],this.toBBox)},r}()},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(6);Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in n&&n[t]===r[t]||Object.defineProperty(n,t,{enumerable:!0,get:function(){return r[t]}}))}));var o=e(27);Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in n&&n[t]===o[t]||Object.defineProperty(n,t,{enumerable:!0,get:function(){return o[t]}}))}));var i=e(16);Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in n&&n[t]===i[t]||Object.defineProperty(n,t,{enumerable:!0,get:function(){return i[t]}}))}));var a=e(17);Object.keys(a).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in n&&n[t]===a[t]||Object.defineProperty(n,t,{enumerable:!0,get:function(){return a[t]}}))}))},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ImageRenderer=void 0;var r=e(0),o=e(2),i=e(1),a=e(3),u=e(7),c=e(6),f=function(){function t(){}return t.prototype.render=function(t,n){var e,r=n.width,o=void 0===r?0:r,i=n.height,u=void 0===i?0:i,c=n.img,f=o,s=u;(0,a.isString)(c)?e=this.imagePool.getImageSync(c):(f||(f=c.width),s||(s=c.height),e=c),t.drawImage(e,0,0,f,s)},(0,r.__decorate)([(0,i.inject)(u.ImagePool),(0,r.__metadata)("design:type",u.ImagePool)],t.prototype,"imagePool",void 0),t=(0,r.__decorate)([(0,i.singleton)({token:{token:c.StyleRenderer,named:o.SHAPE.Image}})],t)}();n.ImageRenderer=f},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TextRenderer=void 0;var r=e(0),o=e(2),i=e(1),a=e(3),u=e(6),c=function(){function t(){}return t.prototype.render=function(t,n){n.text;var e=n.lineWidth,r=void 0===e?0:e,o=(n.textAlign,n.textBaseline),i=n.lineJoin,u=n.miterLimit,c=void 0===u?0:u,f=n.padding,s=void 0===f?0:f,d=n.letterSpacing,l=void 0===d?0:d,h=n.stroke,v=n.fill,p=n.fillOpacity,y=n.strokeOpacity,m=n.opacity,g=n.metrics,M=g.font,b=g.lines,P=g.height,_=g.lineHeight;t.font=M,t.lineWidth=r,t.textBaseline=o,t.lineJoin=i,t.miterLimit=c;var x=0;"middle"===o?x=-P/2-_/2:"bottom"===o||"alphabetic"===o||"ideographic"===o?x=-P:"top"!==o&&"hanging"!==o||(x=-_);for(var O=0;O<b.length;O++){var E=r/2;x+=_,!(0,a.isNil)(h)&&r&&this.drawLetterSpacing(t,b[O],E+s,x+s,l,p,y,m,!0),(0,a.isNil)(v)||this.drawLetterSpacing(t,b[O],E+s,x+s,l,p,y,m)}},t.prototype.drawLetterSpacing=function(t,n,e,r,o,i,a,u,c){if(void 0===c&&(c=!1),0!==o)for(var f=e,s=Array.from(n),d=t.measureText(n).width,l=0,h=0;h<s.length;++h){var v=s[h];c?this.strokeText(t,v,f,r,a):this.fillText(t,v,f,r,i,u),f+=d-(l=t.measureText(n.substring(h+1)).width)+o,d=l}else c?this.strokeText(t,n,e,r,a):this.fillText(t,n,e,r,i,u)},t.prototype.fillText=function(t,n,e,r,o,i){var u=!(0,a.isNil)(o)&&1!==o;u&&(t.globalAlpha=o),t.fillText(n,e,r),u&&(t.globalAlpha=i)},t.prototype.strokeText=function(t,n,e,r,o){!(0,a.isNil)(o)&&1!==o&&(t.globalAlpha=o),t.strokeText(n,e,r)},(0,r.__decorate)([(0,i.inject)(o.TextService),(0,r.__metadata)("design:type",o.TextService)],t.prototype,"textService",void 0),t=(0,r.__decorate)([(0,i.singleton)({token:{token:u.StyleRenderer,named:o.SHAPE.Text}})],t)}();n.TextRenderer=c},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GradientPool=void 0;var r=e(0),o=e(2),i=e(1),a=function(){function t(){this.gradientCache={}}return t.prototype.getOrCreateGradient=function(t,n){var e=this.generateCacheKey(t),i=t.type,a=t.x0,u=t.y0,c=t.x1,f=t.y1,s=t.steps,d=t.width,l=t.height;if(this.gradientCache[e])return this.gradientCache[e];var h=null;if(i===o.PARSED_COLOR_TYPE.LinearGradient)h=n.createLinearGradient(a*d,u*l,c*d,f*l);else if(i===o.PARSED_COLOR_TYPE.RadialGradient){var v=Math.sqrt(d*d+l*l)/2;h=n.createRadialGradient(a*d,u*l,0,c*d,f*l,t.r1*v)}return h&&(s.forEach((function(t){var n=(0,r.__read)(t,2),e=n[0],o=n[1];null==h||h.addColorStop(Number(e),o)})),this.gradientCache[e]=h),this.gradientCache[e]},t.prototype.generateCacheKey=function(t){var n=t.type,e=t.x0,r=t.y0,o=t.x1,i=t.y1,a=t.r1,u=t.steps;return"gradient-"+n+"-"+e+"-"+r+"-"+o+"-"+i+"-"+(a||0)+"-"+t.width+"-"+t.height+"-"+u.map((function(t){return t.join("")})).join("-")},t=(0,r.__decorate)([(0,i.singleton)()],t)}();n.GradientPool=a},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"CirclePath",{enumerable:!0,get:function(){return r.generatePath}}),Object.defineProperty(n,"EllipsePath",{enumerable:!0,get:function(){return o.generatePath}}),Object.defineProperty(n,"LinePath",{enumerable:!0,get:function(){return a.generatePath}}),n.PathGeneratorFactory=n.PathGenerator=void 0,Object.defineProperty(n,"PathPath",{enumerable:!0,get:function(){return f.generatePath}}),Object.defineProperty(n,"PolygonPath",{enumerable:!0,get:function(){return c.generatePath}}),Object.defineProperty(n,"PolylinePath",{enumerable:!0,get:function(){return u.generatePath}}),Object.defineProperty(n,"RectPath",{enumerable:!0,get:function(){return i.generatePath}});var r=e(28),o=e(29),i=e(30),a=e(32),u=e(33),c=e(34),f=e(35);n.PathGeneratorFactory="PathGeneratorFactory";n.PathGenerator="PathGenerator"},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RBushNode=void 0;var r=e(0),o=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,r.__extends)(n,t),n.tag="c-canvas-rbush-node",n}(e(2).Component);n.RBushNode=o},function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Arc",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"Cubic",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"Line",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(n,"Polygon",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(n,"Polyline",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(n,"Quad",{enumerable:!0,get:function(){return o.default}}),n.Util=void 0;var o=l(e(40)),i=l(e(41)),a=l(e(42)),u=l(e(8)),c=l(e(44)),f=l(e(24)),s=function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var e=d(n);if(e&&e.has(t))return e.get(t);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=i?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(o,a,u):o[a]=t[a]}o.default=t,e&&e.set(t,o);return o}(e(4));function d(t){if("function"!=typeof WeakMap)return null;var n=new WeakMap,e=new WeakMap;return(d=function(t){return t?e:n})(t)}function l(t){return t&&t.__esModule?t:{default:t}}n.Util=s},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.nearestPoint=function(t,n,e,o,i,a){var u=-1,c=1/0,f=[e,o],s=20;a&&a>200&&(s=a/10);for(var d=1/s,l=d/10,h=0;h<=s;h++){var v=h*d,p=[i.apply(null,t.concat([v])),i.apply(null,n.concat([v]))];(M=(0,r.distance)(f[0],f[1],p[0],p[1]))<c&&(u=v,c=M)}if(0===u)return{x:t[0],y:n[0]};if(1===u){var y=t.length;return{x:t[y-1],y:n[y-1]}}c=1/0;for(h=0;h<32&&!(l<1e-4);h++){var m=u-l,g=u+l,M=(p=[i.apply(null,t.concat([m])),i.apply(null,n.concat([m]))],(0,r.distance)(f[0],f[1],p[0],p[1]));if(m>=0&&M<c)u=m,c=M;else{var b=[i.apply(null,t.concat([g])),i.apply(null,n.concat([g]))],P=(0,r.distance)(f[0],f[1],b[0],b[1]);g<=1&&P<c?(u=g,c=P):l*=.5}}return{x:i.apply(null,t.concat([u])),y:i.apply(null,n.concat([u]))}},n.snapLength=function(t,n){for(var e=0,o=t.length,i=0;i<o;i++){var a=t[i],u=n[i],c=t[(i+1)%o],f=n[(i+1)%o];e+=(0,r.distance)(a,u,c,f)}return e/2};var r=e(4)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.angleAtSegments=function(t,n){if(n>1||n<0||t.length<2)return 0;for(var e=a(t),r=e.segments,o=e.totalLength,i=0,u=0,c=0;c<r.length;c++){var f=r[c],s=f.from,d=f.to,l=f.length/o;if(n>=i&&n<=i+l){u=Math.atan2(d[1]-s[1],d[0]-s[0]);break}i+=l}return u},n.distanceAtSegment=function(t,n,e){for(var r=1/0,i=0;i<t.length-1;i++){var a=t[i],u=t[i+1],c=o.default.pointDistance(a[0],a[1],u[0],u[1],n,e);c<r&&(r=c)}return r},n.lengthOfSegment=function(t){if(t.length<2)return 0;for(var n=0,e=0;e<t.length-1;e++){var r=t[e],o=t[e+1];n+=(0,i.distance)(r[0],r[1],o[0],o[1])}return n},n.pointAtSegments=function(t,n){if(n>1||n<0||t.length<2)return null;var e=a(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var u=0,c=null,f=0;f<r.length;f++){var s=r[f],d=s.from,l=s.to,h=s.length/i;if(n>=u&&n<=u+h){var v=(n-u)/h;c=o.default.pointAt(d[0],d[1],l[0],l[1],v);break}u+=h}return c};var r,o=(r=e(8))&&r.__esModule?r:{default:r},i=e(4);function a(t){for(var n=0,e=[],r=0;r<t.length-1;r++){var o=t[r],a=t[r+1],u=(0,i.distance)(o[0],o[1],a[0],a[1]),c={from:o,to:a,length:u};e.push(c),n+=u}return{segments:e,totalLength:n}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e(23),o=e(4),i={box:function(t){for(var n=[],e=[],r=0;r<t.length;r++){var i=t[r];n.push(i[0]),e.push(i[1])}return(0,o.getBBoxByArray)(n,e)},length:function(t){return(0,r.lengthOfSegment)(t)},pointAt:function(t,n){return(0,r.pointAtSegments)(t,n)},pointDistance:function(t,n,e){return(0,r.distanceAtSegment)(t,n,e)},tangentAngle:function(t,n){return(0,r.angleAtSegments)(t,n)}};n.default=i},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DOMInteractionPlugin=void 0;var r=e(0),o=e(2),i=e(1),a=e(26),u=function(){function t(){}var n;return n=t,t.prototype.apply=function(t){var e=this,r=function(n){t.hooks.pointerMove.call(n)},o=function(n){t.hooks.pointerUp.call(n)},i=function(n){t.hooks.pointerDown.call(n)},u=function(n){t.hooks.pointerOver.call(n)},c=function(n){t.hooks.pointerOut.call(n)},f=function(n){t.hooks.pointerWheel.call(n)};t.hooks.init.tap(n.tag,(function(){var t=e.contextService.getDomElement();a.supportsPointerEvents?(self.document.addEventListener("pointermove",r,!0),t.addEventListener("pointerdown",i,!0),t.addEventListener("pointerleave",c,!0),t.addEventListener("pointerover",u,!0),self.addEventListener("pointerup",o,!0)):(self.document.addEventListener("mousemove",r,!0),t.addEventListener("mousedown",i,!0),t.addEventListener("mouseout",c,!0),t.addEventListener("mouseover",u,!0),self.addEventListener("mouseup",o,!0)),a.supportsTouchEvents&&(t.addEventListener("touchstart",i,!0),t.addEventListener("touchend",o,!0),t.addEventListener("touchmove",r,!0)),t.addEventListener("wheel",f,{passive:!0,capture:!0})})),t.hooks.destroy.tap(n.tag,(function(){var t=e.contextService.getDomElement();a.supportsPointerEvents?(self.document.removeEventListener("pointermove",r,!0),t.removeEventListener("pointerdown",i,!0),t.removeEventListener("pointerleave",c,!0),t.removeEventListener("pointerover",u,!0),self.removeEventListener("pointerup",o,!0)):(self.document.removeEventListener("mousemove",r,!0),t.removeEventListener("mousedown",i,!0),t.removeEventListener("mouseout",c,!0),t.removeEventListener("mouseover",u,!0),self.removeEventListener("mouseup",o,!0)),a.supportsTouchEvents&&(t.removeEventListener("touchstart",i,!0),t.removeEventListener("touchend",o,!0),t.removeEventListener("touchmove",r,!0)),t.removeEventListener("wheel",f,!0)}))},t.tag="DOMInteractionPlugin",(0,r.__decorate)([(0,i.inject)(o.ContextService),(0,r.__metadata)("design:type",Object)],t.prototype,"contextService",void 0),t=n=(0,r.__decorate)([(0,i.singleton)({contrib:o.RenderingPluginContribution})],t)}();n.DOMInteractionPlugin=u},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isMouseEvent=function(t){return!self.MouseEvent||t instanceof MouseEvent&&(!o||!(t instanceof self.PointerEvent))},n.isTouchEvent=function(t){return r&&t instanceof TouchEvent},n.supportsTouchEvents=n.supportsPointerEvents=void 0;var r="ontouchstart"in self;n.supportsTouchEvents=r;var o=!!self.PointerEvent;n.supportsPointerEvents=o},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DefaultRenderer=void 0;var r=e(0),o=e(2),i=e(1),a=e(3),u=e(6),c=function(){function t(){}return t.prototype.render=function(t,n){var e=n.fill,r=n.opacity,o=n.fillOpacity,i=n.stroke,u=n.strokeOpacity,c=n.lineWidth,f=n.lineCap,s=n.lineJoin;if((0,a.isNil)(e)||((0,a.isNil)(o)||1===o?t.fill():(t.globalAlpha=o,t.fill(),t.globalAlpha=r)),!(0,a.isNil)(i)&&c&&c>0){!(0,a.isNil)(u)&&1!==u&&(t.globalAlpha=u),t.lineWidth=c,(0,a.isNil)(f)||(t.lineCap=f),(0,a.isNil)(s)||(t.lineJoin=s);var d=t.shadowBlur,l=t.shadowColor;(0,a.isNil)(d)||(t.shadowColor="transparent",t.shadowBlur=0);var h=t.filter;!(0,a.isNil)(h)&&h.indexOf("drop-shadow")>-1&&(t.filter=h.replace(/drop-shadow\([^)]*\)/,"").trim()||"none"),t.stroke(),(0,a.isNil)(d)||(t.shadowColor=l,t.shadowBlur=d),(0,a.isNil)(h)||(t.filter=h)}},t=(0,r.__decorate)([(0,i.singleton)({token:[{token:u.StyleRenderer,named:o.SHAPE.Circle},{token:u.StyleRenderer,named:o.SHAPE.Ellipse},{token:u.StyleRenderer,named:o.SHAPE.Rect},{token:u.StyleRenderer,named:o.SHAPE.Line},{token:u.StyleRenderer,named:o.SHAPE.Polyline},{token:u.StyleRenderer,named:o.SHAPE.Polygon},{token:u.StyleRenderer,named:o.SHAPE.Path}]})],t)}();n.DefaultRenderer=c},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.generatePath=function(t,n){t.beginPath();var e=n.r,r=void 0===e?0:e;t.arc(r,r,r,0,2*Math.PI,!1)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.generatePath=function(t,n){var e=n.rx,r=n.ry;if(t.beginPath(),t.ellipse)t.ellipse(e,r,e,r,0,0,2*Math.PI,!1);else{var o=e>r?e:r,i=e>r?1:e/r,a=e>r?r/e:1;t.save(),t.scale(i,a),t.arc(0,0,o,0,2*Math.PI),t.closePath(),t.restore()}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.generatePath=function(t,n){var e=n.radius,i=void 0===e?0:e,a=n.width,u=void 0===a?0:a,c=n.height,f=void 0===c?0:c;if(t.beginPath(),0===i)t.rect(0,0,u,f);else{var s=(0,r.__read)((0,o.parseRadius)(i),4),d=s[0],l=s[1],h=s[2],v=s[3];t.moveTo(d,0),t.lineTo(u-l,0),0!==l&&t.arc(u-l,l,l,-Math.PI/2,0),t.lineTo(u,f-h),0!==h&&t.arc(u-h,f-h,h,0,Math.PI/2),t.lineTo(v,f),0!==v&&t.arc(v,f-v,v,Math.PI/2,Math.PI),t.lineTo(0,d),0!==d&&t.arc(d,d,d,Math.PI,1.5*Math.PI),t.closePath()}};var r=e(0),o=e(31)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRadius=function(t){var n=0,e=0,o=0,i=0;(0,r.isArray)(t)?1===t.length?n=e=o=i=t[0]:2===t.length?(n=o=t[0],e=i=t[1]):3===t.length?(n=t[0],e=i=t[1],o=t[2]):(n=t[0],e=t[1],o=t[2],i=t[3]):n=e=o=i=t;return[n,e,o,i]};var r=e(3)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.generatePath=function(t,n){var e=n.x1,r=n.y1,o=n.x2,i=n.y2,a=n.defX,u=void 0===a?0:a,c=n.defY,f=void 0===c?0:c;t.beginPath(),t.moveTo(e-u,r-f),t.lineTo(o-u,i-f)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.generatePath=function(t,n){var e=n.defX,r=void 0===e?0:e,o=n.defY,i=void 0===o?0:o,a=n.points.points,u=a.length,c=a[0][0]-r,f=a[0][1]-i,s=a[u-1][0]-r,d=a[u-1][1]-i;t.beginPath(),t.moveTo(c,f);for(var l=0;l<u-1;l++){var h=a[l];t.lineTo(h[0]-r,h[1]-i)}t.lineTo(s,d)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.generatePath=function(t,n){var e=n.defX,r=void 0===e?0:e,o=n.defY,i=void 0===o?0:o,a=n.points.points,u=a.length,c=a[0][0]-r,f=a[0][1]-i,s=a[u-1][0]-r,d=a[u-1][1]-i;t.beginPath(),t.moveTo(c,f);for(var l=0;l<u-1;l++){var h=a[l];t.lineTo(h[0]-r,h[1]-i)}t.lineTo(s,d),t.closePath()}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.generatePath=function(t,n){var e=n.defX,r=void 0===e?0:e,o=n.defY,i=void 0===o?0:o,a=n.path,u=a.curve,c=a.zCommandIndexes,f=u;c.forEach((function(t,n){f.splice(t+n,0,["Z"])}));var s=[-r,-i];t.beginPath();for(var d=0;d<f.length;d++){var l=f[d],h=l[0];switch(h){case"M":t.moveTo(l[1]-r,l[2]-i),s=[l[1]-r,l[2]-i];break;case"C":t.bezierCurveTo(l[1]-r,l[2]-i,l[3]-r,l[4]-i,l[5]-r,l[6]-i);break;case"Z":t.closePath()}if("Z"===h)s;else{var v=l.length;[l[v-2]-r,l[v-1]-i]}}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RBushRoot=n.CanvasRendererPlugin=void 0;var r,o=e(0),i=e(2),a=e(3),u=e(1),c=e(9),f=(r=e(14))&&r.__esModule?r:{default:r},s=e(19),d=e(15),l=e(18),h=e(7),v=e(20);n.RBushRoot="RBushRoot";var p={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"},y=function(){function t(){this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1}var n;return n=t,t.prototype.apply=function(t){var e=this,r=function(t){t.target.entity.addComponent(v.RBushNode),u(t)},a=function(t){var n=t.target,r=n.entity.getComponent(v.RBushNode);e.rBush.remove(r.aabb),n.entity.removeComponent(v.RBushNode)},u=function(t){var n;(null===(n=t.target.ownerDocument)||void 0===n?void 0:n.documentElement)===e.renderingContext.root&&t.composedPath().slice(0,-2).forEach((function(t){e.insertRBushNode(t)}))};t.hooks.init.tap(n.tag,(function(){var t=e.contextService.getContext(),n=e.contextService.getDPR();t&&t.scale(n,n),e.renderingContext.root.addEventListener(i.ElementEvent.MOUNTED,r),e.renderingContext.root.addEventListener(i.ElementEvent.UNMOUNTED,a),e.renderingContext.root.addEventListener(i.ElementEvent.BOUNDS_CHANGED,u)})),t.hooks.destroy.tap(n.tag,(function(){e.renderingContext.root.removeEventListener(i.ElementEvent.MOUNTED,r),e.renderingContext.root.removeEventListener(i.ElementEvent.UNMOUNTED,a),e.renderingContext.root.removeEventListener(i.ElementEvent.BOUNDS_CHANGED,u)})),t.hooks.beginFrame.tap(n.tag,(function(){var t=e.contextService.getContext(),n=e.canvasConfig.renderer.getConfig(),r=n.enableDirtyRectangleRendering;n.enableDirtyRectangleRenderingDebug;e.clearFullScreen=!r||e.renderingContext.renderReasons.has(i.RENDER_REASON.CameraChanged),t&&(t.save(),e.clearFullScreen&&t.clearRect(0,0,e.canvasConfig.width,e.canvasConfig.height),e.applyTransform(t,e.camera.getOrthoMatrix()))})),t.hooks.endFrame.tap(n.tag,(function(){var n=e.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering,r=e.contextService.getContext();if(n){var i=e.safeMergeAABB.apply(e,(0,o.__spreadArray)([e.mergeDirtyAABBs(e.renderQueue)],(0,o.__read)(e.renderingContext.removedRenderBoundsList),!1));if(e.renderingContext.removedRenderBoundsList=[],!i)return;var a=e.convertAABB2Rect(i),u=a.x,c=a.y,f=a.width,s=a.height;r.clearRect(u,c,f,s),r.beginPath(),r.rect(u,c,f,s),r.clip(),e.searchDirtyObjects(i).sort(e.sceneGraphService.sort).forEach((function(n){n.isVisible()&&e.renderDisplayObject(n,t)})),e.renderQueue.forEach((function(t){e.saveDirtyAABB(t)})),e.renderQueue=[]}e.restoreStack.forEach((function(t){r.restore()})),e.restoreStack=[],r.restore()})),t.hooks.render.tap(n.tag,(function(n){e.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering?e.renderQueue.push(n):e.renderDisplayObject(n,t)}))},t.prototype.renderDisplayObject=function(t,n){for(var e=this,r=this.contextService.getContext(),o=this.restoreStack[this.restoreStack.length-1];o&&t.parentNode!==o;)r.restore(),this.restoreStack.pop(),o=this.restoreStack[this.restoreStack.length-1];var a=t.nodeName;r.save(),this.applyTransform(r,t.getLocalTransform());var u=t.style.clipPath;if(u){r.save(),this.applyTransform(r,u.getLocalTransform());var c=this.pathGeneratorFactory(u.nodeName);c&&this.useAnchor(r,u,(function(){c(r,u.parsedStyle)})),r.restore(),r.clip()}r.save(),this.applyAttributesToContext(r,t,n),this.useAnchor(r,t,(function(){var n=e.pathGeneratorFactory(t.nodeName);n&&n(r,t.parsedStyle);var o=e.styleRendererFactory(a);o&&o.render(r,t.parsedStyle,t)})),r.restore(),t.entity.getComponent(i.Renderable).dirty=!1,this.restoreStack.push(t)},t.prototype.convertAABB2Rect=function(t){var n=t.getMin(),e=t.getMax(),r=Math.floor(n[0]),o=Math.floor(n[1]);return{x:r,y:o,width:Math.ceil(e[0])-r,height:Math.ceil(e[1])-o}},t.prototype.insertRBushNode=function(t){var n=t.entity.getComponent(v.RBushNode);if(n){this.rBush.remove(n.aabb);var e=t.getRenderBounds();if(e){var r=(0,o.__read)(e.getMin(),2),i=r[0],a=r[1],u=(0,o.__read)(e.getMax(),2),c=u[0],f=u[1];n.aabb={name:t.entity.getName(),minX:i,minY:a,maxX:c,maxY:f}}this.rBush.insert(n.aabb)}},t.prototype.mergeDirtyAABBs=function(t){var n;return t.forEach((function(t){var e=t.getRenderBounds();e&&(n?n.add(e):n=new i.AABB(e.center,e.halfExtents));var r=t.entity.getComponent(i.Renderable).dirtyRenderBounds;r&&(n?n.add(r):n=new i.AABB(r.center,r.halfExtents))})),n},t.prototype.searchDirtyObjects=function(t){var n=this,e=(0,o.__read)(t.getMin(),2),r=e[0],i=e[1],a=(0,o.__read)(t.getMax(),2),u=a[0],c=a[1];return this.rBush.search({minX:r,minY:i,maxX:u,maxY:c}).map((function(t){var e=t.name;return n.displayObjectPool.getByName(e)}))},t.prototype.saveDirtyAABB=function(t){var n=t.entity.getComponent(i.Renderable);n.dirtyRenderBounds||(n.dirtyRenderBounds=new i.AABB);var e=t.getRenderBounds();e&&n.dirtyRenderBounds.update(e.center,e.halfExtents)},t.prototype.drawDirtyRectangle=function(t,n){var e=n.x,r=n.y,o=n.width,i=n.height;t.beginPath(),t.rect(e+1,r+1,o-1,i-1),t.closePath(),t.lineWidth=1,t.stroke()},t.prototype.applyTransform=function(t,n){var e=(0,o.__read)(c.mat4.getTranslation(c.vec3.create(),n),2),r=e[0],a=e[1],u=(0,o.__read)(c.mat4.getScaling(c.vec3.create(),n),2),f=u[0],s=u[1],d=c.mat4.getRotation(c.quat.create(),n),l=(0,o.__read)((0,i.getEuler)(c.vec3.create(),d),3),h=l[0],v=(l[1],l[2]),p=(0,i.fromRotationTranslationScale)(h||v,r,a,f,s);t.transform(p[0],p[1],p[3],p[4],p[6],p[7])},t.prototype.applyAttributesToContext=function(t,n,e){var r=n.attributes,u=n.parsedStyle;for(var c in r)if("transform"!==c){var f=r[c],s=p[c]?p[c]:c;if("lineDash"===s&&t.setLineDash)(0,a.isArray)(f)&&t.setLineDash(f);else{if("strokeStyle"===s||"fillStyle"===s){var d=u[c];if(d.type===i.PARSED_COLOR_TYPE.LinearGradient||d.type===i.PARSED_COLOR_TYPE.RadialGradient){var l=n.getGeometryBounds(),h=l&&2*l.halfExtents[0]||0,v=l&&2*l.halfExtents[1]||0;f=this.gradientPool.getOrCreateGradient((0,o.__assign)((0,o.__assign)({type:d.type},d.value),{width:h,height:v}),t)}else if(d.type===i.PARSED_COLOR_TYPE.Pattern){var y=this.imagePool.getPatternSync(d.value);y?f=y:this.imagePool.createPattern(d.value,t).then((function(){n.entity.getComponent(i.Renderable).dirty=!0,e.dirtify()}))}else f=d.formatted}else"globalAlpha"===s&&(f*=t.globalAlpha);t[s]=f}}},t.prototype.useAnchor=function(t,n,e){var r=n.getGeometryBounds();if(r){var o=r.halfExtents;t.save();var i=(n.parsedStyle||{}).anchor,a=void 0===i?[0,0]:i;t.translate(-a[0]*o[0]*2,-a[1]*o[1]*2),e(),t.restore()}else e()},t.prototype.safeMergeAABB=function(){for(var t,n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.forEach((function(n){n&&(t?t.add(n):t=n)})),t},t.tag="CanvasRendererPlugin",(0,o.__decorate)([(0,u.inject)(i.CanvasConfig),(0,o.__metadata)("design:type",Object)],t.prototype,"canvasConfig",void 0),(0,o.__decorate)([(0,u.inject)(i.DefaultCamera),(0,o.__metadata)("design:type",i.Camera)],t.prototype,"camera",void 0),(0,o.__decorate)([(0,u.inject)(i.ContextService),(0,o.__metadata)("design:type",Object)],t.prototype,"contextService",void 0),(0,o.__decorate)([(0,u.inject)(i.SceneGraphService),(0,o.__metadata)("design:type",Object)],t.prototype,"sceneGraphService",void 0),(0,o.__decorate)([(0,u.inject)(i.RenderingContext),(0,o.__metadata)("design:type",Object)],t.prototype,"renderingContext",void 0),(0,o.__decorate)([(0,u.inject)(h.ImagePool),(0,o.__metadata)("design:type",h.ImagePool)],t.prototype,"imagePool",void 0),(0,o.__decorate)([(0,u.inject)(l.GradientPool),(0,o.__metadata)("design:type",l.GradientPool)],t.prototype,"gradientPool",void 0),(0,o.__decorate)([(0,u.inject)(s.PathGeneratorFactory),(0,o.__metadata)("design:type",Function)],t.prototype,"pathGeneratorFactory",void 0),(0,o.__decorate)([(0,u.inject)(d.StyleRendererFactory),(0,o.__metadata)("design:type",Function)],t.prototype,"styleRendererFactory",void 0),(0,o.__decorate)([(0,u.inject)(i.DisplayObjectPool),(0,o.__metadata)("design:type",i.DisplayObjectPool)],t.prototype,"displayObjectPool",void 0),(0,o.__decorate)([(0,u.inject)("RBushRoot"),(0,o.__metadata)("design:type",f.default)],t.prototype,"rBush",void 0),t=n=(0,o.__decorate)([(0,u.singleton)({contrib:i.RenderingPluginContribution})],t)}();n.CanvasRendererPlugin=y},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LoadImagePlugin=void 0;var r=e(0),o=e(1),i=e(2),a=e(7),u=e(3),c=function(){function t(){}var n;return n=t,t.prototype.apply=function(t){var e=this,r=function(n){var r=n.target,o=r.nodeName,a=r.attributes;if(o===i.SHAPE.Image){var c=a.img;(0,u.isString)(c)&&e.imagePool.getOrCreateImage(c).then((function(){r.entity.getComponent(i.Renderable).dirty=!0,t.dirtify()}))}},o=function(n){var r=n.target,o=n.detail,a=o.attributeName,c=o.newValue;r.nodeName===i.SHAPE.Image&&"img"===a&&(0,u.isString)(c)&&e.imagePool.getOrCreateImage(c).then((function(){r.entity.getComponent(i.Renderable).dirty=!0,t.dirtify()}))};t.hooks.init.tap(n.tag,(function(){e.renderingContext.root.addEventListener(i.ElementEvent.MOUNTED,r),e.renderingContext.root.addEventListener(i.ElementEvent.ATTRIBUTE_CHANGED,o)})),t.hooks.destroy.tap(n.tag,(function(){e.renderingContext.root.removeEventListener(i.ElementEvent.MOUNTED,r),e.renderingContext.root.removeEventListener(i.ElementEvent.ATTRIBUTE_CHANGED,o)}))},t.tag="LoadImagePlugin",(0,r.__decorate)([(0,o.inject)(a.ImagePool),(0,r.__metadata)("design:type",a.ImagePool)],t.prototype,"imagePool",void 0),(0,r.__decorate)([(0,o.inject)(i.RenderingContext),(0,r.__metadata)("design:type",Object)],t.prototype,"renderingContext",void 0),t=n=(0,r.__decorate)([(0,o.singleton)({contrib:i.RenderingPluginContribution})],t)}();n.LoadImagePlugin=c},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PointInPathPickerFactory=n.CanvasPickerPlugin=void 0;var r=e(0),o=e(2),i=e(10),a=e(9),u=e(1);n.PointInPathPickerFactory="PointInPathPicker";var c=function(){function t(){var t=this;this.isHit=function(n,e,r){var i=t.pointInPathPickerFactory(n.nodeName);if(i){var u=a.mat4.invert(a.mat4.create(),r),c=a.vec3.transformMat4(a.vec3.create(),a.vec3.fromValues(e[0],e[1],0),u),f=n.getGeometryBounds().halfExtents,s=n.parsedStyle.anchor,d=void 0===s?[0,0]:s;if(c[0]+=d[0]*f[0]*2,c[1]+=d[1]*f[1]*2,i(n,new o.Point(c[0],c[1]),t.isPointInPath))return!0}return!1},this.isPointInPath=function(n,e){var r=t.offscreenCanvas.getOrCreateContext(),o=t.pathGeneratorFactory(n.nodeName);return o&&o(r,n.parsedStyle),r.isPointInPath(e.x,e.y)}}var n;return n=t,t.prototype.apply=function(t){var e=this;t.hooks.pick.tap(n.tag,(function(t){var n=t.position,r=n.x,o=n.y,i=a.vec3.fromValues(r,o,0),u=[],c=e.rBush.search({minX:i[0],minY:i[1],maxX:i[0],maxY:i[1]}),f=c.map((function(t){return t.name}));return c.forEach((function(t){var n=t.name,r=e.displayObjectPool.getByName(n);if(r.isVisible()&&r.interactive){if(r.parentNode&&-1===f.indexOf(r.parentNode.entity.getName()))return;var o=r.style.clipPath||r,c=r.getWorldTransform();r.style.clipPath&&(c=a.mat4.multiply(a.mat4.create(),c,r.style.clipPath.getLocalTransform())),e.isHit(o,i,c)&&u.push(r)}})),u.sort(e.sceneGraphService.sort),t.picked=u[u.length-1]||null,t}))},t.tag="CanvasPickerPlugin",(0,r.__decorate)([(0,u.inject)(o.SceneGraphService),(0,r.__metadata)("design:type",Object)],t.prototype,"sceneGraphService",void 0),(0,r.__decorate)([(0,u.inject)(o.DisplayObjectPool),(0,r.__metadata)("design:type",o.DisplayObjectPool)],t.prototype,"displayObjectPool",void 0),(0,r.__decorate)([(0,u.inject)(o.OffscreenCanvasCreator),(0,r.__metadata)("design:type",o.OffscreenCanvasCreator)],t.prototype,"offscreenCanvas",void 0),(0,r.__decorate)([(0,u.inject)(i.RBushRoot),(0,r.__metadata)("design:type",Function)],t.prototype,"rBush",void 0),(0,r.__decorate)([(0,u.inject)(i.PathGeneratorFactory),(0,r.__metadata)("design:type",Function)],t.prototype,"pathGeneratorFactory",void 0),(0,r.__decorate)([(0,u.inject)("PointInPathPicker"),(0,r.__metadata)("design:type",Function)],t.prototype,"pointInPathPickerFactory",void 0),t=n=(0,r.__decorate)([(0,u.singleton)({contrib:o.RenderingPluginContribution})],t)}();n.CanvasPickerPlugin=c},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isPointInPath=function(t,n){var e=t.parsedStyle,o=e.r,i=void 0===o?0:o,a=e.fill,u=e.stroke,c=e.lineWidth,f=void 0===c?0:c,s=e.clipPathTargets,d=f/2,l=(0,r.distance)(i,i,n.x,n.y),h=!!(null==s?void 0:s.length);if(a&&u||h)return l<=i+d;if(a)return l<=i;if(u)return l>=i-d&&l<=i+d;return!1};var r=e(5)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o=(r=e(8))&&r.__esModule?r:{default:r},i=e(4),a=e(22);function u(t,n,e,r){var o=1-r;return o*o*t+2*r*o*n+r*r*e}function c(t,n,e){var r=t+e-2*n;if((0,i.isNumberEqual)(r,0))return[.5];var o=(t-n)/r;return o<=1&&o>=0?[o]:[]}function f(t,n,e,r){return 2*(1-r)*(n-t)+2*r*(e-n)}function s(t,n,e,r,i,a,c){var f=u(t,e,i,c),s=u(n,r,a,c),d=o.default.pointAt(t,n,e,r,c),l=o.default.pointAt(e,r,i,a,c);return[[t,n,d.x,d.y,f,s],[f,s,l.x,l.y,i,a]]}var d={box:function(t,n,e,r,o,a){var f=c(t,e,o)[0],s=c(n,r,a)[0],d=[t,o],l=[n,a];return void 0!==f&&d.push(u(t,e,o,f)),void 0!==s&&l.push(u(n,r,a,s)),(0,i.getBBoxByArray)(d,l)},length:function(t,n,e,r,o,a){return function t(n,e,r,o,a,u,c){if(0===c)return((0,i.distance)(n,e,r,o)+(0,i.distance)(r,o,a,u)+(0,i.distance)(n,e,a,u))/2;var f=s(n,e,r,o,a,u,.5),d=f[0],l=f[1];return d.push(c-1),l.push(c-1),t.apply(null,d)+t.apply(null,l)}(t,n,e,r,o,a,3)},nearestPoint:function(t,n,e,r,o,i,c,f){return(0,a.nearestPoint)([t,e,o],[n,r,i],c,f,u)},pointDistance:function(t,n,e,r,o,a,u,c){var f=this.nearestPoint(t,n,e,r,o,a,u,c);return(0,i.distance)(f.x,f.y,u,c)},interpolationAt:u,pointAt:function(t,n,e,r,o,i,a){return{x:u(t,e,o,a),y:u(n,r,i,a)}},divide:function(t,n,e,r,o,i,a){return s(t,n,e,r,o,i,a)},tangentAngle:function(t,n,e,r,o,a,u){var c=f(t,e,o,u),s=f(n,r,a,u),d=Math.atan2(s,c);return(0,i.piMod)(d)}};n.default=d},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o=e(0),i=e(4),a=(r=e(8))&&r.__esModule?r:{default:r},u=e(22);function c(t,n,e,r,o){var i=1-o;return i*i*i*t+3*n*o*i*i+3*e*o*o*i+r*o*o*o}function f(t,n,e,r,o){var i=1-o;return 3*(i*i*(n-t)+2*i*o*(e-n)+o*o*(r-e))}function s(t,n,e,r){var o,a,u,c=-3*t+9*n-9*e+3*r,f=6*t-12*n+6*e,s=3*n-3*t,d=[];if((0,i.isNumberEqual)(c,0))(0,i.isNumberEqual)(f,0)||(o=-s/f)>=0&&o<=1&&d.push(o);else{var l=f*f-4*c*s;(0,i.isNumberEqual)(l,0)?d.push(-f/(2*c)):l>0&&(a=(-f-(u=Math.sqrt(l)))/(2*c),(o=(-f+u)/(2*c))>=0&&o<=1&&d.push(o),a>=0&&a<=1&&d.push(a))}return d}function d(t,n,e,r,o,i,u,f,s){var d=c(t,e,o,u,s),l=c(n,r,i,f,s),h=a.default.pointAt(t,n,e,r,s),v=a.default.pointAt(e,r,o,i,s),p=a.default.pointAt(o,i,u,f,s),y=a.default.pointAt(h.x,h.y,v.x,v.y,s),m=a.default.pointAt(v.x,v.y,p.x,p.y,s);return[[t,n,h.x,h.y,y.x,y.y,d,l],[d,l,m.x,m.y,p.x,p.y,u,f]]}var l={extrema:s,box:function(t,n,e,r,o,a,u,f){for(var d=[t,u],l=[n,f],h=s(t,e,o,u),v=s(n,r,a,f),p=0;p<h.length;p++)d.push(c(t,e,o,u,h[p]));for(p=0;p<v.length;p++)l.push(c(n,r,a,f,v[p]));return(0,i.getBBoxByArray)(d,l)},length:function(t,n,e,r,i,a,c,f){return function t(n,e,r,i,a,c,f,s,l){if(0===l)return(0,u.snapLength)([n,r,a,f],[e,i,c,s]);var h=d(n,e,r,i,a,c,f,s,.5),v=(0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(h[0]),!1),[l-1],!1),p=(0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(h[1]),!1),[l-1],!1);return t.apply(null,v)+t.apply(null,p)}(t,n,e,r,i,a,c,f,3)},nearestPoint:function(t,n,e,r,o,i,a,f,s,d,l){return(0,u.nearestPoint)([t,e,o,a],[n,r,i,f],s,d,c,l)},pointDistance:function(t,n,e,r,o,a,u,c,f,s,d){var l=this.nearestPoint(t,n,e,r,o,a,u,c,f,s,d);return(0,i.distance)(l.x,l.y,f,s)},interpolationAt:c,pointAt:function(t,n,e,r,o,i,a,u,f){return{x:c(t,e,o,a,f),y:c(n,r,i,u,f)}},divide:function(t,n,e,r,o,i,a,u,c){return d(t,n,e,r,o,i,a,u,c)},tangentAngle:function(t,n,e,r,o,a,u,c,s){var d=f(t,e,o,u,s),l=f(n,r,a,c,s);return(0,i.piMod)(Math.atan2(l,d))}};n.default=l},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o=e(0),i=e(4),a=(r=e(43))&&r.__esModule?r:{default:r};function u(t,n,e,r,o,i){return e*Math.cos(o)*Math.cos(i)-r*Math.sin(o)*Math.sin(i)+t}function c(t,n,e,r,o,i){return e*Math.sin(o)*Math.cos(i)+r*Math.cos(o)*Math.sin(i)+n}function f(t,n,e){return{x:t*Math.cos(e),y:n*Math.sin(e)}}function s(t,n,e){var r=Math.cos(e),o=Math.sin(e);return[t*r-n*o,t*o+n*r]}var d={box:function(t,n,e,r,o,i,a){for(var f=function(t,n,e){return Math.atan(-n/t*Math.tan(e))}(e,r,o),s=1/0,d=-1/0,l=[i,a],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var v=f+h;i<a?i<v&&v<a&&l.push(v):a<v&&v<i&&l.push(v)}for(h=0;h<l.length;h++){var p=u(t,0,e,r,o,l[h]);p<s&&(s=p),p>d&&(d=p)}var y=function(t,n,e){return Math.atan(n/(t*Math.tan(e)))}(e,r,o),m=1/0,g=-1/0,M=[i,a];for(h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var b=y+h;i<a?i<b&&b<a&&M.push(b):a<b&&b<i&&M.push(b)}for(h=0;h<M.length;h++){var P=c(0,n,e,r,o,M[h]);P<m&&(m=P),P>g&&(g=P)}return{x:s,y:m,width:d-s,height:g-m}},length:function(t,n,e,r,o,i,a){},nearestPoint:function(t,n,e,r,i,u,c,d,l){var h=s(d-t,l-n,-i),v=(0,o.__read)(h,2),p=v[0],y=v[1],m=a.default.nearestPoint(0,0,e,r,p,y),g=function(t,n,e,r){return(Math.atan2(r*t,e*n)+2*Math.PI)%(2*Math.PI)}(e,r,m.x,m.y);g<u?m=f(e,r,u):g>c&&(m=f(e,r,c));var M=s(m.x,m.y,i);return{x:M[0]+t,y:M[1]+n}},pointDistance:function(t,n,e,r,o,a,u,c,f){var s=this.nearestPoint(t,n,e,r,o,a,u,c,f);return(0,i.distance)(s.x,s.y,c,f)},pointAt:function(t,n,e,r,o,i,a,f){var s=(a-i)*f+i;return{x:u(t,0,e,r,o,s),y:c(0,n,e,r,o,s)}},tangentAngle:function(t,n,e,r,o,a,u,c){var f=(u-a)*c+a,s=function(t,n,e,r,o,i,a,u){return-1*e*Math.cos(o)*Math.sin(u)-r*Math.sin(o)*Math.cos(u)}(0,0,e,r,o,0,0,f),d=function(t,n,e,r,o,i,a,u){return-1*e*Math.sin(o)*Math.sin(u)+r*Math.cos(o)*Math.cos(u)}(0,0,e,r,o,0,0,f);return(0,i.piMod)(Math.atan2(d,s))}};n.default=d},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e(4);function o(t,n){var e=Math.abs(t);return n>0?e:-1*e}var i={box:function(t,n,e,r){return{x:t-e,y:n-r,width:2*e,height:2*r}},length:function(t,n,e,r){return Math.PI*(3*(e+r)-Math.sqrt((3*e+r)*(e+3*r)))},nearestPoint:function(t,n,e,r,i,a){var u=e,c=r;if(0===u||0===c)return{x:t,y:n};for(var f=i-t,s=a-n,d=Math.abs(f),l=Math.abs(s),h=u*u,v=c*c,p=Math.PI/4,y=0,m=0,g=0;g<4;g++){y=u*Math.cos(p),m=c*Math.sin(p);var M=(h-v)*Math.pow(Math.cos(p),3)/u,b=(v-h)*Math.pow(Math.sin(p),3)/c,P=y-M,_=m-b,x=d-M,O=l-b,E=Math.hypot(_,P),S=Math.hypot(O,x);p+=E*Math.asin((P*O-_*x)/(E*S))/Math.sqrt(h+v-y*y-m*m),p=Math.min(Math.PI/2,Math.max(0,p))}return{x:t+o(y,f),y:n+o(m,s)}},pointDistance:function(t,n,e,o,i,a){var u=this.nearestPoint(t,n,e,o,i,a);return(0,r.distance)(u.x,u.y,i,a)},pointAt:function(t,n,e,r,o){var i=2*Math.PI*o;return{x:t+e*Math.cos(i),y:n+r*Math.sin(i)}},tangentAngle:function(t,n,e,o,i){var a=2*Math.PI*i,u=Math.atan2(o*Math.cos(a),-e*Math.sin(a));return(0,r.piMod)(u)}};n.default=i},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o=e(23),i=(r=e(24))&&r.__esModule?r:{default:r};function a(t){var n=t.slice(0);return t.length&&n.push(t[0]),n}var u={box:function(t){return i.default.box(t)},length:function(t){return(0,o.lengthOfSegment)(a(t))},pointAt:function(t,n){return(0,o.pointAtSegments)(a(t),n)},pointDistance:function(t,n,e){return(0,o.distanceAtSegment)(a(t),n,e)},tangentAngle:function(t,n){return(0,o.angleAtSegments)(a(t),n)}};n.default=u},function(t,n,e){"use strict";function r(t,n,e,r){return t/(e*e)+n/(r*r)}Object.defineProperty(n,"__esModule",{value:!0}),n.isPointInPath=function(t,n){var e=n.x,o=n.y,i=t.parsedStyle,a=i.rx,u=void 0===a?0:a,c=i.ry,f=void 0===c?0:c,s=i.fill,d=i.stroke,l=i.lineWidth,h=void 0===l?0:l,v=i.clipPathTargets,p=!!(null==v?void 0:v.length),y=h/2,m=(e-u)*(e-u),g=(o-f)*(o-f);if(s&&d||p)return r(m,g,u+y,f+y)<=1;if(s)return r(m,g,u,f)<=1;if(d)return r(m,g,u-y,f-y)>=1&&r(m,g,u+y,f+y)<=1;return!1}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isPointInPath=function(t,n){var e=t.parsedStyle,o=e.x1,i=e.y1,a=e.x2,u=e.y2,c=e.lineWidth,f=void 0===c?0:c,s=e.defX,d=void 0===s?0:s,l=e.defY,h=void 0===l?0:l;return(0,r.inLine)(o,i,a,u,f,n.x+d,n.y+h)};var r=e(5)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isPointInPath=function(t,n){var e=t.parsedStyle,o=e.stroke,i=e.lineWidth,a=void 0===i?0:i,u=e.points,c=e.defX,f=void 0===c?0:c,s=e.defY,d=void 0===s?0:s,l=e.clipPathTargets,h=!!(null==l?void 0:l.length);if(!o&&!h||!a)return!1;return(0,r.inPolyline)(u.points,a,n.x+f,n.y+d,!1)};var r=e(5)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isPointInPath=function(t,n,e){var a=t.parsedStyle,u=a.lineWidth,c=void 0===u?0:u,f=a.stroke,s=a.fill,d=a.defX,l=void 0===d?0:d,h=a.defY,v=void 0===h?0:h,p=a.clipPathTargets,y=a.path,m=y.segments,g=y.hasArc,M=y.polylines,b=y.polygons,P=y.totalLength,_=!!(null==p?void 0:p.length),x=!1;(f||_)&&(x=function(t,n,e,a,u,c,f){for(var s=!1,d=n/2,l=0;l<t.length;l++){var h=t[l],v=h.currentPoint,p=h.params,y=h.prePoint,m=h.box;if(!m||(0,i.inBox)(m.x-d,m.y-d,m.width+n,m.height+n,e,a)){switch(h.command){case"L":case"Z":s=(0,i.inLine)(y[0],y[1],v[0],v[1],n,e,a);break;case"Q":var g=o.Quad.pointDistance(y[0],y[1],p[1],p[2],p[3],p[4],e,a);s=g<=n/2;break;case"C":var M=o.Cubic.pointDistance(y[0],y[1],p[1],p[2],p[3],p[4],p[5],p[6],e,a,u);s=M<=n/2;break;case"A":var b=h.arcParams,P=b.cx,_=b.cy,x=b.rx,O=b.ry,E=b.startAngle,S=b.endAngle,A=b.xRotation,j=x>O?x:O,w=x>O?1:x/O,R=x>O?O/x:1,C=r.mat3.fromTranslation(r.mat3.create(),[-P,-_]);r.mat3.multiply(C,r.mat3.fromRotation(r.mat3.create(),-A),C),r.mat3.multiply(C,r.mat3.fromScaling(r.mat3.create(),[1/w,1/R]),C);var T=r.vec2.fromValues(e,a);T=r.vec2.transformMat3(T,T,C),s=(0,i.inArc)(0,0,j,E,S,n,T[0],T[1])}if(s)break}}return s}(m,c,n.x+l,n.y+v,P));x||!s&&!_||(x=g?e(t,n):(0,i.inPolygons)(b,n.x+l,n.y+v)||(0,i.inPolygons)(M,n.x+l,n.y+v));return x};var r=e(9),o=e(21),i=e(5)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isPointInPath=function(t,n,e){var o=t.parsedStyle,i=o.radius,a=o.fill,u=o.stroke,c=o.lineWidth,f=void 0===c?0:c,s=o.width,d=o.height,l=o.clipPathTargets,h=!!(null==l?void 0:l.length);if(i){var v=!1;return(u||h)&&(v=function(t,n,e,o,i,a,u,c){return(0,r.inLine)(t+i,n,t+e-i,n,a,u,c)||(0,r.inLine)(t+e,n+i,t+e,n+o-i,a,u,c)||(0,r.inLine)(t+e-i,n+o,t+i,n+o,a,u,c)||(0,r.inLine)(t,n+o-i,t,n+i,a,u,c)||(0,r.inArc)(t+e-i,n+i,i,1.5*Math.PI,2*Math.PI,a,u,c)||(0,r.inArc)(t+e-i,n+o-i,i,0,.5*Math.PI,a,u,c)||(0,r.inArc)(t+i,n+o-i,i,.5*Math.PI,Math.PI,a,u,c)||(0,r.inArc)(t+i,n+i,i,Math.PI,1.5*Math.PI,a,u,c)}(0,0,s,d,i,f,n.x,n.y)),v||!a&&!h||(v=e(t,n)),v}var p=f/2;if(a&&u||h)return(0,r.inBox)(0-p,0-p,s+p,d+p,n.x,n.y);if(a)return(0,r.inBox)(0,0,s,d,n.x,n.y);if(u)return(0,r.inRect)(0,0,s,d,f,n.x,n.y);return!1};var r=e(5)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isPointInPath=function(t,n){var e=t.parsedStyle,o=e.stroke,i=e.fill,a=e.lineWidth,u=void 0===a?0:a,c=e.points,f=e.defX,s=void 0===f?0:f,d=e.defY,l=void 0===d?0:d,h=e.clipPathTargets,v=!!(null==h?void 0:h.length),p=!1;(o||v)&&(p=(0,r.inPolyline)(c.points,u,n.x+s,n.y+l,!0));p||!i&&!v||(p=(0,r.inPolygon)(c.points,n.x+s,n.y+l));return p};var r=e(5)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.HTMLRenderingPlugin=void 0;var r=e(0),o=e(1),i=e(2),a=e(3),u=function(){function t(){}var n;return n=t,t.prototype.apply=function(t){var e=this,r=function(t){var n=t.target;if(n.nodeName===i.SHAPE.HTML){var r=n.parsedStyle.innerHTML,o="g-html-"+n.entity.getName(),u=e.contextService.getDomElement().parentNode;if(!u.querySelector("#"+o)){var c=document.createElement("div");n.parsedStyle.$el=c,c.id=o,(0,a.isString)(r)?c.innerHTML=r:c.appendChild(r),u.appendChild(c)}}},o=function(t){var n=t.target;if(n.nodeName===i.SHAPE.HTML){var r="g-html-"+n.entity.getName(),o=e.contextService.getDomElement().parentNode,a=o.querySelector("#"+r);a&&o.removeChild(a)}};t.hooks.init.tap(n.tag,(function(){e.renderingContext.root.addEventListener(i.ElementEvent.MOUNTED,r),e.renderingContext.root.addEventListener(i.ElementEvent.UNMOUNTED,o)})),t.hooks.destroy.tap(n.tag,(function(){e.renderingContext.root.removeEventListener(i.ElementEvent.MOUNTED,r),e.renderingContext.root.removeEventListener(i.ElementEvent.UNMOUNTED,o)})),t.hooks.render.tap(n.tag,(function(t){if(t.nodeName===i.SHAPE.HTML){var n="g-html-"+t.entity.getName(),r=e.contextService.getDomElement().parentNode.querySelector("#"+n);e.updateCSSStyle(r,t.parsedStyle,t)}}))},t.prototype.updateCSSStyle=function(t,n,e){var r=n.zIndex,o=void 0===r?0:r,a=n.visibility,u=void 0===a?"visible":a,c=n.opacity,f=void 0===c?1:c,s=n.fill,d=n.lineWidth,l=void 0===d?0:d,h=n.lineDash,v=n.stroke,p=n.anchor,y=n.width,m=void 0===y?0:y,g=n.height,M=void 0===g?0:g,b=n.style,P=void 0===b?"":b,_=n.className,x=void 0===_?"":_,O={position:"absolute",top:0,left:0};if(O.width=m+"px",O.height=M+"px",O.transform="matrix3d("+e.getWorldTransform().join(",")+")",p&&(O.transform+=" translate("+100*p[0]+"%, "+100*p[0]+"%)"),e.style.transformOrigin&&(O["transform-origin"]=e.style.transformOrigin),O["z-index"]=o,O.visibility=u,O.opacity=f,s){var E="";if(s.type===i.PARSED_COLOR_TYPE.Constant)E=s.formatted;else if(s.type===i.PARSED_COLOR_TYPE.LinearGradient){E="linear-gradient(to right, "+s.value.steps.map((function(t){return t[1]+" "+100*Number(t[0])+"%"})).join(",")+");"}else s.type===i.PARSED_COLOR_TYPE.RadialGradient||(s.type,i.PARSED_COLOR_TYPE.Pattern);O.background=E}O["border-width"]=l+"px",v&&v.type===i.PARSED_COLOR_TYPE.Constant&&(O["border-color"]=v.formatted,O["border-style"]="solid"),h&&(O["border-style"]="dashed"),e.style.filter&&(O.filter=e.style.filter),x&&(Array.isArray(x)?x.forEach((function(n){t.classList.add(n)})):t.classList.add(x)),t.setAttribute("style",Object.keys(O).map((function(t){return t+":"+O[t]})).join(";")+P)},t.tag="HTMLRenderingPlugin",(0,r.__decorate)([(0,o.inject)(i.ContextService),(0,r.__metadata)("design:type",Object)],t.prototype,"contextService",void 0),(0,r.__decorate)([(0,o.inject)(i.RenderingContext),(0,r.__metadata)("design:type",Object)],t.prototype,"renderingContext",void 0),t=n=(0,r.__decorate)([(0,o.singleton)({contrib:i.RenderingPluginContribution})],t)}();n.HTMLRenderingPlugin=u},function(t,n,e){"use strict";e.r(n),e.d(n,"DomInteraction",(function(){return i})),e.d(n,"CanvasRenderer",(function(){return a})),e.d(n,"CanvasPicker",(function(){return u})),e.d(n,"HTMLRenderer",(function(){return c})),e.d(n,"Renderer",(function(){return p}));var r=e(0),o=e(2),i=e(11),a=e(10),u=e(12),c=e(13),f=e(1),s=e(3),d="undefined"!=typeof window&&void 0!==window.document;var l=function(){function t(){}return t.prototype.init=function(){var t=this.canvasConfig,n=t.container,e=t.width,r=t.height;if(this.$container=Object(s.isString)(n)?document.getElementById(n):n,this.$container){var o=document.createElement("canvas");this.context=o.getContext("2d"),this.$container.appendChild(o),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=o;var i=window.devicePixelRatio||1;i=i>=1?Math.ceil(i):1,this.dpr=i,this.resize(e,r)}},t.prototype.getContext=function(){return this.context},t.prototype.getDomElement=function(){return this.$canvas},t.prototype.getDPR=function(){return this.dpr},t.prototype.getBoundingClientRect=function(){var t;return null===(t=this.$canvas)||void 0===t?void 0:t.getBoundingClientRect()},t.prototype.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},t.prototype.resize=function(t,n){this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*n,function(t,n,e){d&&(t.style.width=n+"px",t.style.height=e+"px")}(this.$canvas,t,n))},t.prototype.applyCursorStyle=function(t){this.$container&&(this.$container.style.cursor=t)},Object(r.__decorate)([Object(f.inject)(o.CanvasConfig),Object(r.__metadata)("design:type",Object)],t.prototype,"canvasConfig",void 0),t=Object(r.__decorate)([Object(f.singleton)({token:o.ContextService})],t)}(),h=Object(f.Module)((function(t){t(l)})),v=function(){function t(){}return t.prototype.init=function(t){t.load(h,!0)},t.prototype.destroy=function(t){t.remove(l)},t}(),p=function(t){function n(n){var e=t.call(this,n)||this;return e.registerPlugin(new v),e.registerPlugin(new a.Plugin),e.registerPlugin(new i.Plugin),e.registerPlugin(new u.Plugin),e.registerPlugin(new c.Plugin),e}return Object(r.__extends)(n,t),n}(o.AbstractRenderer)}])}));
|