Commit 6775f6d8 authored by wildfirecode's avatar wildfirecode

1

parent 551db692
{"map":"{\"version\":3,\"file\":\"InteractContext.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../../node_modules/scilla-core/src/core/context/InteractContext.ts\"],\"names\":[],\"mappings\":\"AAMA,IAAI,OAAO,CAAC;AACZ,IAAI,aAAa,CAAC;AAClB,IAAI,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC;AAEhC,IAAM,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;AAC7C,IAAM,QAAQ,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAM/E,MAAM,UAAU,YAAY,CAAC,OAAgB;IAAhB,wBAAA,EAAA,YAAgB;IACrC,IAAA,uBAAM,EAAE,mCAAY,CAAY;IAEvC,aAAa,GAAG,YAAY,CAAC;IAE7B,OAAO,GAAG,MAAM,CAAC;IAEjB,YAAY,EAAE,CAAC;AAChB,CAAC;AAQD,MAAM,UAAU,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ;IACvD,OAAO,GAAG,MAAM,CAAC;IACjB,OAAO,GAAG,MAAM,CAAC;IACjB,SAAS,GAAG,QAAQ,CAAC;AACtB,CAAC;AAKD,SAAS,YAAY;IACpB,IAAI,MAAM,CAAC,SAAS,CAAC,gBAAgB,EAAE;QACtC,OAAO,CAAC,gBAAgB,CAAC,eAAe,EAAE,UAAC,KAAK;YAC/C,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC;YACnC,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,EAAE,KAAK,CAAC,CAAC;QACV,OAAO,CAAC,gBAAgB,CAAC,eAAe,EAAE,UAAC,KAAK;YAC/C,KAAK,CAAC,UAA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I,GAAG,IAAI,GAAG,OAAO,CAAC;IACtB,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC;IACtB,OAAO;QACN,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QACnB,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QACnB,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,CAAC;KACjC,CAAC;AACH,CAAC\"}","code":"var _canvas;\r\nvar _touchHandler;\r\nvar _scaleX, _scaleY, _rotation;\r\nvar ua = navigator.userAgent.toLowerCase();\r\nvar isMobile = (ua.indexOf('mobile') !== -1 || ua.indexOf('android') !== -1);\r\nexport function setupContext(options) {\r\n if (options === void 0) { options = {}; }\r\n var canvas = options.canvas, touchHandler = options.touchHandler;\r\n _touchHandler = touchHandler;\r\n _canvas = canvas;\r\n addListeners();\r\n}\r\nexport function updateScaleMode(scaleX, scaleY, rotation) {\r\n _scaleX = scaleX;\r\n _scaleY = scaleY;\r\n _rotation = rotation;\r\n}\r\nfunction addListeners() {\r\n if (window.navigator.msPointerEnabled) {\r\n _canvas.addEventListener(\"MSPointerDown\", function (event) {\r\n event.identifier = event.pointerId;\r\n onTouchBegin(event);\r\n prevent(event);\r\n }, false);\r\n _canvas.addEventListener(\"MSPointerMove\", function (event) {\r\n event.identifier = event.pointerId;\r\n onTouchMove(event);\r\n prevent(event);\r\n }, false);\r\n _canvas.addEventListener(\"MSPointerUp\", function (event) {\r\n event.identifier = event.pointerId;\r\n onTouchEnd(event);\r\n prevent(event);\r\n }, false);\r\n }\r\n else {\r\n if (!isMobile) {\r\n addMouseListener();\r\n }\r\n addTouchListener();\r\n }\r\n}\r\nfunction prevent(event) {\r\n event.stopPropagation();\r\n if (event[\"isScroll\"] != true && !_canvas['userTyping']) {\r\n event.preventDefault();\r\n }\r\n}\r\nfunction addMouseListener() {\r\n _canvas.addEventListener(\"mousedown\", onTouchBegin);\r\n _canvas.addEventListener(\"mousemove\", onMouseMove);\r\n _canvas.addEventListener(\"mouseup\", onTouchEnd);\r\n}\r\nfunction addTouchListener() {\r\n _canvas.addEventListener(\"touchstart\", function (event) {\r\n var l = event.changedTouches.length;\r\n for (var i = 0; i < l; i++) {\r\n onTouchBegin(event.changedTouches[i]);\r\n }\r\n prevent(event);\r\n }, false);\r\n _canvas.addEventListener(\"touchmove\", function (event) {\r\n var l = event.changedTouches.length;\r\n for (var i = 0; i < l; i++) {\r\n onTouchMove(event.changedTouches[i]);\r\n }\r\n prevent(event);\r\n }, false);\r\n _canvas.addEventListener(\"touchend\", function (event) {\r\n var l = event.changedTouches.length;\r\n for (var i = 0; i < l; i++) {\r\n onTouchEnd(event.changedTouches[i]);\r\n }\r\n prevent(event);\r\n }, false);\r\n _canvas.addEventListener(\"touchcancel\", function (event) {\r\n var l = event.changedTouches.length;\r\n for (var i = 0; i < l; i++) {\r\n onTouchEnd(event.changedTouches[i]);\r\n }\r\n prevent(event);\r\n }, false);\r\n}\r\nfunction onTouchBegin(event) {\r\n var location = getLocation(event);\r\n _touchHandler.onTouchBegin(location);\r\n}\r\nfunction onMouseMove(event) {\r\n if (event.buttons === 0) {\r\n onTouchEnd(event);\r\n }\r\n else {\r\n onTouchMove(event);\r\n }\r\n}\r\nfunction onTouchMove(event) {\r\n var location = getLocation(event);\r\n _touchHandler.onTouchMove(location);\r\n}\r\nfunction onTouchEnd(event) {\r\n var location = getLocation(event);\r\n _touchHandler.onTouchEnd(location);\r\n}\r\nfunction getLocation(event) {\r\n var doc = document.documentElement;\r\n var box = _canvas.getBoundingClientRect();\r\n var left = box.left + window.pageXOffset - doc.clientLeft;\r\n var top = box.top + window.pageYOffset - doc.clientTop;\r\n var x = event.pageX - left, newX = x;\r\n var y = event.pageY - top, newY = y;\r\n if (_rotation === 90) {\r\n newX = y;\r\n newY = box.width - x;\r\n }\r\n else if (_rotation === -90) {\r\n newX = box.height - y;\r\n newY = x;\r\n }\r\n newX = newX / _scaleX;\r\n newY = newY / _scaleY;\r\n return {\r\n x: Math.round(newX),\r\n y: Math.round(newY),\r\n identifier: event.identifier || 0,\r\n };\r\n}\r\n//# sourceMappingURL=InteractContext.js.map"}
{"map":"{\"version\":3,\"file\":\"TextStyle.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/TextStyle.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,MAAM,CAAN,IAAY,SAaX;AAbD,WAAY,SAAS;IAIpB,8BAAkB,CAAA;IAIlB,8BAAkB,CAAA;IAIlB,gCAAoB,CAAA;AACrB,CAAC,EAbW,SAAS,KAAT,SAAS,QAapB;AAED,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IAItB,gCAAkB,CAAA;IAIlB,wCAA0B,CAAA;AAC3B,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAED,MAAM,CAAN,IAAY,UAiBX;AAjBD,WAAY,UAAU;IAIrB,+BAAiB,CAAA;IAIjB,2BAAa,CAAA;IAIb,+BAAiB,CAAA;IAIjB,iCAAmB,CAAA;AACpB,CAAC,EAjBW,UAAU,KAAV,UAAU,QAiBrB;AAKD;IAAA;QAQC,cAAS,GAAc,SAAS,CAAC,MAAM,CAAC;QAMxC,gBAAW,GAAgB,WAAW,CAAC,MAAM,CAAC;QAM9C,eAAU,GAAe,UAAU,CAAC,MAAM,CAAC;QAM3C,aAAQ,GAAW,EAAE,CAAC;QAMtB,eAAU,GAAW,OAAO,CAAC;IAK9B,CAAC;IAHA,4BAAQ,GAAR,UAAS,KAAK,EAAE,GAAG,EAAE,QAAQ;QAC5B,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACnE,CAAC;IA5BD;QADC,iBAAiB;gDACsB;IAMxC;QADC,iBAAiB;kDAC4B;IAM9C;QADC,iBAAiB;iDACyB;IAM3C;QADC,iBAAiB;+CACI;IAMtB;QADC,iBAAiB;iDACW;IAK9B,gBAAC;CAAA,AArCD,IAqCC;SArCY,SAAS\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { dirtyFieldTrigger } from \"../tools/decorators\";\r\nexport var FontStyle;\r\n(function (FontStyle) {\r\n FontStyle[\"NORMAL\"] = \"normal\";\r\n FontStyle[\"ITALIC\"] = \"italic\";\r\n FontStyle[\"OBLIQUE\"] = \"oblique\";\r\n})(FontStyle || (FontStyle = {}));\r\nexport var FontVariant;\r\n(function (FontVariant) {\r\n FontVariant[\"NORMAL\"] = \"normal\";\r\n FontVariant[\"SMALL_CAPS\"] = \"small-caps\";\r\n})(FontVariant || (FontVariant = {}));\r\nexport var FontWeight;\r\n(function (FontWeight) {\r\n FontWeight[\"NORMAL\"] = \"normal\";\r\n FontWeight[\"BOLD\"] = \"bold\";\r\n FontWeight[\"BOLDER\"] = \"bolder\";\r\n FontWeight[\"LIGHTER\"] = \"lighter\";\r\n})(FontWeight || (FontWeight = {}));\r\nvar TextStyle = (function () {\r\n function TextStyle() {\r\n this.fontStyle = FontStyle.NORMAL;\r\n this.fontVariant = FontVariant.NORMAL;\r\n this.fontWeight = FontWeight.NORMAL;\r\n this.fontSize = 25;\r\n this.fontFamily = 'Arial';\r\n }\r\n TextStyle.prototype.onModify = function (value, key, oldValue) {\r\n this.onChange && this.onChange(value, key, oldValue, 'textStyle');\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], TextStyle.prototype, \"fontStyle\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], TextStyle.prototype, \"fontVariant\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], TextStyle.prototype, \"fontWeight\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], TextStyle.prototype, \"fontSize\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], TextStyle.prototype, \"fontFamily\", void 0);\r\n return TextStyle;\r\n}());\r\nexport { TextStyle };\r\n//# sourceMappingURL=TextStyle.js.map"}
{"map":"{\"version\":3,\"file\":\"Renderer.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/renderer/Renderer.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAC,MAAM,QAAQ,CAAC;AAE5G,IAAA,gDAAiB,CAAe;AAKvC;IAAsC,oCAAe;IAyDpD;QAAA,YACC,iBAAO,SAGP;QA5DS,sBAAgB,GAAG;YAC5B,KAAI,CAAC,SAAS,EAAE,CAAC;QAClB,CAAC,CAAC;QAIQ,WAAK,GAAY,IAAI,CAAC;QAKtB,mBAAa,GAAY,KAAK,CAAC;QAKzC,WAAK,GAAW,CAAC,CAAC;QAKlB,YAAM,GAAa,IAAI,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAKhC,YAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QAEtB,iBAAW,GAAG,IAAI,CAAC;QAUnB,mBAAa,GAAa,IAAI,QAAQ,EAAE,CAAC;QAGzC,cAAQ,GAAG,UAAU,EAAE,CAAC;QAKxB,aAAO,GAAW,CAAC,CAAC;QAa7B,KAAI,CAAC,eAAe,GAAG,SAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAK,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAS,CAAC;;IAC5F,CAAC;IAZD,sBAAI,kCAAY;aAAhB;YACC,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;QAC/B,CAAC;aAED,UAAiB,KAAK;YACrB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC5B,CAAC;;;OAJA;IAYS,kCAAe,GAAzB;QACC,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IAMD,sBAAI,6BAAO;aAAX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AG,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9D,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACxE;IACF,CAAC;IAKS,2BAAQ,GAAlB;IAEA,CAAC;IAKS,uBAAI,GAAd;IAEA,CAAC;IAKS,gCAAa,GAAvB;QACO,IAAA,SAAwD,EAAvD,cAAc,EAAL,QAAC,EAAE,QAAC,EAAG,kBAAM,EAAE,cAAuB,EAAd,gBAAK,EAAE,kBAAe,CAAC;QAE/D,IAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;QACvD,IAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC;QAExD,MAAM,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC;QAC1B,MAAM,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC;IAC3B,CAAC;IAOD,0BAAO,GAAP,UAAQ,CAAC,EAAE,CAAC;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACnC,CAAC;IApOD;QADC,iBAAiB;4CACwB;IAqO3C,eAAC;CAAA,AA3PD,CAAsC,eAAe,GA2PpD;eA3PoB,QAAQ\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { createCanvas, getContext, ScillaComponent, Bounds, Vector2D, math, decorators, EngineConfig } from \"scilla\";\r\nvar dirtyFieldTrigger = decorators.dirtyFieldTrigger;\r\nvar Renderer = (function (_super) {\r\n tslib_1.__extends(Renderer, _super);\r\n function Renderer() {\r\n var _this = _super.call(this) || this;\r\n _this.onVector2DModify = function () {\r\n _this.makeDirty();\r\n };\r\n _this.dirty = true;\r\n _this._useCacheMode = false;\r\n _this.alpha = 1;\r\n _this.anchor = new Vector2D(0.5, 0.5);\r\n _this.bounds = new Bounds();\r\n _this.cacheCanvas = null;\r\n _this._anchorOffset = new Vector2D();\r\n _this._context = getContext();\r\n _this._margin = 0;\r\n _this._debugDrawColor = \"hsl(\" + math.makeRandomInt(360) + \", \" + math.makeRandomInt(100) + \"%, 60%)\";\r\n return _this;\r\n }\r\n Object.defineProperty(Renderer.prototype, \"useCacheMode\", {\r\n get: function () {\r\n return this.getUseCacheMode();\r\n },\r\n set: function (value) {\r\n this._useCacheMode = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Renderer.prototype.getUseCacheMode = function () {\r\n return this._useCacheMode;\r\n };\r\n Object.defineProperty(Renderer.prototype, \"context\", {\r\n get: function () {\r\n return this.cacheCanvasContext || this._context;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Renderer.prototype.makeDirty = function () {\r\n this.dirty = true;\r\n };\r\n Renderer.prototype.onModify = function (value, key, oldValue) {\r\n _super.prototype.onModify.call(this, value, key, oldValue);\r\n this.makeDirty();\r\n switch (key) {\r\n case 'anchor':\r\n value.onChange = this.onVector2DModify;\r\n break;\r\n }\r\n };\r\n Renderer.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n if (!this.transform) {\r\n console.warn('renderer need a transform component');\r\n }\r\n };\r\n Renderer.prototype.onUpdate = function (t) {\r\n if (this.dirty) {\r\n if (this.entity.name == 'label_status') {\r\n console.log();\r\n }\r\n if (this.useCacheMode) {\r\n this.readyCacheCanvas();\r\n }\r\n this.measureBounds();\r\n if (this.useCacheMode) {\r\n this.updateCacheCanvas();\r\n }\r\n }\r\n this.transformToLocal();\r\n this.render();\r\n if (EngineConfig.drawRenderRect) {\r\n var _a = this, _context = _a._context, _debugDrawColor = _a._debugDrawColor, _b = _a.bounds, width = _b.width, height = _b.height, _c = _a._anchorOffset, x_1 = _c.x, y = _c.y, _d = _a.transform.pivot, px = _d.x, py = _d.y;\r\n _context.globalAlpha = 0.9;\r\n _context.strokeStyle = _debugDrawColor;\r\n _context.fillStyle = _debugDrawColor;\r\n _context.beginPath();\r\n _context.rect(0, 0, width, height);\r\n _context.stroke();\r\n _context.beginPath();\r\n _context.arc(width * px, height * py, 3, 0, 2 * Math.PI);\r\n _context.fill();\r\n }\r\n };\r\n Renderer.prototype.readyCacheCanvas = function () {\r\n var canvas = this.cacheCanvas;\r\n if (!canvas) {\r\n canvas = this.cacheCanvas = createCanvas();\r\n this.cacheCanvasContext = canvas.getContext('2d');\r\n }\r\n };\r\n Renderer.prototype.updateCacheCanvas = function () {\r\n var canvas = this.cacheCanvas;\r\n var _a = this.bounds, width = _a.width, height = _a.height;\r\n canvas.width = width + this._margin * 2;\r\n canvas.height = height + this._margin * 2;\r\n };\r\n Renderer.prototype.render = function () {\r\n this.beforeDraw();\r\n this.drawClip();\r\n if (this.dirty) {\r\n if (this.useCacheMode) {\r\n this.draw();\r\n }\r\n this.dirty = false;\r\n }\r\n if (this.useCacheMode) {\r\n this.drawCache();\r\n }\r\n else {\r\n this.draw();\r\n }\r\n };\r\n Renderer.prototype.beforeDraw = function () {\r\n this.applyAlpha();\r\n };\r\n Renderer.prototype.transformToLocal = function () {\r\n var _a = this, transform = _a.transform, _b = _a._anchorOffset, ax = _b.x, ay = _b.y;\r\n if (transform && transform.enabled) {\r\n var _c = transform.getMatrix(true), a = _c.a, b = _c.b, c = _c.c, d = _c.d, tx = _c.tx, ty = _c.ty;\r\n var offX = ax * a + ay * c;\r\n var offY = ax * b + ay * d;\r\n this._context.setTransform(a, b, c, d, tx - offX, ty - offY);\r\n }\r\n else {\r\n this._context.setTransform(1, 0, 0, 1, -ax, -ay);\r\n }\r\n };\r\n Renderer.prototype.applyAlpha = function () {\r\n this._context.globalAlpha = this.alpha * this.transform.renderAlpha;\r\n };\r\n Renderer.prototype.drawCache = function () {\r\n if (this.cacheCanvas.width > 0 && this.cacheCanvas.height > 0) {\r\n this._context.drawImage(this.cacheCanvas, -this._margin, -this._margin);\r\n }\r\n };\r\n Renderer.prototype.drawClip = function () {\r\n };\r\n Renderer.prototype.draw = function () {\r\n };\r\n Renderer.prototype.measureBounds = function () {\r\n var _a = this, _b = _a.anchor, x = _b.x, y = _b.y, bounds = _a.bounds, _c = _a.bounds, width = _c.width, height = _c.height;\r\n var anchorOffsetX = this._anchorOffset.x = width * x;\r\n var anchorOffsetY = this._anchorOffset.y = height * y;\r\n bounds.x = -anchorOffsetX;\r\n bounds.y = -anchorOffsetY;\r\n };\r\n Renderer.prototype.hitTest = function (x, y) {\r\n return this.bounds.contains(x, y);\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Renderer.prototype, \"anchor\", void 0);\r\n return Renderer;\r\n}(ScillaComponent));\r\nexport default Renderer;\r\n//# sourceMappingURL=Renderer.js.map"}
{"map":"{\"version\":3,\"file\":\"FrameAnimation.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/FrameAnimation.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,IAAM,YAAY,GAAG,EAAE,CAAC;AACxB,IAAM,WAAW,GAAG,EAAE,CAAC;AACvB,IAAM,UAAU,GAAG,EAAE,CAAC;AAMtB,MAAM,UAAU,iBAAiB,CAAC,IAAI;IACrC,IAAI,SAAS,GAAmB,YAAY,CAAC,IAAI,CAAC,CAAC;IACnD,IAAI,CAAC,SAAS,EAAE;QACf,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC9D,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;KAC3B;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAOD,MAAM,UAAU,YAAY,CAAC,GAAG,EAAE,IAAI;IAC9B,IAAA,YAAE,EAAE,cAAG,CAAS;IAEvB,IAAI,KAAK,GAAU,IAAI,KAAK,CAAC,GAAG,EAAE,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,UAAS,UAAU;QACX,IAAA,0BAAS,CAAU;QAE1B,IAAI,OAAO,EAAE,SAAS,CAAC;QACvB,IAAI,SAAS,EAAE;YACP,IAAA,2BAAM,CAAc;YAC3B,SAAS,GAAG,QAAM,CAAC,UAAU,CAAC,CAAC;YAC/B,IAAI,SAAS,EAAE;gBACd,IAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC;gBAC1B,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;gBAC1B,IAAI,CAAC,OAAO,EAAE;oBACb,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;iBAC5D;aACD;SACD;QACD,OAAO;YACN,OAAO,SAAA;YACP,IAAI,EAAE,SAAS;SACf,CAAC;IACH,CAAC;IAED,oCAAO,GAAP;QACC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACvB,CAAC;IACF,yBAAC;AAAD,CAAC,AArED,IAqEC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { Sheet } from \"./Sheet\";\r\nvar animationMap = {};\r\nvar animDataMap = {};\r\nvar textureMap = {};\r\nexport function getFrameAnimation(name) {\r\n var animation = animationMap[name];\r\n if (!animation) {\r\n animation = animationMap[name] = new FrameAnimationImpl(name);\r\n animation.fillMcData(name);\r\n }\r\n return animation;\r\n}\r\nexport function putFrameAnim(img, data) {\r\n var mc = data.mc, res = data.res;\r\n var sheet = new Sheet(img, res);\r\n for (var key in mc) {\r\n var animData = animDataMap[key] = mc[key];\r\n animData.sheet = sheet;\r\n }\r\n}\r\nvar FrameAnimationImpl = (function () {\r\n function FrameAnimationImpl(name) {\r\n this._name = name;\r\n }\r\n Object.defineProperty(FrameAnimationImpl.prototype, \"name\", {\r\n get: function () {\r\n return this._name;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n FrameAnimationImpl.prototype.fillMcData = function (name) {\r\n var animData = animDataMap[name];\r\n if (animData) {\r\n this._animData = animData;\r\n }\r\n else {\r\n console.warn(\"anim data [\" + name + \"] is not exist\");\r\n }\r\n };\r\n Object.defineProperty(FrameAnimationImpl.prototype, \"fps\", {\r\n get: function () {\r\n return this._animData.frameRate;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FrameAnimationImpl.prototype, \"labels\", {\r\n get: function () {\r\n return this._animData.labels;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FrameAnimationImpl.prototype, \"frameCount\", {\r\n get: function () {\r\n return this._animData.frames.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n FrameAnimationImpl.prototype.getLabel = function (name) {\r\n var e_1, _a;\r\n var result;\r\n try {\r\n for (var _b = tslib_1.__values(this._animData.labels), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var label = _c.value;\r\n if (label.name == name) {\r\n result = label;\r\n break;\r\n }\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n return result;\r\n };\r\n FrameAnimationImpl.prototype.getFrame = function (frameIndex) {\r\n var _animData = this._animData;\r\n var texture, frameData;\r\n if (_animData) {\r\n var frames_1 = _animData.frames;\r\n frameData = frames_1[frameIndex];\r\n if (frameData) {\r\n var res = frameData.res;\r\n texture = textureMap[res];\r\n if (!texture) {\r\n texture = textureMap[res] = _animData.sheet.getTexture(res);\r\n }\r\n }\r\n }\r\n return {\r\n texture: texture,\r\n data: frameData,\r\n };\r\n };\r\n FrameAnimationImpl.prototype.destroy = function () {\r\n this._animData = null;\r\n };\r\n return FrameAnimationImpl;\r\n}());\r\nexport { FrameAnimationImpl };\r\n//# sourceMappingURL=FrameAnimation.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/tools/index.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA;AAC9B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA;AAC9B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACN,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,SAAS,GACT,CAAA\"}","code":"import * as decorators from './decorators';\r\nimport * as ease from './ease';\r\nimport * as math from './math';\r\nimport * as utils from './utils';\r\nimport * as timeUtils from './time';\r\nimport { Ease } from \"./ease\";\r\nexport { decorators, ease, Ease, math, utils, timeUtils, };\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"CameraController.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/other/CameraController.ts\"],\"names\":[],\"mappings\":\";AAKA,OAAO,EAAS,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC7F,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAK1C;IAA8C,4CAAe;IAA7D;QAAA,qEAyDC;QAvDA,oBAAc,GAAa,cAAc,EAAE,CAAC;QAE5C,cAAQ,GAAG,GAAG,CAAC;;IAqDhB,CAAC;IA/CA,mCAAQ,GAAR;QACC,iBAAM,QAAQ,WAAE,CAAC;IAClB,CAAC;IAED,kCAAO,GAAP;QACC,iBAAM,OAAO,WAAE,CAAC;QAEV,IAAA,SAA+B,EAA9B,kBAAM,EAAE,kCAAsB,CAAC;QAEtC,IAAI,CAAC,SAAS,GAAG,YAAY,EAAE,CAAC;QAEhC,IAAI,MAAM,EAAE;YACX,IAAI,CAAC,cAAc,GAAG,M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S,WAAE,CAAC;IACnB,CAAC;IACF,uBAAC;AAAD,CAAC,AAzDD,CAA8C,eAAe,GAyD5D\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { getStageSize, ScillaComponent, createVector2D, Vector2D, math } from \"scilla\";\r\nimport Transform from \"../base/Transform\";\r\nvar CameraController = (function (_super) {\r\n tslib_1.__extends(CameraController, _super);\r\n function CameraController() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.viewportAnchor = createVector2D();\r\n _this.maxScale = 1.2;\r\n return _this;\r\n }\r\n CameraController.prototype.onCreate = function () {\r\n _super.prototype.onCreate.call(this);\r\n };\r\n CameraController.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n var _a = this, target = _a.target, viewportAnchor = _a.viewportAnchor;\r\n this.stageSize = getStageSize();\r\n if (target) {\r\n this.targetPosition = target.getComponent(Transform).position;\r\n }\r\n this.followPosition = createVector2D();\r\n if (viewportAnchor) {\r\n var _b = this.stageSize, width = _b.width, height = _b.height;\r\n var _c = this.viewportAnchor, x_1 = _c.x, y = _c.y;\r\n this.transform.position.setXY(width * x_1, height * y);\r\n }\r\n };\r\n CameraController.prototype.onUpdate = function (t) {\r\n _super.prototype.onUpdate.call(this, t);\r\n if (!this.targetPosition) {\r\n return;\r\n }\r\n var _a = this, _b = _a.transform, scale = _b.scale, position = _b.position, _c = _a.stageSize, width = _c.width, height = _c.height, _d = _a.targetPosition, x = _d.x, y = _d.y, length = _d.length, maxScale = _a.maxScale;\r\n var newScale = maxScale - length * maxScale / 2048;\r\n scale.setXY(newScale, newScale);\r\n this.followPosition.setXY(width / 2, height / 2).subtract(this.targetPosition);\r\n position.copyFrom(math.lerpObj(position, this.followPosition, 0.1, Vector2D, ['x', 'y']));\r\n };\r\n CameraController.prototype.onSleep = function () {\r\n _super.prototype.onSleep.call(this);\r\n };\r\n CameraController.prototype.onDestroy = function () {\r\n _super.prototype.onDestroy.call(this);\r\n };\r\n return CameraController;\r\n}(ScillaComponent));\r\nexport default CameraController;\r\n//# sourceMappingURL=CameraController.js.map"}
{"map":"{\"version\":3,\"file\":\"ease.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/tools/ease.ts\"],\"names\":[],\"mappings\":\"AAMA,MAAM,CAAN,IAAY,IA4BX;AA5BD,WAAY,IAAI;IACf,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IACnB,+BAAuB,CAAA;IACvB,2BAAmB,CAAA;IACnB,6BAAqB,CAAA;IACrB,iCAAyB,CAAA;IACzB,2BAAmB,CAAA;IACnB,6BAAqB,CAAA;IACrB,iCAAyB,CAAA;IACzB,2BAAmB,CAAA;IACnB,6BAAqB,CAAA;IACrB,iCAAyB,CAAA;IACzB,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IACnB,+BAAuB,CAAA;IACvB,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IACnB,+BAAuB,CAAA;IACvB,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IACnB,+BAAuB,CAAA;IACvB,6BAAqB,CAAA;IACrB,+BAAuB,CAAA;IACvB,mCAA2B,CAAA;IAC3B,+BAAuB,CAAA;IACvB,iCAAyB,CAAA;IACzB,qCAA6B,CAAA;AAC9B,CAAC,EA5BW,IAAI,KAAJ,IAAI,QA4Bf;AAED,MAAM,UAAU,GAAG,CAAC,MAAM;IACzB,IAAI,MAAM,GAAG,CAAC,CAAC,EAAE;QAChB,MAAM,GAAG,CAAC,CAAC,CAAC;KACZ;IACD,IAAI,MAAM,GAAG,CAAC,EAAE;QACf,MAAM,GAAG,CAAC,CAAC;KACX;IACD,OAAO,UAAU,CAAC;QACjB,IAAI,MAAM,IAAI,CAAC,EAAE;YAChB,OAAO,CAAC,CAAC;SACT;QACD,IAAI,MAAM,GAAG,CAAC,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;SACtC;QACD,OAAO,CA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D,IAAI,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;IACtB,OAAO,UAAU,CAAC;QACjB,IAAI,CAAC,GAAG,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;QAChD,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;YAAE,OAAO,CAAC,GAAG,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC;QAC5G,OAAO,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IAC7F,CAAC,CAAA;AACF,CAAC;AAGD,MAAM,CAAC,IAAM,YAAY,GAAG,eAAe,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC\"}","code":"export var Ease;\r\n(function (Ease) {\r\n Ease[\"quadIn\"] = \"quadIn\";\r\n Ease[\"quadOut\"] = \"quadOut\";\r\n Ease[\"quadInOut\"] = \"quadInOut\";\r\n Ease[\"cubicIn\"] = \"cubicIn\";\r\n Ease[\"cubicOut\"] = \"cubicOut\";\r\n Ease[\"cubicInOut\"] = \"cubicInOut\";\r\n Ease[\"quartIn\"] = \"quartIn\";\r\n Ease[\"quartOut\"] = \"quartOut\";\r\n Ease[\"quartInOut\"] = \"quartInOut\";\r\n Ease[\"quintIn\"] = \"quintIn\";\r\n Ease[\"quintOut\"] = \"quintOut\";\r\n Ease[\"quintInOut\"] = \"quintInOut\";\r\n Ease[\"sineIn\"] = \"sineIn\";\r\n Ease[\"sineOut\"] = \"sineOut\";\r\n Ease[\"sineInOut\"] = \"sineInOut\";\r\n Ease[\"backIn\"] = \"backIn\";\r\n Ease[\"backOut\"] = \"backOut\";\r\n Ease[\"backInOut\"] = \"backInOut\";\r\n Ease[\"circIn\"] = \"circIn\";\r\n Ease[\"circOut\"] = \"circOut\";\r\n Ease[\"circInOut\"] = \"circInOut\";\r\n Ease[\"bounceIn\"] = \"bounceIn\";\r\n Ease[\"bounceOut\"] = \"bounceOut\";\r\n Ease[\"bounceInOut\"] = \"bounceInOut\";\r\n Ease[\"elasticIn\"] = \"elasticIn\";\r\n Ease[\"elasticOut\"] = \"elasticOut\";\r\n Ease[\"elasticInOut\"] = \"elasticInOut\";\r\n})(Ease || (Ease = {}));\r\nexport function get(amount) {\r\n if (amount < -1) {\r\n amount = -1;\r\n }\r\n if (amount > 1) {\r\n amount = 1;\r\n }\r\n return function (t) {\r\n if (amount == 0) {\r\n return t;\r\n }\r\n if (amount < 0) {\r\n return t * (t * -amount + 1 + amount);\r\n }\r\n return t * ((2 - t) * amount + (1 - amount));\r\n };\r\n}\r\nexport function getPowIn(pow) {\r\n return function (t) {\r\n return Math.pow(t, pow);\r\n };\r\n}\r\nexport function getPowOut(pow) {\r\n return function (t) {\r\n return 1 - Math.pow(1 - t, pow);\r\n };\r\n}\r\nexport function getPowInOut(pow) {\r\n return function (t) {\r\n if ((t *= 2) < 1)\r\n return 0.5 * Math.pow(t, pow);\r\n return 1 - 0.5 * Math.abs(Math.pow(2 - t, pow));\r\n };\r\n}\r\nexport var quadIn = getPowIn(2);\r\nexport var quadOut = getPowOut(2);\r\nexport var quadInOut = getPowInOut(2);\r\nexport var cubicIn = getPowIn(3);\r\nexport var cubicOut = getPowOut(3);\r\nexport var cubicInOut = getPowInOut(3);\r\nexport var quartIn = getPowIn(4);\r\nexport var quartOut = getPowOut(4);\r\nexport var quartInOut = getPowInOut(4);\r\nexport var quintIn = getPowIn(5);\r\nexport var quintOut = getPowOut(5);\r\nexport var quintInOut = getPowInOut(5);\r\nexport function sineIn(t) {\r\n return 1 - Math.cos(t * Math.PI / 2);\r\n}\r\nexport function sineOut(t) {\r\n return Math.sin(t * Math.PI / 2);\r\n}\r\nexport function sineInOut(t) {\r\n return -0.5 * (Math.cos(Math.PI * t) - 1);\r\n}\r\nexport function getBackIn(amount) {\r\n return function (t) {\r\n return t * t * ((amount + 1) * t - amount);\r\n };\r\n}\r\nexport var backIn = getBackIn(1.7);\r\nexport function getBackOut(amount) {\r\n return function (t) {\r\n return (--t * t * ((amount + 1) * t + amount) + 1);\r\n };\r\n}\r\nexport var backOut = getBackOut(1.7);\r\nexport function getBackInOut(amount) {\r\n amount *= 1.525;\r\n return function (t) {\r\n if ((t *= 2) < 1)\r\n return 0.5 * (t * t * ((amount + 1) * t - amount));\r\n return 0.5 * ((t -= 2) * t * ((amount + 1) * t + amount) + 2);\r\n };\r\n}\r\nexport var backInOut = getBackInOut(1.7);\r\nexport function circIn(t) {\r\n return -(Math.sqrt(1 - t * t) - 1);\r\n}\r\nexport function circOut(t) {\r\n return Math.sqrt(1 - (--t) * t);\r\n}\r\nexport function circInOut(t) {\r\n if ((t *= 2) < 1) {\r\n return -0.5 * (Math.sqrt(1 - t * t) - 1);\r\n }\r\n return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\r\n}\r\nexport function bounceIn(t) {\r\n return 1 - bounceOut(1 - t);\r\n}\r\nexport function bounceOut(t) {\r\n if (t < 1 / 2.75) {\r\n return (7.5625 * t * t);\r\n }\r\n else if (t < 2 / 2.75) {\r\n return (7.5625 * (t -= 1.5 / 2.75) * t + 0.75);\r\n }\r\n else if (t < 2.5 / 2.75) {\r\n return (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375);\r\n }\r\n else {\r\n return (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375);\r\n }\r\n}\r\nexport function bounceInOut(t) {\r\n if (t < 0.5)\r\n return bounceIn(t * 2) * .5;\r\n return bounceOut(t * 2 - 1) * 0.5 + 0.5;\r\n}\r\nexport function getElasticIn(amplitude, period) {\r\n var pi2 = Math.PI * 2;\r\n return function (t) {\r\n if (t == 0 || t == 1)\r\n return t;\r\n var s = period / pi2 * Math.asin(1 / amplitude);\r\n return -(amplitude * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * pi2 / period));\r\n };\r\n}\r\nexport var elasticIn = getElasticIn(1, 0.3);\r\nexport function getElasticOut(amplitude, period) {\r\n var pi2 = Math.PI * 2;\r\n return function (t) {\r\n if (t == 0 || t == 1)\r\n return t;\r\n var s = period / pi2 * Math.asin(1 / amplitude);\r\n return (amplitude * Math.pow(2, -10 * t) * Math.sin((t - s) * pi2 / period) + 1);\r\n };\r\n}\r\nexport var elasticOut = getElasticOut(1, 0.3);\r\nexport function getElasticInOut(amplitude, period) {\r\n var pi2 = Math.PI * 2;\r\n return function (t) {\r\n var s = period / pi2 * Math.asin(1 / amplitude);\r\n if ((t *= 2) < 1)\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * pi2 / period));\r\n return amplitude * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * pi2 / period) * 0.5 + 1;\r\n };\r\n}\r\nexport var elasticInOut = getElasticInOut(1, 0.3 * 1.5);\r\n//# sourceMappingURL=ease.js.map"}
{"map":"{\"version\":3,\"file\":\"ScillaComponent.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/ScillaComponent.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE9C,IAAM,cAAc,GAAG;IACtB,uBAAuB;IACvB,sBAAsB;IACtB,qBAAqB;CACrB,CAAC;AAKF;IAAqC,2CAAU;IAA/C;QAAA,qEAsPC;QAjPU,oBAAc,GAAG,EAAE,CAA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ElB,CAAC;IAED,sBAAI,sCAAS;aAAb;YACC,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,2BAA2B,CAAC,CAAC;QAC9D,CAAC;;;OAAA;IASD,mCAAS,GAAT,UAAU,MAAM,EAAE,KAAU;QAAV,sBAAA,EAAA,SAAS,CAAC;QAAE,gBAAS;aAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;YAAT,+BAAS;;;QACtC,CAAA,KAAA,IAAI,CAAC,MAAM,CAAA,CAAC,SAAS,6BAAC,MAAM,EAAE,KAAK,GAAK,MAAM,GAAE;IACjD,CAAC;IAQD,kCAAQ,GAAR,UAAS,MAAM;QAAE,gBAAS;aAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;YAAT,+BAAS;;;QACzB,CAAA,KAAA,IAAI,CAAC,MAAM,CAAA,CAAC,QAAQ,6BAAC,MAAM,GAAK,MAAM,GAAE;IACzC,CAAC;IACF,sBAAC;AAAD,CAAC,AAtPD,CAAqC,UAAU,GAsP9C\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport HashObject from \"./HashObject\";\r\nimport { EngineConfig } from \"../engine-config\";\r\nvar interactiveMap = [\r\n '_dealGlobalTouchBegin',\r\n '_dealGlobalTouchMove',\r\n '_dealGlobalTouchEnd',\r\n];\r\nvar ScillaComponent = (function (_super) {\r\n tslib_1.__extends(ScillaComponent, _super);\r\n function ScillaComponent() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.delayCallbacks = [];\r\n _this._enabled = EngineConfig.componentEnabled;\r\n return _this;\r\n }\r\n Object.defineProperty(ScillaComponent.prototype, \"enabled\", {\r\n get: function () {\r\n return this._enabled;\r\n },\r\n set: function (value) {\r\n if (this._enabled !== value) {\r\n this._enabled = value;\r\n if (this.entity && this.entity.isActive) {\r\n if (this._enabled) {\r\n this.onEnable();\r\n }\r\n else {\r\n this.onDisable();\r\n }\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ScillaComponent.prototype._setup = function (entity) {\r\n this.entity = entity;\r\n this.onCreate();\r\n };\r\n ScillaComponent.prototype._unSetup = function () {\r\n this.entity = null;\r\n this.onDestroy();\r\n };\r\n ScillaComponent.prototype.onCreate = function () {\r\n };\r\n ScillaComponent.prototype.onAwake = function () {\r\n this._firstUpdate = true;\r\n };\r\n ScillaComponent.prototype.onEnable = function () {\r\n };\r\n ScillaComponent.prototype.onDisable = function () {\r\n };\r\n ScillaComponent.prototype.$onUpdate = function (t) {\r\n this.onUpdate(t);\r\n if (!this._firstUpdate) {\r\n this.invokeDelayCallback(t);\r\n }\r\n this._firstUpdate = false;\r\n };\r\n ScillaComponent.prototype.invokeDelayCallback = function (t) {\r\n var e_1, _a;\r\n var removed = [];\r\n if (this.entity.name.indexOf('progress') >= 0) {\r\n console.log();\r\n }\r\n for (var i = 0, li = this.delayCallbacks.length; i < li; i++) {\r\n var _b = this.delayCallbacks[i], callback = _b.callback, once = _b.once;\r\n if (once) {\r\n removed.push(i);\r\n }\r\n callback.call(this, t);\r\n }\r\n try {\r\n for (var removed_1 = tslib_1.__values(removed), removed_1_1 = removed_1.next(); !removed_1_1.done; removed_1_1 = removed_1.next()) {\r\n var item = removed_1_1.value;\r\n this.delayCallbacks.splice(item, 1);\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (removed_1_1 && !removed_1_1.done && (_a = removed_1.return)) _a.call(removed_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n };\r\n ScillaComponent.prototype.onUpdate = function (t) {\r\n };\r\n ScillaComponent.prototype.afterUpdate = function () {\r\n };\r\n ScillaComponent.prototype.onSleep = function () {\r\n };\r\n ScillaComponent.prototype.onDestroy = function () {\r\n };\r\n ScillaComponent.prototype.onModify = function (value, key, oldValue) {\r\n };\r\n ScillaComponent.prototype.getDelayCallback = function (callback) {\r\n var e_2, _a;\r\n var result;\r\n try {\r\n for (var _b = tslib_1.__values(this.delayCallbacks), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var item = _c.value;\r\n if (item.callback == callback) {\r\n result = item;\r\n break;\r\n }\r\n }\r\n }\r\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_2) throw e_2.error; }\r\n }\r\n return result;\r\n };\r\n ScillaComponent.prototype.callOnNextTick = function (callback, once) {\r\n if (once === void 0) { once = true; }\r\n var item = this.getDelayCallback(callback);\r\n if (!item) {\r\n this.delayCallbacks.push({ callback: callback, once: once });\r\n }\r\n };\r\n ScillaComponent.prototype.cancelOnNextTick = function (callback) {\r\n var item = this.getDelayCallback(callback);\r\n var index = this.delayCallbacks.indexOf(item);\r\n if (index >= 0) {\r\n this.delayCallbacks.splice(index, 1);\r\n }\r\n };\r\n ScillaComponent.prototype.onInteract = function (type, event) {\r\n try {\r\n var hitOn = this[interactiveMap[type]](event);\r\n return hitOn && this['touchInterrupt'];\r\n }\r\n catch (e) {\r\n console.warn(e);\r\n }\r\n };\r\n ScillaComponent.prototype._dealGlobalTouchBegin = function (e) {\r\n return this.onGlobalTouchBegin(e);\r\n };\r\n ScillaComponent.prototype._dealGlobalTouchMove = function (e) {\r\n return this.onGlobalTouchMove(e);\r\n };\r\n ScillaComponent.prototype._dealGlobalTouchEnd = function (e) {\r\n return this.onGlobalTouchEnd(e);\r\n };\r\n ScillaComponent.prototype.onGlobalTouchBegin = function (e) {\r\n };\r\n ScillaComponent.prototype.onGlobalTouchMove = function (e) {\r\n };\r\n ScillaComponent.prototype.onGlobalTouchEnd = function (e) {\r\n };\r\n Object.defineProperty(ScillaComponent.prototype, \"transform\", {\r\n get: function () {\r\n return this.entity.getComponent('components/base/Transform');\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ScillaComponent.prototype.broadcast = function (method, level) {\r\n if (level === void 0) { level = -1; }\r\n var params = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n params[_i - 2] = arguments[_i];\r\n }\r\n var _a;\r\n (_a = this.entity).broadcast.apply(_a, tslib_1.__spread([method, level], params));\r\n };\r\n ScillaComponent.prototype.bubbling = function (method) {\r\n var params = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n params[_i - 1] = arguments[_i];\r\n }\r\n var _a;\r\n (_a = this.entity).bubbling.apply(_a, tslib_1.__spread([method], params));\r\n };\r\n return ScillaComponent;\r\n}(HashObject));\r\nexport { ScillaComponent };\r\n//# sourceMappingURL=ScillaComponent.js.map"}
{"map":"{\"version\":3,\"file\":\"Sheet.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/Sheet.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAKxC;IAA2B,iCAAU;IAYpC,eAAY,GAAI,EAAE,MAAO;QAAzB,YACC,iBAAO,SAQP;QAXO,mBAAa,GAAQ,EAAE,CAAC;QAK/B,IAAG,GAAG,EAAC;YACN,KAAI,CAAC,GAAG,GAAG,GAAG,CAAC;SACf;QACD,IAAG,MAAM,EAAC;YACT,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;SACrB;;IACF,CAAC;IAKD,2BAAW,GAAX;QACC,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE;YAC5B,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;SAC1B;IACF,CAAC;IAOD,+BAAe,GAAf,UAAgB,IAAI,EAAE,KAAa;QAAb,sBAAA,EAAA,aAAa;QAC5B,IAAA,SAAmC,EAAlC,YAAG,EAAE,kBAAM,EAAE,gCAAqB,CAAC;QAE1C,IAAI,CAAC,KAAK,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE;YAClC,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;SAC3B;QAED,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,KAAK,EAAE;YACV,OAAO,aAAa,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SACvD;IACF,CAAC;IAMD,0BAAU,GAAV,UAAW,IAAI;QACd,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAMD,0BAAU,GAAV,UAAW,IAAI;QACd,IAAI,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,OAAO,EAAE;YACZ,OAAO,OAAO,CAAC;SACf;aAAM;YACN,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;SAClC;IACF,CAAC;IAKD,8BAAc,GAAd;QACC,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IAKD,uBAAO,GAAP;QACC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAEhB,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,aAAa,EAAE;YACnC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;YAClC,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;SAC/B;IACF,CAAC;IACF,YAAC;AAAD,CAAC,AAzFD,CAA2B,UAAU,GAyFpC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport HashObject from \"../core/HashObject\";\r\nimport { createTexture } from \"./Texture\";\r\nvar Sheet = (function (_super) {\r\n tslib_1.__extends(Sheet, _super);\r\n function Sheet(img, frames) {\r\n var _this = _super.call(this) || this;\r\n _this._textureCache = {};\r\n if (img) {\r\n _this.img = img;\r\n }\r\n if (frames) {\r\n _this.frames = frames;\r\n }\r\n return _this;\r\n }\r\n Sheet.prototype.generateAll = function () {\r\n for (var key in this.frames) {\r\n this.generateTexture(key);\r\n }\r\n };\r\n Sheet.prototype.generateTexture = function (name, force) {\r\n if (force === void 0) { force = false; }\r\n var _a = this, img = _a.img, frames = _a.frames, _textureCache = _a._textureCache;\r\n if (!force && _textureCache[name]) {\r\n return _textureCache[name];\r\n }\r\n var frame = frames[name];\r\n if (frame) {\r\n return _textureCache[name] = createTexture(img, frame);\r\n }\r\n };\r\n Sheet.prototype.hasTexture = function (name) {\r\n return !!frames[name];\r\n };\r\n Sheet.prototype.getTexture = function (name) {\r\n var texture = this._textureCache[name];\r\n if (texture) {\r\n return texture;\r\n }\r\n else {\r\n return this.generateTexture(name);\r\n }\r\n };\r\n Sheet.prototype.getAllTextures = function () {\r\n return this._textureCache;\r\n };\r\n Sheet.prototype.destroy = function () {\r\n this.img = null;\r\n for (var key in this._textureCache) {\r\n this._textureCache[key].destroy();\r\n delete this._textureCache[key];\r\n }\r\n };\r\n return Sheet;\r\n}(HashObject));\r\nexport { Sheet };\r\n//# sourceMappingURL=Sheet.js.map"}
{"map":"{\"version\":3,\"file\":\"main.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/main.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EACN,KAAK,EACL,WAAW,EAAE,kBAAkB,EAC/B,QAAQ,EACR,UAAU,EACV,KAAK,GACL,MAAM,QAAQ,CAAA;AAEf,OAAO,yBAAyB,CAAA;AAEhC,OAAO,aAAa,EAAE,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAEpD,kBAAkB,CAAC;IAClB,eAAe,EAAE,GAAG;IACpB,aAAa,EAAE,KAAK;IACpB,uBAAuB,EAAE,KAAK;IAC9B,yBAAyB,EAAE,KAAK;IAChC,cAAc,EAAE,KAAK;CACrB,CAAC,CAAC;AAEH,MAAM,UAAgB,OAAO,CAAC,gBAAgB,EAAE,OAAO,EAAE,UAAU;;;;;wBACjD,WAAM,QAAQ,CAAC,eAAe,CAAC,EAAA;;oBAA1C,QAAQ,GAAG,SAA+B;oBAEhD,MAAM,CAAC,QAAQ,CAAC,CAAC;oBACjB,MAAM,CAAC,OAAO,CAAC,CAAC;oBAEhB,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;oBAElD,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;oBAC9C,gBAAgB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;oBAEjC,MAAM,GAAG;wBACZ,MAAM,QAAA;qBACN,CAAC;oBACF,IAAI,OAAO,CAAC,MAAM,EAAE;wBACnB,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;qBACzC;oBACD,KAAK,CAAC,MAAM,CAAC,CAAC;oBAEd,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,UAAA,CAAC;wBACtC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBAChB,CAAC,CAAC,CAAC;;;;;CACH\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { setup, launchScene, modifyEngineConfig, loadJson, setResPath, utils, } from 'scilla';\r\nimport './generated/MustCompile';\r\nimport launchOptions, { inject } from \"launchOptions\";\r\nmodifyEngineConfig({\r\n lineHeightRatio: 1.2,\r\n entityEnabled: false,\r\n awakeComponentWhenAdded: false,\r\n sleepComponentWhenRemoved: false,\r\n drawRenderRect: false,\r\n});\r\nexport function startup(containerElement, options, onProgress) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var manifest, canvas, config;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadJson('manifest.json')];\r\n case 1:\r\n manifest = _a.sent();\r\n inject(manifest);\r\n inject(options);\r\n setResPath(DEBUG ? 'assets/' : launchOptions.resPath);\r\n canvas = document.createElement('canvas');\r\n containerElement.appendChild(canvas);\r\n config = {\r\n canvas: canvas,\r\n };\r\n if (options.config) {\r\n utils.injectProp(config, options.config);\r\n }\r\n setup(config);\r\n launchScene('main', onProgress).catch(function (e) {\r\n console.log(e);\r\n });\r\n return [2];\r\n }\r\n });\r\n });\r\n}\r\n//# sourceMappingURL=main.js.map"}
{"map":"{\"version\":3,\"file\":\"Scene.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/Scene.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAE/C;IAAA;QAGC,mBAAc,GAAQ;YACrB,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,EAAE;SACT,CAAC;IAiBH,CAAC;IAbA,4BAAY,GAAZ,UAAa,MAAM;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QAExB,IAAM,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACjD,KAAI,IAAI,GAAG,IAAI,cAAc,EAAC;YAC7B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;SAC/C;IACF,CAAC;IAEK,4BAAY,GAAlB,UAAmB,IAAI,EAAE,QAAS;;;;4BACjC,WAAM,YAAY,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,EAAA;;wBAAvD,SAAuD,CAAC;;;;;KACxD;IACF,YAAC;AAAD,CAAC,AAvBD,IAuBC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { loadResItems } from \"../assets-manager\";\r\nvar Scene = (function () {\r\n function Scene() {\r\n this.resourceGroups = {\r\n preload: [],\r\n delay: [],\r\n };\r\n }\r\n Scene.prototype.initByConfig = function (config) {\r\n this.config = config;\r\n this.name = config.name;\r\n var resourceGroups = config['resource-groups'];\r\n for (var key in resourceGroups) {\r\n this.resourceGroups[key] = resourceGroups[key];\r\n }\r\n };\r\n Scene.prototype.loadResGroup = function (name, progress) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadResItems(this.resourceGroups[name], progress)];\r\n case 1:\r\n _a.sent();\r\n return [2];\r\n }\r\n });\r\n });\r\n };\r\n return Scene;\r\n}());\r\nexport { Scene };\r\n//# sourceMappingURL=Scene.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../node_modules/scilla-core/src/index.ts\"],\"names\":[],\"mappings\":\"AAIA,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA\"}","code":"export * from './core';\r\nexport * from './editor';\r\nexport * from './assets-manager';\r\nexport * from './support';\r\nexport * from './tools';\r\nexport * from './filter';\r\nexport * from './engine-config';\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"engine-config.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../node_modules/scilla-core/src/engine-config.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAEzC,MAAM,CAAC,IAAM,YAAY,GAAG;IAC3B,eAAe,EAAE,GAAG;IACpB,aAAa,EAAE,IAAI;IACnB,gBAAgB,EAAE,IAAI;IACtB,uBAAuB,EAAE,IAAI;IAC7B,yBAAyB,EAAE,IAAI;IAC/B,cAAc,EAAE,KAAK;IACrB,cAAc,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,QAAQ;IAC1C,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AACpC,CAAC\"}","code":"import { injectProp } from \"./tools/utils\";\r\nexport var EngineConfig = {\r\n lineHeightRatio: 1.2,\r\n entityEnabled: true,\r\n componentEnabled: true,\r\n awakeComponentWhenAdded: true,\r\n sleepComponentWhenRemoved: true,\r\n drawRenderRect: false,\r\n imgCrossOrigin: true,\r\n};\r\nexport function modifyEngineConfig(_options) {\r\n injectProp(EngineConfig, _options);\r\n}\r\n//# sourceMappingURL=engine-config.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/filter/index.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC\"}","code":"export { ShadowFilter } from './Filters';\r\nexport { ColorFilter } from './Filters';\r\nexport { ColorMatrixFilter } from './Filters';\r\nexport { BlurFilter } from './Filters';\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"Entity.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/Entity.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAW9C,MAAM,UAAU,QAAQ,CAAC,MAAc,EAAE,QAA+C,EAAE,KAAU,EAAE,WAAmB,EAAE,YAAwC;IAAzE,sBAAA,EAAA,SAAS,CAAC;IAAE,4BAAA,EAAA,mBAAmB;IAA4C,gBAAS;SAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;QAAT,+BAAS;;;IAC7K,IAAI,SAAS,CAAC;IACd,IAAI,WAAW,EAAE;QAChB,QAAQ,iCAAC,MAAM,GAAK,MAAM,GAAE;KAC5B;IAED,IAAI,KAAK,KAAK,CAAC,EAAE;;YAChB,KAAkB,IAAA,KAAA,iBAAA,MAAM,CAAC,QAAQ,CAAA,gBAAA,4BAAE;gBAA9B,IAAI,KAAK,WAAA;g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AC,IAAI,CAAC,CAAC;QACvB,IAAI,YAAY,CAAC,uBAAuB,EAAE;YACzC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;SAC/B;IACF,CAAC;IAMD,+BAAc,GAAd,UAAe,SAAS;QACvB,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACnC,SAAS,CAAC,OAAO,EAAE,CAAC;SACpB;IACF,CAAC;IAMD,kCAAiB,GAAjB,UAAkB,SAA0B;QAC3C,IAAI,YAAY,CAAC,yBAAyB,EAAE;YAC3C,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;SAC/B;QACD,SAAS,CAAC,QAAQ,EAAE,CAAC;IACtB,CAAC;IAMD,+BAAc,GAAd,UAAe,SAAS;QACvB,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACnC,SAAS,CAAC,OAAO,EAAE,CAAC;SACpB;IACF,CAAC;IASD,0BAAS,GAAT,UAAU,MAAM,EAAE,KAAU;QAAV,sBAAA,EAAA,SAAS,CAAC;QAAE,gBAAS;aAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;YAAT,+BAAS;;QACtC,QAAQ,iCAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAK,MAAM,GAAC;IAC1E,CAAC;IAQD,yBAAQ,GAAR,UAAS,MAAM;QAAE,gBAAS;aAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;YAAT,+BAAS;;QACzB,QAAQ,iCAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,MAAM,GAAK,MAAM,GAAE;IAC/D,CAAC;IAwBF,aAAC;AAAD,CAAC,AAjeD,CAA4B,UAAU,GAierC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport HashObject from \"./HashObject\";\r\nimport { EngineConfig } from \"../engine-config\";\r\nexport function traverse(target, hitChild, level, includeSelf, fullCallback) {\r\n if (level === void 0) { level = -1; }\r\n if (includeSelf === void 0) { includeSelf = false; }\r\n var params = [];\r\n for (var _i = 5; _i < arguments.length; _i++) {\r\n params[_i - 5] = arguments[_i];\r\n }\r\n var e_1, _a;\r\n var interrupt;\r\n if (includeSelf) {\r\n hitChild.apply(void 0, tslib_1.__spread([target], params));\r\n }\r\n if (level !== 0) {\r\n try {\r\n for (var _b = tslib_1.__values(target.children), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var child = _c.value;\r\n if (hitChild.apply(void 0, tslib_1.__spread([child], params))) {\r\n interrupt = true;\r\n continue;\r\n }\r\n if (child.children.length > 0) {\r\n traverse.apply(void 0, tslib_1.__spread([child, hitChild, level - 1, false, fullCallback], params));\r\n }\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n }\r\n !interrupt && fullCallback && fullCallback(target);\r\n}\r\nexport function traversePostorder(target, hitChild, level, includeSelf, fullCallback) {\r\n if (level === void 0) { level = -1; }\r\n if (includeSelf === void 0) { includeSelf = false; }\r\n var params = [];\r\n for (var _i = 5; _i < arguments.length; _i++) {\r\n params[_i - 5] = arguments[_i];\r\n }\r\n var interrupt;\r\n if (level !== 0) {\r\n for (var i = target.children.length - 1; i >= 0; i--) {\r\n var child = target.children[i];\r\n if (traversePostorder.apply(void 0, tslib_1.__spread([child, hitChild, level - 1, false, fullCallback], params))) {\r\n return true;\r\n }\r\n if (hitChild.apply(void 0, tslib_1.__spread([child], params))) {\r\n return true;\r\n }\r\n }\r\n }\r\n if (includeSelf) {\r\n hitChild.apply(void 0, tslib_1.__spread([target], params));\r\n }\r\n !interrupt && fullCallback && fullCallback(target);\r\n}\r\nexport function bubbling(target, hitParent, includeSelf) {\r\n if (includeSelf === void 0) { includeSelf = false; }\r\n var params = [];\r\n for (var _i = 3; _i < arguments.length; _i++) {\r\n params[_i - 3] = arguments[_i];\r\n }\r\n if (includeSelf) {\r\n hitParent.apply(void 0, tslib_1.__spread([target], params));\r\n }\r\n var entity = target;\r\n while (entity = entity.parent) {\r\n if (hitParent.apply(void 0, tslib_1.__spread([entity], params))) {\r\n break;\r\n }\r\n }\r\n}\r\nvar Entity = (function (_super) {\r\n tslib_1.__extends(Entity, _super);\r\n function Entity(name, uuid) {\r\n var _this = _super.call(this) || this;\r\n _this.name = 'Entity';\r\n _this._isFree = true;\r\n _this._enabled = EngineConfig.entityEnabled;\r\n _this._parent = null;\r\n _this._children = [];\r\n _this._components = [];\r\n _this.invokeOnEntity = function (hitEntity, method) {\r\n var params = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n params[_i - 2] = arguments[_i];\r\n }\r\n var hitBreak = false;\r\n hitEntity.forEachComponent(function (comp) {\r\n var m = comp[method];\r\n if (m) {\r\n var result = m.apply(comp, params);\r\n if (result) {\r\n hitBreak = true;\r\n }\r\n }\r\n return false;\r\n });\r\n if (hitBreak) {\r\n return true;\r\n }\r\n };\r\n if (name) {\r\n _this.name = name;\r\n }\r\n if (uuid) {\r\n _this._uuid = uuid;\r\n }\r\n return _this;\r\n }\r\n Object.defineProperty(Entity.prototype, \"uuid\", {\r\n get: function () {\r\n return this._uuid;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Entity.prototype, \"enabled\", {\r\n get: function () {\r\n return this._enabled;\r\n },\r\n set: function (value) {\r\n if (this._enabled !== value) {\r\n this._enabled = value;\r\n traverse(this, function (child) {\r\n child._invokeEnabledState(value);\r\n return false;\r\n }, -1, true);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Entity.prototype._invokeEnabledState = function (enabled) {\r\n if (this._enabled && enabled) {\r\n this.onEnable();\r\n }\r\n else if (!this._enabled && !enabled) {\r\n this.onDisable();\r\n }\r\n };\r\n Object.defineProperty(Entity.prototype, \"isParentActive\", {\r\n get: function () {\r\n return this._parent && this._parent.enabled && !this._parent.isFree;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Entity.prototype, \"isActive\", {\r\n get: function () {\r\n return this.isParentActive && this._enabled;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Entity.prototype, \"isFree\", {\r\n get: function () {\r\n return this._isFree;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Entity.prototype._free = function () {\r\n this._isFree = true;\r\n var that = this;\r\n traverse(this, function (child) {\r\n child._free();\r\n return false;\r\n }, 1);\r\n };\r\n Entity.prototype._restrict = function () {\r\n this._isFree = false;\r\n var that = this;\r\n traverse(this, function (child) {\r\n child._restrict();\r\n return false;\r\n }, 1);\r\n };\r\n Object.defineProperty(Entity.prototype, \"parent\", {\r\n get: function () {\r\n return this._parent;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Entity.prototype.containsChild = function (child) {\r\n return this.getChildIndex(child) >= 0;\r\n };\r\n Entity.prototype._onChildAdded = function (child) {\r\n child._parent = this;\r\n if (!this._isFree && child._isFree) {\r\n if (child.isParentActive) {\r\n child._invokeEnabledState(true);\r\n }\r\n child._restrict();\r\n }\r\n };\r\n Entity.prototype._onChildRemoved = function (child) {\r\n child._parent = null;\r\n if (!this._isFree && !child._isFree) {\r\n if (child.isActive) {\r\n child._invokeEnabledState(false);\r\n }\r\n child._free();\r\n }\r\n };\r\n Entity.prototype.addChild = function (child) {\r\n this.addChildAt(child, this._children.length);\r\n };\r\n Entity.prototype.addChildAt = function (child, index) {\r\n if (child.parent && child.parent !== this) {\r\n child.parent.removeChild(child);\r\n }\r\n var currentIndex = this.getChildIndex(child);\r\n if (index < 0 || currentIndex == index) {\r\n return;\r\n }\r\n index = Math.min(this._children.length, index);\r\n if (currentIndex >= 0 || index < this._children.length) {\r\n if (currentIndex >= 0) {\r\n this._children.splice(currentIndex, 1);\r\n }\r\n this._children.splice(index, 0, child);\r\n }\r\n else {\r\n this._children.push(child);\r\n }\r\n this._onChildAdded(child);\r\n };\r\n Entity.prototype.removeChild = function (child) {\r\n var index = this.getChildIndex(child);\r\n if (index >= 0) {\r\n this.removeChildAt(index);\r\n }\r\n };\r\n Entity.prototype.removeChildAt = function (index) {\r\n var child = this._children[index];\r\n this._onChildRemoved(child);\r\n this._children.splice(index, 1);\r\n };\r\n Entity.prototype.getChildIndex = function (child) {\r\n return this._children.indexOf(child);\r\n };\r\n Entity.prototype.getChildByIndex = function (index) {\r\n return this._children[index];\r\n };\r\n Entity.prototype.removeChildren = function () {\r\n while (this._children.length > 0) {\r\n this.removeChildAt(0);\r\n }\r\n };\r\n Object.defineProperty(Entity.prototype, \"children\", {\r\n get: function () {\r\n return this._children;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Entity.prototype.addComponent = function (component) {\r\n this.onAddComponent(component);\r\n this._components.push(component);\r\n };\r\n Entity.prototype.addComponentAt = function (component, index) {\r\n var currentIndex = this._components.indexOf(component);\r\n if (currentIndex == index) {\r\n return;\r\n }\r\n if (currentIndex >= 0) {\r\n this._components.splice(currentIndex, 1);\r\n }\r\n this._components.splice(index, 0, component);\r\n this.onAddComponent(component);\r\n };\r\n Entity.prototype.removeComponent = function (component) {\r\n this.onRemoveComponent(component);\r\n var index = this._components.indexOf(component);\r\n if (index >= 0) {\r\n this._components.splice(index, 1);\r\n }\r\n };\r\n Entity.prototype.removeAllComponents = function () {\r\n while (this._components.length > 0) {\r\n this.removeComponent(this._components[0]);\r\n }\r\n };\r\n Entity.prototype.getComponents = function (clazz) {\r\n return this._components.filter(function (component) {\r\n return typeof clazz === 'string' ? component.constructor.__class__ === clazz : component instanceof clazz;\r\n });\r\n };\r\n Entity.prototype.getComponent = function (clazz) {\r\n return this.getComponents(clazz)[0];\r\n };\r\n Object.defineProperty(Entity.prototype, \"components\", {\r\n get: function () {\r\n return this._components;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Entity.prototype.forEachComponent = function (func) {\r\n var e_2, _a;\r\n try {\r\n for (var _b = tslib_1.__values(this._components), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var component = _c.value;\r\n if (func(component)) {\r\n break;\r\n }\r\n }\r\n }\r\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_2) throw e_2.error; }\r\n }\r\n };\r\n Entity.prototype.onEnable = function () {\r\n this.forEachComponent(function (comp) {\r\n if (comp.enabled) {\r\n return comp.onAwake();\r\n }\r\n });\r\n };\r\n Entity.prototype.onDisable = function () {\r\n this.forEachComponent(function (comp) {\r\n if (comp.enabled) {\r\n return comp.onSleep();\r\n }\r\n });\r\n };\r\n Entity.prototype.onUpdate = function (t) {\r\n this.forEachComponent(function (comp) {\r\n if (comp.enabled) {\r\n return comp.$onUpdate(t);\r\n }\r\n });\r\n };\r\n Entity.prototype.afterUpdate = function () {\r\n this.forEachComponent(function (comp) {\r\n if (comp.enabled) {\r\n return comp.afterUpdate();\r\n }\r\n });\r\n };\r\n Entity.prototype.onInteract = function (type, event) {\r\n if (!this.isFree && this.enabled) {\r\n var interrupt_1 = false;\r\n this.forEachComponent(function (comp) {\r\n if (comp.enabled && comp.interactable) {\r\n var r = comp.onInteract(type, event);\r\n if (r) {\r\n interrupt_1 = true;\r\n }\r\n return false;\r\n }\r\n });\r\n return interrupt_1;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n Entity.prototype.onAddComponent = function (component) {\r\n component._setup(this);\r\n if (EngineConfig.awakeComponentWhenAdded) {\r\n this.awakeComponent(component);\r\n }\r\n };\r\n Entity.prototype.awakeComponent = function (component) {\r\n if (!this._isFree && this._enabled) {\r\n component.onAwake();\r\n }\r\n };\r\n Entity.prototype.onRemoveComponent = function (component) {\r\n if (EngineConfig.sleepComponentWhenRemoved) {\r\n this.sleepComponent(component);\r\n }\r\n component._unSetup();\r\n };\r\n Entity.prototype.sleepComponent = function (component) {\r\n if (!this._isFree && this._enabled) {\r\n component.onSleep();\r\n }\r\n };\r\n Entity.prototype.broadcast = function (method, level) {\r\n if (level === void 0) { level = -1; }\r\n var params = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n params[_i - 2] = arguments[_i];\r\n }\r\n traverse.apply(void 0, tslib_1.__spread([this, this.invokeOnEntity, level, true, null, method], params));\r\n };\r\n Entity.prototype.bubbling = function (method) {\r\n var params = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n params[_i - 1] = arguments[_i];\r\n }\r\n bubbling.apply(void 0, tslib_1.__spread([this, this.invokeOnEntity, false, method], params));\r\n };\r\n return Entity;\r\n}(HashObject));\r\nexport { Entity };\r\n//# sourceMappingURL=Entity.js.map"}
{"map":"{\"version\":3,\"file\":\"decorators.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/tools/decorators.ts\"],\"names\":[],\"mappings\":\"AAUA,MAAM,UAAU,YAAY,CAAC,QAAQ;IACpC,OAAO,UAAU,MAAW,EAAE,GAAW;QACxC,IAAM,UAAU,GAAG,GAAG,GAAG,GAAG,CAAC;QAC7B,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;YAClC,UAAU,EAAE,IAAI;YAChB,GAAG,EAAE;gBACJ,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC;YACzB,CAAC;YACD,GAAG,EAAE,UAAU,CAAC;gBACf,IAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;gBAClC,IAAI,QAAQ,KAAK,CAAC,EAAE;oBACnB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;oBACrB,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;iBACzC;YACF,CAAC;SACD,CAAC,CAAA;IACH,CAAC,CAAA;AACF,CAAC;AAKD,MAAM,CAAC,IAAM,kBAAkB,GAAG,YAAY,CAC7C,UAAU,KAAK,EAAE,GAAG,EAAE,QAAQ;IAC7B,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AACtB,CAAC,CACD,CAAC;AAKF,MAAM,CAAC,IAAM,iBAAiB,GAAG,YAAY,CAC5C,UAAU,KAAK,EAAE,GAAG,EAAE,QAAQ;IAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC5D,CAAC,CACD,CAAC\"}","code":"export function fieldChanged(onChange) {\r\n return function (target, key) {\r\n var privateKey = '_' + key;\r\n Object.defineProperty(target, key, {\r\n enumerable: true,\r\n get: function () {\r\n return this[privateKey];\r\n },\r\n set: function (v) {\r\n var oldValue = this[privateKey];\r\n if (oldValue !== v) {\r\n this[privateKey] = v;\r\n onChange.apply(this, [v, key, oldValue]);\r\n }\r\n }\r\n });\r\n };\r\n}\r\nexport var dirtyFieldDetector = fieldChanged(function (value, key, oldValue) {\r\n this['dirty'] = true;\r\n});\r\nexport var dirtyFieldTrigger = fieldChanged(function (value, key, oldValue) {\r\n this['onModify'] && this['onModify'](value, key, oldValue);\r\n});\r\n//# sourceMappingURL=decorators.js.map"}
{"map":"{\"version\":3,\"file\":\"Filters.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/filter/Filters.ts\"],\"names\":[],\"mappings\":\"AAMA;IA0DI,sBAAmB,KAAuB,EAAE,OAAmB,EAAE,OAAmB,EAAE,IAAgB;QAAnF,sBAAA,EAAA,eAAuB;QAAE,wBAAA,EAAA,WAAmB;QAAE,wBAAA,EAAA,WAAmB;QAAE,qBAAA,EAAA,QAAgB;QAhD/F,UAAK,GAAW,OAAO,CAAC;QAUxB,YAAO,GAAW,CAAC,CAAC;QAUpB,YAAO,GAAW,CAAC,CAAC;QAUpB,SAAI,GAAW,CAAC,CAAC;QAUjB,SAAI,G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AE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IAmKlvC,iBAAC;CAAA,AAlOD,IAkOC;SAlOY,UAAU\"}","code":"var ShadowFilter = (function () {\r\n function ShadowFilter(color, offsetX, offsetY, blur) {\r\n if (color === void 0) { color = \"black\"; }\r\n if (offsetX === void 0) { offsetX = 2; }\r\n if (offsetY === void 0) { offsetY = 2; }\r\n if (blur === void 0) { blur = 2; }\r\n this.color = \"black\";\r\n this.offsetX = 2;\r\n this.offsetY = 2;\r\n this.blur = 2;\r\n this.type = \"Shadow\";\r\n var s = this;\r\n s.offsetX = offsetX;\r\n s.offsetY = offsetY;\r\n s.blur = blur;\r\n s.color = color;\r\n }\r\n ShadowFilter.prototype.toString = function () {\r\n var s = this;\r\n return s.type + s.offsetX + s.offsetY + s.blur + s.color;\r\n };\r\n ShadowFilter.prototype.drawFilter = function (imageData) {\r\n if (imageData === void 0) { imageData = null; }\r\n };\r\n ShadowFilter.prototype.destroy = function () {\r\n };\r\n return ShadowFilter;\r\n}());\r\nexport { ShadowFilter };\r\nvar ColorFilter = (function () {\r\n function ColorFilter(colorArrays) {\r\n this.redMultiplier = 0;\r\n this.redOffset = 0;\r\n this.greenMultiplier = 0;\r\n this.greenOffset = 0;\r\n this.blueMultiplier = 0;\r\n this.blueOffset = 0;\r\n this.alphaMultiplier = 0;\r\n this.alphaOffset = 0;\r\n this.type = \"Color\";\r\n var s = this;\r\n s.redMultiplier = colorArrays[0];\r\n s.greenMultiplier = colorArrays[1];\r\n s.blueMultiplier = colorArrays[2];\r\n s.alphaMultiplier = colorArrays[3];\r\n s.redOffset = colorArrays[4];\r\n s.greenOffset = colorArrays[5];\r\n s.blueOffset = colorArrays[6];\r\n s.alphaOffset = colorArrays[7];\r\n }\r\n ColorFilter.prototype.drawFilter = function (imageData) {\r\n if (imageData === void 0) { imageData = null; }\r\n if (!imageData)\r\n return;\r\n var s = this;\r\n var data = imageData.data;\r\n var l = data.length;\r\n for (var i = 0; i < l; i += 4) {\r\n data[i] = data[i] * s.redMultiplier + s.redOffset;\r\n data[i + 1] = data[i + 1] * s.greenMultiplier + s.greenOffset;\r\n data[i + 2] = data[i + 2] * s.blueMultiplier + s.blueOffset;\r\n data[i + 3] = data[i + 3] * s.alphaMultiplier + s.alphaOffset;\r\n }\r\n };\r\n ColorFilter.prototype.toString = function () {\r\n var s = this;\r\n return s.type + s.redMultiplier + s.greenMultiplier + s.blueMultiplier + s.alphaMultiplier + s.redOffset + s.greenOffset + s.blueOffset + s.alphaOffset;\r\n };\r\n ColorFilter.prototype.destroy = function () {\r\n };\r\n return ColorFilter;\r\n}());\r\nexport { ColorFilter };\r\nvar ColorMatrixFilter = (function () {\r\n function ColorMatrixFilter(brightness, contrast, saturation, hue) {\r\n this.brightness = 0;\r\n this.contrast = 0;\r\n this.saturation = 0;\r\n this.hue = 0;\r\n this.type = \"ColorMatrix\";\r\n var s = this;\r\n s.brightness = brightness;\r\n s.contrast = contrast;\r\n s.saturation = saturation;\r\n s.hue = hue;\r\n s.colorMatrix = [\r\n 1, 0, 0, 0, 0,\r\n 0, 1, 0, 0, 0,\r\n 0, 0, 1, 0, 0,\r\n 0, 0, 0, 1, 0,\r\n 0, 0, 0, 0, 1\r\n ];\r\n brightness = s._cleanValue(brightness, 255);\r\n if (brightness != 0) {\r\n s._multiplyMatrix([\r\n 1, 0, 0, 0, brightness,\r\n 0, 1, 0, 0, brightness,\r\n 0, 0, 1, 0, brightness,\r\n 0, 0, 0, 1, 0,\r\n 0, 0, 0, 0, 1\r\n ]);\r\n }\r\n contrast = this._cleanValue(contrast, 100);\r\n var x;\r\n if (contrast != 0) {\r\n if (contrast < 0) {\r\n x = 127 + contrast / 100 * 127;\r\n }\r\n else {\r\n x = contrast % 1;\r\n if (x == 0) {\r\n x = ColorMatrixFilter.DELTA_INDEX[contrast];\r\n }\r\n else {\r\n x = ColorMatrixFilter.DELTA_INDEX[(contrast << 0)] * (1 - x) + ColorMatrixFilter.DELTA_INDEX[(contrast << 0) + 1] * x;\r\n }\r\n x = x * 127 + 127;\r\n }\r\n s._multiplyMatrix([\r\n x / 127, 0, 0, 0, 0.5 * (127 - x),\r\n 0, x / 127, 0, 0, 0.5 * (127 - x),\r\n 0, 0, x / 127, 0, 0.5 * (127 - x),\r\n 0, 0, 0, 1, 0,\r\n 0, 0, 0, 0, 1\r\n ]);\r\n }\r\n saturation = this._cleanValue(saturation, 100);\r\n if (saturation != 0) {\r\n x = 1 + ((saturation > 0) ? 3 * saturation / 100 : saturation / 100);\r\n var lumR = 0.3086;\r\n var lumG = 0.6094;\r\n var lumB = 0.0820;\r\n s._multiplyMatrix([\r\n lumR * (1 - x) + x, lumG * (1 - x), lumB * (1 - x), 0, 0,\r\n lumR * (1 - x), lumG * (1 - x) + x, lumB * (1 - x), 0, 0,\r\n lumR * (1 - x), lumG * (1 - x), lumB * (1 - x) + x, 0, 0,\r\n 0, 0, 0, 1, 0,\r\n 0, 0, 0, 0, 1\r\n ]);\r\n }\r\n hue = this._cleanValue(hue, 180) / 180 * Math.PI;\r\n if (hue != 0) {\r\n var cosVal = Math.cos(hue);\r\n var sinVal = Math.sin(hue);\r\n var lumR = 0.213;\r\n var lumG = 0.715;\r\n var lumB = 0.072;\r\n s._multiplyMatrix([\r\n lumR + cosVal * (1 - lumR) + sinVal * (-lumR), lumG + cosVal * (-lumG) + sinVal * (-lumG), lumB + cosVal * (-lumB) + sinVal * (1 - lumB), 0, 0,\r\n lumR + cosVal * (-lumR) + sinVal * (0.143), lumG + cosVal * (1 - lumG) + sinVal * (0.140), lumB + cosVal * (-lumB) + sinVal * (-0.283), 0, 0,\r\n lumR + cosVal * (-lumR) + sinVal * (-(1 - lumR)), lumG + cosVal * (-lumG) + sinVal * (lumG), lumB + cosVal * (1 - lumB) + sinVal * (lumB), 0, 0,\r\n 0, 0, 0, 1, 0,\r\n 0, 0, 0, 0, 1\r\n ]);\r\n }\r\n }\r\n ColorMatrixFilter.prototype.drawFilter = function (imageData) {\r\n if (imageData === void 0) { imageData = null; }\r\n if (!imageData)\r\n return;\r\n var data = imageData.data;\r\n var l = data.length;\r\n var r, g, b, a;\r\n var mtx = this.colorMatrix;\r\n var m0 = mtx[0], m1 = mtx[1], m2 = mtx[2], m3 = mtx[3], m4 = mtx[4];\r\n var m5 = mtx[5], m6 = mtx[6], m7 = mtx[7], m8 = mtx[8], m9 = mtx[9];\r\n var m10 = mtx[10], m11 = mtx[11], m12 = mtx[12], m13 = mtx[13], m14 = mtx[14];\r\n var m15 = mtx[15], m16 = mtx[16], m17 = mtx[17], m18 = mtx[18], m19 = mtx[19];\r\n for (var i = 0; i < l; i += 4) {\r\n r = data[i];\r\n g = data[i + 1];\r\n b = data[i + 2];\r\n a = data[i + 3];\r\n data[i] = r * m0 + g * m1 + b * m2 + a * m3 + m4;\r\n data[i + 1] = r * m5 + g * m6 + b * m7 + a * m8 + m9;\r\n data[i + 2] = r * m10 + g * m11 + b * m12 + a * m13 + m14;\r\n data[i + 3] = r * m15 + g * m16 + b * m17 + a * m18 + m19;\r\n }\r\n };\r\n ColorMatrixFilter.prototype._multiplyMatrix = function (colorMat) {\r\n var i, j, k, col = [];\r\n for (i = 0; i < 5; i++) {\r\n for (j = 0; j < 5; j++) {\r\n col[j] = this.colorMatrix[j + i * 5];\r\n }\r\n for (j = 0; j < 5; j++) {\r\n var val = 0;\r\n for (k = 0; k < 5; k++) {\r\n val += colorMat[j + k * 5] * col[k];\r\n }\r\n this.colorMatrix[j + i * 5] = val;\r\n }\r\n }\r\n };\r\n ColorMatrixFilter.prototype._cleanValue = function (value, limit) {\r\n return Math.min(limit, Math.max(-limit, value));\r\n };\r\n ColorMatrixFilter.prototype.toString = function () {\r\n var s = this;\r\n return s.type + s.brightness + s.hue + s.saturation + s.contrast;\r\n };\r\n ColorMatrixFilter.prototype.destroy = function () {\r\n this.colorMatrix = null;\r\n };\r\n ColorMatrixFilter.DELTA_INDEX = [\r\n 0, 0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1, 0.11,\r\n 0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.20, 0.21, 0.22, 0.24,\r\n 0.25, 0.27, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, 0.40, 0.42,\r\n 0.44, 0.46, 0.48, 0.5, 0.53, 0.56, 0.59, 0.62, 0.65, 0.68,\r\n 0.71, 0.74, 0.77, 0.80, 0.83, 0.86, 0.89, 0.92, 0.95, 0.98,\r\n 1.0, 1.06, 1.12, 1.18, 1.24, 1.30, 1.36, 1.42, 1.48, 1.54,\r\n 1.60, 1.66, 1.72, 1.78, 1.84, 1.90, 1.96, 2.0, 2.12, 2.25,\r\n 2.37, 2.50, 2.62, 2.75, 2.87, 3.0, 3.2, 3.4, 3.6, 3.8,\r\n 4.0, 4.3, 4.7, 4.9, 5.0, 5.5, 6.0, 6.5, 6.8, 7.0,\r\n 7.3, 7.5, 7.8, 8.0, 8.4, 8.7, 9.0, 9.4, 9.6, 9.8,\r\n 10.0\r\n ];\r\n return ColorMatrixFilter;\r\n}());\r\nexport { ColorMatrixFilter };\r\nvar BlurFilter = (function () {\r\n function BlurFilter(blurX, blurY, quality) {\r\n if (blurX === void 0) { blurX = 2; }\r\n if (blurY === void 0) { blurY = 2; }\r\n if (quality === void 0) { quality = 1; }\r\n this.type = \"blur\";\r\n this.blurX = 0;\r\n this.blurY = 0;\r\n this.quality = 1;\r\n var s = this;\r\n s.blurX = blurX;\r\n s.blurY = blurY;\r\n s.quality = quality;\r\n }\r\n BlurFilter.prototype.toString = function () {\r\n var s = this;\r\n return s.type + s.blurX + s.blurY + s.quality;\r\n };\r\n BlurFilter.prototype.drawFilter = function (imageData) {\r\n if (imageData === void 0) { imageData = null; }\r\n var s = this;\r\n var radiusX = s.blurX >> 1;\r\n if (isNaN(radiusX) || radiusX < 0)\r\n return false;\r\n var radiusY = s.blurY >> 1;\r\n if (isNaN(radiusY) || radiusY < 0)\r\n return false;\r\n if (radiusX == 0 && radiusY == 0)\r\n return false;\r\n var iterations = s.quality;\r\n if (isNaN(iterations) || iterations < 1)\r\n iterations = 1;\r\n iterations |= 0;\r\n if (iterations > 3)\r\n iterations = 3;\r\n if (iterations < 1)\r\n iterations = 1;\r\n var px = imageData.data;\r\n var x = 0, y = 0, i = 0, p = 0, yp = 0, yi = 0, yw = 0, r = 0, g = 0, b = 0, a = 0, pr = 0, pg = 0, pb = 0, pa = 0;\r\n var divx = (radiusX + radiusX + 1) | 0;\r\n var divy = (radiusY + radiusY + 1) | 0;\r\n var w = imageData.width | 0;\r\n var h = imageData.height | 0;\r\n var w1 = (w - 1) | 0;\r\n var h1 = (h - 1) | 0;\r\n var rxp1 = (radiusX + 1) | 0;\r\n var ryp1 = (radiusY + 1) | 0;\r\n var ssx = { r: 0, b: 0, g: 0, a: 0 };\r\n var sx = ssx;\r\n for (i = 1; i < divx; i++) {\r\n sx = sx.n = { r: 0, b: 0, g: 0, a: 0 };\r\n }\r\n sx.n = ssx;\r\n var ssy = { r: 0, b: 0, g: 0, a: 0 };\r\n var sy = ssy;\r\n for (i = 1; i < divy; i++) {\r\n sy = sy.n = { r: 0, b: 0, g: 0, a: 0 };\r\n }\r\n sy.n = ssy;\r\n var si = null;\r\n var mtx = BlurFilter.MUL_TABLE[radiusX] | 0;\r\n var stx = BlurFilter.SHG_TABLE[radiusX] | 0;\r\n var mty = BlurFilter.MUL_TABLE[radiusY] | 0;\r\n var sty = BlurFilter.SHG_TABLE[radiusY] | 0;\r\n while (iterations-- > 0) {\r\n yw = yi = 0;\r\n var ms = mtx;\r\n var ss = stx;\r\n for (y = h; --y > -1;) {\r\n r = rxp1 * (pr = px[(yi) | 0]);\r\n g = rxp1 * (pg = px[(yi + 1) | 0]);\r\n b = rxp1 * (pb = px[(yi + 2) | 0]);\r\n a = rxp1 * (pa = px[(yi + 3) | 0]);\r\n sx = ssx;\r\n for (i = rxp1; --i > -1;) {\r\n sx.r = pr;\r\n sx.g = pg;\r\n sx.b = pb;\r\n sx.a = pa;\r\n sx = sx.n;\r\n }\r\n for (i = 1; i < rxp1; i++) {\r\n p = (yi + ((w1 < i ? w1 : i) << 2)) | 0;\r\n r += (sx.r = px[p]);\r\n g += (sx.g = px[p + 1]);\r\n b += (sx.b = px[p + 2]);\r\n a += (sx.a = px[p + 3]);\r\n sx = sx.n;\r\n }\r\n si = ssx;\r\n for (x = 0; x < w; x++) {\r\n px[yi++] = (r * ms) >>> ss;\r\n px[yi++] = (g * ms) >>> ss;\r\n px[yi++] = (b * ms) >>> ss;\r\n px[yi++] = (a * ms) >>> ss;\r\n p = ((yw + ((p = x + radiusX + 1) < w1 ? p : w1)) << 2);\r\n r -= si.r - (si.r = px[p]);\r\n g -= si.g - (si.g = px[p + 1]);\r\n b -= si.b - (si.b = px[p + 2]);\r\n a -= si.a - (si.a = px[p + 3]);\r\n si = si.n;\r\n }\r\n yw += w;\r\n }\r\n ms = mty;\r\n ss = sty;\r\n for (x = 0; x < w; x++) {\r\n yi = (x << 2) | 0;\r\n r = (ryp1 * (pr = px[yi])) | 0;\r\n g = (ryp1 * (pg = px[(yi + 1) | 0])) | 0;\r\n b = (ryp1 * (pb = px[(yi + 2) | 0])) | 0;\r\n a = (ryp1 * (pa = px[(yi + 3) | 0])) | 0;\r\n sy = ssy;\r\n for (i = 0; i < ryp1; i++) {\r\n sy.r = pr;\r\n sy.g = pg;\r\n sy.b = pb;\r\n sy.a = pa;\r\n sy = sy.n;\r\n }\r\n yp = w;\r\n for (i = 1; i <= radiusY; i++) {\r\n yi = (yp + x) << 2;\r\n r += (sy.r = px[yi]);\r\n g += (sy.g = px[yi + 1]);\r\n b += (sy.b = px[yi + 2]);\r\n a += (sy.a = px[yi + 3]);\r\n sy = sy.n;\r\n if (i < h1) {\r\n yp += w;\r\n }\r\n }\r\n yi = x;\r\n si = ssy;\r\n if (iterations > 0) {\r\n for (y = 0; y < h; y++) {\r\n p = yi << 2;\r\n px[p + 3] = pa = (a * ms) >>> ss;\r\n if (pa > 0) {\r\n px[p] = ((r * ms) >>> ss);\r\n px[p + 1] = ((g * ms) >>> ss);\r\n px[p + 2] = ((b * ms) >>> ss);\r\n }\r\n else {\r\n px[p] = px[p + 1] = px[p + 2] = 0;\r\n }\r\n p = (x + (((p = y + ryp1) < h1 ? p : h1) * w)) << 2;\r\n r -= si.r - (si.r = px[p]);\r\n g -= si.g - (si.g = px[p + 1]);\r\n b -= si.b - (si.b = px[p + 2]);\r\n a -= si.a - (si.a = px[p + 3]);\r\n si = si.n;\r\n yi += w;\r\n }\r\n }\r\n else {\r\n for (y = 0; y < h; y++) {\r\n p = yi << 2;\r\n px[p + 3] = pa = (a * ms) >>> ss;\r\n if (pa > 0) {\r\n pa = 255 / pa;\r\n px[p] = ((r * ms) >>> ss) * pa;\r\n px[p + 1] = ((g * ms) >>> ss) * pa;\r\n px[p + 2] = ((b * ms) >>> ss) * pa;\r\n }\r\n else {\r\n px[p] = px[p + 1] = px[p + 2] = 0;\r\n }\r\n p = (x + (((p = y + ryp1) < h1 ? p : h1) * w)) << 2;\r\n r -= si.r - (si.r = px[p]);\r\n g -= si.g - (si.g = px[p + 1]);\r\n b -= si.b - (si.b = px[p + 2]);\r\n a -= si.a - (si.a = px[p + 3]);\r\n si = si.n;\r\n yi += w;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n BlurFilter.prototype.destroy = function () {\r\n };\r\n BlurFilter.SHG_TABLE = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16, 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17, 16, 17, 16, 17, 16, 17, 9];\r\n BlurFilter.MUL_TABLE = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285, 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345, 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1];\r\n return BlurFilter;\r\n}());\r\nexport { BlurFilter };\r\n//# sourceMappingURL=Filters.js.map"}
{"map":"{\"version\":3,\"file\":\"utils.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/tools/utils.ts\"],\"names\":[],\"mappings\":\"AAMA,MAAM,UAAU,UAAU,CAAC,MAAW,EAAE,IAAU,EAAE,QAAmB,EAAE,YAA4B,EAAE,UAA0B;IAAxD,6BAAA,EAAA,mBAA4B;IAAE,2BAAA,EAAA,iBAA0B;IAChI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI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AAS,CAAC;IAC/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QAClD,IAAI,GAAG,GAAG,IAAI,MAAM,CAAC,KAAK,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC;QAC7C,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;KACxC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,IAAM,KAAK,GAAkB;IAC5B,GAAG;IACH,IAAI;IACJ,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,WAAW;IACX,YAAY;CACZ,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,KAAa;IACtD,IAAI,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IAChD,IAAI,KAAK,GAAG,CAAC,EAAE;QACd,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;KACxB;IACD,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AAC7B,CAAC\"}","code":"export function injectProp(target, data, callback, ignoreMethod, ignoreNull) {\r\n if (ignoreMethod === void 0) { ignoreMethod = true; }\r\n if (ignoreNull === void 0) { ignoreNull = true; }\r\n if (!target || !data) {\r\n return false;\r\n }\r\n var result = true;\r\n for (var key in data) {\r\n var value = data[key];\r\n if ((!ignoreMethod || typeof value != 'function') && (!ignoreNull || value != null)) {\r\n if (callback) {\r\n callback(target, key, value);\r\n }\r\n else {\r\n target[key] = value;\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\nexport function objectStringify(obj) {\r\n if (!obj) {\r\n return '';\r\n }\r\n var arr = [];\r\n for (var key in obj) {\r\n arr.push(key + '=' + obj[key]);\r\n }\r\n return arr.join('&');\r\n}\r\nexport function waitPromise(duration) {\r\n return new Promise(function (resolve) {\r\n setTimeout(resolve, duration);\r\n });\r\n}\r\nexport function format(formatStr) {\r\n var params = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n params[_i - 1] = arguments[_i];\r\n }\r\n return formatApply(formatStr, params);\r\n}\r\nexport function formatApply(formatStr, params) {\r\n var result = formatStr;\r\n for (var i = 0, len = params.length; i < len; i++) {\r\n var reg = new RegExp(\"\\\\{\" + i + \"\\\\}\", 'g');\r\n result = result.replace(reg, params[i]);\r\n }\r\n return result;\r\n}\r\nvar zeros = [\r\n \"0\",\r\n \"00\",\r\n \"000\",\r\n \"0000\",\r\n \"00000\",\r\n \"000000\",\r\n \"0000000\",\r\n \"00000000\",\r\n \"000000000\",\r\n \"0000000000\"\r\n];\r\nexport function supplement(value, count) {\r\n var index = count - value.toString().length - 1;\r\n if (index < 0) {\r\n return value.toString();\r\n }\r\n return zeros[index] + value;\r\n}\r\n//# sourceMappingURL=utils.js.map"}
{"map":"{\"version\":3,\"file\":\"LocalStorage.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/LocalStorage.ts\"],\"names\":[],\"mappings\":\"AAIA;IAGC,sBAAY,EAAU;QACrB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,CAAC;IAED,8BAAO,GAAP,UAAQ,GAAW,EAAE,MAAqB;QAArB,uBAAA,EAAA,aAAqB;QACzC,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;IAC7E,CAAC;IAED,8BAAO,GAAP,UAAQ,GAAW,EAAE,MAAqB;QAArB,uBAAA,EAAA,aAAqB;QACzC,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,8BAAO,GAAP,UAAQ,GAAW,EAAE,KAAa,EAAE,MAAqB;QAArB,uBAAA,EAAA,aAAqB;QACxD,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;IAED,iCAAU,GAAV,UAAW,GAAW,EAAE,UAAsB,EAAE,MAAqB;QAA7C,2BAAA,EAAA,iBAAsB;QAAE,uBAAA,EAAA,aAAqB;QACpE,IAAI,MAAW,CAAC;QAChB,IAAI;YACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;SAC/C;QAAC,OAAO,CAAC,EAAE;SAEX;QACD,IAAI,CAAC,MAAM,EAAE;YACZ,MAAM,GAAG,UAAU,CAAC;SACpB;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED,iCAAU,GAAV,UAAW,GAAW,EAAE,OAAY,EAAE,MAAqB;QAArB,uBAAA,EAAA,aAAqB;QAC1D,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;IACF,mBAAC;AAAD,CAAC,AAnCD,IAmCC\"}","code":"var LocalStorage = (function () {\r\n function LocalStorage(ID) {\r\n this.ID = ID;\r\n }\r\n LocalStorage.prototype.getName = function (key, prefix) {\r\n if (prefix === void 0) { prefix = null; }\r\n return (prefix || !this.ID || this.ID == '' ? prefix : this.ID) + '_' + key;\r\n };\r\n LocalStorage.prototype.getItem = function (key, prefix) {\r\n if (prefix === void 0) { prefix = null; }\r\n return localStorage.getItem(this.getName(key, prefix));\r\n };\r\n LocalStorage.prototype.setItem = function (key, value, prefix) {\r\n if (prefix === void 0) { prefix = null; }\r\n localStorage.setItem(this.getName(key, prefix), value);\r\n };\r\n LocalStorage.prototype.getItemObj = function (key, defaultObj, prefix) {\r\n if (defaultObj === void 0) { defaultObj = null; }\r\n if (prefix === void 0) { prefix = null; }\r\n var result;\r\n try {\r\n result = JSON.parse(this.getItem(key, prefix));\r\n }\r\n catch (e) {\r\n }\r\n if (!result) {\r\n result = defaultObj;\r\n }\r\n return result;\r\n };\r\n LocalStorage.prototype.setItemObj = function (key, itemObj, prefix) {\r\n if (prefix === void 0) { prefix = null; }\r\n this.setItem(key, JSON.stringify(itemObj), prefix);\r\n };\r\n return LocalStorage;\r\n}());\r\nexport default LocalStorage;\r\n//# sourceMappingURL=LocalStorage.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/editor/index.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,YAAY,EAAE,UAAU,GAAG,MAAM,eAAe,CAAC;AACzD,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,SAAS,CAAC;AAErD,cAAc,eAAe,CAAA;AAE7B,IAAI,YAAmB,CAAC;AACxB,IAAI,QAAQ,CAAC;AAOb,MAAM,UAAgB,WAAW,CAAC,IAAI,EAAE,QAAS;;;;;wBAClC,WAAM,SAAS,CAAC,YAAU,IAAI,WAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC,EAAA;;oBAAhE,KAAK,GAAG,SAAwD;oBAEtE,QAAQ,GAAG,cAAc,EAAE,CAAC;oBAE5B,WAAM,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAA;;oBAA7C,SAA6C,CAAC;oBAE9C,IAAG,YAAY,EAAC;wBACf,YAAY,CAAC,YAAY,CAAC,CAAC;qBAC3B;oBAED,YAAY,GAAG,KAAK,CAAC;oBACrB,UAAU,CAAC,KAAK,CAAC,CAAC;oBAElB,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;;;;;CACtC;AAMD,MAAM,UAAU,UAAU,CAAC,KAAK;IAC/B,KAAK,EAAE,CAAC;IACR,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IAC7B,KAAK,EAAE,CAAC;AACT,CAAC;AAMD,MAAM,UAAU,YAAY,CAAC,KAAK;IACjC,KAAK,EAAE,CAAC;IACR,YAAY,CAAC,KAAK,CAAC,CAAC;IACpB,UAAU,CAAC,QAAQ,CAAC,CAAC;AACtB,CAAC;AAUD,SAAe,SAAS,CAAC,GAAG,EAAE,IAAK,EAAE,KAAa,EAAE,MAAO;IAAtB,sBAAA,EAAA,aAAa;;;;;wBAC7B,WAAM,SAAS,CAAC,GAAG,CAAC,EAAA;;oBAAlC,WAAW,GAAG,SAAoB;oBAElC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;oBAC1B,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;oBAChC,WAAO,KAAK,EAAC;;;;CACb;AAUD,MAAM,UAAgB,UAAU,CAAC,GAAG,EAAE,IAAK,EAAE,KAAY,EAAE,MAAO;IAArB,sBAAA,EAAA,YAAY;;;;;wBAC7C,WAAM,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,EAAA;;oBAAxC,IAAI,GAAG,SAAiC;oBAC5C,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;oBAC1B,WAAO,IAAI,EAAC;;;;CACZ;AAED,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { destroyScene, setupScene, } from \"./interpreter\";\r\nimport { addLoader, cacheRes, destroyRes, getAllResUuids, loadJson5 } from \"../assets-manager\";\r\nimport { getRoot, pause, Scene, start } from \"../core\";\r\nexport * from './interpreter';\r\nvar currentScene;\r\nvar resUUIDs;\r\nexport function launchScene(name, progress) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var scene;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadScene(\"scenes/\" + name + \".scene\", 'scene_' + name)];\r\n case 1:\r\n scene = _a.sent();\r\n resUUIDs = getAllResUuids();\r\n return [4, scene.loadResGroup('preload', progress)];\r\n case 2:\r\n _a.sent();\r\n if (currentScene) {\r\n unmountScene(currentScene);\r\n }\r\n currentScene = scene;\r\n mountScene(scene);\r\n scene.loadResGroup('delay', progress);\r\n return [2];\r\n }\r\n });\r\n });\r\n}\r\nexport function mountScene(scene) {\r\n pause();\r\n setupScene(scene, getRoot());\r\n start();\r\n}\r\nexport function unmountScene(scene) {\r\n pause();\r\n destroyScene(scene);\r\n destroyRes(resUUIDs);\r\n}\r\nfunction loadScene(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = false; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var sceneConfig, scene;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadJson5(url)];\r\n case 1:\r\n sceneConfig = _a.sent();\r\n scene = new Scene();\r\n scene.initByConfig(sceneConfig);\r\n return [2, scene];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadPrefab(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var data;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadJson5(url, uuid, false)];\r\n case 1:\r\n data = _a.sent();\r\n cacheRes(data, url, uuid);\r\n return [2, data];\r\n }\r\n });\r\n });\r\n}\r\naddLoader('.pfb', loadPrefab);\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"ObjectPool.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/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{\r\n throw new Error('group ' + name + ' not registered.');\r\n }\r\n return group;\r\n}\r\nexport function register(name, newFunc, initFunc) {\r\n all[name] = { name: name, newFunc: newFunc, initFunc: initFunc, pool: [] };\r\n}\r\nexport function get(name) {\r\n var params = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n params[_i - 1] = arguments[_i];\r\n }\r\n var group = getGroup(name);\r\n var newFunc = group.newFunc, initFunc = group.initFunc, pool = group.pool;\r\n var instance;\r\n if (pool.length == 0) {\r\n instance = newFunc();\r\n }\r\n else {\r\n instance = pool.pop();\r\n }\r\n initFunc.apply(void 0, tslib_1.__spread([instance], params));\r\n return instance;\r\n}\r\nexport function recycle(name, instance) {\r\n var group = getGroup(name);\r\n group.pool.push(instance);\r\n}\r\n//# sourceMappingURL=ObjectPool.js.map"}
{"map":"{\"version\":3,\"file\":\"HashObject.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/HashObject.ts\"],\"names\":[],\"mappings\":\"AAIA,IAAI,aAAa,GAAG,CAAC,CAAC;AAEtB,SAAS,WAAW;IACnB,OAAO,EAAE,aAAa,CAAC;AACxB,CAAC;AAKD;IAGC;QACC,IAAI,CAAC,SAAS,GAAG,WAAW,EAAE,CAAC;IAChC,CAAC;IAED,sBAAI,gCAAQ;aAAZ;YACC,OAAO,IAAI,CAAC,SAAS,CAAC;QACvB,CAAC;;;OAAA;IACF,iBAAC;AAAD,CAAC,AAVD,IAUC\"}","code":"var HASH_CODE_INK = 0;\r\nfunction getHashCode() {\r\n return ++HASH_CODE_INK;\r\n}\r\nvar HashObject = (function () {\r\n function HashObject() {\r\n this._hashCode = getHashCode();\r\n }\r\n Object.defineProperty(HashObject.prototype, \"hashCode\", {\r\n get: function () {\r\n return this._hashCode;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return HashObject;\r\n}());\r\nexport default HashObject;\r\n//# sourceMappingURL=HashObject.js.map"}
{"map":"{\"version\":3,\"file\":\"Transform.js\",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IAAI,CAAC,kBAAkB,EAAE,CAAC;QAE1B,iBAAM,QAAQ,YAAC,CAAC,CAAC,CAAC;IACnB,CAAC;IAjLD;QADC,iBAAiB;+CACmB;IAMrC;QADC,iBAAiB;4CACA;IAqBlB;QADC,iBAAiB;4CACmB;IAKrC;QADC,iBAAiB;4CACuB;IAEzC;QADC,kBAAkB;+CACN;IAgJd,gBAAC;CAAA,AA3LD,CAAuC,eAAe,GA2LrD;eA3LoB,SAAS\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent, Vector2D, Matrix, decorators } from \"scilla\";\r\nimport Renderer from \"../renderer/Renderer\";\r\nvar dirtyFieldDetector = decorators.dirtyFieldDetector, dirtyFieldTrigger = decorators.dirtyFieldTrigger;\r\nexport var MATRIX_ORDER;\r\n(function (MATRIX_ORDER) {\r\n MATRIX_ORDER[MATRIX_ORDER[\"SCALE_ROTATE\"] = 0] = \"SCALE_ROTATE\";\r\n MATRIX_ORDER[MATRIX_ORDER[\"ROTATE_SCALE\"] = 1] = \"ROTATE_SCALE\";\r\n})(MATRIX_ORDER || (MATRIX_ORDER = {}));\r\nvar Transform = (function (_super) {\r\n tslib_1.__extends(Transform, _super);\r\n function Transform() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.onVector2DModify = function (value, key, oldValue) {\r\n _this.makeDirty(value, key, oldValue);\r\n };\r\n _this.position = new Vector2D(0);\r\n _this.alpha = 1;\r\n _this._width = NaN;\r\n _this._height = NaN;\r\n _this.scale = new Vector2D(1, 1);\r\n _this.pivot = new Vector2D(0.5, 0.5);\r\n _this.rotation = 0;\r\n _this.order = MATRIX_ORDER.SCALE_ROTATE;\r\n _this._localMatrix = Matrix.create();\r\n _this._globalMatrix = Matrix.create();\r\n _this._globalPivotMatrix = Matrix.create();\r\n return _this;\r\n }\r\n Object.defineProperty(Transform.prototype, \"renderAlpha\", {\r\n get: function () {\r\n return this._renderAlpha;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Transform.prototype, \"width\", {\r\n get: function () {\r\n var renderer = this.entity.getComponent(Renderer);\r\n return renderer ? renderer.bounds.width : (isNaN(this._width) ? 0 : this._width);\r\n },\r\n set: function (value) {\r\n if (this._width != value) {\r\n this._width = value;\r\n this.makeDirty(value, 'width');\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Transform.prototype, \"explicitWidth\", {\r\n get: function () {\r\n return this._width;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Transform.prototype, \"height\", {\r\n get: function () {\r\n var renderer = this.entity.getComponent(Renderer);\r\n return renderer ? renderer.bounds.height : (isNaN(this._height) ? 0 : this._height);\r\n },\r\n set: function (value) {\r\n if (this._height != value) {\r\n this._height = value;\r\n this.makeDirty(value, 'height');\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Transform.prototype, \"explicitHeight\", {\r\n get: function () {\r\n return this._height;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Transform.prototype.makeDirty = function (value, key, oldValue) {\r\n var e_1, _a;\r\n this.dirty = true;\r\n switch (key) {\r\n case 'width':\r\n case 'height':\r\n var renderers = this.entity.getComponents(Renderer);\r\n try {\r\n for (var renderers_1 = tslib_1.__values(renderers), renderers_1_1 = renderers_1.next(); !renderers_1_1.done; renderers_1_1 = renderers_1.next()) {\r\n var renderer = renderers_1_1.value;\r\n renderer.makeDirty();\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (renderers_1_1 && !renderers_1_1.done && (_a = renderers_1.return)) _a.call(renderers_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n break;\r\n }\r\n };\r\n Transform.prototype.onModify = function (value, key, oldValue) {\r\n _super.prototype.onModify.call(this, value, key, oldValue);\r\n this.makeDirty(value, key, oldValue);\r\n switch (key) {\r\n case 'position':\r\n case 'scale':\r\n value.onChange = this.onVector2DModify;\r\n break;\r\n }\r\n };\r\n Transform.prototype.updateLocalMatrix = function () {\r\n var _a = this, _b = _a.position, x = _b.x, y = _b.y, _c = _a.scale, sx = _c.x, sy = _c.y, rotation = _a.rotation;\r\n var matrix = this._localMatrix;\r\n matrix.identity();\r\n if (this.order = MATRIX_ORDER.ROTATE_SCALE) {\r\n matrix.scale(sx, sy);\r\n matrix.rotate(rotation * Math.PI / 180);\r\n }\r\n else {\r\n matrix.rotate(rotation * Math.PI / 180);\r\n matrix.scale(sx, sy);\r\n }\r\n matrix.translate(x, y);\r\n };\r\n Transform.prototype.updateGlobalMatrix = function () {\r\n var _a = this, entity = _a.entity, _globalMatrix = _a._globalMatrix, _localMatrix = _a._localMatrix, _globalPivotMatrix = _a._globalPivotMatrix, _b = _a.pivot, px = _b.x, py = _b.y, width = _a.width, height = _a.height;\r\n _globalMatrix.copyFrom(_localMatrix);\r\n if (entity.parent) {\r\n var parentTransform = entity.parent.getComponent(Transform);\r\n if (parentTransform) {\r\n this._renderAlpha = parentTransform._renderAlpha * this.alpha;\r\n _globalMatrix.concat(parentTransform.getMatrix());\r\n }\r\n }\r\n else {\r\n this._renderAlpha = this.alpha;\r\n }\r\n _globalPivotMatrix.copyFrom(_globalMatrix);\r\n _globalPivotMatrix.translate(-(px - 0.5) * width, -(py - 0.5) * height);\r\n };\r\n Transform.prototype.getMatrix = function (withPivot) {\r\n if (withPivot === void 0) { withPivot = false; }\r\n return withPivot ? this._globalPivotMatrix : this._globalMatrix;\r\n };\r\n Transform.prototype.onUpdate = function (t) {\r\n if (this.dirty) {\r\n this.updateLocalMatrix();\r\n this.dirty = false;\r\n }\r\n this.updateGlobalMatrix();\r\n _super.prototype.onUpdate.call(this, t);\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Transform.prototype, \"position\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Transform.prototype, \"alpha\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Transform.prototype, \"scale\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Transform.prototype, \"pivot\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], Transform.prototype, \"rotation\", void 0);\r\n return Transform;\r\n}(ScillaComponent));\r\nexport default Transform;\r\n//# sourceMappingURL=Transform.js.map"}
{"map":"{\"version\":3,\"file\":\"MustCompile.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/generated/MustCompile.ts\"],\"names\":[],\"mappings\":\"AAKA,OAAO,EAAC,WAAW,EAAC,MAAM,QAAQ,CAAA;AAElC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,WAAW,CAAC,2BAA2B,EAAE,UAAU,CAAC,CAAC;AAErD,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAC3D,WAAW,CAAC,mCAAmC,EAAE,UAAU,CAAC,CAAC\"}","code":"import { registerDef } from 'scilla';\r\nimport component0 from 'components/base/Transform';\r\nregisterDef('components/base/Transform', component0);\r\nimport component1 from 'components/other/CameraController';\r\nregisterDef('components/other/CameraController', component1);\r\n//# sourceMappingURL=MustCompile.js.map"}
{"map":"{\"version\":3,\"file\":\"LaunchOptions.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/LaunchOptions.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EACN,KAAK,GACL,MAAM,QAAQ,CAAA;AAEf,IAAM,OAAO,GAAQ,EAAE,CAAC;AAExB,MAAM,UAAU,MAAM,CAAC,IAAI;IAC1B,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACjC,CAAC;AAED,eAAe,OAAO,CAAC\"}","code":"import { utils, } from 'scilla';\r\nvar options = {};\r\nexport function inject(data) {\r\n utils.injectProp(options, data);\r\n}\r\nexport default options;\r\n//# sourceMappingURL=LaunchOptions.js.map"}
{"map":"{\"version\":3,\"file\":\"Matrix.js\",\"sourceRoot\":\"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AI,CAAC,CAAC,CAAC;YACtB,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACzC,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACzC,EAAE,IAAI,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;YACxB,EAAE,IAAI,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;SACxB;QAED,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QACb,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QACb,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QACb,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QACb,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;QACf,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IAChB,CAAC;IAEF,aAAC;AAAD,CAAC,AA3hBD,IA2hBC\"}","code":"var PI = Math.PI;\r\nvar TwoPI = PI * 2;\r\nvar DEG_TO_RAD = PI / 180;\r\nvar matrixPool = [];\r\nvar Matrix = (function () {\r\n function Matrix(a, b, c, d, tx, ty) {\r\n if (a === void 0) { a = 1; }\r\n if (b === void 0) { b = 0; }\r\n if (c === void 0) { c = 0; }\r\n if (d === void 0) { d = 1; }\r\n if (tx === void 0) { tx = 0; }\r\n if (ty === void 0) { ty = 0; }\r\n this.a = a;\r\n this.b = b;\r\n this.c = c;\r\n this.d = d;\r\n this.tx = tx;\r\n this.ty = ty;\r\n }\r\n Matrix.release = function (matrix) {\r\n if (!matrix) {\r\n return;\r\n }\r\n matrixPool.push(matrix);\r\n };\r\n Matrix.create = function () {\r\n var matrix = matrixPool.pop();\r\n if (!matrix) {\r\n matrix = new Matrix();\r\n }\r\n return matrix;\r\n };\r\n Matrix.prototype.clone = function () {\r\n var m = Matrix.create();\r\n m.setTo(this.a, this.b, this.c, this.d, this.tx, this.ty);\r\n return m;\r\n };\r\n Matrix.prototype.concat = function (other) {\r\n var a = this.a * other.a;\r\n var b = 0.0;\r\n var c = 0.0;\r\n var d = this.d * other.d;\r\n var tx = this.tx * other.a + other.tx;\r\n var ty = this.ty * other.d + other.ty;\r\n if (this.b !== 0.0 || this.c !== 0.0 || other.b !== 0.0 || other.c !== 0.0) {\r\n a += this.b * other.c;\r\n d += this.c * other.b;\r\n b += this.a * other.b + this.b * other.d;\r\n c += this.c * other.a + this.d * other.c;\r\n tx += this.ty * other.c;\r\n ty += this.tx * other.b;\r\n }\r\n this.a = a;\r\n this.b = b;\r\n this.c = c;\r\n this.d = d;\r\n this.tx = tx;\r\n this.ty = ty;\r\n };\r\n Matrix.prototype.copyFrom = function (other) {\r\n this.a = other.a;\r\n this.b = other.b;\r\n this.c = other.c;\r\n this.d = other.d;\r\n this.tx = other.tx;\r\n this.ty = other.ty;\r\n return this;\r\n };\r\n Matrix.prototype.identity = function () {\r\n this.a = this.d = 1;\r\n this.b = this.c = this.tx = this.ty = 0;\r\n };\r\n Matrix.prototype.invert = function () {\r\n this.$invertInto(this);\r\n };\r\n Matrix.prototype.$invertInto = function (target) {\r\n var a = this.a;\r\n var b = this.b;\r\n var c = this.c;\r\n var d = this.d;\r\n var tx = this.tx;\r\n var ty = this.ty;\r\n if (b == 0 && c == 0) {\r\n target.b = target.c = 0;\r\n if (a == 0 || d == 0) {\r\n target.a = target.d = target.tx = target.ty = 0;\r\n }\r\n else {\r\n a = target.a = 1 / a;\r\n d = target.d = 1 / d;\r\n target.tx = -a * tx;\r\n target.ty = -d * ty;\r\n }\r\n return;\r\n }\r\n var determinant = a * d - b * c;\r\n if (determinant == 0) {\r\n target.identity();\r\n return;\r\n }\r\n determinant = 1 / determinant;\r\n var k = target.a = d * determinant;\r\n b = target.b = -b * determinant;\r\n c = target.c = -c * determinant;\r\n d = target.d = a * determinant;\r\n target.tx = -(k * tx + c * ty);\r\n target.ty = -(b * tx + d * ty);\r\n };\r\n Matrix.prototype.rotate = function (radian) {\r\n radian = +radian;\r\n if (radian !== 0) {\r\n var u = Math.cos(radian);\r\n var v = Math.sin(radian);\r\n var _a = this, a = _a.a, b = _a.b, c = _a.c, d = _a.d, tx = _a.tx, ty = _a.ty;\r\n this.a = a * u - b * v;\r\n this.b = a * v + b * u;\r\n this.c = c * u - d * v;\r\n this.d = c * v + d * u;\r\n this.tx = tx * u - ty * v;\r\n this.ty = tx * v + ty * u;\r\n }\r\n };\r\n Matrix.prototype.scale = function (sx, sy) {\r\n if (sx !== 1) {\r\n this.a *= sx;\r\n this.c *= sx;\r\n this.tx *= sx;\r\n }\r\n if (sy !== 1) {\r\n this.b *= sy;\r\n this.d *= sy;\r\n this.ty *= sy;\r\n }\r\n };\r\n Matrix.prototype.setTo = function (a, b, c, d, tx, ty) {\r\n this.a = a;\r\n this.b = b;\r\n this.c = c;\r\n this.d = d;\r\n this.tx = tx;\r\n this.ty = ty;\r\n return this;\r\n };\r\n Matrix.prototype.transformPoint = function (pointX, pointY, resultPoint) {\r\n var _a = this, a = _a.a, b = _a.b, c = _a.c, d = _a.d, tx = _a.tx, ty = _a.ty;\r\n var x = a * pointX + c * pointY + tx;\r\n var y = b * pointX + d * pointY + ty;\r\n if (resultPoint) {\r\n resultPoint.x = x;\r\n resultPoint.y = y;\r\n return resultPoint;\r\n }\r\n return { x: x, y: y };\r\n };\r\n Matrix.prototype.deltaTransformPoint = function (pointX, pointY, resultPoint) {\r\n var _a = this, a = _a.a, b = _a.b, c = _a.c, d = _a.d;\r\n var x = a * pointX + c * pointY;\r\n var y = b * pointX + d * pointY;\r\n if (resultPoint) {\r\n resultPoint.x = x;\r\n resultPoint.y = y;\r\n return resultPoint;\r\n }\r\n return { x: x, y: y };\r\n };\r\n Matrix.prototype.translate = function (dx, dy) {\r\n this.tx += dx;\r\n this.ty += dy;\r\n };\r\n Matrix.prototype.equals = function (other) {\r\n return this.a == other.a && this.b == other.b &&\r\n this.c == other.c && this.d == other.d &&\r\n this.tx == other.tx && this.ty == other.ty;\r\n };\r\n Matrix.prototype.prepend = function (a, b, c, d, tx, ty) {\r\n var tx1 = this.tx;\r\n if (a != 1 || b != 0 || c != 0 || d != 1) {\r\n var a1 = this.a;\r\n var c1 = this.c;\r\n this.a = a1 * a + this.b * c;\r\n this.b = a1 * b + this.b * d;\r\n this.c = c1 * a + this.d * c;\r\n this.d = c1 * b + this.d * d;\r\n }\r\n this.tx = tx1 * a + this.ty * c + tx;\r\n this.ty = tx1 * b + this.ty * d + ty;\r\n return this;\r\n };\r\n Matrix.prototype.append = function (a, b, c, d, tx, ty) {\r\n var a1 = this.a;\r\n var b1 = this.b;\r\n var c1 = this.c;\r\n var d1 = this.d;\r\n if (a != 1 || b != 0 || c != 0 || d != 1) {\r\n this.a = a * a1 + b * c1;\r\n this.b = a * b1 + b * d1;\r\n this.c = c * a1 + d * c1;\r\n this.d = c * b1 + d * d1;\r\n }\r\n this.tx = tx * a1 + ty * c1 + this.tx;\r\n this.ty = tx * b1 + ty * d1 + this.ty;\r\n return this;\r\n };\r\n Matrix.prototype.toString = function () {\r\n return \"(a=\" + this.a + \", b=\" + this.b + \", c=\" + this.c + \", d=\" + this.d + \", tx=\" + this.tx + \", ty=\" + this.ty + \")\";\r\n };\r\n Matrix.prototype.createBox = function (scaleX, scaleY, rotation, tx, ty) {\r\n if (rotation === void 0) { rotation = 0; }\r\n if (tx === void 0) { tx = 0; }\r\n if (ty === void 0) { ty = 0; }\r\n var self = this;\r\n if (rotation !== 0) {\r\n rotation = rotation / DEG_TO_RAD;\r\n var u = Math.cos(rotation);\r\n var v = Math.sin(rotation);\r\n self.a = u * scaleX;\r\n self.b = v * scaleY;\r\n self.c = -v * scaleX;\r\n self.d = u * scaleY;\r\n }\r\n else {\r\n self.a = scaleX;\r\n self.b = 0;\r\n self.c = 0;\r\n self.d = scaleY;\r\n }\r\n self.tx = tx;\r\n self.ty = ty;\r\n };\r\n Matrix.prototype.createGradientBox = function (width, height, rotation, tx, ty) {\r\n if (rotation === void 0) { rotation = 0; }\r\n if (tx === void 0) { tx = 0; }\r\n if (ty === void 0) { ty = 0; }\r\n this.createBox(width / 1638.4, height / 1638.4, rotation, tx + width / 2, ty + height / 2);\r\n };\r\n Matrix.prototype.$transformBounds = function (bounds) {\r\n var a = this.a;\r\n var b = this.b;\r\n var c = this.c;\r\n var d = this.d;\r\n var tx = this.tx;\r\n var ty = this.ty;\r\n var x = bounds.x;\r\n var y = bounds.y;\r\n var xMax = x + bounds.width;\r\n var yMax = y + bounds.height;\r\n var x0 = a * x + c * y + tx;\r\n var y0 = b * x + d * y + ty;\r\n var x1 = a * xMax + c * y + tx;\r\n var y1 = b * xMax + d * y + ty;\r\n var x2 = a * xMax + c * yMax + tx;\r\n var y2 = b * xMax + d * yMax + ty;\r\n var x3 = a * x + c * yMax + tx;\r\n var y3 = b * x + d * yMax + ty;\r\n var tmp = 0;\r\n if (x0 > x1) {\r\n tmp = x0;\r\n x0 = x1;\r\n x1 = tmp;\r\n }\r\n if (x2 > x3) {\r\n tmp = x2;\r\n x2 = x3;\r\n x3 = tmp;\r\n }\r\n bounds.x = Math.floor(x0 < x2 ? x0 : x2);\r\n bounds.width = Math.ceil((x1 > x3 ? x1 : x3) - bounds.x);\r\n if (y0 > y1) {\r\n tmp = y0;\r\n y0 = y1;\r\n y1 = tmp;\r\n }\r\n if (y2 > y3) {\r\n tmp = y2;\r\n y2 = y3;\r\n y3 = tmp;\r\n }\r\n bounds.y = Math.floor(y0 < y2 ? y0 : y2);\r\n bounds.height = Math.ceil((y1 > y3 ? y1 : y3) - bounds.y);\r\n };\r\n Matrix.prototype.getDeterminant = function () {\r\n return this.a * this.d - this.b * this.c;\r\n };\r\n Matrix.prototype.$getScaleX = function () {\r\n var m = this;\r\n if (m.b == 0) {\r\n return m.a;\r\n }\r\n var result = Math.sqrt(m.a * m.a + m.b * m.b);\r\n return this.getDeterminant() < 0 ? -result : result;\r\n };\r\n Matrix.prototype.$getScaleY = function () {\r\n var m = this;\r\n if (m.c == 0) {\r\n return m.d;\r\n }\r\n var result = Math.sqrt(m.c * m.c + m.d * m.d);\r\n return this.getDeterminant() < 0 ? -result : result;\r\n };\r\n Matrix.prototype.$getSkewX = function () {\r\n if (this.d < 0) {\r\n return Math.atan2(this.d, this.c) + (PI / 2);\r\n }\r\n else {\r\n return Math.atan2(this.d, this.c) - (PI / 2);\r\n }\r\n };\r\n Matrix.prototype.$getSkewY = function () {\r\n if (this.a < 0) {\r\n return Math.atan2(this.b, this.a) - PI;\r\n }\r\n else {\r\n return Math.atan2(this.b, this.a);\r\n }\r\n };\r\n Matrix.prototype.$updateScaleAndRotation = function (scaleX, scaleY, skewX, skewY) {\r\n if ((skewX == 0 || skewX == TwoPI) && (skewY == 0 || skewY == TwoPI)) {\r\n this.a = scaleX;\r\n this.b = this.c = 0;\r\n this.d = scaleY;\r\n return;\r\n }\r\n skewX = skewX / DEG_TO_RAD;\r\n skewY = skewY / DEG_TO_RAD;\r\n var u = Math.cos(skewX);\r\n var v = Math.sin(skewX);\r\n if (skewX == skewY) {\r\n this.a = u * scaleX;\r\n this.b = v * scaleX;\r\n }\r\n else {\r\n this.a = Math.cos(skewY) * scaleX;\r\n this.b = Math.sin(skewY) * scaleX;\r\n }\r\n this.c = -v * scaleY;\r\n this.d = u * scaleY;\r\n };\r\n Matrix.prototype.$preMultiplyInto = function (other, target) {\r\n var a = other.a * this.a;\r\n var b = 0.0;\r\n var c = 0.0;\r\n var d = other.d * this.d;\r\n var tx = other.tx * this.a + this.tx;\r\n var ty = other.ty * this.d + this.ty;\r\n if (other.b !== 0.0 || other.c !== 0.0 || this.b !== 0.0 || this.c !== 0.0) {\r\n a += other.b * this.c;\r\n d += other.c * this.b;\r\n b += other.a * this.b + other.b * this.d;\r\n c += other.c * this.a + other.d * this.c;\r\n tx += other.ty * this.c;\r\n ty += other.tx * this.b;\r\n }\r\n target.a = a;\r\n target.b = b;\r\n target.c = c;\r\n target.d = d;\r\n target.tx = tx;\r\n target.ty = ty;\r\n };\r\n return Matrix;\r\n}());\r\nexport default Matrix;\r\n//# sourceMappingURL=Matrix.js.map"}
{"map":"{\"version\":3,\"file\":\"Vector2D.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/Vector2D.ts\"],\"names\":[],\"mappings\":\"AAKA,OAAO,EAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEpD,IAAM,IAAI,GAAG,UAAU,CAAC;AACxB,QAAQ,CAAC,IAAI,EAAE;IACd,OAAO,IAAI,QAAQ,EAAE,CAAC;AACvB,CAAC,EAAE,UAAS,QAAkB,EAAE,CAAC,EAAE,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAOH,MAAM,UAAU,cAAc,CAAC,CAAK,EAAE,CAAK;IAAZ,kBAAA,EAAA,KAAK;IAAE,kBAAA,EAAA,KAAK;IAC1C,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACxB,CAAC;AAMD,MAAM,UAAU,eAAe,CAAC,MAAM;IACrC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACvB,CAAC;AAKD;IASC,kBAAY,CAAK,EAAE,CAAK,EAAE,QAAS;QAAvB,kBAAA,EAAA,KAAK;QAAE,kBAAA,EAAA,KAAK;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClB,CAAC;IAVD,sBAAkB,gBAAI;aAAtB;YACC,OAAO,IAAI,CAAC;QACb,CAAC;;;OAAA;IAUD,sBAAI,uBAAC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,CAAC;IAEM,eAAM,GAAb,UAAc,EAAE,EAAE,EAAE;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5D,CAAC;IACF,eAAC;AAAD,CAAC,AAtLD,IAsLC;;AAED,IAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC\"}","code":"import { get, recycle, register } from \"./ObjectPool\";\r\nvar name = 'Vector2D';\r\nregister(name, function () {\r\n return new Vector2D();\r\n}, function (instance, x, y) {\r\n instance.setXY(x, y);\r\n});\r\nexport function createVector2D(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n return get(name, x, y);\r\n}\r\nexport function releaseVector2D(target) {\r\n recycle(name, target);\r\n}\r\nvar Vector2D = (function () {\r\n function Vector2D(x, y, onChange) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.onChange = onChange;\r\n this._x = 0;\r\n this._y = 0;\r\n this.setXY(x, y);\r\n }\r\n Object.defineProperty(Vector2D, \"zero\", {\r\n get: function () {\r\n return zero;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Vector2D.prototype, \"x\", {\r\n get: function () {\r\n return this._x;\r\n },\r\n set: function (v) {\r\n if (this._x !== v) {\r\n var old = this._x;\r\n this._x = v;\r\n this.onChange && this.onChange(v, 'x', old);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Vector2D.prototype, \"y\", {\r\n get: function () {\r\n return this._y;\r\n },\r\n set: function (v) {\r\n if (this._y !== v) {\r\n var old = this._y;\r\n this._y = v;\r\n this.onChange && this.onChange(v, 'y', old);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Vector2D.prototype.setXY = function (x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2D.prototype.copyFrom = function (v2) {\r\n this.x = v2.x;\r\n this.y = v2.y;\r\n return this;\r\n };\r\n Vector2D.prototype.clone = function () {\r\n return new Vector2D(this.x, this.y);\r\n };\r\n Vector2D.prototype.zero = function () {\r\n this.x = 0;\r\n this.y = 0;\r\n return this;\r\n };\r\n Object.defineProperty(Vector2D.prototype, \"isZero\", {\r\n get: function () {\r\n return this.x == 0 && this.y == 0;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Vector2D.prototype.normalize = function () {\r\n var len = this.length;\r\n if (len == 0) {\r\n this.x = 1;\r\n return this;\r\n }\r\n this.x /= len;\r\n this.y /= len;\r\n return this;\r\n };\r\n Object.defineProperty(Vector2D.prototype, \"isNormalized\", {\r\n get: function () {\r\n return this.length == 1.0;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Vector2D.prototype.truncate = function (max) {\r\n this.length = Math.min(max, this.length);\r\n return this;\r\n };\r\n Vector2D.prototype.reverse = function () {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n return this;\r\n };\r\n Vector2D.prototype.dotProd = function (v2) {\r\n return this.x * v2.x + this.y * v2.y;\r\n };\r\n Vector2D.prototype.crossProd = function (v2) {\r\n return this.x * v2.y - this.y * v2.x;\r\n };\r\n Vector2D.prototype.distSQ = function (v2) {\r\n var dx = v2.x - this.x;\r\n var dy = v2.y - this.y;\r\n return dx * dx + dy * dy;\r\n };\r\n Vector2D.prototype.distance = function (v2) {\r\n return Math.sqrt(this.distSQ(v2));\r\n };\r\n Vector2D.prototype.add = function (v2) {\r\n this.x += v2.x;\r\n this.y += v2.y;\r\n return this;\r\n };\r\n Vector2D.prototype.subtract = function (v2) {\r\n this.x -= v2.x;\r\n this.y -= v2.y;\r\n return this;\r\n };\r\n Vector2D.prototype.multiply = function (value) {\r\n this.x *= value;\r\n this.y *= value;\r\n return this;\r\n };\r\n Vector2D.prototype.divide = function (value) {\r\n this.x /= value;\r\n this.y /= value;\r\n return this;\r\n };\r\n Object.defineProperty(Vector2D.prototype, \"angle\", {\r\n get: function () {\r\n return this.radian * 180 / Math.PI;\r\n },\r\n set: function (value) {\r\n this.radian = value * Math.PI / 180;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Vector2D.prototype, \"radian\", {\r\n get: function () {\r\n return Math.atan2(this.y, this.x);\r\n },\r\n set: function (value) {\r\n var len = this.length;\r\n this.setXY(Math.cos(value) * len, Math.sin(value) * len);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Vector2D.prototype.equals = function (v2) {\r\n return this.x == v2.x && this.y == v2.y;\r\n };\r\n Object.defineProperty(Vector2D.prototype, \"length\", {\r\n get: function () {\r\n return Math.sqrt(this.lengthSQ);\r\n },\r\n set: function (value) {\r\n var a = this.radian;\r\n this.setXY(Math.cos(a) * value, Math.sin(a) * value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Vector2D.prototype, \"lengthSQ\", {\r\n get: function () {\r\n return this.x * this.x + this.y * this.y;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Vector2D.prototype, \"slope\", {\r\n get: function () {\r\n return this.y / this.x;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Vector2D.prototype.toString = function () {\r\n return \"[Vector2D (x:\" + this.x + \", y:\" + this.y + \")]\";\r\n };\r\n Vector2D.corner = function (v1, v2) {\r\n return Math.acos(v1.dotProd(v2) / (v1.length * v2.length));\r\n };\r\n return Vector2D;\r\n}());\r\nexport default Vector2D;\r\nvar zero = new Vector2D();\r\n//# sourceMappingURL=Vector2D.js.map"}
{"map":"{\"version\":3,\"file\":\"ScillaEvent.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/ScillaEvent.ts\"],\"names\":[],\"mappings\":\";AAQA;IAGC;QACC,IAAI,CAAC,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CAAC,CAAC,CAAC;qBACf;oBAED,IAAG,IAAI,EAAC;wBACP,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;qBAC9B;iBACD;aACD;;;;;;;;;IACF,CAAC;IACF,kBAAC;AAAD,CAAC,AAnID,IAmIC\"}","code":"import * as tslib_1 from \"tslib\";\r\nvar ScillaEvent = (function () {\r\n function ScillaEvent() {\r\n this._subscribers = [];\r\n }\r\n ScillaEvent.prototype.findListener = function (callback) {\r\n var _subscribers = this._subscribers;\r\n var result;\r\n for (var i = 0, li = _subscribers.length; i < li; i++) {\r\n var subscriber = _subscribers[i];\r\n if (subscriber.callback == callback) {\r\n result = {\r\n subscriber: subscriber,\r\n index: i,\r\n };\r\n break;\r\n }\r\n }\r\n return result;\r\n };\r\n ScillaEvent.prototype.addListener = function (callback, thisObj, priority) {\r\n if (priority === void 0) { priority = 0; }\r\n var params = [];\r\n for (var _i = 3; _i < arguments.length; _i++) {\r\n params[_i - 3] = arguments[_i];\r\n }\r\n if (!callback) {\r\n return;\r\n }\r\n var _subscribers = this._subscribers;\r\n var listener = this.findListener(callback);\r\n if (!listener) {\r\n _subscribers.push({\r\n callback: callback,\r\n thisObj: thisObj,\r\n priority: priority,\r\n params: params,\r\n });\r\n }\r\n };\r\n ScillaEvent.prototype.once = function (callback, thisObj, priority) {\r\n if (priority === void 0) { priority = 0; }\r\n var params = [];\r\n for (var _i = 3; _i < arguments.length; _i++) {\r\n params[_i - 3] = arguments[_i];\r\n }\r\n if (!callback) {\r\n return;\r\n }\r\n var _subscribers = this._subscribers;\r\n var listener = this.findListener(callback);\r\n if (!listener) {\r\n _subscribers.push({\r\n callback: callback,\r\n thisObj: thisObj,\r\n priority: priority,\r\n params: params,\r\n once: true,\r\n });\r\n }\r\n };\r\n ScillaEvent.prototype.removeListener = function (callback) {\r\n if (!callback) {\r\n return;\r\n }\r\n var _subscribers = this._subscribers;\r\n var listener = this.findListener(callback);\r\n if (listener) {\r\n _subscribers.splice(listener.index, 1);\r\n }\r\n };\r\n ScillaEvent.prototype.hasListener = function (callback) {\r\n return !!this.findListener(callback);\r\n };\r\n ScillaEvent.prototype.invoke = function () {\r\n var paramsNew = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n paramsNew[_i] = arguments[_i];\r\n }\r\n var e_1, _a;\r\n var _subscribers = this._subscribers;\r\n _subscribers.sort(function (a, b) {\r\n return a.priority - b.priority;\r\n });\r\n try {\r\n for (var _subscribers_1 = tslib_1.__values(_subscribers), _subscribers_1_1 = _subscribers_1.next(); !_subscribers_1_1.done; _subscribers_1_1 = _subscribers_1.next()) {\r\n var subscriber = _subscribers_1_1.value;\r\n if (subscriber) {\r\n var callback = subscriber.callback, thisObj = subscriber.thisObj, once = subscriber.once, params = subscriber.params;\r\n var allParams = params.concat(paramsNew);\r\n try {\r\n callback.apply(thisObj, allParams);\r\n }\r\n catch (e) {\r\n console.log(e);\r\n }\r\n if (once) {\r\n this.removeListener(callback);\r\n }\r\n }\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_subscribers_1_1 && !_subscribers_1_1.done && (_a = _subscribers_1.return)) _a.call(_subscribers_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n };\r\n return ScillaEvent;\r\n}());\r\nexport { ScillaEvent };\r\n//# sourceMappingURL=ScillaEvent.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/index.ts\"],\"names\":[],\"mappings\":\"AAMA,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAC,MAAM,YAAY,CAAA;AAC/E,OAAO,EAAC,WAAW,EAAE,KAAK,EAAC,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,QAAQ,CAAA;AAEtC,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AAErC,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC\"}","code":"export { default as Bounds } from './Bounds';\r\nexport { default as Vector2D, createVector2D, releaseVector2D } from './Vector2D';\r\nexport { createTween, Tween } from './Tween';\r\nexport { default as Matrix } from './Matrix';\r\nexport { default as Size } from './Size';\r\nexport { default as LocalStorage } from './LocalStorage';\r\nexport { TextStyle } from './TextStyle';\r\nexport { default as EventEmitter } from './EventEmitter';\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"Texture.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/Texture.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAKrD;IAAqC,mCAAU;IAM9C;QAAA,YACC,iBAAO,SAGP;QADA,KAAI,CAAC,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;;IAC5B,CAAC;IAMD,0BAAQ,GAAR,UAAS,KAAK;QACR,IAAA,WAAC,EAAE,WAAC,EAAE,WAAC,EAAE,WAAC,CAAU;QACzB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC;IAMD,wBAAM,GAAN,UAAO,GAAG;QACT,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IAChB,CAAC;IAKD,sBAAI,0BAAK;aAAT;YACC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QAC1B,C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AAC;IAC1B,CAAC;IACF,cAAC;AAAD,CAAC,AA7FD,CAAqC,UAAU,GA6F9C;;AAOD,MAAM,UAAU,aAAa,CAAC,GAAG,EAAE,KAAM;IACxC,IAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,EAAC,CAAC,CAAC;IAErE,OAAO,OAAO,CAAC;AAChB,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport Bounds from \"../support/Bounds\";\r\nimport HashObject from \"../core/HashObject\";\r\nimport { createCanvas } from \"./context/RenderContext\";\r\nvar Texture = (function (_super) {\r\n tslib_1.__extends(Texture, _super);\r\n function Texture() {\r\n var _this = _super.call(this) || this;\r\n _this.bounds = new Bounds();\r\n return _this;\r\n }\r\n Texture.prototype.setFrame = function (frame) {\r\n var x = frame.x, y = frame.y, w = frame.w, h = frame.h;\r\n this.bounds.setTo(x, y, w, h);\r\n };\r\n Texture.prototype.setImg = function (img) {\r\n this.img = img;\r\n };\r\n Object.defineProperty(Texture.prototype, \"width\", {\r\n get: function () {\r\n return this.bounds.width;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Texture.prototype, \"height\", {\r\n get: function () {\r\n return this.bounds.height;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Texture.prototype.getCacheCanvas = function () {\r\n var _a = this.bounds, width = _a.width, height = _a.height;\r\n var canvas = this._cacheCanvas;\r\n if (!canvas) {\r\n canvas = this._cacheCanvas = createCanvas();\r\n }\r\n canvas.width = width;\r\n canvas.height = height;\r\n var context = canvas.getContext('2d');\r\n this.drawToCanvas(context);\r\n return canvas;\r\n };\r\n Texture.prototype.drawToCanvas = function (context, dx, dy, sx, sy, dw, dh) {\r\n if (dx === void 0) { dx = 0; }\r\n if (dy === void 0) { dy = 0; }\r\n var _a = this.bounds, x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n context.drawImage(this.img, sx || x, sy || y, width, height, dx, dy, dw || width, dh || height);\r\n };\r\n Texture.prototype.destroy = function () {\r\n this.img = null;\r\n this.bounds = null;\r\n this.destroyCacheCanvas();\r\n };\r\n Texture.prototype.destroyCacheCanvas = function () {\r\n this._cacheCanvas = null;\r\n };\r\n return Texture;\r\n}(HashObject));\r\nexport default Texture;\r\nexport function createTexture(img, frame) {\r\n var texture = new Texture();\r\n texture.setImg(img);\r\n texture.setFrame(frame || { x: 0, y: 0, w: img.width, h: img.height });\r\n return texture;\r\n}\r\n//# sourceMappingURL=Texture.js.map"}
{"map":"{\"version\":3,\"file\":\"time.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/tools/time.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,MAAM,IAAI,YAAY,EAAE,UAAU,EAAC,MAAM,SAAS,CAAA;AAM1D,MAAM,UAAU,OAAO,CAAC,EAAE;IACzB,IAAI,OAAO,GAAQ,IAAI,IAAI,EAAE,CAAC;IAC9B,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACpB,OAAO,OAAO,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAS,EAAE,MAA6B;IAA7B,uBAAA,EAAA,sBAA6B;IACxE,OAAO,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;AACnH,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAS,EAAE,MAA6B;IAA7B,uBAAA,EA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E5C,IAAI,SAAS,EAAE;QACd,EAAE,GAAG,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACvB,EAAE,GAAG,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACvB,EAAE,GAAG,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACvB,EAAE,GAAG,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;KACvB;IAED,OAAO,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAC7C,CAAC\"}","code":"import { format as stringFormat, supplement } from './utils';\r\nexport function ts2Date(ts) {\r\n var newDate = new Date();\r\n newDate.setTime(ts);\r\n return newDate;\r\n}\r\nexport function dateToDateString(date, format) {\r\n if (format === void 0) { format = '{0}/{1}/{2}'; }\r\n return stringFormat(format, date.getFullYear(), supplement(date.getMonth() + 1, 2), supplement(date.getDate(), 2));\r\n}\r\nexport function dateToTimeString(date, format) {\r\n if (format === void 0) { format = '{0}:{1}:{2}'; }\r\n return stringFormat(format, supplement(date.getHours(), 2), supplement(date.getMinutes(), 2), supplement(date.getSeconds(), 2));\r\n}\r\nexport function dateToString(date, dayFormat, timeFormat) {\r\n return dateToDateString(date, dayFormat) + dateToTimeString(date, timeFormat);\r\n}\r\nexport function tsToTimeString(ts, format) {\r\n if (format === void 0) { format = '{0}:{1}:{2}'; }\r\n var date = ts2Date(ts);\r\n return stringFormat(format, supplement(date.getHours(), 2), supplement(date.getMinutes(), 2), supplement(date.getSeconds(), 2));\r\n}\r\nexport function secondFormat(second, format, placeZero) {\r\n if (format === void 0) { format = '{2}:{1}:{0}'; }\r\n if (placeZero === void 0) { placeZero = true; }\r\n var ss = second % 60;\r\n var mm = Math.floor(second / 60) % 60;\r\n var hh = Math.floor(second / 3600) % 24;\r\n var dd = Math.floor(second / 3600 / 24);\r\n if (placeZero) {\r\n ss = supplement(ss, 2);\r\n mm = supplement(mm, 2);\r\n hh = supplement(hh, 2);\r\n dd = supplement(dd, 2);\r\n }\r\n return stringFormat(format, ss, mm, hh, dd);\r\n}\r\n//# sourceMappingURL=time.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/assets-manager/index.ts\"],\"names\":[],\"mappings\":\";AAOA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAiB,iBAAiB,EAAE,YAAY,EAAC,MAAM,wBAAwB,CAAA;AACtF,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAA;AAEnC,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE9C,IAAI,QAAQ,GAAG,EAAE,CAAC;AAClB,IAAI,OAAO,GAAG,EAAE,CAAC;AAEjB,IAAM,aAAa,GAAG;IACrB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,mBAAmB;IAC5B,MAAM,EAAE,SAAS;IACjB,eAAe,EAAE,iBAAiB;IAClC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,QAAQ;CACjB,CAAC;AAMF,MAAM,UAAU,UAAU,CAAC,IAAI;IAC9B,OAAO,GAAG,IAAI,CAAC;AAChB,CAAC;AAQD,MAAM,UAAU,YAAY,CAAC,KAA0B,EAAE,QAAuC;IAC/F,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;IACzB,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,OAAO,OAAO,CAAC,GAAG,CACjB,KAAK,CAAC,GAAG,CAAC,UAAA,IAAI;QACb,IAAI,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC;QAC3B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC7B,GAAG,G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X,CAAC,CAAA;IACF,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,SAAe,WAAW,CAAC,IAAI;;;;;wBACd,WAAM,mBAAmB,CAAC,IAAI,CAAC,EAAA;;oBAAzC,OAAO,GAAG,SAA+B;oBAE/C,WAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;4BAClC,IAAI,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;4BACtB,IAAI,YAAY,CAAC,cAAc,EAAE;gCAChC,GAAG,CAAC,YAAY,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;6BAC7C;4BACD,GAAG,CAAC,MAAM,GAAG;gCACZ,OAAO,CAAC,GAAG,CAAC,CAAC;4BACd,CAAC,CAAC;4BACF,GAAG,CAAC,OAAO,GAAG,UAAU,CAAC;gCACxB,MAAM,CAAC,CAAC,CAAC,CAAC;4BACX,CAAC,CAAC;4BACF,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC;wBACnB,CAAC,CAAC,EAAA;;;;CACF\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { createTexture } from '../core/Texture';\r\nimport { getFrameAnimation, putFrameAnim } from '../core/FrameAnimation';\r\nimport { Sheet } from '../core/Sheet';\r\nimport { EngineConfig } from \"../engine-config\";\r\nvar resCache = {};\r\nvar resPath = '';\r\nvar resLoaderType = {\r\n '.json': loadJson,\r\n '.json5': loadJson5,\r\n '.txt': loadTxt,\r\n '.png': loadTexture,\r\n '.jpg': loadTexture,\r\n '.svg': loadTexture,\r\n '.bimg': loadTextureFromBlob,\r\n '.sht': loadSheet,\r\n '.sht-disperse': loadSheetDisperse,\r\n '.fnt': loadFont,\r\n '.anim': loadAnim,\r\n};\r\nexport function setResPath(path) {\r\n resPath = path;\r\n}\r\nexport function loadResItems(items, progress) {\r\n var total = items.length;\r\n var count = 0;\r\n return Promise.all(items.map(function (item) {\r\n var uuid, url, config, ext;\r\n if (typeof item === 'string') {\r\n url = item;\r\n }\r\n else {\r\n url = item.url;\r\n }\r\n if (!url) {\r\n return Promise.resolve();\r\n }\r\n if (typeof item === 'string') {\r\n uuid = getUUIDFromUrl(url);\r\n }\r\n else {\r\n uuid = item.uuid || getUUIDFromUrl(url);\r\n ext = item.ext;\r\n config = item.config;\r\n }\r\n var loader = getLoader(ext, url);\r\n return loader(url, uuid, true, config).then(function (res) {\r\n count++;\r\n progress && progress(count / total);\r\n return res;\r\n });\r\n }));\r\n}\r\nexport function loadAny(url, uuid, cache, config, options, type) {\r\n if (cache === void 0) { cache = true; }\r\n if (options === void 0) { options = {}; }\r\n if (type === void 0) { type = 'arraybuffer'; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var response, result;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, fetch(resolveUrl(url), options)];\r\n case 1:\r\n response = _a.sent();\r\n switch (type) {\r\n case 'json':\r\n result = response.json();\r\n break;\r\n case 'text':\r\n result = response.text();\r\n break;\r\n case 'arraybuffer':\r\n result = response.arrayBuffer();\r\n break;\r\n case 'blob':\r\n result = response.blob();\r\n break;\r\n }\r\n return [4, result];\r\n case 2: return [2, _a.sent()];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadTxt(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n var p = loadAny(url, uuid, cache, config, undefined, 'text');\r\n if (cache) {\r\n p.then(function (data) {\r\n cacheRes(data, url, uuid);\r\n return data;\r\n });\r\n }\r\n return p;\r\n}\r\nexport function loadJson(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n var p = loadAny(url, uuid, cache, config, undefined, 'json');\r\n if (cache) {\r\n p.then(function (data) {\r\n cacheRes(data, url, uuid);\r\n return data;\r\n });\r\n }\r\n return p;\r\n}\r\nexport function loadJson5(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var txt, jsonData;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadTxt(url, uuid)];\r\n case 1:\r\n txt = _a.sent();\r\n jsonData = window['eval'](\"(\" + txt + \")\");\r\n cacheRes(jsonData, url, uuid);\r\n return [2, jsonData];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadSheet(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n var pngFile = url.substring(0, url.lastIndexOf('.')) + '.png';\r\n return Promise.all([\r\n loadJson(url, null, false),\r\n loadImage(pngFile, null, false),\r\n ]).then(function (result) {\r\n var e_1, _a;\r\n var data = result[0];\r\n var img = result[1];\r\n var sheet = new Sheet(img, data.frames);\r\n sheet.generateAll();\r\n if (cache) {\r\n cacheRes(sheet, url, uuid);\r\n if (config) {\r\n try {\r\n for (var _b = tslib_1.__values(config.textures), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var textureConfig = _c.value;\r\n var name_1 = textureConfig.name, uuid_1 = textureConfig.uuid;\r\n var texture = sheet.getTexture(name_1);\r\n cacheRes(texture, name_1, uuid_1);\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n }\r\n else {\r\n var textures = sheet.getAllTextures();\r\n for (var key in textures) {\r\n cacheRes(textures[key], key, key);\r\n }\r\n }\r\n }\r\n return sheet;\r\n });\r\n}\r\nexport function loadSheetDisperse(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var e_2, _a, _b, _c, _d, name_2, uuid_2, subUrl, e_2_1;\r\n return tslib_1.__generator(this, function (_e) {\r\n switch (_e.label) {\r\n case 0:\r\n _e.trys.push([0, 5, 6, 7]);\r\n _b = tslib_1.__values(config.textures), _c = _b.next();\r\n _e.label = 1;\r\n case 1:\r\n if (!!_c.done) return [3, 4];\r\n _d = _c.value, name_2 = _d.name, uuid_2 = _d.uuid;\r\n subUrl = url.replace('-disperse', '') + '/' + name_2.replace('_', '/') + '.png';\r\n return [4, loadTexture(subUrl, uuid_2)];\r\n case 2:\r\n _e.sent();\r\n _e.label = 3;\r\n case 3:\r\n _c = _b.next();\r\n return [3, 1];\r\n case 4: return [3, 7];\r\n case 5:\r\n e_2_1 = _e.sent();\r\n e_2 = { error: e_2_1 };\r\n return [3, 7];\r\n case 6:\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_2) throw e_2.error; }\r\n return [7];\r\n case 7: return [2, null];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadFont(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return loadSheet(url, null, false).then(function (sheet) {\r\n if (cache) {\r\n cacheRes(sheet, url, uuid);\r\n }\r\n return sheet;\r\n });\r\n}\r\nfunction findAnimConfig(animations, name) {\r\n var result;\r\n animations.some(function (item) {\r\n if (item.name === name) {\r\n result = item;\r\n return true;\r\n }\r\n });\r\n return result;\r\n}\r\nexport function loadAnim(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n var pngFile = url.substring(0, url.lastIndexOf('.')) + '.png';\r\n return Promise.all([\r\n loadJson(url, null, false),\r\n loadImage(pngFile, null, false),\r\n ]).then(function (result) {\r\n var data = result[0];\r\n var img = result[1];\r\n putFrameAnim(img, data);\r\n var animations = [];\r\n for (var name_3 in data.mc) {\r\n var animation = getFrameAnimation(name_3);\r\n if (cache) {\r\n var uuid_3 = name_3;\r\n if (config) {\r\n var cfg = findAnimConfig(config.animations, name_3);\r\n uuid_3 = cfg.uuid;\r\n }\r\n cacheRes(animation, name_3, uuid_3);\r\n }\r\n animations.push(animation);\r\n }\r\n return animations;\r\n });\r\n}\r\nexport function loadImage(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return new Promise(function (resolve, reject) {\r\n var img = new Image();\r\n if (EngineConfig.imgCrossOrigin) {\r\n img.setAttribute('crossOrigin', 'anonymous');\r\n }\r\n img.onload = function (e) {\r\n resolve(img);\r\n };\r\n img.onerror = function (e) {\r\n reject(e);\r\n };\r\n img.src = resolveUrl(url);\r\n });\r\n}\r\nexport function loadImageFromBlob(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var imgBlob, e_3;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 3, , 4]);\r\n return [4, loadAny(url, uuid, false, config, undefined, 'blob')];\r\n case 1:\r\n imgBlob = _a.sent();\r\n return [4, blobToImage(imgBlob)];\r\n case 2: return [2, _a.sent()];\r\n case 3:\r\n e_3 = _a.sent();\r\n console.log(e_3);\r\n return [3, 4];\r\n case 4: return [2];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadTexture(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var img, texture;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadImage(url, uuid, false)];\r\n case 1:\r\n img = _a.sent();\r\n texture = createTexture(img);\r\n if (cache) {\r\n cacheRes(texture, url, uuid);\r\n }\r\n return [2, texture];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadTextureFromBlob(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var img, texture;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadImageFromBlob(url, uuid, false)];\r\n case 1:\r\n img = _a.sent();\r\n texture = createTexture(img);\r\n if (cache) {\r\n cacheRes(texture, url, uuid);\r\n }\r\n return [2, texture];\r\n }\r\n });\r\n });\r\n}\r\nfunction resolveUrl(url) {\r\n if (url.indexOf('//') === 0 || url.indexOf('http:') === 0 || url.indexOf('https:') === 0) {\r\n return url;\r\n }\r\n return resPath + url;\r\n}\r\nfunction getLoader(ext, url) {\r\n ext = ext || url.substr(url.lastIndexOf('.'));\r\n return resLoaderType[ext] || loadAny;\r\n}\r\nfunction getUUIDFromUrl(url) {\r\n return url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('.'));\r\n}\r\nexport function cacheRes(res, url, uuid) {\r\n uuid = uuid || getUUIDFromUrl(url);\r\n resCache[uuid] = res;\r\n}\r\nexport function addLoader(ext, loader) {\r\n resLoaderType[ext] = loader;\r\n}\r\nexport function getRes(uuid) {\r\n return resCache[uuid];\r\n}\r\nexport function destroyRes(uuidOrUuids) {\r\n if (Array.isArray(uuidOrUuids)) {\r\n while (uuidOrUuids.length > 0) {\r\n delete resCache[uuidOrUuids.pop()];\r\n }\r\n }\r\n else {\r\n delete resCache[uuidOrUuids];\r\n }\r\n}\r\nexport function destroyAllRes() {\r\n for (var key in resCache) {\r\n destroyRes(key);\r\n }\r\n}\r\nexport function getAllResUuids() {\r\n return Object.keys(resCache);\r\n}\r\nfunction fileOrBlobToDataURL(obj) {\r\n return new Promise(function (resolve, reject) {\r\n var a = new FileReader();\r\n a.readAsDataURL(obj);\r\n a.onload = function (e) {\r\n resolve(e.target['result']);\r\n };\r\n a.onerror = function (e) {\r\n reject(e);\r\n };\r\n });\r\n}\r\nfunction blobToImage(blob) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var dataUrl;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, fileOrBlobToDataURL(blob)];\r\n case 1:\r\n dataUrl = _a.sent();\r\n return [2, new Promise(function (resolve, reject) {\r\n var img = new Image();\r\n if (EngineConfig.imgCrossOrigin) {\r\n img.setAttribute('crossOrigin', 'anonymous');\r\n }\r\n img.onload = function () {\r\n resolve(img);\r\n };\r\n img.onerror = function (e) {\r\n reject(e);\r\n };\r\n img.src = dataUrl;\r\n })];\r\n }\r\n });\r\n });\r\n}\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"interpreter.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/editor/interpreter.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,MAAM,EAAS,WAAW,EAAC,MAAM,SAAS,CAAC;AACnD,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC,IAAI,WAAW,GAAG,EAAE,CAAC;AACrB,IAAI,iBAAiB,CAAC;AACtB,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,IAAI,QAAQ,GAAW,CAAC,CAAC;AAEzB,MAAM,UAAU,WAAW,CAAC,IAAI,EAAE,GAAG;IACpC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;IACnB,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC;AACtB,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAM;IACnC,OAAO,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACtE,CAAC;AAOD,MAAM,UAAU,UAAU,CAAC,KAAY,EAAE,IAAY;IACpD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,IAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,iBAAiB,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACjD,iBAAiB,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAErC,WAAW,GAAG,EAAE,CAAC;IAEjB,OAAO,KAAK,CAAC;AACd,CAAC;AAMD,MAAM,UAAU,YAAY,CAAC,KAAY;IACxC,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACxB,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC3B,IAAI,CAAC,cAAc,EAAE,CAAC;AACvB,CAAC;AAMD,MAAM,UAAU,WAAW,CAAC,MAAW;IACtC,IAAI,GAAG,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AAM,CAAC;IACX,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QAC7B,IAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC3B,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;KACtB;SAAM,IAAI,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;QACvC,IAAM,IAAI,GAAG,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACjD,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;KAC3B;SAAM;QACN,MAAM,GAAG,GAAG,CAAC;KACb;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,eAAe,CAAC,IAAI,EAAE,GAAG;IACjC,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACtC,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { Entity, ScillaEvent } from \"../core\";\r\nimport { getRes } from \"../assets-manager\";\r\nvar entityCache = {};\r\nvar entityCacheConfig;\r\nvar defMap = {};\r\nvar prefabID = 0;\r\nexport function registerDef(name, def) {\r\n defMap[name] = def;\r\n def.__class__ = name;\r\n}\r\nfunction getEntityCacheConfig(config) {\r\n return config['entity-cache'] ? config['entity-cache'].concat() : [];\r\n}\r\nexport function setupScene(scene, root) {\r\n scene.root = root;\r\n var config = scene.config;\r\n entityCacheConfig = getEntityCacheConfig(config);\r\n instantiateConfig(config.root, root);\r\n entityCache = {};\r\n return scene;\r\n}\r\nexport function destroyScene(scene) {\r\n var root = scene.root;\r\n root.removeAllComponents();\r\n root.removeChildren();\r\n}\r\nexport function instantiate(config) {\r\n var pid = ++prefabID;\r\n entityCacheConfig = getEntityCacheConfig(config);\r\n for (var i = 0, li = entityCacheConfig.length; i < li; i++) {\r\n entityCacheConfig[i] = pid + '_' + entityCacheConfig[i];\r\n }\r\n var rootConfig = config.root;\r\n var entity = setupEntity(rootConfig, null, pid);\r\n setupComponent(rootConfig, entity, true);\r\n injectComponent(rootConfig, entity, true, pid);\r\n entityCache = {};\r\n return entity.children[0];\r\n}\r\nfunction instantiateConfig(config, root) {\r\n var entity = setupEntity(config, root);\r\n setupComponent(config, entity, true);\r\n injectComponent(config, entity, true);\r\n return entity;\r\n}\r\nfunction setupEntity(config, root, pid) {\r\n var entity = null;\r\n if (config) {\r\n var name_1 = config.name, uuid = config.uuid, children = config.children;\r\n if (pid !== undefined && uuid !== undefined) {\r\n uuid = pid + '_' + uuid;\r\n }\r\n entity = root || new Entity(name_1, uuid);\r\n if (entityCacheConfig.indexOf(uuid) >= 0) {\r\n entityCache[uuid] = entity;\r\n }\r\n if (children) {\r\n for (var i = 0, li = children.length; i < li; i++) {\r\n var child = children[i];\r\n var childEntity = setupEntity(child, null, pid);\r\n entity.addChild(childEntity);\r\n }\r\n }\r\n if (!root) {\r\n entity.enabled = !config.disabled;\r\n }\r\n }\r\n return entity;\r\n}\r\nfunction setupComponent(config, root, includeSelf) {\r\n if (includeSelf === void 0) { includeSelf = false; }\r\n if (includeSelf) {\r\n instantiateComponents(root, config);\r\n }\r\n if (config && config.children) {\r\n for (var i = 0, li = root.children.length; i < li; i++) {\r\n var child = config.children[i];\r\n var entity = root.children[i];\r\n instantiateComponents(entity, child);\r\n setupComponent(child, entity);\r\n }\r\n }\r\n}\r\nfunction injectComponent(config, root, includeSelf, pid) {\r\n if (includeSelf === void 0) { includeSelf = false; }\r\n if (includeSelf) {\r\n injectComponents(root, config, pid);\r\n }\r\n if (config && config.children) {\r\n for (var i = 0, li = root.children.length; i < li; i++) {\r\n var child = config.children[i];\r\n var entity = root.children[i];\r\n injectComponents(entity, child, pid);\r\n injectComponent(child, entity, false, pid);\r\n }\r\n }\r\n}\r\nfunction instantiateComponents(entity, config) {\r\n var e_1, _a;\r\n if (config.components) {\r\n try {\r\n for (var _b = tslib_1.__values(config.components), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var component = _c.value;\r\n instantiateComponent(entity, component);\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n }\r\n}\r\nfunction injectComponents(entity, config, pid) {\r\n if (config.components) {\r\n var components = entity.components;\r\n for (var i = 0, li = config.components.length; i < li; i++) {\r\n var component = config.components[i];\r\n var properties = component.properties;\r\n if (properties) {\r\n injectProperties(components[i], properties, pid);\r\n }\r\n }\r\n }\r\n}\r\nfunction instantiateComponent(entity, config) {\r\n var script = config.script, properties = config.properties;\r\n var def = getDefByName(script);\r\n if (!def) {\r\n return;\r\n }\r\n var instance = new def();\r\n instance.enabled = !config.disabled;\r\n entity.addComponent(instance);\r\n}\r\nfunction getDefByName(name) {\r\n var def;\r\n def = defMap[name];\r\n if (!def) {\r\n console.warn('missing def:', name);\r\n return;\r\n }\r\n return def;\r\n}\r\nvar skipKeys = ['_type_', '_constructor_'];\r\nfunction injectProperties(node, propertiesConfig, pid) {\r\n if (!node) {\r\n console.warn('node is null.');\r\n return;\r\n }\r\n for (var key in propertiesConfig) {\r\n if (skipKeys.indexOf(key) >= 0) {\r\n continue;\r\n }\r\n var propertyOfConfig = propertiesConfig[key];\r\n var propertyOfInstance = node[key];\r\n if (typeof propertyOfConfig === 'object') {\r\n if (propertyOfInstance instanceof ScillaEvent) {\r\n injectEvent(propertyOfInstance, propertyOfConfig, pid);\r\n }\r\n else if (propertyOfConfig._type_ === 'raw') {\r\n node[key] = propertyOfInstance = propertyOfConfig.data;\r\n }\r\n else {\r\n if (Array.isArray(propertyOfConfig) && !propertyOfInstance) {\r\n node[key] = propertyOfInstance = [];\r\n }\r\n node[key] = injectObject(propertyOfInstance, propertyOfConfig, pid);\r\n }\r\n }\r\n else {\r\n injectBaseType(node, key, propertyOfConfig, pid);\r\n }\r\n }\r\n}\r\nfunction injectObject(propertyOfInstance, propertyOfConfig, pid) {\r\n if (propertyOfInstance === undefined) {\r\n if (propertyOfConfig._type_) {\r\n var def = getDefByName(propertyOfConfig._type_);\r\n if (def) {\r\n var constructorArgs = propertyOfConfig._constructor_;\r\n if (constructorArgs && constructorArgs.length > 0) {\r\n propertyOfInstance = def.constructor.apply(null, constructorArgs);\r\n }\r\n else {\r\n propertyOfInstance = new def();\r\n }\r\n }\r\n }\r\n }\r\n if (propertyOfInstance) {\r\n injectProperties(propertyOfInstance, propertyOfConfig, pid);\r\n }\r\n return propertyOfInstance;\r\n}\r\nfunction injectBaseType(node, key, propertyOfConfig, pid) {\r\n var propertyValue;\r\n if (typeof propertyOfConfig === 'string') {\r\n propertyValue = getLink(propertyOfConfig, pid);\r\n }\r\n else {\r\n propertyValue = propertyOfConfig;\r\n }\r\n node[key] = propertyValue;\r\n}\r\nfunction injectEvent(event, config, pid) {\r\n var e_2, _a;\r\n try {\r\n for (var config_1 = tslib_1.__values(config), config_1_1 = config_1.next(); !config_1_1.done; config_1_1 = config_1.next()) {\r\n var _b = config_1_1.value, entityName = _b.entity, componentIndex = _b.component, methodName = _b.method, param = _b.param;\r\n if (entityName && componentIndex >= 0 && methodName) {\r\n var entity = getLink(entityName, pid);\r\n var component = entity.components[componentIndex];\r\n var method = component[methodName];\r\n if (method) {\r\n if (param == undefined) {\r\n event.addListener(method, component, 0);\r\n }\r\n else {\r\n event.addListener(method, component, 0, param);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\r\n finally {\r\n try {\r\n if (config_1_1 && !config_1_1.done && (_a = config_1.return)) _a.call(config_1);\r\n }\r\n finally { if (e_2) throw e_2.error; }\r\n }\r\n}\r\nfunction getLink(str, pid) {\r\n var result;\r\n if (str.indexOf('res|') == 0) {\r\n var uuid = str.substr(4);\r\n result = getRes(uuid);\r\n }\r\n else if (str.indexOf('entity|') == 0) {\r\n var uuid = transPrefabUUID(str.substr(7), pid);\r\n result = entityCache[uuid];\r\n }\r\n else {\r\n result = str;\r\n }\r\n return result;\r\n}\r\nfunction transPrefabUUID(uuid, pid) {\r\n return pid ? pid + '_' + uuid : uuid;\r\n}\r\n//# sourceMappingURL=interpreter.js.map"}
{"map":"{\"version\":3,\"file\":\"math.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/tools/math.ts\"],\"names\":[],\"mappings\":\";AAcA,MAAM,UAAU,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,gBAAwB;IAAxB,iCAAA,EAAA,wBAAwB;IAC3D,IAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,IAAI,IAAI,KAAK,OAAO,GAAG,EAAE;QACxB,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAA;KAC7C;IAED,IAAI,CAAC,gBAAgB,EAAE;QACtB,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KAChC;IAED,IAAI,IAAI,GAAG,GAAG,GAAG,KAAK,CAAC;IACvB,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,IAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC;IAEvC,OAAO,KAAK,GAAG,QAAQ,GAAG,CAAC,GAAG,IAAI,CAAC;AACpC,CAAC;AAYD,MAAM,UAAU,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAwB;IAAxB,iCAAA,EAAA,wBAAwB;;IAC7E,IAAM,IAA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export function lerp(begin, end, t, allowOutOfBounds) {\r\n if (allowOutOfBounds === void 0) { allowOutOfBounds = false; }\r\n var type = typeof begin;\r\n if (type !== typeof end) {\r\n console.error('begin and end need same type');\r\n }\r\n if (!allowOutOfBounds) {\r\n t = Math.max(0, Math.min(1, t));\r\n }\r\n var sign = end - begin;\r\n sign = sign > 0 ? 1 : (sign < 0 ? -1 : 0);\r\n var distance = Math.abs(end - begin);\r\n return begin + distance * t * sign;\r\n}\r\nexport function lerpObj(begin, end, t, clazz, fields, allowOutOfBounds) {\r\n if (allowOutOfBounds === void 0) { allowOutOfBounds = false; }\r\n var e_1, _a;\r\n var type = typeof begin;\r\n if (type !== typeof end) {\r\n console.error('begin and end need same type');\r\n }\r\n var temp = new clazz();\r\n try {\r\n for (var fields_1 = tslib_1.__values(fields), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {\r\n var field = fields_1_1.value;\r\n temp[field] = lerp(begin[field], end[field], t, allowOutOfBounds);\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (fields_1_1 && !fields_1_1.done && (_a = fields_1.return)) _a.call(fields_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n return temp;\r\n}\r\nexport function makeRandomInt(max, min) {\r\n if (min === void 0) { min = 0; }\r\n return Math.floor(Math.random() * (max - min)) + min;\r\n}\r\nexport function mixArray(arr) {\r\n for (var i = 0, len = Math.round(arr.length / 2); i < len; i++) {\r\n var a = makeRandomInt(arr.length);\r\n var b = makeRandomInt(arr.length);\r\n var temp = arr[a];\r\n arr[a] = arr[b];\r\n arr[b] = temp;\r\n }\r\n return arr;\r\n}\r\n//# sourceMappingURL=math.js.map"}
{"map":"{\"version\":3,\"file\":\"requestAnimationFrame.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/requestAnimationFrame.ts\"],\"names\":[],\"mappings\":\"AAIA,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,IAAI,OAAO,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AAChC,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,EAAE,CAAC,EAAE;IACrE,MAAM,CAAC,qBAAqB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,uBAAuB,CAAC,CAAC;IAC5E,MAAM,CAAC,oBAAoB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC;QACvE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,6BAA6B,CAAC,CAAC;CACxD;AAED,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE;IAC/B,MAAM,CAAC,qBAAqB,GAAG,UAAS,QAAQ;QAC5C,IAAI,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;QACpC,IAAI,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC;QAC3D,IAAI,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;YACvB,QAAQ,CAAC,QAAQ,GAAG,UAAU,CAAC,CAAC;QACpC,CAAC,EAAE,UAAU,CAAC,CAAC;QACf,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;QACjC,OAAO,EAAE,CAAC;IACd,CAAC,CAAC;CACL;AACD,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE;IAC9B,MAAM,CAAC,oBAAoB,GAAG,UAAS,EAAE;QACrC,YAAY,CAAC,EAAE,CAAC,CAAC;IACrB,CAAC,CAAC;CACL\"}","code":"var lastTime = 0;\r\nvar vendors = ['webkit', 'moz'];\r\nfor (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\r\n window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];\r\n window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] ||\r\n window[vendors[x] + 'CancelRequestAnimationFrame'];\r\n}\r\nif (!window.requestAnimationFrame) {\r\n window.requestAnimationFrame = function (callback) {\r\n var currTime = new Date().getTime();\r\n var timeToCall = Math.max(0, 16.7 - (currTime - lastTime));\r\n var id = window.setTimeout(function () {\r\n callback(currTime + timeToCall);\r\n }, timeToCall);\r\n lastTime = currTime + timeToCall;\r\n return id;\r\n };\r\n}\r\nif (!window.cancelAnimationFrame) {\r\n window.cancelAnimationFrame = function (id) {\r\n clearTimeout(id);\r\n };\r\n}\r\n//# sourceMappingURL=requestAnimationFrame.js.map"}
{"map":"{\"version\":3,\"file\":\"Tween.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/Tween.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAE5C,IAAK,MAOJ;AAPD,WAAK,MAAM;IACV,mCAAI,CAAA;IACJ,yCAAO,CAAA;IACP,uCAAM,CAAA;IACN,qCAAK,CAAA;IACL,yCAAO,CAAA;IACP,yCAAO,CAAA;AACR,CAAC,EAPI,MAAM,KAAN,MAAM,QAOV;AAqBD,MAAM,UAAU,WAAW,CAAC,MAAuB,EAAE,QAAgB,EAAE,OAAsB,EAAE,OAAY;IAAtD,yBAAA,EAAA,gBAAgB;IAA0B,wBAAA,EAAA,YAAY;IAC1G,IAAI,QAAQ,EAAE;QACb,UAAU,CAAC,MAAM,CAAC,CAAC;KACnB;IAED,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAExB,OAAO,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Object from \"../core/HashObject\";\r\nvar STATUS;\r\n(function (STATUS) {\r\n STATUS[STATUS[\"IDLE\"] = 0] = \"IDLE\";\r\n STATUS[STATUS[\"PENDING\"] = 1] = \"PENDING\";\r\n STATUS[STATUS[\"DO_SET\"] = 2] = \"DO_SET\";\r\n STATUS[STATUS[\"DO_TO\"] = 3] = \"DO_TO\";\r\n STATUS[STATUS[\"DO_WAIT\"] = 4] = \"DO_WAIT\";\r\n STATUS[STATUS[\"DO_CALL\"] = 5] = \"DO_CALL\";\r\n})(STATUS || (STATUS = {}));\r\nexport function createTween(target, override, options, plugins) {\r\n if (override === void 0) { override = false; }\r\n if (plugins === void 0) { plugins = []; }\r\n if (override) {\r\n killTweens(target);\r\n }\r\n var tween = new Tween(target, options);\r\n addTween(target, tween);\r\n return tween;\r\n}\r\nexport function killTweens(target) {\r\n var e_1, _a;\r\n var tweens = target['tweens'];\r\n if (tweens) {\r\n try {\r\n for (var tweens_1 = tslib_1.__values(tweens), tweens_1_1 = tweens_1.next(); !tweens_1_1.done; tweens_1_1 = tweens_1.next()) {\r\n var tween = tweens_1_1.value;\r\n tween.stop();\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (tweens_1_1 && !tweens_1_1.done && (_a = tweens_1.return)) _a.call(tweens_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n tweens.splice(0);\r\n }\r\n}\r\nfunction addTween(target, tween) {\r\n var tweens = target['tweens'];\r\n if (!tweens) {\r\n tweens = target['tweens'] = [];\r\n }\r\n tweens.push(tween);\r\n}\r\nvar Tween = (function (_super) {\r\n tslib_1.__extends(Tween, _super);\r\n function Tween(target, options, plugins) {\r\n if (plugins === void 0) { plugins = []; }\r\n var _this = _super.call(this) || this;\r\n _this.queue = [];\r\n _this.loopCounting = 0;\r\n _this.status = STATUS.IDLE;\r\n _this.onUpdate = function (t) {\r\n _this.t = t;\r\n switch (_this.status) {\r\n case STATUS.DO_TO:\r\n var _a = _this, target = _a.target, startTime = _a.startTime, fromProps = _a.fromProps, toProps = _a.toProps, duration = _a.duration, ease = _a.ease, clazz = _a.clazz, fields = _a.fields;\r\n var passTime = t - startTime;\r\n var timeRatio = Math.min(1, passTime / duration);\r\n var ratio = timeRatio;\r\n if (ease) {\r\n ratio = ease(ratio);\r\n }\r\n for (var key in fromProps) {\r\n var toValue = toProps[key];\r\n var fromValue = fromProps[key];\r\n var currentValue = void 0;\r\n if (timeRatio < 1) {\r\n if (typeof toValue == 'object') {\r\n currentValue = lerpObj(fromValue, toValue, ratio, clazz, fields || Object.keys(toValue), true);\r\n }\r\n else {\r\n currentValue = lerp(fromValue, toValue, ratio, true);\r\n }\r\n }\r\n else {\r\n currentValue = toValue;\r\n }\r\n target[key] = currentValue;\r\n if (timeRatio >= 1) {\r\n _this._doNextAction();\r\n }\r\n }\r\n break;\r\n case STATUS.DO_WAIT:\r\n var _b = _this, startTime = _b.startTime, duration = _b.duration;\r\n var passTime = t - startTime;\r\n if (passTime > duration) {\r\n _this._doNextAction();\r\n }\r\n break;\r\n }\r\n };\r\n _this._doPlay = function (resetLoopCounting) {\r\n addTween(_this.target, _this);\r\n _this._start(resetLoopCounting);\r\n };\r\n _this._readyStart = function (t) {\r\n _this.t = t;\r\n _this._doStart();\r\n };\r\n _this._doNextAction = function () {\r\n if (_this.step < _this.queue.length) {\r\n var action = _this.queue[_this.step++];\r\n switch (action.action) {\r\n case 'set':\r\n _this._set(action.props);\r\n break;\r\n case 'to':\r\n if (action.duration > 0) {\r\n _this._to(action.props, action.duration, action.ease);\r\n }\r\n else {\r\n _this._set(action.props);\r\n }\r\n break;\r\n case 'wait':\r\n _this._wait(action.duration);\r\n break;\r\n case 'call':\r\n _this._call(action.func, action.thisObj, action.params);\r\n break;\r\n }\r\n }\r\n else {\r\n if (_this.loop < 0) {\r\n _this._doStart();\r\n }\r\n else if (_this.loopCounting < _this.loop) {\r\n _this._doStart();\r\n }\r\n else {\r\n _this.status = STATUS.IDLE;\r\n }\r\n }\r\n };\r\n _this.target = target;\r\n _this.loop = options ? options.loop : 0;\r\n _this.autoPlay = options ? (options.hasOwnProperty('autoPlay') ? options.autoPlay : true) : true;\r\n _this.clazz = options ? options.clazz : null;\r\n _this.fields = options ? options.fields : null;\r\n _this.plugins = plugins;\r\n if (options && options.initFields && options.initFields.length > 0) {\r\n _this.initProps = _this.getInitProps(options.initFields);\r\n }\r\n return _this;\r\n }\r\n Tween.prototype.getInitProps = function (fields) {\r\n var e_2, _a;\r\n var props = {};\r\n try {\r\n for (var fields_1 = tslib_1.__values(fields), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {\r\n var field = fields_1_1.value;\r\n if (field in this.target) {\r\n props[field] = this.target[field];\r\n }\r\n }\r\n }\r\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\r\n finally {\r\n try {\r\n if (fields_1_1 && !fields_1_1.done && (_a = fields_1.return)) _a.call(fields_1);\r\n }\r\n finally { if (e_2) throw e_2.error; }\r\n }\r\n return props;\r\n };\r\n Tween.prototype.set = function (props) {\r\n this.queue.push({ action: 'set', props: props });\r\n if (this.autoPlay) {\r\n this._start();\r\n }\r\n return this;\r\n };\r\n Tween.prototype.to = function (props, duration, ease) {\r\n this.queue.push({ action: 'to', props: props, duration: duration, ease: ease });\r\n if (this.autoPlay) {\r\n this._start();\r\n }\r\n return this;\r\n };\r\n Tween.prototype.wait = function (duration) {\r\n this.queue.push({ action: 'wait', duration: duration });\r\n if (this.autoPlay) {\r\n this._start();\r\n }\r\n return this;\r\n };\r\n Tween.prototype.call = function (func, thisObj, params) {\r\n this.queue.push({ action: 'call', func: func, thisObj: thisObj, params: params });\r\n if (this.autoPlay) {\r\n this._start();\r\n }\r\n return this;\r\n };\r\n Tween.prototype.play = function (override, delay, resetLoopCounting) {\r\n if (override === void 0) { override = false; }\r\n if (delay === void 0) { delay = 0; }\r\n if (resetLoopCounting === void 0) { resetLoopCounting = true; }\r\n if (override) {\r\n killTweens(this.target);\r\n }\r\n if (delay > 0) {\r\n setTimeout(this._doPlay, delay, resetLoopCounting);\r\n }\r\n else {\r\n this._doPlay(resetLoopCounting);\r\n }\r\n };\r\n Tween.prototype.stop = function () {\r\n this.status = STATUS.IDLE;\r\n this.target.cancelOnNextTick(this.onUpdate);\r\n };\r\n Tween.prototype._set = function (props) {\r\n this.status = STATUS.DO_SET;\r\n injectProp(this.target, props);\r\n this._doNextAction();\r\n };\r\n Tween.prototype._to = function (props, duration, ease) {\r\n this.status = STATUS.DO_TO;\r\n this.startTime = this.t;\r\n this.fromProps = {};\r\n for (var key in props) {\r\n this.fromProps[key] = this.target[key];\r\n }\r\n this.toProps = {};\r\n injectProp(this.toProps, props);\r\n this.ease = ease;\r\n this.duration = duration;\r\n };\r\n Tween.prototype._wait = function (duration) {\r\n this.status = STATUS.DO_WAIT;\r\n this.startTime = this.t;\r\n this.duration = duration;\r\n };\r\n Tween.prototype._call = function (func, thisObj, params) {\r\n this.status = STATUS.DO_CALL;\r\n func.apply(thisObj, params);\r\n this._doNextAction();\r\n };\r\n Tween.prototype._start = function (resetLoopCounting) {\r\n if (resetLoopCounting === void 0) { resetLoopCounting = true; }\r\n this.status = STATUS.PENDING;\r\n if (resetLoopCounting) {\r\n this.loopCounting = 0;\r\n }\r\n this.target.callOnNextTick(this._readyStart);\r\n this.target.callOnNextTick(this.onUpdate, false);\r\n };\r\n Tween.prototype._doStart = function () {\r\n if (this.status == STATUS.IDLE) {\r\n return;\r\n }\r\n this.step = 0;\r\n this.loopCounting++;\r\n if (this.loopCounting > 1 && this.initProps) {\r\n injectProp(this.target, this.initProps);\r\n }\r\n this._doNextAction();\r\n };\r\n ;\r\n return Tween;\r\n}(HashObject));\r\nexport { Tween };\r\n//# sourceMappingURL=Tween.js.map"}
{"map":"{\"version\":3,\"file\":\"EventEmitter.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/EventEmitter.ts\"],\"names\":[],\"mappings\":\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'use strict';\r\nvar has = Object.prototype.hasOwnProperty, prefix = '~';\r\nfunction Events() { }\r\nif (Object.create) {\r\n Events.prototype = Object.create(null);\r\n if (!new Events().__proto__)\r\n prefix = '';\r\n}\r\nfunction EE(fn, context, once) {\r\n this.fn = fn;\r\n this.context = context;\r\n this.once = once || false;\r\n}\r\nfunction addListener(emitter, event, fn, context, once) {\r\n if (typeof fn !== 'function') {\r\n throw new TypeError('The listener must be a function');\r\n }\r\n var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;\r\n if (!emitter._events[evt])\r\n emitter._events[evt] = listener, emitter._eventsCount++;\r\n else if (!emitter._events[evt].fn)\r\n emitter._events[evt].push(listener);\r\n else\r\n emitter._events[evt] = [emitter._events[evt], listener];\r\n return emitter;\r\n}\r\nfunction clearEvent(emitter, evt) {\r\n if (--emitter._eventsCount === 0)\r\n emitter._events = new Events();\r\n else\r\n delete emitter._events[evt];\r\n}\r\nvar EventEmitter = (function () {\r\n function EventEmitter() {\r\n this._events = new Events();\r\n this._eventsCount = 0;\r\n this.off = this.removeListener;\r\n this.addListener = this.on;\r\n }\r\n Object.defineProperty(EventEmitter, \"prefixed\", {\r\n get: function () {\r\n return prefix;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n EventEmitter.prototype.eventNames = function () {\r\n var names = [], events, name;\r\n if (this._eventsCount === 0)\r\n return names;\r\n for (name in (events = this._events)) {\r\n if (has.call(events, name))\r\n names.push(prefix ? name.slice(1) : name);\r\n }\r\n return names;\r\n };\r\n EventEmitter.prototype.listeners = function (event) {\r\n var evt = prefix ? prefix + event : event, handlers = this._events[evt];\r\n if (!handlers)\r\n return [];\r\n if (handlers.fn)\r\n return [handlers.fn];\r\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\r\n ee[i] = handlers[i].fn;\r\n }\r\n return ee;\r\n };\r\n EventEmitter.prototype.listenerCount = function (event) {\r\n var evt = prefix ? prefix + event : event, listeners = this._events[evt];\r\n if (!listeners)\r\n return 0;\r\n if (listeners.fn)\r\n return 1;\r\n return listeners.length;\r\n };\r\n EventEmitter.prototype.emit = function (event, a1, a2, a3, a4, a5) {\r\n var evt = prefix ? prefix + event : event;\r\n if (!this._events[evt])\r\n return false;\r\n var listeners = this._events[evt], len = arguments.length, args, i;\r\n if (listeners.fn) {\r\n if (listeners.once)\r\n this.removeListener(event, listeners.fn, undefined, true);\r\n switch (len) {\r\n case 1: return listeners.fn.call(listeners.context), true;\r\n case 2: return listeners.fn.call(listeners.context, a1), true;\r\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\r\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\r\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\r\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\r\n }\r\n for (i = 1, args = new Array(len - 1); i < len; i++) {\r\n args[i - 1] = arguments[i];\r\n }\r\n listeners.fn.apply(listeners.context, args);\r\n }\r\n else {\r\n var length = listeners.length, j;\r\n for (i = 0; i < length; i++) {\r\n if (listeners[i].once)\r\n this.removeListener(event, listeners[i].fn, undefined, true);\r\n switch (len) {\r\n case 1:\r\n listeners[i].fn.call(listeners[i].context);\r\n break;\r\n case 2:\r\n listeners[i].fn.call(listeners[i].context, a1);\r\n break;\r\n case 3:\r\n listeners[i].fn.call(listeners[i].context, a1, a2);\r\n break;\r\n case 4:\r\n listeners[i].fn.call(listeners[i].context, a1, a2, a3);\r\n break;\r\n default:\r\n if (!args)\r\n for (j = 1, args = new Array(len - 1); j < len; j++) {\r\n args[j - 1] = arguments[j];\r\n }\r\n listeners[i].fn.apply(listeners[i].context, args);\r\n }\r\n }\r\n }\r\n return true;\r\n };\r\n EventEmitter.prototype.on = function (event, fn, context) {\r\n return addListener(this, event, fn, context, false);\r\n };\r\n ;\r\n EventEmitter.prototype.once = function (event, fn, context) {\r\n return addListener(this, event, fn, context, true);\r\n };\r\n EventEmitter.prototype.removeListener = function (event, fn, context, once) {\r\n var evt = prefix ? prefix + event : event;\r\n if (!this._events[evt])\r\n return this;\r\n if (!fn) {\r\n clearEvent(this, evt);\r\n return this;\r\n }\r\n var listeners = this._events[evt];\r\n if (listeners.fn) {\r\n if (listeners.fn === fn &&\r\n (!once || listeners.once) &&\r\n (!context || listeners.context === context)) {\r\n clearEvent(this, evt);\r\n }\r\n }\r\n else {\r\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\r\n if (listeners[i].fn !== fn ||\r\n (once && !listeners[i].once) ||\r\n (context && listeners[i].context !== context)) {\r\n events.push(listeners[i]);\r\n }\r\n }\r\n if (events.length)\r\n this._events[evt] = events.length === 1 ? events[0] : events;\r\n else\r\n clearEvent(this, evt);\r\n }\r\n return this;\r\n };\r\n EventEmitter.prototype.removeAllListeners = function (event) {\r\n var evt;\r\n if (event) {\r\n evt = prefix ? prefix + event : event;\r\n if (this._events[evt])\r\n clearEvent(this, evt);\r\n }\r\n else {\r\n this._events = new Events();\r\n this._eventsCount = 0;\r\n }\r\n return this;\r\n };\r\n return EventEmitter;\r\n}());\r\nexport default EventEmitter;\r\n//# sourceMappingURL=EventEmitter.js.map"}
{"map":"{\"version\":3,\"file\":\"RenderContext.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../../node_modules/scilla-core/src/core/context/RenderContext.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,IAAI,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC;AAEpC,IAAI,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,CAAC,CAAC;AAEjC,IAAI,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,CAAC;AAE/D,IAAI,cAAc,CAAC;AASnB,MAAM,CAAC,IAAM,SAAS,GAAG;IACxB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,YAAY;IACzB,YAAY,EAAE,aAAa;CAC3B,CAAC;AAMF,MAAM,UAA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AG,MAAM,CAAC;IACxB,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,UAAU,GAAG,IAAI,CAAC;IACxC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC;AAC3C,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { updateScaleMode } from \"./InteractContext\";\r\nvar _canvas, context, width, height;\r\nvar scaleX, scaleY, rotation = 0;\r\nvar _designWidth, _designHeight, _scaleMode, _modifyCanvasSize;\r\nvar shortcutCanvas;\r\nexport var ScaleMode = {\r\n SHOW_ALL: 'showAll',\r\n FIXED_WIDTH: 'fixedWidth',\r\n FIXED_HEIGHT: 'fixedHeight',\r\n};\r\nexport function setupContext(options) {\r\n if (options === void 0) { options = {}; }\r\n var canvas = options.canvas, designWidth = options.designWidth, designHeight = options.designHeight, _a = options.scaleMode, scaleMode = _a === void 0 ? ScaleMode.SHOW_ALL : _a, _b = options.modifyCanvasSize, modifyCanvasSize = _b === void 0 ? false : _b;\r\n _designWidth = designWidth;\r\n _designHeight = designHeight;\r\n _scaleMode = scaleMode;\r\n _modifyCanvasSize = modifyCanvasSize;\r\n _canvas = canvas;\r\n context = canvas.getContext('2d');\r\n updateScaleModeSelf();\r\n}\r\nexport function clear() {\r\n context.setTransform(1, 0, 0, 1, 0, 0);\r\n context.clearRect(0, 0, width, height);\r\n}\r\nexport function getContext() {\r\n return context;\r\n}\r\nexport function getStageSize() {\r\n return {\r\n width: width,\r\n height: height,\r\n };\r\n}\r\nexport function getStageScale() {\r\n return {\r\n x: scaleX,\r\n y: scaleY,\r\n };\r\n}\r\nexport function getStageCenter() {\r\n return {\r\n x: width / 2,\r\n y: height / 2,\r\n };\r\n}\r\nexport function createCanvas() {\r\n return document.createElement('canvas');\r\n}\r\nexport function shortcut(type, params) {\r\n if (type === void 0) { type = 0; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var targetImg, dataUrl, img;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!(params.bounds || params.zoomToDom)) return [3, 3];\r\n dataUrl = _canvas.toDataURL('image/png');\r\n return [4, dataUrlToImage(dataUrl)];\r\n case 1:\r\n img = _a.sent();\r\n return [4, shortcutWithSize(img, type, params.imgType, params.quality, params.bounds, params.zoomToDom ? scaleX : 1)];\r\n case 2:\r\n targetImg = _a.sent();\r\n return [3, 4];\r\n case 3:\r\n targetImg = _canvas.toDataURL(params.imgType, params.quality);\r\n _a.label = 4;\r\n case 4: return [2, targetImg];\r\n }\r\n });\r\n });\r\n}\r\nfunction dataUrlToImage(dataUrl) {\r\n return new Promise(function (resolve, reject) {\r\n var image = new Image();\r\n image.onload = function () {\r\n resolve(image);\r\n };\r\n image.onerror = function (e) {\r\n reject(e);\r\n };\r\n image.src = dataUrl;\r\n });\r\n}\r\nfunction shortcutWithSize(img, type, imgType, quality, bounds, scale) {\r\n if (scale === void 0) { scale = 1; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var sx, sy, sw, sh, dw, dh, context, dataUrl, _a;\r\n return tslib_1.__generator(this, function (_b) {\r\n switch (_b.label) {\r\n case 0:\r\n if (!shortcutCanvas) {\r\n shortcutCanvas = createCanvas();\r\n }\r\n sx = bounds ? bounds.x || 0 : 0;\r\n sy = bounds ? bounds.y || 0 : 0;\r\n sw = bounds ? (bounds.width ? Math.min(bounds.width, width) : width) : width;\r\n sh = bounds ? (bounds.height ? Math.min(bounds.height, height) : height) : height;\r\n dw = sw * scale;\r\n dh = sh * scale;\r\n shortcutCanvas.width = dw;\r\n shortcutCanvas.height = dh;\r\n context = shortcutCanvas.getContext('2d');\r\n context.drawImage(img, sx, sy, sw, sh, 0, 0, dw, dh);\r\n dataUrl = shortcutCanvas.toDataURL('image/' + imgType, quality);\r\n _a = type;\r\n switch (_a) {\r\n case 0: return [3, 1];\r\n case 1: return [3, 3];\r\n }\r\n return [3, 4];\r\n case 1: return [4, dataUrlToImage(dataUrl)];\r\n case 2: return [2, _b.sent()];\r\n case 3: return [2, dataUrl];\r\n case 4: return [2];\r\n }\r\n });\r\n });\r\n}\r\nfunction updateScaleModeSelf() {\r\n var parent = _canvas.parentElement;\r\n var containerWidth = parent.clientWidth;\r\n var containerHeight = parent.clientHeight;\r\n var designWidth = _designWidth || containerWidth;\r\n var designHeight = _designHeight || containerHeight;\r\n scaleX = containerWidth / designWidth;\r\n scaleY = containerHeight / designHeight;\r\n switch (_scaleMode) {\r\n case ScaleMode.SHOW_ALL:\r\n width = designWidth;\r\n height = designHeight;\r\n break;\r\n case ScaleMode.FIXED_WIDTH:\r\n width = designWidth;\r\n if (_modifyCanvasSize) {\r\n height = designHeight;\r\n }\r\n else {\r\n height = containerHeight / scaleX;\r\n }\r\n scaleY = scaleX;\r\n break;\r\n case ScaleMode.FIXED_HEIGHT:\r\n if (_modifyCanvasSize) {\r\n width = designWidth;\r\n }\r\n else {\r\n width = containerWidth / scaleY;\r\n }\r\n height = designHeight;\r\n scaleX = scaleY;\r\n break;\r\n }\r\n updateScaleMode(scaleX, scaleY, rotation);\r\n var styleWidth = _modifyCanvasSize ? designWidth * scaleX : containerWidth;\r\n var styleHeight = _modifyCanvasSize ? designHeight * scaleY : containerHeight;\r\n _canvas.width = width;\r\n _canvas.height = height;\r\n _canvas.style.display = 'block';\r\n _canvas.style.width = styleWidth + 'px';\r\n _canvas.style.height = styleHeight + 'px';\r\n}\r\n//# sourceMappingURL=RenderContext.js.map"}
{"map":"{\"version\":3,\"file\":\"manager.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/manager.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAC,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,YAAY,IAAI,oBAAo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AAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,EAAC;YACjC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;SACnB;aAAI;YACJ,OAAO,IAAI,CAAC;SACZ;IACF,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,UAAS,OAAO;QAC5B,OAAO,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;AAEJ,CAAC;AAMD,SAAS,YAAY,CAAC,KAAK;IAC1B,iBAAiB,CAAC,IAAI,EAAE,UAAU,KAAK;QACtC,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC,CAAC,CAAA;AACH,CAAC;AAMD,SAAS,WAAW,CAAC,KAAK;IACzB,iBAAiB,CAAC,IAAI,EAAE,UAAU,KAAK;QACtC,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC,CAAC,CAAA;AACH,CAAC;AAMD,SAAS,UAAU,CAAC,KAAK;IACxB,iBAAiB,CAAC,IAAI,EAAE,UAAU,KAAK;QACtC,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC,CAAC,CAAA;AACH,CAAC\"}","code":"import { Entity, traverse, traversePostorder } from \"./Entity\";\r\nimport { injectProp } from \"../tools/utils\";\r\nimport { setupContext as setupInteractContext } from \"./context/InteractContext\";\r\nimport { clear, ScaleMode, setupContext as setupRenderContext } from \"./context/RenderContext\";\r\nimport './requestAnimationFrame';\r\nvar options = {\r\n fps: 60,\r\n designWidth: 750,\r\n designHeight: 1334,\r\n scaleMode: ScaleMode.FIXED_WIDTH,\r\n};\r\nvar root;\r\nvar _flush = 0, _currentFlush = 0;\r\nvar tsStart, tsLast;\r\nvar lastFPS = 0;\r\nexport function setup(_options) {\r\n injectProp(options, _options);\r\n var canvas = options.canvas, designWidth = options.designWidth, designHeight = options.designHeight, scaleMode = options.scaleMode, modifyCanvasSize = options.modifyCanvasSize;\r\n var canvasElement = typeof canvas == 'object' ? canvas : document.getElementById(canvas);\r\n setupInteractContext({\r\n canvas: canvasElement,\r\n touchHandler: {\r\n onTouchBegin: onTouchBegin,\r\n onTouchMove: onTouchMove,\r\n onTouchEnd: onTouchEnd,\r\n }\r\n });\r\n setupRenderContext({\r\n canvas: canvasElement,\r\n designWidth: designWidth,\r\n designHeight: designHeight,\r\n scaleMode: scaleMode,\r\n modifyCanvasSize: modifyCanvasSize,\r\n });\r\n root = new Entity('root');\r\n root._restrict();\r\n}\r\nexport function start() {\r\n root.enabled = true;\r\n tsStart = Date.now();\r\n startTick();\r\n}\r\nexport function pause() {\r\n root.enabled = false;\r\n stopTick();\r\n}\r\nexport function getRoot() {\r\n return root;\r\n}\r\nexport function getFPS() {\r\n return lastFPS;\r\n}\r\nfunction startTick() {\r\n _flush = 60 / options.fps - 1 >> 0;\r\n if (_flush < 0) {\r\n _flush = 0;\r\n }\r\n requestAnimationFrame(flush);\r\n}\r\nfunction stopTick() {\r\n}\r\nvar tsLast2;\r\nfunction flush(tsNow) {\r\n if (_flush == 0) {\r\n onFrameTick(tsNow);\r\n }\r\n else {\r\n if (_currentFlush == 0) {\r\n onFrameTick(tsNow);\r\n _currentFlush = _flush;\r\n }\r\n else {\r\n _currentFlush--;\r\n }\r\n }\r\n requestAnimationFrame(flush);\r\n}\r\nfunction onFrameTick(tsNow) {\r\n clear();\r\n var tsNow2 = Date.now();\r\n lastFPS = Math.floor(1000 / (tsNow - tsLast));\r\n tsLast = tsNow;\r\n tsLast2 = tsNow2;\r\n var ts = tsNow - tsStart;\r\n traverse(root, function (child) {\r\n if (!child.isFree && child.enabled) {\r\n child.onUpdate(ts);\r\n }\r\n else {\r\n return true;\r\n }\r\n }, -1, true, function (current) {\r\n current.afterUpdate();\r\n });\r\n}\r\nfunction onTouchBegin(event) {\r\n traversePostorder(root, function (child) {\r\n return child.onInteract(0, event);\r\n });\r\n}\r\nfunction onTouchMove(event) {\r\n traversePostorder(root, function (child) {\r\n return child.onInteract(1, event);\r\n });\r\n}\r\nfunction onTouchEnd(event) {\r\n traversePostorder(root, function (child) {\r\n return child.onInteract(2, event);\r\n });\r\n}\r\n//# sourceMappingURL=manager.js.map"}
{"map":"{\"version\":3,\"file\":\"Bounds.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/Bounds.ts\"],\"names\":[],\"mappings\":\"AAQA;IAMC,gBAAY,CAAK,EAAE,CAAK,EAAE,KAAS,EAAE,MAAU;QAAnC,kBAAA,EAAA,KAAK;QAAE,kBAAA,EAAA,KAAK;QAAE,sBAAA,EAAA,SAAS;QAAE,uBAAA,EAAA,UAAU;QAC9C,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;IAED,sBAAI,wBAAI;aAAR;YACC,OAAO,IAAI,CAAC,CAAC,CAAC;QACf,CAAC;aAED,UAAS,CAAC;YACT,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACZ,CAAC;;;OAJA;IAMD,sBAAI,uBAAG;aAAP;YACC,OAAO,IAAI,CAAC,CAAC,CAAC;QACf,CAAC;aAED,UAAQ,CAAC;YACR,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACZ,CAAC;;;OAJA;IAMD,sBAAI,yBAAK;aAAT;YACC,OAAO,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,CAAC;aAED,UAAU,CAAC;YACV,IAAI,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QACzB,CAAC;;;OAJA;IAMD,sBAAI,0BAAM;aAAV;YACC,OAAO,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAC7B,CAAC;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AM,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IACzJ,CAAC;IAED,uBAAM,GAAN,UAAO,SAAS;QACf,IAAI,IAAI,KAAK,SAAS,EAAE;YACvB,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,IAAI,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;eACnD,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM,CAAC;IACxE,CAAC;IAED,yBAAQ,GAAR;QACO,IAAA,SAA4B,EAA3B,QAAC,EAAE,QAAC,EAAE,gBAAK,EAAE,kBAAc,CAAC;QACnC,OAAO,KAAK,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,GAAG,UAAU,GAAG,KAAK,GAAG,WAAW,GAAG,MAAM,GAAG,GAAG,CAAC;IACjF,CAAC;IACF,aAAC;AAAD,CAAC,AAjHD,IAiHC\"}","code":"var Bounds = (function () {\r\n function Bounds(x, y, width, height) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (width === void 0) { width = 0; }\r\n if (height === void 0) { height = 0; }\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n }\r\n Object.defineProperty(Bounds.prototype, \"left\", {\r\n get: function () {\r\n return this.x;\r\n },\r\n set: function (v) {\r\n this.x = v;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Bounds.prototype, \"top\", {\r\n get: function () {\r\n return this.y;\r\n },\r\n set: function (v) {\r\n this.y = v;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Bounds.prototype, \"right\", {\r\n get: function () {\r\n return this.x + this.width;\r\n },\r\n set: function (v) {\r\n this.width = v - this.x;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Bounds.prototype, \"bottom\", {\r\n get: function () {\r\n return this.y + this.height;\r\n },\r\n set: function (v) {\r\n this.height = v - this.y;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Bounds.prototype.contains = function (x, y) {\r\n return this.x <= x &&\r\n this.x + this.width >= x &&\r\n this.y <= y &&\r\n this.y + this.height >= y;\r\n };\r\n Bounds.prototype.setTo = function (x, y, width, height) {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n };\r\n Bounds.prototype.copyFrom = function (target) {\r\n this.x = target.x;\r\n this.y = target.y;\r\n this.width = target.width;\r\n this.height = target.height;\r\n };\r\n Bounds.prototype.clone = function () {\r\n return new Bounds(this.x, this.y, this.width, this.height);\r\n };\r\n Bounds.prototype.inflate = function (dx, dy) {\r\n this.x -= dx;\r\n this.width += 2 * dx;\r\n this.y -= dy;\r\n this.height += 2 * dy;\r\n };\r\n Bounds.prototype.isEmpty = function () {\r\n return this.width <= 0 || this.height <= 0;\r\n };\r\n Bounds.prototype.setEmpty = function () {\r\n this.x = 0;\r\n this.y = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n };\r\n Bounds.prototype.intersects = function (toIntersect) {\r\n return Math.max(this.x, toIntersect.x) <= Math.min(this.right, toIntersect.right)\r\n && Math.max(this.y, toIntersect.y) <= Math.min(this.bottom, toIntersect.bottom);\r\n };\r\n Bounds.prototype.containsBounds = function (bounds) {\r\n var r1 = bounds.x + bounds.width;\r\n var b1 = bounds.y + bounds.height;\r\n var r2 = this.x + this.width;\r\n var b2 = this.y + this.height;\r\n return (bounds.x >= this.x) && (bounds.x < r2) && (bounds.y >= this.y) && (bounds.y < b2) && (r1 > this.x) && (r1 <= r2) && (b1 > this.y) && (b1 <= b2);\r\n };\r\n Bounds.prototype.equals = function (toCompare) {\r\n if (this === toCompare) {\r\n return true;\r\n }\r\n return this.x === toCompare.x && this.y === toCompare.y\r\n && this.width === toCompare.width && this.height === toCompare.height;\r\n };\r\n Bounds.prototype.toString = function () {\r\n var _a = this, x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n return \"(x=\" + x + \", y=\" + y + \", width=\" + width + \", height=\" + height + \")\";\r\n };\r\n return Bounds;\r\n}());\r\nexport default Bounds;\r\n//# sourceMappingURL=Bounds.js.map"}
{"map":"{\"version\":3,\"file\":\"Size.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/Size.ts\"],\"names\":[],\"mappings\":\";AAGA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAKtD;IAQC,cAAY,KAAW,EAAE,MAAY;QAAzB,sBAAA,EAAA,WAAW;QAAE,uBAAA,EAAA,YAAY;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;IAED,qBAAM,GAAN;QACC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;IACnB,CAAC;IAED,sBAAO,GAAP;IAEA,CAAC;IAED,kBAAG,GAAH,UAAI,KAAM,EAAE,MAAO;QAClB,IAAI,KAAK,KAAK,SAAS,EAAE;YACxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACnB;QAED,IAAI,MAAM,KAAK,SAAS,EAAE;YACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;SACrB;IACF,CAAC;IAED,oBAAK,GAAL;QACC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,uBAAQ,GAAR,UAAS,MAAM;QACd,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,uBAAQ,GAAR,UAAS,KAAK,EAAE,GAAG,EAAE,QAAQ;QAC5B,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAzCD;QADC,iBAAiB;uCACJ;IAEd;QADC,iBAAiB;wCACH;IAwChB,WAAC;CAAA,AA5CD,IA4CC;eA5CoB,IAAI\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { dirtyFieldTrigger } from \"../tools/decorators\";\r\nvar Size = (function () {\r\n function Size(width, height) {\r\n if (width === void 0) { width = NaN; }\r\n if (height === void 0) { height = NaN; }\r\n this.width = width;\r\n this.height = height;\r\n }\r\n Size.prototype.setNaN = function () {\r\n this.width = NaN;\r\n this.height = NaN;\r\n };\r\n Size.prototype.isEmpty = function () {\r\n };\r\n Size.prototype.set = function (width, height) {\r\n if (width !== undefined) {\r\n this.width = width;\r\n }\r\n if (height !== undefined) {\r\n this.height = height;\r\n }\r\n };\r\n Size.prototype.clone = function () {\r\n return new Size(this.width, this.height);\r\n };\r\n Size.prototype.copyFrom = function (target) {\r\n this.width = target.width;\r\n this.height = target.height;\r\n };\r\n Size.prototype.onModify = function (value, key, oldValue) {\r\n this.onChange && this.onChange(value, key, oldValue);\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Size.prototype, \"width\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Size.prototype, \"height\", void 0);\r\n return Size;\r\n}());\r\nexport default Size;\r\n//# sourceMappingURL=Size.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/index.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AACzC,OAAO,EAAC,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,yBAAyB,CAAC;AACnI,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAC,OAAO,IAAI,OAAO,EAAE,aAAa,EAAC,MAAM,WAAW,CAAA;AAC3D,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA\"}","code":"export { ScillaComponent } from \"./ScillaComponent\";\r\nexport { Entity } from './Entity';\r\nexport { Scene } from './Scene';\r\nexport { ScillaEvent } from './ScillaEvent';\r\nexport { getContext, createCanvas, getStageSize, getStageScale, getStageCenter, shortcut, ScaleMode } from './context/RenderContext';\r\nexport * from './manager';\r\nexport { default as Texture, createTexture } from './Texture';\r\nexport * from './Sheet';\r\nexport * from './FrameAnimation';\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"InteractContext.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../../node_modules/scilla-core/src/core/context/InteractContext.ts\"],\"names\":[],\"mappings\":\"AAMA,IAAI,OAAO,CAAC;AACZ,IAAI,aAAa,CAAC;AAClB,IAAI,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC;AAEhC,IAAM,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;AAC7C,IAAM,QAAQ,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAM/E,MAAM,UAAU,YAAY,CAAC,OAAgB;IAAhB,wBAAA,EAAA,YAAgB;IACrC,IAAA,uBA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CAAC,qBAAqB,EAAE,CAAC;IAC1C,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,GAAG,GAAG,CAAC,UAAU,CAAC;IAC1D,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,MAAM,CAAC,WAAW,GAAG,GAAG,CAAC,SAAS,CAAC;IACvD,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,GAAG,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC;IACrC,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,GAAG,GAAG,EAAE,IAAI,GAAG,CAAC,CAAC;IACpC,IAAI,SAAS,KAAK,EAAE,EAAE;QACrB,IAAI,GAAG,CAAC,CAAC;QACT,IAAI,GAAG,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC;KACrB;SACI,IAAI,SAAS,KAAK,CAAC,EAAE,EAAE;QAC3B,IAAI,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;QACtB,IAAI,GAAG,CAAC,CAAC;KACT;IACD,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC;IACtB,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC;IACtB,OAAO;QACN,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QACnB,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QACnB,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,CAAC;KACjC,CAAC;AACH,CAAC\"}","code":"var _canvas;\r\nvar _touchHandler;\r\nvar _scaleX, _scaleY, _rotation;\r\nvar ua = navigator.userAgent.toLowerCase();\r\nvar isMobile = (ua.indexOf('mobile') !== -1 || ua.indexOf('android') !== -1);\r\nexport function setupContext(options) {\r\n if (options === void 0) { options = {}; }\r\n var canvas = options.canvas, touchHandler = options.touchHandler;\r\n _touchHandler = touchHandler;\r\n _canvas = canvas;\r\n addListeners();\r\n}\r\nexport function updateScaleMode(scaleX, scaleY, rotation) {\r\n _scaleX = scaleX;\r\n _scaleY = scaleY;\r\n _rotation = rotation;\r\n}\r\nfunction addListeners() {\r\n if (window.navigator.msPointerEnabled) {\r\n _canvas.addEventListener(\"MSPointerDown\", function (event) {\r\n event.identifier = event.pointerId;\r\n onTouchBegin(event);\r\n prevent(event);\r\n }, false);\r\n _canvas.addEventListener(\"MSPointerMove\", function (event) {\r\n event.identifier = event.pointerId;\r\n onTouchMove(event);\r\n prevent(event);\r\n }, false);\r\n _canvas.addEventListener(\"MSPointerUp\", function (event) {\r\n event.identifier = event.pointerId;\r\n onTouchEnd(event);\r\n prevent(event);\r\n }, false);\r\n }\r\n else {\r\n if (!isMobile) {\r\n addMouseListener();\r\n }\r\n addTouchListener();\r\n }\r\n}\r\nfunction prevent(event) {\r\n event.stopPropagation();\r\n if (event[\"isScroll\"] != true && !_canvas['userTyping']) {\r\n event.preventDefault();\r\n }\r\n}\r\nfunction addMouseListener() {\r\n _canvas.addEventListener(\"mousedown\", onTouchBegin);\r\n _canvas.addEventListener(\"mousemove\", onMouseMove);\r\n _canvas.addEventListener(\"mouseup\", onTouchEnd);\r\n}\r\nfunction addTouchListener() {\r\n _canvas.addEventListener(\"touchstart\", function (event) {\r\n var l = event.changedTouches.length;\r\n for (var i = 0; i < l; i++) {\r\n onTouchBegin(event.changedTouches[i]);\r\n }\r\n prevent(event);\r\n }, false);\r\n _canvas.addEventListener(\"touchmove\", function (event) {\r\n var l = event.changedTouches.length;\r\n for (var i = 0; i < l; i++) {\r\n onTouchMove(event.changedTouches[i]);\r\n }\r\n prevent(event);\r\n }, false);\r\n _canvas.addEventListener(\"touchend\", function (event) {\r\n var l = event.changedTouches.length;\r\n for (var i = 0; i < l; i++) {\r\n onTouchEnd(event.changedTouches[i]);\r\n }\r\n prevent(event);\r\n }, false);\r\n _canvas.addEventListener(\"touchcancel\", function (event) {\r\n var l = event.changedTouches.length;\r\n for (var i = 0; i < l; i++) {\r\n onTouchEnd(event.changedTouches[i]);\r\n }\r\n prevent(event);\r\n }, false);\r\n}\r\nfunction onTouchBegin(event) {\r\n var location = getLocation(event);\r\n _touchHandler.onTouchBegin(location);\r\n}\r\nfunction onMouseMove(event) {\r\n if (event.buttons === 0) {\r\n onTouchEnd(event);\r\n }\r\n else {\r\n onTouchMove(event);\r\n }\r\n}\r\nfunction onTouchMove(event) {\r\n var location = getLocation(event);\r\n _touchHandler.onTouchMove(location);\r\n}\r\nfunction onTouchEnd(event) {\r\n var location = getLocation(event);\r\n _touchHandler.onTouchEnd(location);\r\n}\r\nfunction getLocation(event) {\r\n var doc = document.documentElement;\r\n var box = _canvas.getBoundingClientRect();\r\n var left = box.left + window.pageXOffset - doc.clientLeft;\r\n var top = box.top + window.pageYOffset - doc.clientTop;\r\n var x = event.pageX - left, newX = x;\r\n var y = event.pageY - top, newY = y;\r\n if (_rotation === 90) {\r\n newX = y;\r\n newY = box.width - x;\r\n }\r\n else if (_rotation === -90) {\r\n newX = box.height - y;\r\n newY = x;\r\n }\r\n newX = newX / _scaleX;\r\n newY = newY / _scaleY;\r\n return {\r\n x: Math.round(newX),\r\n y: Math.round(newY),\r\n identifier: event.identifier || 0,\r\n };\r\n}\r\n//# sourceMappingURL=InteractContext.js.map"}
{"map":"{\"version\":3,\"file\":\"TextStyle.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/TextStyle.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,MAAM,CAAN,IAAY,SAaX;AAbD,WAAY,SAAS;IAIpB,8BAAkB,CAAA;IAIlB,8BAAkB,CAAA;IAIlB,gCAAoB,CAAA;AACrB,CAAC,EAbW,SAAS,KAAT,SAAS,QAapB;AAED,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IAItB,gCAAkB,CAAA;IAIlB,wCAA0B,CAAA;AAC3B,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAED,MAAM,CAAN,IAAY,UAiBX;AAjBD,WAAY,UAAU;IAIrB,+BAAiB,CAAA;IAIjB,2BAAa,CAAA;IAIb,+BAAiB,CAAA;IAIjB,iCAAmB,CAAA;AACpB,CAAC,EAjBW,UAAU,KAAV,UAAU,QAiBrB;AAKD;IAAA;QAQC,cAAS,GAAc,SAAS,CAAC,MAAM,CAAC;QAMxC,gBAAW,GAAgB,WAAW,CAAC,MAAM,CAAC;QAM9C,eAAU,GAAe,UAAU,CAAC,MAAM,CAAC;QAM3C,aAAQ,GAAW,EAAE,CAAC;QAMtB,eAAU,GAAW,OAAO,CAAC;IAK9B,CAAC;IAHA,4BAAQ,GAAR,UAAS,KAAK,EAAE,GAAG,EAAE,QAAQ;QAC5B,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACnE,CAAC;IA5BD;QADC,iBAAiB;gDACsB;IAMxC;QADC,iBAAiB;kDAC4B;IAM9C;QADC,iBAAiB;iDACyB;IAM3C;QADC,iBAAiB;+CACI;IAMtB;QADC,iBAAiB;iDACW;IAK9B,gBAAC;CAAA,AArCD,IAqCC;SArCY,SAAS\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { dirtyFieldTrigger } from \"../tools/decorators\";\r\nexport var FontStyle;\r\n(function (FontStyle) {\r\n FontStyle[\"NORMAL\"] = \"normal\";\r\n FontStyle[\"ITALIC\"] = \"italic\";\r\n FontStyle[\"OBLIQUE\"] = \"oblique\";\r\n})(FontStyle || (FontStyle = {}));\r\nexport var FontVariant;\r\n(function (FontVariant) {\r\n FontVariant[\"NORMAL\"] = \"normal\";\r\n FontVariant[\"SMALL_CAPS\"] = \"small-caps\";\r\n})(FontVariant || (FontVariant = {}));\r\nexport var FontWeight;\r\n(function (FontWeight) {\r\n FontWeight[\"NORMAL\"] = \"normal\";\r\n FontWeight[\"BOLD\"] = \"bold\";\r\n FontWeight[\"BOLDER\"] = \"bolder\";\r\n FontWeight[\"LIGHTER\"] = \"lighter\";\r\n})(FontWeight || (FontWeight = {}));\r\nvar TextStyle = (function () {\r\n function TextStyle() {\r\n this.fontStyle = FontStyle.NORMAL;\r\n this.fontVariant = FontVariant.NORMAL;\r\n this.fontWeight = FontWeight.NORMAL;\r\n this.fontSize = 25;\r\n this.fontFamily = 'Arial';\r\n }\r\n TextStyle.prototype.onModify = function (value, key, oldValue) {\r\n this.onChange && this.onChange(value, key, oldValue, 'textStyle');\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], TextStyle.prototype, \"fontStyle\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], TextStyle.prototype, \"fontVariant\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], TextStyle.prototype, \"fontWeight\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], TextStyle.prototype, \"fontSize\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], TextStyle.prototype, \"fontFamily\", void 0);\r\n return TextStyle;\r\n}());\r\nexport { TextStyle };\r\n//# sourceMappingURL=TextStyle.js.map"}
{"map":"{\"version\":3,\"file\":\"Renderer.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/renderer/Renderer.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAC,MAAM,QAAQ,CAAC;AAE5G,IAAA,gDAAiB,CAAe;AAKvC;IAAsC,oCAAe;IAyDpD;QAAA,YACC,iBAAO,SAGP;QA5DS,sBAAgB,GAAG;YAC5B,KAAI,CAAC,SAAS,EAAE,CAAC;QAClB,CAAC,CAAC;QAIQ,WAAK,GAAY,IAAI,CAAC;QAKtB,mBAAa,GAAY,KAAK,CAAC;QAKzC,WAAK,GAAW,CAAC,CAAC;QAKl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,CAAC;QAExD,MAAM,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC;QAC1B,MAAM,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC;IAC3B,CAAC;IAOD,0BAAO,GAAP,UAAQ,CAAC,EAAE,CAAC;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACnC,CAAC;IApOD;QADC,iBAAiB;4CACwB;IAqO3C,eAAC;CAAA,AA3PD,CAAsC,eAAe,GA2PpD;eA3PoB,QAAQ\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { createCanvas, getContext, ScillaComponent, Bounds, Vector2D, math, decorators, EngineConfig } from \"scilla\";\r\nvar dirtyFieldTrigger = decorators.dirtyFieldTrigger;\r\nvar Renderer = (function (_super) {\r\n tslib_1.__extends(Renderer, _super);\r\n function Renderer() {\r\n var _this = _super.call(this) || this;\r\n _this.onVector2DModify = function () {\r\n _this.makeDirty();\r\n };\r\n _this.dirty = true;\r\n _this._useCacheMode = false;\r\n _this.alpha = 1;\r\n _this.anchor = new Vector2D(0.5, 0.5);\r\n _this.bounds = new Bounds();\r\n _this.cacheCanvas = null;\r\n _this._anchorOffset = new Vector2D();\r\n _this._context = getContext();\r\n _this._margin = 0;\r\n _this._debugDrawColor = \"hsl(\" + math.makeRandomInt(360) + \", \" + math.makeRandomInt(100) + \"%, 60%)\";\r\n return _this;\r\n }\r\n Object.defineProperty(Renderer.prototype, \"useCacheMode\", {\r\n get: function () {\r\n return this.getUseCacheMode();\r\n },\r\n set: function (value) {\r\n this._useCacheMode = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Renderer.prototype.getUseCacheMode = function () {\r\n return this._useCacheMode;\r\n };\r\n Object.defineProperty(Renderer.prototype, \"context\", {\r\n get: function () {\r\n return this.cacheCanvasContext || this._context;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Renderer.prototype.makeDirty = function () {\r\n this.dirty = true;\r\n };\r\n Renderer.prototype.onModify = function (value, key, oldValue) {\r\n _super.prototype.onModify.call(this, value, key, oldValue);\r\n this.makeDirty();\r\n switch (key) {\r\n case 'anchor':\r\n value.onChange = this.onVector2DModify;\r\n break;\r\n }\r\n };\r\n Renderer.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n if (!this.transform) {\r\n console.warn('renderer need a transform component');\r\n }\r\n };\r\n Renderer.prototype.onUpdate = function (t) {\r\n if (this.dirty) {\r\n if (this.entity.name == 'label_status') {\r\n console.log();\r\n }\r\n if (this.useCacheMode) {\r\n this.readyCacheCanvas();\r\n }\r\n this.measureBounds();\r\n if (this.useCacheMode) {\r\n this.updateCacheCanvas();\r\n }\r\n }\r\n this.transformToLocal();\r\n this.render();\r\n if (EngineConfig.drawRenderRect) {\r\n var _a = this, _context = _a._context, _debugDrawColor = _a._debugDrawColor, _b = _a.bounds, width = _b.width, height = _b.height, _c = _a._anchorOffset, x_1 = _c.x, y = _c.y, _d = _a.transform.pivot, px = _d.x, py = _d.y;\r\n _context.globalAlpha = 0.9;\r\n _context.strokeStyle = _debugDrawColor;\r\n _context.fillStyle = _debugDrawColor;\r\n _context.beginPath();\r\n _context.rect(0, 0, width, height);\r\n _context.stroke();\r\n _context.beginPath();\r\n _context.arc(width * px, height * py, 3, 0, 2 * Math.PI);\r\n _context.fill();\r\n }\r\n };\r\n Renderer.prototype.readyCacheCanvas = function () {\r\n var canvas = this.cacheCanvas;\r\n if (!canvas) {\r\n canvas = this.cacheCanvas = createCanvas();\r\n this.cacheCanvasContext = canvas.getContext('2d');\r\n }\r\n };\r\n Renderer.prototype.updateCacheCanvas = function () {\r\n var canvas = this.cacheCanvas;\r\n var _a = this.bounds, width = _a.width, height = _a.height;\r\n canvas.width = width + this._margin * 2;\r\n canvas.height = height + this._margin * 2;\r\n };\r\n Renderer.prototype.render = function () {\r\n this.beforeDraw();\r\n this.drawClip();\r\n if (this.dirty) {\r\n if (this.useCacheMode) {\r\n this.draw();\r\n }\r\n this.dirty = false;\r\n }\r\n if (this.useCacheMode) {\r\n this.drawCache();\r\n }\r\n else {\r\n this.draw();\r\n }\r\n };\r\n Renderer.prototype.beforeDraw = function () {\r\n this.applyAlpha();\r\n };\r\n Renderer.prototype.transformToLocal = function () {\r\n var _a = this, transform = _a.transform, _b = _a._anchorOffset, ax = _b.x, ay = _b.y;\r\n if (transform && transform.enabled) {\r\n var _c = transform.getMatrix(true), a = _c.a, b = _c.b, c = _c.c, d = _c.d, tx = _c.tx, ty = _c.ty;\r\n var offX = ax * a + ay * c;\r\n var offY = ax * b + ay * d;\r\n this._context.setTransform(a, b, c, d, tx - offX, ty - offY);\r\n }\r\n else {\r\n this._context.setTransform(1, 0, 0, 1, -ax, -ay);\r\n }\r\n };\r\n Renderer.prototype.applyAlpha = function () {\r\n this._context.globalAlpha = this.alpha * this.transform.renderAlpha;\r\n };\r\n Renderer.prototype.drawCache = function () {\r\n if (this.cacheCanvas.width > 0 && this.cacheCanvas.height > 0) {\r\n this._context.drawImage(this.cacheCanvas, -this._margin, -this._margin);\r\n }\r\n };\r\n Renderer.prototype.drawClip = function () {\r\n };\r\n Renderer.prototype.draw = function () {\r\n };\r\n Renderer.prototype.measureBounds = function () {\r\n var _a = this, _b = _a.anchor, x = _b.x, y = _b.y, bounds = _a.bounds, _c = _a.bounds, width = _c.width, height = _c.height;\r\n var anchorOffsetX = this._anchorOffset.x = width * x;\r\n var anchorOffsetY = this._anchorOffset.y = height * y;\r\n bounds.x = -anchorOffsetX;\r\n bounds.y = -anchorOffsetY;\r\n };\r\n Renderer.prototype.hitTest = function (x, y) {\r\n return this.bounds.contains(x, y);\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Renderer.prototype, \"anchor\", void 0);\r\n return Renderer;\r\n}(ScillaComponent));\r\nexport default Renderer;\r\n//# sourceMappingURL=Renderer.js.map"}
{"map":"{\"version\":3,\"file\":\"FrameAnimation.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../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C;IACvB,CAAC;IACF,yBAAC;AAAD,CAAC,AArED,IAqEC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { Sheet } from \"./Sheet\";\r\nvar animationMap = {};\r\nvar animDataMap = {};\r\nvar textureMap = {};\r\nexport function getFrameAnimation(name) {\r\n var animation = animationMap[name];\r\n if (!animation) {\r\n animation = animationMap[name] = new FrameAnimationImpl(name);\r\n animation.fillMcData(name);\r\n }\r\n return animation;\r\n}\r\nexport function putFrameAnim(img, data) {\r\n var mc = data.mc, res = data.res;\r\n var sheet = new Sheet(img, res);\r\n for (var key in mc) {\r\n var animData = animDataMap[key] = mc[key];\r\n animData.sheet = sheet;\r\n }\r\n}\r\nvar FrameAnimationImpl = (function () {\r\n function FrameAnimationImpl(name) {\r\n this._name = name;\r\n }\r\n Object.defineProperty(FrameAnimationImpl.prototype, \"name\", {\r\n get: function () {\r\n return this._name;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n FrameAnimationImpl.prototype.fillMcData = function (name) {\r\n var animData = animDataMap[name];\r\n if (animData) {\r\n this._animData = animData;\r\n }\r\n else {\r\n console.warn(\"anim data [\" + name + \"] is not exist\");\r\n }\r\n };\r\n Object.defineProperty(FrameAnimationImpl.prototype, \"fps\", {\r\n get: function () {\r\n return this._animData.frameRate;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FrameAnimationImpl.prototype, \"labels\", {\r\n get: function () {\r\n return this._animData.labels;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FrameAnimationImpl.prototype, \"frameCount\", {\r\n get: function () {\r\n return this._animData.frames.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n FrameAnimationImpl.prototype.getLabel = function (name) {\r\n var e_1, _a;\r\n var result;\r\n try {\r\n for (var _b = tslib_1.__values(this._animData.labels), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var label = _c.value;\r\n if (label.name == name) {\r\n result = label;\r\n break;\r\n }\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n return result;\r\n };\r\n FrameAnimationImpl.prototype.getFrame = function (frameIndex) {\r\n var _animData = this._animData;\r\n var texture, frameData;\r\n if (_animData) {\r\n var frames_1 = _animData.frames;\r\n frameData = frames_1[frameIndex];\r\n if (frameData) {\r\n var res = frameData.res;\r\n texture = textureMap[res];\r\n if (!texture) {\r\n texture = textureMap[res] = _animData.sheet.getTexture(res);\r\n }\r\n }\r\n }\r\n return {\r\n texture: texture,\r\n data: frameData,\r\n };\r\n };\r\n FrameAnimationImpl.prototype.destroy = function () {\r\n this._animData = null;\r\n };\r\n return FrameAnimationImpl;\r\n}());\r\nexport { FrameAnimationImpl };\r\n//# sourceMappingURL=FrameAnimation.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/tools/index.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA;AAC9B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA;AAC9B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACN,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,SAAS,GACT,CAAA\"}","code":"import * as decorators from './decorators';\r\nimport * as ease from './ease';\r\nimport * as math from './math';\r\nimport * as utils from './utils';\r\nimport * as timeUtils from './time';\r\nimport { Ease } from \"./ease\";\r\nexport { decorators, ease, Ease, math, utils, timeUtils, };\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"CameraController.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/other/CameraController.ts\"],\"names\":[],\"mappings\":\";AAKA,OAAO,EAAS,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC7F,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAK1C;IAA8C,4CAAe;IAA7D;QAAA,qEAyDC;QAvDA,oBAAc,GAAa,cAAc,EAAE,CAAC;QAE5C,cAAQ,GAAG,GAAG,CAAC;;IAqDhB,CAAC;IA/CA,mCAAQ,GAAR;QACC,iBAAM,QAAQ,WAAE,CAAC;IAClB,CAAC;IAED,kCAAO,GAAP;QACC,iBAAM,OAAO,WAAE,CAAC;QAEV,IAAA,SAA+B,EAA9B,kBAAM,EAAE,kCAAsB,CAAC;QAEtC,IAAI,CAAC,SAAS,GAAG,YAAY,EAAE,CAAC;QAEhC,IAAI,MAAM,EAAE;YACX,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC;SAC9D;QACD,IAAI,CAAC,cAAc,GAAG,cAAc,EAAE,CAAC;QAEvC,IAAI,cAAc,EAAE;YACb,IAAA,mBAAgC,EAA/B,gBAAK,EAAE,kBAAwB,CAAC;YACjC,IAAA,wBAA4B,EAA3B,UAAC,EAAE,QAAwB,CAAC;YACnC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,GAAG,GAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;SACrD;IACF,CAAC;IAED,mCAAQ,GAAR,UAAS,CAAC;QACT,iBAAM,QAAQ,YAAC,CAAC,CAAC,CAAC;QAElB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;YACzB,OAAO;SACP;QAEK,IAAA,SAA2G,EAA1G,iBAA4B,EAAhB,gBAAK,EAAE,sBAAQ,EAAG,iBAA0B,EAAd,gBAAK,EAAE,kBAAM,EAAG,sBAA8B,EAAb,QAAC,EAAE,QAAC,EAAE,kBAAM,EAAG,sBAAgB,CAAC;QAElH,IAAM,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;QACrD,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAEhC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAE/E,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3F,CAAC;IAED,kCAAO,GAAP;QACC,iBAAM,OAAO,WAAE,CAAC;IACjB,CAAC;IAED,oCAAS,GAAT;QACC,iBAAM,SAAS,WAAE,CAAC;IACnB,CAAC;IACF,uBAAC;AAAD,CAAC,AAzDD,CAA8C,eAAe,GAyD5D\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { getStageSize, ScillaComponent, createVector2D, Vector2D, math } from \"scilla\";\r\nimport Transform from \"../base/Transform\";\r\nvar CameraController = (function (_super) {\r\n tslib_1.__extends(CameraController, _super);\r\n function CameraController() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.viewportAnchor = createVector2D();\r\n _this.maxScale = 1.2;\r\n return _this;\r\n }\r\n CameraController.prototype.onCreate = function () {\r\n _super.prototype.onCreate.call(this);\r\n };\r\n CameraController.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n var _a = this, target = _a.target, viewportAnchor = _a.viewportAnchor;\r\n this.stageSize = getStageSize();\r\n if (target) {\r\n this.targetPosition = target.getComponent(Transform).position;\r\n }\r\n this.followPosition = createVector2D();\r\n if (viewportAnchor) {\r\n var _b = this.stageSize, width = _b.width, height = _b.height;\r\n var _c = this.viewportAnchor, x_1 = _c.x, y = _c.y;\r\n this.transform.position.setXY(width * x_1, height * y);\r\n }\r\n };\r\n CameraController.prototype.onUpdate = function (t) {\r\n _super.prototype.onUpdate.call(this, t);\r\n if (!this.targetPosition) {\r\n return;\r\n }\r\n var _a = this, _b = _a.transform, scale = _b.scale, position = _b.position, _c = _a.stageSize, width = _c.width, height = _c.height, _d = _a.targetPosition, x = _d.x, y = _d.y, length = _d.length, maxScale = _a.maxScale;\r\n var newScale = maxScale - length * maxScale / 2048;\r\n scale.setXY(newScale, newScale);\r\n this.followPosition.setXY(width / 2, height / 2).subtract(this.targetPosition);\r\n position.copyFrom(math.lerpObj(position, this.followPosition, 0.1, Vector2D, ['x', 'y']));\r\n };\r\n CameraController.prototype.onSleep = function () {\r\n _super.prototype.onSleep.call(this);\r\n };\r\n CameraController.prototype.onDestroy = function () {\r\n _super.prototype.onDestroy.call(this);\r\n };\r\n return CameraController;\r\n}(ScillaComponent));\r\nexport default CameraController;\r\n//# sourceMappingURL=CameraController.js.map"}
{"map":"{\"version\":3,\"file\":\"ease.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/tools/ease.ts\"],\"names\":[],\"mappings\":\"AAMA,MAAM,CAAN,IAAY,IA4BX;AA5BD,WAAY,IAAI;IACf,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IACnB,+BAAuB,CAAA;IACvB,2BAAmB,CAAA;IACnB,6BAAqB,CAAA;IACrB,iCAAyB,CAAA;IACzB,2BAAmB,CAAA;IACnB,6BAAqB,CAAA;IACrB,iCAAyB,CAAA;IACzB,2BAAmB,CAAA;IACnB,6BAAqB,CAAA;IACrB,iCAAyB,CAAA;IACzB,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IACnB,+BAAuB,CAAA;IACvB,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IACnB,+BAAuB,CAA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AC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IAC7F,CAAC,CAAA;AACF,CAAC;AAGD,MAAM,CAAC,IAAM,YAAY,GAAG,eAAe,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC\"}","code":"export var Ease;\r\n(function (Ease) {\r\n Ease[\"quadIn\"] = \"quadIn\";\r\n Ease[\"quadOut\"] = \"quadOut\";\r\n Ease[\"quadInOut\"] = \"quadInOut\";\r\n Ease[\"cubicIn\"] = \"cubicIn\";\r\n Ease[\"cubicOut\"] = \"cubicOut\";\r\n Ease[\"cubicInOut\"] = \"cubicInOut\";\r\n Ease[\"quartIn\"] = \"quartIn\";\r\n Ease[\"quartOut\"] = \"quartOut\";\r\n Ease[\"quartInOut\"] = \"quartInOut\";\r\n Ease[\"quintIn\"] = \"quintIn\";\r\n Ease[\"quintOut\"] = \"quintOut\";\r\n Ease[\"quintInOut\"] = \"quintInOut\";\r\n Ease[\"sineIn\"] = \"sineIn\";\r\n Ease[\"sineOut\"] = \"sineOut\";\r\n Ease[\"sineInOut\"] = \"sineInOut\";\r\n Ease[\"backIn\"] = \"backIn\";\r\n Ease[\"backOut\"] = \"backOut\";\r\n Ease[\"backInOut\"] = \"backInOut\";\r\n Ease[\"circIn\"] = \"circIn\";\r\n Ease[\"circOut\"] = \"circOut\";\r\n Ease[\"circInOut\"] = \"circInOut\";\r\n Ease[\"bounceIn\"] = \"bounceIn\";\r\n Ease[\"bounceOut\"] = \"bounceOut\";\r\n Ease[\"bounceInOut\"] = \"bounceInOut\";\r\n Ease[\"elasticIn\"] = \"elasticIn\";\r\n Ease[\"elasticOut\"] = \"elasticOut\";\r\n Ease[\"elasticInOut\"] = \"elasticInOut\";\r\n})(Ease || (Ease = {}));\r\nexport function get(amount) {\r\n if (amount < -1) {\r\n amount = -1;\r\n }\r\n if (amount > 1) {\r\n amount = 1;\r\n }\r\n return function (t) {\r\n if (amount == 0) {\r\n return t;\r\n }\r\n if (amount < 0) {\r\n return t * (t * -amount + 1 + amount);\r\n }\r\n return t * ((2 - t) * amount + (1 - amount));\r\n };\r\n}\r\nexport function getPowIn(pow) {\r\n return function (t) {\r\n return Math.pow(t, pow);\r\n };\r\n}\r\nexport function getPowOut(pow) {\r\n return function (t) {\r\n return 1 - Math.pow(1 - t, pow);\r\n };\r\n}\r\nexport function getPowInOut(pow) {\r\n return function (t) {\r\n if ((t *= 2) < 1)\r\n return 0.5 * Math.pow(t, pow);\r\n return 1 - 0.5 * Math.abs(Math.pow(2 - t, pow));\r\n };\r\n}\r\nexport var quadIn = getPowIn(2);\r\nexport var quadOut = getPowOut(2);\r\nexport var quadInOut = getPowInOut(2);\r\nexport var cubicIn = getPowIn(3);\r\nexport var cubicOut = getPowOut(3);\r\nexport var cubicInOut = getPowInOut(3);\r\nexport var quartIn = getPowIn(4);\r\nexport var quartOut = getPowOut(4);\r\nexport var quartInOut = getPowInOut(4);\r\nexport var quintIn = getPowIn(5);\r\nexport var quintOut = getPowOut(5);\r\nexport var quintInOut = getPowInOut(5);\r\nexport function sineIn(t) {\r\n return 1 - Math.cos(t * Math.PI / 2);\r\n}\r\nexport function sineOut(t) {\r\n return Math.sin(t * Math.PI / 2);\r\n}\r\nexport function sineInOut(t) {\r\n return -0.5 * (Math.cos(Math.PI * t) - 1);\r\n}\r\nexport function getBackIn(amount) {\r\n return function (t) {\r\n return t * t * ((amount + 1) * t - amount);\r\n };\r\n}\r\nexport var backIn = getBackIn(1.7);\r\nexport function getBackOut(amount) {\r\n return function (t) {\r\n return (--t * t * ((amount + 1) * t + amount) + 1);\r\n };\r\n}\r\nexport var backOut = getBackOut(1.7);\r\nexport function getBackInOut(amount) {\r\n amount *= 1.525;\r\n return function (t) {\r\n if ((t *= 2) < 1)\r\n return 0.5 * (t * t * ((amount + 1) * t - amount));\r\n return 0.5 * ((t -= 2) * t * ((amount + 1) * t + amount) + 2);\r\n };\r\n}\r\nexport var backInOut = getBackInOut(1.7);\r\nexport function circIn(t) {\r\n return -(Math.sqrt(1 - t * t) - 1);\r\n}\r\nexport function circOut(t) {\r\n return Math.sqrt(1 - (--t) * t);\r\n}\r\nexport function circInOut(t) {\r\n if ((t *= 2) < 1) {\r\n return -0.5 * (Math.sqrt(1 - t * t) - 1);\r\n }\r\n return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\r\n}\r\nexport function bounceIn(t) {\r\n return 1 - bounceOut(1 - t);\r\n}\r\nexport function bounceOut(t) {\r\n if (t < 1 / 2.75) {\r\n return (7.5625 * t * t);\r\n }\r\n else if (t < 2 / 2.75) {\r\n return (7.5625 * (t -= 1.5 / 2.75) * t + 0.75);\r\n }\r\n else if (t < 2.5 / 2.75) {\r\n return (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375);\r\n }\r\n else {\r\n return (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375);\r\n }\r\n}\r\nexport function bounceInOut(t) {\r\n if (t < 0.5)\r\n return bounceIn(t * 2) * .5;\r\n return bounceOut(t * 2 - 1) * 0.5 + 0.5;\r\n}\r\nexport function getElasticIn(amplitude, period) {\r\n var pi2 = Math.PI * 2;\r\n return function (t) {\r\n if (t == 0 || t == 1)\r\n return t;\r\n var s = period / pi2 * Math.asin(1 / amplitude);\r\n return -(amplitude * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * pi2 / period));\r\n };\r\n}\r\nexport var elasticIn = getElasticIn(1, 0.3);\r\nexport function getElasticOut(amplitude, period) {\r\n var pi2 = Math.PI * 2;\r\n return function (t) {\r\n if (t == 0 || t == 1)\r\n return t;\r\n var s = period / pi2 * Math.asin(1 / amplitude);\r\n return (amplitude * Math.pow(2, -10 * t) * Math.sin((t - s) * pi2 / period) + 1);\r\n };\r\n}\r\nexport var elasticOut = getElasticOut(1, 0.3);\r\nexport function getElasticInOut(amplitude, period) {\r\n var pi2 = Math.PI * 2;\r\n return function (t) {\r\n var s = period / pi2 * Math.asin(1 / amplitude);\r\n if ((t *= 2) < 1)\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * pi2 / period));\r\n return amplitude * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * pi2 / period) * 0.5 + 1;\r\n };\r\n}\r\nexport var elasticInOut = getElasticInOut(1, 0.3 * 1.5);\r\n//# sourceMappingURL=ease.js.map"}
{"map":"{\"version\":3,\"file\":\"ScillaComponent.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/ScillaComponent.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE9C,IAAM,cAAc,GAAG;IACtB,uBAAuB;IACvB,sBAAsB;IACtB,qBAAqB;CACrB,CAAC;AAKF;IAAqC,2CAAU;IAA/C;QAAA,qEAsPC;QAjPU,oBAAc,GAAG,EAAE,CAAC;QAIpB,cAAQ,GAAY,YAAY,CAAC,gBAAgB,CAAC;;IA6O7D,CAAC;IAxOA,sBAAI,oCAAO;aAAX;YACC,OAAO,IAAI,CAAC,QAAQ,CAAC;QACtB,CAAC;aAED,UAAY,KAAc;YACzB,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,EAAE;gBAC5B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;gBACtB,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;oBACxC,IAAI,IAAI,CAAC,QAAQ,EAAE;wBAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;qBAChB;yBAAM;wBACN,IAAI,CAAC,SAAS,EAAE,CAAC;qBACjB;iBACD;aACD;QACF,CAAC;;;OAbA;IAmBD,gCAAM,GAAN,UAAO,MAAc;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI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AAC;AAAD,CAAC,AAtPD,CAAqC,UAAU,GAsP9C\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport HashObject from \"./HashObject\";\r\nimport { EngineConfig } from \"../engine-config\";\r\nvar interactiveMap = [\r\n '_dealGlobalTouchBegin',\r\n '_dealGlobalTouchMove',\r\n '_dealGlobalTouchEnd',\r\n];\r\nvar ScillaComponent = (function (_super) {\r\n tslib_1.__extends(ScillaComponent, _super);\r\n function ScillaComponent() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.delayCallbacks = [];\r\n _this._enabled = EngineConfig.componentEnabled;\r\n return _this;\r\n }\r\n Object.defineProperty(ScillaComponent.prototype, \"enabled\", {\r\n get: function () {\r\n return this._enabled;\r\n },\r\n set: function (value) {\r\n if (this._enabled !== value) {\r\n this._enabled = value;\r\n if (this.entity && this.entity.isActive) {\r\n if (this._enabled) {\r\n this.onEnable();\r\n }\r\n else {\r\n this.onDisable();\r\n }\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ScillaComponent.prototype._setup = function (entity) {\r\n this.entity = entity;\r\n this.onCreate();\r\n };\r\n ScillaComponent.prototype._unSetup = function () {\r\n this.entity = null;\r\n this.onDestroy();\r\n };\r\n ScillaComponent.prototype.onCreate = function () {\r\n };\r\n ScillaComponent.prototype.onAwake = function () {\r\n this._firstUpdate = true;\r\n };\r\n ScillaComponent.prototype.onEnable = function () {\r\n };\r\n ScillaComponent.prototype.onDisable = function () {\r\n };\r\n ScillaComponent.prototype.$onUpdate = function (t) {\r\n this.onUpdate(t);\r\n if (!this._firstUpdate) {\r\n this.invokeDelayCallback(t);\r\n }\r\n this._firstUpdate = false;\r\n };\r\n ScillaComponent.prototype.invokeDelayCallback = function (t) {\r\n var e_1, _a;\r\n var removed = [];\r\n if (this.entity.name.indexOf('progress') >= 0) {\r\n console.log();\r\n }\r\n for (var i = 0, li = this.delayCallbacks.length; i < li; i++) {\r\n var _b = this.delayCallbacks[i], callback = _b.callback, once = _b.once;\r\n if (once) {\r\n removed.push(i);\r\n }\r\n callback.call(this, t);\r\n }\r\n try {\r\n for (var removed_1 = tslib_1.__values(removed), removed_1_1 = removed_1.next(); !removed_1_1.done; removed_1_1 = removed_1.next()) {\r\n var item = removed_1_1.value;\r\n this.delayCallbacks.splice(item, 1);\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (removed_1_1 && !removed_1_1.done && (_a = removed_1.return)) _a.call(removed_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n };\r\n ScillaComponent.prototype.onUpdate = function (t) {\r\n };\r\n ScillaComponent.prototype.afterUpdate = function () {\r\n };\r\n ScillaComponent.prototype.onSleep = function () {\r\n };\r\n ScillaComponent.prototype.onDestroy = function () {\r\n };\r\n ScillaComponent.prototype.onModify = function (value, key, oldValue) {\r\n };\r\n ScillaComponent.prototype.getDelayCallback = function (callback) {\r\n var e_2, _a;\r\n var result;\r\n try {\r\n for (var _b = tslib_1.__values(this.delayCallbacks), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var item = _c.value;\r\n if (item.callback == callback) {\r\n result = item;\r\n break;\r\n }\r\n }\r\n }\r\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_2) throw e_2.error; }\r\n }\r\n return result;\r\n };\r\n ScillaComponent.prototype.callOnNextTick = function (callback, once) {\r\n if (once === void 0) { once = true; }\r\n var item = this.getDelayCallback(callback);\r\n if (!item) {\r\n this.delayCallbacks.push({ callback: callback, once: once });\r\n }\r\n };\r\n ScillaComponent.prototype.cancelOnNextTick = function (callback) {\r\n var item = this.getDelayCallback(callback);\r\n var index = this.delayCallbacks.indexOf(item);\r\n if (index >= 0) {\r\n this.delayCallbacks.splice(index, 1);\r\n }\r\n };\r\n ScillaComponent.prototype.onInteract = function (type, event) {\r\n try {\r\n var hitOn = this[interactiveMap[type]](event);\r\n return hitOn && this['touchInterrupt'];\r\n }\r\n catch (e) {\r\n console.warn(e);\r\n }\r\n };\r\n ScillaComponent.prototype._dealGlobalTouchBegin = function (e) {\r\n return this.onGlobalTouchBegin(e);\r\n };\r\n ScillaComponent.prototype._dealGlobalTouchMove = function (e) {\r\n return this.onGlobalTouchMove(e);\r\n };\r\n ScillaComponent.prototype._dealGlobalTouchEnd = function (e) {\r\n return this.onGlobalTouchEnd(e);\r\n };\r\n ScillaComponent.prototype.onGlobalTouchBegin = function (e) {\r\n };\r\n ScillaComponent.prototype.onGlobalTouchMove = function (e) {\r\n };\r\n ScillaComponent.prototype.onGlobalTouchEnd = function (e) {\r\n };\r\n Object.defineProperty(ScillaComponent.prototype, \"transform\", {\r\n get: function () {\r\n return this.entity.getComponent('components/base/Transform');\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ScillaComponent.prototype.broadcast = function (method, level) {\r\n if (level === void 0) { level = -1; }\r\n var params = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n params[_i - 2] = arguments[_i];\r\n }\r\n var _a;\r\n (_a = this.entity).broadcast.apply(_a, tslib_1.__spread([method, level], params));\r\n };\r\n ScillaComponent.prototype.bubbling = function (method) {\r\n var params = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n params[_i - 1] = arguments[_i];\r\n }\r\n var _a;\r\n (_a = this.entity).bubbling.apply(_a, tslib_1.__spread([method], params));\r\n };\r\n return ScillaComponent;\r\n}(HashObject));\r\nexport { ScillaComponent };\r\n//# sourceMappingURL=ScillaComponent.js.map"}
{"map":"{\"version\":3,\"file\":\"Sheet.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/Sheet.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAKxC;IAA2B,iCAAU;IAYpC,e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AG,IAAI,CAAC;QAEhB,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,aAAa,EAAE;YACnC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;YAClC,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;SAC/B;IACF,CAAC;IACF,YAAC;AAAD,CAAC,AAzFD,CAA2B,UAAU,GAyFpC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport HashObject from \"../core/HashObject\";\r\nimport { createTexture } from \"./Texture\";\r\nvar Sheet = (function (_super) {\r\n tslib_1.__extends(Sheet, _super);\r\n function Sheet(img, frames) {\r\n var _this = _super.call(this) || this;\r\n _this._textureCache = {};\r\n if (img) {\r\n _this.img = img;\r\n }\r\n if (frames) {\r\n _this.frames = frames;\r\n }\r\n return _this;\r\n }\r\n Sheet.prototype.generateAll = function () {\r\n for (var key in this.frames) {\r\n this.generateTexture(key);\r\n }\r\n };\r\n Sheet.prototype.generateTexture = function (name, force) {\r\n if (force === void 0) { force = false; }\r\n var _a = this, img = _a.img, frames = _a.frames, _textureCache = _a._textureCache;\r\n if (!force && _textureCache[name]) {\r\n return _textureCache[name];\r\n }\r\n var frame = frames[name];\r\n if (frame) {\r\n return _textureCache[name] = createTexture(img, frame);\r\n }\r\n };\r\n Sheet.prototype.hasTexture = function (name) {\r\n return !!frames[name];\r\n };\r\n Sheet.prototype.getTexture = function (name) {\r\n var texture = this._textureCache[name];\r\n if (texture) {\r\n return texture;\r\n }\r\n else {\r\n return this.generateTexture(name);\r\n }\r\n };\r\n Sheet.prototype.getAllTextures = function () {\r\n return this._textureCache;\r\n };\r\n Sheet.prototype.destroy = function () {\r\n this.img = null;\r\n for (var key in this._textureCache) {\r\n this._textureCache[key].destroy();\r\n delete this._textureCache[key];\r\n }\r\n };\r\n return Sheet;\r\n}(HashObject));\r\nexport { Sheet };\r\n//# sourceMappingURL=Sheet.js.map"}
{"map":"{\"version\":3,\"file\":\"main.js\",\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slib_1 from \"tslib\";\r\nimport { setup, launchScene, modifyEngineConfig, loadJson, setResPath, utils, } from 'scilla';\r\nimport './generated/MustCompile';\r\nimport launchOptions, { inject } from \"launchOptions\";\r\nmodifyEngineConfig({\r\n lineHeightRatio: 1.2,\r\n entityEnabled: false,\r\n awakeComponentWhenAdded: false,\r\n sleepComponentWhenRemoved: false,\r\n drawRenderRect: false,\r\n});\r\nexport function startup(containerElement, options, onProgress) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var manifest, canvas, config;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadJson('manifest.json')];\r\n case 1:\r\n manifest = _a.sent();\r\n inject(manifest);\r\n inject(options);\r\n setResPath(DEBUG ? 'assets/' : launchOptions.resPath);\r\n canvas = document.createElement('canvas');\r\n containerElement.appendChild(canvas);\r\n config = {\r\n canvas: canvas,\r\n };\r\n if (options.config) {\r\n utils.injectProp(config, options.config);\r\n }\r\n setup(config);\r\n launchScene('main', onProgress).catch(function (e) {\r\n console.log(e);\r\n });\r\n return [2];\r\n }\r\n });\r\n });\r\n}\r\n//# sourceMappingURL=main.js.map"}
{"map":"{\"version\":3,\"file\":\"Scene.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/Scene.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAE/C;IAAA;QAGC,mBAAc,GAAQ;YACrB,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,EAAE;SACT,CAAC;IAiBH,CAAC;IAbA,4BAAY,GAAZ,UAAa,MAAM;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QAExB,IAAM,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACjD,KAAI,IAAI,GAAG,IAAI,cAAc,EAAC;YAC7B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;SAC/C;IACF,CAAC;IAEK,4BAAY,GAAlB,UAAmB,IAAI,EAAE,QAAS;;;;4BACjC,WAAM,YAAY,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,EAAA;;wBAAvD,SAAuD,CAAC;;;;;KACxD;IACF,YAAC;AAAD,CAAC,AAvBD,IAuBC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { loadResItems } from \"../assets-manager\";\r\nvar Scene = (function () {\r\n function Scene() {\r\n this.resourceGroups = {\r\n preload: [],\r\n delay: [],\r\n };\r\n }\r\n Scene.prototype.initByConfig = function (config) {\r\n this.config = config;\r\n this.name = config.name;\r\n var resourceGroups = config['resource-groups'];\r\n for (var key in resourceGroups) {\r\n this.resourceGroups[key] = resourceGroups[key];\r\n }\r\n };\r\n Scene.prototype.loadResGroup = function (name, progress) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadResItems(this.resourceGroups[name], progress)];\r\n case 1:\r\n _a.sent();\r\n return [2];\r\n }\r\n });\r\n });\r\n };\r\n return Scene;\r\n}());\r\nexport { Scene };\r\n//# sourceMappingURL=Scene.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../node_modules/scilla-core/src/index.ts\"],\"names\":[],\"mappings\":\"AAIA,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA\"}","code":"export * from './core';\r\nexport * from './editor';\r\nexport * from './assets-manager';\r\nexport * from './support';\r\nexport * from './tools';\r\nexport * from './filter';\r\nexport * from './engine-config';\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"engine-config.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../node_modules/scilla-core/src/engine-config.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAEzC,MAAM,CAAC,IAAM,YAAY,GAAG;IAC3B,eAAe,EAAE,GAAG;IACpB,aAAa,EAAE,IAAI;IACnB,gBAAgB,EAAE,IAAI;IACtB,uBAAuB,EAAE,IAAI;IAC7B,yBAAyB,EAAE,IAAI;IAC/B,cAAc,EAAE,KAAK;IACrB,cAAc,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,QAAQ;IAC1C,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AACpC,CAAC\"}","code":"import { injectProp } from \"./tools/utils\";\r\nexport var EngineConfig = {\r\n lineHeightRatio: 1.2,\r\n entityEnabled: true,\r\n componentEnabled: true,\r\n awakeComponentWhenAdded: true,\r\n sleepComponentWhenRemoved: true,\r\n drawRenderRect: false,\r\n imgCrossOrigin: true,\r\n};\r\nexport function modifyEngineConfig(_options) {\r\n injectProp(EngineConfig, _options);\r\n}\r\n//# sourceMappingURL=engine-config.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/filter/index.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC\"}","code":"export { ShadowFilter } from './Filters';\r\nexport { ColorFilter } from './Filters';\r\nexport { ColorMatrixFilter } from './Filters';\r\nexport { BlurFilter } from './Filters';\r\n//# sourceMappingURL=index.js.map"}
{"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AO,EAAE,CAAC;SACpB;IACF,CAAC;IASD,0BAAS,GAAT,UAAU,MAAM,EAAE,KAAU;QAAV,sBAAA,EAAA,SAAS,CAAC;QAAE,gBAAS;aAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;YAAT,+BAAS;;QACtC,QAAQ,iCAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAK,MAAM,GAAC;IAC1E,CAAC;IAQD,yBAAQ,GAAR,UAAS,MAAM;QAAE,gBAAS;aAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;YAAT,+BAAS;;QACzB,QAAQ,iCAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,MAAM,GAAK,MAAM,GAAE;IAC/D,CAAC;IAwBF,aAAC;AAAD,CAAC,AAjeD,CAA4B,UAAU,GAierC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport HashObject from \"./HashObject\";\r\nimport { EngineConfig } from \"../engine-config\";\r\nexport function traverse(target, hitChild, level, includeSelf, fullCallback) {\r\n if (level === void 0) { level = -1; }\r\n if (includeSelf === void 0) { includeSelf = false; }\r\n var params = [];\r\n for (var _i = 5; _i < arguments.length; _i++) {\r\n params[_i - 5] = arguments[_i];\r\n }\r\n var e_1, _a;\r\n var interrupt;\r\n if (includeSelf) {\r\n hitChild.apply(void 0, tslib_1.__spread([target], params));\r\n }\r\n if (level !== 0) {\r\n try {\r\n for (var _b = tslib_1.__values(target.children), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var child = _c.value;\r\n if (hitChild.apply(void 0, tslib_1.__spread([child], params))) {\r\n interrupt = true;\r\n continue;\r\n }\r\n if (child.children.length > 0) {\r\n traverse.apply(void 0, tslib_1.__spread([child, hitChild, level - 1, false, fullCallback], params));\r\n }\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n }\r\n !interrupt && fullCallback && fullCallback(target);\r\n}\r\nexport function traversePostorder(target, hitChild, level, includeSelf, fullCallback) {\r\n if (level === void 0) { level = -1; }\r\n if (includeSelf === void 0) { includeSelf = false; }\r\n var params = [];\r\n for (var _i = 5; _i < arguments.length; _i++) {\r\n params[_i - 5] = arguments[_i];\r\n }\r\n var interrupt;\r\n if (level !== 0) {\r\n for (var i = target.children.length - 1; i >= 0; i--) {\r\n var child = target.children[i];\r\n if (traversePostorder.apply(void 0, tslib_1.__spread([child, hitChild, level - 1, false, fullCallback], params))) {\r\n return true;\r\n }\r\n if (hitChild.apply(void 0, tslib_1.__spread([child], params))) {\r\n return true;\r\n }\r\n }\r\n }\r\n if (includeSelf) {\r\n hitChild.apply(void 0, tslib_1.__spread([target], params));\r\n }\r\n !interrupt && fullCallback && fullCallback(target);\r\n}\r\nexport function bubbling(target, hitParent, includeSelf) {\r\n if (includeSelf === void 0) { includeSelf = false; }\r\n var params = [];\r\n for (var _i = 3; _i < arguments.length; _i++) {\r\n params[_i - 3] = arguments[_i];\r\n }\r\n if (includeSelf) {\r\n hitParent.apply(void 0, tslib_1.__spread([target], params));\r\n }\r\n var entity = target;\r\n while (entity = entity.parent) {\r\n if (hitParent.apply(void 0, tslib_1.__spread([entity], params))) {\r\n break;\r\n }\r\n }\r\n}\r\nvar Entity = (function (_super) {\r\n tslib_1.__extends(Entity, _super);\r\n function Entity(name, uuid) {\r\n var _this = _super.call(this) || this;\r\n _this.name = 'Entity';\r\n _this._isFree = true;\r\n _this._enabled = EngineConfig.entityEnabled;\r\n _this._parent = null;\r\n _this._children = [];\r\n _this._components = [];\r\n _this.invokeOnEntity = function (hitEntity, method) {\r\n var params = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n params[_i - 2] = arguments[_i];\r\n }\r\n var hitBreak = false;\r\n hitEntity.forEachComponent(function (comp) {\r\n var m = comp[method];\r\n if (m) {\r\n var result = m.apply(comp, params);\r\n if (result) {\r\n hitBreak = true;\r\n }\r\n }\r\n return false;\r\n });\r\n if (hitBreak) {\r\n return true;\r\n }\r\n };\r\n if (name) {\r\n _this.name = name;\r\n }\r\n if (uuid) {\r\n _this._uuid = uuid;\r\n }\r\n return _this;\r\n }\r\n Object.defineProperty(Entity.prototype, \"uuid\", {\r\n get: function () {\r\n return this._uuid;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Entity.prototype, \"enabled\", {\r\n get: function () {\r\n return this._enabled;\r\n },\r\n set: function (value) {\r\n if (this._enabled !== value) {\r\n this._enabled = value;\r\n traverse(this, function (child) {\r\n child._invokeEnabledState(value);\r\n return false;\r\n }, -1, true);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Entity.prototype._invokeEnabledState = function (enabled) {\r\n if (this._enabled && enabled) {\r\n this.onEnable();\r\n }\r\n else if (!this._enabled && !enabled) {\r\n this.onDisable();\r\n }\r\n };\r\n Object.defineProperty(Entity.prototype, \"isParentActive\", {\r\n get: function () {\r\n return this._parent && this._parent.enabled && !this._parent.isFree;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Entity.prototype, \"isActive\", {\r\n get: function () {\r\n return this.isParentActive && this._enabled;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Entity.prototype, \"isFree\", {\r\n get: function () {\r\n return this._isFree;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Entity.prototype._free = function () {\r\n this._isFree = true;\r\n var that = this;\r\n traverse(this, function (child) {\r\n child._free();\r\n return false;\r\n }, 1);\r\n };\r\n Entity.prototype._restrict = function () {\r\n this._isFree = false;\r\n var that = this;\r\n traverse(this, function (child) {\r\n child._restrict();\r\n return false;\r\n }, 1);\r\n };\r\n Object.defineProperty(Entity.prototype, \"parent\", {\r\n get: function () {\r\n return this._parent;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Entity.prototype.containsChild = function (child) {\r\n return this.getChildIndex(child) >= 0;\r\n };\r\n Entity.prototype._onChildAdded = function (child) {\r\n child._parent = this;\r\n if (!this._isFree && child._isFree) {\r\n if (child.isParentActive) {\r\n child._invokeEnabledState(true);\r\n }\r\n child._restrict();\r\n }\r\n };\r\n Entity.prototype._onChildRemoved = function (child) {\r\n child._parent = null;\r\n if (!this._isFree && !child._isFree) {\r\n if (child.isActive) {\r\n child._invokeEnabledState(false);\r\n }\r\n child._free();\r\n }\r\n };\r\n Entity.prototype.addChild = function (child) {\r\n this.addChildAt(child, this._children.length);\r\n };\r\n Entity.prototype.addChildAt = function (child, index) {\r\n if (child.parent && child.parent !== this) {\r\n child.parent.removeChild(child);\r\n }\r\n var currentIndex = this.getChildIndex(child);\r\n if (index < 0 || currentIndex == index) {\r\n return;\r\n }\r\n index = Math.min(this._children.length, index);\r\n if (currentIndex >= 0 || index < this._children.length) {\r\n if (currentIndex >= 0) {\r\n this._children.splice(currentIndex, 1);\r\n }\r\n this._children.splice(index, 0, child);\r\n }\r\n else {\r\n this._children.push(child);\r\n }\r\n this._onChildAdded(child);\r\n };\r\n Entity.prototype.removeChild = function (child) {\r\n var index = this.getChildIndex(child);\r\n if (index >= 0) {\r\n this.removeChildAt(index);\r\n }\r\n };\r\n Entity.prototype.removeChildAt = function (index) {\r\n var child = this._children[index];\r\n this._onChildRemoved(child);\r\n this._children.splice(index, 1);\r\n };\r\n Entity.prototype.getChildIndex = function (child) {\r\n return this._children.indexOf(child);\r\n };\r\n Entity.prototype.getChildByIndex = function (index) {\r\n return this._children[index];\r\n };\r\n Entity.prototype.removeChildren = function () {\r\n while (this._children.length > 0) {\r\n this.removeChildAt(0);\r\n }\r\n };\r\n Object.defineProperty(Entity.prototype, \"children\", {\r\n get: function () {\r\n return this._children;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Entity.prototype.addComponent = function (component) {\r\n this.onAddComponent(component);\r\n this._components.push(component);\r\n };\r\n Entity.prototype.addComponentAt = function (component, index) {\r\n var currentIndex = this._components.indexOf(component);\r\n if (currentIndex == index) {\r\n return;\r\n }\r\n if (currentIndex >= 0) {\r\n this._components.splice(currentIndex, 1);\r\n }\r\n this._components.splice(index, 0, component);\r\n this.onAddComponent(component);\r\n };\r\n Entity.prototype.removeComponent = function (component) {\r\n this.onRemoveComponent(component);\r\n var index = this._components.indexOf(component);\r\n if (index >= 0) {\r\n this._components.splice(index, 1);\r\n }\r\n };\r\n Entity.prototype.removeAllComponents = function () {\r\n while (this._components.length > 0) {\r\n this.removeComponent(this._components[0]);\r\n }\r\n };\r\n Entity.prototype.getComponents = function (clazz) {\r\n return this._components.filter(function (component) {\r\n return typeof clazz === 'string' ? component.constructor.__class__ === clazz : component instanceof clazz;\r\n });\r\n };\r\n Entity.prototype.getComponent = function (clazz) {\r\n return this.getComponents(clazz)[0];\r\n };\r\n Object.defineProperty(Entity.prototype, \"components\", {\r\n get: function () {\r\n return this._components;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Entity.prototype.forEachComponent = function (func) {\r\n var e_2, _a;\r\n try {\r\n for (var _b = tslib_1.__values(this._components), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var component = _c.value;\r\n if (func(component)) {\r\n break;\r\n }\r\n }\r\n }\r\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_2) throw e_2.error; }\r\n }\r\n };\r\n Entity.prototype.onEnable = function () {\r\n this.forEachComponent(function (comp) {\r\n if (comp.enabled) {\r\n return comp.onAwake();\r\n }\r\n });\r\n };\r\n Entity.prototype.onDisable = function () {\r\n this.forEachComponent(function (comp) {\r\n if (comp.enabled) {\r\n return comp.onSleep();\r\n }\r\n });\r\n };\r\n Entity.prototype.onUpdate = function (t) {\r\n this.forEachComponent(function (comp) {\r\n if (comp.enabled) {\r\n return comp.$onUpdate(t);\r\n }\r\n });\r\n };\r\n Entity.prototype.afterUpdate = function () {\r\n this.forEachComponent(function (comp) {\r\n if (comp.enabled) {\r\n return comp.afterUpdate();\r\n }\r\n });\r\n };\r\n Entity.prototype.onInteract = function (type, event) {\r\n if (!this.isFree && this.enabled) {\r\n var interrupt_1 = false;\r\n this.forEachComponent(function (comp) {\r\n if (comp.enabled && comp.interactable) {\r\n var r = comp.onInteract(type, event);\r\n if (r) {\r\n interrupt_1 = true;\r\n }\r\n return false;\r\n }\r\n });\r\n return interrupt_1;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n Entity.prototype.onAddComponent = function (component) {\r\n component._setup(this);\r\n if (EngineConfig.awakeComponentWhenAdded) {\r\n this.awakeComponent(component);\r\n }\r\n };\r\n Entity.prototype.awakeComponent = function (component) {\r\n if (!this._isFree && this._enabled) {\r\n component.onAwake();\r\n }\r\n };\r\n Entity.prototype.onRemoveComponent = function (component) {\r\n if (EngineConfig.sleepComponentWhenRemoved) {\r\n this.sleepComponent(component);\r\n }\r\n component._unSetup();\r\n };\r\n Entity.prototype.sleepComponent = function (component) {\r\n if (!this._isFree && this._enabled) {\r\n component.onSleep();\r\n }\r\n };\r\n Entity.prototype.broadcast = function (method, level) {\r\n if (level === void 0) { level = -1; }\r\n var params = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n params[_i - 2] = arguments[_i];\r\n }\r\n traverse.apply(void 0, tslib_1.__spread([this, this.invokeOnEntity, level, true, null, method], params));\r\n };\r\n Entity.prototype.bubbling = function (method) {\r\n var params = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n params[_i - 1] = arguments[_i];\r\n }\r\n bubbling.apply(void 0, tslib_1.__spread([this, this.invokeOnEntity, false, method], params));\r\n };\r\n return Entity;\r\n}(HashObject));\r\nexport { Entity };\r\n//# sourceMappingURL=Entity.js.map"}
{"map":"{\"version\":3,\"file\":\"decorators.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/tools/decorators.ts\"],\"names\":[],\"mappings\":\"AAUA,MAAM,UAAU,YAAY,CAAC,QAAQ;IACpC,OAAO,UAAU,MAAW,EAAE,GAAW;QACxC,IAAM,UAAU,GAAG,GAAG,GAAG,GAAG,CAAC;QAC7B,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;YAClC,UAAU,EAAE,IAAI;YAChB,GAAG,EAAE;gBACJ,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC;YACzB,CAAC;YACD,GAAG,EAAE,UAAU,CAAC;gBACf,IAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;gBAClC,IAAI,QAAQ,KAAK,CAAC,EAAE;oBACnB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;oBACrB,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;iBACzC;YACF,CAAC;SACD,CAAC,CAAA;IACH,CAAC,CAAA;AACF,CAAC;AAKD,MAAM,CAAC,IAAM,kBAAkB,GAAG,YAAY,CAC7C,UAAU,KAAK,EAAE,GAAG,EAAE,QAAQ;IAC7B,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AACtB,CAAC,CACD,CAAC;AAKF,MAAM,CAAC,IAAM,iBAAiB,GAAG,YAAY,CAC5C,UAAU,KAAK,EAAE,GAAG,EAAE,QAAQ;IAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC5D,CAAC,CACD,CAAC\"}","code":"export function fieldChanged(onChange) {\r\n return function (target, key) {\r\n var privateKey = '_' + key;\r\n Object.defineProperty(target, key, {\r\n enumerable: true,\r\n get: function () {\r\n return this[privateKey];\r\n },\r\n set: function (v) {\r\n var oldValue = this[privateKey];\r\n if (oldValue !== v) {\r\n this[privateKey] = v;\r\n onChange.apply(this, [v, key, oldValue]);\r\n }\r\n }\r\n });\r\n };\r\n}\r\nexport var dirtyFieldDetector = fieldChanged(function (value, key, oldValue) {\r\n this['dirty'] = true;\r\n});\r\nexport var dirtyFieldTrigger = fieldChanged(function (value, key, oldValue) {\r\n this['onModify'] && this['onModify'](value, key, oldValue);\r\n});\r\n//# sourceMappingURL=decorators.js.map"}
{"map":"{\"version\":3,\"file\":\"Filters.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/filter/Filters.ts\"],\"names\":[],\"mappings\":\"AAMA;IA0DI,sBAAmB,KAAuB,EAAE,OAAmB,EAAE,OAAmB,EAAE,IAAgB;QAAnF,sBAAA,EAAA,eAAuB;QAAE,wBAAA,EAAA,WAAmB;QAAE,wBAAA,EAAA,WAAmB;QAAE,qBAAA,EAAA,QAAgB;QAhD/F,UAAK,GAAW,OAAO,CAAC;QAUxB,YAAO,GAAW,CAAC,CAAC;QAUpB,YAAO,GAAW,CAAC,CAAC;QAUpB,SAAI,GAAW,CAAC,CAAC;QAUjB,SAAI,GAAW,QAAQ,CAAC;QAS3B,IAAI,CAAC,GAAG,IAAI,CAAC;QACb,CAAC,CAAC,OAAO,GAAG,OAAO,CAAC;QACpB,CAAC,CAAC,OAAO,GAAG,OAAO,CAAC;QACpB,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;QACd,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC;IACpB,CAAC;IAQM,+BAAQ,GAAf;QACI,IAAI,CAAC,GAAG,IAAI,CAAC;QACb,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC;IAC7D,CAAC;IAQM,iCAAU,GAAjB,UAAkB,SAA2B;QAA3B,0BAAA,EAAA,gBAA2B;IAE7C,CAAC;IAEM,8BAAO,GAAd;IAEA,CAAC;IACL,mBAAC;AAAD,CAAC,AA1FD,IA0F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AG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IAmKlvC,iBAAC;CAAA,AAlOD,IAkOC;SAlOY,UAAU\"}","code":"var ShadowFilter = (function () {\r\n function ShadowFilter(color, offsetX, offsetY, blur) {\r\n if (color === void 0) { color = \"black\"; }\r\n if (offsetX === void 0) { offsetX = 2; }\r\n if (offsetY === void 0) { offsetY = 2; }\r\n if (blur === void 0) { blur = 2; }\r\n this.color = \"black\";\r\n this.offsetX = 2;\r\n this.offsetY = 2;\r\n this.blur = 2;\r\n this.type = \"Shadow\";\r\n var s = this;\r\n s.offsetX = offsetX;\r\n s.offsetY = offsetY;\r\n s.blur = blur;\r\n s.color = color;\r\n }\r\n ShadowFilter.prototype.toString = function () {\r\n var s = this;\r\n return s.type + s.offsetX + s.offsetY + s.blur + s.color;\r\n };\r\n ShadowFilter.prototype.drawFilter = function (imageData) {\r\n if (imageData === void 0) { imageData = null; }\r\n };\r\n ShadowFilter.prototype.destroy = function () {\r\n };\r\n return ShadowFilter;\r\n}());\r\nexport { ShadowFilter };\r\nvar ColorFilter = (function () {\r\n function ColorFilter(colorArrays) {\r\n this.redMultiplier = 0;\r\n this.redOffset = 0;\r\n this.greenMultiplier = 0;\r\n this.greenOffset = 0;\r\n this.blueMultiplier = 0;\r\n this.blueOffset = 0;\r\n this.alphaMultiplier = 0;\r\n this.alphaOffset = 0;\r\n this.type = \"Color\";\r\n var s = this;\r\n s.redMultiplier = colorArrays[0];\r\n s.greenMultiplier = colorArrays[1];\r\n s.blueMultiplier = colorArrays[2];\r\n s.alphaMultiplier = colorArrays[3];\r\n s.redOffset = colorArrays[4];\r\n s.greenOffset = colorArrays[5];\r\n s.blueOffset = colorArrays[6];\r\n s.alphaOffset = colorArrays[7];\r\n }\r\n ColorFilter.prototype.drawFilter = function (imageData) {\r\n if (imageData === void 0) { imageData = null; }\r\n if (!imageData)\r\n return;\r\n var s = this;\r\n var data = imageData.data;\r\n var l = data.length;\r\n for (var i = 0; i < l; i += 4) {\r\n data[i] = data[i] * s.redMultiplier + s.redOffset;\r\n data[i + 1] = data[i + 1] * s.greenMultiplier + s.greenOffset;\r\n data[i + 2] = data[i + 2] * s.blueMultiplier + s.blueOffset;\r\n data[i + 3] = data[i + 3] * s.alphaMultiplier + s.alphaOffset;\r\n }\r\n };\r\n ColorFilter.prototype.toString = function () {\r\n var s = this;\r\n return s.type + s.redMultiplier + s.greenMultiplier + s.blueMultiplier + s.alphaMultiplier + s.redOffset + s.greenOffset + s.blueOffset + s.alphaOffset;\r\n };\r\n ColorFilter.prototype.destroy = function () {\r\n };\r\n return ColorFilter;\r\n}());\r\nexport { ColorFilter };\r\nvar ColorMatrixFilter = (function () {\r\n function ColorMatrixFilter(brightness, contrast, saturation, hue) {\r\n this.brightness = 0;\r\n this.contrast = 0;\r\n this.saturation = 0;\r\n this.hue = 0;\r\n this.type = \"ColorMatrix\";\r\n var s = this;\r\n s.brightness = brightness;\r\n s.contrast = contrast;\r\n s.saturation = saturation;\r\n s.hue = hue;\r\n s.colorMatrix = [\r\n 1, 0, 0, 0, 0,\r\n 0, 1, 0, 0, 0,\r\n 0, 0, 1, 0, 0,\r\n 0, 0, 0, 1, 0,\r\n 0, 0, 0, 0, 1\r\n ];\r\n brightness = s._cleanValue(brightness, 255);\r\n if (brightness != 0) {\r\n s._multiplyMatrix([\r\n 1, 0, 0, 0, brightness,\r\n 0, 1, 0, 0, brightness,\r\n 0, 0, 1, 0, brightness,\r\n 0, 0, 0, 1, 0,\r\n 0, 0, 0, 0, 1\r\n ]);\r\n }\r\n contrast = this._cleanValue(contrast, 100);\r\n var x;\r\n if (contrast != 0) {\r\n if (contrast < 0) {\r\n x = 127 + contrast / 100 * 127;\r\n }\r\n else {\r\n x = contrast % 1;\r\n if (x == 0) {\r\n x = ColorMatrixFilter.DELTA_INDEX[contrast];\r\n }\r\n else {\r\n x = ColorMatrixFilter.DELTA_INDEX[(contrast << 0)] * (1 - x) + ColorMatrixFilter.DELTA_INDEX[(contrast << 0) + 1] * x;\r\n }\r\n x = x * 127 + 127;\r\n }\r\n s._multiplyMatrix([\r\n x / 127, 0, 0, 0, 0.5 * (127 - x),\r\n 0, x / 127, 0, 0, 0.5 * (127 - x),\r\n 0, 0, x / 127, 0, 0.5 * (127 - x),\r\n 0, 0, 0, 1, 0,\r\n 0, 0, 0, 0, 1\r\n ]);\r\n }\r\n saturation = this._cleanValue(saturation, 100);\r\n if (saturation != 0) {\r\n x = 1 + ((saturation > 0) ? 3 * saturation / 100 : saturation / 100);\r\n var lumR = 0.3086;\r\n var lumG = 0.6094;\r\n var lumB = 0.0820;\r\n s._multiplyMatrix([\r\n lumR * (1 - x) + x, lumG * (1 - x), lumB * (1 - x), 0, 0,\r\n lumR * (1 - x), lumG * (1 - x) + x, lumB * (1 - x), 0, 0,\r\n lumR * (1 - x), lumG * (1 - x), lumB * (1 - x) + x, 0, 0,\r\n 0, 0, 0, 1, 0,\r\n 0, 0, 0, 0, 1\r\n ]);\r\n }\r\n hue = this._cleanValue(hue, 180) / 180 * Math.PI;\r\n if (hue != 0) {\r\n var cosVal = Math.cos(hue);\r\n var sinVal = Math.sin(hue);\r\n var lumR = 0.213;\r\n var lumG = 0.715;\r\n var lumB = 0.072;\r\n s._multiplyMatrix([\r\n lumR + cosVal * (1 - lumR) + sinVal * (-lumR), lumG + cosVal * (-lumG) + sinVal * (-lumG), lumB + cosVal * (-lumB) + sinVal * (1 - lumB), 0, 0,\r\n lumR + cosVal * (-lumR) + sinVal * (0.143), lumG + cosVal * (1 - lumG) + sinVal * (0.140), lumB + cosVal * (-lumB) + sinVal * (-0.283), 0, 0,\r\n lumR + cosVal * (-lumR) + sinVal * (-(1 - lumR)), lumG + cosVal * (-lumG) + sinVal * (lumG), lumB + cosVal * (1 - lumB) + sinVal * (lumB), 0, 0,\r\n 0, 0, 0, 1, 0,\r\n 0, 0, 0, 0, 1\r\n ]);\r\n }\r\n }\r\n ColorMatrixFilter.prototype.drawFilter = function (imageData) {\r\n if (imageData === void 0) { imageData = null; }\r\n if (!imageData)\r\n return;\r\n var data = imageData.data;\r\n var l = data.length;\r\n var r, g, b, a;\r\n var mtx = this.colorMatrix;\r\n var m0 = mtx[0], m1 = mtx[1], m2 = mtx[2], m3 = mtx[3], m4 = mtx[4];\r\n var m5 = mtx[5], m6 = mtx[6], m7 = mtx[7], m8 = mtx[8], m9 = mtx[9];\r\n var m10 = mtx[10], m11 = mtx[11], m12 = mtx[12], m13 = mtx[13], m14 = mtx[14];\r\n var m15 = mtx[15], m16 = mtx[16], m17 = mtx[17], m18 = mtx[18], m19 = mtx[19];\r\n for (var i = 0; i < l; i += 4) {\r\n r = data[i];\r\n g = data[i + 1];\r\n b = data[i + 2];\r\n a = data[i + 3];\r\n data[i] = r * m0 + g * m1 + b * m2 + a * m3 + m4;\r\n data[i + 1] = r * m5 + g * m6 + b * m7 + a * m8 + m9;\r\n data[i + 2] = r * m10 + g * m11 + b * m12 + a * m13 + m14;\r\n data[i + 3] = r * m15 + g * m16 + b * m17 + a * m18 + m19;\r\n }\r\n };\r\n ColorMatrixFilter.prototype._multiplyMatrix = function (colorMat) {\r\n var i, j, k, col = [];\r\n for (i = 0; i < 5; i++) {\r\n for (j = 0; j < 5; j++) {\r\n col[j] = this.colorMatrix[j + i * 5];\r\n }\r\n for (j = 0; j < 5; j++) {\r\n var val = 0;\r\n for (k = 0; k < 5; k++) {\r\n val += colorMat[j + k * 5] * col[k];\r\n }\r\n this.colorMatrix[j + i * 5] = val;\r\n }\r\n }\r\n };\r\n ColorMatrixFilter.prototype._cleanValue = function (value, limit) {\r\n return Math.min(limit, Math.max(-limit, value));\r\n };\r\n ColorMatrixFilter.prototype.toString = function () {\r\n var s = this;\r\n return s.type + s.brightness + s.hue + s.saturation + s.contrast;\r\n };\r\n ColorMatrixFilter.prototype.destroy = function () {\r\n this.colorMatrix = null;\r\n };\r\n ColorMatrixFilter.DELTA_INDEX = [\r\n 0, 0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1, 0.11,\r\n 0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.20, 0.21, 0.22, 0.24,\r\n 0.25, 0.27, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, 0.40, 0.42,\r\n 0.44, 0.46, 0.48, 0.5, 0.53, 0.56, 0.59, 0.62, 0.65, 0.68,\r\n 0.71, 0.74, 0.77, 0.80, 0.83, 0.86, 0.89, 0.92, 0.95, 0.98,\r\n 1.0, 1.06, 1.12, 1.18, 1.24, 1.30, 1.36, 1.42, 1.48, 1.54,\r\n 1.60, 1.66, 1.72, 1.78, 1.84, 1.90, 1.96, 2.0, 2.12, 2.25,\r\n 2.37, 2.50, 2.62, 2.75, 2.87, 3.0, 3.2, 3.4, 3.6, 3.8,\r\n 4.0, 4.3, 4.7, 4.9, 5.0, 5.5, 6.0, 6.5, 6.8, 7.0,\r\n 7.3, 7.5, 7.8, 8.0, 8.4, 8.7, 9.0, 9.4, 9.6, 9.8,\r\n 10.0\r\n ];\r\n return ColorMatrixFilter;\r\n}());\r\nexport { ColorMatrixFilter };\r\nvar BlurFilter = (function () {\r\n function BlurFilter(blurX, blurY, quality) {\r\n if (blurX === void 0) { blurX = 2; }\r\n if (blurY === void 0) { blurY = 2; }\r\n if (quality === void 0) { quality = 1; }\r\n this.type = \"blur\";\r\n this.blurX = 0;\r\n this.blurY = 0;\r\n this.quality = 1;\r\n var s = this;\r\n s.blurX = blurX;\r\n s.blurY = blurY;\r\n s.quality = quality;\r\n }\r\n BlurFilter.prototype.toString = function () {\r\n var s = this;\r\n return s.type + s.blurX + s.blurY + s.quality;\r\n };\r\n BlurFilter.prototype.drawFilter = function (imageData) {\r\n if (imageData === void 0) { imageData = null; }\r\n var s = this;\r\n var radiusX = s.blurX >> 1;\r\n if (isNaN(radiusX) || radiusX < 0)\r\n return false;\r\n var radiusY = s.blurY >> 1;\r\n if (isNaN(radiusY) || radiusY < 0)\r\n return false;\r\n if (radiusX == 0 && radiusY == 0)\r\n return false;\r\n var iterations = s.quality;\r\n if (isNaN(iterations) || iterations < 1)\r\n iterations = 1;\r\n iterations |= 0;\r\n if (iterations > 3)\r\n iterations = 3;\r\n if (iterations < 1)\r\n iterations = 1;\r\n var px = imageData.data;\r\n var x = 0, y = 0, i = 0, p = 0, yp = 0, yi = 0, yw = 0, r = 0, g = 0, b = 0, a = 0, pr = 0, pg = 0, pb = 0, pa = 0;\r\n var divx = (radiusX + radiusX + 1) | 0;\r\n var divy = (radiusY + radiusY + 1) | 0;\r\n var w = imageData.width | 0;\r\n var h = imageData.height | 0;\r\n var w1 = (w - 1) | 0;\r\n var h1 = (h - 1) | 0;\r\n var rxp1 = (radiusX + 1) | 0;\r\n var ryp1 = (radiusY + 1) | 0;\r\n var ssx = { r: 0, b: 0, g: 0, a: 0 };\r\n var sx = ssx;\r\n for (i = 1; i < divx; i++) {\r\n sx = sx.n = { r: 0, b: 0, g: 0, a: 0 };\r\n }\r\n sx.n = ssx;\r\n var ssy = { r: 0, b: 0, g: 0, a: 0 };\r\n var sy = ssy;\r\n for (i = 1; i < divy; i++) {\r\n sy = sy.n = { r: 0, b: 0, g: 0, a: 0 };\r\n }\r\n sy.n = ssy;\r\n var si = null;\r\n var mtx = BlurFilter.MUL_TABLE[radiusX] | 0;\r\n var stx = BlurFilter.SHG_TABLE[radiusX] | 0;\r\n var mty = BlurFilter.MUL_TABLE[radiusY] | 0;\r\n var sty = BlurFilter.SHG_TABLE[radiusY] | 0;\r\n while (iterations-- > 0) {\r\n yw = yi = 0;\r\n var ms = mtx;\r\n var ss = stx;\r\n for (y = h; --y > -1;) {\r\n r = rxp1 * (pr = px[(yi) | 0]);\r\n g = rxp1 * (pg = px[(yi + 1) | 0]);\r\n b = rxp1 * (pb = px[(yi + 2) | 0]);\r\n a = rxp1 * (pa = px[(yi + 3) | 0]);\r\n sx = ssx;\r\n for (i = rxp1; --i > -1;) {\r\n sx.r = pr;\r\n sx.g = pg;\r\n sx.b = pb;\r\n sx.a = pa;\r\n sx = sx.n;\r\n }\r\n for (i = 1; i < rxp1; i++) {\r\n p = (yi + ((w1 < i ? w1 : i) << 2)) | 0;\r\n r += (sx.r = px[p]);\r\n g += (sx.g = px[p + 1]);\r\n b += (sx.b = px[p + 2]);\r\n a += (sx.a = px[p + 3]);\r\n sx = sx.n;\r\n }\r\n si = ssx;\r\n for (x = 0; x < w; x++) {\r\n px[yi++] = (r * ms) >>> ss;\r\n px[yi++] = (g * ms) >>> ss;\r\n px[yi++] = (b * ms) >>> ss;\r\n px[yi++] = (a * ms) >>> ss;\r\n p = ((yw + ((p = x + radiusX + 1) < w1 ? p : w1)) << 2);\r\n r -= si.r - (si.r = px[p]);\r\n g -= si.g - (si.g = px[p + 1]);\r\n b -= si.b - (si.b = px[p + 2]);\r\n a -= si.a - (si.a = px[p + 3]);\r\n si = si.n;\r\n }\r\n yw += w;\r\n }\r\n ms = mty;\r\n ss = sty;\r\n for (x = 0; x < w; x++) {\r\n yi = (x << 2) | 0;\r\n r = (ryp1 * (pr = px[yi])) | 0;\r\n g = (ryp1 * (pg = px[(yi + 1) | 0])) | 0;\r\n b = (ryp1 * (pb = px[(yi + 2) | 0])) | 0;\r\n a = (ryp1 * (pa = px[(yi + 3) | 0])) | 0;\r\n sy = ssy;\r\n for (i = 0; i < ryp1; i++) {\r\n sy.r = pr;\r\n sy.g = pg;\r\n sy.b = pb;\r\n sy.a = pa;\r\n sy = sy.n;\r\n }\r\n yp = w;\r\n for (i = 1; i <= radiusY; i++) {\r\n yi = (yp + x) << 2;\r\n r += (sy.r = px[yi]);\r\n g += (sy.g = px[yi + 1]);\r\n b += (sy.b = px[yi + 2]);\r\n a += (sy.a = px[yi + 3]);\r\n sy = sy.n;\r\n if (i < h1) {\r\n yp += w;\r\n }\r\n }\r\n yi = x;\r\n si = ssy;\r\n if (iterations > 0) {\r\n for (y = 0; y < h; y++) {\r\n p = yi << 2;\r\n px[p + 3] = pa = (a * ms) >>> ss;\r\n if (pa > 0) {\r\n px[p] = ((r * ms) >>> ss);\r\n px[p + 1] = ((g * ms) >>> ss);\r\n px[p + 2] = ((b * ms) >>> ss);\r\n }\r\n else {\r\n px[p] = px[p + 1] = px[p + 2] = 0;\r\n }\r\n p = (x + (((p = y + ryp1) < h1 ? p : h1) * w)) << 2;\r\n r -= si.r - (si.r = px[p]);\r\n g -= si.g - (si.g = px[p + 1]);\r\n b -= si.b - (si.b = px[p + 2]);\r\n a -= si.a - (si.a = px[p + 3]);\r\n si = si.n;\r\n yi += w;\r\n }\r\n }\r\n else {\r\n for (y = 0; y < h; y++) {\r\n p = yi << 2;\r\n px[p + 3] = pa = (a * ms) >>> ss;\r\n if (pa > 0) {\r\n pa = 255 / pa;\r\n px[p] = ((r * ms) >>> ss) * pa;\r\n px[p + 1] = ((g * ms) >>> ss) * pa;\r\n px[p + 2] = ((b * ms) >>> ss) * pa;\r\n }\r\n else {\r\n px[p] = px[p + 1] = px[p + 2] = 0;\r\n }\r\n p = (x + (((p = y + ryp1) < h1 ? p : h1) * w)) << 2;\r\n r -= si.r - (si.r = px[p]);\r\n g -= si.g - (si.g = px[p + 1]);\r\n b -= si.b - (si.b = px[p + 2]);\r\n a -= si.a - (si.a = px[p + 3]);\r\n si = si.n;\r\n yi += w;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n BlurFilter.prototype.destroy = function () {\r\n };\r\n BlurFilter.SHG_TABLE = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16, 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17, 16, 17, 16, 17, 16, 17, 9];\r\n BlurFilter.MUL_TABLE = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285, 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345, 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1];\r\n return BlurFilter;\r\n}());\r\nexport { BlurFilter };\r\n//# sourceMappingURL=Filters.js.map"}
{"map":"{\"version\":3,\"file\":\"utils.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/tools/utils.ts\"],\"names\":[],\"mappings\":\"AAMA,MAAM,UAAU,UAAU,CAAC,MAAW,EAAE,IAAU,EAAE,QAAmB,EAAE,YAA4B,EAAE,UAA0B;IAAxD,6BAAA,EAAA,mBAA4B;IAAE,2BAAA,EAAA,iBAA0B;IAChI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE;QACrB,OAAO,KAAK,CAAC;KACb;IAED,IAAI,MAAM,GAAG,IAAI,CAAC;IAClB,KAAK,IAAI,GAAG,IAAI,IAAI,EAAE;QACrB,IAAI,KAAK,GAAQ,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,CAAC,YAAY,IAAI,OAAO,KAAK,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,UAAU,IAAI,KAAK,IAAI,IAAI,CAAC,EAAE;YACpF,IAAI,QAAQ,EAAE;gBACb,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;aAC7B;iBAAM;gBACN,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aACpB;SACD;KACD;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAG;IAClC,IAAI,CAAC,GAAG,EAAE;QACT,OAAO,EAAE,C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AG,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IAChD,IAAI,KAAK,GAAG,CAAC,EAAE;QACd,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;KACxB;IACD,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AAC7B,CAAC\"}","code":"export function injectProp(target, data, callback, ignoreMethod, ignoreNull) {\r\n if (ignoreMethod === void 0) { ignoreMethod = true; }\r\n if (ignoreNull === void 0) { ignoreNull = true; }\r\n if (!target || !data) {\r\n return false;\r\n }\r\n var result = true;\r\n for (var key in data) {\r\n var value = data[key];\r\n if ((!ignoreMethod || typeof value != 'function') && (!ignoreNull || value != null)) {\r\n if (callback) {\r\n callback(target, key, value);\r\n }\r\n else {\r\n target[key] = value;\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\nexport function objectStringify(obj) {\r\n if (!obj) {\r\n return '';\r\n }\r\n var arr = [];\r\n for (var key in obj) {\r\n arr.push(key + '=' + obj[key]);\r\n }\r\n return arr.join('&');\r\n}\r\nexport function waitPromise(duration) {\r\n return new Promise(function (resolve) {\r\n setTimeout(resolve, duration);\r\n });\r\n}\r\nexport function format(formatStr) {\r\n var params = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n params[_i - 1] = arguments[_i];\r\n }\r\n return formatApply(formatStr, params);\r\n}\r\nexport function formatApply(formatStr, params) {\r\n var result = formatStr;\r\n for (var i = 0, len = params.length; i < len; i++) {\r\n var reg = new RegExp(\"\\\\{\" + i + \"\\\\}\", 'g');\r\n result = result.replace(reg, params[i]);\r\n }\r\n return result;\r\n}\r\nvar zeros = [\r\n \"0\",\r\n \"00\",\r\n \"000\",\r\n \"0000\",\r\n \"00000\",\r\n \"000000\",\r\n \"0000000\",\r\n \"00000000\",\r\n \"000000000\",\r\n \"0000000000\"\r\n];\r\nexport function supplement(value, count) {\r\n var index = count - value.toString().length - 1;\r\n if (index < 0) {\r\n return value.toString();\r\n }\r\n return zeros[index] + value;\r\n}\r\n//# sourceMappingURL=utils.js.map"}
{"map":"{\"version\":3,\"file\":\"LocalStorage.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/LocalStorage.ts\"],\"names\":[],\"mappings\":\"AAIA;IAGC,sBAAY,EAAU;QACrB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,CAAC;IAED,8BAAO,GAAP,UAAQ,GAAW,EAAE,MAAqB;QAArB,uBAAA,EAAA,aAAqB;QACzC,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;IAC7E,CAAC;IAED,8BAAO,GAAP,UAAQ,GAAW,EAAE,MAAqB;QAArB,uBAAA,EAAA,aAAqB;QACzC,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,8BAAO,GAAP,UAAQ,GAAW,EAAE,KAAa,EAAE,MAAqB;QAArB,uBAAA,EAAA,aAAqB;QACxD,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;IAED,iCAAU,GAAV,UAAW,GAAW,EAAE,UAAsB,EAAE,MAAqB;QAA7C,2BAAA,EAAA,iBAAsB;QAAE,uBAAA,EAAA,aAAqB;QACpE,IAAI,MAAW,CAAC;QAChB,IAAI;YACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;SAC/C;QAAC,OAAO,CAAC,EAAE;SAEX;QACD,IAAI,CAAC,MAAM,EAAE;YACZ,MAAM,GAAG,UAAU,CAAC;SACpB;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED,iCAAU,GAAV,UAAW,GAAW,EAAE,OAAY,EAAE,MAAqB;QAArB,uBAAA,EAAA,aAAqB;QAC1D,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;IACF,mBAAC;AAAD,CAAC,AAnCD,IAmCC\"}","code":"var LocalStorage = (function () {\r\n function LocalStorage(ID) {\r\n this.ID = ID;\r\n }\r\n LocalStorage.prototype.getName = function (key, prefix) {\r\n if (prefix === void 0) { prefix = null; }\r\n return (prefix || !this.ID || this.ID == '' ? prefix : this.ID) + '_' + key;\r\n };\r\n LocalStorage.prototype.getItem = function (key, prefix) {\r\n if (prefix === void 0) { prefix = null; }\r\n return localStorage.getItem(this.getName(key, prefix));\r\n };\r\n LocalStorage.prototype.setItem = function (key, value, prefix) {\r\n if (prefix === void 0) { prefix = null; }\r\n localStorage.setItem(this.getName(key, prefix), value);\r\n };\r\n LocalStorage.prototype.getItemObj = function (key, defaultObj, prefix) {\r\n if (defaultObj === void 0) { defaultObj = null; }\r\n if (prefix === void 0) { prefix = null; }\r\n var result;\r\n try {\r\n result = JSON.parse(this.getItem(key, prefix));\r\n }\r\n catch (e) {\r\n }\r\n if (!result) {\r\n result = defaultObj;\r\n }\r\n return result;\r\n };\r\n LocalStorage.prototype.setItemObj = function (key, itemObj, prefix) {\r\n if (prefix === void 0) { prefix = null; }\r\n this.setItem(key, JSON.stringify(itemObj), prefix);\r\n };\r\n return LocalStorage;\r\n}());\r\nexport default LocalStorage;\r\n//# sourceMappingURL=LocalStorage.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/editor/index.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,YAAY,EAAE,UAAU,GAAG,MAAM,eAAe,CAA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AAoB;oBAElC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;oBAC1B,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;oBAChC,WAAO,KAAK,EAAC;;;;CACb;AAUD,MAAM,UAAgB,UAAU,CAAC,GAAG,EAAE,IAAK,EAAE,KAAY,EAAE,MAAO;IAArB,sBAAA,EAAA,YAAY;;;;;wBAC7C,WAAM,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,EAAA;;oBAAxC,IAAI,GAAG,SAAiC;oBAC5C,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;oBAC1B,WAAO,IAAI,EAAC;;;;CACZ;AAED,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { destroyScene, setupScene, } from \"./interpreter\";\r\nimport { addLoader, cacheRes, destroyRes, getAllResUuids, loadJson5 } from \"../assets-manager\";\r\nimport { getRoot, pause, Scene, start } from \"../core\";\r\nexport * from './interpreter';\r\nvar currentScene;\r\nvar resUUIDs;\r\nexport function launchScene(name, progress) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var scene;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadScene(\"scenes/\" + name + \".scene\", 'scene_' + name)];\r\n case 1:\r\n scene = _a.sent();\r\n resUUIDs = getAllResUuids();\r\n return [4, scene.loadResGroup('preload', progress)];\r\n case 2:\r\n _a.sent();\r\n if (currentScene) {\r\n unmountScene(currentScene);\r\n }\r\n currentScene = scene;\r\n mountScene(scene);\r\n scene.loadResGroup('delay', progress);\r\n return [2];\r\n }\r\n });\r\n });\r\n}\r\nexport function mountScene(scene) {\r\n pause();\r\n setupScene(scene, getRoot());\r\n start();\r\n}\r\nexport function unmountScene(scene) {\r\n pause();\r\n destroyScene(scene);\r\n destroyRes(resUUIDs);\r\n}\r\nfunction loadScene(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = false; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var sceneConfig, scene;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadJson5(url)];\r\n case 1:\r\n sceneConfig = _a.sent();\r\n scene = new Scene();\r\n scene.initByConfig(sceneConfig);\r\n return [2, scene];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadPrefab(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var data;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadJson5(url, uuid, false)];\r\n case 1:\r\n data = _a.sent();\r\n cacheRes(data, url, uuid);\r\n return [2, data];\r\n }\r\n });\r\n });\r\n}\r\naddLoader('.pfb', loadPrefab);\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"ObjectPool.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/ObjectPool.ts\"],\"names\":[],\"mappings\":\";AAMA,IAAI,GAAG,GAAG,EAAE,CAAC;AAEb,SAAS,QAAQ,CAAC,IAAI;IACrB,IAAI,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;IACtB,IAAG,CAAC,KAAK,EAAC;QACT,MAAM,IAAI,KAAK,CAAC,QAAQ,GAAG,IAAI,GAAG,kBAAkB,CAAC,CAAC;KACtD;IAED,OAAO,KAAK,CAAC;AACd,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ;IAC/C,GAAG,CAAC,IAAI,CAAC,GAAG,EAAC,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,QAAQ,UAAA,EAAE,IAAI,EAAE,EAAE,EAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,IAAI;IAAE,gBAAS;SAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;QAAT,+BAAS;;IAClC,IAAI,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEtB,IAAA,uBAAO,EAAE,yBAAQ,EAAE,iBAAI,CAAU;IAEtC,IAAI,QAAQ,CAAC;IACb,IAAG,IAAI,CAAC,MAAM,IAAI,CAAC,EAAC;QACnB,QAAQ,GAAG,OAAO,EAAE,CAAC;KACrB;SAAI;QACJ,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;KACtB;IAED,QAAQ,iCAAC,QAAQ,GAAK,MAAM,GAAE;IAE9B,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAI,EAAE,QAAQ;IACrC,IAAI,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE3B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC3B,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nvar all = {};\r\nfunction getGroup(name) {\r\n var group = all[name];\r\n if (!group) {\r\n throw new Error('group ' + name + ' not registered.');\r\n }\r\n return group;\r\n}\r\nexport function register(name, newFunc, initFunc) {\r\n all[name] = { name: name, newFunc: newFunc, initFunc: initFunc, pool: [] };\r\n}\r\nexport function get(name) {\r\n var params = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n params[_i - 1] = arguments[_i];\r\n }\r\n var group = getGroup(name);\r\n var newFunc = group.newFunc, initFunc = group.initFunc, pool = group.pool;\r\n var instance;\r\n if (pool.length == 0) {\r\n instance = newFunc();\r\n }\r\n else {\r\n instance = pool.pop();\r\n }\r\n initFunc.apply(void 0, tslib_1.__spread([instance], params));\r\n return instance;\r\n}\r\nexport function recycle(name, instance) {\r\n var group = getGroup(name);\r\n group.pool.push(instance);\r\n}\r\n//# sourceMappingURL=ObjectPool.js.map"}
{"map":"{\"version\":3,\"file\":\"HashObject.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/HashObject.ts\"],\"names\":[],\"mappings\":\"AAIA,IAAI,aAAa,GAAG,CAAC,CAAC;AAEtB,SAAS,WAAW;IACnB,OAAO,EAAE,aAAa,CAAC;AACxB,CAAC;AAKD;IAGC;QACC,IAAI,CAAC,SAAS,GAAG,WAAW,EAAE,CAAC;IAChC,CAAC;IAED,sBAAI,gCAAQ;aAAZ;YACC,OAAO,IAAI,CAAC,SAAS,CAAC;QACvB,CAAC;;;OAAA;IACF,iBAAC;AAAD,CAAC,AAVD,IAUC\"}","code":"var HASH_CODE_INK = 0;\r\nfunction getHashCode() {\r\n return ++HASH_CODE_INK;\r\n}\r\nvar HashObject = (function () {\r\n function HashObject() {\r\n this._hashCode = getHashCode();\r\n }\r\n Object.defineProperty(HashObject.prototype, \"hashCode\", {\r\n get: function () {\r\n return this._hashCode;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return HashObject;\r\n}());\r\nexport default HashObject;\r\n//# sourceMappingURL=HashObject.js.map"}
{"map":"{\"version\":3,\"file\":\"Transform.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/base/Transform.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAC,MAAM,QAAQ,CAAC;AACrE,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAErC,IAAA,kDAAkB,EAAE,gDAAiB,CAAe;AAO3D,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACvB,+DAAY,CAAA;IACZ,+DAAY,CAAA;AACb,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAMD;IAAuC,qCAAe;IAAtD;QAAA,qEA2LC;QA1LA,sBAAgB,GAAG,UAAC,KAAK,EAAE,GAAG,EAAE,QAAQ;YACvC,KAAI,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;QACtC,CAAC,CAAC;QAM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eAAe,CAAC,SAAS,EAAE,CAAC,CAAC;aAClD;SACD;aAAI;YACJ,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC;SAC/B;QACD,kBAAkB,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QAC3C,kBAAkB,CAAC,SAAS,CAC3B,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,KAAK,EACnB,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,MAAM,CACpB,CAAC;IACH,CAAC;IAKD,6BAAS,GAAT,UAAU,SAAiB;QAAjB,0BAAA,EAAA,iBAAiB;QAC1B,OAAO,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC;IACjE,CAAC;IAED,4BAAQ,GAAR,UAAS,CAAC;QACT,IAAI,IAAI,CAAC,KAAK,EAAE;YACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACnB;QAED,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAE1B,iBAAM,QAAQ,YAAC,CAAC,CAAC,CAAC;IACnB,CAAC;IAjLD;QADC,iBAAiB;+CACmB;IAMrC;QADC,iBAAiB;4CACA;IAqBlB;QADC,iBAAiB;4CACmB;IAKrC;QADC,iBAAiB;4CACuB;IAEzC;QADC,kBAAkB;+CACN;IAgJd,gBAAC;CAAA,AA3LD,CAAuC,eAAe,GA2LrD;eA3LoB,SAAS\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent, Vector2D, Matrix, decorators } from \"scilla\";\r\nimport Renderer from \"../renderer/Renderer\";\r\nvar dirtyFieldDetector = decorators.dirtyFieldDetector, dirtyFieldTrigger = decorators.dirtyFieldTrigger;\r\nexport var MATRIX_ORDER;\r\n(function (MATRIX_ORDER) {\r\n MATRIX_ORDER[MATRIX_ORDER[\"SCALE_ROTATE\"] = 0] = \"SCALE_ROTATE\";\r\n MATRIX_ORDER[MATRIX_ORDER[\"ROTATE_SCALE\"] = 1] = \"ROTATE_SCALE\";\r\n})(MATRIX_ORDER || (MATRIX_ORDER = {}));\r\nvar Transform = (function (_super) {\r\n tslib_1.__extends(Transform, _super);\r\n function Transform() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.onVector2DModify = function (value, key, oldValue) {\r\n _this.makeDirty(value, key, oldValue);\r\n };\r\n _this.position = new Vector2D(0);\r\n _this.alpha = 1;\r\n _this._width = NaN;\r\n _this._height = NaN;\r\n _this.scale = new Vector2D(1, 1);\r\n _this.pivot = new Vector2D(0.5, 0.5);\r\n _this.rotation = 0;\r\n _this.order = MATRIX_ORDER.SCALE_ROTATE;\r\n _this._localMatrix = Matrix.create();\r\n _this._globalMatrix = Matrix.create();\r\n _this._globalPivotMatrix = Matrix.create();\r\n return _this;\r\n }\r\n Object.defineProperty(Transform.prototype, \"renderAlpha\", {\r\n get: function () {\r\n return this._renderAlpha;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Transform.prototype, \"width\", {\r\n get: function () {\r\n var renderer = this.entity.getComponent(Renderer);\r\n return renderer ? renderer.bounds.width : (isNaN(this._width) ? 0 : this._width);\r\n },\r\n set: function (value) {\r\n if (this._width != value) {\r\n this._width = value;\r\n this.makeDirty(value, 'width');\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Transform.prototype, \"explicitWidth\", {\r\n get: function () {\r\n return this._width;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Transform.prototype, \"height\", {\r\n get: function () {\r\n var renderer = this.entity.getComponent(Renderer);\r\n return renderer ? renderer.bounds.height : (isNaN(this._height) ? 0 : this._height);\r\n },\r\n set: function (value) {\r\n if (this._height != value) {\r\n this._height = value;\r\n this.makeDirty(value, 'height');\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Transform.prototype, \"explicitHeight\", {\r\n get: function () {\r\n return this._height;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Transform.prototype.makeDirty = function (value, key, oldValue) {\r\n var e_1, _a;\r\n this.dirty = true;\r\n switch (key) {\r\n case 'width':\r\n case 'height':\r\n var renderers = this.entity.getComponents(Renderer);\r\n try {\r\n for (var renderers_1 = tslib_1.__values(renderers), renderers_1_1 = renderers_1.next(); !renderers_1_1.done; renderers_1_1 = renderers_1.next()) {\r\n var renderer = renderers_1_1.value;\r\n renderer.makeDirty();\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (renderers_1_1 && !renderers_1_1.done && (_a = renderers_1.return)) _a.call(renderers_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n break;\r\n }\r\n };\r\n Transform.prototype.onModify = function (value, key, oldValue) {\r\n _super.prototype.onModify.call(this, value, key, oldValue);\r\n this.makeDirty(value, key, oldValue);\r\n switch (key) {\r\n case 'position':\r\n case 'scale':\r\n value.onChange = this.onVector2DModify;\r\n break;\r\n }\r\n };\r\n Transform.prototype.updateLocalMatrix = function () {\r\n var _a = this, _b = _a.position, x = _b.x, y = _b.y, _c = _a.scale, sx = _c.x, sy = _c.y, rotation = _a.rotation;\r\n var matrix = this._localMatrix;\r\n matrix.identity();\r\n if (this.order = MATRIX_ORDER.ROTATE_SCALE) {\r\n matrix.scale(sx, sy);\r\n matrix.rotate(rotation * Math.PI / 180);\r\n }\r\n else {\r\n matrix.rotate(rotation * Math.PI / 180);\r\n matrix.scale(sx, sy);\r\n }\r\n matrix.translate(x, y);\r\n };\r\n Transform.prototype.updateGlobalMatrix = function () {\r\n var _a = this, entity = _a.entity, _globalMatrix = _a._globalMatrix, _localMatrix = _a._localMatrix, _globalPivotMatrix = _a._globalPivotMatrix, _b = _a.pivot, px = _b.x, py = _b.y, width = _a.width, height = _a.height;\r\n _globalMatrix.copyFrom(_localMatrix);\r\n if (entity.parent) {\r\n var parentTransform = entity.parent.getComponent(Transform);\r\n if (parentTransform) {\r\n this._renderAlpha = parentTransform._renderAlpha * this.alpha;\r\n _globalMatrix.concat(parentTransform.getMatrix());\r\n }\r\n }\r\n else {\r\n this._renderAlpha = this.alpha;\r\n }\r\n _globalPivotMatrix.copyFrom(_globalMatrix);\r\n _globalPivotMatrix.translate(-(px - 0.5) * width, -(py - 0.5) * height);\r\n };\r\n Transform.prototype.getMatrix = function (withPivot) {\r\n if (withPivot === void 0) { withPivot = false; }\r\n return withPivot ? this._globalPivotMatrix : this._globalMatrix;\r\n };\r\n Transform.prototype.onUpdate = function (t) {\r\n if (this.dirty) {\r\n this.updateLocalMatrix();\r\n this.dirty = false;\r\n }\r\n this.updateGlobalMatrix();\r\n _super.prototype.onUpdate.call(this, t);\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Transform.prototype, \"position\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Transform.prototype, \"alpha\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Transform.prototype, \"scale\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Transform.prototype, \"pivot\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], Transform.prototype, \"rotation\", void 0);\r\n return Transform;\r\n}(ScillaComponent));\r\nexport default Transform;\r\n//# sourceMappingURL=Transform.js.map"}
{"map":"{\"version\":3,\"file\":\"MustCompile.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/generated/MustCompile.ts\"],\"names\":[],\"mappings\":\"AAKA,OAAO,EAAC,WAAW,EAAC,MAAM,QAAQ,CAAA;AAElC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,WAAW,CAAC,2BAA2B,EAAE,UAAU,CAAC,CAAC;AAErD,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAC3D,WAAW,CAAC,mCAAmC,EAAE,UAAU,CAAC,CAAC\"}","code":"import { registerDef } from 'scilla';\r\nimport component0 from 'components/base/Transform';\r\nregisterDef('components/base/Transform', component0);\r\nimport component1 from 'components/other/CameraController';\r\nregisterDef('components/other/CameraController', component1);\r\n//# sourceMappingURL=MustCompile.js.map"}
{"map":"{\"version\":3,\"file\":\"LaunchOptions.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/LaunchOptions.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EACN,KAAK,GACL,MAAM,QAAQ,CAAA;AAEf,IAAM,OAAO,GAAQ,EAAE,CAAC;AAExB,MAAM,UAAU,MAAM,CAAC,IAAI;IAC1B,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACjC,CAAC;AAED,eAAe,OAAO,CAAC\"}","code":"import { utils, } from 'scilla';\r\nvar options = {};\r\nexport function inject(data) {\r\n utils.injectProp(options, data);\r\n}\r\nexport default options;\r\n//# sourceMappingURL=LaunchOptions.js.map"}
{"map":"{\"version\":3,\"file\":\"Matrix.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/Matrix.ts\"],\"names\":[],\"mappings\":\"AAMA,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;AACjB,IAAI,KAAK,GAAG,EAAE,GAAG,CAAC,CAAC;AACnB,IAAI,UAAU,GAAG,EAAE,GAAG,GAAG,CAAC;AAE1B,IAAI,UAAU,GAAG,EAAE,CAAC;AAOpB;IAuCC,gBAAY,CAAK,EAAE,CAAK,EAAE,CAAK,EAAE,CAAK,EAAE,EAAM,EAAE,EAAM;QAA1C,kBAAA,EAAA,KAAK;QAAE,kBAAA,EAAA,KAAK;QAAE,kBAAA,EAAA,KAAK;QAAE,kBAAA,EAAA,KAAK;QAAE,mBAAA,EAAA,MAAM;QAAE,mBAAA,EAAA,MAAM;QACrD,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAC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AG,EAAE,CAAC;QACf,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IAChB,CAAC;IAEF,aAAC;AAAD,CAAC,AA3hBD,IA2hBC\"}","code":"var PI = Math.PI;\r\nvar TwoPI = PI * 2;\r\nvar DEG_TO_RAD = PI / 180;\r\nvar matrixPool = [];\r\nvar Matrix = (function () {\r\n function Matrix(a, b, c, d, tx, ty) {\r\n if (a === void 0) { a = 1; }\r\n if (b === void 0) { b = 0; }\r\n if (c === void 0) { c = 0; }\r\n if (d === void 0) { d = 1; }\r\n if (tx === void 0) { tx = 0; }\r\n if (ty === void 0) { ty = 0; }\r\n this.a = a;\r\n this.b = b;\r\n this.c = c;\r\n this.d = d;\r\n this.tx = tx;\r\n this.ty = ty;\r\n }\r\n Matrix.release = function (matrix) {\r\n if (!matrix) {\r\n return;\r\n }\r\n matrixPool.push(matrix);\r\n };\r\n Matrix.create = function () {\r\n var matrix = matrixPool.pop();\r\n if (!matrix) {\r\n matrix = new Matrix();\r\n }\r\n return matrix;\r\n };\r\n Matrix.prototype.clone = function () {\r\n var m = Matrix.create();\r\n m.setTo(this.a, this.b, this.c, this.d, this.tx, this.ty);\r\n return m;\r\n };\r\n Matrix.prototype.concat = function (other) {\r\n var a = this.a * other.a;\r\n var b = 0.0;\r\n var c = 0.0;\r\n var d = this.d * other.d;\r\n var tx = this.tx * other.a + other.tx;\r\n var ty = this.ty * other.d + other.ty;\r\n if (this.b !== 0.0 || this.c !== 0.0 || other.b !== 0.0 || other.c !== 0.0) {\r\n a += this.b * other.c;\r\n d += this.c * other.b;\r\n b += this.a * other.b + this.b * other.d;\r\n c += this.c * other.a + this.d * other.c;\r\n tx += this.ty * other.c;\r\n ty += this.tx * other.b;\r\n }\r\n this.a = a;\r\n this.b = b;\r\n this.c = c;\r\n this.d = d;\r\n this.tx = tx;\r\n this.ty = ty;\r\n };\r\n Matrix.prototype.copyFrom = function (other) {\r\n this.a = other.a;\r\n this.b = other.b;\r\n this.c = other.c;\r\n this.d = other.d;\r\n this.tx = other.tx;\r\n this.ty = other.ty;\r\n return this;\r\n };\r\n Matrix.prototype.identity = function () {\r\n this.a = this.d = 1;\r\n this.b = this.c = this.tx = this.ty = 0;\r\n };\r\n Matrix.prototype.invert = function () {\r\n this.$invertInto(this);\r\n };\r\n Matrix.prototype.$invertInto = function (target) {\r\n var a = this.a;\r\n var b = this.b;\r\n var c = this.c;\r\n var d = this.d;\r\n var tx = this.tx;\r\n var ty = this.ty;\r\n if (b == 0 && c == 0) {\r\n target.b = target.c = 0;\r\n if (a == 0 || d == 0) {\r\n target.a = target.d = target.tx = target.ty = 0;\r\n }\r\n else {\r\n a = target.a = 1 / a;\r\n d = target.d = 1 / d;\r\n target.tx = -a * tx;\r\n target.ty = -d * ty;\r\n }\r\n return;\r\n }\r\n var determinant = a * d - b * c;\r\n if (determinant == 0) {\r\n target.identity();\r\n return;\r\n }\r\n determinant = 1 / determinant;\r\n var k = target.a = d * determinant;\r\n b = target.b = -b * determinant;\r\n c = target.c = -c * determinant;\r\n d = target.d = a * determinant;\r\n target.tx = -(k * tx + c * ty);\r\n target.ty = -(b * tx + d * ty);\r\n };\r\n Matrix.prototype.rotate = function (radian) {\r\n radian = +radian;\r\n if (radian !== 0) {\r\n var u = Math.cos(radian);\r\n var v = Math.sin(radian);\r\n var _a = this, a = _a.a, b = _a.b, c = _a.c, d = _a.d, tx = _a.tx, ty = _a.ty;\r\n this.a = a * u - b * v;\r\n this.b = a * v + b * u;\r\n this.c = c * u - d * v;\r\n this.d = c * v + d * u;\r\n this.tx = tx * u - ty * v;\r\n this.ty = tx * v + ty * u;\r\n }\r\n };\r\n Matrix.prototype.scale = function (sx, sy) {\r\n if (sx !== 1) {\r\n this.a *= sx;\r\n this.c *= sx;\r\n this.tx *= sx;\r\n }\r\n if (sy !== 1) {\r\n this.b *= sy;\r\n this.d *= sy;\r\n this.ty *= sy;\r\n }\r\n };\r\n Matrix.prototype.setTo = function (a, b, c, d, tx, ty) {\r\n this.a = a;\r\n this.b = b;\r\n this.c = c;\r\n this.d = d;\r\n this.tx = tx;\r\n this.ty = ty;\r\n return this;\r\n };\r\n Matrix.prototype.transformPoint = function (pointX, pointY, resultPoint) {\r\n var _a = this, a = _a.a, b = _a.b, c = _a.c, d = _a.d, tx = _a.tx, ty = _a.ty;\r\n var x = a * pointX + c * pointY + tx;\r\n var y = b * pointX + d * pointY + ty;\r\n if (resultPoint) {\r\n resultPoint.x = x;\r\n resultPoint.y = y;\r\n return resultPoint;\r\n }\r\n return { x: x, y: y };\r\n };\r\n Matrix.prototype.deltaTransformPoint = function (pointX, pointY, resultPoint) {\r\n var _a = this, a = _a.a, b = _a.b, c = _a.c, d = _a.d;\r\n var x = a * pointX + c * pointY;\r\n var y = b * pointX + d * pointY;\r\n if (resultPoint) {\r\n resultPoint.x = x;\r\n resultPoint.y = y;\r\n return resultPoint;\r\n }\r\n return { x: x, y: y };\r\n };\r\n Matrix.prototype.translate = function (dx, dy) {\r\n this.tx += dx;\r\n this.ty += dy;\r\n };\r\n Matrix.prototype.equals = function (other) {\r\n return this.a == other.a && this.b == other.b &&\r\n this.c == other.c && this.d == other.d &&\r\n this.tx == other.tx && this.ty == other.ty;\r\n };\r\n Matrix.prototype.prepend = function (a, b, c, d, tx, ty) {\r\n var tx1 = this.tx;\r\n if (a != 1 || b != 0 || c != 0 || d != 1) {\r\n var a1 = this.a;\r\n var c1 = this.c;\r\n this.a = a1 * a + this.b * c;\r\n this.b = a1 * b + this.b * d;\r\n this.c = c1 * a + this.d * c;\r\n this.d = c1 * b + this.d * d;\r\n }\r\n this.tx = tx1 * a + this.ty * c + tx;\r\n this.ty = tx1 * b + this.ty * d + ty;\r\n return this;\r\n };\r\n Matrix.prototype.append = function (a, b, c, d, tx, ty) {\r\n var a1 = this.a;\r\n var b1 = this.b;\r\n var c1 = this.c;\r\n var d1 = this.d;\r\n if (a != 1 || b != 0 || c != 0 || d != 1) {\r\n this.a = a * a1 + b * c1;\r\n this.b = a * b1 + b * d1;\r\n this.c = c * a1 + d * c1;\r\n this.d = c * b1 + d * d1;\r\n }\r\n this.tx = tx * a1 + ty * c1 + this.tx;\r\n this.ty = tx * b1 + ty * d1 + this.ty;\r\n return this;\r\n };\r\n Matrix.prototype.toString = function () {\r\n return \"(a=\" + this.a + \", b=\" + this.b + \", c=\" + this.c + \", d=\" + this.d + \", tx=\" + this.tx + \", ty=\" + this.ty + \")\";\r\n };\r\n Matrix.prototype.createBox = function (scaleX, scaleY, rotation, tx, ty) {\r\n if (rotation === void 0) { rotation = 0; }\r\n if (tx === void 0) { tx = 0; }\r\n if (ty === void 0) { ty = 0; }\r\n var self = this;\r\n if (rotation !== 0) {\r\n rotation = rotation / DEG_TO_RAD;\r\n var u = Math.cos(rotation);\r\n var v = Math.sin(rotation);\r\n self.a = u * scaleX;\r\n self.b = v * scaleY;\r\n self.c = -v * scaleX;\r\n self.d = u * scaleY;\r\n }\r\n else {\r\n self.a = scaleX;\r\n self.b = 0;\r\n self.c = 0;\r\n self.d = scaleY;\r\n }\r\n self.tx = tx;\r\n self.ty = ty;\r\n };\r\n Matrix.prototype.createGradientBox = function (width, height, rotation, tx, ty) {\r\n if (rotation === void 0) { rotation = 0; }\r\n if (tx === void 0) { tx = 0; }\r\n if (ty === void 0) { ty = 0; }\r\n this.createBox(width / 1638.4, height / 1638.4, rotation, tx + width / 2, ty + height / 2);\r\n };\r\n Matrix.prototype.$transformBounds = function (bounds) {\r\n var a = this.a;\r\n var b = this.b;\r\n var c = this.c;\r\n var d = this.d;\r\n var tx = this.tx;\r\n var ty = this.ty;\r\n var x = bounds.x;\r\n var y = bounds.y;\r\n var xMax = x + bounds.width;\r\n var yMax = y + bounds.height;\r\n var x0 = a * x + c * y + tx;\r\n var y0 = b * x + d * y + ty;\r\n var x1 = a * xMax + c * y + tx;\r\n var y1 = b * xMax + d * y + ty;\r\n var x2 = a * xMax + c * yMax + tx;\r\n var y2 = b * xMax + d * yMax + ty;\r\n var x3 = a * x + c * yMax + tx;\r\n var y3 = b * x + d * yMax + ty;\r\n var tmp = 0;\r\n if (x0 > x1) {\r\n tmp = x0;\r\n x0 = x1;\r\n x1 = tmp;\r\n }\r\n if (x2 > x3) {\r\n tmp = x2;\r\n x2 = x3;\r\n x3 = tmp;\r\n }\r\n bounds.x = Math.floor(x0 < x2 ? x0 : x2);\r\n bounds.width = Math.ceil((x1 > x3 ? x1 : x3) - bounds.x);\r\n if (y0 > y1) {\r\n tmp = y0;\r\n y0 = y1;\r\n y1 = tmp;\r\n }\r\n if (y2 > y3) {\r\n tmp = y2;\r\n y2 = y3;\r\n y3 = tmp;\r\n }\r\n bounds.y = Math.floor(y0 < y2 ? y0 : y2);\r\n bounds.height = Math.ceil((y1 > y3 ? y1 : y3) - bounds.y);\r\n };\r\n Matrix.prototype.getDeterminant = function () {\r\n return this.a * this.d - this.b * this.c;\r\n };\r\n Matrix.prototype.$getScaleX = function () {\r\n var m = this;\r\n if (m.b == 0) {\r\n return m.a;\r\n }\r\n var result = Math.sqrt(m.a * m.a + m.b * m.b);\r\n return this.getDeterminant() < 0 ? -result : result;\r\n };\r\n Matrix.prototype.$getScaleY = function () {\r\n var m = this;\r\n if (m.c == 0) {\r\n return m.d;\r\n }\r\n var result = Math.sqrt(m.c * m.c + m.d * m.d);\r\n return this.getDeterminant() < 0 ? -result : result;\r\n };\r\n Matrix.prototype.$getSkewX = function () {\r\n if (this.d < 0) {\r\n return Math.atan2(this.d, this.c) + (PI / 2);\r\n }\r\n else {\r\n return Math.atan2(this.d, this.c) - (PI / 2);\r\n }\r\n };\r\n Matrix.prototype.$getSkewY = function () {\r\n if (this.a < 0) {\r\n return Math.atan2(this.b, this.a) - PI;\r\n }\r\n else {\r\n return Math.atan2(this.b, this.a);\r\n }\r\n };\r\n Matrix.prototype.$updateScaleAndRotation = function (scaleX, scaleY, skewX, skewY) {\r\n if ((skewX == 0 || skewX == TwoPI) && (skewY == 0 || skewY == TwoPI)) {\r\n this.a = scaleX;\r\n this.b = this.c = 0;\r\n this.d = scaleY;\r\n return;\r\n }\r\n skewX = skewX / DEG_TO_RAD;\r\n skewY = skewY / DEG_TO_RAD;\r\n var u = Math.cos(skewX);\r\n var v = Math.sin(skewX);\r\n if (skewX == skewY) {\r\n this.a = u * scaleX;\r\n this.b = v * scaleX;\r\n }\r\n else {\r\n this.a = Math.cos(skewY) * scaleX;\r\n this.b = Math.sin(skewY) * scaleX;\r\n }\r\n this.c = -v * scaleY;\r\n this.d = u * scaleY;\r\n };\r\n Matrix.prototype.$preMultiplyInto = function (other, target) {\r\n var a = other.a * this.a;\r\n var b = 0.0;\r\n var c = 0.0;\r\n var d = other.d * this.d;\r\n var tx = other.tx * this.a + this.tx;\r\n var ty = other.ty * this.d + this.ty;\r\n if (other.b !== 0.0 || other.c !== 0.0 || this.b !== 0.0 || this.c !== 0.0) {\r\n a += other.b * this.c;\r\n d += other.c * this.b;\r\n b += other.a * this.b + other.b * this.d;\r\n c += other.c * this.a + other.d * this.c;\r\n tx += other.ty * this.c;\r\n ty += other.tx * this.b;\r\n }\r\n target.a = a;\r\n target.b = b;\r\n target.c = c;\r\n target.d = d;\r\n target.tx = tx;\r\n target.ty = ty;\r\n };\r\n return Matrix;\r\n}());\r\nexport default Matrix;\r\n//# sourceMappingURL=Matrix.js.map"}
{"map":"{\"version\":3,\"file\":\"Vector2D.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/Vector2D.ts\"],\"names\":[],\"mappings\":\"AAKA,OAAO,EAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEpD,IAAM,IAAI,GAAG,UAAU,CAAC;AACxB,QAAQ,CAAC,IAAI,EAAE;IACd,OAAO,IAAI,QAAQ,EAAE,CAAC;AACvB,CAAC,EAAE,UAAS,QAAkB,EAAE,CAAC,EAAE,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAOH,MAAM,U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AAI,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;aAPD,UAAW,KAAK;YACf,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;YACpB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;QACtD,CAAC;;;OAAA;IAMD,sBAAI,8BAAQ;aAAZ;YACC,OAAO,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QAC1C,CAAC;;;OAAA;IAED,sBAAI,2BAAK;aAAT;YACC,OAAO,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QACxB,CAAC;;;OAAA;IAED,2BAAQ,GAAR;QACC,OAAO,eAAe,GAAG,IAAI,CAAC,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;IAC1D,CAAC;IAEM,eAAM,GAAb,UAAc,EAAE,EAAE,EAAE;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5D,CAAC;IACF,eAAC;AAAD,CAAC,AAtLD,IAsLC;;AAED,IAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC\"}","code":"import { get, recycle, register } from \"./ObjectPool\";\r\nvar name = 'Vector2D';\r\nregister(name, function () {\r\n return new Vector2D();\r\n}, function (instance, x, y) {\r\n instance.setXY(x, y);\r\n});\r\nexport function createVector2D(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n return get(name, x, y);\r\n}\r\nexport function releaseVector2D(target) {\r\n recycle(name, target);\r\n}\r\nvar Vector2D = (function () {\r\n function Vector2D(x, y, onChange) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.onChange = onChange;\r\n this._x = 0;\r\n this._y = 0;\r\n this.setXY(x, y);\r\n }\r\n Object.defineProperty(Vector2D, \"zero\", {\r\n get: function () {\r\n return zero;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Vector2D.prototype, \"x\", {\r\n get: function () {\r\n return this._x;\r\n },\r\n set: function (v) {\r\n if (this._x !== v) {\r\n var old = this._x;\r\n this._x = v;\r\n this.onChange && this.onChange(v, 'x', old);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Vector2D.prototype, \"y\", {\r\n get: function () {\r\n return this._y;\r\n },\r\n set: function (v) {\r\n if (this._y !== v) {\r\n var old = this._y;\r\n this._y = v;\r\n this.onChange && this.onChange(v, 'y', old);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Vector2D.prototype.setXY = function (x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2D.prototype.copyFrom = function (v2) {\r\n this.x = v2.x;\r\n this.y = v2.y;\r\n return this;\r\n };\r\n Vector2D.prototype.clone = function () {\r\n return new Vector2D(this.x, this.y);\r\n };\r\n Vector2D.prototype.zero = function () {\r\n this.x = 0;\r\n this.y = 0;\r\n return this;\r\n };\r\n Object.defineProperty(Vector2D.prototype, \"isZero\", {\r\n get: function () {\r\n return this.x == 0 && this.y == 0;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Vector2D.prototype.normalize = function () {\r\n var len = this.length;\r\n if (len == 0) {\r\n this.x = 1;\r\n return this;\r\n }\r\n this.x /= len;\r\n this.y /= len;\r\n return this;\r\n };\r\n Object.defineProperty(Vector2D.prototype, \"isNormalized\", {\r\n get: function () {\r\n return this.length == 1.0;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Vector2D.prototype.truncate = function (max) {\r\n this.length = Math.min(max, this.length);\r\n return this;\r\n };\r\n Vector2D.prototype.reverse = function () {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n return this;\r\n };\r\n Vector2D.prototype.dotProd = function (v2) {\r\n return this.x * v2.x + this.y * v2.y;\r\n };\r\n Vector2D.prototype.crossProd = function (v2) {\r\n return this.x * v2.y - this.y * v2.x;\r\n };\r\n Vector2D.prototype.distSQ = function (v2) {\r\n var dx = v2.x - this.x;\r\n var dy = v2.y - this.y;\r\n return dx * dx + dy * dy;\r\n };\r\n Vector2D.prototype.distance = function (v2) {\r\n return Math.sqrt(this.distSQ(v2));\r\n };\r\n Vector2D.prototype.add = function (v2) {\r\n this.x += v2.x;\r\n this.y += v2.y;\r\n return this;\r\n };\r\n Vector2D.prototype.subtract = function (v2) {\r\n this.x -= v2.x;\r\n this.y -= v2.y;\r\n return this;\r\n };\r\n Vector2D.prototype.multiply = function (value) {\r\n this.x *= value;\r\n this.y *= value;\r\n return this;\r\n };\r\n Vector2D.prototype.divide = function (value) {\r\n this.x /= value;\r\n this.y /= value;\r\n return this;\r\n };\r\n Object.defineProperty(Vector2D.prototype, \"angle\", {\r\n get: function () {\r\n return this.radian * 180 / Math.PI;\r\n },\r\n set: function (value) {\r\n this.radian = value * Math.PI / 180;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Vector2D.prototype, \"radian\", {\r\n get: function () {\r\n return Math.atan2(this.y, this.x);\r\n },\r\n set: function (value) {\r\n var len = this.length;\r\n this.setXY(Math.cos(value) * len, Math.sin(value) * len);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Vector2D.prototype.equals = function (v2) {\r\n return this.x == v2.x && this.y == v2.y;\r\n };\r\n Object.defineProperty(Vector2D.prototype, \"length\", {\r\n get: function () {\r\n return Math.sqrt(this.lengthSQ);\r\n },\r\n set: function (value) {\r\n var a = this.radian;\r\n this.setXY(Math.cos(a) * value, Math.sin(a) * value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Vector2D.prototype, \"lengthSQ\", {\r\n get: function () {\r\n return this.x * this.x + this.y * this.y;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Vector2D.prototype, \"slope\", {\r\n get: function () {\r\n return this.y / this.x;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Vector2D.prototype.toString = function () {\r\n return \"[Vector2D (x:\" + this.x + \", y:\" + this.y + \")]\";\r\n };\r\n Vector2D.corner = function (v1, v2) {\r\n return Math.acos(v1.dotProd(v2) / (v1.length * v2.length));\r\n };\r\n return Vector2D;\r\n}());\r\nexport default Vector2D;\r\nvar zero = new Vector2D();\r\n//# sourceMappingURL=Vector2D.js.map"}
{"map":"{\"version\":3,\"file\":\"ScillaEvent.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/ScillaEvent.ts\"],\"names\":[],\"mappings\":\";AAQA;IAGC;QACC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;IACxB,CAAC;IAEO,kCAAY,GAApB,UAAqB,QAAQ;QACrB,IAAA,gCAAY,CAAS;QAE5B,IAAI,MAAM,CAAC;QACX,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;YACtD,IAAM,UAAU,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAEnC,IAAI,UAAU,CAAC,QAAQ,IAAI,QAAQ,EAAE;gBACpC,MAAM,GAAG;oBACR,UAAU,YAAA;oBACV,KAAK,EAAE,CAAC;iBACR,CAAC;gBACF,MAAM;aACN;SACD;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IASD,iCAAW,GAAX,UAAY,QAAQ,EAAE,OAAQ,EAAE,QAAY;QAAZ,yBAAA,EAAA,YAAY;QAAE,gBAAS;aAAT,U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IACtC,CAAC;IAMD,4BAAM,GAAN;QAAO,mBAAY;aAAZ,UAAY,EAAZ,qBAAY,EAAZ,IAAY;YAAZ,8BAAY;;;QACX,IAAA,gCAAY,CAAS;QAG5B,YAAY,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;QAChC,CAAC,CAAC,CAAC;;YAEH,KAAyB,IAAA,iBAAA,iBAAA,YAAY,CAAA,0CAAA,oEAAE;gBAAlC,IAAM,UAAU,yBAAA;gBACpB,IAAG,UAAU,EAAC;oBACN,IAAA,8BAAQ,EAAE,4BAAO,EAAE,sBAAI,EAAE,0BAAM,CAAc;oBACpD,IAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;oBAE3C,IAAI;wBACH,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;qBACnC;oBAAA,OAAO,CAAC,EAAE;wBACV,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;qBACf;oBAED,IAAG,IAAI,EAAC;wBACP,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;qBAC9B;iBACD;aACD;;;;;;;;;IACF,CAAC;IACF,kBAAC;AAAD,CAAC,AAnID,IAmIC\"}","code":"import * as tslib_1 from \"tslib\";\r\nvar ScillaEvent = (function () {\r\n function ScillaEvent() {\r\n this._subscribers = [];\r\n }\r\n ScillaEvent.prototype.findListener = function (callback) {\r\n var _subscribers = this._subscribers;\r\n var result;\r\n for (var i = 0, li = _subscribers.length; i < li; i++) {\r\n var subscriber = _subscribers[i];\r\n if (subscriber.callback == callback) {\r\n result = {\r\n subscriber: subscriber,\r\n index: i,\r\n };\r\n break;\r\n }\r\n }\r\n return result;\r\n };\r\n ScillaEvent.prototype.addListener = function (callback, thisObj, priority) {\r\n if (priority === void 0) { priority = 0; }\r\n var params = [];\r\n for (var _i = 3; _i < arguments.length; _i++) {\r\n params[_i - 3] = arguments[_i];\r\n }\r\n if (!callback) {\r\n return;\r\n }\r\n var _subscribers = this._subscribers;\r\n var listener = this.findListener(callback);\r\n if (!listener) {\r\n _subscribers.push({\r\n callback: callback,\r\n thisObj: thisObj,\r\n priority: priority,\r\n params: params,\r\n });\r\n }\r\n };\r\n ScillaEvent.prototype.once = function (callback, thisObj, priority) {\r\n if (priority === void 0) { priority = 0; }\r\n var params = [];\r\n for (var _i = 3; _i < arguments.length; _i++) {\r\n params[_i - 3] = arguments[_i];\r\n }\r\n if (!callback) {\r\n return;\r\n }\r\n var _subscribers = this._subscribers;\r\n var listener = this.findListener(callback);\r\n if (!listener) {\r\n _subscribers.push({\r\n callback: callback,\r\n thisObj: thisObj,\r\n priority: priority,\r\n params: params,\r\n once: true,\r\n });\r\n }\r\n };\r\n ScillaEvent.prototype.removeListener = function (callback) {\r\n if (!callback) {\r\n return;\r\n }\r\n var _subscribers = this._subscribers;\r\n var listener = this.findListener(callback);\r\n if (listener) {\r\n _subscribers.splice(listener.index, 1);\r\n }\r\n };\r\n ScillaEvent.prototype.hasListener = function (callback) {\r\n return !!this.findListener(callback);\r\n };\r\n ScillaEvent.prototype.invoke = function () {\r\n var paramsNew = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n paramsNew[_i] = arguments[_i];\r\n }\r\n var e_1, _a;\r\n var _subscribers = this._subscribers;\r\n _subscribers.sort(function (a, b) {\r\n return a.priority - b.priority;\r\n });\r\n try {\r\n for (var _subscribers_1 = tslib_1.__values(_subscribers), _subscribers_1_1 = _subscribers_1.next(); !_subscribers_1_1.done; _subscribers_1_1 = _subscribers_1.next()) {\r\n var subscriber = _subscribers_1_1.value;\r\n if (subscriber) {\r\n var callback = subscriber.callback, thisObj = subscriber.thisObj, once = subscriber.once, params = subscriber.params;\r\n var allParams = params.concat(paramsNew);\r\n try {\r\n callback.apply(thisObj, allParams);\r\n }\r\n catch (e) {\r\n console.log(e);\r\n }\r\n if (once) {\r\n this.removeListener(callback);\r\n }\r\n }\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_subscribers_1_1 && !_subscribers_1_1.done && (_a = _subscribers_1.return)) _a.call(_subscribers_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n };\r\n return ScillaEvent;\r\n}());\r\nexport { ScillaEvent };\r\n//# sourceMappingURL=ScillaEvent.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/index.ts\"],\"names\":[],\"mappings\":\"AAMA,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAC,MAAM,YAAY,CAAA;AAC/E,OAAO,EAAC,WAAW,EAAE,KAAK,EAAC,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,QAAQ,CAAA;AAEtC,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AAErC,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC\"}","code":"export { default as Bounds } from './Bounds';\r\nexport { default as Vector2D, createVector2D, releaseVector2D } from './Vector2D';\r\nexport { createTween, Tween } from './Tween';\r\nexport { default as Matrix } from './Matrix';\r\nexport { default as Size } from './Size';\r\nexport { default as LocalStorage } from './LocalStorage';\r\nexport { TextStyle } from './TextStyle';\r\nexport { default as EventEmitter } from './EventEmitter';\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"Texture.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla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GAAZ,UAAa,OAAO,EAAE,EAAM,EAAE,EAAM,EAAE,EAAG,EAAE,EAAG,EAAE,EAAG,EAAE,EAAG;QAAlC,mBAAA,EAAA,MAAM;QAAE,mBAAA,EAAA,MAAM;QAC7B,IAAA,gBAAmC,EAAlC,QAAC,EAAE,QAAC,EAAE,gBAAK,EAAE,kBAAqB,CAAC;QAC1C,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,KAAK,EAAE,EAAE,IAAI,MAAM,CAAC,CAAC;IACjG,CAAC;IAKD,yBAAO,GAAP;QACC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAEnB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC3B,CAAC;IAKD,oCAAkB,GAAlB;QACC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC1B,CAAC;IACF,cAAC;AAAD,CAAC,AA7FD,CAAqC,UAAU,GA6F9C;;AAOD,MAAM,UAAU,aAAa,CAAC,GAAG,EAAE,KAAM;IACxC,IAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,EAAC,CAAC,CAAC;IAErE,OAAO,OAAO,CAAC;AAChB,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport Bounds from \"../support/Bounds\";\r\nimport HashObject from \"../core/HashObject\";\r\nimport { createCanvas } from \"./context/RenderContext\";\r\nvar Texture = (function (_super) {\r\n tslib_1.__extends(Texture, _super);\r\n function Texture() {\r\n var _this = _super.call(this) || this;\r\n _this.bounds = new Bounds();\r\n return _this;\r\n }\r\n Texture.prototype.setFrame = function (frame) {\r\n var x = frame.x, y = frame.y, w = frame.w, h = frame.h;\r\n this.bounds.setTo(x, y, w, h);\r\n };\r\n Texture.prototype.setImg = function (img) {\r\n this.img = img;\r\n };\r\n Object.defineProperty(Texture.prototype, \"width\", {\r\n get: function () {\r\n return this.bounds.width;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Texture.prototype, \"height\", {\r\n get: function () {\r\n return this.bounds.height;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Texture.prototype.getCacheCanvas = function () {\r\n var _a = this.bounds, width = _a.width, height = _a.height;\r\n var canvas = this._cacheCanvas;\r\n if (!canvas) {\r\n canvas = this._cacheCanvas = createCanvas();\r\n }\r\n canvas.width = width;\r\n canvas.height = height;\r\n var context = canvas.getContext('2d');\r\n this.drawToCanvas(context);\r\n return canvas;\r\n };\r\n Texture.prototype.drawToCanvas = function (context, dx, dy, sx, sy, dw, dh) {\r\n if (dx === void 0) { dx = 0; }\r\n if (dy === void 0) { dy = 0; }\r\n var _a = this.bounds, x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n context.drawImage(this.img, sx || x, sy || y, width, height, dx, dy, dw || width, dh || height);\r\n };\r\n Texture.prototype.destroy = function () {\r\n this.img = null;\r\n this.bounds = null;\r\n this.destroyCacheCanvas();\r\n };\r\n Texture.prototype.destroyCacheCanvas = function () {\r\n this._cacheCanvas = null;\r\n };\r\n return Texture;\r\n}(HashObject));\r\nexport default Texture;\r\nexport function createTexture(img, frame) {\r\n var texture = new Texture();\r\n texture.setImg(img);\r\n texture.setFrame(frame || { x: 0, y: 0, w: img.width, h: img.height });\r\n return texture;\r\n}\r\n//# sourceMappingURL=Texture.js.map"}
{"map":"{\"version\":3,\"file\":\"time.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node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,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;AAChI,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAa,EAAE,MAA6B,EAAE,SAAwB;IAAvD,uBAAA,EAAA,sBAA6B;IAAE,0BAAA,EAAA,gBAAwB;IAClG,IAAI,EAAE,GAAO,MAAM,GAAG,EAAE,CAAC;IACzB,IAAI,EAAE,GAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;IAC1C,IAAI,EAAE,GAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC5C,IAAI,EAAE,GAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC;IAE5C,IAAI,SAAS,EAAE;QACd,EAAE,GAAG,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACvB,EAAE,GAAG,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACvB,EAAE,GAAG,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACvB,EAAE,GAAG,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;KACvB;IAED,OAAO,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAC7C,CAAC\"}","code":"import { format as stringFormat, supplement } from './utils';\r\nexport function ts2Date(ts) {\r\n var newDate = new Date();\r\n newDate.setTime(ts);\r\n return newDate;\r\n}\r\nexport function dateToDateString(date, format) {\r\n if (format === void 0) { format = '{0}/{1}/{2}'; }\r\n return stringFormat(format, date.getFullYear(), supplement(date.getMonth() + 1, 2), supplement(date.getDate(), 2));\r\n}\r\nexport function dateToTimeString(date, format) {\r\n if (format === void 0) { format = '{0}:{1}:{2}'; }\r\n return stringFormat(format, supplement(date.getHours(), 2), supplement(date.getMinutes(), 2), supplement(date.getSeconds(), 2));\r\n}\r\nexport function dateToString(date, dayFormat, timeFormat) {\r\n return dateToDateString(date, dayFormat) + dateToTimeString(date, timeFormat);\r\n}\r\nexport function tsToTimeString(ts, format) {\r\n if (format === void 0) { format = '{0}:{1}:{2}'; }\r\n var date = ts2Date(ts);\r\n return stringFormat(format, supplement(date.getHours(), 2), supplement(date.getMinutes(), 2), supplement(date.getSeconds(), 2));\r\n}\r\nexport function secondFormat(second, format, placeZero) {\r\n if (format === void 0) { format = '{2}:{1}:{0}'; }\r\n if (placeZero === void 0) { placeZero = true; }\r\n var ss = second % 60;\r\n var mm = Math.floor(second / 60) % 60;\r\n var hh = Math.floor(second / 3600) % 24;\r\n var dd = Math.floor(second / 3600 / 24);\r\n if (placeZero) {\r\n ss = supplement(ss, 2);\r\n mm = supplement(mm, 2);\r\n hh = supplement(hh, 2);\r\n dd = supplement(dd, 2);\r\n }\r\n return stringFormat(format, ss, mm, hh, dd);\r\n}\r\n//# sourceMappingURL=time.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/assets-manager/index.ts\"],\"names\":[],\"mappings\":\";AAOA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAiB,iBAAiB,EAAE,YAAY,EAAC,MAAM,wBAAwB,CAAA;AACtF,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAA;AAEnC,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE9C,IAAI,QAAQ,GAAG,EAAE,CAAC;AAClB,IAAI,OAAO,GAAG,EAAE,CAAC;AAEjB,IAAM,aAAa,GAAG;IACrB,OAAO,EAAE,QAAQ;IACjB,QAAQ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AAG,OAAO,CAAC;wBACnB,CAAC,CAAC,EAAA;;;;CACF\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { createTexture } from '../core/Texture';\r\nimport { getFrameAnimation, putFrameAnim } from '../core/FrameAnimation';\r\nimport { Sheet } from '../core/Sheet';\r\nimport { EngineConfig } from \"../engine-config\";\r\nvar resCache = {};\r\nvar resPath = '';\r\nvar resLoaderType = {\r\n '.json': loadJson,\r\n '.json5': loadJson5,\r\n '.txt': loadTxt,\r\n '.png': loadTexture,\r\n '.jpg': loadTexture,\r\n '.svg': loadTexture,\r\n '.bimg': loadTextureFromBlob,\r\n '.sht': loadSheet,\r\n '.sht-disperse': loadSheetDisperse,\r\n '.fnt': loadFont,\r\n '.anim': loadAnim,\r\n};\r\nexport function setResPath(path) {\r\n resPath = path;\r\n}\r\nexport function loadResItems(items, progress) {\r\n var total = items.length;\r\n var count = 0;\r\n return Promise.all(items.map(function (item) {\r\n var uuid, url, config, ext;\r\n if (typeof item === 'string') {\r\n url = item;\r\n }\r\n else {\r\n url = item.url;\r\n }\r\n if (!url) {\r\n return Promise.resolve();\r\n }\r\n if (typeof item === 'string') {\r\n uuid = getUUIDFromUrl(url);\r\n }\r\n else {\r\n uuid = item.uuid || getUUIDFromUrl(url);\r\n ext = item.ext;\r\n config = item.config;\r\n }\r\n var loader = getLoader(ext, url);\r\n return loader(url, uuid, true, config).then(function (res) {\r\n count++;\r\n progress && progress(count / total);\r\n return res;\r\n });\r\n }));\r\n}\r\nexport function loadAny(url, uuid, cache, config, options, type) {\r\n if (cache === void 0) { cache = true; }\r\n if (options === void 0) { options = {}; }\r\n if (type === void 0) { type = 'arraybuffer'; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var response, result;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, fetch(resolveUrl(url), options)];\r\n case 1:\r\n response = _a.sent();\r\n switch (type) {\r\n case 'json':\r\n result = response.json();\r\n break;\r\n case 'text':\r\n result = response.text();\r\n break;\r\n case 'arraybuffer':\r\n result = response.arrayBuffer();\r\n break;\r\n case 'blob':\r\n result = response.blob();\r\n break;\r\n }\r\n return [4, result];\r\n case 2: return [2, _a.sent()];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadTxt(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n var p = loadAny(url, uuid, cache, config, undefined, 'text');\r\n if (cache) {\r\n p.then(function (data) {\r\n cacheRes(data, url, uuid);\r\n return data;\r\n });\r\n }\r\n return p;\r\n}\r\nexport function loadJson(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n var p = loadAny(url, uuid, cache, config, undefined, 'json');\r\n if (cache) {\r\n p.then(function (data) {\r\n cacheRes(data, url, uuid);\r\n return data;\r\n });\r\n }\r\n return p;\r\n}\r\nexport function loadJson5(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var txt, jsonData;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadTxt(url, uuid)];\r\n case 1:\r\n txt = _a.sent();\r\n jsonData = window['eval'](\"(\" + txt + \")\");\r\n cacheRes(jsonData, url, uuid);\r\n return [2, jsonData];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadSheet(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n var pngFile = url.substring(0, url.lastIndexOf('.')) + '.png';\r\n return Promise.all([\r\n loadJson(url, null, false),\r\n loadImage(pngFile, null, false),\r\n ]).then(function (result) {\r\n var e_1, _a;\r\n var data = result[0];\r\n var img = result[1];\r\n var sheet = new Sheet(img, data.frames);\r\n sheet.generateAll();\r\n if (cache) {\r\n cacheRes(sheet, url, uuid);\r\n if (config) {\r\n try {\r\n for (var _b = tslib_1.__values(config.textures), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var textureConfig = _c.value;\r\n var name_1 = textureConfig.name, uuid_1 = textureConfig.uuid;\r\n var texture = sheet.getTexture(name_1);\r\n cacheRes(texture, name_1, uuid_1);\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n }\r\n else {\r\n var textures = sheet.getAllTextures();\r\n for (var key in textures) {\r\n cacheRes(textures[key], key, key);\r\n }\r\n }\r\n }\r\n return sheet;\r\n });\r\n}\r\nexport function loadSheetDisperse(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var e_2, _a, _b, _c, _d, name_2, uuid_2, subUrl, e_2_1;\r\n return tslib_1.__generator(this, function (_e) {\r\n switch (_e.label) {\r\n case 0:\r\n _e.trys.push([0, 5, 6, 7]);\r\n _b = tslib_1.__values(config.textures), _c = _b.next();\r\n _e.label = 1;\r\n case 1:\r\n if (!!_c.done) return [3, 4];\r\n _d = _c.value, name_2 = _d.name, uuid_2 = _d.uuid;\r\n subUrl = url.replace('-disperse', '') + '/' + name_2.replace('_', '/') + '.png';\r\n return [4, loadTexture(subUrl, uuid_2)];\r\n case 2:\r\n _e.sent();\r\n _e.label = 3;\r\n case 3:\r\n _c = _b.next();\r\n return [3, 1];\r\n case 4: return [3, 7];\r\n case 5:\r\n e_2_1 = _e.sent();\r\n e_2 = { error: e_2_1 };\r\n return [3, 7];\r\n case 6:\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_2) throw e_2.error; }\r\n return [7];\r\n case 7: return [2, null];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadFont(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return loadSheet(url, null, false).then(function (sheet) {\r\n if (cache) {\r\n cacheRes(sheet, url, uuid);\r\n }\r\n return sheet;\r\n });\r\n}\r\nfunction findAnimConfig(animations, name) {\r\n var result;\r\n animations.some(function (item) {\r\n if (item.name === name) {\r\n result = item;\r\n return true;\r\n }\r\n });\r\n return result;\r\n}\r\nexport function loadAnim(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n var pngFile = url.substring(0, url.lastIndexOf('.')) + '.png';\r\n return Promise.all([\r\n loadJson(url, null, false),\r\n loadImage(pngFile, null, false),\r\n ]).then(function (result) {\r\n var data = result[0];\r\n var img = result[1];\r\n putFrameAnim(img, data);\r\n var animations = [];\r\n for (var name_3 in data.mc) {\r\n var animation = getFrameAnimation(name_3);\r\n if (cache) {\r\n var uuid_3 = name_3;\r\n if (config) {\r\n var cfg = findAnimConfig(config.animations, name_3);\r\n uuid_3 = cfg.uuid;\r\n }\r\n cacheRes(animation, name_3, uuid_3);\r\n }\r\n animations.push(animation);\r\n }\r\n return animations;\r\n });\r\n}\r\nexport function loadImage(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return new Promise(function (resolve, reject) {\r\n var img = new Image();\r\n if (EngineConfig.imgCrossOrigin) {\r\n img.setAttribute('crossOrigin', 'anonymous');\r\n }\r\n img.onload = function (e) {\r\n resolve(img);\r\n };\r\n img.onerror = function (e) {\r\n reject(e);\r\n };\r\n img.src = resolveUrl(url);\r\n });\r\n}\r\nexport function loadImageFromBlob(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var imgBlob, e_3;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 3, , 4]);\r\n return [4, loadAny(url, uuid, false, config, undefined, 'blob')];\r\n case 1:\r\n imgBlob = _a.sent();\r\n return [4, blobToImage(imgBlob)];\r\n case 2: return [2, _a.sent()];\r\n case 3:\r\n e_3 = _a.sent();\r\n console.log(e_3);\r\n return [3, 4];\r\n case 4: return [2];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadTexture(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var img, texture;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadImage(url, uuid, false)];\r\n case 1:\r\n img = _a.sent();\r\n texture = createTexture(img);\r\n if (cache) {\r\n cacheRes(texture, url, uuid);\r\n }\r\n return [2, texture];\r\n }\r\n });\r\n });\r\n}\r\nexport function loadTextureFromBlob(url, uuid, cache, config) {\r\n if (cache === void 0) { cache = true; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var img, texture;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, loadImageFromBlob(url, uuid, false)];\r\n case 1:\r\n img = _a.sent();\r\n texture = createTexture(img);\r\n if (cache) {\r\n cacheRes(texture, url, uuid);\r\n }\r\n return [2, texture];\r\n }\r\n });\r\n });\r\n}\r\nfunction resolveUrl(url) {\r\n if (url.indexOf('//') === 0 || url.indexOf('http:') === 0 || url.indexOf('https:') === 0) {\r\n return url;\r\n }\r\n return resPath + url;\r\n}\r\nfunction getLoader(ext, url) {\r\n ext = ext || url.substr(url.lastIndexOf('.'));\r\n return resLoaderType[ext] || loadAny;\r\n}\r\nfunction getUUIDFromUrl(url) {\r\n return url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('.'));\r\n}\r\nexport function cacheRes(res, url, uuid) {\r\n uuid = uuid || getUUIDFromUrl(url);\r\n resCache[uuid] = res;\r\n}\r\nexport function addLoader(ext, loader) {\r\n resLoaderType[ext] = loader;\r\n}\r\nexport function getRes(uuid) {\r\n return resCache[uuid];\r\n}\r\nexport function destroyRes(uuidOrUuids) {\r\n if (Array.isArray(uuidOrUuids)) {\r\n while (uuidOrUuids.length > 0) {\r\n delete resCache[uuidOrUuids.pop()];\r\n }\r\n }\r\n else {\r\n delete resCache[uuidOrUuids];\r\n }\r\n}\r\nexport function destroyAllRes() {\r\n for (var key in resCache) {\r\n destroyRes(key);\r\n }\r\n}\r\nexport function getAllResUuids() {\r\n return Object.keys(resCache);\r\n}\r\nfunction fileOrBlobToDataURL(obj) {\r\n return new Promise(function (resolve, reject) {\r\n var a = new FileReader();\r\n a.readAsDataURL(obj);\r\n a.onload = function (e) {\r\n resolve(e.target['result']);\r\n };\r\n a.onerror = function (e) {\r\n reject(e);\r\n };\r\n });\r\n}\r\nfunction blobToImage(blob) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var dataUrl;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4, fileOrBlobToDataURL(blob)];\r\n case 1:\r\n dataUrl = _a.sent();\r\n return [2, new Promise(function (resolve, reject) {\r\n var img = new Image();\r\n if (EngineConfig.imgCrossOrigin) {\r\n img.setAttribute('crossOrigin', 'anonymous');\r\n }\r\n img.onload = function () {\r\n resolve(img);\r\n };\r\n img.onerror = function (e) {\r\n reject(e);\r\n };\r\n img.src = dataUrl;\r\n })];\r\n }\r\n });\r\n });\r\n}\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"interpreter.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/editor/interpreter.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,MAAM,EAAS,WAAW,EAAC,MAAM,SAAS,CAAC;AACnD,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC,IAAI,WAAW,GAAG,EAAE,CAAC;AACrB,IAAI,iBAAiB,CAAC;AACtB,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,IAAI,QAAQ,GAAW,CAAC,CAAC;AAEzB,MAAM,UAAU,WAAW,CAAC,IAAI,EAAE,GAAG;IACpC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;IACnB,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC;AACtB,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAM;IACnC,OAAO,MAAM,CAAC,cAAc,C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,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACtC,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { Entity, ScillaEvent } from \"../core\";\r\nimport { getRes } from \"../assets-manager\";\r\nvar entityCache = {};\r\nvar entityCacheConfig;\r\nvar defMap = {};\r\nvar prefabID = 0;\r\nexport function registerDef(name, def) {\r\n defMap[name] = def;\r\n def.__class__ = name;\r\n}\r\nfunction getEntityCacheConfig(config) {\r\n return config['entity-cache'] ? config['entity-cache'].concat() : [];\r\n}\r\nexport function setupScene(scene, root) {\r\n scene.root = root;\r\n var config = scene.config;\r\n entityCacheConfig = getEntityCacheConfig(config);\r\n instantiateConfig(config.root, root);\r\n entityCache = {};\r\n return scene;\r\n}\r\nexport function destroyScene(scene) {\r\n var root = scene.root;\r\n root.removeAllComponents();\r\n root.removeChildren();\r\n}\r\nexport function instantiate(config) {\r\n var pid = ++prefabID;\r\n entityCacheConfig = getEntityCacheConfig(config);\r\n for (var i = 0, li = entityCacheConfig.length; i < li; i++) {\r\n entityCacheConfig[i] = pid + '_' + entityCacheConfig[i];\r\n }\r\n var rootConfig = config.root;\r\n var entity = setupEntity(rootConfig, null, pid);\r\n setupComponent(rootConfig, entity, true);\r\n injectComponent(rootConfig, entity, true, pid);\r\n entityCache = {};\r\n return entity.children[0];\r\n}\r\nfunction instantiateConfig(config, root) {\r\n var entity = setupEntity(config, root);\r\n setupComponent(config, entity, true);\r\n injectComponent(config, entity, true);\r\n return entity;\r\n}\r\nfunction setupEntity(config, root, pid) {\r\n var entity = null;\r\n if (config) {\r\n var name_1 = config.name, uuid = config.uuid, children = config.children;\r\n if (pid !== undefined && uuid !== undefined) {\r\n uuid = pid + '_' + uuid;\r\n }\r\n entity = root || new Entity(name_1, uuid);\r\n if (entityCacheConfig.indexOf(uuid) >= 0) {\r\n entityCache[uuid] = entity;\r\n }\r\n if (children) {\r\n for (var i = 0, li = children.length; i < li; i++) {\r\n var child = children[i];\r\n var childEntity = setupEntity(child, null, pid);\r\n entity.addChild(childEntity);\r\n }\r\n }\r\n if (!root) {\r\n entity.enabled = !config.disabled;\r\n }\r\n }\r\n return entity;\r\n}\r\nfunction setupComponent(config, root, includeSelf) {\r\n if (includeSelf === void 0) { includeSelf = false; }\r\n if (includeSelf) {\r\n instantiateComponents(root, config);\r\n }\r\n if (config && config.children) {\r\n for (var i = 0, li = root.children.length; i < li; i++) {\r\n var child = config.children[i];\r\n var entity = root.children[i];\r\n instantiateComponents(entity, child);\r\n setupComponent(child, entity);\r\n }\r\n }\r\n}\r\nfunction injectComponent(config, root, includeSelf, pid) {\r\n if (includeSelf === void 0) { includeSelf = false; }\r\n if (includeSelf) {\r\n injectComponents(root, config, pid);\r\n }\r\n if (config && config.children) {\r\n for (var i = 0, li = root.children.length; i < li; i++) {\r\n var child = config.children[i];\r\n var entity = root.children[i];\r\n injectComponents(entity, child, pid);\r\n injectComponent(child, entity, false, pid);\r\n }\r\n }\r\n}\r\nfunction instantiateComponents(entity, config) {\r\n var e_1, _a;\r\n if (config.components) {\r\n try {\r\n for (var _b = tslib_1.__values(config.components), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var component = _c.value;\r\n instantiateComponent(entity, component);\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n }\r\n}\r\nfunction injectComponents(entity, config, pid) {\r\n if (config.components) {\r\n var components = entity.components;\r\n for (var i = 0, li = config.components.length; i < li; i++) {\r\n var component = config.components[i];\r\n var properties = component.properties;\r\n if (properties) {\r\n injectProperties(components[i], properties, pid);\r\n }\r\n }\r\n }\r\n}\r\nfunction instantiateComponent(entity, config) {\r\n var script = config.script, properties = config.properties;\r\n var def = getDefByName(script);\r\n if (!def) {\r\n return;\r\n }\r\n var instance = new def();\r\n instance.enabled = !config.disabled;\r\n entity.addComponent(instance);\r\n}\r\nfunction getDefByName(name) {\r\n var def;\r\n def = defMap[name];\r\n if (!def) {\r\n console.warn('missing def:', name);\r\n return;\r\n }\r\n return def;\r\n}\r\nvar skipKeys = ['_type_', '_constructor_'];\r\nfunction injectProperties(node, propertiesConfig, pid) {\r\n if (!node) {\r\n console.warn('node is null.');\r\n return;\r\n }\r\n for (var key in propertiesConfig) {\r\n if (skipKeys.indexOf(key) >= 0) {\r\n continue;\r\n }\r\n var propertyOfConfig = propertiesConfig[key];\r\n var propertyOfInstance = node[key];\r\n if (typeof propertyOfConfig === 'object') {\r\n if (propertyOfInstance instanceof ScillaEvent) {\r\n injectEvent(propertyOfInstance, propertyOfConfig, pid);\r\n }\r\n else if (propertyOfConfig._type_ === 'raw') {\r\n node[key] = propertyOfInstance = propertyOfConfig.data;\r\n }\r\n else {\r\n if (Array.isArray(propertyOfConfig) && !propertyOfInstance) {\r\n node[key] = propertyOfInstance = [];\r\n }\r\n node[key] = injectObject(propertyOfInstance, propertyOfConfig, pid);\r\n }\r\n }\r\n else {\r\n injectBaseType(node, key, propertyOfConfig, pid);\r\n }\r\n }\r\n}\r\nfunction injectObject(propertyOfInstance, propertyOfConfig, pid) {\r\n if (propertyOfInstance === undefined) {\r\n if (propertyOfConfig._type_) {\r\n var def = getDefByName(propertyOfConfig._type_);\r\n if (def) {\r\n var constructorArgs = propertyOfConfig._constructor_;\r\n if (constructorArgs && constructorArgs.length > 0) {\r\n propertyOfInstance = def.constructor.apply(null, constructorArgs);\r\n }\r\n else {\r\n propertyOfInstance = new def();\r\n }\r\n }\r\n }\r\n }\r\n if (propertyOfInstance) {\r\n injectProperties(propertyOfInstance, propertyOfConfig, pid);\r\n }\r\n return propertyOfInstance;\r\n}\r\nfunction injectBaseType(node, key, propertyOfConfig, pid) {\r\n var propertyValue;\r\n if (typeof propertyOfConfig === 'string') {\r\n propertyValue = getLink(propertyOfConfig, pid);\r\n }\r\n else {\r\n propertyValue = propertyOfConfig;\r\n }\r\n node[key] = propertyValue;\r\n}\r\nfunction injectEvent(event, config, pid) {\r\n var e_2, _a;\r\n try {\r\n for (var config_1 = tslib_1.__values(config), config_1_1 = config_1.next(); !config_1_1.done; config_1_1 = config_1.next()) {\r\n var _b = config_1_1.value, entityName = _b.entity, componentIndex = _b.component, methodName = _b.method, param = _b.param;\r\n if (entityName && componentIndex >= 0 && methodName) {\r\n var entity = getLink(entityName, pid);\r\n var component = entity.components[componentIndex];\r\n var method = component[methodName];\r\n if (method) {\r\n if (param == undefined) {\r\n event.addListener(method, component, 0);\r\n }\r\n else {\r\n event.addListener(method, component, 0, param);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\r\n finally {\r\n try {\r\n if (config_1_1 && !config_1_1.done && (_a = config_1.return)) _a.call(config_1);\r\n }\r\n finally { if (e_2) throw e_2.error; }\r\n }\r\n}\r\nfunction getLink(str, pid) {\r\n var result;\r\n if (str.indexOf('res|') == 0) {\r\n var uuid = str.substr(4);\r\n result = getRes(uuid);\r\n }\r\n else if (str.indexOf('entity|') == 0) {\r\n var uuid = transPrefabUUID(str.substr(7), pid);\r\n result = entityCache[uuid];\r\n }\r\n else {\r\n result = str;\r\n }\r\n return result;\r\n}\r\nfunction transPrefabUUID(uuid, pid) {\r\n return pid ? pid + '_' + uuid : uuid;\r\n}\r\n//# sourceMappingURL=interpreter.js.map"}
{"map":"{\"version\":3,\"file\":\"math.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/tools/math.ts\"],\"names\":[],\"mappings\":\";AAcA,MAAM,UAAU,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,gBAAwB;IAAxB,iCAAA,EAAA,wBAAwB;IAC3D,IAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,IAAI,IAAI,KAAK,OAAO,GAAG,EAAE;QACxB,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAA;KAC7C;IAED,IAAI,CA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AAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AACtD,CAAC;AAOD,MAAM,UAAU,QAAQ,CAAC,GAAQ;IAChC,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,GAAG,GAAW,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QAC/E,IAAI,CAAC,GAAW,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,GAAW,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QAClB,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QAChB,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;KACd;IAED,OAAO,GAAG,CAAC;AACZ,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nexport function lerp(begin, end, t, allowOutOfBounds) {\r\n if (allowOutOfBounds === void 0) { allowOutOfBounds = false; }\r\n var type = typeof begin;\r\n if (type !== typeof end) {\r\n console.error('begin and end need same type');\r\n }\r\n if (!allowOutOfBounds) {\r\n t = Math.max(0, Math.min(1, t));\r\n }\r\n var sign = end - begin;\r\n sign = sign > 0 ? 1 : (sign < 0 ? -1 : 0);\r\n var distance = Math.abs(end - begin);\r\n return begin + distance * t * sign;\r\n}\r\nexport function lerpObj(begin, end, t, clazz, fields, allowOutOfBounds) {\r\n if (allowOutOfBounds === void 0) { allowOutOfBounds = false; }\r\n var e_1, _a;\r\n var type = typeof begin;\r\n if (type !== typeof end) {\r\n console.error('begin and end need same type');\r\n }\r\n var temp = new clazz();\r\n try {\r\n for (var fields_1 = tslib_1.__values(fields), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {\r\n var field = fields_1_1.value;\r\n temp[field] = lerp(begin[field], end[field], t, allowOutOfBounds);\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (fields_1_1 && !fields_1_1.done && (_a = fields_1.return)) _a.call(fields_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n return temp;\r\n}\r\nexport function makeRandomInt(max, min) {\r\n if (min === void 0) { min = 0; }\r\n return Math.floor(Math.random() * (max - min)) + min;\r\n}\r\nexport function mixArray(arr) {\r\n for (var i = 0, len = Math.round(arr.length / 2); i < len; i++) {\r\n var a = makeRandomInt(arr.length);\r\n var b = makeRandomInt(arr.length);\r\n var temp = arr[a];\r\n arr[a] = arr[b];\r\n arr[b] = temp;\r\n }\r\n return arr;\r\n}\r\n//# sourceMappingURL=math.js.map"}
{"map":"{\"version\":3,\"file\":\"requestAnimationFrame.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/requestAnimationFrame.ts\"],\"names\":[],\"mappings\":\"AAIA,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,IAAI,OAAO,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AAChC,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,EAAE,CAAC,EAAE;IACrE,MAAM,CAAC,qBAAqB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,uBAAuB,CAAC,CAAC;IAC5E,MAAM,CAAC,oBAAoB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC;QACvE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,6BAA6B,CAAC,CAAC;CACxD;AAED,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE;IAC/B,MAAM,CAAC,qBAAqB,GAAG,UAAS,QAAQ;QAC5C,IAAI,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;QACpC,IAAI,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC;QAC3D,IAAI,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;YACvB,QAAQ,CAAC,QAAQ,GAAG,UAAU,CAAC,CAAC;QACpC,CAAC,EAAE,UAAU,CAAC,CAAC;QACf,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;QACjC,OAAO,EAAE,CAAC;IACd,CAAC,CAAC;CACL;AACD,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE;IAC9B,MAAM,CAAC,oBAAoB,GAAG,UAAS,EAAE;QACrC,YAAY,CAAC,EAAE,CAAC,CAAC;IACrB,CAAC,CAAC;CACL\"}","code":"var lastTime = 0;\r\nvar vendors = ['webkit', 'moz'];\r\nfor (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\r\n window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];\r\n window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] ||\r\n window[vendors[x] + 'CancelRequestAnimationFrame'];\r\n}\r\nif (!window.requestAnimationFrame) {\r\n window.requestAnimationFrame = function (callback) {\r\n var currTime = new Date().getTime();\r\n var timeToCall = Math.max(0, 16.7 - (currTime - lastTime));\r\n var id = window.setTimeout(function () {\r\n callback(currTime + timeToCall);\r\n }, timeToCall);\r\n lastTime = currTime + timeToCall;\r\n return id;\r\n };\r\n}\r\nif (!window.cancelAnimationFrame) {\r\n window.cancelAnimationFrame = function (id) {\r\n clearTimeout(id);\r\n };\r\n}\r\n//# sourceMappingURL=requestAnimationFrame.js.map"}
{"map":"{\"version\":3,\"file\":\"Tween.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/Tween.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,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C,WAAW,CAAC,CAAC;QAE7C,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IAOD,wBAAQ,GAAR;QACC,IAAI,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;YAC/B,OAAO;SACP;QAED,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;QACd,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE;YAC5C,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;SACxC;QACD,IAAI,CAAC,aAAa,EAAE,CAAC;IACtB,CAAC;IAAA,CAAC;IAiCH,YAAC;AAAD,CAAC,AA1PD,CAA2B,UAAU,GA0PpC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { lerp, lerpObj } from \"../tools/math\";\r\nimport { injectProp } from \"../tools/utils\";\r\nimport HashObject from \"../core/HashObject\";\r\nvar STATUS;\r\n(function (STATUS) {\r\n STATUS[STATUS[\"IDLE\"] = 0] = \"IDLE\";\r\n STATUS[STATUS[\"PENDING\"] = 1] = \"PENDING\";\r\n STATUS[STATUS[\"DO_SET\"] = 2] = \"DO_SET\";\r\n STATUS[STATUS[\"DO_TO\"] = 3] = \"DO_TO\";\r\n STATUS[STATUS[\"DO_WAIT\"] = 4] = \"DO_WAIT\";\r\n STATUS[STATUS[\"DO_CALL\"] = 5] = \"DO_CALL\";\r\n})(STATUS || (STATUS = {}));\r\nexport function createTween(target, override, options, plugins) {\r\n if (override === void 0) { override = false; }\r\n if (plugins === void 0) { plugins = []; }\r\n if (override) {\r\n killTweens(target);\r\n }\r\n var tween = new Tween(target, options);\r\n addTween(target, tween);\r\n return tween;\r\n}\r\nexport function killTweens(target) {\r\n var e_1, _a;\r\n var tweens = target['tweens'];\r\n if (tweens) {\r\n try {\r\n for (var tweens_1 = tslib_1.__values(tweens), tweens_1_1 = tweens_1.next(); !tweens_1_1.done; tweens_1_1 = tweens_1.next()) {\r\n var tween = tweens_1_1.value;\r\n tween.stop();\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (tweens_1_1 && !tweens_1_1.done && (_a = tweens_1.return)) _a.call(tweens_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n tweens.splice(0);\r\n }\r\n}\r\nfunction addTween(target, tween) {\r\n var tweens = target['tweens'];\r\n if (!tweens) {\r\n tweens = target['tweens'] = [];\r\n }\r\n tweens.push(tween);\r\n}\r\nvar Tween = (function (_super) {\r\n tslib_1.__extends(Tween, _super);\r\n function Tween(target, options, plugins) {\r\n if (plugins === void 0) { plugins = []; }\r\n var _this = _super.call(this) || this;\r\n _this.queue = [];\r\n _this.loopCounting = 0;\r\n _this.status = STATUS.IDLE;\r\n _this.onUpdate = function (t) {\r\n _this.t = t;\r\n switch (_this.status) {\r\n case STATUS.DO_TO:\r\n var _a = _this, target = _a.target, startTime = _a.startTime, fromProps = _a.fromProps, toProps = _a.toProps, duration = _a.duration, ease = _a.ease, clazz = _a.clazz, fields = _a.fields;\r\n var passTime = t - startTime;\r\n var timeRatio = Math.min(1, passTime / duration);\r\n var ratio = timeRatio;\r\n if (ease) {\r\n ratio = ease(ratio);\r\n }\r\n for (var key in fromProps) {\r\n var toValue = toProps[key];\r\n var fromValue = fromProps[key];\r\n var currentValue = void 0;\r\n if (timeRatio < 1) {\r\n if (typeof toValue == 'object') {\r\n currentValue = lerpObj(fromValue, toValue, ratio, clazz, fields || Object.keys(toValue), true);\r\n }\r\n else {\r\n currentValue = lerp(fromValue, toValue, ratio, true);\r\n }\r\n }\r\n else {\r\n currentValue = toValue;\r\n }\r\n target[key] = currentValue;\r\n if (timeRatio >= 1) {\r\n _this._doNextAction();\r\n }\r\n }\r\n break;\r\n case STATUS.DO_WAIT:\r\n var _b = _this, startTime = _b.startTime, duration = _b.duration;\r\n var passTime = t - startTime;\r\n if (passTime > duration) {\r\n _this._doNextAction();\r\n }\r\n break;\r\n }\r\n };\r\n _this._doPlay = function (resetLoopCounting) {\r\n addTween(_this.target, _this);\r\n _this._start(resetLoopCounting);\r\n };\r\n _this._readyStart = function (t) {\r\n _this.t = t;\r\n _this._doStart();\r\n };\r\n _this._doNextAction = function () {\r\n if (_this.step < _this.queue.length) {\r\n var action = _this.queue[_this.step++];\r\n switch (action.action) {\r\n case 'set':\r\n _this._set(action.props);\r\n break;\r\n case 'to':\r\n if (action.duration > 0) {\r\n _this._to(action.props, action.duration, action.ease);\r\n }\r\n else {\r\n _this._set(action.props);\r\n }\r\n break;\r\n case 'wait':\r\n _this._wait(action.duration);\r\n break;\r\n case 'call':\r\n _this._call(action.func, action.thisObj, action.params);\r\n break;\r\n }\r\n }\r\n else {\r\n if (_this.loop < 0) {\r\n _this._doStart();\r\n }\r\n else if (_this.loopCounting < _this.loop) {\r\n _this._doStart();\r\n }\r\n else {\r\n _this.status = STATUS.IDLE;\r\n }\r\n }\r\n };\r\n _this.target = target;\r\n _this.loop = options ? options.loop : 0;\r\n _this.autoPlay = options ? (options.hasOwnProperty('autoPlay') ? options.autoPlay : true) : true;\r\n _this.clazz = options ? options.clazz : null;\r\n _this.fields = options ? options.fields : null;\r\n _this.plugins = plugins;\r\n if (options && options.initFields && options.initFields.length > 0) {\r\n _this.initProps = _this.getInitProps(options.initFields);\r\n }\r\n return _this;\r\n }\r\n Tween.prototype.getInitProps = function (fields) {\r\n var e_2, _a;\r\n var props = {};\r\n try {\r\n for (var fields_1 = tslib_1.__values(fields), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {\r\n var field = fields_1_1.value;\r\n if (field in this.target) {\r\n props[field] = this.target[field];\r\n }\r\n }\r\n }\r\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\r\n finally {\r\n try {\r\n if (fields_1_1 && !fields_1_1.done && (_a = fields_1.return)) _a.call(fields_1);\r\n }\r\n finally { if (e_2) throw e_2.error; }\r\n }\r\n return props;\r\n };\r\n Tween.prototype.set = function (props) {\r\n this.queue.push({ action: 'set', props: props });\r\n if (this.autoPlay) {\r\n this._start();\r\n }\r\n return this;\r\n };\r\n Tween.prototype.to = function (props, duration, ease) {\r\n this.queue.push({ action: 'to', props: props, duration: duration, ease: ease });\r\n if (this.autoPlay) {\r\n this._start();\r\n }\r\n return this;\r\n };\r\n Tween.prototype.wait = function (duration) {\r\n this.queue.push({ action: 'wait', duration: duration });\r\n if (this.autoPlay) {\r\n this._start();\r\n }\r\n return this;\r\n };\r\n Tween.prototype.call = function (func, thisObj, params) {\r\n this.queue.push({ action: 'call', func: func, thisObj: thisObj, params: params });\r\n if (this.autoPlay) {\r\n this._start();\r\n }\r\n return this;\r\n };\r\n Tween.prototype.play = function (override, delay, resetLoopCounting) {\r\n if (override === void 0) { override = false; }\r\n if (delay === void 0) { delay = 0; }\r\n if (resetLoopCounting === void 0) { resetLoopCounting = true; }\r\n if (override) {\r\n killTweens(this.target);\r\n }\r\n if (delay > 0) {\r\n setTimeout(this._doPlay, delay, resetLoopCounting);\r\n }\r\n else {\r\n this._doPlay(resetLoopCounting);\r\n }\r\n };\r\n Tween.prototype.stop = function () {\r\n this.status = STATUS.IDLE;\r\n this.target.cancelOnNextTick(this.onUpdate);\r\n };\r\n Tween.prototype._set = function (props) {\r\n this.status = STATUS.DO_SET;\r\n injectProp(this.target, props);\r\n this._doNextAction();\r\n };\r\n Tween.prototype._to = function (props, duration, ease) {\r\n this.status = STATUS.DO_TO;\r\n this.startTime = this.t;\r\n this.fromProps = {};\r\n for (var key in props) {\r\n this.fromProps[key] = this.target[key];\r\n }\r\n this.toProps = {};\r\n injectProp(this.toProps, props);\r\n this.ease = ease;\r\n this.duration = duration;\r\n };\r\n Tween.prototype._wait = function (duration) {\r\n this.status = STATUS.DO_WAIT;\r\n this.startTime = this.t;\r\n this.duration = duration;\r\n };\r\n Tween.prototype._call = function (func, thisObj, params) {\r\n this.status = STATUS.DO_CALL;\r\n func.apply(thisObj, params);\r\n this._doNextAction();\r\n };\r\n Tween.prototype._start = function (resetLoopCounting) {\r\n if (resetLoopCounting === void 0) { resetLoopCounting = true; }\r\n this.status = STATUS.PENDING;\r\n if (resetLoopCounting) {\r\n this.loopCounting = 0;\r\n }\r\n this.target.callOnNextTick(this._readyStart);\r\n this.target.callOnNextTick(this.onUpdate, false);\r\n };\r\n Tween.prototype._doStart = function () {\r\n if (this.status == STATUS.IDLE) {\r\n return;\r\n }\r\n this.step = 0;\r\n this.loopCounting++;\r\n if (this.loopCounting > 1 && this.initProps) {\r\n injectProp(this.target, this.initProps);\r\n }\r\n this._doNextAction();\r\n };\r\n ;\r\n return Tween;\r\n}(HashObject));\r\nexport { Tween };\r\n//# sourceMappingURL=Tween.js.map"}
{"map":"{\"version\":3,\"file\":\"EventEmitter.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/EventEmitter.ts\"],\"names\":[],\"mappings\":\"AAIA,YAAY,CAAC;AAEb,IAAI,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,EACtC,MAAM,GAAG,GAAG,CAAC;AAShB,SAAS,MAAM,KAAI,CAAC;AASpB,IAAI,MAAM,CAAC,MAAM,EAAE;IAClB,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAMvC,IAAI,CAAC,IAAI,MAAM,EAAE,CAAC,SAAS;QAAE,MAAM,GAAG,EAAE,CAAC;CACzC;AAWD,SAAS,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI;IAC5B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACvB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC;AAC3B,CAAC;AAaD,SAAS,WAAW,CAAC,OAAO,EAAE,KAAK,EA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AM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;;gBAC3E,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC3B;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IASD,yCAAkB,GAAlB,UAAmB,KAAK;QACvB,IAAI,GAAG,CAAC;QAER,IAAI,KAAK,EAAE;YACV,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;YACtC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;gBAAE,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC7C;aAAM;YACN,IAAI,CAAC,OAAO,GAAG,IAAI,MAAM,EAAE,CAAC;YAC5B,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;SACtB;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IACF,mBAAC;AAAD,CAAC,AA9OD,IA8OC\"}","code":"'use strict';\r\nvar has = Object.prototype.hasOwnProperty, prefix = '~';\r\nfunction Events() { }\r\nif (Object.create) {\r\n Events.prototype = Object.create(null);\r\n if (!new Events().__proto__)\r\n prefix = '';\r\n}\r\nfunction EE(fn, context, once) {\r\n this.fn = fn;\r\n this.context = context;\r\n this.once = once || false;\r\n}\r\nfunction addListener(emitter, event, fn, context, once) {\r\n if (typeof fn !== 'function') {\r\n throw new TypeError('The listener must be a function');\r\n }\r\n var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;\r\n if (!emitter._events[evt])\r\n emitter._events[evt] = listener, emitter._eventsCount++;\r\n else if (!emitter._events[evt].fn)\r\n emitter._events[evt].push(listener);\r\n else\r\n emitter._events[evt] = [emitter._events[evt], listener];\r\n return emitter;\r\n}\r\nfunction clearEvent(emitter, evt) {\r\n if (--emitter._eventsCount === 0)\r\n emitter._events = new Events();\r\n else\r\n delete emitter._events[evt];\r\n}\r\nvar EventEmitter = (function () {\r\n function EventEmitter() {\r\n this._events = new Events();\r\n this._eventsCount = 0;\r\n this.off = this.removeListener;\r\n this.addListener = this.on;\r\n }\r\n Object.defineProperty(EventEmitter, \"prefixed\", {\r\n get: function () {\r\n return prefix;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n EventEmitter.prototype.eventNames = function () {\r\n var names = [], events, name;\r\n if (this._eventsCount === 0)\r\n return names;\r\n for (name in (events = this._events)) {\r\n if (has.call(events, name))\r\n names.push(prefix ? name.slice(1) : name);\r\n }\r\n return names;\r\n };\r\n EventEmitter.prototype.listeners = function (event) {\r\n var evt = prefix ? prefix + event : event, handlers = this._events[evt];\r\n if (!handlers)\r\n return [];\r\n if (handlers.fn)\r\n return [handlers.fn];\r\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\r\n ee[i] = handlers[i].fn;\r\n }\r\n return ee;\r\n };\r\n EventEmitter.prototype.listenerCount = function (event) {\r\n var evt = prefix ? prefix + event : event, listeners = this._events[evt];\r\n if (!listeners)\r\n return 0;\r\n if (listeners.fn)\r\n return 1;\r\n return listeners.length;\r\n };\r\n EventEmitter.prototype.emit = function (event, a1, a2, a3, a4, a5) {\r\n var evt = prefix ? prefix + event : event;\r\n if (!this._events[evt])\r\n return false;\r\n var listeners = this._events[evt], len = arguments.length, args, i;\r\n if (listeners.fn) {\r\n if (listeners.once)\r\n this.removeListener(event, listeners.fn, undefined, true);\r\n switch (len) {\r\n case 1: return listeners.fn.call(listeners.context), true;\r\n case 2: return listeners.fn.call(listeners.context, a1), true;\r\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\r\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\r\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\r\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\r\n }\r\n for (i = 1, args = new Array(len - 1); i < len; i++) {\r\n args[i - 1] = arguments[i];\r\n }\r\n listeners.fn.apply(listeners.context, args);\r\n }\r\n else {\r\n var length = listeners.length, j;\r\n for (i = 0; i < length; i++) {\r\n if (listeners[i].once)\r\n this.removeListener(event, listeners[i].fn, undefined, true);\r\n switch (len) {\r\n case 1:\r\n listeners[i].fn.call(listeners[i].context);\r\n break;\r\n case 2:\r\n listeners[i].fn.call(listeners[i].context, a1);\r\n break;\r\n case 3:\r\n listeners[i].fn.call(listeners[i].context, a1, a2);\r\n break;\r\n case 4:\r\n listeners[i].fn.call(listeners[i].context, a1, a2, a3);\r\n break;\r\n default:\r\n if (!args)\r\n for (j = 1, args = new Array(len - 1); j < len; j++) {\r\n args[j - 1] = arguments[j];\r\n }\r\n listeners[i].fn.apply(listeners[i].context, args);\r\n }\r\n }\r\n }\r\n return true;\r\n };\r\n EventEmitter.prototype.on = function (event, fn, context) {\r\n return addListener(this, event, fn, context, false);\r\n };\r\n ;\r\n EventEmitter.prototype.once = function (event, fn, context) {\r\n return addListener(this, event, fn, context, true);\r\n };\r\n EventEmitter.prototype.removeListener = function (event, fn, context, once) {\r\n var evt = prefix ? prefix + event : event;\r\n if (!this._events[evt])\r\n return this;\r\n if (!fn) {\r\n clearEvent(this, evt);\r\n return this;\r\n }\r\n var listeners = this._events[evt];\r\n if (listeners.fn) {\r\n if (listeners.fn === fn &&\r\n (!once || listeners.once) &&\r\n (!context || listeners.context === context)) {\r\n clearEvent(this, evt);\r\n }\r\n }\r\n else {\r\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\r\n if (listeners[i].fn !== fn ||\r\n (once && !listeners[i].once) ||\r\n (context && listeners[i].context !== context)) {\r\n events.push(listeners[i]);\r\n }\r\n }\r\n if (events.length)\r\n this._events[evt] = events.length === 1 ? events[0] : events;\r\n else\r\n clearEvent(this, evt);\r\n }\r\n return this;\r\n };\r\n EventEmitter.prototype.removeAllListeners = function (event) {\r\n var evt;\r\n if (event) {\r\n evt = prefix ? prefix + event : event;\r\n if (this._events[evt])\r\n clearEvent(this, evt);\r\n }\r\n else {\r\n this._events = new Events();\r\n this._eventsCount = 0;\r\n }\r\n return this;\r\n };\r\n return EventEmitter;\r\n}());\r\nexport default EventEmitter;\r\n//# sourceMappingURL=EventEmitter.js.map"}
{"map":"{\"version\":3,\"file\":\"RenderContext.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../../node_modules/scilla-core/src/core/context/RenderContext.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,IAAI,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC;AAEpC,IAAI,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,CAAC,CAAC;AAEjC,IAAI,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,CAAC;AAE/D,IAAI,cAAc,CAAC;AASnB,MAAM,CAAC,IAAM,SAAS,GAAG;IACxB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,YAAY;IACzB,YAAY,EAAE,aAAa;CAC3B,CAAC;AAMF,MAAM,UAAU,YAAY,CAAC,OAAiB;IAAjB,wBAAA,EAAA,YAAiB;IACtC,IAAA,uBAAM,EAAE,iCAAW,EAAE,mCAAY,EAAE,sBAA8B,EAA9B,mDAA8B,EAAE,6BAAwB,EAAxB,6CAAwB,CAAY;IAE9G,YAAY,GAAG,WAAW,CAAC;IAC3B,aAAa,GAAG,YAAY,CAAC;IAC7B,UAAU,GAAG,SAAS,CAAC;IACvB,iBAAiB,GAAG,gBAAgB,CAAC;IAErC,OAAO,GAAG,MAAM,CAAC;IACjB,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAElC,mBAAmB,EAAE,CAAC;AACvB,CAAC;AAKD,MAAM,UAAU,KAAK;IACpB,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACvC,OAAO,CAAC,SAAS,CA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;iBAAI;gBACJ,MAAM,GAAG,eAAe,GAAG,MAAM,CAAC;aAClC;YACD,MAAM,GAAG,MAAM,CAAC;YAChB,MAAM;QACP,KAAK,SAAS,CAAC,YAAY;YAC1B,IAAG,iBAAiB,EAAC;gBACpB,KAAK,GAAG,WAAW,CAAC;aACpB;iBAAI;gBACJ,KAAK,GAAG,cAAc,GAAG,MAAM,CAAC;aAChC;YACD,MAAM,GAAG,YAAY,CAAC;YACtB,MAAM,GAAG,MAAM,CAAC;YAChB,MAAM;KACP;IAED,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAE1C,IAAI,UAAU,GAAG,iBAAiB,CAAC,CAAC,CAAC,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC;IAC3E,IAAI,WAAW,GAAG,iBAAiB,CAAC,CAAC,CAAC,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC;IAE9E,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IACtB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,UAAU,GAAG,IAAI,CAAC;IACxC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC;AAC3C,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { updateScaleMode } from \"./InteractContext\";\r\nvar _canvas, context, width, height;\r\nvar scaleX, scaleY, rotation = 0;\r\nvar _designWidth, _designHeight, _scaleMode, _modifyCanvasSize;\r\nvar shortcutCanvas;\r\nexport var ScaleMode = {\r\n SHOW_ALL: 'showAll',\r\n FIXED_WIDTH: 'fixedWidth',\r\n FIXED_HEIGHT: 'fixedHeight',\r\n};\r\nexport function setupContext(options) {\r\n if (options === void 0) { options = {}; }\r\n var canvas = options.canvas, designWidth = options.designWidth, designHeight = options.designHeight, _a = options.scaleMode, scaleMode = _a === void 0 ? ScaleMode.SHOW_ALL : _a, _b = options.modifyCanvasSize, modifyCanvasSize = _b === void 0 ? false : _b;\r\n _designWidth = designWidth;\r\n _designHeight = designHeight;\r\n _scaleMode = scaleMode;\r\n _modifyCanvasSize = modifyCanvasSize;\r\n _canvas = canvas;\r\n context = canvas.getContext('2d');\r\n updateScaleModeSelf();\r\n}\r\nexport function clear() {\r\n context.setTransform(1, 0, 0, 1, 0, 0);\r\n context.clearRect(0, 0, width, height);\r\n}\r\nexport function getContext() {\r\n return context;\r\n}\r\nexport function getStageSize() {\r\n return {\r\n width: width,\r\n height: height,\r\n };\r\n}\r\nexport function getStageScale() {\r\n return {\r\n x: scaleX,\r\n y: scaleY,\r\n };\r\n}\r\nexport function getStageCenter() {\r\n return {\r\n x: width / 2,\r\n y: height / 2,\r\n };\r\n}\r\nexport function createCanvas() {\r\n return document.createElement('canvas');\r\n}\r\nexport function shortcut(type, params) {\r\n if (type === void 0) { type = 0; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var targetImg, dataUrl, img;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!(params.bounds || params.zoomToDom)) return [3, 3];\r\n dataUrl = _canvas.toDataURL('image/png');\r\n return [4, dataUrlToImage(dataUrl)];\r\n case 1:\r\n img = _a.sent();\r\n return [4, shortcutWithSize(img, type, params.imgType, params.quality, params.bounds, params.zoomToDom ? scaleX : 1)];\r\n case 2:\r\n targetImg = _a.sent();\r\n return [3, 4];\r\n case 3:\r\n targetImg = _canvas.toDataURL(params.imgType, params.quality);\r\n _a.label = 4;\r\n case 4: return [2, targetImg];\r\n }\r\n });\r\n });\r\n}\r\nfunction dataUrlToImage(dataUrl) {\r\n return new Promise(function (resolve, reject) {\r\n var image = new Image();\r\n image.onload = function () {\r\n resolve(image);\r\n };\r\n image.onerror = function (e) {\r\n reject(e);\r\n };\r\n image.src = dataUrl;\r\n });\r\n}\r\nfunction shortcutWithSize(img, type, imgType, quality, bounds, scale) {\r\n if (scale === void 0) { scale = 1; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var sx, sy, sw, sh, dw, dh, context, dataUrl, _a;\r\n return tslib_1.__generator(this, function (_b) {\r\n switch (_b.label) {\r\n case 0:\r\n if (!shortcutCanvas) {\r\n shortcutCanvas = createCanvas();\r\n }\r\n sx = bounds ? bounds.x || 0 : 0;\r\n sy = bounds ? bounds.y || 0 : 0;\r\n sw = bounds ? (bounds.width ? Math.min(bounds.width, width) : width) : width;\r\n sh = bounds ? (bounds.height ? Math.min(bounds.height, height) : height) : height;\r\n dw = sw * scale;\r\n dh = sh * scale;\r\n shortcutCanvas.width = dw;\r\n shortcutCanvas.height = dh;\r\n context = shortcutCanvas.getContext('2d');\r\n context.drawImage(img, sx, sy, sw, sh, 0, 0, dw, dh);\r\n dataUrl = shortcutCanvas.toDataURL('image/' + imgType, quality);\r\n _a = type;\r\n switch (_a) {\r\n case 0: return [3, 1];\r\n case 1: return [3, 3];\r\n }\r\n return [3, 4];\r\n case 1: return [4, dataUrlToImage(dataUrl)];\r\n case 2: return [2, _b.sent()];\r\n case 3: return [2, dataUrl];\r\n case 4: return [2];\r\n }\r\n });\r\n });\r\n}\r\nfunction updateScaleModeSelf() {\r\n var parent = _canvas.parentElement;\r\n var containerWidth = parent.clientWidth;\r\n var containerHeight = parent.clientHeight;\r\n var designWidth = _designWidth || containerWidth;\r\n var designHeight = _designHeight || containerHeight;\r\n scaleX = containerWidth / designWidth;\r\n scaleY = containerHeight / designHeight;\r\n switch (_scaleMode) {\r\n case ScaleMode.SHOW_ALL:\r\n width = designWidth;\r\n height = designHeight;\r\n break;\r\n case ScaleMode.FIXED_WIDTH:\r\n width = designWidth;\r\n if (_modifyCanvasSize) {\r\n height = designHeight;\r\n }\r\n else {\r\n height = containerHeight / scaleX;\r\n }\r\n scaleY = scaleX;\r\n break;\r\n case ScaleMode.FIXED_HEIGHT:\r\n if (_modifyCanvasSize) {\r\n width = designWidth;\r\n }\r\n else {\r\n width = containerWidth / scaleY;\r\n }\r\n height = designHeight;\r\n scaleX = scaleY;\r\n break;\r\n }\r\n updateScaleMode(scaleX, scaleY, rotation);\r\n var styleWidth = _modifyCanvasSize ? designWidth * scaleX : containerWidth;\r\n var styleHeight = _modifyCanvasSize ? designHeight * scaleY : containerHeight;\r\n _canvas.width = width;\r\n _canvas.height = height;\r\n _canvas.style.display = 'block';\r\n _canvas.style.width = styleWidth + 'px';\r\n _canvas.style.height = styleHeight + 'px';\r\n}\r\n//# sourceMappingURL=RenderContext.js.map"}
{"map":"{\"version\":3,\"file\":\"manager.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/manager.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAC,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,YAAY,IAAI,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAC,KAAK,EAAE,SAAS,EAAE,YAAY,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC7F,OAAO,yBAAyB,CAAC;AAMjC,IAAI,OAAO,GAAQ;IAClB,GAAG,EAAE,EAAE;IACP,WAAW,EAAE,GAAG;IAChB,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,SAAS,CAAC,WAAW;CAChC,CAAC;AAEF,IAAI,IAAY,CAAC;AAEjB,IAAI,MAAM,GAAG,CAAC,EAAE,aAAa,GAAG,CAAC,CAAC;AAClC,IAAI,OAAO,EAAE,MAAM,CAAC;AACpB,IAAI,OAAO,GAAG,CAAC,CAAC;AAMhB,MAAM,UAAU,KAAK,CAAC,QAAS;IAC9B,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEvB,IAAA,uBAAM,EAAE,iCAAW,EAAE,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CAAC,CAAC;IACnC,CAAC,CAAC,CAAA;AACH,CAAC;AAMD,SAAS,UAAU,CAAC,KAAK;IACxB,iBAAiB,CAAC,IAAI,EAAE,UAAU,KAAK;QACtC,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC,CAAC,CAAA;AACH,CAAC\"}","code":"import { Entity, traverse, traversePostorder } from \"./Entity\";\r\nimport { injectProp } from \"../tools/utils\";\r\nimport { setupContext as setupInteractContext } from \"./context/InteractContext\";\r\nimport { clear, ScaleMode, setupContext as setupRenderContext } from \"./context/RenderContext\";\r\nimport './requestAnimationFrame';\r\nvar options = {\r\n fps: 60,\r\n designWidth: 750,\r\n designHeight: 1334,\r\n scaleMode: ScaleMode.FIXED_WIDTH,\r\n};\r\nvar root;\r\nvar _flush = 0, _currentFlush = 0;\r\nvar tsStart, tsLast;\r\nvar lastFPS = 0;\r\nexport function setup(_options) {\r\n injectProp(options, _options);\r\n var canvas = options.canvas, designWidth = options.designWidth, designHeight = options.designHeight, scaleMode = options.scaleMode, modifyCanvasSize = options.modifyCanvasSize;\r\n var canvasElement = typeof canvas == 'object' ? canvas : document.getElementById(canvas);\r\n setupInteractContext({\r\n canvas: canvasElement,\r\n touchHandler: {\r\n onTouchBegin: onTouchBegin,\r\n onTouchMove: onTouchMove,\r\n onTouchEnd: onTouchEnd,\r\n }\r\n });\r\n setupRenderContext({\r\n canvas: canvasElement,\r\n designWidth: designWidth,\r\n designHeight: designHeight,\r\n scaleMode: scaleMode,\r\n modifyCanvasSize: modifyCanvasSize,\r\n });\r\n root = new Entity('root');\r\n root._restrict();\r\n}\r\nexport function start() {\r\n root.enabled = true;\r\n tsStart = Date.now();\r\n startTick();\r\n}\r\nexport function pause() {\r\n root.enabled = false;\r\n stopTick();\r\n}\r\nexport function getRoot() {\r\n return root;\r\n}\r\nexport function getFPS() {\r\n return lastFPS;\r\n}\r\nfunction startTick() {\r\n _flush = 60 / options.fps - 1 >> 0;\r\n if (_flush < 0) {\r\n _flush = 0;\r\n }\r\n requestAnimationFrame(flush);\r\n}\r\nfunction stopTick() {\r\n}\r\nvar tsLast2;\r\nfunction flush(tsNow) {\r\n if (_flush == 0) {\r\n onFrameTick(tsNow);\r\n }\r\n else {\r\n if (_currentFlush == 0) {\r\n onFrameTick(tsNow);\r\n _currentFlush = _flush;\r\n }\r\n else {\r\n _currentFlush--;\r\n }\r\n }\r\n requestAnimationFrame(flush);\r\n}\r\nfunction onFrameTick(tsNow) {\r\n clear();\r\n var tsNow2 = Date.now();\r\n lastFPS = Math.floor(1000 / (tsNow - tsLast));\r\n tsLast = tsNow;\r\n tsLast2 = tsNow2;\r\n var ts = tsNow - tsStart;\r\n traverse(root, function (child) {\r\n if (!child.isFree && child.enabled) {\r\n child.onUpdate(ts);\r\n }\r\n else {\r\n return true;\r\n }\r\n }, -1, true, function (current) {\r\n current.afterUpdate();\r\n });\r\n}\r\nfunction onTouchBegin(event) {\r\n traversePostorder(root, function (child) {\r\n return child.onInteract(0, event);\r\n });\r\n}\r\nfunction onTouchMove(event) {\r\n traversePostorder(root, function (child) {\r\n return child.onInteract(1, event);\r\n });\r\n}\r\nfunction onTouchEnd(event) {\r\n traversePostorder(root, function (child) {\r\n return child.onInteract(2, event);\r\n });\r\n}\r\n//# sourceMappingURL=manager.js.map"}
{"map":"{\"version\":3,\"file\":\"Bounds.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/Bounds.ts\"],\"names\":[],\"mappings\":\"AAQA;IAMC,gBAAY,CAAK,EAAE,CAAK,EAAE,KAAS,EAAE,MAAU;QAAnC,kBAAA,EAAA,KAAK;QAAE,kBAAA,EAAA,KAAK;QAAE,sBAAA,EAAA,SAAS;QAAE,uBAAA,EAAA,UAAU;QAC9C,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;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AAC,EAAE,QAAC,EAAE,gBAAK,EAAE,kBAAc,CAAC;QACnC,OAAO,KAAK,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,GAAG,UAAU,GAAG,KAAK,GAAG,WAAW,GAAG,MAAM,GAAG,GAAG,CAAC;IACjF,CAAC;IACF,aAAC;AAAD,CAAC,AAjHD,IAiHC\"}","code":"var Bounds = (function () {\r\n function Bounds(x, y, width, height) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (width === void 0) { width = 0; }\r\n if (height === void 0) { height = 0; }\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n }\r\n Object.defineProperty(Bounds.prototype, \"left\", {\r\n get: function () {\r\n return this.x;\r\n },\r\n set: function (v) {\r\n this.x = v;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Bounds.prototype, \"top\", {\r\n get: function () {\r\n return this.y;\r\n },\r\n set: function (v) {\r\n this.y = v;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Bounds.prototype, \"right\", {\r\n get: function () {\r\n return this.x + this.width;\r\n },\r\n set: function (v) {\r\n this.width = v - this.x;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Bounds.prototype, \"bottom\", {\r\n get: function () {\r\n return this.y + this.height;\r\n },\r\n set: function (v) {\r\n this.height = v - this.y;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Bounds.prototype.contains = function (x, y) {\r\n return this.x <= x &&\r\n this.x + this.width >= x &&\r\n this.y <= y &&\r\n this.y + this.height >= y;\r\n };\r\n Bounds.prototype.setTo = function (x, y, width, height) {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n };\r\n Bounds.prototype.copyFrom = function (target) {\r\n this.x = target.x;\r\n this.y = target.y;\r\n this.width = target.width;\r\n this.height = target.height;\r\n };\r\n Bounds.prototype.clone = function () {\r\n return new Bounds(this.x, this.y, this.width, this.height);\r\n };\r\n Bounds.prototype.inflate = function (dx, dy) {\r\n this.x -= dx;\r\n this.width += 2 * dx;\r\n this.y -= dy;\r\n this.height += 2 * dy;\r\n };\r\n Bounds.prototype.isEmpty = function () {\r\n return this.width <= 0 || this.height <= 0;\r\n };\r\n Bounds.prototype.setEmpty = function () {\r\n this.x = 0;\r\n this.y = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n };\r\n Bounds.prototype.intersects = function (toIntersect) {\r\n return Math.max(this.x, toIntersect.x) <= Math.min(this.right, toIntersect.right)\r\n && Math.max(this.y, toIntersect.y) <= Math.min(this.bottom, toIntersect.bottom);\r\n };\r\n Bounds.prototype.containsBounds = function (bounds) {\r\n var r1 = bounds.x + bounds.width;\r\n var b1 = bounds.y + bounds.height;\r\n var r2 = this.x + this.width;\r\n var b2 = this.y + this.height;\r\n return (bounds.x >= this.x) && (bounds.x < r2) && (bounds.y >= this.y) && (bounds.y < b2) && (r1 > this.x) && (r1 <= r2) && (b1 > this.y) && (b1 <= b2);\r\n };\r\n Bounds.prototype.equals = function (toCompare) {\r\n if (this === toCompare) {\r\n return true;\r\n }\r\n return this.x === toCompare.x && this.y === toCompare.y\r\n && this.width === toCompare.width && this.height === toCompare.height;\r\n };\r\n Bounds.prototype.toString = function () {\r\n var _a = this, x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n return \"(x=\" + x + \", y=\" + y + \", width=\" + width + \", height=\" + height + \")\";\r\n };\r\n return Bounds;\r\n}());\r\nexport default Bounds;\r\n//# sourceMappingURL=Bounds.js.map"}
{"map":"{\"version\":3,\"file\":\"Size.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/Size.ts\"],\"names\":[],\"mappings\":\";AAGA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAKtD;IAQC,cAAY,KAAW,EAAE,MAAY;QAAzB,sBAAA,EAAA,WAAW;QAAE,uBAAA,EAAA,YAAY;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;IAED,qBAAM,GAAN;QACC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;IACnB,CAAC;IAED,sBAAO,GAAP;IAEA,CAAC;IAED,kBAAG,GAAH,UAAI,KAAM,EAAE,MAAO;QAClB,IAAI,KAAK,KAAK,SAAS,EAAE;YACxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACnB;QAED,IAAI,MAAM,KAAK,SAAS,EAAE;YACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;SACrB;IACF,CAAC;IAED,oBAAK,GAAL;QACC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,uBAAQ,GAAR,UAAS,MAAM;QACd,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,uBAAQ,GAAR,UAAS,KAAK,EAAE,GAAG,EAAE,QAAQ;QAC5B,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAzCD;QADC,iBAAiB;uCACJ;IAEd;QADC,iBAAiB;wCACH;IAwChB,WAAC;CAAA,AA5CD,IA4CC;eA5CoB,IAAI\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { dirtyFieldTrigger } from \"../tools/decorators\";\r\nvar Size = (function () {\r\n function Size(width, height) {\r\n if (width === void 0) { width = NaN; }\r\n if (height === void 0) { height = NaN; }\r\n this.width = width;\r\n this.height = height;\r\n }\r\n Size.prototype.setNaN = function () {\r\n this.width = NaN;\r\n this.height = NaN;\r\n };\r\n Size.prototype.isEmpty = function () {\r\n };\r\n Size.prototype.set = function (width, height) {\r\n if (width !== undefined) {\r\n this.width = width;\r\n }\r\n if (height !== undefined) {\r\n this.height = height;\r\n }\r\n };\r\n Size.prototype.clone = function () {\r\n return new Size(this.width, this.height);\r\n };\r\n Size.prototype.copyFrom = function (target) {\r\n this.width = target.width;\r\n this.height = target.height;\r\n };\r\n Size.prototype.onModify = function (value, key, oldValue) {\r\n this.onChange && this.onChange(value, key, oldValue);\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Size.prototype, \"width\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], Size.prototype, \"height\", void 0);\r\n return Size;\r\n}());\r\nexport default Size;\r\n//# sourceMappingURL=Size.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/index.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AACzC,OAAO,EAAC,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,yBAAyB,CAAC;AACnI,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAC,OAAO,IAAI,OAAO,EAAE,aAAa,EAAC,MAAM,WAAW,CAAA;AAC3D,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA\"}","code":"export { ScillaComponent } from \"./ScillaComponent\";\r\nexport { Entity } from './Entity';\r\nexport { Scene } from './Scene';\r\nexport { ScillaEvent } from './ScillaEvent';\r\nexport { getContext, createCanvas, getStageSize, getStageScale, getStageCenter, shortcut, ScaleMode } from './context/RenderContext';\r\nexport * from './manager';\r\nexport { default as Texture, createTexture } from './Texture';\r\nexport * from './Sheet';\r\nexport * from './FrameAnimation';\r\n//# sourceMappingURL=index.js.map"}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t["scilla-kuwo"]={})}(this,function(t){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function n(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function e(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;0<=s;s--)(o=t[s])&&(a=(r<3?o(a):3<r?o(e,n,a):o(e,n))||a);return 3<r&&a&&Object.defineProperty(e,n,a),a}function s(r,a,s,h){return new(s||(s=Promise))(function(t,e){function n(t){try{o(h.next(t))}catch(t){e(t)}}function i(t){try{o(h.throw(t))}catch(t){e(t)}}function o(e){e.done?t(e.value):new s(function(t){t(e.value)}).then(n,i)}o((h=h.apply(r,a||[])).next())})}function l(n,i){var o,r,a,t,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,r&&(a=2&e[0]?r.return:e[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,e[1])).done)return a;switch(r=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return s.label++,{value:e[1],done:!1};case 5:s.label++,r=e[1],e=[0];continue;case 7:e=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){s=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){s.label=e[1];break}if(6===e[0]&&s.label<a[1]){s.label=a[1],a=e;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(e);break}a[2]&&s.ops.pop(),s.trys.pop();continue}e=i.call(n,s)}catch(t){e=[6,t],r=0}finally{o=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}function b(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function o(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function f(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t}var r=0;var a=function(){function t(){this._hashCode=++r}return Object.defineProperty(t.prototype,"hashCode",{get:function(){return this._hashCode},enumerable:!0,configurable:!0}),t}();function h(t,e,n,i,o){if(void 0===i&&(i=!0),void 0===o&&(o=!0),!t||!e)return!1;for(var r in e){var a=e[r];i&&"function"==typeof a||o&&null==a||(n?n(t,r,a):t[r]=a)}return!0}var p={lineHeightRatio:1.2,entityEnabled:!0,componentEnabled:!0,awakeComponentWhenAdded:!0,sleepComponentWhenRemoved:!0,drawRenderRect:!1,imgCrossOrigin:!0};var c=["_dealGlobalTouchBegin","_dealGlobalTouchMove","_dealGlobalTouchEnd"],u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delayCallbacks=[],t._enabled=p.componentEnabled,t}return n(t,e),Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(t){this._enabled!==t&&(this._enabled=t,this.entity&&this.entity.isActive&&(this._enabled?this.onEnable():this.onDisable()))},enumerable:!0,configurable:!0}),t.prototype._setup=function(t){this.entity=t,this.onCreate()},t.prototype._unSetup=function(){this.entity=null,this.onDestroy()},t.prototype.onCreate=function(){},t.prototype.onAwake=function(){this._firstUpdate=!0},t.prototype.onEnable=function(){},t.prototype.onDisable=function(){},t.prototype.$onUpdate=function(t){this.onUpdate(t),this._firstUpdate||this.invokeDelayCallback(t),this._firstUpdate=!1},t.prototype.invokeDelayCallback=function(t){var e,n,i=[];0<=this.entity.name.indexOf("progress")&&console.log();for(var o=0,r=this.delayCallbacks.length;o<r;o++){var a=this.delayCallbacks[o],s=a.callback;a.once&&i.push(o),s.call(this,t)}try{for(var h=b(i),c=h.next();!c.done;c=h.next()){var u=c.value;this.delayCallbacks.splice(u,1)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}},t.prototype.onUpdate=function(t){},t.prototype.afterUpdate=function(){},t.prototype.onSleep=function(){},t.prototype.onDestroy=function(){},t.prototype.onModify=function(t,e,n){},t.prototype.getDelayCallback=function(t){var e,n,i;try{for(var o=b(this.delayCallbacks),r=o.next();!r.done;r=o.next()){var a=r.value;if(a.callback==t){i=a;break}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return i},t.prototype.callOnNextTick=function(t,e){void 0===e&&(e=!0),this.getDelayCallback(t)||this.delayCallbacks.push({callback:t,once:e})},t.prototype.cancelOnNextTick=function(t){var e=this.getDelayCallback(t),n=this.delayCallbacks.indexOf(e);0<=n&&this.delayCallbacks.splice(n,1)},t.prototype.onInteract=function(t,e){try{return this[c[t]](e)&&this.touchInterrupt}catch(t){console.warn(t)}},t.prototype._dealGlobalTouchBegin=function(t){return this.onGlobalTouchBegin(t)},t.prototype._dealGlobalTouchMove=function(t){return this.onGlobalTouchMove(t)},t.prototype._dealGlobalTouchEnd=function(t){return this.onGlobalTouchEnd(t)},t.prototype.onGlobalTouchBegin=function(t){},t.prototype.onGlobalTouchMove=function(t){},t.prototype.onGlobalTouchEnd=function(t){},Object.defineProperty(t.prototype,"transform",{get:function(){return this.entity.getComponent("components/base/Transform")},enumerable:!0,configurable:!0}),t.prototype.broadcast=function(t,e){void 0===e&&(e=-1);for(var n,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];(n=this.entity).broadcast.apply(n,f([t,e],i))},t.prototype.bubbling=function(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];(e=this.entity).bubbling.apply(e,f([t],n))},t}(a);function d(t,e,n,i,o){void 0===n&&(n=-1),void 0===i&&(i=!1);for(var r,a,s,h=[],c=5;c<arguments.length;c++)h[c-5]=arguments[c];if(i&&e.apply(void 0,f([t],h)),0!==n)try{for(var u=b(t.children),l=u.next();!l.done;l=u.next()){var p=l.value;e.apply(void 0,f([p],h))?s=!0:0<p.children.length&&d.apply(void 0,f([p,e,n-1,!1,o],h))}}catch(t){r={error:t}}finally{try{l&&!l.done&&(a=u.return)&&a.call(u)}finally{if(r)throw r.error}}!s&&o&&o(t)}function y(t,e,n,i,o){void 0===n&&(n=-1),void 0===i&&(i=!1);for(var r=[],a=5;a<arguments.length;a++)r[a-5]=arguments[a];if(0!==n)for(var s=t.children.length-1;0<=s;s--){var h=t.children[s];if(y.apply(void 0,f([h,e,n-1,!1,o],r)))return!0;if(e.apply(void 0,f([h],r)))return!0}i&&e.apply(void 0,f([t],r)),o&&o(t)}var v,g,m,_,x,w,C,O,P,M=function(i){function t(t,e){var n=i.call(this)||this;return n.name="Entity",n._isFree=!0,n._enabled=p.entityEnabled,n._parent=null,n._children=[],n._components=[],n.invokeOnEntity=function(t,n){for(var i=[],e=2;e<arguments.length;e++)i[e-2]=arguments[e];var o=!1;if(t.forEachComponent(function(t){var e=t[n];e&&(e.apply(t,i)&&(o=!0));return!1}),o)return!0},t&&(n.name=t),e&&(n._uuid=e),n}return n(t,i),Object.defineProperty(t.prototype,"uuid",{get:function(){return this._uuid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,d(this,function(t){return t._invokeEnabledState(e),!1},-1,!0))},enumerable:!0,configurable:!0}),t.prototype._invokeEnabledState=function(t){this._enabled&&t?this.onEnable():this._enabled||t||this.onDisable()},Object.defineProperty(t.prototype,"isParentActive",{get:function(){return this._parent&&this._parent.enabled&&!this._parent.isFree},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isActive",{get:function(){return this.isParentActive&&this._enabled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFree",{get:function(){return this._isFree},enumerable:!0,configurable:!0}),t.prototype._free=function(){this._isFree=!0,d(this,function(t){return t._free(),!1},1)},t.prototype._restrict=function(){this._isFree=!1,d(this,function(t){return t._restrict(),!1},1)},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),t.prototype.containsChild=function(t){return 0<=this.getChildIndex(t)},t.prototype._onChildAdded=function(t){!(t._parent=this)._isFree&&t._isFree&&(t.isParentActive&&t._invokeEnabledState(!0),t._restrict())},t.prototype._onChildRemoved=function(t){t._parent=null,this._isFree||t._isFree||(t.isActive&&t._invokeEnabledState(!1),t._free())},t.prototype.addChild=function(t){this.addChildAt(t,this._children.length)},t.prototype.addChildAt=function(t,e){t.parent&&t.parent!==this&&t.parent.removeChild(t);var n=this.getChildIndex(t);e<0||n==e||(e=Math.min(this._children.length,e),0<=n||e<this._children.length?(0<=n&&this._children.splice(n,1),this._children.splice(e,0,t)):this._children.push(t),this._onChildAdded(t))},t.prototype.removeChild=function(t){var e=this.getChildIndex(t);0<=e&&this.removeChildAt(e)},t.prototype.removeChildAt=function(t){var e=this._children[t];this._onChildRemoved(e),this._children.splice(t,1)},t.prototype.getChildIndex=function(t){return this._children.indexOf(t)},t.prototype.getChildByIndex=function(t){return this._children[t]},t.prototype.removeChildren=function(){for(;0<this._children.length;)this.removeChildAt(0)},Object.defineProperty(t.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),t.prototype.addComponent=function(t){this.onAddComponent(t),this._components.push(t)},t.prototype.addComponentAt=function(t,e){var n=this._components.indexOf(t);n!=e&&(0<=n&&this._components.splice(n,1),this._components.splice(e,0,t),this.onAddComponent(t))},t.prototype.removeComponent=function(t){this.onRemoveComponent(t);var e=this._components.indexOf(t);0<=e&&this._components.splice(e,1)},t.prototype.removeAllComponents=function(){for(;0<this._components.length;)this.removeComponent(this._components[0])},t.prototype.getComponents=function(e){return this._components.filter(function(t){return"string"==typeof e?t.constructor.__class__===e:t instanceof e})},t.prototype.getComponent=function(t){return this.getComponents(t)[0]},Object.defineProperty(t.prototype,"components",{get:function(){return this._components},enumerable:!0,configurable:!0}),t.prototype.forEachComponent=function(t){var e,n;try{for(var i=b(this._components),o=i.next();!o.done;o=i.next()){if(t(o.value))break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},t.prototype.onEnable=function(){this.forEachComponent(function(t){if(t.enabled)return t.onAwake()})},t.prototype.onDisable=function(){this.forEachComponent(function(t){if(t.enabled)return t.onSleep()})},t.prototype.onUpdate=function(e){this.forEachComponent(function(t){if(t.enabled)return t.$onUpdate(e)})},t.prototype.afterUpdate=function(){this.forEachComponent(function(t){if(t.enabled)return t.afterUpdate()})},t.prototype.onInteract=function(e,n){if(this.isFree||!this.enabled)return!1;var i=!1;return this.forEachComponent(function(t){if(t.enabled&&t.interactable)return t.onInteract(e,n)&&(i=!0),!1}),i},t.prototype.onAddComponent=function(t){t._setup(this),p.awakeComponentWhenAdded&&this.awakeComponent(t)},t.prototype.awakeComponent=function(t){!this._isFree&&this._enabled&&t.onAwake()},t.prototype.onRemoveComponent=function(t){p.sleepComponentWhenRemoved&&this.sleepComponent(t),t._unSetup()},t.prototype.sleepComponent=function(t){!this._isFree&&this._enabled&&t.onSleep()},t.prototype.broadcast=function(t,e){void 0===e&&(e=-1);for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];d.apply(void 0,f([this,this.invokeOnEntity,e,!0,null,t],n))},t.prototype.bubbling=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];(function(t,e,n){void 0===n&&(n=!1);for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];n&&e.apply(void 0,f([t],i));for(var r=t;(r=r.parent)&&!e.apply(void 0,f([r],i)););}).apply(void 0,f([this,this.invokeOnEntity,!1,t],e))},t}(a),A=function(){function t(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.x=t,this.y=e,this.width=n,this.height=i}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},set:function(t){this.x=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},set:function(t){this.y=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},set:function(t){this.width=t-this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},set:function(t){this.height=t-this.y},enumerable:!0,configurable:!0}),t.prototype.contains=function(t,e){return this.x<=t&&this.x+this.width>=t&&this.y<=e&&this.y+this.height>=e},t.prototype.setTo=function(t,e,n,i){this.x=t,this.y=e,this.width=n,this.height=i},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.inflate=function(t,e){this.x-=t,this.width+=2*t,this.y-=e,this.height+=2*e},t.prototype.isEmpty=function(){return this.width<=0||this.height<=0},t.prototype.setEmpty=function(){this.x=0,this.y=0,this.width=0,this.height=0},t.prototype.intersects=function(t){return Math.max(this.x,t.x)<=Math.min(this.right,t.right)&&Math.max(this.y,t.y)<=Math.min(this.bottom,t.bottom)},t.prototype.containsBounds=function(t){var e=t.x+t.width,n=t.y+t.height,i=this.x+this.width,o=this.y+this.height;return t.x>=this.x&&t.x<i&&t.y>=this.y&&t.y<o&&e>this.x&&e<=i&&n>this.y&&n<=o},t.prototype.equals=function(t){return this===t||this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height},t.prototype.toString=function(){return"(x="+this.x+", y="+this.y+", width="+this.width+", height="+this.height+")"},t}(),I=navigator.userAgent.toLowerCase(),T=-1!==I.indexOf("mobile")||-1!==I.indexOf("android");function k(t){void 0===t&&(t={});var e=t.canvas,n=t.touchHandler;g=n,v=e,window.navigator.msPointerEnabled?(v.addEventListener("MSPointerDown",function(t){t.identifier=t.pointerId,D(t),E(t)},!1),v.addEventListener("MSPointerMove",function(t){t.identifier=t.pointerId,S(t),E(t)},!1),v.addEventListener("MSPointerUp",function(t){t.identifier=t.pointerId,j(t),E(t)},!1)):(T||(v.addEventListener("mousedown",D),v.addEventListener("mousemove",L),v.addEventListener("mouseup",j)),v.addEventListener("touchstart",function(t){for(var e=t.changedTouches.length,n=0;n<e;n++)D(t.changedTouches[n]);E(t)},!1),v.addEventListener("touchmove",function(t){for(var e=t.changedTouches.length,n=0;n<e;n++)S(t.changedTouches[n]);E(t)},!1),v.addEventListener("touchend",function(t){for(var e=t.changedTouches.length,n=0;n<e;n++)j(t.changedTouches[n]);E(t)},!1),v.addEventListener("touchcancel",function(t){for(var e=t.changedTouches.length,n=0;n<e;n++)j(t.changedTouches[n]);E(t)},!1))}function E(t){t.stopPropagation(),1==t.isScroll||v.userTyping||t.preventDefault()}function D(t){var e=F(t);g.onTouchBegin(e)}function L(t){0===t.buttons?j(t):S(t)}function S(t){var e=F(t);g.onTouchMove(e)}function j(t){var e=F(t);g.onTouchEnd(e)}function F(t){var e=document.documentElement,n=v.getBoundingClientRect(),i=n.left+window.pageXOffset-e.clientLeft,o=n.top+window.pageYOffset-e.clientTop,r=t.pageX-i,a=r,s=t.pageY-o,h=s;return 90===x?(a=s,h=n.width-r):-90===x&&(a=n.height-s,h=r),a/=m,h/=_,{x:Math.round(a),y:Math.round(h),identifier:t.identifier||0}}var N,R,q,G,U,W,B=0,H={SHOW_ALL:"showAll",FIXED_WIDTH:"fixedWidth",FIXED_HEIGHT:"fixedHeight"};function z(t){void 0===t&&(t={});var e=t.canvas,n=t.designWidth,i=t.designHeight,o=t.scaleMode,r=void 0===o?H.SHOW_ALL:o,a=t.modifyCanvasSize;q=n,G=i,U=r,W=void 0!==a&&a,C=(w=e).getContext("2d"),function(){var t=w.parentElement,e=t.clientWidth,n=t.clientHeight,i=q||e,o=G||n;switch(N=e/i,R=n/o,U){case H.SHOW_ALL:O=i,P=o;break;case H.FIXED_WIDTH:O=i,P=W?o:n/N,R=N;break;case H.FIXED_HEIGHT:O=W?i:e/R,P=o,N=R}r=N,a=R,s=B,m=r,_=a,x=s;var r,a,s;var h=W?i*N:e,c=W?o*R:n;w.width=O,w.height=P,w.style.display="block",w.style.width=h+"px",w.style.height=c+"px"}()}function X(){return document.createElement("canvas")}var Y=function(e){function t(){var t=e.call(this)||this;return t.bounds=new A,t}return n(t,e),t.prototype.setFrame=function(t){var e=t.x,n=t.y,i=t.w,o=t.h;this.bounds.setTo(e,n,i,o)},t.prototype.setImg=function(t){this.img=t},Object.defineProperty(t.prototype,"width",{get:function(){return this.bounds.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.bounds.height},enumerable:!0,configurable:!0}),t.prototype.getCacheCanvas=function(){var t=this.bounds,e=t.width,n=t.height,i=this._cacheCanvas;i||(i=this._cacheCanvas=X()),i.width=e,i.height=n;var o=i.getContext("2d");return this.drawToCanvas(o),i},t.prototype.drawToCanvas=function(t,e,n,i,o,r,a){void 0===e&&(e=0),void 0===n&&(n=0);var s=this.bounds,h=s.x,c=s.y,u=s.width,l=s.height;t.drawImage(this.img,i||h,o||c,u,l,e,n,r||u,a||l)},t.prototype.destroy=function(){this.img=null,this.bounds=null,this.destroyCacheCanvas()},t.prototype.destroyCacheCanvas=function(){this._cacheCanvas=null},t}(a);function $(t,e){var n=new Y;return n.setImg(t),n.setFrame(e||{x:0,y:0,w:t.width,h:t.height}),n}var V=function(i){function t(t,e){var n=i.call(this)||this;return n._textureCache={},t&&(n.img=t),e&&(n.frames=e),n}return n(t,i),t.prototype.generateAll=function(){for(var t in this.frames)this.generateTexture(t)},t.prototype.generateTexture=function(t,e){void 0===e&&(e=!1);var n=this.img,i=this.frames,o=this._textureCache;if(!e&&o[t])return o[t];var r=i[t];return r?o[t]=$(n,r):void 0},t.prototype.hasTexture=function(t){return!!frames[t]},t.prototype.getTexture=function(t){var e=this._textureCache[t];return e||this.generateTexture(t)},t.prototype.getAllTextures=function(){return this._textureCache},t.prototype.destroy=function(){for(var t in this.img=null,this._textureCache)this._textureCache[t].destroy(),delete this._textureCache[t]},t}(a),Q={},Z={},J={};var K=function(){function t(t){this._name=t}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.fillMcData=function(t){var e=Z[t];e?this._animData=e:console.warn("anim data ["+t+"] is not exist")},Object.defineProperty(t.prototype,"fps",{get:function(){return this._animData.frameRate},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"labels",{get:function(){return this._animData.labels},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"frameCount",{get:function(){return this._animData.frames.length},enumerable:!0,configurable:!0}),t.prototype.getLabel=function(t){var e,n,i;try{for(var o=b(this._animData.labels),r=o.next();!r.done;r=o.next()){var a=r.value;if(a.name==t){i=a;break}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return i},t.prototype.getFrame=function(t){var e,n,i=this._animData;if(i&&(n=i.frames[t])){var o=n.res;(e=J[o])||(e=J[o]=i.sheet.getTexture(o))}return{texture:e,data:n}},t.prototype.destroy=function(){this._animData=null},t}(),tt={},et="",nt={".json":at,".json5":st,".txt":rt,".png":lt,".jpg":lt,".svg":lt,".bimg":function(i,o,r,t){void 0===r&&(r=!0);return s(this,void 0,void 0,function(){var e,n;return l(this,function(t){switch(t.label){case 0:return[4,function(n,i,t,o){void 0===t&&(t=!0);return s(this,void 0,void 0,function(){var e;return l(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,ot(n,i,!1,o,void 0,"blob")];case 1:return[4,function(e){return s(this,void 0,void 0,function(){var o;return l(this,function(t){switch(t.label){case 0:return[4,(i=e,new Promise(function(e,n){var t=new FileReader;t.readAsDataURL(i),t.onload=function(t){e(t.target.result)},t.onerror=function(t){n(t)}}))];case 1:return o=t.sent(),[2,new Promise(function(t,e){var n=new Image;p.imgCrossOrigin&&n.setAttribute("crossOrigin","anonymous"),n.onload=function(){t(n)},n.onerror=function(t){e(t)},n.src=o})]}var i})})}(t.sent())];case 2:return[2,t.sent()];case 3:return e=t.sent(),console.log(e),[3,4];case 4:return[2]}})})}(i,o,!1)];case 1:return e=t.sent(),n=$(e),r&&dt(n,i,o),[2,n]}})})},".sht":ht,".sht-disperse":function(c,t,e,u){void 0===e&&(e=!0);return s(this,void 0,void 0,function(){var e,n,i,o,r,a,s,h;return l(this,function(t){switch(t.label){case 0:t.trys.push([0,5,6,7]),i=b(u.textures),o=i.next(),t.label=1;case 1:return o.done?[3,4]:(r=o.value,a=r.name,s=r.uuid,[4,lt(c.replace("-disperse","")+"/"+a.replace("_","/")+".png",s)]);case 2:t.sent(),t.label=3;case 3:return o=i.next(),[3,1];case 4:return[3,7];case 5:return h=t.sent(),e={error:h},[3,7];case 6:try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}return[7];case 7:return[2,null]}})})},".fnt":function(e,n,i,t){void 0===i&&(i=!0);return ht(e,null,!1).then(function(t){return i&&dt(t,e,n),t})},".anim":function(t,e,u,l){void 0===u&&(u=!0);var n=t.substring(0,t.lastIndexOf("."))+".png";return Promise.all([at(t,null,!1),ut(n,null,!1)]).then(function(t){var e=t[0],n=t[1];!function(t,e){var n=e.mc,i=e.res,o=new V(t,i);for(var r in n)(Z[r]=n[r]).sheet=o}(n,e);var i,o,r=[];for(var a in e.mc){var s=(o=void 0,(o=Q[i=a])||(o=Q[i]=new K(i)).fillMcData(i),o);if(u){var h=a;if(l){var c=ct(l.animations,a);h=c.uuid}dt(s,a,h)}r.push(s)}return r})}};function it(t,s){var h=t.length,c=0;return Promise.all(t.map(function(t){var e,n,i,o,r,a;return(n="string"==typeof t?t:t.url)?("string"==typeof t?e=ft(n):(e=t.uuid||ft(n),o=t.ext,i=t.config),(a=n,r=(r=o)||a.substr(a.lastIndexOf(".")),nt[r]||ot)(n,e,!0,i).then(function(t){return c++,s&&s(c/h),t})):Promise.resolve()}))}function ot(i,t,e,n,o,r){return void 0===e&&(e=!0),void 0===o&&(o={}),void 0===r&&(r="arraybuffer"),s(this,void 0,void 0,function(){var e,n;return l(this,function(t){switch(t.label){case 0:return[4,fetch(pt(i),o)];case 1:switch(e=t.sent(),r){case"json":n=e.json();break;case"text":n=e.text();break;case"arraybuffer":n=e.arrayBuffer();break;case"blob":n=e.blob()}return[4,n];case 2:return[2,t.sent()]}})})}function rt(e,n,t,i){void 0===t&&(t=!0);var o=ot(e,0,t,0,void 0,"text");return t&&o.then(function(t){return dt(t,e,n),t}),o}function at(e,n,t,i){void 0===t&&(t=!0);var o=ot(e,0,t,0,void 0,"json");return t&&o.then(function(t){return dt(t,e,n),t}),o}function st(i,o,t,e){return void 0===t&&(t=!0),s(this,void 0,void 0,function(){var e,n;return l(this,function(t){switch(t.label){case 0:return[4,rt(i,o)];case 1:return e=t.sent(),dt(n=window.eval("("+e+")"),i,o),[2,n]}})})}function ht(f,d,y,v){void 0===y&&(y=!0);var t=f.substring(0,f.lastIndexOf("."))+".png";return Promise.all([at(f,null,!1),ut(t,null,!1)]).then(function(t){var e,n,i=t[0],o=t[1],r=new V(o,i.frames);if(r.generateAll(),y)if(dt(r,f,d),v)try{for(var a=b(v.textures),s=a.next();!s.done;s=a.next()){var h=s.value,c=h.name,u=h.uuid;dt(r.getTexture(c),c,u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}else{var l=r.getAllTextures();for(var p in l)dt(l[p],p,p)}return r})}function ct(t,e){var n;return t.some(function(t){if(t.name===e)return n=t,!0}),n}function ut(t,e,n,i){return void 0===n&&(n=!0),new Promise(function(e,n){var i=new Image;p.imgCrossOrigin&&i.setAttribute("crossOrigin","anonymous"),i.onload=function(t){e(i)},i.onerror=function(t){n(t)},i.src=pt(t)})}function lt(i,o,r,t){return void 0===r&&(r=!0),s(this,void 0,void 0,function(){var e,n;return l(this,function(t){switch(t.label){case 0:return[4,ut(i,0,!1)];case 1:return e=t.sent(),n=$(e),r&&dt(n,i,o),[2,n]}})})}function pt(t){return 0===t.indexOf("//")||0===t.indexOf("http:")||0===t.indexOf("https:")?t:et+t}function ft(t){return t.substring(t.lastIndexOf("/")+1,t.lastIndexOf("."))}function dt(t,e,n){n=n||ft(e),tt[n]=t}for(var yt=function(){function t(){this.resourceGroups={preload:[],delay:[]}}return t.prototype.initByConfig=function(t){this.config=t,this.name=t.name;var e=t["resource-groups"];for(var n in e)this.resourceGroups[n]=e[n]},t.prototype.loadResGroup=function(e,n){return s(this,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:return[4,it(this.resourceGroups[e],n)];case 1:return t.sent(),[2]}})})},t}(),vt=function(){function t(){this._subscribers=[]}return t.prototype.findListener=function(t){for(var e,n=this._subscribers,i=0,o=n.length;i<o;i++){var r=n[i];if(r.callback==t){e={subscriber:r,index:i};break}}return e},t.prototype.addListener=function(t,e,n){void 0===n&&(n=0);for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];if(t){var r=this._subscribers;this.findListener(t)||r.push({callback:t,thisObj:e,priority:n,params:i})}},t.prototype.once=function(t,e,n){void 0===n&&(n=0);for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];if(t){var r=this._subscribers;this.findListener(t)||r.push({callback:t,thisObj:e,priority:n,params:i,once:!0})}},t.prototype.removeListener=function(t){if(t){var e=this._subscribers,n=this.findListener(t);n&&e.splice(n.index,1)}},t.prototype.hasListener=function(t){return!!this.findListener(t)},t.prototype.invoke=function(){for(var e,t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=this._subscribers;o.sort(function(t,e){return t.priority-e.priority});try{for(var r=b(o),a=r.next();!a.done;a=r.next()){var s=a.value;if(s){var h=s.callback,c=s.thisObj,u=s.once,l=s.params.concat(n);try{h.apply(c,l)}catch(t){console.log(t)}u&&this.removeListener(h)}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},t}(),bt=0,gt=["webkit","moz"],mt=0;mt<gt.length&&!window.requestAnimationFrame;++mt)window.requestAnimationFrame=window[gt[mt]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[gt[mt]+"CancelAnimationFrame"]||window[gt[mt]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var e=(new Date).getTime(),n=Math.max(0,16.7-(e-bt)),i=window.setTimeout(function(){t(e+n)},n);return bt=e+n,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)});var _t,xt,wt={fps:60,designWidth:750,designHeight:1334,scaleMode:H.FIXED_WIDTH},Ct=0,Ot=0;function Pt(){_t.enabled=!0,xt=Date.now(),function(){(Ct=60/wt.fps-1>>0)<0&&(Ct=0);requestAnimationFrame(At)}()}function Mt(){_t.enabled=!1}function At(t){0==Ct?It(t):0==Ot?(It(t),Ot=Ct):Ot--,requestAnimationFrame(At)}function It(t){C.setTransform(1,0,0,1,0,0),C.clearRect(0,0,O,P);var e=t-xt;d(_t,function(t){if(t.isFree||!t.enabled)return!0;t.onUpdate(e)},-1,!0,function(t){t.afterUpdate()})}function Tt(e){y(_t,function(t){return t.onInteract(0,e)})}function kt(e){y(_t,function(t){return t.onInteract(1,e)})}function Et(e){y(_t,function(t){return t.onInteract(2,e)})}var Dt,Lt={},St={};function jt(t,e){(St[t]=e).__class__=t}function Ft(t,e){t.root=e;var n,i,o,r=t.config;return Dt=(n=r)["entity-cache"]?n["entity-cache"].concat():[],i=r.root,o=function t(e,n,i){var o=null;if(e){var r=e.name,a=e.uuid,s=e.children;if(void 0!==i&&void 0!==a&&(a=i+"_"+a),o=n||new M(r,a),0<=Dt.indexOf(a)&&(Lt[a]=o),s)for(var h=0,c=s.length;h<c;h++){var u=s[h],l=t(u,null,i);o.addChild(l)}n||(o.enabled=!e.disabled)}return o}(i,e),function t(e,n,i){if(void 0===i&&(i=!1),i&&Nt(n,e),e&&e.children)for(var o=0,r=n.children.length;o<r;o++){var a=e.children[o],s=n.children[o];Nt(s,a),t(a,s)}}(i,o,!0),function t(e,n,i,o){if(void 0===i&&(i=!1),i&&Rt(n,e,o),e&&e.children)for(var r=0,a=n.children.length;r<a;r++){var s=e.children[r],h=n.children[r];Rt(h,s,o),t(s,h,!1,o)}}(i,o,!0),Lt={},t}function Nt(t,e){var n,i;if(e.components)try{for(var o=b(e.components),r=o.next();!r.done;r=o.next()){qt(t,r.value)}}catch(t){n={error:t}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function Rt(t,e,n){if(e.components)for(var i=t.components,o=0,r=e.components.length;o<r;o++){var a=e.components[o].properties;a&&zt(i[o],a,n)}}function qt(t,e){var n=e.script,i=(e.properties,Gt(n));if(i){var o=new i;o.enabled=!e.disabled,t.addComponent(o)}}function Gt(t){var e;if(e=St[t])return e;console.warn("missing def:",t)}var Ut,Wt,Bt,Ht=["_type_","_constructor_"];function zt(t,e,n){if(t){for(var i in e)if(!(0<=Ht.indexOf(i))){var o=e[i],r=t[i];"object"==typeof o?r instanceof vt?$t(r,o,n):"raw"===o._type_?t[i]=r=o.data:(Array.isArray(o)&&!r&&(t[i]=r=[]),t[i]=Xt(r,o,n)):Yt(t,i,o,n)}}else console.warn("node is null.")}function Xt(t,e,n){if(void 0===t&&e._type_){var i=Gt(e._type_);if(i){var o=e._constructor_;t=o&&0<o.length?i.constructor.apply(null,o):new i}}return t&&zt(t,e,n),t}function Yt(t,e,n,i){var o;o="string"==typeof n?Vt(n,i):n,t[e]=o}function $t(t,e,n){var i,o;try{for(var r=b(e),a=r.next();!a.done;a=r.next()){var s=a.value,h=s.entity,c=s.component,u=s.method,l=s.param;if(h&&0<=c&&u){var p=Vt(h,n).components[c],f=p[u];f&&(null==l?t.addListener(f,p,0):t.addListener(f,p,0,l))}}}catch(t){i={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}}function Vt(t,e){var n,i,o;if(0==t.indexOf("res|")){var r=t.substr(4);n=tt[r]}else if(0==t.indexOf("entity|")){r=(i=t.substr(7),(o=e)?o+"_"+i:i);n=Lt[r]}else n=t;return n}function Qt(r,a){return s(this,void 0,void 0,function(){var o;return l(this,function(t){switch(t.label){case 0:return[4,function(i,t,e,n){void 0===e&&(e=!1);return s(this,void 0,void 0,function(){var e,n;return l(this,function(t){switch(t.label){case 0:return[4,st(i)];case 1:return e=t.sent(),(n=new yt).initByConfig(e),[2,n]}})})}("scenes/"+r+".scene")];case 1:return o=t.sent(),Wt=Object.keys(tt),[4,o.loadResGroup("preload",a)];case 2:return t.sent(),Ut&&(n=Ut,Mt(),(i=n.root).removeAllComponents(),i.removeChildren(),function(t){if(Array.isArray(t))for(;0<t.length;)delete tt[t.pop()];else delete tt[t]}(Wt)),e=Ut=o,Mt(),Ft(e,_t),Pt(),o.loadResGroup("delay",a),[2]}var e,n,i})})}Bt=function(n,i,t,e){return void 0===t&&(t=!0),s(this,void 0,void 0,function(){var e;return l(this,function(t){switch(t.label){case 0:return[4,st(n,i,!1)];case 1:return dt(e=t.sent(),n,i),[2,e]}})})},nt[".pfb"]=Bt;var Zt={};function Jt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i,o=function(t){var e=Zt[t];if(!e)throw new Error("group "+t+" not registered.");return e}(t),r=o.newFunc,a=o.initFunc,s=o.pool;return i=0==s.length?r():s.pop(),a.apply(void 0,f([i],e)),i}var Kt,te,ee,ne="Vector2D";function ie(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),Jt(ne,t,e)}te=function(){return new ae},ee=function(t,e,n){t.setXY(e,n)},Zt[Kt=ne]={name:Kt,newFunc:te,initFunc:ee,pool:[]};var oe,re,ae=function(){function t(t,e,n){void 0===t&&(t=0),void 0===e&&(e=0),this.onChange=n,this._x=0,this._y=0,this.setXY(t,e)}return Object.defineProperty(t,"zero",{get:function(){return se},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){if(this._x!==t){var e=this._x;this._x=t,this.onChange&&this.onChange(t,"x",e)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){if(this._y!==t){var e=this._y;this._y=t,this.onChange&&this.onChange(t,"y",e)}},enumerable:!0,configurable:!0}),t.prototype.setXY=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e,this},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.zero=function(){return this.x=0,this.y=0,this},Object.defineProperty(t.prototype,"isZero",{get:function(){return 0==this.x&&0==this.y},enumerable:!0,configurable:!0}),t.prototype.normalize=function(){var t=this.length;return 0==t?this.x=1:(this.x/=t,this.y/=t),this},Object.defineProperty(t.prototype,"isNormalized",{get:function(){return 1==this.length},enumerable:!0,configurable:!0}),t.prototype.truncate=function(t){return this.length=Math.min(t,this.length),this},t.prototype.reverse=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.dotProd=function(t){return this.x*t.x+this.y*t.y},t.prototype.crossProd=function(t){return this.x*t.y-this.y*t.x},t.prototype.distSQ=function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},t.prototype.distance=function(t){return Math.sqrt(this.distSQ(t))},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.subtract=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},t.prototype.divide=function(t){return this.x/=t,this.y/=t,this},Object.defineProperty(t.prototype,"angle",{get:function(){return 180*this.radian/Math.PI},set:function(t){this.radian=t*Math.PI/180},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"radian",{get:function(){return Math.atan2(this.y,this.x)},set:function(t){var e=this.length;this.setXY(Math.cos(t)*e,Math.sin(t)*e)},enumerable:!0,configurable:!0}),t.prototype.equals=function(t){return this.x==t.x&&this.y==t.y},Object.defineProperty(t.prototype,"length",{get:function(){return Math.sqrt(this.lengthSQ)},set:function(t){var e=this.radian;this.setXY(Math.cos(e)*t,Math.sin(e)*t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lengthSQ",{get:function(){return this.x*this.x+this.y*this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"slope",{get:function(){return this.y/this.x},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"[Vector2D (x:"+this.x+", y:"+this.y+")]"},t.corner=function(t,e){return Math.acos(t.dotProd(e)/(t.length*e.length))},t}(),se=new ae;function he(t,e,n,i){void 0===i&&(i=!1),typeof t!==typeof e&&console.error("begin and end need same type"),i||(n=Math.max(0,Math.min(1,n)));var o=e-t;return o=0<o?1:o<0?-1:0,t+Math.abs(e-t)*n*o}function ce(t,e,n,i,o,r){var a,s;void 0===r&&(r=!1),typeof t!==typeof e&&console.error("begin and end need same type");var h=new i;try{for(var c=b(o),u=c.next();!u.done;u=c.next()){var l=u.value;h[l]=he(t[l],e[l],n,r)}}catch(t){a={error:t}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(a)throw a.error}}return h}function ue(t,e){return void 0===e&&(e=0),Math.floor(Math.random()*(t-e))+e}(re=oe||(oe={}))[re.IDLE=0]="IDLE",re[re.PENDING=1]="PENDING",re[re.DO_SET=2]="DO_SET",re[re.DO_TO=3]="DO_TO",re[re.DO_WAIT=4]="DO_WAIT",re[re.DO_CALL=5]="DO_CALL";!function(i){function t(t,e,n){void 0===n&&(n=[]);var g=i.call(this)||this;return g.queue=[],g.loopCounting=0,g.status=oe.IDLE,g.onUpdate=function(t){switch(g.t=t,g.status){case oe.DO_TO:var e=g,n=e.target,i=e.startTime,o=e.fromProps,r=e.toProps,a=e.duration,s=e.ease,h=e.clazz,c=e.fields,u=t-i,l=Math.min(1,u/a),p=l;for(var f in s&&(p=s(p)),o){var d=r[f],y=o[f],v=void 0;v=l<1?"object"==typeof d?ce(y,d,p,h,c||Object.keys(d),!0):he(y,d,p,!0):d,n[f]=v,1<=l&&g._doNextAction()}break;case oe.DO_WAIT:var b=g;i=b.startTime;(a=b.duration)<(u=t-i)&&g._doNextAction()}},g._doPlay=function(t){var e,n,i;e=g.target,n=g,(i=e.tweens)||(i=e.tweens=[]),i.push(n),g._start(t)},g._readyStart=function(t){g.t=t,g._doStart()},g._doNextAction=function(){if(g.step<g.queue.length){var t=g.queue[g.step++];switch(t.action){case"set":g._set(t.props);break;case"to":0<t.duration?g._to(t.props,t.duration,t.ease):g._set(t.props);break;case"wait":g._wait(t.duration);break;case"call":g._call(t.func,t.thisObj,t.params)}}else g.loop<0?g._doStart():g.loopCounting<g.loop?g._doStart():g.status=oe.IDLE},g.target=t,g.loop=e?e.loop:0,g.autoPlay=!e||(!e.hasOwnProperty("autoPlay")||e.autoPlay),g.clazz=e?e.clazz:null,g.fields=e?e.fields:null,g.plugins=n,e&&e.initFields&&0<e.initFields.length&&(g.initProps=g.getInitProps(e.initFields)),g}n(t,i),t.prototype.getInitProps=function(t){var e,n,i={};try{for(var o=b(t),r=o.next();!r.done;r=o.next()){var a=r.value;a in this.target&&(i[a]=this.target[a])}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return i},t.prototype.set=function(t){return this.queue.push({action:"set",props:t}),this.autoPlay&&this._start(),this},t.prototype.to=function(t,e,n){return this.queue.push({action:"to",props:t,duration:e,ease:n}),this.autoPlay&&this._start(),this},t.prototype.wait=function(t){return this.queue.push({action:"wait",duration:t}),this.autoPlay&&this._start(),this},t.prototype.call=function(t,e,n){return this.queue.push({action:"call",func:t,thisObj:e,params:n}),this.autoPlay&&this._start(),this},t.prototype.play=function(t,e,n){void 0===t&&(t=!1),void 0===e&&(e=0),void 0===n&&(n=!0),t&&function(t){var e,n,i=t.tweens;if(i){try{for(var o=b(i),r=o.next();!r.done;r=o.next())r.value.stop()}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}i.splice(0)}}(this.target),0<e?setTimeout(this._doPlay,e,n):this._doPlay(n)},t.prototype.stop=function(){this.status=oe.IDLE,this.target.cancelOnNextTick(this.onUpdate)},t.prototype._set=function(t){this.status=oe.DO_SET,h(this.target,t),this._doNextAction()},t.prototype._to=function(t,e,n){for(var i in this.status=oe.DO_TO,this.startTime=this.t,this.fromProps={},t)this.fromProps[i]=this.target[i];this.toProps={},h(this.toProps,t),this.ease=n,this.duration=e},t.prototype._wait=function(t){this.status=oe.DO_WAIT,this.startTime=this.t,this.duration=t},t.prototype._call=function(t,e,n){this.status=oe.DO_CALL,t.apply(e,n),this._doNextAction()},t.prototype._start=function(t){void 0===t&&(t=!0),this.status=oe.PENDING,t&&(this.loopCounting=0),this.target.callOnNextTick(this._readyStart),this.target.callOnNextTick(this.onUpdate,!1)},t.prototype._doStart=function(){this.status!=oe.IDLE&&(this.step=0,this.loopCounting++,1<this.loopCounting&&this.initProps&&h(this.target,this.initProps),this._doNextAction())}}(a);var le=Math.PI,pe=2*le,fe=le/180,de=[],ye=function(){function e(t,e,n,i,o,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=1),void 0===o&&(o=0),void 0===r&&(r=0),this.a=t,this.b=e,this.c=n,this.d=i,this.tx=o,this.ty=r}return e.release=function(t){t&&de.push(t)},e.create=function(){var t=de.pop();return t||(t=new e),t},e.prototype.clone=function(){var t=e.create();return t.setTo(this.a,this.b,this.c,this.d,this.tx,this.ty),t},e.prototype.concat=function(t){var e=this.a*t.a,n=0,i=0,o=this.d*t.d,r=this.tx*t.a+t.tx,a=this.ty*t.d+t.ty;0===this.b&&0===this.c&&0===t.b&&0===t.c||(e+=this.b*t.c,o+=this.c*t.b,n+=this.a*t.b+this.b*t.d,i+=this.c*t.a+this.d*t.c,r+=this.ty*t.c,a+=this.tx*t.b),this.a=e,this.b=n,this.c=i,this.d=o,this.tx=r,this.ty=a},e.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},e.prototype.identity=function(){this.a=this.d=1,this.b=this.c=this.tx=this.ty=0},e.prototype.invert=function(){this.$invertInto(this)},e.prototype.$invertInto=function(t){var e=this.a,n=this.b,i=this.c,o=this.d,r=this.tx,a=this.ty;if(0==n&&0==i)return t.b=t.c=0,void(0==e||0==o?t.a=t.d=t.tx=t.ty=0:(e=t.a=1/e,o=t.d=1/o,t.tx=-e*r,t.ty=-o*a));var s=e*o-n*i;if(0!=s){s=1/s;var h=t.a=o*s;n=t.b=-n*s,i=t.c=-i*s,o=t.d=e*s,t.tx=-(h*r+i*a),t.ty=-(n*r+o*a)}else t.identity()},e.prototype.rotate=function(t){if(0!==(t=+t)){var e=Math.cos(t),n=Math.sin(t),i=this,o=i.a,r=i.b,a=i.c,s=i.d,h=i.tx,c=i.ty;this.a=o*e-r*n,this.b=o*n+r*e,this.c=a*e-s*n,this.d=a*n+s*e,this.tx=h*e-c*n,this.ty=h*n+c*e}},e.prototype.scale=function(t,e){1!==t&&(this.a*=t,this.c*=t,this.tx*=t),1!==e&&(this.b*=e,this.d*=e,this.ty*=e)},e.prototype.setTo=function(t,e,n,i,o,r){return this.a=t,this.b=e,this.c=n,this.d=i,this.tx=o,this.ty=r,this},e.prototype.transformPoint=function(t,e,n){var i=this,o=i.a,r=i.b,a=i.c,s=i.d,h=o*t+a*e+i.tx,c=r*t+s*e+i.ty;return n?(n.x=h,n.y=c,n):{x:h,y:c}},e.prototype.deltaTransformPoint=function(t,e,n){var i=this.a,o=this.b,r=i*t+this.c*e,a=o*t+this.d*e;return n?(n.x=r,n.y=a,n):{x:r,y:a}},e.prototype.translate=function(t,e){this.tx+=t,this.ty+=e},e.prototype.equals=function(t){return this.a==t.a&&this.b==t.b&&this.c==t.c&&this.d==t.d&&this.tx==t.tx&&this.ty==t.ty},e.prototype.prepend=function(t,e,n,i,o,r){var a=this.tx;if(1!=t||0!=e||0!=n||1!=i){var s=this.a,h=this.c;this.a=s*t+this.b*n,this.b=s*e+this.b*i,this.c=h*t+this.d*n,this.d=h*e+this.d*i}return this.tx=a*t+this.ty*n+o,this.ty=a*e+this.ty*i+r,this},e.prototype.append=function(t,e,n,i,o,r){var a=this.a,s=this.b,h=this.c,c=this.d;return 1==t&&0==e&&0==n&&1==i||(this.a=t*a+e*h,this.b=t*s+e*c,this.c=n*a+i*h,this.d=n*s+i*c),this.tx=o*a+r*h+this.tx,this.ty=o*s+r*c+this.ty,this},e.prototype.toString=function(){return"(a="+this.a+", b="+this.b+", c="+this.c+", d="+this.d+", tx="+this.tx+", ty="+this.ty+")"},e.prototype.createBox=function(t,e,n,i,o){void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=0);var r=this;if(0!==n){n/=fe;var a=Math.cos(n),s=Math.sin(n);r.a=a*t,r.b=s*e,r.c=-s*t,r.d=a*e}else r.a=t,r.b=0,r.c=0,r.d=e;r.tx=i,r.ty=o},e.prototype.createGradientBox=function(t,e,n,i,o){void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=0),this.createBox(t/1638.4,e/1638.4,n,i+t/2,o+e/2)},e.prototype.$transformBounds=function(t){var e=this.a,n=this.b,i=this.c,o=this.d,r=this.tx,a=this.ty,s=t.x,h=t.y,c=s+t.width,u=h+t.height,l=e*s+i*h+r,p=n*s+o*h+a,f=e*c+i*h+r,d=n*c+o*h+a,y=e*c+i*u+r,v=n*c+o*u+a,b=e*s+i*u+r,g=n*s+o*u+a,m=0;f<l&&(m=l,l=f,f=m),b<y&&(m=y,y=b,b=m),t.x=Math.floor(l<y?l:y),t.width=Math.ceil((b<f?f:b)-t.x),d<p&&(m=p,p=d,d=m),g<v&&(m=v,v=g,g=m),t.y=Math.floor(p<v?p:v),t.height=Math.ceil((g<d?d:g)-t.y)},e.prototype.getDeterminant=function(){return this.a*this.d-this.b*this.c},e.prototype.$getScaleX=function(){var t=this;if(0==t.b)return t.a;var e=Math.sqrt(t.a*t.a+t.b*t.b);return this.getDeterminant()<0?-e:e},e.prototype.$getScaleY=function(){var t=this;if(0==t.c)return t.d;var e=Math.sqrt(t.c*t.c+t.d*t.d);return this.getDeterminant()<0?-e:e},e.prototype.$getSkewX=function(){return this.d<0?Math.atan2(this.d,this.c)+le/2:Math.atan2(this.d,this.c)-le/2},e.prototype.$getSkewY=function(){return this.a<0?Math.atan2(this.b,this.a)-le:Math.atan2(this.b,this.a)},e.prototype.$updateScaleAndRotation=function(t,e,n,i){if(!(0!=n&&n!=pe||0!=i&&i!=pe))return this.a=t,this.b=this.c=0,void(this.d=e);n/=fe,i/=fe;var o=Math.cos(n),r=Math.sin(n);this.b=n==i?(this.a=o*t,r*t):(this.a=Math.cos(i)*t,Math.sin(i)*t),this.c=-r*e,this.d=o*e},e.prototype.$preMultiplyInto=function(t,e){var n=t.a*this.a,i=0,o=0,r=t.d*this.d,a=t.tx*this.a+this.tx,s=t.ty*this.d+this.ty;0===t.b&&0===t.c&&0===this.b&&0===this.c||(n+=t.b*this.c,r+=t.c*this.b,i+=t.a*this.b+t.b*this.d,o+=t.c*this.a+t.d*this.c,a+=t.ty*this.c,s+=t.tx*this.b),e.a=n,e.b=i,e.c=o,e.d=r,e.tx=a,e.ty=s},e}();function ve(o){return function(t,n){var i="_"+n;Object.defineProperty(t,n,{enumerable:!0,get:function(){return this[i]},set:function(t){var e=this[i];e!==t&&(this[i]=t,o.apply(this,[t,n,e]))}})}}var be,ge,me,_e,xe,we,Ce=ve(function(t,e,n){this.dirty=!0}),Oe=ve(function(t,e,n){this.onModify&&this.onModify(t,e,n)});!function(){function t(t,e){void 0===t&&(t=NaN),void 0===e&&(e=NaN),this.width=t,this.height=e}t.prototype.setNaN=function(){this.width=NaN,this.height=NaN},t.prototype.isEmpty=function(){},t.prototype.set=function(t,e){void 0!==t&&(this.width=t),void 0!==e&&(this.height=e)},t.prototype.clone=function(){return new t(this.width,this.height)},t.prototype.copyFrom=function(t){this.width=t.width,this.height=t.height},t.prototype.onModify=function(t,e,n){this.onChange&&this.onChange(t,e,n)},e([Oe],t.prototype,"width",void 0),e([Oe],t.prototype,"height",void 0)}();(ge=be||(be={})).NORMAL="normal",ge.ITALIC="italic",ge.OBLIQUE="oblique",(_e=me||(me={})).NORMAL="normal",_e.SMALL_CAPS="small-caps",(we=xe||(xe={})).NORMAL="normal",we.BOLD="bold",we.BOLDER="bolder",we.LIGHTER="lighter";!function(){function t(){this.fontStyle=be.NORMAL,this.fontVariant=me.NORMAL,this.fontWeight=xe.NORMAL,this.fontSize=25,this.fontFamily="Arial"}t.prototype.onModify=function(t,e,n){this.onChange&&this.onChange(t,e,n,"textStyle")},e([Oe],t.prototype,"fontStyle",void 0),e([Oe],t.prototype,"fontVariant",void 0),e([Oe],t.prototype,"fontWeight",void 0),e([Oe],t.prototype,"fontSize",void 0),e([Oe],t.prototype,"fontFamily",void 0)}();var Pe=Object.prototype.hasOwnProperty,Me="~";function Ae(){}function Ie(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Te(t,e,n,i,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var r=new Ie(n,i||t,o),a=Me?Me+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],r]:t._events[a].push(r):(t._events[a]=r,t._eventsCount++),t}function ke(t,e){0==--t._eventsCount?t._events=new Ae:delete t._events[e]}Object.create&&(Ae.prototype=Object.create(null),(new Ae).__proto__||(Me=""));var Ee,De;!function(){function t(){this._events=new Ae,this._eventsCount=0,this.off=this.removeListener,this.addListener=this.on}Object.defineProperty(t,"prefixed",{get:function(){return Me},enumerable:!0,configurable:!0}),t.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)Pe.call(t,e)&&n.push(Me?e.slice(1):e);return n},t.prototype.listeners=function(t){var e=Me?Me+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,r=new Array(o);i<o;i++)r[i]=n[i].fn;return r},t.prototype.listenerCount=function(t){var e=Me?Me+t:t,n=this._events[e];return n?n.fn?1:n.length:0},t.prototype.emit=function(t,e,n,i,o,r){var a=Me?Me+t:t;if(!this._events[a])return!1;var s,h,c=this._events[a],u=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,i),!0;case 5:return c.fn.call(c.context,e,n,i,o),!0;case 6:return c.fn.call(c.context,e,n,i,o,r),!0}for(h=1,s=new Array(u-1);h<u;h++)s[h-1]=arguments[h];c.fn.apply(c.context,s)}else{var l,p=c.length;for(h=0;h<p;h++)switch(c[h].once&&this.removeListener(t,c[h].fn,void 0,!0),u){case 1:c[h].fn.call(c[h].context);break;case 2:c[h].fn.call(c[h].context,e);break;case 3:c[h].fn.call(c[h].context,e,n);break;case 4:c[h].fn.call(c[h].context,e,n,i);break;default:if(!s)for(l=1,s=new Array(u-1);l<u;l++)s[l-1]=arguments[l];c[h].fn.apply(c[h].context,s)}}return!0},t.prototype.on=function(t,e,n){return Te(this,t,e,n,!1)},t.prototype.once=function(t,e,n){return Te(this,t,e,n,!0)},t.prototype.removeListener=function(t,e,n,i){var o=Me?Me+t:t;if(!this._events[o])return this;if(!e)return ke(this,o),this;var r=this._events[o];if(r.fn)r.fn!==e||i&&!r.once||n&&r.context!==n||ke(this,o);else{for(var a=0,s=[],h=r.length;a<h;a++)(r[a].fn!==e||i&&!r[a].once||n&&r[a].context!==n)&&s.push(r[a]);s.length?this._events[o]=1===s.length?s[0]:s:ke(this,o)}return this},t.prototype.removeAllListeners=function(t){var e;return t?(e=Me?Me+t:t,this._events[e]&&ke(this,e)):(this._events=new Ae,this._eventsCount=0),this}}();(De=Ee||(Ee={})).quadIn="quadIn",De.quadOut="quadOut",De.quadInOut="quadInOut",De.cubicIn="cubicIn",De.cubicOut="cubicOut",De.cubicInOut="cubicInOut",De.quartIn="quartIn",De.quartOut="quartOut",De.quartInOut="quartInOut",De.quintIn="quintIn",De.quintOut="quintOut",De.quintInOut="quintInOut",De.sineIn="sineIn",De.sineOut="sineOut",De.sineInOut="sineInOut",De.backIn="backIn",De.backOut="backOut",De.backInOut="backInOut",De.circIn="circIn",De.circOut="circOut",De.circInOut="circInOut",De.bounceIn="bounceIn",De.bounceOut="bounceOut",De.bounceInOut="bounceInOut",De.elasticIn="elasticIn",De.elasticOut="elasticOut",De.elasticInOut="elasticInOut";var Le,Se,je;Le=1,Se=.3,je=2*Math.PI;var Fe,Ne,Re;Fe=1,Ne=.3,Re=2*Math.PI;qe=1,Ge=.3*1.5,Ue=2*Math.PI;var qe,Ge,Ue,We,Be,He=Oe,ze=function(i){function t(){var t=i.call(this)||this;return t.onVector2DModify=function(){t.makeDirty()},t.dirty=!0,t._useCacheMode=!1,t.alpha=1,t.anchor=new ae(.5,.5),t.bounds=new A,t.cacheCanvas=null,t._anchorOffset=new ae,t._context=C,t._margin=0,t._debugDrawColor="hsl("+ue(360)+", "+ue(100)+"%, 60%)",t}return n(t,i),Object.defineProperty(t.prototype,"useCacheMode",{get:function(){return this.getUseCacheMode()},set:function(t){this._useCacheMode=t},enumerable:!0,configurable:!0}),t.prototype.getUseCacheMode=function(){return this._useCacheMode},Object.defineProperty(t.prototype,"context",{get:function(){return this.cacheCanvasContext||this._context},enumerable:!0,configurable:!0}),t.prototype.makeDirty=function(){this.dirty=!0},t.prototype.onModify=function(t,e,n){switch(i.prototype.onModify.call(this,t,e,n),this.makeDirty(),e){case"anchor":t.onChange=this.onVector2DModify}},t.prototype.onAwake=function(){i.prototype.onAwake.call(this),this.transform||console.warn("renderer need a transform component")},t.prototype.onUpdate=function(t){if(this.dirty&&("label_status"==this.entity.name&&console.log(),this.useCacheMode&&this.readyCacheCanvas(),this.measureBounds(),this.useCacheMode&&this.updateCacheCanvas()),this.transformToLocal(),this.render(),p.drawRenderRect){var e=this,n=e._context,i=e._debugDrawColor,o=e.bounds,r=o.width,a=o.height,s=e._anchorOffset,h=(s.x,s.y,e.transform.pivot),c=h.x,u=h.y;n.globalAlpha=.9,n.strokeStyle=i,n.fillStyle=i,n.beginPath(),n.rect(0,0,r,a),n.stroke(),n.beginPath(),n.arc(r*c,a*u,3,0,2*Math.PI),n.fill()}},t.prototype.readyCacheCanvas=function(){var t=this.cacheCanvas;t||(t=this.cacheCanvas=X(),this.cacheCanvasContext=t.getContext("2d"))},t.prototype.updateCacheCanvas=function(){var t=this.cacheCanvas,e=this.bounds,n=e.width,i=e.height;t.width=n+2*this._margin,t.height=i+2*this._margin},t.prototype.render=function(){this.beforeDraw(),this.drawClip(),this.dirty&&(this.useCacheMode&&this.draw(),this.dirty=!1),this.useCacheMode?this.drawCache():this.draw()},t.prototype.beforeDraw=function(){this.applyAlpha()},t.prototype.transformToLocal=function(){var t=this.transform,e=this._anchorOffset,n=e.x,i=e.y;if(t&&t.enabled){var o=t.getMatrix(!0),r=o.a,a=o.b,s=o.c,h=o.d,c=o.tx,u=o.ty,l=n*r+i*s,p=n*a+i*h;this._context.setTransform(r,a,s,h,c-l,u-p)}else this._context.setTransform(1,0,0,1,-n,-i)},t.prototype.applyAlpha=function(){this._context.globalAlpha=this.alpha*this.transform.renderAlpha},t.prototype.drawCache=function(){0<this.cacheCanvas.width&&0<this.cacheCanvas.height&&this._context.drawImage(this.cacheCanvas,-this._margin,-this._margin)},t.prototype.drawClip=function(){},t.prototype.draw=function(){},t.prototype.measureBounds=function(){var t=this.anchor,e=t.x,n=t.y,i=this.bounds,o=this.bounds,r=o.width,a=o.height,s=this._anchorOffset.x=r*e,h=this._anchorOffset.y=a*n;i.x=-s,i.y=-h},t.prototype.hitTest=function(t,e){return this.bounds.contains(t,e)},e([He],t.prototype,"anchor",void 0),t}(u),Xe=Ce,Ye=Oe;(Be=We||(We={}))[Be.SCALE_ROTATE=0]="SCALE_ROTATE",Be[Be.ROTATE_SCALE=1]="ROTATE_SCALE";var $e=function(o){function l(){var i=null!==o&&o.apply(this,arguments)||this;return i.onVector2DModify=function(t,e,n){i.makeDirty(t,e,n)},i.position=new ae(0),i.alpha=1,i._width=NaN,i._height=NaN,i.scale=new ae(1,1),i.pivot=new ae(.5,.5),i.rotation=0,i.order=We.SCALE_ROTATE,i._localMatrix=ye.create(),i._globalMatrix=ye.create(),i._globalPivotMatrix=ye.create(),i}return n(l,o),Object.defineProperty(l.prototype,"renderAlpha",{get:function(){return this._renderAlpha},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"width",{get:function(){var t=this.entity.getComponent(ze);return t?t.bounds.width:isNaN(this._width)?0:this._width},set:function(t){this._width!=t&&(this._width=t,this.makeDirty(t,"width"))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"explicitWidth",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"height",{get:function(){var t=this.entity.getComponent(ze);return t?t.bounds.height:isNaN(this._height)?0:this._height},set:function(t){this._height!=t&&(this._height=t,this.makeDirty(t,"height"))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"explicitHeight",{get:function(){return this._height},enumerable:!0,configurable:!0}),l.prototype.makeDirty=function(t,e,n){var i,o;switch(this.dirty=!0,e){case"width":case"height":var r=this.entity.getComponents(ze);try{for(var a=b(r),s=a.next();!s.done;s=a.next()){s.value.makeDirty()}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}},l.prototype.onModify=function(t,e,n){switch(o.prototype.onModify.call(this,t,e,n),this.makeDirty(t,e,n),e){case"position":case"scale":t.onChange=this.onVector2DModify}},l.prototype.updateLocalMatrix=function(){var t=this.position,e=t.x,n=t.y,i=this.scale,o=i.x,r=i.y,a=this.rotation,s=this._localMatrix;s.identity(),(this.order=We.ROTATE_SCALE)?(s.scale(o,r),s.rotate(a*Math.PI/180)):(s.rotate(a*Math.PI/180),s.scale(o,r)),s.translate(e,n)},l.prototype.updateGlobalMatrix=function(){var t=this,e=t.entity,n=t._globalMatrix,i=t._localMatrix,o=t._globalPivotMatrix,r=t.pivot,a=r.x,s=r.y,h=t.width,c=t.height;if(n.copyFrom(i),e.parent){var u=e.parent.getComponent(l);u&&(this._renderAlpha=u._renderAlpha*this.alpha,n.concat(u.getMatrix()))}else this._renderAlpha=this.alpha;o.copyFrom(n),o.translate(-(a-.5)*h,-(s-.5)*c)},l.prototype.getMatrix=function(t){return void 0===t&&(t=!1),t?this._globalPivotMatrix:this._globalMatrix},l.prototype.onUpdate=function(t){this.dirty&&(this.updateLocalMatrix(),this.dirty=!1),this.updateGlobalMatrix(),o.prototype.onUpdate.call(this,t)},e([Ye],l.prototype,"position",void 0),e([Ye],l.prototype,"alpha",void 0),e([Ye],l.prototype,"scale",void 0),e([Ye],l.prototype,"pivot",void 0),e([Xe],l.prototype,"rotation",void 0),l}(u),Ve=function(l){function t(){var t=null!==l&&l.apply(this,arguments)||this;return t.viewportAnchor=ie(),t.maxScale=1.2,t}return n(t,l),t.prototype.onCreate=function(){l.prototype.onCreate.call(this)},t.prototype.onAwake=function(){l.prototype.onAwake.call(this);var t=this.target,e=this.viewportAnchor;if(this.stageSize={width:O,height:P},t&&(this.targetPosition=t.getComponent($e).position),this.followPosition=ie(),e){var n=this.stageSize,i=n.width,o=n.height,r=this.viewportAnchor,a=r.x,s=r.y;this.transform.position.setXY(i*a,o*s)}},t.prototype.onUpdate=function(t){if(l.prototype.onUpdate.call(this,t),this.targetPosition){var e=this.transform,n=e.scale,i=e.position,o=this.stageSize,r=o.width,a=o.height,s=this.targetPosition,h=(s.x,s.y,s.length),c=this.maxScale,u=c-h*c/2048;n.setXY(u,u),this.followPosition.setXY(r/2,a/2).subtract(this.targetPosition),i.copyFrom(ce(i,this.followPosition,.1,ae,["x","y"]))}},t.prototype.onSleep=function(){l.prototype.onSleep.call(this)},t.prototype.onDestroy=function(){l.prototype.onDestroy.call(this)},t}(u);jt("components/base/Transform",$e),jt("components/other/CameraController",Ve);var Qe={};function Ze(t){h(Qe,t)}h(p,{lineHeightRatio:1.2,entityEnabled:!1,awakeComponentWhenAdded:!1,sleepComponentWhenRemoved:!1,drawRenderRect:!1}),t.startup=function(o,r,a){return s(this,void 0,void 0,function(){var n,i;return l(this,function(t){switch(t.label){case 0:return[4,at("manifest.json")];case 1:return Ze(t.sent()),Ze(r),e=Qe.resPath,et=e,n=document.createElement("canvas"),o.appendChild(n),i={canvas:n},r.config&&h(i,r.config),function(t){h(wt,t);var e=wt.canvas,n=wt.designWidth,i=wt.designHeight,o=wt.scaleMode,r=wt.modifyCanvasSize,a="object"==typeof e?e:document.getElementById(e);k({canvas:a,touchHandler:{onTouchBegin:Tt,onTouchMove:kt,onTouchEnd:Et}}),z({canvas:a,designWidth:n,designHeight:i,scaleMode:o,modifyCanvasSize:r}),(_t=new M("root"))._restrict()}(i),Qt("main",a).catch(function(t){console.log(t)}),[2]}var e})})},Object.defineProperty(t,"__esModule",{value:!0})});
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"build-process": "scilla", "build-process": "scilla",
"release-path": "./dist", "release-path": "./dist",
"remote-path": "activity/scilla-kuwo", "remote-path": "activity/scilla-kuwo",
"version": "" "version": "12345"
}, },
"dependencies": { "dependencies": {
"scilla-core": "git+http://gitlab2.dui88.com/laoqifeng/scilla-core.git", "scilla-core": "git+http://gitlab2.dui88.com/laoqifeng/scilla-core.git",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment