UNPKG

@tsparticles/plugin-polygon-mask

Version:

tsParticles polygon mask plugin

1,016 lines (1,003 loc) 112 kB
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this); /* Plugin v4.3.2 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/engine')) : typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/engine'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.__tsParticlesInternals = global.__tsParticlesInternals || {}, global.__tsParticlesInternals.plugins = global.__tsParticlesInternals.plugins || {}, global.__tsParticlesInternals.plugins.polygonMask = global.__tsParticlesInternals.plugins.polygonMask || {}), global.__tsParticlesInternals.engine)); })(this, (function (exports, engine) { 'use strict'; class PolygonMaskDrawStroke { color = new engine.OptionsColor(); opacity = 1; width = 0.5; #pluginManager; constructor(pluginManager) { this.#pluginManager = pluginManager; } load(data) { if (engine.isNull(data)) { return; } this.color = engine.OptionsColor.create(this.color, data.color); if (engine.isString(this.color.value)) { this.opacity = engine.stringToAlpha(this.#pluginManager, this.color.value) ?? this.opacity; } engine.loadProperty(this, "opacity", data.opacity); engine.loadProperty(this, "width", data.width); } } class PolygonMaskDraw { enable = false; stroke; constructor(pluginManager) { this.stroke = new PolygonMaskDrawStroke(pluginManager); } load(data) { if (engine.isNull(data)) { return; } engine.loadProperty(this, "enable", data.enable); const stroke = data.stroke; this.stroke.load(stroke); } } exports.PolygonMaskInlineArrangement = void 0; (function (PolygonMaskInlineArrangement) { PolygonMaskInlineArrangement["equidistant"] = "equidistant"; PolygonMaskInlineArrangement["onePerPoint"] = "one-per-point"; PolygonMaskInlineArrangement["perPoint"] = "per-point"; PolygonMaskInlineArrangement["randomLength"] = "random-length"; PolygonMaskInlineArrangement["randomPoint"] = "random-point"; })(exports.PolygonMaskInlineArrangement || (exports.PolygonMaskInlineArrangement = {})); class PolygonMaskInline { arrangement; constructor() { this.arrangement = exports.PolygonMaskInlineArrangement.onePerPoint; } load(data) { if (engine.isNull(data)) { return; } engine.loadProperty(this, "arrangement", data.arrangement); } } class PolygonMaskLocalSvg { path = []; size; constructor() { this.size = { height: 0, width: 0, }; } load(data) { if (engine.isNull(data)) { return; } engine.loadProperty(this, "path", data.path); if (data.size !== undefined) { if (data.size.width !== undefined) { this.size.width = data.size.width; } if (data.size.height !== undefined) { this.size.height = data.size.height; } } } } exports.PolygonMaskMoveType = void 0; (function (PolygonMaskMoveType) { PolygonMaskMoveType["path"] = "path"; PolygonMaskMoveType["radius"] = "radius"; })(exports.PolygonMaskMoveType || (exports.PolygonMaskMoveType = {})); class PolygonMaskMove { radius = 10; type = exports.PolygonMaskMoveType.path; load(data) { if (engine.isNull(data)) { return; } engine.loadProperty(this, "radius", data.radius); engine.loadProperty(this, "type", data.type); } } exports.PolygonMaskType = void 0; (function (PolygonMaskType) { PolygonMaskType["inline"] = "inline"; PolygonMaskType["inside"] = "inside"; PolygonMaskType["outside"] = "outside"; PolygonMaskType["none"] = "none"; })(exports.PolygonMaskType || (exports.PolygonMaskType = {})); class PolygonMask { data; draw; enable = false; inline = new PolygonMaskInline(); move = new PolygonMaskMove(); position; scale = 1; type = exports.PolygonMaskType.none; url; constructor(pluginManager) { this.draw = new PolygonMaskDraw(pluginManager); } load(data) { if (engine.isNull(data)) { return; } this.draw.load(data.draw); this.inline.load(data.inline); this.move.load(data.move); engine.loadProperty(this, "scale", data.scale); engine.loadProperty(this, "type", data.type); if (data.enable !== undefined) { this.enable = data.enable; } else { this.enable = this.type !== exports.PolygonMaskType.none; } engine.loadProperty(this, "url", data.url); if (data.data !== undefined) { if (engine.isString(data.data)) { this.data = data.data; } else { this.data = new PolygonMaskLocalSvg(); this.data.load(data.data); } } if (data.position !== undefined) { this.position = engine.deepExtend({}, data.position); } } } class PolygonMaskPlugin { id = "polygon-mask"; #pluginManager; constructor(pluginManager) { this.#pluginManager = pluginManager; } async getPlugin(container) { const { PolygonMaskInstance } = await Promise.resolve().then(function () { return PolygonMaskInstance$1; }); return new PolygonMaskInstance(this.#pluginManager, container); } loadOptions(_container, options, source) { if (!this.needsPlugin(options) && !this.needsPlugin(source)) { return; } let polygonOptions = options.polygon; if (polygonOptions?.load === undefined) { options.polygon = polygonOptions = new PolygonMask(this.#pluginManager); } polygonOptions.load(source?.polygon); } needsPlugin(options) { return (options?.polygon?.enable ?? (options?.polygon?.type !== undefined && options.polygon.type !== exports.PolygonMaskType.none)); } } async function loadPolygonMaskPlugin(engine) { engine.checkVersion("4.3.2"); await engine.pluginManager.register(e => { e.pluginManager.addPlugin(new PolygonMaskPlugin(e.pluginManager)); }); } const globalObject = globalThis; globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {}; globalObject.loadPolygonMaskPlugin = loadPolygonMaskPlugin; (function () { try { if (typeof window === "undefined") return; if (!("SVGPathSeg" in window)) { window.SVGPathSeg = function (type, typeAsLetter, owningPathSegList) { this.pathSegType = type; this.pathSegTypeAsLetter = typeAsLetter; this._owningPathSegList = owningPathSegList; }; window.SVGPathSeg.prototype.classname = "SVGPathSeg"; window.SVGPathSeg.PATHSEG_UNKNOWN = 0; window.SVGPathSeg.PATHSEG_CLOSEPATH = 1; window.SVGPathSeg.PATHSEG_MOVETO_ABS = 2; window.SVGPathSeg.PATHSEG_MOVETO_REL = 3; window.SVGPathSeg.PATHSEG_LINETO_ABS = 4; window.SVGPathSeg.PATHSEG_LINETO_REL = 5; window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS = 6; window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL = 7; window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS = 8; window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL = 9; window.SVGPathSeg.PATHSEG_ARC_ABS = 10; window.SVGPathSeg.PATHSEG_ARC_REL = 11; window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS = 12; window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL = 13; window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS = 14; window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL = 15; window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16; window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17; window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18; window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19; window.SVGPathSeg.prototype._segmentChanged = function () { if (this._owningPathSegList) this._owningPathSegList.segmentChanged(this); }; window.SVGPathSegClosePath = function (owningPathSegList) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CLOSEPATH, "z", owningPathSegList); }; window.SVGPathSegClosePath.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegClosePath.prototype.toString = function () { return "[object SVGPathSegClosePath]"; }; window.SVGPathSegClosePath.prototype._asPathString = function () { return this.pathSegTypeAsLetter; }; window.SVGPathSegClosePath.prototype.clone = function () { return new window.SVGPathSegClosePath(undefined); }; window.SVGPathSegMovetoAbs = function (owningPathSegList, x, y) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_ABS, "M", owningPathSegList); this._x = x; this._y = y; }; window.SVGPathSegMovetoAbs.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegMovetoAbs.prototype.toString = function () { return "[object SVGPathSegMovetoAbs]"; }; window.SVGPathSegMovetoAbs.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`; }; window.SVGPathSegMovetoAbs.prototype.clone = function () { return new window.SVGPathSegMovetoAbs(undefined, this._x, this._y); }; Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegMovetoRel = function (owningPathSegList, x, y) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_REL, "m", owningPathSegList); this._x = x; this._y = y; }; window.SVGPathSegMovetoRel.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegMovetoRel.prototype.toString = function () { return "[object SVGPathSegMovetoRel]"; }; window.SVGPathSegMovetoRel.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`; }; window.SVGPathSegMovetoRel.prototype.clone = function () { return new window.SVGPathSegMovetoRel(undefined, this._x, this._y); }; Object.defineProperty(window.SVGPathSegMovetoRel.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegMovetoRel.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegLinetoAbs = function (owningPathSegList, x, y) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_ABS, "L", owningPathSegList); this._x = x; this._y = y; }; window.SVGPathSegLinetoAbs.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegLinetoAbs.prototype.toString = function () { return "[object SVGPathSegLinetoAbs]"; }; window.SVGPathSegLinetoAbs.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`; }; window.SVGPathSegLinetoAbs.prototype.clone = function () { return new window.SVGPathSegLinetoAbs(undefined, this._x, this._y); }; Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegLinetoRel = function (owningPathSegList, x, y) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_REL, "l", owningPathSegList); this._x = x; this._y = y; }; window.SVGPathSegLinetoRel.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegLinetoRel.prototype.toString = function () { return "[object SVGPathSegLinetoRel]"; }; window.SVGPathSegLinetoRel.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`; }; window.SVGPathSegLinetoRel.prototype.clone = function () { return new window.SVGPathSegLinetoRel(undefined, this._x, this._y); }; Object.defineProperty(window.SVGPathSegLinetoRel.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegLinetoRel.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegCurvetoCubicAbs = function (owningPathSegList, x, y, x1, y1, x2, y2) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS, "C", owningPathSegList); this._x = x; this._y = y; this._x1 = x1; this._y1 = y1; this._x2 = x2; this._y2 = y2; }; window.SVGPathSegCurvetoCubicAbs.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegCurvetoCubicAbs.prototype.toString = function () { return "[object SVGPathSegCurvetoCubicAbs]"; }; window.SVGPathSegCurvetoCubicAbs.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`; }; window.SVGPathSegCurvetoCubicAbs.prototype.clone = function () { return new window.SVGPathSegCurvetoCubicAbs(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2); }; Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x1", { get: function () { return this._x1; }, set: function (x1) { this._x1 = x1; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y1", { get: function () { return this._y1; }, set: function (y1) { this._y1 = y1; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x2", { get: function () { return this._x2; }, set: function (x2) { this._x2 = x2; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y2", { get: function () { return this._y2; }, set: function (y2) { this._y2 = y2; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegCurvetoCubicRel = function (owningPathSegList, x, y, x1, y1, x2, y2) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL, "c", owningPathSegList); this._x = x; this._y = y; this._x1 = x1; this._y1 = y1; this._x2 = x2; this._y2 = y2; }; window.SVGPathSegCurvetoCubicRel.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegCurvetoCubicRel.prototype.toString = function () { return "[object SVGPathSegCurvetoCubicRel]"; }; window.SVGPathSegCurvetoCubicRel.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`; }; window.SVGPathSegCurvetoCubicRel.prototype.clone = function () { return new window.SVGPathSegCurvetoCubicRel(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2); }; Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x1", { get: function () { return this._x1; }, set: function (x1) { this._x1 = x1; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y1", { get: function () { return this._y1; }, set: function (y1) { this._y1 = y1; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x2", { get: function () { return this._x2; }, set: function (x2) { this._x2 = x2; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y2", { get: function () { return this._y2; }, set: function (y2) { this._y2 = y2; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegCurvetoQuadraticAbs = function (owningPathSegList, x, y, x1, y1) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS, "Q", owningPathSegList); this._x = x; this._y = y; this._x1 = x1; this._y1 = y1; }; window.SVGPathSegCurvetoQuadraticAbs.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegCurvetoQuadraticAbs.prototype.toString = function () { return "[object SVGPathSegCurvetoQuadraticAbs]"; }; window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`; }; window.SVGPathSegCurvetoQuadraticAbs.prototype.clone = function () { return new window.SVGPathSegCurvetoQuadraticAbs(undefined, this._x, this._y, this._x1, this._y1); }; Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "x1", { get: function () { return this._x1; }, set: function (x1) { this._x1 = x1; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "y1", { get: function () { return this._y1; }, set: function (y1) { this._y1 = y1; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegCurvetoQuadraticRel = function (owningPathSegList, x, y, x1, y1) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL, "q", owningPathSegList); this._x = x; this._y = y; this._x1 = x1; this._y1 = y1; }; window.SVGPathSegCurvetoQuadraticRel.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegCurvetoQuadraticRel.prototype.toString = function () { return "[object SVGPathSegCurvetoQuadraticRel]"; }; window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`; }; window.SVGPathSegCurvetoQuadraticRel.prototype.clone = function () { return new window.SVGPathSegCurvetoQuadraticRel(undefined, this._x, this._y, this._x1, this._y1); }; Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "x1", { get: function () { return this._x1; }, set: function (x1) { this._x1 = x1; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "y1", { get: function () { return this._y1; }, set: function (y1) { this._y1 = y1; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegArcAbs = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_ABS, "A", owningPathSegList); this._x = x; this._y = y; this._r1 = r1; this._r2 = r2; this._angle = angle; this._largeArcFlag = largeArcFlag; this._sweepFlag = sweepFlag; }; window.SVGPathSegArcAbs.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegArcAbs.prototype.toString = function () { return "[object SVGPathSegArcAbs]"; }; window.SVGPathSegArcAbs.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag ? "1" : "0"} ${this._sweepFlag ? "1" : "0"} ${this._x} ${this._y}`; }; window.SVGPathSegArcAbs.prototype.clone = function () { return new window.SVGPathSegArcAbs(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag); }; Object.defineProperty(window.SVGPathSegArcAbs.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcAbs.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcAbs.prototype, "r1", { get: function () { return this._r1; }, set: function (r1) { this._r1 = r1; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcAbs.prototype, "r2", { get: function () { return this._r2; }, set: function (r2) { this._r2 = r2; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcAbs.prototype, "angle", { get: function () { return this._angle; }, set: function (angle) { this._angle = angle; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcAbs.prototype, "largeArcFlag", { get: function () { return this._largeArcFlag; }, set: function (largeArcFlag) { this._largeArcFlag = largeArcFlag; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcAbs.prototype, "sweepFlag", { get: function () { return this._sweepFlag; }, set: function (sweepFlag) { this._sweepFlag = sweepFlag; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegArcRel = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_REL, "a", owningPathSegList); this._x = x; this._y = y; this._r1 = r1; this._r2 = r2; this._angle = angle; this._largeArcFlag = largeArcFlag; this._sweepFlag = sweepFlag; }; window.SVGPathSegArcRel.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegArcRel.prototype.toString = function () { return "[object SVGPathSegArcRel]"; }; window.SVGPathSegArcRel.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag ? "1" : "0"} ${this._sweepFlag ? "1" : "0"} ${this._x} ${this._y}`; }; window.SVGPathSegArcRel.prototype.clone = function () { return new window.SVGPathSegArcRel(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag); }; Object.defineProperty(window.SVGPathSegArcRel.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcRel.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcRel.prototype, "r1", { get: function () { return this._r1; }, set: function (r1) { this._r1 = r1; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcRel.prototype, "r2", { get: function () { return this._r2; }, set: function (r2) { this._r2 = r2; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcRel.prototype, "angle", { get: function () { return this._angle; }, set: function (angle) { this._angle = angle; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcRel.prototype, "largeArcFlag", { get: function () { return this._largeArcFlag; }, set: function (largeArcFlag) { this._largeArcFlag = largeArcFlag; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegArcRel.prototype, "sweepFlag", { get: function () { return this._sweepFlag; }, set: function (sweepFlag) { this._sweepFlag = sweepFlag; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegLinetoHorizontalAbs = function (owningPathSegList, x) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS, "H", owningPathSegList); this._x = x; }; window.SVGPathSegLinetoHorizontalAbs.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegLinetoHorizontalAbs.prototype.toString = function () { return "[object SVGPathSegLinetoHorizontalAbs]"; }; window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x}`; }; window.SVGPathSegLinetoHorizontalAbs.prototype.clone = function () { return new window.SVGPathSegLinetoHorizontalAbs(undefined, this._x); }; Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegLinetoHorizontalRel = function (owningPathSegList, x) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL, "h", owningPathSegList); this._x = x; }; window.SVGPathSegLinetoHorizontalRel.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegLinetoHorizontalRel.prototype.toString = function () { return "[object SVGPathSegLinetoHorizontalRel]"; }; window.SVGPathSegLinetoHorizontalRel.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x}`; }; window.SVGPathSegLinetoHorizontalRel.prototype.clone = function () { return new window.SVGPathSegLinetoHorizontalRel(undefined, this._x); }; Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegLinetoVerticalAbs = function (owningPathSegList, y) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS, "V", owningPathSegList); this._y = y; }; window.SVGPathSegLinetoVerticalAbs.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegLinetoVerticalAbs.prototype.toString = function () { return "[object SVGPathSegLinetoVerticalAbs]"; }; window.SVGPathSegLinetoVerticalAbs.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._y}`; }; window.SVGPathSegLinetoVerticalAbs.prototype.clone = function () { return new window.SVGPathSegLinetoVerticalAbs(undefined, this._y); }; Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegLinetoVerticalRel = function (owningPathSegList, y) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL, "v", owningPathSegList); this._y = y; }; window.SVGPathSegLinetoVerticalRel.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegLinetoVerticalRel.prototype.toString = function () { return "[object SVGPathSegLinetoVerticalRel]"; }; window.SVGPathSegLinetoVerticalRel.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._y}`; }; window.SVGPathSegLinetoVerticalRel.prototype.clone = function () { return new window.SVGPathSegLinetoVerticalRel(undefined, this._y); }; Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegCurvetoCubicSmoothAbs = function (owningPathSegList, x, y, x2, y2) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, "S", owningPathSegList); this._x = x; this._y = y; this._x2 = x2; this._y2 = y2; }; window.SVGPathSegCurvetoCubicSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString = function () { return "[object SVGPathSegCurvetoCubicSmoothAbs]"; }; window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`; }; window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone = function () { return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, this._x, this._y, this._x2, this._y2); }; Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "y", { get: function () { return this._y; }, set: function (y) { this._y = y; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "x2", { get: function () { return this._x2; }, set: function (x2) { this._x2 = x2; this._segmentChanged(); }, enumerable: true, }); Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "y2", { get: function () { return this._y2; }, set: function (y2) { this._y2 = y2; this._segmentChanged(); }, enumerable: true, }); window.SVGPathSegCurvetoCubicSmoothRel = function (owningPathSegList, x, y, x2, y2) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL, "s", owningPathSegList); this._x = x; this._y = y; this._x2 = x2; this._y2 = y2; }; window.SVGPathSegCurvetoCubicSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype); window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString = function () { return "[object SVGPathSegCurvetoCubicSmoothRel]"; }; window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString = function () { return `${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`; }; window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone = function () { return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, this._x, this._y, this._x2, this._y2); }; Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "x", { get: function () { return this._x; }, set: function (x) { this._x = x; t