diff --git a/build/esm/urpflanze-light.js b/build/esm/urpflanze-light.js index cc607a2..a44c46a 100644 --- a/build/esm/urpflanze-light.js +++ b/build/esm/urpflanze-light.js @@ -1,5 +1,5 @@ /*! - * @license UrpflanzeJS v"1.0.2" + * @license UrpflanzeJS v"1.0.3" * urpflanze-light.js * * Github: https://github.com/urpflanze-org/urpflanze @@ -15,14 +15,52 @@ "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Circle": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Circle), +/* harmony export */ "Group": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Group), +/* harmony export */ "Line": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Line), +/* harmony export */ "Lissajous": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Lissajous), +/* harmony export */ "Modifier": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Modifier), +/* harmony export */ "Modifiers": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Modifiers), +/* harmony export */ "PHI": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.PHI), +/* harmony export */ "PI2": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.PI2), +/* harmony export */ "Polygon": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Polygon), +/* harmony export */ "Rect": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Rect), +/* harmony export */ "Rose": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Rose), +/* harmony export */ "Scene": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Scene), +/* harmony export */ "SceneChild": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.SceneChild), +/* harmony export */ "Shape": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Shape), +/* harmony export */ "ShapeBase": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.ShapeBase), +/* harmony export */ "ShapeBuffer": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.ShapeBuffer), +/* harmony export */ "ShapeFollow": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.ShapeFollow), +/* harmony export */ "ShapeLoop": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.ShapeLoop), +/* harmony export */ "ShapePrimitive": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.ShapePrimitive), +/* harmony export */ "ShapeRecursive": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.ShapeRecursive), +/* harmony export */ "Spiral": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Spiral), +/* harmony export */ "Star": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Star), +/* harmony export */ "SuperShape": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.SuperShape), +/* harmony export */ "Triangle": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Triangle), +/* harmony export */ "Vec2": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.Vec2), +/* harmony export */ "__esModule": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.__esModule), +/* harmony export */ "angle2FromRepetition": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.angle2FromRepetition), +/* harmony export */ "angleFromRepetition": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.angleFromRepetition), +/* harmony export */ "clamp": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.clamp), +/* harmony export */ "distanceFromRepetition": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.distanceFromRepetition), +/* harmony export */ "distributePointsInBuffer": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.distributePointsInBuffer), +/* harmony export */ "interpolate": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.interpolate), +/* harmony export */ "lerp": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.lerp), +/* harmony export */ "log": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.log), +/* harmony export */ "mod": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.mod), +/* harmony export */ "noise": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.noise), +/* harmony export */ "now": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.now), +/* harmony export */ "prepareBufferForInterpolation": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.prepareBufferForInterpolation), +/* harmony export */ "random": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.random), +/* harmony export */ "relativeClamp": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.relativeClamp), +/* harmony export */ "toDegrees": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.toDegrees), +/* harmony export */ "toRadians": () => (/* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.toRadians), /* harmony export */ "Animation": () => (/* reexport module object */ _urpflanze_animation_dist_cjs__WEBPACK_IMPORTED_MODULE_1__), /* harmony export */ "DrawerCanvas": () => (/* reexport safe */ _urpflanze_drawer_canvas_dist_cjs_browser_BrowserDrawerCanvas__WEBPACK_IMPORTED_MODULE_2__.BrowserDrawerCanvas) /* harmony export */ }); -/* harmony import */ var _urpflanze_core_dist_cjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/* harmony import */ var _urpflanze_core_dist_cjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_urpflanze_core_dist_cjs__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _urpflanze_core_dist_cjs__WEBPACK_IMPORTED_MODULE_0__) if(["default","Animation","DrawerCanvas"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _urpflanze_core_dist_cjs__WEBPACK_IMPORTED_MODULE_0__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); +/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var _urpflanze_animation_dist_cjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57); /* harmony import */ var _urpflanze_animation_dist_cjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_urpflanze_animation_dist_cjs__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _urpflanze_drawer_canvas_dist_cjs_browser_BrowserDrawerCanvas__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71); @@ -33,9191 +71,9216 @@ __webpack_require__.r(__webpack_exports__); /***/ }), /* 2 */ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Scene": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Scene__WEBPACK_IMPORTED_MODULE_0__.Scene), +/* harmony export */ "__esModule": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Scene__WEBPACK_IMPORTED_MODULE_0__.__esModule), +/* harmony export */ "SceneChild": () => (/* reexport safe */ _urpflanze_core_dist_cjs_SceneChild__WEBPACK_IMPORTED_MODULE_1__.SceneChild), +/* harmony export */ "Group": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Group__WEBPACK_IMPORTED_MODULE_2__.Group), +/* harmony export */ "ShapeBase": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_ShapeBase__WEBPACK_IMPORTED_MODULE_3__.ShapeBase), +/* harmony export */ "ShapePrimitive": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_ShapePrimitive__WEBPACK_IMPORTED_MODULE_4__.ShapePrimitive), +/* harmony export */ "ShapeLoop": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_ShapeLoop__WEBPACK_IMPORTED_MODULE_5__.ShapeLoop), +/* harmony export */ "ShapeBuffer": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_ShapeBuffer__WEBPACK_IMPORTED_MODULE_6__.ShapeBuffer), +/* harmony export */ "Shape": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_Shape__WEBPACK_IMPORTED_MODULE_7__.Shape), +/* harmony export */ "ShapeRecursive": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_ShapeRecursive__WEBPACK_IMPORTED_MODULE_8__.ShapeRecursive), +/* harmony export */ "ShapeFollow": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_ShapeFollow__WEBPACK_IMPORTED_MODULE_9__.ShapeFollow), +/* harmony export */ "Line": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_primitives_Line__WEBPACK_IMPORTED_MODULE_10__.Line), +/* harmony export */ "Triangle": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_primitives_Triangle__WEBPACK_IMPORTED_MODULE_11__.Triangle), +/* harmony export */ "Rect": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_primitives_Rect__WEBPACK_IMPORTED_MODULE_12__.Rect), +/* harmony export */ "Polygon": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_primitives_Polygon__WEBPACK_IMPORTED_MODULE_13__.Polygon), +/* harmony export */ "Circle": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_primitives_Circle__WEBPACK_IMPORTED_MODULE_14__.Circle), +/* harmony export */ "Star": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_primitives_Star__WEBPACK_IMPORTED_MODULE_15__.Star), +/* harmony export */ "Rose": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_primitives_Rose__WEBPACK_IMPORTED_MODULE_16__.Rose), +/* harmony export */ "Spiral": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_primitives_Spiral__WEBPACK_IMPORTED_MODULE_17__.Spiral), +/* harmony export */ "Lissajous": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_primitives_Lissajous__WEBPACK_IMPORTED_MODULE_18__.Lissajous), +/* harmony export */ "SuperShape": () => (/* reexport safe */ _urpflanze_core_dist_cjs_shapes_primitives_SuperShape__WEBPACK_IMPORTED_MODULE_19__.SuperShape), +/* harmony export */ "Modifier": () => (/* reexport safe */ _urpflanze_core_dist_cjs_modifiers_Modifier__WEBPACK_IMPORTED_MODULE_20__.Modifier), +/* harmony export */ "Modifiers": () => (/* reexport safe */ _urpflanze_core_dist_cjs_modifiers__WEBPACK_IMPORTED_MODULE_21__.Modifiers), +/* harmony export */ "lerp": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.lerp), +/* harmony export */ "clamp": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.clamp), +/* harmony export */ "relativeClamp": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.relativeClamp), +/* harmony export */ "toDegrees": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.toDegrees), +/* harmony export */ "toRadians": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.toRadians), +/* harmony export */ "now": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.now), +/* harmony export */ "noise": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.noise), +/* harmony export */ "random": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.random), +/* harmony export */ "angleFromRepetition": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.angleFromRepetition), +/* harmony export */ "angle2FromRepetition": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.angle2FromRepetition), +/* harmony export */ "distanceFromRepetition": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.distanceFromRepetition), +/* harmony export */ "interpolate": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.interpolate), +/* harmony export */ "prepareBufferForInterpolation": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.prepareBufferForInterpolation), +/* harmony export */ "distributePointsInBuffer": () => (/* reexport safe */ _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__.distributePointsInBuffer), +/* harmony export */ "Vec2": () => (/* reexport safe */ _urpflanze_core_dist_cjs_math_Vec2__WEBPACK_IMPORTED_MODULE_23__.default), +/* harmony export */ "PHI": () => (/* reexport safe */ _urpflanze_core_dist_cjs_math__WEBPACK_IMPORTED_MODULE_24__.PHI), +/* harmony export */ "PI2": () => (/* reexport safe */ _urpflanze_core_dist_cjs_math__WEBPACK_IMPORTED_MODULE_24__.PI2), +/* harmony export */ "log": () => (/* reexport safe */ _urpflanze_core_dist_cjs_math__WEBPACK_IMPORTED_MODULE_24__.log), +/* harmony export */ "mod": () => (/* reexport safe */ _urpflanze_core_dist_cjs_math__WEBPACK_IMPORTED_MODULE_24__.mod) +/* harmony export */ }); +/* harmony import */ var _urpflanze_core_dist_cjs_Scene__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); +/* harmony import */ var _urpflanze_core_dist_cjs_SceneChild__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); +/* harmony import */ var _urpflanze_core_dist_cjs_Group__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_ShapeBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_ShapePrimitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_ShapeLoop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(36); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_ShapeBuffer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(37); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_Shape__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(34); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_ShapeRecursive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_ShapeFollow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(39); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_primitives_Line__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(40); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_primitives_Triangle__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(41); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_primitives_Rect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(42); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_primitives_Polygon__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(43); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_primitives_Circle__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(44); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_primitives_Star__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(45); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_primitives_Rose__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(46); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_primitives_Spiral__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(47); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_primitives_Lissajous__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(48); +/* harmony import */ var _urpflanze_core_dist_cjs_shapes_primitives_SuperShape__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(49); +/* harmony import */ var _urpflanze_core_dist_cjs_modifiers_Modifier__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(31); +/* harmony import */ var _urpflanze_core_dist_cjs_modifiers__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(50); +/* harmony import */ var _urpflanze_core_dist_cjs_Utilities__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(32); +/* harmony import */ var _urpflanze_core_dist_cjs_math_Vec2__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(28); +/* harmony import */ var _urpflanze_core_dist_cjs_math__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(29); -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.mod = exports.log = exports.PI2 = exports.PHI = exports.Vec2 = exports.distributePointsInBuffer = exports.prepareBufferForInterpolation = exports.interpolate = exports.distanceFromRepetition = exports.angle2FromRepetition = exports.angleFromRepetition = exports.random = exports.noise = exports.now = exports.toRadians = exports.toDegrees = exports.relativeClamp = exports.clamp = exports.lerp = void 0; -/** - * Types & Interface - */ -__exportStar(__webpack_require__(3), exports); -// Set glMatrixArrayType -const gl_matrix_1 = __webpack_require__(12); -gl_matrix_1.glMatrix.setMatrixArrayType(Array); -/** - * Core - */ -__exportStar(__webpack_require__(23), exports); -__exportStar(__webpack_require__(24), exports); -__exportStar(__webpack_require__(25), exports); -// Shapes -__exportStar(__webpack_require__(26), exports); -__exportStar(__webpack_require__(35), exports); -__exportStar(__webpack_require__(36), exports); -__exportStar(__webpack_require__(37), exports); -__exportStar(__webpack_require__(34), exports); -__exportStar(__webpack_require__(38), exports); -__exportStar(__webpack_require__(39), exports); -__exportStar(__webpack_require__(40), exports); -__exportStar(__webpack_require__(41), exports); -__exportStar(__webpack_require__(42), exports); -__exportStar(__webpack_require__(43), exports); -__exportStar(__webpack_require__(44), exports); -__exportStar(__webpack_require__(45), exports); -__exportStar(__webpack_require__(46), exports); -__exportStar(__webpack_require__(47), exports); -__exportStar(__webpack_require__(48), exports); -__exportStar(__webpack_require__(49), exports); -// Modifiers -__exportStar(__webpack_require__(31), exports); -__exportStar(__webpack_require__(50), exports); -// Utilities -var Utilities_1 = __webpack_require__(32); -Object.defineProperty(exports, "lerp", ({ enumerable: true, get: function () { return Utilities_1.lerp; } })); -Object.defineProperty(exports, "clamp", ({ enumerable: true, get: function () { return Utilities_1.clamp; } })); -Object.defineProperty(exports, "relativeClamp", ({ enumerable: true, get: function () { return Utilities_1.relativeClamp; } })); -Object.defineProperty(exports, "toDegrees", ({ enumerable: true, get: function () { return Utilities_1.toDegrees; } })); -Object.defineProperty(exports, "toRadians", ({ enumerable: true, get: function () { return Utilities_1.toRadians; } })); -Object.defineProperty(exports, "now", ({ enumerable: true, get: function () { return Utilities_1.now; } })); -Object.defineProperty(exports, "noise", ({ enumerable: true, get: function () { return Utilities_1.noise; } })); -Object.defineProperty(exports, "random", ({ enumerable: true, get: function () { return Utilities_1.random; } })); -Object.defineProperty(exports, "angleFromRepetition", ({ enumerable: true, get: function () { return Utilities_1.angleFromRepetition; } })); -Object.defineProperty(exports, "angle2FromRepetition", ({ enumerable: true, get: function () { return Utilities_1.angle2FromRepetition; } })); -Object.defineProperty(exports, "distanceFromRepetition", ({ enumerable: true, get: function () { return Utilities_1.distanceFromRepetition; } })); -Object.defineProperty(exports, "interpolate", ({ enumerable: true, get: function () { return Utilities_1.interpolate; } })); -Object.defineProperty(exports, "prepareBufferForInterpolation", ({ enumerable: true, get: function () { return Utilities_1.prepareBufferForInterpolation; } })); -Object.defineProperty(exports, "distributePointsInBuffer", ({ enumerable: true, get: function () { return Utilities_1.distributePointsInBuffer; } })); -var Vec2_1 = __webpack_require__(28); -Object.defineProperty(exports, "Vec2", ({ enumerable: true, get: function () { return Vec2_1.default; } })); -var math_1 = __webpack_require__(29); -Object.defineProperty(exports, "PHI", ({ enumerable: true, get: function () { return math_1.PHI; } })); -Object.defineProperty(exports, "PI2", ({ enumerable: true, get: function () { return math_1.PI2; } })); -Object.defineProperty(exports, "log", ({ enumerable: true, get: function () { return math_1.log; } })); -Object.defineProperty(exports, "mod", ({ enumerable: true, get: function () { return math_1.mod; } })); -//# sourceMappingURL=index.js.map -/***/ }), -/* 3 */ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__webpack_require__(4), exports); -__exportStar(__webpack_require__(5), exports); -__exportStar(__webpack_require__(6), exports); -__exportStar(__webpack_require__(7), exports); -__exportStar(__webpack_require__(8), exports); -__exportStar(__webpack_require__(9), exports); -__exportStar(__webpack_require__(10), exports); -__exportStar(__webpack_require__(11), exports); -//# sourceMappingURL=index.js.map -/***/ }), -/* 4 */ -/***/ ((__unused_webpack_module, exports) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=indexedBuffer.js.map -/***/ }), -/* 5 */ -/***/ ((__unused_webpack_module, exports) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=propArguments.js.map -/***/ }), -/* 6 */ -/***/ ((__unused_webpack_module, exports) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ERepetitionType = void 0; -/** - * Repetition type enumerator. - * - * @category Core.Repetition - * @internal - */ -var ERepetitionType; -(function (ERepetitionType) { - /** - * Defines the type of repetition of the shape, - * in a circular way starting from the center of the scene - * @order 1 - */ - ERepetitionType[ERepetitionType["Ring"] = 1] = "Ring"; - /** - * Defines the type of repetition of the shape, - * on a nxm grid starting from the center of the scene - * @order 2 - */ - ERepetitionType[ERepetitionType["Matrix"] = 2] = "Matrix"; -})(ERepetitionType = exports.ERepetitionType || (exports.ERepetitionType = {})); -//# sourceMappingURL=repetitions.js.map -/***/ }), -/* 7 */ -/***/ ((__unused_webpack_module, exports) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=scene-child.js.map -/***/ }), -/* 8 */ -/***/ ((__unused_webpack_module, exports) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=scene.js.map -/***/ }), -/* 9 */ -/***/ ((__unused_webpack_module, exports) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.EBoundingType = void 0; -var EBoundingType; -(function (EBoundingType) { - /** - * Relative to the real bounding of the shape - * @order 2 - */ - EBoundingType[EBoundingType["Relative"] = 1] = "Relative"; - /** - * Fixed to te width and height of the shape - * @order 3 - */ - EBoundingType[EBoundingType["Fixed"] = 2] = "Fixed"; -})(EBoundingType = exports.EBoundingType || (exports.EBoundingType = {})); -//# sourceMappingURL=shape-base.js.map -/***/ }), -/* 10 */ -/***/ ((__unused_webpack_module, exports) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -////// -//# sourceMappingURL=shape-primitives.js.map +//# sourceMappingURL=core.js.map /***/ }), -/* 11 */ -/***/ ((__unused_webpack_module, exports) => { +/* 3 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -// Shape Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=shapes.js.map - -/***/ }), -/* 12 */ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "glMatrix": () => (/* reexport module object */ _common_js__WEBPACK_IMPORTED_MODULE_0__), -/* harmony export */ "mat2": () => (/* reexport module object */ _mat2_js__WEBPACK_IMPORTED_MODULE_1__), -/* harmony export */ "mat2d": () => (/* reexport module object */ _mat2d_js__WEBPACK_IMPORTED_MODULE_2__), -/* harmony export */ "mat3": () => (/* reexport module object */ _mat3_js__WEBPACK_IMPORTED_MODULE_3__), -/* harmony export */ "mat4": () => (/* reexport module object */ _mat4_js__WEBPACK_IMPORTED_MODULE_4__), -/* harmony export */ "quat": () => (/* reexport module object */ _quat_js__WEBPACK_IMPORTED_MODULE_5__), -/* harmony export */ "quat2": () => (/* reexport module object */ _quat2_js__WEBPACK_IMPORTED_MODULE_6__), -/* harmony export */ "vec2": () => (/* reexport module object */ _vec2_js__WEBPACK_IMPORTED_MODULE_7__), -/* harmony export */ "vec3": () => (/* reexport module object */ _vec3_js__WEBPACK_IMPORTED_MODULE_8__), -/* harmony export */ "vec4": () => (/* reexport module object */ _vec4_js__WEBPACK_IMPORTED_MODULE_9__) -/* harmony export */ }); -/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); -/* harmony import */ var _mat2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14); -/* harmony import */ var _mat2d_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15); -/* harmony import */ var _mat3_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16); -/* harmony import */ var _mat4_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17); -/* harmony import */ var _quat_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18); -/* harmony import */ var _quat2_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(21); -/* harmony import */ var _vec2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22); -/* harmony import */ var _vec3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(20); -/* harmony import */ var _vec4_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(19); - - - - - - - - - - - - -/***/ }), -/* 13 */ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "EPSILON": () => (/* binding */ EPSILON), -/* harmony export */ "ARRAY_TYPE": () => (/* binding */ ARRAY_TYPE), -/* harmony export */ "RANDOM": () => (/* binding */ RANDOM), -/* harmony export */ "setMatrixArrayType": () => (/* binding */ setMatrixArrayType), -/* harmony export */ "toRadian": () => (/* binding */ toRadian), -/* harmony export */ "equals": () => (/* binding */ equals) -/* harmony export */ }); -/** - * Common utilities - * @module glMatrix - */ -// Configuration Constants -var EPSILON = 0.000001; -var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array; -var RANDOM = Math.random; -/** - * Sets the type of array used when creating new vectors and matrices - * - * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array - */ - -function setMatrixArrayType(type) { - ARRAY_TYPE = type; -} -var degree = Math.PI / 180; -/** - * Convert Degree To Radian - * - * @param {Number} a Angle in Degrees - */ - -function toRadian(a) { - return a * degree; -} -/** - * Tests whether or not the arguments have approximately the same value, within an absolute - * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less - * than or equal to 1.0, and a relative tolerance is used for larger values) - * - * @param {Number} a The first number to test. - * @param {Number} b The second number to test. - * @returns {Boolean} True if the numbers are approximately equal, false otherwise. +exports.Scene = void 0; +const SceneChild_1 = __webpack_require__(4); +const Group_1 = __webpack_require__(5); +const Shape_1 = __webpack_require__(34); +const Utilities_1 = __webpack_require__(32); +/** + * Container for all SceneChild. + * The main purpose is to manage the drawing order and update the child buffers + * + * @order 1 + * @category Core.Scene + * @class Scene */ - -function equals(a, b) { - return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b)); -} -if (!Math.hypot) Math.hypot = function () { - var y = 0, - i = arguments.length; - - while (i--) { - y += arguments[i] * arguments[i]; - } - - return Math.sqrt(y); -}; - -/***/ }), -/* 14 */ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "create": () => (/* binding */ create), -/* harmony export */ "clone": () => (/* binding */ clone), -/* harmony export */ "copy": () => (/* binding */ copy), -/* harmony export */ "identity": () => (/* binding */ identity), -/* harmony export */ "fromValues": () => (/* binding */ fromValues), -/* harmony export */ "set": () => (/* binding */ set), -/* harmony export */ "transpose": () => (/* binding */ transpose), -/* harmony export */ "invert": () => (/* binding */ invert), -/* harmony export */ "adjoint": () => (/* binding */ adjoint), -/* harmony export */ "determinant": () => (/* binding */ determinant), -/* harmony export */ "multiply": () => (/* binding */ multiply), -/* harmony export */ "rotate": () => (/* binding */ rotate), -/* harmony export */ "scale": () => (/* binding */ scale), -/* harmony export */ "fromRotation": () => (/* binding */ fromRotation), -/* harmony export */ "fromScaling": () => (/* binding */ fromScaling), -/* harmony export */ "str": () => (/* binding */ str), -/* harmony export */ "frob": () => (/* binding */ frob), -/* harmony export */ "LDU": () => (/* binding */ LDU), -/* harmony export */ "add": () => (/* binding */ add), -/* harmony export */ "subtract": () => (/* binding */ subtract), -/* harmony export */ "exactEquals": () => (/* binding */ exactEquals), -/* harmony export */ "equals": () => (/* binding */ equals), -/* harmony export */ "multiplyScalar": () => (/* binding */ multiplyScalar), -/* harmony export */ "multiplyScalarAndAdd": () => (/* binding */ multiplyScalarAndAdd), -/* harmony export */ "mul": () => (/* binding */ mul), -/* harmony export */ "sub": () => (/* binding */ sub) -/* harmony export */ }); -/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); - -/** - * 2x2 Matrix - * @module mat2 - */ - -/** - * Creates a new identity mat2 - * - * @returns {mat2} a new 2x2 matrix - */ - -function create() { - var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(4); - - if (_common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE != Float32Array) { - out[1] = 0; - out[2] = 0; - } - - out[0] = 1; - out[3] = 1; - return out; -} -/** - * Creates a new mat2 initialized with values from an existing matrix - * - * @param {ReadonlyMat2} a matrix to clone - * @returns {mat2} a new 2x2 matrix - */ - -function clone(a) { - var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(4); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; -} -/** - * Copy the values from one mat2 to another - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ - -function copy(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; -} -/** - * Set a mat2 to the identity matrix - * - * @param {mat2} out the receiving matrix - * @returns {mat2} out - */ - -function identity(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; -} -/** - * Create a new mat2 with the given values - * - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m10 Component in column 1, row 0 position (index 2) - * @param {Number} m11 Component in column 1, row 1 position (index 3) - * @returns {mat2} out A new 2x2 matrix - */ - -function fromValues(m00, m01, m10, m11) { - var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(4); - out[0] = m00; - out[1] = m01; - out[2] = m10; - out[3] = m11; - return out; -} -/** - * Set the components of a mat2 to the given values - * - * @param {mat2} out the receiving matrix - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m10 Component in column 1, row 0 position (index 2) - * @param {Number} m11 Component in column 1, row 1 position (index 3) - * @returns {mat2} out - */ - -function set(out, m00, m01, m10, m11) { - out[0] = m00; - out[1] = m01; - out[2] = m10; - out[3] = m11; - return out; -} -/** - * Transpose the values of a mat2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ - -function transpose(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache - // some values - if (out === a) { - var a1 = a[1]; - out[1] = a[2]; - out[2] = a1; - } else { - out[0] = a[0]; - out[1] = a[2]; - out[2] = a[1]; - out[3] = a[3]; - } - - return out; -} -/** - * Inverts a mat2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ - -function invert(out, a) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; // Calculate the determinant - - var det = a0 * a3 - a2 * a1; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = a3 * det; - out[1] = -a1 * det; - out[2] = -a2 * det; - out[3] = a0 * det; - return out; -} -/** - * Calculates the adjugate of a mat2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the source matrix - * @returns {mat2} out - */ - -function adjoint(out, a) { - // Caching this value is nessecary if out == a - var a0 = a[0]; - out[0] = a[3]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a0; - return out; -} -/** - * Calculates the determinant of a mat2 - * - * @param {ReadonlyMat2} a the source matrix - * @returns {Number} determinant of a - */ - -function determinant(a) { - return a[0] * a[3] - a[2] * a[1]; -} -/** - * Multiplies two mat2's - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @returns {mat2} out - */ - -function multiply(out, a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - return out; -} -/** - * Rotates a mat2 by the given angle - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2} out - */ - -function rotate(out, a, rad) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - return out; -} -/** - * Scales the mat2 by the dimensions in the given vec2 - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the matrix to rotate - * @param {ReadonlyVec2} v the vec2 to scale the matrix by - * @returns {mat2} out - **/ - -function scale(out, a, v) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var v0 = v[0], - v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - return out; -} -/** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat2.identity(dest); - * mat2.rotate(dest, dest, rad); - * - * @param {mat2} out mat2 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2} out - */ - -function fromRotation(out, rad) { - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = -s; - out[3] = c; - return out; -} -/** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat2.identity(dest); - * mat2.scale(dest, dest, vec); - * - * @param {mat2} out mat2 receiving operation result - * @param {ReadonlyVec2} v Scaling vector - * @returns {mat2} out - */ - -function fromScaling(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = v[1]; - return out; -} -/** - * Returns a string representation of a mat2 - * - * @param {ReadonlyMat2} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ - -function str(a) { - return "mat2(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ")"; -} -/** - * Returns Frobenius norm of a mat2 - * - * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ - -function frob(a) { - return Math.hypot(a[0], a[1], a[2], a[3]); -} -/** - * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix - * @param {ReadonlyMat2} L the lower triangular matrix - * @param {ReadonlyMat2} D the diagonal matrix - * @param {ReadonlyMat2} U the upper triangular matrix - * @param {ReadonlyMat2} a the input matrix to factorize - */ - -function LDU(L, D, U, a) { - L[2] = a[2] / a[0]; - U[0] = a[0]; - U[1] = a[1]; - U[3] = a[3] - L[2] * U[1]; - return [L, D, U]; -} -/** - * Adds two mat2's - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @returns {mat2} out - */ - -function add(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - return out; -} -/** - * Subtracts matrix b from matrix a - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @returns {mat2} out - */ - -function subtract(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - return out; -} -/** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyMat2} a The first matrix. - * @param {ReadonlyMat2} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - -function exactEquals(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; -} -/** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {ReadonlyMat2} a The first matrix. - * @param {ReadonlyMat2} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - -function equals(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3]; - 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)); -} -/** - * Multiply each element of the matrix by a scalar. - * - * @param {mat2} out the receiving matrix - * @param {ReadonlyMat2} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat2} out - */ - -function multiplyScalar(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - return out; -} -/** - * Adds two mat2's after multiplying each element of the second operand by a scalar value. - * - * @param {mat2} out the receiving vector - * @param {ReadonlyMat2} a the first operand - * @param {ReadonlyMat2} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat2} out - */ - -function multiplyScalarAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - return out; -} -/** - * Alias for {@link mat2.multiply} - * @function - */ - -var mul = multiply; -/** - * Alias for {@link mat2.subtract} - * @function - */ - -var sub = subtract; - -/***/ }), -/* 15 */ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "create": () => (/* binding */ create), -/* harmony export */ "clone": () => (/* binding */ clone), -/* harmony export */ "copy": () => (/* binding */ copy), -/* harmony export */ "identity": () => (/* binding */ identity), -/* harmony export */ "fromValues": () => (/* binding */ fromValues), -/* harmony export */ "set": () => (/* binding */ set), -/* harmony export */ "invert": () => (/* binding */ invert), -/* harmony export */ "determinant": () => (/* binding */ determinant), -/* harmony export */ "multiply": () => (/* binding */ multiply), -/* harmony export */ "rotate": () => (/* binding */ rotate), -/* harmony export */ "scale": () => (/* binding */ scale), -/* harmony export */ "translate": () => (/* binding */ translate), -/* harmony export */ "fromRotation": () => (/* binding */ fromRotation), -/* harmony export */ "fromScaling": () => (/* binding */ fromScaling), -/* harmony export */ "fromTranslation": () => (/* binding */ fromTranslation), -/* harmony export */ "str": () => (/* binding */ str), -/* harmony export */ "frob": () => (/* binding */ frob), -/* harmony export */ "add": () => (/* binding */ add), -/* harmony export */ "subtract": () => (/* binding */ subtract), -/* harmony export */ "multiplyScalar": () => (/* binding */ multiplyScalar), -/* harmony export */ "multiplyScalarAndAdd": () => (/* binding */ multiplyScalarAndAdd), -/* harmony export */ "exactEquals": () => (/* binding */ exactEquals), -/* harmony export */ "equals": () => (/* binding */ equals), -/* harmony export */ "mul": () => (/* binding */ mul), -/* harmony export */ "sub": () => (/* binding */ sub) -/* harmony export */ }); -/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); - -/** - * 2x3 Matrix - * @module mat2d - * @description - * A mat2d contains six elements defined as: - *
- * [a, b, - * c, d, - * tx, ty] - *- * This is a short form for the 3x3 matrix: - *
- * [a, b, 0, - * c, d, 0, - * tx, ty, 1] - *- * The last column is ignored so the array is shorter and operations are faster. - */ - -/** - * Creates a new identity mat2d - * - * @returns {mat2d} a new 2x3 matrix - */ - -function create() { - var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(6); - - if (_common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE != Float32Array) { - out[1] = 0; - out[2] = 0; - out[4] = 0; - out[5] = 0; - } - - out[0] = 1; - out[3] = 1; - return out; -} -/** - * Creates a new mat2d initialized with values from an existing matrix - * - * @param {ReadonlyMat2d} a matrix to clone - * @returns {mat2d} a new 2x3 matrix - */ - -function clone(a) { - var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(6); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; -} -/** - * Copy the values from one mat2d to another - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the source matrix - * @returns {mat2d} out - */ - -function copy(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; -} -/** - * Set a mat2d to the identity matrix - * - * @param {mat2d} out the receiving matrix - * @returns {mat2d} out - */ - -function identity(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = 0; - out[5] = 0; - return out; -} -/** - * Create a new mat2d with the given values - * - * @param {Number} a Component A (index 0) - * @param {Number} b Component B (index 1) - * @param {Number} c Component C (index 2) - * @param {Number} d Component D (index 3) - * @param {Number} tx Component TX (index 4) - * @param {Number} ty Component TY (index 5) - * @returns {mat2d} A new mat2d - */ - -function fromValues(a, b, c, d, tx, ty) { - var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(6); - out[0] = a; - out[1] = b; - out[2] = c; - out[3] = d; - out[4] = tx; - out[5] = ty; - return out; -} -/** - * Set the components of a mat2d to the given values - * - * @param {mat2d} out the receiving matrix - * @param {Number} a Component A (index 0) - * @param {Number} b Component B (index 1) - * @param {Number} c Component C (index 2) - * @param {Number} d Component D (index 3) - * @param {Number} tx Component TX (index 4) - * @param {Number} ty Component TY (index 5) - * @returns {mat2d} out - */ - -function set(out, a, b, c, d, tx, ty) { - out[0] = a; - out[1] = b; - out[2] = c; - out[3] = d; - out[4] = tx; - out[5] = ty; - return out; -} -/** - * Inverts a mat2d - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the source matrix - * @returns {mat2d} out - */ - -function invert(out, a) { - var aa = a[0], - ab = a[1], - ac = a[2], - ad = a[3]; - var atx = a[4], - aty = a[5]; - var det = aa * ad - ab * ac; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = ad * det; - out[1] = -ab * det; - out[2] = -ac * det; - out[3] = aa * det; - out[4] = (ac * aty - ad * atx) * det; - out[5] = (ab * atx - aa * aty) * det; - return out; -} -/** - * Calculates the determinant of a mat2d - * - * @param {ReadonlyMat2d} a the source matrix - * @returns {Number} determinant of a - */ - -function determinant(a) { - return a[0] * a[3] - a[1] * a[2]; -} -/** - * Multiplies two mat2d's - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @returns {mat2d} out - */ - -function multiply(out, a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - out[4] = a0 * b4 + a2 * b5 + a4; - out[5] = a1 * b4 + a3 * b5 + a5; - return out; -} -/** - * Rotates a mat2d by the given angle - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2d} out - */ - -function rotate(out, a, rad) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var s = Math.sin(rad); - var c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - out[4] = a4; - out[5] = a5; - return out; -} -/** - * Scales the mat2d by the dimensions in the given vec2 - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to translate - * @param {ReadonlyVec2} v the vec2 to scale the matrix by - * @returns {mat2d} out - **/ - -function scale(out, a, v) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var v0 = v[0], - v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - out[4] = a4; - out[5] = a5; - return out; -} -/** - * Translates the mat2d by the dimensions in the given vec2 - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to translate - * @param {ReadonlyVec2} v the vec2 to translate the matrix by - * @returns {mat2d} out - **/ - -function translate(out, a, v) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var v0 = v[0], - v1 = v[1]; - out[0] = a0; - out[1] = a1; - out[2] = a2; - out[3] = a3; - out[4] = a0 * v0 + a2 * v1 + a4; - out[5] = a1 * v0 + a3 * v1 + a5; - return out; -} -/** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.rotate(dest, dest, rad); - * - * @param {mat2d} out mat2d receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2d} out - */ - -function fromRotation(out, rad) { - var s = Math.sin(rad), - c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = -s; - out[3] = c; - out[4] = 0; - out[5] = 0; - return out; -} -/** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.scale(dest, dest, vec); - * - * @param {mat2d} out mat2d receiving operation result - * @param {ReadonlyVec2} v Scaling vector - * @returns {mat2d} out - */ - -function fromScaling(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = v[1]; - out[4] = 0; - out[5] = 0; - return out; -} -/** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.translate(dest, dest, vec); - * - * @param {mat2d} out mat2d receiving operation result - * @param {ReadonlyVec2} v Translation vector - * @returns {mat2d} out - */ - -function fromTranslation(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = v[0]; - out[5] = v[1]; - return out; -} -/** - * Returns a string representation of a mat2d - * - * @param {ReadonlyMat2d} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ - -function str(a) { - return "mat2d(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")"; -} -/** - * Returns Frobenius norm of a mat2d - * - * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ - -function frob(a) { - return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); -} -/** - * Adds two mat2d's - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @returns {mat2d} out - */ - -function add(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - return out; -} -/** - * Subtracts matrix b from matrix a - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @returns {mat2d} out - */ - -function subtract(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - return out; -} -/** - * Multiply each element of the matrix by a scalar. - * - * @param {mat2d} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat2d} out - */ - -function multiplyScalar(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - return out; -} -/** - * Adds two mat2d's after multiplying each element of the second operand by a scalar value. - * - * @param {mat2d} out the receiving vector - * @param {ReadonlyMat2d} a the first operand - * @param {ReadonlyMat2d} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat2d} out - */ - -function multiplyScalarAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - return out; -} -/** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyMat2d} a The first matrix. - * @param {ReadonlyMat2d} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - -function exactEquals(a, b) { - 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]; -} -/** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {ReadonlyMat2d} a The first matrix. - * @param {ReadonlyMat2d} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - -function equals(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5]; - 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)); -} -/** - * Alias for {@link mat2d.multiply} - * @function - */ - -var mul = multiply; -/** - * Alias for {@link mat2d.subtract} - * @function - */ - -var sub = subtract; - -/***/ }), -/* 16 */ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "create": () => (/* binding */ create), -/* harmony export */ "fromMat4": () => (/* binding */ fromMat4), -/* harmony export */ "clone": () => (/* binding */ clone), -/* harmony export */ "copy": () => (/* binding */ copy), -/* harmony export */ "fromValues": () => (/* binding */ fromValues), -/* harmony export */ "set": () => (/* binding */ set), -/* harmony export */ "identity": () => (/* binding */ identity), -/* harmony export */ "transpose": () => (/* binding */ transpose), -/* harmony export */ "invert": () => (/* binding */ invert), -/* harmony export */ "adjoint": () => (/* binding */ adjoint), -/* harmony export */ "determinant": () => (/* binding */ determinant), -/* harmony export */ "multiply": () => (/* binding */ multiply), -/* harmony export */ "translate": () => (/* binding */ translate), -/* harmony export */ "rotate": () => (/* binding */ rotate), -/* harmony export */ "scale": () => (/* binding */ scale), -/* harmony export */ "fromTranslation": () => (/* binding */ fromTranslation), -/* harmony export */ "fromRotation": () => (/* binding */ fromRotation), -/* harmony export */ "fromScaling": () => (/* binding */ fromScaling), -/* harmony export */ "fromMat2d": () => (/* binding */ fromMat2d), -/* harmony export */ "fromQuat": () => (/* binding */ fromQuat), -/* harmony export */ "normalFromMat4": () => (/* binding */ normalFromMat4), -/* harmony export */ "projection": () => (/* binding */ projection), -/* harmony export */ "str": () => (/* binding */ str), -/* harmony export */ "frob": () => (/* binding */ frob), -/* harmony export */ "add": () => (/* binding */ add), -/* harmony export */ "subtract": () => (/* binding */ subtract), -/* harmony export */ "multiplyScalar": () => (/* binding */ multiplyScalar), -/* harmony export */ "multiplyScalarAndAdd": () => (/* binding */ multiplyScalarAndAdd), -/* harmony export */ "exactEquals": () => (/* binding */ exactEquals), -/* harmony export */ "equals": () => (/* binding */ equals), -/* harmony export */ "mul": () => (/* binding */ mul), -/* harmony export */ "sub": () => (/* binding */ sub) -/* harmony export */ }); -/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); - -/** - * 3x3 Matrix - * @module mat3 - */ - -/** - * Creates a new identity mat3 - * - * @returns {mat3} a new 3x3 matrix - */ - -function create() { - var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(9); - - if (_common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE != Float32Array) { - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[5] = 0; - out[6] = 0; - out[7] = 0; - } - - out[0] = 1; - out[4] = 1; - out[8] = 1; - return out; -} -/** - * Copies the upper-left 3x3 values into the given mat3. - * - * @param {mat3} out the receiving 3x3 matrix - * @param {ReadonlyMat4} a the source 4x4 matrix - * @returns {mat3} out - */ - -function fromMat4(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[4]; - out[4] = a[5]; - out[5] = a[6]; - out[6] = a[8]; - out[7] = a[9]; - out[8] = a[10]; - return out; -} -/** - * Creates a new mat3 initialized with values from an existing matrix - * - * @param {ReadonlyMat3} a matrix to clone - * @returns {mat3} a new 3x3 matrix - */ - -function clone(a) { - var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(9); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -} -/** - * Copy the values from one mat3 to another - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - -function copy(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -} -/** - * Create a new mat3 with the given values - * - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m10 Component in column 1, row 0 position (index 3) - * @param {Number} m11 Component in column 1, row 1 position (index 4) - * @param {Number} m12 Component in column 1, row 2 position (index 5) - * @param {Number} m20 Component in column 2, row 0 position (index 6) - * @param {Number} m21 Component in column 2, row 1 position (index 7) - * @param {Number} m22 Component in column 2, row 2 position (index 8) - * @returns {mat3} A new mat3 - */ - -function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) { - var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(9); - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m10; - out[4] = m11; - out[5] = m12; - out[6] = m20; - out[7] = m21; - out[8] = m22; - return out; -} -/** - * Set the components of a mat3 to the given values - * - * @param {mat3} out the receiving matrix - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m10 Component in column 1, row 0 position (index 3) - * @param {Number} m11 Component in column 1, row 1 position (index 4) - * @param {Number} m12 Component in column 1, row 2 position (index 5) - * @param {Number} m20 Component in column 2, row 0 position (index 6) - * @param {Number} m21 Component in column 2, row 1 position (index 7) - * @param {Number} m22 Component in column 2, row 2 position (index 8) - * @returns {mat3} out - */ - -function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) { - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m10; - out[4] = m11; - out[5] = m12; - out[6] = m20; - out[7] = m21; - out[8] = m22; - return out; -} -/** - * Set a mat3 to the identity matrix - * - * @param {mat3} out the receiving matrix - * @returns {mat3} out - */ - -function identity(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; -} -/** - * Transpose the values of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - -function transpose(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], - a02 = a[2], - a12 = a[5]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a01; - out[5] = a[7]; - out[6] = a02; - out[7] = a12; - } else { - out[0] = a[0]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a[1]; - out[4] = a[4]; - out[5] = a[7]; - out[6] = a[2]; - out[7] = a[5]; - out[8] = a[8]; - } - - return out; -} -/** - * Inverts a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - -function invert(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - var b01 = a22 * a11 - a12 * a21; - var b11 = -a22 * a10 + a12 * a20; - var b21 = a21 * a10 - a11 * a20; // Calculate the determinant - - var det = a00 * b01 + a01 * b11 + a02 * b21; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = b01 * det; - out[1] = (-a22 * a01 + a02 * a21) * det; - out[2] = (a12 * a01 - a02 * a11) * det; - out[3] = b11 * det; - out[4] = (a22 * a00 - a02 * a20) * det; - out[5] = (-a12 * a00 + a02 * a10) * det; - out[6] = b21 * det; - out[7] = (-a21 * a00 + a01 * a20) * det; - out[8] = (a11 * a00 - a01 * a10) * det; - return out; -} -/** - * Calculates the adjugate of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the source matrix - * @returns {mat3} out - */ - -function adjoint(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - out[0] = a11 * a22 - a12 * a21; - out[1] = a02 * a21 - a01 * a22; - out[2] = a01 * a12 - a02 * a11; - out[3] = a12 * a20 - a10 * a22; - out[4] = a00 * a22 - a02 * a20; - out[5] = a02 * a10 - a00 * a12; - out[6] = a10 * a21 - a11 * a20; - out[7] = a01 * a20 - a00 * a21; - out[8] = a00 * a11 - a01 * a10; - return out; -} -/** - * Calculates the determinant of a mat3 - * - * @param {ReadonlyMat3} a the source matrix - * @returns {Number} determinant of a - */ - -function determinant(a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20); -} -/** - * Multiplies two mat3's - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @returns {mat3} out - */ - -function multiply(out, a, b) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - var b00 = b[0], - b01 = b[1], - b02 = b[2]; - var b10 = b[3], - b11 = b[4], - b12 = b[5]; - var b20 = b[6], - b21 = b[7], - b22 = b[8]; - out[0] = b00 * a00 + b01 * a10 + b02 * a20; - out[1] = b00 * a01 + b01 * a11 + b02 * a21; - out[2] = b00 * a02 + b01 * a12 + b02 * a22; - out[3] = b10 * a00 + b11 * a10 + b12 * a20; - out[4] = b10 * a01 + b11 * a11 + b12 * a21; - out[5] = b10 * a02 + b11 * a12 + b12 * a22; - out[6] = b20 * a00 + b21 * a10 + b22 * a20; - out[7] = b20 * a01 + b21 * a11 + b22 * a21; - out[8] = b20 * a02 + b21 * a12 + b22 * a22; - return out; -} -/** - * Translate a mat3 by the given vector - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to translate - * @param {ReadonlyVec2} v vector to translate by - * @returns {mat3} out - */ - -function translate(out, a, v) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a10 = a[3], - a11 = a[4], - a12 = a[5], - a20 = a[6], - a21 = a[7], - a22 = a[8], - x = v[0], - y = v[1]; - out[0] = a00; - out[1] = a01; - out[2] = a02; - out[3] = a10; - out[4] = a11; - out[5] = a12; - out[6] = x * a00 + y * a10 + a20; - out[7] = x * a01 + y * a11 + a21; - out[8] = x * a02 + y * a12 + a22; - return out; -} -/** - * Rotates a mat3 by the given angle - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat3} out - */ - -function rotate(out, a, rad) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a10 = a[3], - a11 = a[4], - a12 = a[5], - a20 = a[6], - a21 = a[7], - a22 = a[8], - s = Math.sin(rad), - c = Math.cos(rad); - out[0] = c * a00 + s * a10; - out[1] = c * a01 + s * a11; - out[2] = c * a02 + s * a12; - out[3] = c * a10 - s * a00; - out[4] = c * a11 - s * a01; - out[5] = c * a12 - s * a02; - out[6] = a20; - out[7] = a21; - out[8] = a22; - return out; -} -/** - * Scales the mat3 by the dimensions in the given vec2 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to rotate - * @param {ReadonlyVec2} v the vec2 to scale the matrix by - * @returns {mat3} out - **/ - -function scale(out, a, v) { - var x = v[0], - y = v[1]; - out[0] = x * a[0]; - out[1] = x * a[1]; - out[2] = x * a[2]; - out[3] = y * a[3]; - out[4] = y * a[4]; - out[5] = y * a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -} -/** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.translate(dest, dest, vec); - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyVec2} v Translation vector - * @returns {mat3} out - */ - -function fromTranslation(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = v[0]; - out[7] = v[1]; - out[8] = 1; - return out; -} -/** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.rotate(dest, dest, rad); - * - * @param {mat3} out mat3 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat3} out - */ - -function fromRotation(out, rad) { - var s = Math.sin(rad), - c = Math.cos(rad); - out[0] = c; - out[1] = s; - out[2] = 0; - out[3] = -s; - out[4] = c; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; -} -/** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.scale(dest, dest, vec); - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyVec2} v Scaling vector - * @returns {mat3} out - */ - -function fromScaling(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = v[1]; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; -} -/** - * Copies the values from a mat2d into a mat3 - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat2d} a the matrix to copy - * @returns {mat3} out - **/ - -function fromMat2d(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = 0; - out[3] = a[2]; - out[4] = a[3]; - out[5] = 0; - out[6] = a[4]; - out[7] = a[5]; - out[8] = 1; - return out; -} -/** - * Calculates a 3x3 matrix from the given quaternion - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyQuat} q Quaternion to create matrix from - * - * @returns {mat3} out - */ - -function fromQuat(out, q) { - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var yx = y * x2; - var yy = y * y2; - var zx = z * x2; - var zy = z * y2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - out[0] = 1 - yy - zz; - out[3] = yx - wz; - out[6] = zx + wy; - out[1] = yx + wz; - out[4] = 1 - xx - zz; - out[7] = zy - wx; - out[2] = zx - wy; - out[5] = zy + wx; - out[8] = 1 - xx - yy; - return out; -} -/** - * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix - * - * @param {mat3} out mat3 receiving operation result - * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from - * - * @returns {mat3} out - */ - -function normalFromMat4(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; // Calculate the determinant - - var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - - if (!det) { - return null; - } - - det = 1.0 / det; - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - return out; -} -/** - * Generates a 2D projection matrix with the given bounds - * - * @param {mat3} out mat3 frustum matrix will be written into - * @param {number} width Width of your gl context - * @param {number} height Height of gl context - * @returns {mat3} out - */ - -function projection(out, width, height) { - out[0] = 2 / width; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = -2 / height; - out[5] = 0; - out[6] = -1; - out[7] = 1; - out[8] = 1; - return out; -} -/** - * Returns a string representation of a mat3 - * - * @param {ReadonlyMat3} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ - -function str(a) { - return "mat3(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ", " + a[8] + ")"; -} -/** - * Returns Frobenius norm of a mat3 - * - * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ - -function frob(a) { - return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); -} -/** - * Adds two mat3's - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @returns {mat3} out - */ - -function add(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - out[6] = a[6] + b[6]; - out[7] = a[7] + b[7]; - out[8] = a[8] + b[8]; - return out; -} -/** - * Subtracts matrix b from matrix a - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @returns {mat3} out - */ - -function subtract(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - out[6] = a[6] - b[6]; - out[7] = a[7] - b[7]; - out[8] = a[8] - b[8]; - return out; -} -/** - * Multiply each element of the matrix by a scalar. - * - * @param {mat3} out the receiving matrix - * @param {ReadonlyMat3} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat3} out - */ - -function multiplyScalar(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - out[6] = a[6] * b; - out[7] = a[7] * b; - out[8] = a[8] * b; - return out; -} -/** - * Adds two mat3's after multiplying each element of the second operand by a scalar value. - * - * @param {mat3} out the receiving vector - * @param {ReadonlyMat3} a the first operand - * @param {ReadonlyMat3} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat3} out - */ - -function multiplyScalarAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - out[6] = a[6] + b[6] * scale; - out[7] = a[7] + b[7] * scale; - out[8] = a[8] + b[8] * scale; - return out; -} -/** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {ReadonlyMat3} a The first matrix. - * @param {ReadonlyMat3} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - -function exactEquals(a, b) { - 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]; -} -/** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {ReadonlyMat3} a The first matrix. - * @param {ReadonlyMat3} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ - -function equals(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5], - a6 = a[6], - a7 = a[7], - a8 = a[8]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7], - b8 = b[8]; - 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)); -} -/** - * Alias for {@link mat3.multiply} - * @function - */ - -var mul = multiply; -/** - * Alias for {@link mat3.subtract} - * @function - */ - -var sub = subtract; - -/***/ }), -/* 17 */ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "create": () => (/* binding */ create), -/* harmony export */ "clone": () => (/* binding */ clone), -/* harmony export */ "copy": () => (/* binding */ copy), -/* harmony export */ "fromValues": () => (/* binding */ fromValues), -/* harmony export */ "set": () => (/* binding */ set), -/* harmony export */ "identity": () => (/* binding */ identity), -/* harmony export */ "transpose": () => (/* binding */ transpose), -/* harmony export */ "invert": () => (/* binding */ invert), -/* harmony export */ "adjoint": () => (/* binding */ adjoint), -/* harmony export */ "determinant": () => (/* binding */ determinant), -/* harmony export */ "multiply": () => (/* binding */ multiply), -/* harmony export */ "translate": () => (/* binding */ translate), -/* harmony export */ "scale": () => (/* binding */ scale), -/* harmony export */ "rotate": () => (/* binding */ rotate), -/* harmony export */ "rotateX": () => (/* binding */ rotateX), -/* harmony export */ "rotateY": () => (/* binding */ rotateY), -/* harmony export */ "rotateZ": () => (/* binding */ rotateZ), -/* harmony export */ "fromTranslation": () => (/* binding */ fromTranslation), -/* harmony export */ "fromScaling": () => (/* binding */ fromScaling), -/* harmony export */ "fromRotation": () => (/* binding */ fromRotation), -/* harmony export */ "fromXRotation": () => (/* binding */ fromXRotation), -/* harmony export */ "fromYRotation": () => (/* binding */ fromYRotation), -/* harmony export */ "fromZRotation": () => (/* binding */ fromZRotation), -/* harmony export */ "fromRotationTranslation": () => (/* binding */ fromRotationTranslation), -/* harmony export */ "fromQuat2": () => (/* binding */ fromQuat2), -/* harmony export */ "getTranslation": () => (/* binding */ getTranslation), -/* harmony export */ "getScaling": () => (/* binding */ getScaling), -/* harmony export */ "getRotation": () => (/* binding */ getRotation), -/* harmony export */ "fromRotationTranslationScale": () => (/* binding */ fromRotationTranslationScale), -/* harmony export */ "fromRotationTranslationScaleOrigin": () => (/* binding */ fromRotationTranslationScaleOrigin), -/* harmony export */ "fromQuat": () => (/* binding */ fromQuat), -/* harmony export */ "frustum": () => (/* binding */ frustum), -/* harmony export */ "perspective": () => (/* binding */ perspective), -/* harmony export */ "perspectiveFromFieldOfView": () => (/* binding */ perspectiveFromFieldOfView), -/* harmony export */ "ortho": () => (/* binding */ ortho), -/* harmony export */ "lookAt": () => (/* binding */ lookAt), -/* harmony export */ "targetTo": () => (/* binding */ targetTo), -/* harmony export */ "str": () => (/* binding */ str), -/* harmony export */ "frob": () => (/* binding */ frob), -/* harmony export */ "add": () => (/* binding */ add), -/* harmony export */ "subtract": () => (/* binding */ subtract), -/* harmony export */ "multiplyScalar": () => (/* binding */ multiplyScalar), -/* harmony export */ "multiplyScalarAndAdd": () => (/* binding */ multiplyScalarAndAdd), -/* harmony export */ "exactEquals": () => (/* binding */ exactEquals), -/* harmony export */ "equals": () => (/* binding */ equals), -/* harmony export */ "mul": () => (/* binding */ mul), -/* harmony export */ "sub": () => (/* binding */ sub) -/* harmony export */ }); -/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); - -/** - * 4x4 Matrix
+ * [a, b, + * c, d, + * tx, ty] + *+ * This is a short form for the 3x3 matrix: + *
+ * [a, b, 0, + * c, d, 0, + * tx, ty, 1] + *+ * The last column is ignored so the array is shorter and operations are faster. + */ + +/** + * Creates a new identity mat2d + * + * @returns {mat2d} a new 2x3 matrix + */ + +function create() { + var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(6); + + if (_common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE != Float32Array) { + out[1] = 0; + out[2] = 0; + out[4] = 0; + out[5] = 0; + } + + out[0] = 1; + out[3] = 1; + return out; +} +/** + * Creates a new mat2d initialized with values from an existing matrix + * + * @param {ReadonlyMat2d} a matrix to clone + * @returns {mat2d} a new 2x3 matrix + */ + +function clone(a) { + var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(6); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + return out; +} +/** + * Copy the values from one mat2d to another + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the source matrix + * @returns {mat2d} out + */ + +function copy(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + return out; +} +/** + * Set a mat2d to the identity matrix + * + * @param {mat2d} out the receiving matrix + * @returns {mat2d} out + */ + +function identity(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = 0; + out[5] = 0; + return out; +} +/** + * Create a new mat2d with the given values + * + * @param {Number} a Component A (index 0) + * @param {Number} b Component B (index 1) + * @param {Number} c Component C (index 2) + * @param {Number} d Component D (index 3) + * @param {Number} tx Component TX (index 4) + * @param {Number} ty Component TY (index 5) + * @returns {mat2d} A new mat2d + */ + +function fromValues(a, b, c, d, tx, ty) { + var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(6); + out[0] = a; + out[1] = b; + out[2] = c; + out[3] = d; + out[4] = tx; + out[5] = ty; + return out; +} +/** + * Set the components of a mat2d to the given values + * + * @param {mat2d} out the receiving matrix + * @param {Number} a Component A (index 0) + * @param {Number} b Component B (index 1) + * @param {Number} c Component C (index 2) + * @param {Number} d Component D (index 3) + * @param {Number} tx Component TX (index 4) + * @param {Number} ty Component TY (index 5) + * @returns {mat2d} out + */ + +function set(out, a, b, c, d, tx, ty) { + out[0] = a; + out[1] = b; + out[2] = c; + out[3] = d; + out[4] = tx; + out[5] = ty; + return out; +} +/** + * Inverts a mat2d + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the source matrix + * @returns {mat2d} out + */ + +function invert(out, a) { + var aa = a[0], + ab = a[1], + ac = a[2], + ad = a[3]; + var atx = a[4], + aty = a[5]; + var det = aa * ad - ab * ac; + + if (!det) { + return null; + } + + det = 1.0 / det; + out[0] = ad * det; + out[1] = -ab * det; + out[2] = -ac * det; + out[3] = aa * det; + out[4] = (ac * aty - ad * atx) * det; + out[5] = (ab * atx - aa * aty) * det; + return out; +} +/** + * Calculates the determinant of a mat2d + * + * @param {ReadonlyMat2d} a the source matrix + * @returns {Number} determinant of a + */ + +function determinant(a) { + return a[0] * a[3] - a[1] * a[2]; +} +/** + * Multiplies two mat2d's + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @returns {mat2d} out + */ + +function multiply(out, a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5]; + out[0] = a0 * b0 + a2 * b1; + out[1] = a1 * b0 + a3 * b1; + out[2] = a0 * b2 + a2 * b3; + out[3] = a1 * b2 + a3 * b3; + out[4] = a0 * b4 + a2 * b5 + a4; + out[5] = a1 * b4 + a3 * b5 + a5; + return out; +} +/** + * Rotates a mat2d by the given angle + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2d} out + */ + +function rotate(out, a, rad) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + var s = Math.sin(rad); + var c = Math.cos(rad); + out[0] = a0 * c + a2 * s; + out[1] = a1 * c + a3 * s; + out[2] = a0 * -s + a2 * c; + out[3] = a1 * -s + a3 * c; + out[4] = a4; + out[5] = a5; + return out; +} +/** + * Scales the mat2d by the dimensions in the given vec2 + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to translate + * @param {ReadonlyVec2} v the vec2 to scale the matrix by + * @returns {mat2d} out + **/ + +function scale(out, a, v) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + var v0 = v[0], + v1 = v[1]; + out[0] = a0 * v0; + out[1] = a1 * v0; + out[2] = a2 * v1; + out[3] = a3 * v1; + out[4] = a4; + out[5] = a5; + return out; +} +/** + * Translates the mat2d by the dimensions in the given vec2 + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to translate + * @param {ReadonlyVec2} v the vec2 to translate the matrix by + * @returns {mat2d} out + **/ + +function translate(out, a, v) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + var v0 = v[0], + v1 = v[1]; + out[0] = a0; + out[1] = a1; + out[2] = a2; + out[3] = a3; + out[4] = a0 * v0 + a2 * v1 + a4; + out[5] = a1 * v0 + a3 * v1 + a5; + return out; +} +/** + * Creates a matrix from a given angle + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.rotate(dest, dest, rad); + * + * @param {mat2d} out mat2d receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2d} out + */ + +function fromRotation(out, rad) { + var s = Math.sin(rad), + c = Math.cos(rad); + out[0] = c; + out[1] = s; + out[2] = -s; + out[3] = c; + out[4] = 0; + out[5] = 0; + return out; +} +/** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.scale(dest, dest, vec); + * + * @param {mat2d} out mat2d receiving operation result + * @param {ReadonlyVec2} v Scaling vector + * @returns {mat2d} out + */ + +function fromScaling(out, v) { + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = v[1]; + out[4] = 0; + out[5] = 0; + return out; +} +/** + * Creates a matrix from a vector translation + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.translate(dest, dest, vec); + * + * @param {mat2d} out mat2d receiving operation result + * @param {ReadonlyVec2} v Translation vector + * @returns {mat2d} out + */ + +function fromTranslation(out, v) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 1; + out[4] = v[0]; + out[5] = v[1]; + return out; +} +/** + * Returns a string representation of a mat2d + * + * @param {ReadonlyMat2d} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ + +function str(a) { + return "mat2d(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")"; +} +/** + * Returns Frobenius norm of a mat2d + * + * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ + +function frob(a) { + return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); +} +/** + * Adds two mat2d's + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @returns {mat2d} out + */ + +function add(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + return out; +} +/** + * Subtracts matrix b from matrix a + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @returns {mat2d} out + */ + +function subtract(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + out[4] = a[4] - b[4]; + out[5] = a[5] - b[5]; + return out; +} +/** + * Multiply each element of the matrix by a scalar. + * + * @param {mat2d} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to scale + * @param {Number} b amount to scale the matrix's elements by + * @returns {mat2d} out + */ + +function multiplyScalar(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + return out; +} +/** + * Adds two mat2d's after multiplying each element of the second operand by a scalar value. + * + * @param {mat2d} out the receiving vector + * @param {ReadonlyMat2d} a the first operand + * @param {ReadonlyMat2d} b the second operand + * @param {Number} scale the amount to scale b's elements by before adding + * @returns {mat2d} out + */ + +function multiplyScalarAndAdd(out, a, b, scale) { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + out[4] = a[4] + b[4] * scale; + out[5] = a[5] + b[5] * scale; + return out; +} +/** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyMat2d} a The first matrix. + * @param {ReadonlyMat2d} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + +function exactEquals(a, b) { + 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]; +} +/** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {ReadonlyMat2d} a The first matrix. + * @param {ReadonlyMat2d} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + +function equals(a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5]; + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5]; + 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)); +} +/** + * Alias for {@link mat2d.multiply} + * @function + */ + +var mul = multiply; +/** + * Alias for {@link mat2d.subtract} + * @function + */ + +var sub = subtract; + +/***/ }), +/* 11 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "create": () => (/* binding */ create), +/* harmony export */ "fromMat4": () => (/* binding */ fromMat4), +/* harmony export */ "clone": () => (/* binding */ clone), +/* harmony export */ "copy": () => (/* binding */ copy), +/* harmony export */ "fromValues": () => (/* binding */ fromValues), +/* harmony export */ "set": () => (/* binding */ set), +/* harmony export */ "identity": () => (/* binding */ identity), +/* harmony export */ "transpose": () => (/* binding */ transpose), +/* harmony export */ "invert": () => (/* binding */ invert), +/* harmony export */ "adjoint": () => (/* binding */ adjoint), +/* harmony export */ "determinant": () => (/* binding */ determinant), +/* harmony export */ "multiply": () => (/* binding */ multiply), +/* harmony export */ "translate": () => (/* binding */ translate), +/* harmony export */ "rotate": () => (/* binding */ rotate), +/* harmony export */ "scale": () => (/* binding */ scale), +/* harmony export */ "fromTranslation": () => (/* binding */ fromTranslation), +/* harmony export */ "fromRotation": () => (/* binding */ fromRotation), +/* harmony export */ "fromScaling": () => (/* binding */ fromScaling), +/* harmony export */ "fromMat2d": () => (/* binding */ fromMat2d), +/* harmony export */ "fromQuat": () => (/* binding */ fromQuat), +/* harmony export */ "normalFromMat4": () => (/* binding */ normalFromMat4), +/* harmony export */ "projection": () => (/* binding */ projection), +/* harmony export */ "str": () => (/* binding */ str), +/* harmony export */ "frob": () => (/* binding */ frob), +/* harmony export */ "add": () => (/* binding */ add), +/* harmony export */ "subtract": () => (/* binding */ subtract), +/* harmony export */ "multiplyScalar": () => (/* binding */ multiplyScalar), +/* harmony export */ "multiplyScalarAndAdd": () => (/* binding */ multiplyScalarAndAdd), +/* harmony export */ "exactEquals": () => (/* binding */ exactEquals), +/* harmony export */ "equals": () => (/* binding */ equals), +/* harmony export */ "mul": () => (/* binding */ mul), +/* harmony export */ "sub": () => (/* binding */ sub) +/* harmony export */ }); +/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8); + +/** + * 3x3 Matrix + * @module mat3 + */ + +/** + * Creates a new identity mat3 + * + * @returns {mat3} a new 3x3 matrix + */ + +function create() { + var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(9); + + if (_common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE != Float32Array) { + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[5] = 0; + out[6] = 0; + out[7] = 0; + } + + out[0] = 1; + out[4] = 1; + out[8] = 1; + return out; +} +/** + * Copies the upper-left 3x3 values into the given mat3. + * + * @param {mat3} out the receiving 3x3 matrix + * @param {ReadonlyMat4} a the source 4x4 matrix + * @returns {mat3} out + */ + +function fromMat4(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[4]; + out[4] = a[5]; + out[5] = a[6]; + out[6] = a[8]; + out[7] = a[9]; + out[8] = a[10]; + return out; +} +/** + * Creates a new mat3 initialized with values from an existing matrix + * + * @param {ReadonlyMat3} a matrix to clone + * @returns {mat3} a new 3x3 matrix + */ + +function clone(a) { + var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(9); + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; +} +/** + * Copy the values from one mat3 to another + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ + +function copy(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; +} +/** + * Create a new mat3 with the given values + * + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m02 Component in column 0, row 2 position (index 2) + * @param {Number} m10 Component in column 1, row 0 position (index 3) + * @param {Number} m11 Component in column 1, row 1 position (index 4) + * @param {Number} m12 Component in column 1, row 2 position (index 5) + * @param {Number} m20 Component in column 2, row 0 position (index 6) + * @param {Number} m21 Component in column 2, row 1 position (index 7) + * @param {Number} m22 Component in column 2, row 2 position (index 8) + * @returns {mat3} A new mat3 + */ + +function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) { + var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__.ARRAY_TYPE(9); + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m10; + out[4] = m11; + out[5] = m12; + out[6] = m20; + out[7] = m21; + out[8] = m22; + return out; +} +/** + * Set the components of a mat3 to the given values + * + * @param {mat3} out the receiving matrix + * @param {Number} m00 Component in column 0, row 0 position (index 0) + * @param {Number} m01 Component in column 0, row 1 position (index 1) + * @param {Number} m02 Component in column 0, row 2 position (index 2) + * @param {Number} m10 Component in column 1, row 0 position (index 3) + * @param {Number} m11 Component in column 1, row 1 position (index 4) + * @param {Number} m12 Component in column 1, row 2 position (index 5) + * @param {Number} m20 Component in column 2, row 0 position (index 6) + * @param {Number} m21 Component in column 2, row 1 position (index 7) + * @param {Number} m22 Component in column 2, row 2 position (index 8) + * @returns {mat3} out + */ + +function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) { + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m10; + out[4] = m11; + out[5] = m12; + out[6] = m20; + out[7] = m21; + out[8] = m22; + return out; +} +/** + * Set a mat3 to the identity matrix + * + * @param {mat3} out the receiving matrix + * @returns {mat3} out + */ + +function identity(out) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 1; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; +} +/** + * Transpose the values of a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ + +function transpose(out, a) { + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + var a01 = a[1], + a02 = a[2], + a12 = a[5]; + out[1] = a[3]; + out[2] = a[6]; + out[3] = a01; + out[5] = a[7]; + out[6] = a02; + out[7] = a12; + } else { + out[0] = a[0]; + out[1] = a[3]; + out[2] = a[6]; + out[3] = a[1]; + out[4] = a[4]; + out[5] = a[7]; + out[6] = a[2]; + out[7] = a[5]; + out[8] = a[8]; + } + + return out; +} +/** + * Inverts a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ + +function invert(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2]; + var a10 = a[3], + a11 = a[4], + a12 = a[5]; + var a20 = a[6], + a21 = a[7], + a22 = a[8]; + var b01 = a22 * a11 - a12 * a21; + var b11 = -a22 * a10 + a12 * a20; + var b21 = a21 * a10 - a11 * a20; // Calculate the determinant + + var det = a00 * b01 + a01 * b11 + a02 * b21; + + if (!det) { + return null; + } + + det = 1.0 / det; + out[0] = b01 * det; + out[1] = (-a22 * a01 + a02 * a21) * det; + out[2] = (a12 * a01 - a02 * a11) * det; + out[3] = b11 * det; + out[4] = (a22 * a00 - a02 * a20) * det; + out[5] = (-a12 * a00 + a02 * a10) * det; + out[6] = b21 * det; + out[7] = (-a21 * a00 + a01 * a20) * det; + out[8] = (a11 * a00 - a01 * a10) * det; + return out; +} +/** + * Calculates the adjugate of a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the source matrix + * @returns {mat3} out + */ + +function adjoint(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2]; + var a10 = a[3], + a11 = a[4], + a12 = a[5]; + var a20 = a[6], + a21 = a[7], + a22 = a[8]; + out[0] = a11 * a22 - a12 * a21; + out[1] = a02 * a21 - a01 * a22; + out[2] = a01 * a12 - a02 * a11; + out[3] = a12 * a20 - a10 * a22; + out[4] = a00 * a22 - a02 * a20; + out[5] = a02 * a10 - a00 * a12; + out[6] = a10 * a21 - a11 * a20; + out[7] = a01 * a20 - a00 * a21; + out[8] = a00 * a11 - a01 * a10; + return out; +} +/** + * Calculates the determinant of a mat3 + * + * @param {ReadonlyMat3} a the source matrix + * @returns {Number} determinant of a + */ + +function determinant(a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2]; + var a10 = a[3], + a11 = a[4], + a12 = a[5]; + var a20 = a[6], + a21 = a[7], + a22 = a[8]; + return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20); +} +/** + * Multiplies two mat3's + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @returns {mat3} out + */ + +function multiply(out, a, b) { + var a00 = a[0], + a01 = a[1], + a02 = a[2]; + var a10 = a[3], + a11 = a[4], + a12 = a[5]; + var a20 = a[6], + a21 = a[7], + a22 = a[8]; + var b00 = b[0], + b01 = b[1], + b02 = b[2]; + var b10 = b[3], + b11 = b[4], + b12 = b[5]; + var b20 = b[6], + b21 = b[7], + b22 = b[8]; + out[0] = b00 * a00 + b01 * a10 + b02 * a20; + out[1] = b00 * a01 + b01 * a11 + b02 * a21; + out[2] = b00 * a02 + b01 * a12 + b02 * a22; + out[3] = b10 * a00 + b11 * a10 + b12 * a20; + out[4] = b10 * a01 + b11 * a11 + b12 * a21; + out[5] = b10 * a02 + b11 * a12 + b12 * a22; + out[6] = b20 * a00 + b21 * a10 + b22 * a20; + out[7] = b20 * a01 + b21 * a11 + b22 * a21; + out[8] = b20 * a02 + b21 * a12 + b22 * a22; + return out; +} +/** + * Translate a mat3 by the given vector + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to translate + * @param {ReadonlyVec2} v vector to translate by + * @returns {mat3} out + */ + +function translate(out, a, v) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8], + x = v[0], + y = v[1]; + out[0] = a00; + out[1] = a01; + out[2] = a02; + out[3] = a10; + out[4] = a11; + out[5] = a12; + out[6] = x * a00 + y * a10 + a20; + out[7] = x * a01 + y * a11 + a21; + out[8] = x * a02 + y * a12 + a22; + return out; +} +/** + * Rotates a mat3 by the given angle + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat3} out + */ + +function rotate(out, a, rad) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8], + s = Math.sin(rad), + c = Math.cos(rad); + out[0] = c * a00 + s * a10; + out[1] = c * a01 + s * a11; + out[2] = c * a02 + s * a12; + out[3] = c * a10 - s * a00; + out[4] = c * a11 - s * a01; + out[5] = c * a12 - s * a02; + out[6] = a20; + out[7] = a21; + out[8] = a22; + return out; +} +/** + * Scales the mat3 by the dimensions in the given vec2 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to rotate + * @param {ReadonlyVec2} v the vec2 to scale the matrix by + * @returns {mat3} out + **/ + +function scale(out, a, v) { + var x = v[0], + y = v[1]; + out[0] = x * a[0]; + out[1] = x * a[1]; + out[2] = x * a[2]; + out[3] = y * a[3]; + out[4] = y * a[4]; + out[5] = y * a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + return out; +} +/** + * Creates a matrix from a vector translation + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.translate(dest, dest, vec); + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyVec2} v Translation vector + * @returns {mat3} out + */ + +function fromTranslation(out, v) { + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 1; + out[5] = 0; + out[6] = v[0]; + out[7] = v[1]; + out[8] = 1; + return out; +} +/** + * Creates a matrix from a given angle + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.rotate(dest, dest, rad); + * + * @param {mat3} out mat3 receiving operation result + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat3} out + */ + +function fromRotation(out, rad) { + var s = Math.sin(rad), + c = Math.cos(rad); + out[0] = c; + out[1] = s; + out[2] = 0; + out[3] = -s; + out[4] = c; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; +} +/** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.scale(dest, dest, vec); + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyVec2} v Scaling vector + * @returns {mat3} out + */ + +function fromScaling(out, v) { + out[0] = v[0]; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = v[1]; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + return out; +} +/** + * Copies the values from a mat2d into a mat3 + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat2d} a the matrix to copy + * @returns {mat3} out + **/ + +function fromMat2d(out, a) { + out[0] = a[0]; + out[1] = a[1]; + out[2] = 0; + out[3] = a[2]; + out[4] = a[3]; + out[5] = 0; + out[6] = a[4]; + out[7] = a[5]; + out[8] = 1; + return out; +} +/** + * Calculates a 3x3 matrix from the given quaternion + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyQuat} q Quaternion to create matrix from + * + * @returns {mat3} out + */ + +function fromQuat(out, q) { + var x = q[0], + y = q[1], + z = q[2], + w = q[3]; + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + var xx = x * x2; + var yx = y * x2; + var yy = y * y2; + var zx = z * x2; + var zy = z * y2; + var zz = z * z2; + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + out[0] = 1 - yy - zz; + out[3] = yx - wz; + out[6] = zx + wy; + out[1] = yx + wz; + out[4] = 1 - xx - zz; + out[7] = zy - wx; + out[2] = zx - wy; + out[5] = zy + wx; + out[8] = 1 - xx - yy; + return out; +} +/** + * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix + * + * @param {mat3} out mat3 receiving operation result + * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from + * + * @returns {mat3} out + */ + +function normalFromMat4(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3]; + var a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7]; + var a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11]; + var a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15]; + var b00 = a00 * a11 - a01 * a10; + var b01 = a00 * a12 - a02 * a10; + var b02 = a00 * a13 - a03 * a10; + var b03 = a01 * a12 - a02 * a11; + var b04 = a01 * a13 - a03 * a11; + var b05 = a02 * a13 - a03 * a12; + var b06 = a20 * a31 - a21 * a30; + var b07 = a20 * a32 - a22 * a30; + var b08 = a20 * a33 - a23 * a30; + var b09 = a21 * a32 - a22 * a31; + var b10 = a21 * a33 - a23 * a31; + var b11 = a22 * a33 - a23 * a32; // Calculate the determinant + + var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + + if (!det) { + return null; + } + + det = 1.0 / det; + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; + out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; + out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; + out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; + out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; + out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; + out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; + return out; +} +/** + * Generates a 2D projection matrix with the given bounds + * + * @param {mat3} out mat3 frustum matrix will be written into + * @param {number} width Width of your gl context + * @param {number} height Height of gl context + * @returns {mat3} out + */ + +function projection(out, width, height) { + out[0] = 2 / width; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = -2 / height; + out[5] = 0; + out[6] = -1; + out[7] = 1; + out[8] = 1; + return out; +} +/** + * Returns a string representation of a mat3 + * + * @param {ReadonlyMat3} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ + +function str(a) { + return "mat3(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ", " + a[8] + ")"; +} +/** + * Returns Frobenius norm of a mat3 + * + * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ + +function frob(a) { + return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); +} +/** + * Adds two mat3's + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @returns {mat3} out + */ + +function add(out, a, b) { + out[0] = a[0] + b[0]; + out[1] = a[1] + b[1]; + out[2] = a[2] + b[2]; + out[3] = a[3] + b[3]; + out[4] = a[4] + b[4]; + out[5] = a[5] + b[5]; + out[6] = a[6] + b[6]; + out[7] = a[7] + b[7]; + out[8] = a[8] + b[8]; + return out; +} +/** + * Subtracts matrix b from matrix a + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @returns {mat3} out + */ + +function subtract(out, a, b) { + out[0] = a[0] - b[0]; + out[1] = a[1] - b[1]; + out[2] = a[2] - b[2]; + out[3] = a[3] - b[3]; + out[4] = a[4] - b[4]; + out[5] = a[5] - b[5]; + out[6] = a[6] - b[6]; + out[7] = a[7] - b[7]; + out[8] = a[8] - b[8]; + return out; +} +/** + * Multiply each element of the matrix by a scalar. + * + * @param {mat3} out the receiving matrix + * @param {ReadonlyMat3} a the matrix to scale + * @param {Number} b amount to scale the matrix's elements by + * @returns {mat3} out + */ + +function multiplyScalar(out, a, b) { + out[0] = a[0] * b; + out[1] = a[1] * b; + out[2] = a[2] * b; + out[3] = a[3] * b; + out[4] = a[4] * b; + out[5] = a[5] * b; + out[6] = a[6] * b; + out[7] = a[7] * b; + out[8] = a[8] * b; + return out; +} +/** + * Adds two mat3's after multiplying each element of the second operand by a scalar value. + * + * @param {mat3} out the receiving vector + * @param {ReadonlyMat3} a the first operand + * @param {ReadonlyMat3} b the second operand + * @param {Number} scale the amount to scale b's elements by before adding + * @returns {mat3} out + */ + +function multiplyScalarAndAdd(out, a, b, scale) { + out[0] = a[0] + b[0] * scale; + out[1] = a[1] + b[1] * scale; + out[2] = a[2] + b[2] * scale; + out[3] = a[3] + b[3] * scale; + out[4] = a[4] + b[4] * scale; + out[5] = a[5] + b[5] * scale; + out[6] = a[6] + b[6] * scale; + out[7] = a[7] + b[7] * scale; + out[8] = a[8] + b[8] * scale; + return out; +} +/** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {ReadonlyMat3} a The first matrix. + * @param {ReadonlyMat3} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + +function exactEquals(a, b) { + 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]; +} +/** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {ReadonlyMat3} a The first matrix. + * @param {ReadonlyMat3} b The second matrix. + * @returns {Boolean} True if the matrices are equal, false otherwise. + */ + +function equals(a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5], + a6 = a[6], + a7 = a[7], + a8 = a[8]; + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7], + b8 = b[8]; + 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)); +} +/** + * Alias for {@link mat3.multiply} + * @function + */ + +var mul = multiply; +/** + * Alias for {@link mat3.subtract} + * @function + */ + +var sub = subtract; + +/***/ }), +/* 12 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "create": () => (/* binding */ create), +/* harmony export */ "clone": () => (/* binding */ clone), +/* harmony export */ "copy": () => (/* binding */ copy), +/* harmony export */ "fromValues": () => (/* binding */ fromValues), +/* harmony export */ "set": () => (/* binding */ set), +/* harmony export */ "identity": () => (/* binding */ identity), +/* harmony export */ "transpose": () => (/* binding */ transpose), +/* harmony export */ "invert": () => (/* binding */ invert), +/* harmony export */ "adjoint": () => (/* binding */ adjoint), +/* harmony export */ "determinant": () => (/* binding */ determinant), +/* harmony export */ "multiply": () => (/* binding */ multiply), +/* harmony export */ "translate": () => (/* binding */ translate), +/* harmony export */ "scale": () => (/* binding */ scale), +/* harmony export */ "rotate": () => (/* binding */ rotate), +/* harmony export */ "rotateX": () => (/* binding */ rotateX), +/* harmony export */ "rotateY": () => (/* binding */ rotateY), +/* harmony export */ "rotateZ": () => (/* binding */ rotateZ), +/* harmony export */ "fromTranslation": () => (/* binding */ fromTranslation), +/* harmony export */ "fromScaling": () => (/* binding */ fromScaling), +/* harmony export */ "fromRotation": () => (/* binding */ fromRotation), +/* harmony export */ "fromXRotation": () => (/* binding */ fromXRotation), +/* harmony export */ "fromYRotation": () => (/* binding */ fromYRotation), +/* harmony export */ "fromZRotation": () => (/* binding */ fromZRotation), +/* harmony export */ "fromRotationTranslation": () => (/* binding */ fromRotationTranslation), +/* harmony export */ "fromQuat2": () => (/* binding */ fromQuat2), +/* harmony export */ "getTranslation": () => (/* binding */ getTranslation), +/* harmony export */ "getScaling": () => (/* binding */ getScaling), +/* harmony export */ "getRotation": () => (/* binding */ getRotation), +/* harmony export */ "fromRotationTranslationScale": () => (/* binding */ fromRotationTranslationScale), +/* harmony export */ "fromRotationTranslationScaleOrigin": () => (/* binding */ fromRotationTranslationScaleOrigin), +/* harmony export */ "fromQuat": () => (/* binding */ fromQuat), +/* harmony export */ "frustum": () => (/* binding */ frustum), +/* harmony export */ "perspective": () => (/* binding */ perspective), +/* harmony export */ "perspectiveFromFieldOfView": () => (/* binding */ perspectiveFromFieldOfView), +/* harmony export */ "ortho": () => (/* binding */ ortho), +/* harmony export */ "lookAt": () => (/* binding */ lookAt), +/* harmony export */ "targetTo": () => (/* binding */ targetTo), +/* harmony export */ "str": () => (/* binding */ str), +/* harmony export */ "frob": () => (/* binding */ frob), +/* harmony export */ "add": () => (/* binding */ add), +/* harmony export */ "subtract": () => (/* binding */ subtract), +/* harmony export */ "multiplyScalar": () => (/* binding */ multiplyScalar), +/* harmony export */ "multiplyScalarAndAdd": () => (/* binding */ multiplyScalarAndAdd), +/* harmony export */ "exactEquals": () => (/* binding */ exactEquals), +/* harmony export */ "equals": () => (/* binding */ equals), +/* harmony export */ "mul": () => (/* binding */ mul), +/* harmony export */ "sub": () => (/* binding */ sub) +/* harmony export */ }); +/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8); + +/** + * 4x4 Matrix
\r\n * [a, b,\r\n * c, d,\r\n * tx, ty]\r\n *\r\n * This is a short form for the 3x3 matrix:\r\n *
\r\n * [a, b, 0,\r\n * c, d, 0,\r\n * tx, ty, 1]\r\n *\r\n * The last column is ignored so the array is shorter and operations are faster.\r\n */\n\n/**\r\n * Creates a new identity mat2d\r\n *\r\n * @returns {mat2d} a new 2x3 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(6);\n\n if (glMatrix.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/**\r\n * Creates a new mat2d initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat2d} a matrix to clone\r\n * @returns {mat2d} a new 2x3 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.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/**\r\n * Copy the values from one mat2d to another\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the source matrix\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Set a mat2d to the identity matrix\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Create a new mat2d with the given values\r\n *\r\n * @param {Number} a Component A (index 0)\r\n * @param {Number} b Component B (index 1)\r\n * @param {Number} c Component C (index 2)\r\n * @param {Number} d Component D (index 3)\r\n * @param {Number} tx Component TX (index 4)\r\n * @param {Number} ty Component TY (index 5)\r\n * @returns {mat2d} A new mat2d\r\n */\n\nexport function fromValues(a, b, c, d, tx, ty) {\n var out = new glMatrix.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/**\r\n * Set the components of a mat2d to the given values\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {Number} a Component A (index 0)\r\n * @param {Number} b Component B (index 1)\r\n * @param {Number} c Component C (index 2)\r\n * @param {Number} d Component D (index 3)\r\n * @param {Number} tx Component TX (index 4)\r\n * @param {Number} ty Component TY (index 5)\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Inverts a mat2d\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the source matrix\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Calculates the determinant of a mat2d\r\n *\r\n * @param {ReadonlyMat2d} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n return a[0] * a[3] - a[1] * a[2];\n}\n/**\r\n * Multiplies two mat2d's\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the first operand\r\n * @param {ReadonlyMat2d} b the second operand\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Rotates a mat2d by the given angle\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Scales the mat2d by the dimensions in the given vec2\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to translate\r\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\r\n * @returns {mat2d} out\r\n **/\n\nexport function 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/**\r\n * Translates the mat2d by the dimensions in the given vec2\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to translate\r\n * @param {ReadonlyVec2} v the vec2 to translate the matrix by\r\n * @returns {mat2d} out\r\n **/\n\nexport function 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/**\r\n * Creates a matrix from a given angle\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat2d.identity(dest);\r\n * mat2d.rotate(dest, dest, rad);\r\n *\r\n * @param {mat2d} out mat2d receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat2d.identity(dest);\r\n * mat2d.scale(dest, dest, vec);\r\n *\r\n * @param {mat2d} out mat2d receiving operation result\r\n * @param {ReadonlyVec2} v Scaling vector\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat2d.identity(dest);\r\n * mat2d.translate(dest, dest, vec);\r\n *\r\n * @param {mat2d} out mat2d receiving operation result\r\n * @param {ReadonlyVec2} v Translation vector\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Returns a string representation of a mat2d\r\n *\r\n * @param {ReadonlyMat2d} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return \"mat2d(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat2d\r\n *\r\n * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);\n}\n/**\r\n * Adds two mat2d's\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the first operand\r\n * @param {ReadonlyMat2d} b the second operand\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the first operand\r\n * @param {ReadonlyMat2d} b the second operand\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Adds two mat2d's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat2d} out the receiving vector\r\n * @param {ReadonlyMat2d} a the first operand\r\n * @param {ReadonlyMat2d} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat2d} a The first matrix.\r\n * @param {ReadonlyMat2d} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function 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/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat2d} a The first matrix.\r\n * @param {ReadonlyMat2d} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function 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) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5));\n}\n/**\r\n * Alias for {@link mat2d.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat2d.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\r\n * 3x3 Matrix\r\n * @module mat3\r\n */\n\n/**\r\n * Creates a new identity mat3\r\n *\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(9);\n\n if (glMatrix.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/**\r\n * Copies the upper-left 3x3 values into the given mat3.\r\n *\r\n * @param {mat3} out the receiving 3x3 matrix\r\n * @param {ReadonlyMat4} a the source 4x4 matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Creates a new mat3 initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat3} a matrix to clone\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.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/**\r\n * Copy the values from one mat3 to another\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Create a new mat3 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} A new mat3\r\n */\n\nexport function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new glMatrix.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/**\r\n * Set the components of a mat3 to the given values\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Set a mat3 to the identity matrix\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Transpose the values of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Inverts a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Calculates the adjugate of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Calculates the determinant of a mat3\r\n *\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function 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/**\r\n * Multiplies two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Translate a mat3 by the given vector\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to translate\r\n * @param {ReadonlyVec2} v vector to translate by\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Rotates a mat3 by the given angle\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Scales the mat3 by the dimensions in the given vec2\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to rotate\r\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\r\n * @returns {mat3} out\r\n **/\n\nexport function 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/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.translate(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyVec2} v Translation vector\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Creates a matrix from a given angle\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.rotate(dest, dest, rad);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.scale(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyVec2} v Scaling vector\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Copies the values from a mat2d into a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to copy\r\n * @returns {mat3} out\r\n **/\n\nexport function 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/**\r\n * Calculates a 3x3 matrix from the given quaternion\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyQuat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from\r\n *\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Generates a 2D projection matrix with the given bounds\r\n *\r\n * @param {mat3} out mat3 frustum matrix will be written into\r\n * @param {number} width Width of your gl context\r\n * @param {number} height Height of gl context\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Returns a string representation of a mat3\r\n *\r\n * @param {ReadonlyMat3} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function 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/**\r\n * Returns Frobenius norm of a mat3\r\n *\r\n * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function 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/**\r\n * Adds two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat3} out the receiving vector\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat3} a The first matrix.\r\n * @param {ReadonlyMat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function 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/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat3} a The first matrix.\r\n * @param {ReadonlyMat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function 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) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n}\n/**\r\n * Alias for {@link mat3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\r\n * 4x4 Matrix
\r\n * [a, b,\r\n * c, d,\r\n * tx, ty]\r\n *\r\n * This is a short form for the 3x3 matrix:\r\n *
\r\n * [a, b, 0,\r\n * c, d, 0,\r\n * tx, ty, 1]\r\n *\r\n * The last column is ignored so the array is shorter and operations are faster.\r\n */\n\n/**\r\n * Creates a new identity mat2d\r\n *\r\n * @returns {mat2d} a new 2x3 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(6);\n\n if (glMatrix.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/**\r\n * Creates a new mat2d initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat2d} a matrix to clone\r\n * @returns {mat2d} a new 2x3 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.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/**\r\n * Copy the values from one mat2d to another\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the source matrix\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Set a mat2d to the identity matrix\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Create a new mat2d with the given values\r\n *\r\n * @param {Number} a Component A (index 0)\r\n * @param {Number} b Component B (index 1)\r\n * @param {Number} c Component C (index 2)\r\n * @param {Number} d Component D (index 3)\r\n * @param {Number} tx Component TX (index 4)\r\n * @param {Number} ty Component TY (index 5)\r\n * @returns {mat2d} A new mat2d\r\n */\n\nexport function fromValues(a, b, c, d, tx, ty) {\n var out = new glMatrix.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/**\r\n * Set the components of a mat2d to the given values\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {Number} a Component A (index 0)\r\n * @param {Number} b Component B (index 1)\r\n * @param {Number} c Component C (index 2)\r\n * @param {Number} d Component D (index 3)\r\n * @param {Number} tx Component TX (index 4)\r\n * @param {Number} ty Component TY (index 5)\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Inverts a mat2d\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the source matrix\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Calculates the determinant of a mat2d\r\n *\r\n * @param {ReadonlyMat2d} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n return a[0] * a[3] - a[1] * a[2];\n}\n/**\r\n * Multiplies two mat2d's\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the first operand\r\n * @param {ReadonlyMat2d} b the second operand\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Rotates a mat2d by the given angle\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Scales the mat2d by the dimensions in the given vec2\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to translate\r\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\r\n * @returns {mat2d} out\r\n **/\n\nexport function 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/**\r\n * Translates the mat2d by the dimensions in the given vec2\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to translate\r\n * @param {ReadonlyVec2} v the vec2 to translate the matrix by\r\n * @returns {mat2d} out\r\n **/\n\nexport function 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/**\r\n * Creates a matrix from a given angle\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat2d.identity(dest);\r\n * mat2d.rotate(dest, dest, rad);\r\n *\r\n * @param {mat2d} out mat2d receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat2d.identity(dest);\r\n * mat2d.scale(dest, dest, vec);\r\n *\r\n * @param {mat2d} out mat2d receiving operation result\r\n * @param {ReadonlyVec2} v Scaling vector\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat2d.identity(dest);\r\n * mat2d.translate(dest, dest, vec);\r\n *\r\n * @param {mat2d} out mat2d receiving operation result\r\n * @param {ReadonlyVec2} v Translation vector\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Returns a string representation of a mat2d\r\n *\r\n * @param {ReadonlyMat2d} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return \"mat2d(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat2d\r\n *\r\n * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);\n}\n/**\r\n * Adds two mat2d's\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the first operand\r\n * @param {ReadonlyMat2d} b the second operand\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the first operand\r\n * @param {ReadonlyMat2d} b the second operand\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat2d} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Adds two mat2d's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat2d} out the receiving vector\r\n * @param {ReadonlyMat2d} a the first operand\r\n * @param {ReadonlyMat2d} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat2d} out\r\n */\n\nexport function 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/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat2d} a The first matrix.\r\n * @param {ReadonlyMat2d} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function 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/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat2d} a The first matrix.\r\n * @param {ReadonlyMat2d} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function 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) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5));\n}\n/**\r\n * Alias for {@link mat2d.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat2d.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\r\n * 3x3 Matrix\r\n * @module mat3\r\n */\n\n/**\r\n * Creates a new identity mat3\r\n *\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(9);\n\n if (glMatrix.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/**\r\n * Copies the upper-left 3x3 values into the given mat3.\r\n *\r\n * @param {mat3} out the receiving 3x3 matrix\r\n * @param {ReadonlyMat4} a the source 4x4 matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Creates a new mat3 initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat3} a matrix to clone\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.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/**\r\n * Copy the values from one mat3 to another\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Create a new mat3 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} A new mat3\r\n */\n\nexport function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new glMatrix.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/**\r\n * Set the components of a mat3 to the given values\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Set a mat3 to the identity matrix\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Transpose the values of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Inverts a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Calculates the adjugate of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Calculates the determinant of a mat3\r\n *\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function 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/**\r\n * Multiplies two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Translate a mat3 by the given vector\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to translate\r\n * @param {ReadonlyVec2} v vector to translate by\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Rotates a mat3 by the given angle\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Scales the mat3 by the dimensions in the given vec2\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to rotate\r\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\r\n * @returns {mat3} out\r\n **/\n\nexport function 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/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.translate(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyVec2} v Translation vector\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Creates a matrix from a given angle\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.rotate(dest, dest, rad);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.scale(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyVec2} v Scaling vector\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Copies the values from a mat2d into a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to copy\r\n * @returns {mat3} out\r\n **/\n\nexport function 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/**\r\n * Calculates a 3x3 matrix from the given quaternion\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyQuat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from\r\n *\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Generates a 2D projection matrix with the given bounds\r\n *\r\n * @param {mat3} out mat3 frustum matrix will be written into\r\n * @param {number} width Width of your gl context\r\n * @param {number} height Height of gl context\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Returns a string representation of a mat3\r\n *\r\n * @param {ReadonlyMat3} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function 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/**\r\n * Returns Frobenius norm of a mat3\r\n *\r\n * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function 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/**\r\n * Adds two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat3} out the receiving vector\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat3} out\r\n */\n\nexport function 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/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat3} a The first matrix.\r\n * @param {ReadonlyMat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function 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/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat3} a The first matrix.\r\n * @param {ReadonlyMat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function 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) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n}\n/**\r\n * Alias for {@link mat3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\r\n * 4x4 Matrix
>>19;return function(){return r=Math.imul(r^r>>>16,2246822507),r=Math.imul(r^r>>>13,3266489909),(r^=r>>>16)>>>0}}(i);c[i]=(a=t(),o=t(),s=t(),h=t(),function(){let t=(a>>>=0)+(o>>>=0)|0;return a=o^o>>>9,o=(s>>>=0)+(s<<3)|0,t=t+(h=1+(h>>>=0)|0)|0,s=(s=s<<21|s>>>11)+t|0,(t>>>0)/4294967296})}var a,o,s,h;const u=e+c[i]()*(r-e);return void 0!==n?Math.round(u*10**n)/10**n:u},e.angleFromRepetition=function(t,e=[0,0]){if(t.type===i.ERepetitionType.Matrix){const r=[(t.col.count-1)/2,(t.row.count-1)/2];r[0]+=r[0]*e[0],r[1]+=r[1]*e[1];const n=t.col.index-1-r[0],i=t.row.index-1-r[1];return 0===n?0:Math.atan(i/n)}return(t.angle-Math.PI)/2},e.angle2FromRepetition=function(t,e=[0,0]){if(t.type===i.ERepetitionType.Matrix){const r=[(t.col.count-1)/2,(t.row.count-1)/2];r[0]+=r[0]*e[0],r[1]+=r[1]*e[1];const n=t.col.index-1-r[0],i=t.row.index-1-r[1];return 0===n?0:Math.atan2(i,n)}return t.angle-Math.PI},e.distanceFromRepetition=function(t,e=[0,0]){if(t.type===i.ERepetitionType.Matrix){const r=[.5,.5];r[0]+=r[0]*e[0],r[1]+=r[1]*e[1];const n=[t.col.offset,t.row.offset];return a.default.distance(n,r)}return 1},e.prepareBufferForInterpolation=u,e.interpolate=function(t,e,r=.5){const[n,i]=u(t,e),a=Math.max(n.length,i.length),o="number"==typeof r?[r]:r,s=a/2;if(o.length!==s){const t=o.length;for(let e=0;e 1?e/(r-1):1,c=i.summmation(e,m)*p,g=e-1,b=0===g?0:i.summmation(g,m)*p;for(let i=0,g=m**e;i {Object.defineProperty(e,"__esModule",{value:!0}),e.Circle=void 0;const n=r(3792),i=r(6951);class a extends i.ShapeLoop{constructor(t={}){t.type="Circle",super(t,!0),this.loop={start:0,end:n.PI2,inc:t=>{const e=this.getRepetitionSideLength(t);return 1/Math.pow(e[0]*e[1],.25)*i.ShapeLoop.PId2},vertex:t=>[Math.cos(t.current),Math.sin(t.current)]},this.bStaticLoop=this.isStaticLoop(),this.bStatic=this.isStatic(),this.bStaticIndexed=this.isStaticIndexed()}}e.Circle=a},6329:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Line=void 0;const n=r(5511),i=r(7439);class a extends i.ShapeBuffer{constructor(t={}){t.type="Line",t.shape=a.buffer,t.adaptMode=n.EAdaptMode.None,t.bClosed=!1,super(t)}static toPolygon(t,e){const r=[];if(!Array.isArray(e)){const r=e,n=t.length/2;e=new Array(n);for(let t=0;t k?q++:L++,R>E?q++:T++,R>F?q++:j++,k>E?L++:T++,k>F?L++:j++,E>F?T++:j++;var D=R-(l=q>=3?1:0)+h,z=k-(f=L>=3?1:0)+h,V=E-(d=T>=3?1:0)+h,U=F-(p=j>=3?1:0)+h,Y=R-(g=q>=2?1:0)+2*h,H=k-(m=L>=2?1:0)+2*h,Z=E-(v=T>=2?1:0)+2*h,N=F-(M=j>=2?1:0)+2*h,X=R-(b=q>=1?1:0)+3*h,G=k-(y=L>=1?1:0)+3*h,$=E-(x=T>=1?1:0)+3*h,W=F-(w=j>=1?1:0)+3*h,Q=R-1+4*h,J=k-1+4*h,K=E-1+4*h,tt=F-1+4*h,et=255&_,rt=255&O,nt=255&B,it=255&A,at=.6-R*R-k*k-E*E-F*F;if(at<0)i=0;else{var ot=S[et+S[rt+S[nt+S[it]]]]%32*4;i=(at*=at)*at*(P[ot]*R+P[ot+1]*k+P[ot+2]*E+P[ot+3]*F)}var st=.6-D*D-z*z-V*V-U*U;if(st<0)a=0;else{var ht=S[et+l+S[rt+f+S[nt+d+S[it+p]]]]%32*4;a=(st*=st)*st*(P[ht]*D+P[ht+1]*z+P[ht+2]*V+P[ht+3]*U)}var ct=.6-Y*Y-H*H-Z*Z-N*N;if(ct<0)o=0;else{var ut=S[et+g+S[rt+m+S[nt+v+S[it+M]]]]%32*4;o=(ct*=ct)*ct*(P[ut]*Y+P[ut+1]*H+P[ut+2]*Z+P[ut+3]*N)}var lt=.6-X*X-G*G-$*$-W*W;if(lt<0)c=0;else{var ft=S[et+b+S[rt+y+S[nt+x+S[it+w]]]]%32*4;c=(lt*=lt)*lt*(P[ft]*X+P[ft+1]*G+P[ft+2]*$+P[ft+3]*W)}var dt=.6-Q*Q-J*J-K*K-tt*tt;if(dt<0)u=0;else{var pt=S[et+1+S[rt+1+S[nt+1+S[it+1]]]]%32*4;u=(dt*=dt)*dt*(P[pt]*Q+P[pt+1]*J+P[pt+2]*K+P[pt+3]*tt)}return 27*(i+a+o+c+u)}},c._buildPermutationTable=u,void 0===(n=function(){return c}.call(e,r,e,t))||(t.exports=n),e.SimplexNoise=c,t.exports=c}()}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{r.d(n,{p:()=>t,Z:()=>a});var t={};r.r(t),r.d(t,{Animation:()=>e,DrawerCanvas:()=>i.T}),r(1714);var e=r(7518),i=r(2251);const a=t})();var i=n.p,a=n.Z;export{i as Urpflanze,a as default};
\ No newline at end of file
+var t={2894:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.UncontrolledLoop=e.Static=e.Loop=e.Compose=e.Simple=e.resolveSimpleAnimation=void 0;const n=r(4825),i=r(2765);function a(t){const e=i.createAnimation(t);if(e)return t=>{var r;const n="number"==typeof t?t:(null===(r=t.shape.scene)||void 0===r?void 0:r.currentTime)||0;return e.update(n),e.value}}e.resolveSimpleAnimation=a,e.Simple=a,e.Compose=t=>{const e=n.composeAnimations(t);if(e)return t=>{var r;const n="number"==typeof t?t:(null===(r=t.shape.scene)||void 0===r?void 0:r.currentTime)||0;return e(n)}},e.Loop=t=>{const e=t;return void 0===e.interpolator&&(e.interpolator="wave"),e.interpolator&&("string"==typeof e.interpolator?"wave"!==e.interpolator&&(e.direction="alternate"):"object"==typeof e.interpolator&&"wave"!==e.interpolator.type&&(e.direction="alternate")),e.loop=!0,a(e)},e.Static=t=>{const e=t;return e.direction="normal",e.loop=!1,a(e)},e.UncontrolledLoop=t=>{const e=t;return e.direction="normal",e.loop=!0,a(e)}},9727:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=void 0;const r={linear:(t,e,r,n=1)=>r*t/n+e,quadraticIn:(t,e,r,n=1)=>r*(t/=n)*t+e,quadraticOut:(t,e,r,n=1)=>-r*(t/=n)*(t-2)+e,quadraticInOut:(t,e,r,n=1)=>(t/=n/2)<1?r/2*t*t+e:-r/2*(--t*(t-2)-1)+e,cubicIn:(t,e,r,n=1)=>r*(t/=n)*t*t+e,cubicOut:(t,e,r,n=1)=>(t/=n,r*(--t*t*t+1)+e),cubicInOut:(t,e,r,n=1)=>(t/=n/2)<1?r/2*t*t*t+e:r/2*((t-=2)*t*t+2)+e,quarticIn:(t,e,r,n=1)=>r*(t/=n)*t*t*t+e,quarticOut:(t,e,r,n=1)=>(t/=n,-r*(--t*t*t*t-1)+e),quarticInOut:(t,e,r,n=1)=>(t/=n/2)<1?r/2*t*t*t*t+e:-r/2*((t-=2)*t*t*t-2)+e,quinticIn:(t,e,r,n=1)=>r*(t/=n)*t*t*t*t+e,quinticOut:(t,e,r,n=1)=>(t/=n,r*(--t*t*t*t*t+1)+e),quinticInOut:(t,e,r,n=1)=>(t/=n/2)<1?r/2*t*t*t*t*t+e:r/2*((t-=2)*t*t*t*t+2)+e,sinusoidalIn:(t,e,r,n=1)=>-r*Math.cos(t/n*(Math.PI/2))+r+e,sinusoidalOut:(t,e,r,n=1)=>r*Math.sin(t/n*(Math.PI/2))+e,sinusoidalInOut:(t,e,r,n=1)=>-r/2*(Math.cos(Math.PI*t/n)-1)+e,exponentialIn:(t,e,r,n=1)=>r*Math.pow(2,10*(t/n-1))+e,exponentialOut:(t,e,r,n=1)=>r*(1-Math.pow(2,-10*t/n))+e,exponentialInOut:(t,e,r,n=1)=>(t/=n/2)<1?r/2*Math.pow(2,10*(t-1))+e:(t--,r/2*(2-Math.pow(2,-10*t))+e),circularIn:(t,e,r,n=1)=>(t/=n,-r*(Math.sqrt(1-t*t)-1)+e),circularOut:(t,e,r,n=1)=>(t/=n,t--,r*Math.sqrt(1-t*t)+e),circularInOut:(t,e,r,n=1)=>(t/=n/2)<1?-r/2*(Math.sqrt(1-t*t)-1)+e:(t-=2,r/2*(Math.sqrt(1-t*t)+1)+e),elasticIn:(t,e,r,n=1,i=1,a=.5)=>{if(0===t)return e;if(1==(t/=n))return e+r;a*=n;let o=0;return i >>19;return function(){return r=Math.imul(r^r>>>16,2246822507),r=Math.imul(r^r>>>13,3266489909),(r^=r>>>16)>>>0}}(i);c[i]=(a=t(),o=t(),s=t(),h=t(),function(){let t=(a>>>=0)+(o>>>=0)|0;return a=o^o>>>9,o=(s>>>=0)+(s<<3)|0,t=t+(h=1+(h>>>=0)|0)|0,s=(s=s<<21|s>>>11)+t|0,(t>>>0)/4294967296})}var a,o,s,h;const u=e+c[i]()*(r-e);return void 0!==n?Math.round(u*10**n)/10**n:u},e.angleFromRepetition=function(t,e=[0,0]){if(t.type===i.ERepetitionType.Matrix){const r=[(t.col.count-1)/2,(t.row.count-1)/2];r[0]+=r[0]*e[0],r[1]+=r[1]*e[1];const n=t.col.index-1-r[0],i=t.row.index-1-r[1];return 0===n?0:Math.atan(i/n)}return(t.angle-Math.PI)/2},e.angle2FromRepetition=function(t,e=[0,0]){if(t.type===i.ERepetitionType.Matrix){const r=[(t.col.count-1)/2,(t.row.count-1)/2];r[0]+=r[0]*e[0],r[1]+=r[1]*e[1];const n=t.col.index-1-r[0],i=t.row.index-1-r[1];return 0===n?0:Math.atan2(i,n)}return t.angle-Math.PI},e.distanceFromRepetition=function(t,e=[0,0]){if(t.type===i.ERepetitionType.Matrix){const r=[.5,.5];r[0]+=r[0]*e[0],r[1]+=r[1]*e[1];const n=[t.col.offset,t.row.offset];return a.default.distance(n,r)}return 1},e.prepareBufferForInterpolation=u,e.interpolate=function(t,e,r=.5){const[n,i]=u(t,e),a=Math.max(n.length,i.length),o="number"==typeof r?[r]:r,s=a/2;if(o.length!==s){const t=o.length;for(let e=0;e 1?e/(r-1):1,c=i.summmation(e,m)*p,g=e-1,b=0===g?0:i.summmation(g,m)*p;for(let i=0,g=m**e;i {e.C=void 0;const n=r(3792),i=r(6951);class a extends i.ShapeLoop{constructor(t={}){t.type="Circle",super(t,!0),this.loop={start:0,end:n.PI2,inc:t=>{const e=this.getRepetitionSideLength(t);return 1/Math.pow(e[0]*e[1],.25)*i.ShapeLoop.PId2},vertex:t=>[Math.cos(t.current),Math.sin(t.current)]},this.bStaticLoop=this.isStaticLoop(),this.bStatic=this.isStatic(),this.bStaticIndexed=this.isStaticIndexed()}}e.C=a},6329:(t,e,r)=>{e.x=void 0;const n=r(5511),i=r(7439);class a extends i.ShapeBuffer{constructor(t={}){t.type="Line",t.shape=a.buffer,t.adaptMode=n.EAdaptMode.None,t.bClosed=!1,super(t)}static toPolygon(t,e){const r=[];if(!Array.isArray(e)){const r=e,n=t.length/2;e=new Array(n);for(let t=0;t{Object.defineProperty(e,"__esModule",{value:!0});const r=new Array(4),n={from:(t=0,e)=>{const r=new Array(2);return"number"==typeof t?(r[0]=t,r[1]=null!=e?e:t):(r[0]=t[0],r[1]=t[1]),r},normalize:t=>{const e=n.length(t);return 0!==e?[t[0]/e,t[1]/e]:[0,0]},distance:(t,e)=>Math.hypot(t[0]-e[0],t[1]-e[1]),dot:(t,e)=>t[0]*e[0]+t[1]*e[1],length:t=>Math.hypot(t[0],t[1]),angle:(t,e)=>(t=n.normalize(t),e=n.normalize(e),Math.acos(n.dot(t,e))),skewX:(t,e)=>{t[0]+=Math.tan(e)*t[1]},skewY:(t,e)=>{t[1]+=Math.tan(e)*t[0]},squeezeX:(t,e)=>{t[1]+=t[1]*(t[0]*-e)},squeezeY:(t,e)=>{t[0]+=t[0]*(t[1]*e)},rotate:(t,e,r)=>{const n=t[0]-r[0],i=t[1]-r[1];t[0]=n*e[0]+i*e[1]+r[0],t[1]=n*e[2]+i*e[3]+r[1]},rotateX:(t,e,i)=>{r[0]=1,r[1]=0,r[2]=0,r[3]=Math.cos(i),n.rotate(t,r,e)},rotateY:(t,e,i)=>{r[0]=Math.cos(i),r[1]=0,r[2]=0,r[3]=1,n.rotate(t,r,e)},rotateZ:(t,e,i)=>{r[0]=Math.cos(i),r[1]=-Math.sin(i),r[2]=Math.sin(i),r[3]=Math.cos(i),n.rotate(t,r,e)},translate:(t,e)=>{t[0]+=e[0],t[1]+=e[1]},scale:(t,e)=>{t[0]*=e[0],t[1]*=e[1]},divide:(t,e)=>{t[0]/=e[0],t[1]/=e[1]},toString:t=>`x: ${t[0]}, y: ${t[1]}`,ZERO:Array.from([0,0]),ONE:Array.from([1,1])};e.default=n},8721:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.toVec3=e.toVec2=e.fromSkew=e.VEC2_ONE=e.VEC2_ZERO=e.VEC3_ONE=e.VEC3_ZERO=void 0;const n=r(887);e.VEC3_ZERO=[0,0,0],e.VEC3_ONE=[1,1,1],e.VEC2_ZERO=[0,0],e.VEC2_ONE=[1,1],n.glMatrix.setMatrixArrayType(Array),e.fromSkew=function(t,e){return t[0]=1,t[1]=Math.tan(e[1]),t[2]=0,t[3]=0,t[4]=Math.tan(e[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},e.toVec2=function(t){return Array.isArray(t)?[t[0],t[1]]:[t,t]},e.toVec3=function(t,e=0){return Array.isArray(t)?[t[0],t[1],e]:[t,t,e]}},3792:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mod=e.PHI=e.PI2=e.log=void 0,e.log=(t,e)=>Math.log(t)/Math.log(e),e.PI2=2*Math.PI,e.PHI=(1+Math.sqrt(5))/2,e.mod=(t,e)=>{const r=t%e;return r<0?r+e:r}},5511:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Adapt=e.Bounding=e.EAdaptMode=void 0;const n=r(9958);var i;!function(t){t[t.None=0]="None",t[t.Scale=2]="Scale",t[t.Center=4]="Center",t[t.Fill=8]="Fill"}(i=e.EAdaptMode||(e.EAdaptMode={})),e.Bounding={empty:()=>({cx:0,cy:0,x:-1,y:-1,width:2,height:2}),clear:t=>{t[0]=void 0,t[1]=void 0,t[2]=void 0,t[3]=void 0},add:(t,e,r)=>{(void 0===t[0]||e{Object.defineProperty(e,"__esModule",{value:!0}),e.ShapeLoop=void 0;const n=r(3792),i=r(5511),a=r(3674),o=r(2648);class s extends a.ShapePrimitive{constructor(t={},e=!1){t.type=t.type||"ShapeLoop",super(t),this.loopDependencies=(t.loopDependencies||[]).concat("sideLength"),this.props.loop=t.loop,e||(this.loop={start:0,end:n.PI2,inc:n.PI2/10,vertex:()=>[0,0]},this.bStaticLoop=this.isStaticLoop(),this.bStatic=this.isStatic(),this.bStaticIndexed=this.isStaticIndexed())}isStaticLoop(){if(this.loopDependencies.includes("propArguments"))return!1;for(let t=0,e=this.loopDependencies.length;t0&&(o=1/Math.sqrt(o)),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o,t}function sn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function hn(t,e,r,n){var i=r[0]*n[1]-r[1]*n[0],a=r[0]*n[2]-r[2]*n[0],o=r[0]*n[3]-r[3]*n[0],s=r[1]*n[2]-r[2]*n[1],h=r[1]*n[3]-r[3]*n[1],c=r[2]*n[3]-r[3]*n[2],u=e[0],l=e[1],f=e[2],d=e[3];return t[0]=l*c-f*h+d*s,t[1]=-u*c+f*o-d*a,t[2]=u*h-l*o+d*i,t[3]=-u*s+l*a-f*i,t}function cn(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}function un(t,e){var r,n,i,a,o,s;e=e||1;do{o=(r=2*g()-1)*r+(n=2*g()-1)*n}while(o>=1);do{s=(i=2*g()-1)*i+(a=2*g()-1)*a}while(s>=1);var h=Math.sqrt((1-o)/s);return t[0]=e*r,t[1]=e*n,t[2]=e*i*h,t[3]=e*a*h,t}function ln(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}function fn(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],h=r[2],c=r[3],u=c*n+s*a-h*i,l=c*i+h*n-o*a,f=c*a+o*i-s*n,d=-o*n-s*i-h*a;return t[0]=u*c+d*-o+l*-h-f*-s,t[1]=l*c+d*-s+f*-o-u*-h,t[2]=f*c+d*-h+u*-s-l*-o,t[3]=e[3],t}function dn(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function pn(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function gn(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function mn(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],o=e[0],s=e[1],h=e[2],c=e[3];return Math.abs(r-o)<=d*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=d*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-h)<=d*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(a-c)<=d*Math.max(1,Math.abs(a),Math.abs(c))}var vn=Yr,Mn=Hr,bn=Zr,yn=Kr,xn=tn,wn=en,Sn=rn,Pn=function(){var t=Tr();return function(e,r,n,i,a,o){var s,h;for(r||(r=4),n||(n=0),h=i?Math.min(i*r+n,e.length):e.length,s=n;s{Object.defineProperty(e,"__esModule",{value:!0});const r=new Array(4),n={from:(t=0,e)=>{const r=new Array(2);return"number"==typeof t?(r[0]=t,r[1]=null!=e?e:t):(r[0]=t[0],r[1]=t[1]),r},normalize:t=>{const e=n.length(t);return 0!==e?[t[0]/e,t[1]/e]:[0,0]},distance:(t,e)=>Math.hypot(t[0]-e[0],t[1]-e[1]),dot:(t,e)=>t[0]*e[0]+t[1]*e[1],length:t=>Math.hypot(t[0],t[1]),angle:(t,e)=>(t=n.normalize(t),e=n.normalize(e),Math.acos(n.dot(t,e))),skewX:(t,e)=>{t[0]+=Math.tan(e)*t[1]},skewY:(t,e)=>{t[1]+=Math.tan(e)*t[0]},squeezeX:(t,e)=>{t[1]+=t[1]*(t[0]*-e)},squeezeY:(t,e)=>{t[0]+=t[0]*(t[1]*e)},rotate:(t,e,r)=>{const n=t[0]-r[0],i=t[1]-r[1];t[0]=n*e[0]+i*e[1]+r[0],t[1]=n*e[2]+i*e[3]+r[1]},rotateX:(t,e,i)=>{r[0]=1,r[1]=0,r[2]=0,r[3]=Math.cos(i),n.rotate(t,r,e)},rotateY:(t,e,i)=>{r[0]=Math.cos(i),r[1]=0,r[2]=0,r[3]=1,n.rotate(t,r,e)},rotateZ:(t,e,i)=>{r[0]=Math.cos(i),r[1]=-Math.sin(i),r[2]=Math.sin(i),r[3]=Math.cos(i),n.rotate(t,r,e)},translate:(t,e)=>{t[0]+=e[0],t[1]+=e[1]},scale:(t,e)=>{t[0]*=e[0],t[1]*=e[1]},divide:(t,e)=>{t[0]/=e[0],t[1]/=e[1]},toString:t=>`x: ${t[0]}, y: ${t[1]}`,ZERO:Array.from([0,0]),ONE:Array.from([1,1])};e.default=n},8721:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.toVec3=e.toVec2=e.fromSkew=e.VEC2_ONE=e.VEC2_ZERO=e.VEC3_ONE=e.VEC3_ZERO=void 0;const n=r(887);e.VEC3_ZERO=[0,0,0],e.VEC3_ONE=[1,1,1],e.VEC2_ZERO=[0,0],e.VEC2_ONE=[1,1],n.glMatrix.setMatrixArrayType(Array),e.fromSkew=function(t,e){return t[0]=1,t[1]=Math.tan(e[1]),t[2]=0,t[3]=0,t[4]=Math.tan(e[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},e.toVec2=function(t){return Array.isArray(t)?[t[0],t[1]]:[t,t]},e.toVec3=function(t,e=0){return Array.isArray(t)?[t[0],t[1],e]:[t,t,e]}},3792:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mod=e.PHI=e.PI2=e.log=void 0,e.log=(t,e)=>Math.log(t)/Math.log(e),e.PI2=2*Math.PI,e.PHI=(1+Math.sqrt(5))/2,e.mod=(t,e)=>{const r=t%e;return r<0?r+e:r}},5511:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Adapt=e.Bounding=e.EAdaptMode=void 0;const n=r(9958);var i;!function(t){t[t.None=0]="None",t[t.Scale=2]="Scale",t[t.Center=4]="Center",t[t.Fill=8]="Fill"}(i=e.EAdaptMode||(e.EAdaptMode={})),e.Bounding={empty:()=>({cx:0,cy:0,x:-1,y:-1,width:2,height:2}),clear:t=>{t[0]=void 0,t[1]=void 0,t[2]=void 0,t[3]=void 0},add:(t,e,r)=>{(void 0===t[0]||e{Object.defineProperty(e,"__esModule",{value:!0}),e.ShapeLoop=void 0;const n=r(3792),i=r(5511),a=r(3674),o=r(2648);class s extends a.ShapePrimitive{constructor(t={},e=!1){t.type=t.type||"ShapeLoop",super(t),this.loopDependencies=(t.loopDependencies||[]).concat("sideLength"),this.props.loop=t.loop,e||(this.loop={start:0,end:n.PI2,inc:n.PI2/10,vertex:()=>[0,0]},this.bStaticLoop=this.isStaticLoop(),this.bStatic=this.isStatic(),this.bStaticIndexed=this.isStaticIndexed())}isStaticLoop(){if(this.loopDependencies.includes("propArguments"))return!1;for(let t=0,e=this.loopDependencies.length;t