Commit da8c8990 authored by wildfirecode's avatar wildfirecode

1

parent 8ac1b930
No preview for this file type
{"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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T;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\":\"TextRenderer.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/renderer/TextRenderer.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAoB,MAAM,QAAQ,CAAC;AAEvE,IAAA,kDAAkB,EAAE,gDAAiB,CAAe;AAE3D,MAAM,CAAN,IAAY,SAaX;AAbD,WAAY,SAAS;IAIpB,0BAAa,CAAA;IAIb,8BAAiB,CAAA;IAIjB,4BAAe,CAAA;AAChB,CAAC,EAbW,SAAS,KAAT,SAAS,QAapB;AAED,MAAM,CAAN,IAAY,aAaX;AAbD,WAAY,aAAa;IAIxB,4BAAW,CAAA;IAIX,kCAAiB,CAAA;IAIjB,kCAAiB,CAAA;AAClB,CAAC,EAbW,aAAa,KAAb,aAAa,QAaxB;AAKD;IAA0C,wCAAe;IAAzD;QAAA,qEAubC;QAlbA,UAAI,GAAW,EAAE,CAAC;QAMlB,cAAQ,GAAQ,IAAI,CAAC;QAMrB,eAAS,GAAc,SAAS,CAAC,MAAM,CAAC;QAMxC,mBAAa,GAAkB,aAAa,CAAC,MAAM,CAAC;QAMpD,iBAAW,GAAW,CAAC,CAAC;QAMxB,mBAAa,GAAW,CAAC,CAAC;QAQhB,iBAAW,GAAW,GAAG,CAAC;QAC1B,oBAAc,GAAW,CAAC,CAAC;QAQrC,eAAS,GAAc,IAAI,SAAS,EAAE,CAAC;QAGvC,kBAAY,GAAY,IAAI,CAAC;QAMnB,kBAAY,GAAQ,EAAE,CAAC;;IA0XlC,CAAC;IAxXU,+BAAQ,GAAlB,UAAmB,KAAK,EAAE,GAAG,EAAE,QAAQ;QACtC,iBAAM,QAAQ,YAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CA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AAS,EAAE;YACpB,IAAI,CAAC,cAAc,EAAE,CAAC;SACtB;QAED,IAAI,CAAC,SAAS,EAAE,CAAC;QAEjB,iBAAM,aAAa,WAAE,CAAC;IACvB,CAAC;IAjbD;QADC,kBAAkB;8CACD;IAMlB;QADC,iBAAiB;kDACG;IAMrB;QADC,kBAAkB;mDACqB;IAMxC;QADC,kBAAkB;uDACiC;IAMpD;QADC,kBAAkB;qDACK;IAMxB;QADC,kBAAkB;uDACO;IAM1B;QADC,kBAAkB;iDACD;IAWlB;QADC,kBAAkB;mDACoB;IAGvC;QADC,kBAAkB;sDACU;IAgY9B,mBAAC;CAAA,AAvbD,CAA0C,eAAe,GAubxD;eAvboB,YAAY\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport GraphicRenderer from \"./GraphicRenderer\";\r\nimport { TextStyle, EngineConfig, decorators } from \"scilla\";\r\nvar dirtyFieldDetector = decorators.dirtyFieldDetector, dirtyFieldTrigger = decorators.dirtyFieldTrigger;\r\nexport var TextAlign;\r\n(function (TextAlign) {\r\n TextAlign[\"LEFT\"] = \"left\";\r\n TextAlign[\"CENTER\"] = \"center\";\r\n TextAlign[\"RIGHT\"] = \"right\";\r\n})(TextAlign || (TextAlign = {}));\r\nexport var VerticalAlign;\r\n(function (VerticalAlign) {\r\n VerticalAlign[\"TOP\"] = \"top\";\r\n VerticalAlign[\"MIDDLE\"] = \"middle\";\r\n VerticalAlign[\"BOTTOM\"] = \"bottom\";\r\n})(VerticalAlign || (VerticalAlign = {}));\r\nvar TextRenderer = (function (_super) {\r\n tslib_1.__extends(TextRenderer, _super);\r\n function TextRenderer() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.text = '';\r\n _this.textFlow = null;\r\n _this.textAlign = TextAlign.CENTER;\r\n _this.verticalAlign = VerticalAlign.MIDDLE;\r\n _this.lineSpacing = 0;\r\n _this.letterSpacing = 0;\r\n _this._lineHeight = NaN;\r\n _this._bmpLineHeight = 0;\r\n _this.textStyle = new TextStyle();\r\n _this.useCacheMode = true;\r\n _this.measureCache = {};\r\n return _this;\r\n }\r\n TextRenderer.prototype.onModify = function (value, key, oldValue) {\r\n _super.prototype.onModify.call(this, value, key, oldValue);\r\n switch (key) {\r\n case 'textFlow':\r\n if (value) {\r\n this.updateTextFlow();\r\n }\r\n break;\r\n case 'textStyle':\r\n value.onChange = this.makeDirty.bind(this);\r\n this.makeDirty();\r\n break;\r\n }\r\n };\r\n TextRenderer.prototype.updateTextFlow = function () {\r\n var e_1, _a;\r\n var text = '';\r\n if (this.textFlow) {\r\n try {\r\n for (var _b = tslib_1.__values(this.textFlow), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var item = _c.value;\r\n text += item.text;\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 this._pureText = text;\r\n this.makeDirty();\r\n };\r\n Object.defineProperty(TextRenderer.prototype, \"lineHeight\", {\r\n get: function () {\r\n return isNaN(this._lineHeight) ? (this.isBmpMode ? this._bmpLineHeight : this.textStyle.fontSize * EngineConfig.lineHeightRatio) : this._lineHeight;\r\n },\r\n set: function (value) {\r\n if (this._lineHeight != value) {\r\n this._lineHeight = value;\r\n this.dirty = true;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(TextRenderer.prototype, \"pureText\", {\r\n get: function () {\r\n return this.textFlow ? this._pureText : this.text;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n TextRenderer.prototype.getRenderSize = function () {\r\n return {\r\n width: this._textWidth,\r\n height: this._textHeight,\r\n };\r\n };\r\n TextRenderer.prototype.beforeDraw = function () {\r\n _super.prototype.beforeDraw.call(this);\r\n if (!this.isBmpMode) {\r\n this.applyTextStyle();\r\n }\r\n };\r\n TextRenderer.prototype.applyTextStyle = function () {\r\n var _a = this, context = _a.context, textStyle = _a.textStyle;\r\n var fontStyle = textStyle.fontStyle, fontVariant = textStyle.fontVariant, fontWeight = textStyle.fontWeight, fontSize = textStyle.fontSize, fontFamily = textStyle.fontFamily;\r\n context.font = fontStyle + \" \" + fontVariant + \" \" + fontWeight + \" \" + fontSize + \"px \" + fontFamily;\r\n };\r\n TextRenderer.prototype.fillAndStoke = function () {\r\n if (!this.pureText || this.pureText.length == 0) {\r\n return;\r\n }\r\n var _a = this, context = _a.context, measureCache = _a.measureCache, lineHeight = _a.lineHeight, lineSpacing = _a.lineSpacing, letterSpacing = _a.letterSpacing, rows = _a.rows, textAlign = _a.textAlign, verticalAlign = _a.verticalAlign, isBmpMode = _a.isBmpMode, _b = _a.transform, width = _b.width, height = _b.height;\r\n var rowCount = rows.length;\r\n var x = 0;\r\n switch (textAlign) {\r\n case \"left\":\r\n x = 0;\r\n break;\r\n case \"right\":\r\n x = width;\r\n break;\r\n case \"center\":\r\n default:\r\n x = width / 2;\r\n break;\r\n }\r\n var y = 0;\r\n var drawHeight = rowCount * lineHeight + lineSpacing * (rowCount - 1);\r\n switch (verticalAlign) {\r\n case \"top\":\r\n y = 0;\r\n break;\r\n case \"bottom\":\r\n y = height - drawHeight;\r\n break;\r\n case \"middle\":\r\n default:\r\n y = (height - drawHeight) / 2;\r\n break;\r\n }\r\n y += lineHeight;\r\n context.textAlign = letterSpacing == 0 && !this.textFlow ? textAlign : 'left';\r\n context.textBaseline = 'bottom';\r\n var offY = 0;\r\n for (var i = 0; i < rowCount; i++) {\r\n var _c = rows[i], text = _c.text, lineWidth = _c.lineWidth;\r\n if (letterSpacing == 0 && !isBmpMode && !this.textFlow) {\r\n this.drawText(i, text, x, y + offY);\r\n }\r\n else {\r\n var offX = 0;\r\n switch (textAlign) {\r\n case \"left\":\r\n offX = 0;\r\n break;\r\n case \"right\":\r\n offX = -lineWidth;\r\n break;\r\n case \"center\":\r\n default:\r\n offX = -lineWidth / 2;\r\n break;\r\n }\r\n for (var j = 0, lj = text.length; j < lj; j++) {\r\n var char = text[j];\r\n this.drawText(j, char, x + offX, y + offY);\r\n if (measureCache[char].width > 0) {\r\n offX += measureCache[char].width + letterSpacing;\r\n }\r\n }\r\n }\r\n offY += lineHeight + lineSpacing;\r\n }\r\n };\r\n TextRenderer.prototype.getStyle = function (index) {\r\n var e_2, _a;\r\n if (!this.textFlow) {\r\n return null;\r\n }\r\n var targetItem;\r\n var count = 0;\r\n try {\r\n for (var _b = tslib_1.__values(this.textFlow), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var item = _c.value;\r\n count += item.text.length;\r\n if (index < count) {\r\n targetItem = 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 targetItem.style;\r\n };\r\n TextRenderer.prototype.drawText = function (index, text, x, y) {\r\n var _a = this, context = _a.context, borderWidth = _a.borderWidth, isBmpMode = _a.isBmpMode, fontRes = _a.fontRes;\r\n if (isBmpMode) {\r\n var texture = fontRes.getTexture(text);\r\n if (!texture) {\r\n return;\r\n }\r\n var _b = texture.bounds, textureX = _b.x, textureY = _b.y, textureWidth = _b.width, textureHeight = _b.height;\r\n context.drawImage(texture.img, textureX, textureY, textureWidth, textureHeight, x, y, textureWidth, textureHeight);\r\n }\r\n else {\r\n var style = this.getStyle(index);\r\n if (style) {\r\n if (style.hasOwnProperty('textColor')) {\r\n context.fillStyle = style.textColor;\r\n }\r\n }\r\n else {\r\n context.fillStyle = this.fillColor;\r\n }\r\n context.fillText(text, x, y + 1);\r\n if (borderWidth > 0) {\r\n context.strokeText(text, x, y + 1);\r\n }\r\n }\r\n };\r\n Object.defineProperty(TextRenderer.prototype, \"isBmpMode\", {\r\n get: function () {\r\n return !!this.fontRes;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n TextRenderer.prototype.measureText = function (text) {\r\n var e_3, _a, e_4, _b;\r\n var result;\r\n if (this.measureCache.hasOwnProperty(text)) {\r\n result = this.measureCache[text];\r\n }\r\n else {\r\n var _c = this, context = _c.context, letterSpacing = _c.letterSpacing, isBmpMode = _c.isBmpMode, fontRes = _c.fontRes, lineHeight = _c.lineHeight;\r\n if (isBmpMode) {\r\n if (text.length == 1) {\r\n var texture = fontRes.getTexture(text);\r\n result = {\r\n width: texture ? texture.width : 0,\r\n height: texture ? texture.height : 0,\r\n };\r\n }\r\n else {\r\n var totalWidth = 0, totalHeight = 0;\r\n try {\r\n for (var text_1 = tslib_1.__values(text), text_1_1 = text_1.next(); !text_1_1.done; text_1_1 = text_1.next()) {\r\n var char = text_1_1.value;\r\n var measureResult = this.measureText(char);\r\n totalWidth += measureResult.width;\r\n if (measureResult.height > totalHeight) {\r\n totalHeight = measureResult.height;\r\n }\r\n }\r\n }\r\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\r\n finally {\r\n try {\r\n if (text_1_1 && !text_1_1.done && (_a = text_1.return)) _a.call(text_1);\r\n }\r\n finally { if (e_3) throw e_3.error; }\r\n }\r\n result = {\r\n width: totalWidth,\r\n height: totalHeight,\r\n };\r\n }\r\n }\r\n else {\r\n result = {\r\n width: context.measureText(text).width,\r\n height: lineHeight,\r\n };\r\n }\r\n result.width += letterSpacing * (text.length - 1);\r\n if (text.length == 1) {\r\n this.measureCache[text] = result;\r\n }\r\n if (letterSpacing != 0 && text.length > 1 || this.textFlow) {\r\n try {\r\n for (var text_2 = tslib_1.__values(text), text_2_1 = text_2.next(); !text_2_1.done; text_2_1 = text_2.next()) {\r\n var char = text_2_1.value;\r\n this.measureCache[char] = this.measureText(char);\r\n }\r\n }\r\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\r\n finally {\r\n try {\r\n if (text_2_1 && !text_2_1.done && (_b = text_2.return)) _b.call(text_2);\r\n }\r\n finally { if (e_4) throw e_4.error; }\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n TextRenderer.prototype.splitText = function () {\r\n var e_5, _a;\r\n var _b = this, text = _b.pureText, letterSpacing = _b.letterSpacing, lineSpacing = _b.lineSpacing, lineHeight = _b.lineHeight, isBmpMode = _b.isBmpMode, _c = _b.transform, explicitWidth = _c.explicitWidth, explicitHeight = _c.explicitHeight;\r\n this.measureCache = {};\r\n var textWidth = 0, textHeight = 0, maxHeight = 0;\r\n var rows = [], measureResult;\r\n if (text && text.length > 0) {\r\n if (isNaN(explicitWidth)) {\r\n var lines = text.split('\\n');\r\n try {\r\n for (var lines_1 = tslib_1.__values(lines), lines_1_1 = lines_1.next(); !lines_1_1.done; lines_1_1 = lines_1.next()) {\r\n var line = lines_1_1.value;\r\n measureResult = this.measureText(line);\r\n var mw = measureResult.width;\r\n if (mw > textWidth) {\r\n textWidth = mw;\r\n }\r\n if (isBmpMode) {\r\n var mh = measureResult.height;\r\n if (mh > maxHeight) {\r\n maxHeight = mh;\r\n }\r\n }\r\n rows.push({\r\n text: line,\r\n lineWidth: mw,\r\n });\r\n }\r\n }\r\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\r\n finally {\r\n try {\r\n if (lines_1_1 && !lines_1_1.done && (_a = lines_1.return)) _a.call(lines_1);\r\n }\r\n finally { if (e_5) throw e_5.error; }\r\n }\r\n if (!isBmpMode) {\r\n maxHeight = lineHeight;\r\n }\r\n this._bmpLineHeight = maxHeight;\r\n }\r\n else {\r\n var chars = text.split('');\r\n var lineWidth = 0, charWidth = 0, index = 0;\r\n var line = '';\r\n for (var i = 0, li = chars.length; i < li; i++) {\r\n var char = chars[i];\r\n if (char == '\\n') {\r\n rows.push({\r\n text: line,\r\n lineWidth: lineWidth,\r\n });\r\n line = '';\r\n lineWidth = 0;\r\n index = 0;\r\n }\r\n else {\r\n measureResult = this.measureText(char);\r\n if (measureResult.width == 0) {\r\n continue;\r\n }\r\n charWidth = measureResult.width;\r\n var mh = measureResult.height;\r\n if (mh > maxHeight) {\r\n maxHeight = mh;\r\n }\r\n if (index > 0 && lineWidth + charWidth + (index == 0 ? 0 : letterSpacing) > explicitWidth) {\r\n rows.push({\r\n text: line,\r\n lineWidth: lineWidth,\r\n });\r\n line = '';\r\n lineWidth = 0;\r\n index = 0;\r\n }\r\n line += char;\r\n lineWidth += charWidth + (index == 0 ? 0 : letterSpacing);\r\n index++;\r\n }\r\n }\r\n this._bmpLineHeight = maxHeight;\r\n rows.push({\r\n text: line,\r\n lineWidth: lineWidth,\r\n });\r\n textWidth = explicitWidth;\r\n }\r\n textHeight = isNaN(explicitHeight) ? (maxHeight * rows.length + lineSpacing * (rows.length - 1)) : explicitHeight;\r\n }\r\n else {\r\n textWidth = isNaN(explicitWidth) ? 0 : explicitWidth;\r\n textHeight = isNaN(explicitHeight) ? 0 : explicitHeight;\r\n }\r\n this.rows = rows;\r\n this._textWidth = textWidth;\r\n this._textHeight = textHeight;\r\n return {\r\n rows: rows,\r\n textWidth: textWidth,\r\n textHeight: textHeight,\r\n };\r\n };\r\n TextRenderer.prototype.measureBounds = function () {\r\n if (!this.dirty) {\r\n return;\r\n }\r\n if (!this.isBmpMode) {\r\n this.applyTextStyle();\r\n }\r\n this.splitText();\r\n _super.prototype.measureBounds.call(this);\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], TextRenderer.prototype, \"text\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], TextRenderer.prototype, \"textFlow\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], TextRenderer.prototype, \"textAlign\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], TextRenderer.prototype, \"verticalAlign\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], TextRenderer.prototype, \"lineSpacing\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], TextRenderer.prototype, \"letterSpacing\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], TextRenderer.prototype, \"fontRes\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], TextRenderer.prototype, \"textStyle\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], TextRenderer.prototype, \"useCacheMode\", void 0);\r\n return TextRenderer;\r\n}(GraphicRenderer));\r\nexport default TextRenderer;\r\n//# sourceMappingURL=TextRenderer.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;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Q,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;IACrE,CAAC;IAKS,4BAAS,GAAnB;QACC,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,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,C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IAAI,KAAK,CAAC,IAAI,IAAI,IAAI,EAAE;oBACvB,MAAM,GAAG,KAAK,CAAC;oBACf,MAAM;iBACN;aACD;;;;;;;;;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAED,qCAAQ,GAAR,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\":\"ContentSizeFitter.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/other/ContentSizeFitter.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,eAAe,EAAE,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC7C,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAE1C;IAA+C,6CAAe;IAA9D;QAAA,qEAoBC;QAnBQ,kBAAY,GAAS,IAAI,IAAI,EAAE,CAAC;;IAmBzC,CAAC;IAjBA,uCAAW,GAAX;;QACC,iBAAM,WAAW,WAAE,CAAC;QAEpB,IAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;;YACtB,KAAiB,IAAA,KAAA,iBAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAA,gBAAA,4BAAC;gBAAlC,IAAI,KAAK,WAAA;gBACZ,IAAM,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;gBAChD,IAAG,SAAS,EAAC;oBACL,IAAA,uBAAK,EAAE,yBAAM,EAAE,uBAAK,CAAc;oBACzC,WAAW,CAAC,KAAK,IAAI,KAAK,CAAC;oBAC3B,WAAW,CAAC,MAAM,IAAI,MAAM,CAAC;iBAC7B;aACD;;;;;;;;;QAED,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;QACzC,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAC5C,CAAC;IACF,wBAAC;AAAD,CAAC,AApBD,CAA+C,eAAe,GAoB7D\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent, Size } from \"scilla\";\r\nimport Transform from \"../base/Transform\";\r\nvar ContentSizeFitter = (function (_super) {\r\n tslib_1.__extends(ContentSizeFitter, _super);\r\n function ContentSizeFitter() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._measureSize = new Size();\r\n return _this;\r\n }\r\n ContentSizeFitter.prototype.afterUpdate = function () {\r\n var e_1, _a;\r\n _super.prototype.afterUpdate.call(this);\r\n var measureSize = this._measureSize;\r\n measureSize.set(0, 0);\r\n try {\r\n for (var _b = tslib_1.__values(this.entity.children), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n var child = _c.value;\r\n var transform = child.getComponent(Transform);\r\n if (transform) {\r\n var width = transform.width, height = transform.height, pivot = transform.pivot;\r\n measureSize.width += width;\r\n measureSize.height += height;\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 this.transform.width = measureSize.width;\r\n this.transform.height = measureSize.height;\r\n };\r\n return ContentSizeFitter;\r\n}(ScillaComponent));\r\nexport default ContentSizeFitter;\r\n//# sourceMappingURL=ContentSizeFitter.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/ui/index.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAA;AACpD,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,cAAc,CAAA\"}","code":"export { default as Button } from './Button';\r\nexport { default as ProgressBar } from './ProgressBar';\r\nexport { default as ScrollView } from './ScrollView';\r\n//# sourceMappingURL=index.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\":\"FrameAnimationRenderer.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/renderer/FrameAnimationRenderer.ts\"],\"names\":[],\"mappings\":\";AAQA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAiB,WAAW,EAAC,MAAM,QAAQ,CAAC;AAKnD;IAAoD,kDAAQ;IAA5D;QAAA,qEAyJC;QAjJO,cAAQ,GAAY,KAAK,CAAC;QAK1B,SAAG,GAAW,GAAG,CAAC;QAElB,gBAAU,GAAgB,IAAI,WAAW,EAAE,CAAC;QAC5C,oBAAc,GAAgB,IAAI,WAAW,EAAE,CAAC;;IAyIxD,CAAC;IAxHA,wCAAO,GAAP;QACC,iBAAM,OAAO,WAAE,CAAC;QAEhB,IAAG,IAAI,CAAC,QAAQ,EAAC;YAChB,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SACjB;IACF,CAAC;IAKD,yCAAQ,GAAR,UAAS,CAAC;QACT,IAAI,IAAI,CAAC,QAAQ,EAAE;Y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AE;YACzB,OAAO;SACP;QAEK,IAAA,SAA4D,EAA3D,oBAAO,EAAE,kCAAc,EAAE,0CAAkB,EAAE,kBAAc,CAAC;QAE7D,IAAA,gDAA6D,EAA5D,oBAAO,EAAE,cAAmD,CAAC;QAEpE,IAAI,OAAO,EAAE;YACL,IAAA,iBAAG,EAAE,mBAA0D,EAAjD,UAAC,EAAE,QAAC,EAAE,uBAAmB,EAAE,yBAAsB,CAAY;YAElF,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;YAE1D,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,GAAC,EAAE,CAAC,EAAE,YAAY,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;SACvG;IACF,CAAC;IACF,6BAAC;AAAD,CAAC,AAzJD,CAAoD,QAAQ,GAyJ3D\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport Renderer from \"./Renderer\";\r\nimport { ScillaEvent } from \"scilla\";\r\nvar FrameAnimationRenderer = (function (_super) {\r\n tslib_1.__extends(FrameAnimationRenderer, _super);\r\n function FrameAnimationRenderer() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.autoPlay = false;\r\n _this.fps = NaN;\r\n _this.onComplete = new ScillaEvent();\r\n _this.onLoopComplete = new ScillaEvent();\r\n return _this;\r\n }\r\n FrameAnimationRenderer.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n if (this.autoPlay) {\r\n this.play(0, -1);\r\n }\r\n };\r\n FrameAnimationRenderer.prototype.onUpdate = function (t) {\r\n if (this._playing) {\r\n var _a = this, frameAnimation = _a.frameAnimation, _startFrame = _a._startFrame, _endFrame = _a._endFrame, fps = _a.fps;\r\n if (this._startFlag) {\r\n this._startFlag = false;\r\n this._startTime = t;\r\n this._loopCounting++;\r\n }\r\n var mFPS = isNaN(fps) ? frameAnimation.fps : fps;\r\n var passTime = t - this._startTime;\r\n var passFrameCount = Math.floor(passTime / (1000 / mFPS));\r\n var passFrameInRegion = passFrameCount % (_endFrame - _startFrame + 1);\r\n this._currentFrameIndex = _startFrame + passFrameInRegion;\r\n if (passFrameInRegion == 0 && passFrameCount > 0) {\r\n this._currentFrameIndex = _endFrame;\r\n this.onLoopEnd();\r\n }\r\n }\r\n _super.prototype.onUpdate.call(this, t);\r\n };\r\n FrameAnimationRenderer.prototype.onSleep = function () {\r\n _super.prototype.onSleep.call(this);\r\n };\r\n FrameAnimationRenderer.prototype.onLoopEnd = function () {\r\n if (this._loop < 0) {\r\n this._startFlag = true;\r\n this.onLoopComplete.invoke();\r\n }\r\n else if (this._loopCounting < this._loop) {\r\n this._startFlag = true;\r\n this.onLoopComplete.invoke();\r\n }\r\n else {\r\n this._playing = false;\r\n this.onComplete.invoke();\r\n }\r\n };\r\n FrameAnimationRenderer.prototype.play = function (frame, loop, force) {\r\n if (frame === void 0) { frame = 0; }\r\n if (loop === void 0) { loop = 0; }\r\n if (force === void 0) { force = true; }\r\n this._loop = loop;\r\n this._loopCounting = 0;\r\n if (!this.frameAnimation) {\r\n return;\r\n }\r\n var startFrame = 0, endFrame = this.frameAnimation.frameCount - 1;\r\n if (typeof frame == 'string') {\r\n var label = this.frameAnimation.getLabel(frame);\r\n if (label) {\r\n startFrame = label.frame - 1;\r\n endFrame = label.end;\r\n }\r\n }\r\n else {\r\n startFrame = frame;\r\n }\r\n this._startFrame = startFrame;\r\n this._endFrame = endFrame;\r\n this._currentFrameIndex = this._startFrame;\r\n this._startFlag = true;\r\n this._playing = true;\r\n };\r\n FrameAnimationRenderer.prototype.stop = function () {\r\n this._playing = false;\r\n };\r\n FrameAnimationRenderer.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n if (!this.frameAnimation) {\r\n return;\r\n }\r\n var _a = this, context = _a.context, frameAnimation = _a.frameAnimation, _currentFrameIndex = _a._currentFrameIndex, bounds = _a.bounds;\r\n var _b = frameAnimation.getFrame(_currentFrameIndex), texture = _b.texture, data = _b.data;\r\n if (texture) {\r\n var img = texture.img, _c = texture.bounds, x_1 = _c.x, y = _c.y, textureWidth = _c.width, textureHeight = _c.height;\r\n bounds.setTo(data.x, data.y, textureWidth, textureHeight);\r\n context.drawImage(img, x_1, y, textureWidth, textureHeight, data.x, data.y, textureWidth, textureHeight);\r\n }\r\n };\r\n return FrameAnimationRenderer;\r\n}(Renderer));\r\nexport default FrameAnimationRenderer;\r\n//# sourceMappingURL=FrameAnimationRenderer.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,GAA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"] = \"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\":\"Swing.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/animation/Swing.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,eAAe,EAAC,MAAM,QAAQ,CAAC;AAEvC;IAAmC,iCAAe;IAAlD;QAAA,qEAQC;QAPA,cAAQ,GAAW,KAAK,CAAC;;IAO1B,CAAC;IALA,wBAAQ,GAAR,UAAS,CAAC;QACT,iBAAM,QAAQ,YAAC,CAAC,CAAC,CAAC;QAElB,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;IACF,YAAC;AAAD,CAAC,AARD,CAAmC,eAAe,GAQjD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent } from \"scilla\";\r\nvar Swing = (function (_super) {\r\n tslib_1.__extends(Swing, _super);\r\n function Swing() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.duration = 10000;\r\n return _this;\r\n }\r\n Swing.prototype.onUpdate = function (t) {\r\n _super.prototype.onUpdate.call(this, t);\r\n this.transform.rotation = Math.sin(t / 100) * 5;\r\n };\r\n return Swing;\r\n}(ScillaComponent));\r\nexport default Swing;\r\n//# sourceMappingURL=Swing.js.map"}
{"map":"{\"version\":3,\"file\":\"RelativeLayout.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/other/RelativeLayout.ts\"],\"names\":[],\"mappings\":\";AAKA,OAAO,EAAC,eAAe,EAAC,MAAM,QAAQ,CAAC;AACvC,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAK1C;IAA4C,0CAAe;IAA3D;QAAA,qEA0HC;QAzHA,UAAI,GAAW,GAAG,CAAC;QACnB,WAAK,GAAW,GAAG,CAAC;QACpB,SAAG,GAAW,GAAG,CAAC;QAClB,YAAM,GAAW,GAAG,CAAC;QACrB,sB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iCAAQ,GAAR,UAAS,CAAC;QACT,iBAAM,QAAQ,YAAC,CAAC,CAAC,CAAC;QAElB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACf,IAAI,CAAC,MAAM,EAAE,CAAC;SACd;IACF,CAAC;IAED,gCAAO,GAAP;QACC,iBAAM,OAAO,WAAE,CAAC;IACjB,CAAC;IAED,kCAAS,GAAT;QACC,iBAAM,SAAS,WAAE,CAAC;IACnB,CAAC;IAwFF,qBAAC;AAAD,CAAC,AA1HD,CAA4C,eAAe,GA0H1D\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent } from \"scilla\";\r\nimport Renderer from \"../renderer/Renderer\";\r\nimport Transform from \"../base/Transform\";\r\nvar RelativeLayout = (function (_super) {\r\n tslib_1.__extends(RelativeLayout, _super);\r\n function RelativeLayout() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.left = NaN;\r\n _this.right = NaN;\r\n _this.top = NaN;\r\n _this.bottom = NaN;\r\n _this.horizontalCenter = NaN;\r\n _this.verticalCenter = NaN;\r\n _this.once = true;\r\n _this.adjust = function () {\r\n var e_1, _a, e_2, _b, e_3, _c;\r\n var _d = _this, entity = _d.entity, parent = _d.entity.parent, transform = _d.transform, _e = _d.transform, position = _e.position, _f = _e.pivot, ax = _f.x, ay = _f.y, left = _d.left, right = _d.right, top = _d.top, bottom = _d.bottom, horizontalCenter = _d.horizontalCenter, verticalCenter = _d.verticalCenter;\r\n var hasLeft = !isNaN(left);\r\n var hasRight = !isNaN(right);\r\n var hasTop = !isNaN(top);\r\n var hasBottom = !isNaN(bottom);\r\n var hasHorizontalCenter = !isNaN(horizontalCenter);\r\n var hasVerticalCenter = !isNaN(verticalCenter);\r\n var parentRenderers = parent.getComponents(Renderer);\r\n try {\r\n for (var parentRenderers_1 = tslib_1.__values(parentRenderers), parentRenderers_1_1 = parentRenderers_1.next(); !parentRenderers_1_1.done; parentRenderers_1_1 = parentRenderers_1.next()) {\r\n var parentRenderer = parentRenderers_1_1.value;\r\n parentRenderer.measureBounds();\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 (parentRenderers_1_1 && !parentRenderers_1_1.done && (_a = parentRenderers_1.return)) _a.call(parentRenderers_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n var parentTransform = parent.getComponent(Transform);\r\n var pWidth, pHeight;\r\n if (parentRenderers.length > 0) {\r\n var parentBounds = parentRenderers[0].bounds;\r\n pWidth = parentBounds.width;\r\n pHeight = parentBounds.height;\r\n }\r\n else {\r\n pWidth = parentTransform.explicitWidth;\r\n pHeight = parentTransform.explicitHeight;\r\n }\r\n var _g = parentTransform.pivot, pax = _g.x, pay = _g.y;\r\n var renderers = 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.measureBounds();\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 (renderers_1_1 && !renderers_1_1.done && (_b = renderers_1.return)) _b.call(renderers_1);\r\n }\r\n finally { if (e_2) throw e_2.error; }\r\n }\r\n var width = transform.width, height = transform.height;\r\n var x = position.x, y = position.y;\r\n var widthModified = false, heightModified = false;\r\n {\r\n if (hasHorizontalCenter) {\r\n x = (pWidth - width) / 2 - pWidth * pax + width * ax;\r\n }\r\n else if (hasLeft) {\r\n if (hasRight) {\r\n widthModified = true;\r\n width = pWidth - right - left;\r\n x = (left - right) / 2 - (0.5 - ax) * width;\r\n }\r\n else {\r\n x = left - pWidth * pax + width * ax;\r\n }\r\n }\r\n else if (hasRight) {\r\n x = -right + pWidth * (1 - pax) - width * (1 - ax);\r\n }\r\n if (hasVerticalCenter) {\r\n y = (pHeight - height) / 2 - pHeight * pay + height * ay;\r\n }\r\n else if (hasTop) {\r\n if (hasBottom) {\r\n heightModified = true;\r\n height = pHeight - bottom - top;\r\n y = (top - bottom) / 2 - (0.5 - ay) * height;\r\n }\r\n else {\r\n y = top - pHeight * pay + height * ay;\r\n }\r\n }\r\n else if (hasBottom) {\r\n y = -bottom + pHeight * (1 - pay) - height * (1 - ay);\r\n }\r\n }\r\n position.x = x;\r\n position.y = y;\r\n if (widthModified) {\r\n transform.width = width;\r\n }\r\n if (heightModified) {\r\n transform.height = height;\r\n }\r\n if (widthModified || heightModified) {\r\n try {\r\n for (var renderers_2 = tslib_1.__values(renderers), renderers_2_1 = renderers_2.next(); !renderers_2_1.done; renderers_2_1 = renderers_2.next()) {\r\n var renderer = renderers_2_1.value;\r\n renderer.measureBounds();\r\n }\r\n }\r\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\r\n finally {\r\n try {\r\n if (renderers_2_1 && !renderers_2_1.done && (_c = renderers_2.return)) _c.call(renderers_2);\r\n }\r\n finally { if (e_3) throw e_3.error; }\r\n }\r\n }\r\n };\r\n return _this;\r\n }\r\n RelativeLayout.prototype.onCreate = function () {\r\n _super.prototype.onCreate.call(this);\r\n };\r\n RelativeLayout.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n this.adjust();\r\n };\r\n RelativeLayout.prototype.onUpdate = function (t) {\r\n _super.prototype.onUpdate.call(this, t);\r\n if (!this.once) {\r\n this.adjust();\r\n }\r\n };\r\n RelativeLayout.prototype.onSleep = function () {\r\n _super.prototype.onSleep.call(this);\r\n };\r\n RelativeLayout.prototype.onDestroy = function () {\r\n _super.prototype.onDestroy.call(this);\r\n };\r\n return RelativeLayout;\r\n}(ScillaComponent));\r\nexport default RelativeLayout;\r\n//# sourceMappingURL=RelativeLayout.js.map"}
{"map":"{\"version\":3,\"file\":\"InteractComponent.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/base/InteractComponent.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,MAAM,EAAE,eAAe,EAAE,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CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAErD,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;;YACtD,KAAqB,IAAA,cAAA,iBAAA,SAAS,CAAA,oCAAA,2DAAE;gBAA3B,IAAI,QAAQ,sBAAA;gBAChB,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;oBACvD,IAAI,QAAQ,CAAC,YAAY,EAAE;wBAC1B,SAAQ;qBACR;yBAAM;wBACN,MAAM,GAAG,IAAI,CAAC;wBACd,MAAK;qBACL;iBACD;qBAAM,IAAI,QAAQ,CAAC,YAAY,EAAE;oBACjC,OAAO,KAAK,CAAA;iBACZ;aACD;;;;;;;;;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IA/HD;QADC,iBAAiB;2DACE;IAgIrB,wBAAC;CAAA,AArID,CAA+C,eAAe,GAqI7D;eArIoB,iBAAiB\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { Matrix, ScillaComponent, decorators } from \"scilla\";\r\nimport Renderer from \"../renderer/Renderer\";\r\nvar dirtyFieldTrigger = decorators.dirtyFieldTrigger;\r\nvar InteractComponent = (function (_super) {\r\n tslib_1.__extends(InteractComponent, _super);\r\n function InteractComponent() {\r\n var _this = _super.call(this) || this;\r\n _this.interactable = true;\r\n _this.touchInterrupt = false;\r\n _this.invertMatrix = Matrix.create();\r\n _this.localPos = {};\r\n _this.isOut = true;\r\n return _this;\r\n }\r\n InteractComponent.prototype._dealGlobalTouchBegin = function (e) {\r\n var interrupt = _super.prototype._dealGlobalTouchBegin.call(this, e);\r\n var hitOn = this.hitTest(e);\r\n if (hitOn) {\r\n this._touchBeginFlag = true;\r\n this.onTouchBegin(e);\r\n this._dealTouchOver(e);\r\n }\r\n return hitOn && interrupt;\r\n };\r\n InteractComponent.prototype._dealGlobalTouchMove = function (e) {\r\n var interrupt = _super.prototype._dealGlobalTouchMove.call(this, e);\r\n var hitOn = this.hitTest(e);\r\n if (hitOn) {\r\n this._dealTouchOver(e);\r\n this.onTouchMove(e);\r\n }\r\n else {\r\n this._dealTouchOut(e);\r\n }\r\n return hitOn && interrupt;\r\n };\r\n InteractComponent.prototype._dealGlobalTouchEnd = function (e) {\r\n var interrupt = _super.prototype._dealGlobalTouchEnd.call(this, e);\r\n var hitOn = this.hitTest(e);\r\n if (hitOn) {\r\n this.onTouchEnd(e);\r\n if (this._touchBeginFlag) {\r\n this.onTouchTap(e);\r\n this._touchBeginFlag = false;\r\n }\r\n }\r\n this.isOut = true;\r\n return hitOn && interrupt;\r\n };\r\n InteractComponent.prototype._dealTouchOver = function (e) {\r\n if (this.isOut) {\r\n this.isOut = false;\r\n this.onTouchOver(e);\r\n }\r\n };\r\n InteractComponent.prototype._dealTouchOut = function (e) {\r\n if (!this.isOut) {\r\n this.isOut = true;\r\n this.onTouchOut(e);\r\n }\r\n };\r\n InteractComponent.prototype.onTouchBegin = function (e) {\r\n };\r\n InteractComponent.prototype.onTouchMove = function (e) {\r\n };\r\n InteractComponent.prototype.onTouchOver = function (e) {\r\n };\r\n InteractComponent.prototype.onTouchOut = function (e) {\r\n };\r\n InteractComponent.prototype.onTouchEnd = function (e) {\r\n };\r\n InteractComponent.prototype.onTouchTap = function (e) {\r\n };\r\n InteractComponent.prototype.hitTest = function (e) {\r\n var e_1, _a;\r\n var matrix = this.transform.getMatrix();\r\n var invertMatrix = this.invertMatrix;\r\n invertMatrix.copyFrom(matrix);\r\n invertMatrix.invert();\r\n invertMatrix.transformPoint(e.x, e.y, this.localPos);\r\n var result = false;\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 if (renderer.hitTest(this.localPos.x, this.localPos.y)) {\r\n if (renderer.isUsedToMask) {\r\n continue;\r\n }\r\n else {\r\n result = true;\r\n break;\r\n }\r\n }\r\n else if (renderer.isUsedToMask) {\r\n return false;\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 (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 return result;\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], InteractComponent.prototype, \"interactable\", void 0);\r\n return InteractComponent;\r\n}(ScillaComponent));\r\nexport default InteractComponent;\r\n//# sourceMappingURL=InteractComponent.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\":\"registerAllComponents.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../node_modules/scilla-components/src/registerAllComponents.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,QAAQ,CAAA;AAElC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,iBAAiB,MA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AAC;IACpD,WAAW,CAAC,mCAAmC,EAAE,gBAAgB,CAAC,CAAC;IACnE,WAAW,CAAC,oCAAoC,EAAE,iBAAiB,CAAC,CAAC;IACrE,WAAW,CAAC,iCAAiC,EAAE,cAAc,CAAC,CAAC;IAC/D,WAAW,CAAC,oCAAoC,EAAE,cAAc,CAAC,CAAC;IAClE,WAAW,CAAC,4CAA4C,EAAE,sBAAsB,CAAC,CAAC;IAClF,WAAW,CAAC,qCAAqC,EAAE,eAAe,CAAC,CAAC;IACpE,WAAW,CAAC,kCAAkC,EAAE,YAAY,CAAC,CAAC;IAC9D,WAAW,CAAC,kCAAkC,EAAE,YAAY,CAAC,CAAC;IAC9D,WAAW,CAAC,8BAA8B,EAAE,QAAQ,CAAC,CAAC;IACtD,WAAW,CAAC,kCAAkC,EAAE,YAAY,CAAC,CAAC;IAC9D,WAAW,CAAC,qCAAqC,EAAE,eAAe,CAAC,CAAC;IACpE,WAAW,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;IAC5C,WAAW,CAAC,2BAA2B,EAAE,WAAW,CAAC,CAAC;IACtD,WAAW,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC;AACrD,CAAC\"}","code":"import { registerDef } from \"scilla\";\r\nimport BounceZoom from './animation/BounceZoom';\r\nimport Fade from './animation/Fade';\r\nimport Rotation from './animation/Rotation';\r\nimport RoundLoop from './animation/RoundLoop';\r\nimport Swing from './animation/Swing';\r\nimport TouchZoom from './animation/TouchZoom';\r\nimport Wave from './animation/Wave';\r\nimport ZoomLoop from './animation/ZoomLoop';\r\nimport InteractComponent from './base/InteractComponent';\r\nimport TouchInterrupt from './base/TouchInterrupt';\r\nimport Transform from './base/Transform';\r\nimport CameraController from './other/CameraController';\r\nimport ContentSizeFitter from './other/ContentSizeFitter';\r\nimport RelativeLayout from './other/RelativeLayout';\r\nimport CircleRenderer from './renderer/CircleRenderer';\r\nimport FrameAnimationRenderer from './renderer/FrameAnimationRenderer';\r\nimport GraphicRenderer from './renderer/GraphicRenderer';\r\nimport LineRenderer from './renderer/LineRenderer';\r\nimport RectRenderer from './renderer/RectRenderer';\r\nimport Renderer from './renderer/Renderer';\r\nimport TextRenderer from './renderer/TextRenderer';\r\nimport TextureRenderer from './renderer/TextureRenderer';\r\nimport Button from './ui/Button';\r\nimport ProgressBar from './ui/ProgressBar';\r\nimport ScrollView from './ui/ScrollView';\r\nexport function registerAllComponents() {\r\n registerDef('components/animation/BounceZoom', BounceZoom);\r\n registerDef('components/animation/Fade', Fade);\r\n registerDef('components/animation/Rotation', Rotation);\r\n registerDef('components/animation/RoundLoop', RoundLoop);\r\n registerDef('components/animation/Swing', Swing);\r\n registerDef('components/animation/TouchZoom', TouchZoom);\r\n registerDef('components/animation/Wave', Wave);\r\n registerDef('components/animation/ZoomLoop', ZoomLoop);\r\n registerDef('components/base/InteractComponent', InteractComponent);\r\n registerDef('components/base/TouchInterrupt', TouchInterrupt);\r\n registerDef('components/base/Transform', Transform);\r\n registerDef('components/other/CameraController', CameraController);\r\n registerDef('components/other/ContentSizeFitter', ContentSizeFitter);\r\n registerDef('components/other/RelativeLayout', RelativeLayout);\r\n registerDef('components/renderer/CircleRenderer', CircleRenderer);\r\n registerDef('components/renderer/FrameAnimationRenderer', FrameAnimationRenderer);\r\n registerDef('components/renderer/GraphicRenderer', GraphicRenderer);\r\n registerDef('components/renderer/LineRenderer', LineRenderer);\r\n registerDef('components/renderer/RectRenderer', RectRenderer);\r\n registerDef('components/renderer/Renderer', Renderer);\r\n registerDef('components/renderer/TextRenderer', TextRenderer);\r\n registerDef('components/renderer/TextureRenderer', TextureRenderer);\r\n registerDef('components/ui/Button', Button);\r\n registerDef('components/ui/ProgressBar', ProgressBar);\r\n registerDef('components/ui/ScrollView', ScrollView);\r\n}\r\n//# sourceMappingURL=registerAllComponents.js.map"}
{"map":"{\"version\":3,\"file\":\"main.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/main.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,E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\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\":\"Entity.js\",\"sourceRoot\":\"\",\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E,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 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\":\"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\":\"ScillaComponent.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/core/ScillaComponent.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAC,YAAY,EAA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CAAC;IAMD,0CAAgB,GAAhB,UAAiB,CAAC;IAElB,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,AAnPD,CAAqC,UAAU,GAmP9C\"}","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 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\":\"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,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IAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;gBACpD,IAAM,MAAM,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;gBACrC,IAAI,MAAM,EAAE;oBACX,IAAI,KAAK,IAAI,SAAS,EAAE;wBACvB,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;qBACxC;yBAAM;wBACN,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;qBAC/C;iBACD;aACD;SACD;;;;;;;;;AACF,CAAC;AAED,SAAS,OAAO,CAAC,GAAW,EAAE,GAAI;IACjC,IAAI,MAAM,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 cleanEntity(entity) {\r\n entity.removeAllComponents();\r\n entity.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 injectComponentProperties(components[i], component, pid);\r\n }\r\n }\r\n}\r\nexport function injectComponentProperties(component, config, pid) {\r\n var properties = config.properties;\r\n if (properties) {\r\n injectProperties(component, properties, pid);\r\n }\r\n}\r\nexport function instantiateComponent(entity, config) {\r\n var script = config.script;\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 return 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\":\"TextureRenderer.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/renderer/TextureRenderer.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAU,UAAU,EAAC,MAAM,QAAQ,CAAC;AAEpC,IAAA,kDAAkB,CAAe;AAExC,MAAM,CAAN,IAAY,QAaX;AAbD,WAAY,QAAQ;IAInB,2CAAM,CAAA;IAIN,2CAAM,CAAA;IAIN,yCAAK,CAAA;AACN,CAAC,EAbW,QAAQ,KAAR,QAAQ,QAanB;AAKD;IAA6C,2CAAQ;IAArD;QAAA,qEAqIC;QA1HA,cAAQ,GAAa,QAAQ,CAAC,MAAM,CAAC;QAMrC,aAAO,GAAG,EAAE,CAAC;;IAoHd,CAAC;IAlHA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qIpD;eArIoB,eAAe\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport Renderer from \"./Renderer\";\r\nimport { decorators } from \"scilla\";\r\nvar dirtyFieldDetector = decorators.dirtyFieldDetector;\r\nexport var FillMode;\r\n(function (FillMode) {\r\n FillMode[FillMode[\"NORMAL\"] = 0] = \"NORMAL\";\r\n FillMode[FillMode[\"SLICED\"] = 1] = \"SLICED\";\r\n FillMode[FillMode[\"TILED\"] = 2] = \"TILED\";\r\n})(FillMode || (FillMode = {}));\r\nvar TextureRenderer = (function (_super) {\r\n tslib_1.__extends(TextureRenderer, _super);\r\n function TextureRenderer() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.fillMode = FillMode.NORMAL;\r\n _this.filters = [];\r\n return _this;\r\n }\r\n Object.defineProperty(TextureRenderer.prototype, \"hasFilters\", {\r\n get: function () {\r\n return this.filters && this.filters.length > 0;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n TextureRenderer.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n this.drawImage();\r\n this.applyFilters();\r\n };\r\n TextureRenderer.prototype.applyFilters = function () {\r\n var e_1, _a;\r\n if (!this.hasFilters)\r\n return;\r\n var _b = this, texture = _b.texture, filters = _b.filters, context = _b.context;\r\n var _c = texture.bounds, textureWidth = _c.width, textureHeight = _c.height;\r\n var imageData = context.getImageData(0, 0, textureWidth, textureHeight);\r\n try {\r\n for (var filters_1 = tslib_1.__values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {\r\n var filter = filters_1_1.value;\r\n filter.drawFilter(imageData);\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 (filters_1_1 && !filters_1_1.done && (_a = filters_1.return)) _a.call(filters_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n context.putImageData(imageData, 0, 0);\r\n };\r\n TextureRenderer.prototype.drawImage = function () {\r\n if (!this.texture) {\r\n return;\r\n }\r\n var _a = this, texture = _a.texture, fillMode = _a.fillMode, context = _a.context, _b = _a.bounds, width = _b.width, height = _b.height;\r\n var _c = texture.bounds, x = _c.x, y = _c.y, textureWidth = _c.width, textureHeight = _c.height;\r\n switch (fillMode) {\r\n case FillMode.NORMAL:\r\n texture.drawToCanvas(context);\r\n break;\r\n case FillMode.SLICED:\r\n break;\r\n case FillMode.TILED:\r\n var textureCanvas = texture.getCacheCanvas();\r\n var pattern = context.createPattern(textureCanvas, 'repeat');\r\n context.rect(0, 0, width, height);\r\n context.fillStyle = pattern;\r\n context.fill();\r\n break;\r\n }\r\n };\r\n TextureRenderer.prototype.measureBounds = function () {\r\n if (!this.dirty) {\r\n return;\r\n }\r\n var _a = this, bounds = _a.bounds, _b = _a.transform, tWidth = _b.explicitWidth, tHeight = _b.explicitHeight;\r\n if (this.texture) {\r\n var _c = this.texture, textureWidth = _c.width, textureHeight = _c.height;\r\n bounds.width = isNaN(tWidth) ? textureWidth : tWidth;\r\n bounds.height = isNaN(tHeight) ? textureHeight : tHeight;\r\n }\r\n else {\r\n bounds.width = isNaN(tWidth) ? 0 : tWidth;\r\n bounds.height = isNaN(tHeight) ? 0 : tHeight;\r\n }\r\n _super.prototype.measureBounds.call(this);\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], TextureRenderer.prototype, \"texture\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], TextureRenderer.prototype, \"fillMode\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], TextureRenderer.prototype, \"filters\", void 0);\r\n return TextureRenderer;\r\n}(Renderer));\r\nexport default TextureRenderer;\r\n//# sourceMappingURL=TextureRenderer.js.map"}
{"map":"{\"version\":3,\"file\":\"RoundLoop.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/animation/RoundLoop.ts\"],\"names\":[],\"mappings\":\";AAGA,OAAO,EAAC,eAAe,EAAC,MAAM,QAAQ,CAAC;AAEvC;IAAuC,qCAAe;IAAtD;QAAA,qEAcC;QAXA,cAAQ,GAAW,KAAK,CAAC;;IAW1B,CAAC;IATA,4BAAQ,GAAR,UAAS,CAAC;QACT,iBAAM,QAAQ,YAAC,CAAC,CAAC,CAAC;QAEX,IAAA,kCAAQ,CAAmB;QAClC,QAAQ,CAAC,KAAK,CACb,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,EACzB,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,CACzB,CAAA;IACF,CAAC;IACF,gBAAC;AAAD,CAAC,AAdD,CAAuC,eAAe,GAcrD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent } from \"scilla\";\r\nvar RoundLoop = (function (_super) {\r\n tslib_1.__extends(RoundLoop, _super);\r\n function RoundLoop() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.duration = 10000;\r\n return _this;\r\n }\r\n RoundLoop.prototype.onUpdate = function (t) {\r\n _super.prototype.onUpdate.call(this, t);\r\n var position = this.transform.position;\r\n position.setXY(Math.cos(t * 0.001) * 100, Math.sin(t * 0.001) * 100);\r\n };\r\n return RoundLoop;\r\n}(ScillaComponent));\r\nexport default RoundLoop;\r\n//# sourceMappingURL=RoundLoop.js.map"}
{"map":"{\"version\":3,\"file\":\"ScrollView.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/ui/ScrollView.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAS,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,QAAQ,CAAC;AACjF,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAE1C,IAAK,WAIJ;AAJD,WAAK,WAAW;IACf,+CAAK,CAAA;IACL,mDAAO,CAAA;IACP,qDAA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AC,CAAC,EAAE,IAAI,CAAC,CAAC;QAEvD,IAAM,SAAS,GAAG,cAAc,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACzC,IAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QAC5E,WAAW,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,EAAE,EAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAC,CAAC;aAC9E,EAAE,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC;IACF,iBAAC;AAAD,CAAC,AAzHD,CAAwC,iBAAiB,GAyHxD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { Size, createTween, createVector2D, Vector2D, ease } from \"scilla\";\r\nimport InteractComponent from \"../base/InteractComponent\";\r\nimport Transform from \"../base/Transform\";\r\nvar LockingType;\r\n(function (LockingType) {\r\n LockingType[LockingType[\"NOSET\"] = 0] = \"NOSET\";\r\n LockingType[LockingType[\"HORIZON\"] = 1] = \"HORIZON\";\r\n LockingType[LockingType[\"VERTICAL\"] = 2] = \"VERTICAL\";\r\n})(LockingType || (LockingType = {}));\r\nvar ScrollView = (function (_super) {\r\n tslib_1.__extends(ScrollView, _super);\r\n function ScrollView() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.lockingType = LockingType.NOSET;\r\n _this._lastPos = createVector2D();\r\n _this._speed = createVector2D();\r\n _this.updatePosOffset = function () {\r\n var _a = _this._contentTransform.position, x = _a.x, y = _a.y;\r\n _this._posOffset = { x: x, y: y };\r\n };\r\n _this.updatePosRange = function () {\r\n var _a = _this._viewportTransform, pWidth = _a.width, pHeight = _a.height;\r\n var _b = _this._contentTransform, width = _b.width, height = _b.height;\r\n _this._posRange = new Size(pWidth - width, pHeight - height);\r\n };\r\n return _this;\r\n }\r\n ScrollView.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n this._contentTransform = this.content.getComponent(Transform);\r\n this._viewportTransform = this.viewport.getComponent(Transform);\r\n this.callOnNextTick(this.updatePosOffset);\r\n };\r\n ScrollView.prototype.onTouchBegin = function (e) {\r\n _super.prototype.onTouchBegin.call(this, e);\r\n this.updatePosRange();\r\n var tx = e.x, ty = e.y;\r\n var _a = this._contentTransform.position, cx = _a.x, cy = _a.y;\r\n this._beginPos = {\r\n tx: tx,\r\n ty: ty,\r\n cx: cx,\r\n cy: cy,\r\n };\r\n this._lastPos.setXY(tx, ty);\r\n };\r\n ScrollView.prototype.onGlobalTouchMove = function (e) {\r\n _super.prototype.onGlobalTouchMove.call(this, e);\r\n if (!this._beginPos) {\r\n return;\r\n }\r\n var _a = this, _b = _a._beginPos, tx = _b.tx, ty = _b.ty, cx = _b.cx, cy = _b.cy, _c = _a._posOffset, offX = _c.x, offY = _c.y, position = _a._contentTransform.position, lockingType = _a.lockingType;\r\n var x = e.x, y = e.y;\r\n var px = x - tx + cx;\r\n var py = y - ty + cy;\r\n var _d = this._posRange, rWidth = _d.width, rHeight = _d.height;\r\n var halfWidth = Math.abs(rWidth / 2);\r\n var paddingX = halfWidth - Math.abs(offX - halfWidth - px);\r\n if (paddingX < 0) {\r\n px += paddingX * 0.8 * (x - tx > 0 ? 1 : -1);\r\n }\r\n var halfHeight = Math.abs(rHeight / 2);\r\n var paddingY = halfHeight - Math.abs(offY - halfHeight - py);\r\n if (paddingY < 0) {\r\n py += paddingY * 0.8 * (y - ty > 0 ? 1 : -1);\r\n }\r\n switch (lockingType) {\r\n case LockingType.HORIZON:\r\n position.y = py;\r\n break;\r\n case LockingType.VERTICAL:\r\n position.x = px;\r\n break;\r\n default:\r\n position.setXY(px, py);\r\n }\r\n this._speed.copyFrom(this._lastPos.subtract({ x: x, y: y }));\r\n this._lastPos.setXY(x, y);\r\n };\r\n ScrollView.prototype.onGlobalTouchEnd = function (e) {\r\n _super.prototype.onGlobalTouchEnd.call(this, e);\r\n if (!this._beginPos) {\r\n return;\r\n }\r\n this._beginPos = null;\r\n var _a = this._posOffset, offX = _a.x, offY = _a.y;\r\n var _b = this._posRange, rWidth = _b.width, rHeight = _b.height;\r\n var _c = this._contentTransform, position = _c.position, _d = _c.position, x = _d.x, y = _d.y;\r\n var tx = Math.min(Math.max(offX + rWidth, x), offX);\r\n var ty = Math.min(Math.max(offY + rHeight, y), offY);\r\n var targetPos = createVector2D(tx, ty);\r\n var duration = Math.min(500, Math.max(targetPos.distance(position), 200));\r\n createTween(this._contentTransform, true, { clazz: Vector2D, fields: ['x', 'y'] })\r\n .to({ position: targetPos }, duration, ease.cubicOut);\r\n };\r\n return ScrollView;\r\n}(InteractComponent));\r\nexport default ScrollView;\r\n//# sourceMappingURL=ScrollView.js.map"}
{"map":"{\"version\":3,\"file\":\"LineRenderer.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/renderer/LineRenderer.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAKhD;IAA0C,wCAAe;IAAzD;QAAA,qEA4BC;QA3BA,QAAE,GAAW,CAAC,CAAC;QACf,QAAE,GAAW,CAAC,CAAC;QACf,QAAE,GAAW,CAAC,CAAC;QACf,QAAE,GAAW,CAAC,CAAC;;IAwBhB,CAAC;IAnBA,2BAAI,GAAJ;QACC,iBAAM,IAAI,WAAE,CAAC;QAEP,IAAA,SAAgC,EAA/B,oBAAO,EAAE,UAAE,EAAE,UAAE,EAAE,UAAE,EAAE,UAAU,CAAC;QAEvC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACvB,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACxB,CAAC;IAKD,oCAAa,GAAb;QACQ,IAAA,oBAAM,CAAS;QACtB,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QAElB,iBAAM,aAAa,WAAE,CAAC;IACvB,CAAC;IACF,mBAAC;AAAD,CAAC,AA5BD,CAA0C,eAAe,GA4BxD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport GraphicRenderer from \"./GraphicRenderer\";\r\nvar LineRenderer = (function (_super) {\r\n tslib_1.__extends(LineRenderer, _super);\r\n function LineRenderer() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.x0 = 0;\r\n _this.y0 = 0;\r\n _this.x1 = 0;\r\n _this.y1 = 0;\r\n return _this;\r\n }\r\n LineRenderer.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n var _a = this, context = _a.context, x0 = _a.x0, y0 = _a.y0, x1 = _a.x1, y1 = _a.y1;\r\n context.moveTo(x0, y0);\r\n context.lineTo(x1, y1);\r\n };\r\n LineRenderer.prototype.measureBounds = function () {\r\n var bounds = this.bounds;\r\n bounds.width = 0;\r\n bounds.height = 0;\r\n _super.prototype.measureBounds.call(this);\r\n };\r\n return LineRenderer;\r\n}(GraphicRenderer));\r\nexport default LineRenderer;\r\n//# sourceMappingURL=LineRenderer.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/renderer/index.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC1E,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAA\"}","code":"export { default as CircleRenderer } from './CircleRenderer';\r\nexport { default as FrameAnimationRenderer } from './FrameAnimationRenderer';\r\nexport { default as GraphicRenderer } from './GraphicRenderer';\r\nexport { default as LineRenderer } from './LineRenderer';\r\nexport { default as RectRenderer } from './RectRenderer';\r\nexport { default as Renderer } from './Renderer';\r\nexport { default as TextRenderer } from './TextRenderer';\r\nexport { default as TextureRenderer } from './TextureRenderer';\r\n//# sourceMappingURL=index.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,C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G,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\":\"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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AAuC,eAAe,GA8LrD;eA9LoB,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, 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(true));\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"}
{"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AAE,GAAG,CAAC,CAAC;aACzB;YACD,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC;YACpF,IAAG,YAAY,EAAC;gBACf,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;aACzB;SACD;QAED,iBAAM,IAAI,WAAE,CAAC;IACd,CAAC;IAhDD;QADC,kBAAkB;kDACP;IAMZ;QADC,kBAAkB;sDACI;IAMvB;QADC,kBAAkB;oDACI;IAMvB;QADC,kBAAkB;wDACU;IA+B9B,qBAAC;CAAA,AAtDD,CAA4C,eAAe,GAsD1D;eAtDoB,cAAc\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport GraphicRenderer from \"./GraphicRenderer\";\r\nimport { decorators } from \"scilla\";\r\nvar dirtyFieldDetector = decorators.dirtyFieldDetector;\r\nvar CircleRenderer = (function (_super) {\r\n tslib_1.__extends(CircleRenderer, _super);\r\n function CircleRenderer() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.radius = 50;\r\n _this.startAngle = 0;\r\n _this.endAngle = 360;\r\n _this.backToCenter = true;\r\n return _this;\r\n }\r\n CircleRenderer.prototype.getRenderSize = function () {\r\n var radius = this.radius;\r\n return { width: radius * 2, height: radius * 2 };\r\n };\r\n CircleRenderer.prototype.draw = function () {\r\n var _a = this, context = _a.context, _b = _a.bounds, width = _b.width, height = _b.height, startAngle = _a.startAngle, endAngle = _a.endAngle, backToCenter = _a.backToCenter, _margin = _a._margin, _useCacheMode = _a._useCacheMode;\r\n var offset = _useCacheMode ? _margin : 0;\r\n var radius = Math.min(width, height) / 2;\r\n var pos = offset + radius;\r\n if (startAngle == 0 && endAngle == 360) {\r\n context.arc(pos, pos, radius, 0, 2 * Math.PI);\r\n }\r\n else {\r\n if (backToCenter) {\r\n context.moveTo(pos, pos);\r\n }\r\n context.arc(pos, pos, radius, startAngle * Math.PI / 180, endAngle * Math.PI / 180);\r\n if (backToCenter) {\r\n context.lineTo(pos, pos);\r\n }\r\n }\r\n _super.prototype.draw.call(this);\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], CircleRenderer.prototype, \"radius\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], CircleRenderer.prototype, \"startAngle\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], CircleRenderer.prototype, \"endAngle\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], CircleRenderer.prototype, \"backToCenter\", void 0);\r\n return CircleRenderer;\r\n}(GraphicRenderer));\r\nexport default CircleRenderer;\r\n//# sourceMappingURL=CircleRenderer.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,CAA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,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\":\"setXY.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../assets/scripts/setXY.ts\"],\"names\":[],\"mappings\":\"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,CAAC,IAAM,IAAI,GAAG,UAAC,CAAQ,EAAE,CAAQ;IAClC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAe,CAAC,QAAQ,CAAC,CAAC,GAAE,CAAC,CAAC;AAC3D,CAAC,CAAA;AACD,MAAM,CAAC,IAAM,IAAI,GAAI,UAAC,CAAQ,EAAE,CAAQ;IACnC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAe,CAAC,QAAQ,CAAC,CAAC,GAAE,CAAC,CAAC;AAC3D,CAAC,CAAA\"}","code":"import { Transform } from 'scilla-components/src';\r\nexport var setX = function (e, x) {\r\n e.getComponent(Transform).position.x = x;\r\n};\r\nexport var setY = function (e, y) {\r\n e.getComponent(Transform).position.y = y;\r\n};\r\n//# sourceMappingURL=setXY.js.map"}
{"map":"{\"version\":3,\"file\":\"Slider.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../assets/scripts/Slider.ts\"],\"names\":[],\"mappings\":\";AAAA,OAAO,EAAU,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAQ,IAAI,EAAE,MAAM,SAAS,CAAC;AAErC;IAAoC,kCAAe;IAAnD;;IA4EA,CAAC;IAjEG,yBAAQ,GAAR;QACI,iBAAM,QAAQ,WAAE,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG;YACZ,UAAU;YACV,WAAW;YACX,UAAU;YACV,SAAS;YACT,UAAU;SACb,CAAC;IACN,CAAC;IAED,6BAAY,GAAZ;QAAA,iBA0CC;QAxCG,IAAI,C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AC1B,KAAI,CAAC,aAAa,GAAG,IAAI,CAAC;YAE1B,IAAM,KAAK,GAAG,KAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACpC,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAE1B,YAAY,CAAC,KAAI,CAAC,aAAa,EAAE,KAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;IACX,CAAC;IAED,wBAAO,GAAP;QAAA,iBASC;QARG,iBAAM,OAAO,WAAE,CAAC;QAEhB,YAAY,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,YAAY,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QAElD,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC;YACtB,KAAI,CAAC,YAAY,EAAE,CAAC;QACxB,CAAC,EAAE,IAAI,CAAC,CAAC;IACb,CAAC;IACL,aAAC;AAAD,CAAC,AA5ED,CAAoC,eAAe,GA4ElD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent, createTween, Vector2D, createVector2D } from 'scilla-core/src';\r\nimport { getTransForm } from './utils';\r\nimport { setLabelText } from './labelUtils';\r\nimport { setY } from './setXY';\r\nvar Slider = (function (_super) {\r\n tslib_1.__extends(Slider, _super);\r\n function Slider() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Slider.prototype.onCreate = function () {\r\n _super.prototype.onCreate.call(this);\r\n this.dataList = [\r\n '11111111',\r\n '222222222',\r\n '33333333',\r\n '4444444',\r\n '55555555',\r\n ];\r\n };\r\n Slider.prototype.updateSlider = function () {\r\n var _this = this;\r\n this.currentLabel1 = this.sliderLabel1;\r\n this.currentLabel2 = this.sliderLabel2;\r\n setLabelText(this.sliderLabel1, this.dataList[0]);\r\n setLabelText(this.sliderLabel2, this.dataList[1]);\r\n setY(this.currentLabel1, 0);\r\n setY(this.currentLabel2, 41);\r\n createTween(getTransForm(this.currentLabel1), false, {\r\n clazz: Vector2D,\r\n fields: ['y'],\r\n autoPlay: true,\r\n initFields: ['_position']\r\n })\r\n .to({\r\n position: createVector2D(0, -41)\r\n }, 1000);\r\n createTween(getTransForm(this.currentLabel2), false, {\r\n clazz: Vector2D,\r\n fields: ['y'],\r\n autoPlay: true,\r\n initFields: ['_position']\r\n })\r\n .to({\r\n position: createVector2D(0, 0)\r\n }, 1000).call(function () {\r\n setY(_this.currentLabel1, 41);\r\n var tmp1 = _this.currentLabel1;\r\n var tmp2 = _this.currentLabel2;\r\n _this.currentLabel1 = tmp2;\r\n _this.currentLabel2 = tmp1;\r\n var first = _this.dataList.shift();\r\n _this.dataList.push(first);\r\n setLabelText(_this.currentLabel2, _this.dataList[1]);\r\n });\r\n };\r\n Slider.prototype.onAwake = function () {\r\n var _this = this;\r\n _super.prototype.onAwake.call(this);\r\n setLabelText(this.sliderLabel1, this.dataList[0]);\r\n setLabelText(this.sliderLabel2, this.dataList[1]);\r\n this._timer = setInterval(function () {\r\n _this.updateSlider();\r\n }, 4000);\r\n };\r\n return Slider;\r\n}(ScillaComponent));\r\nexport default Slider;\r\n//# sourceMappingURL=Slider.js.map"}
{"map":"{\"version\":3,\"file\":\"TouchZoom.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/animation/TouchZoom.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,WAAW,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAS,QAAQ,GAAE,MAAM,QAAQ,CAAC;AACjF,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAE1C;IAAuC,qCAAiB;IAAxD;QAAA,qEA+CC;QA9CA,iBAAW,GAAa,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACjD,cAAQ,GAAW,GAAG,CAAC;QACv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AED,oCAAgB,GAAhB,UAAiB,CAAC;QACjB,iBAAM,gBAAgB,YAAC,CAAC,CAAC,CAAC;QAE1B,IAAI,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;YACzB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,KAAK,CAAC;IACd,CAAC;IACF,gBAAC;AAAD,CAAC,AA/CD,CAAuC,iBAAiB,GA+CvD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { createTween, createVector2D, ease, Ease, Vector2D, } from \"scilla\";\r\nimport { InteractComponent } from \"../base\";\r\nvar TouchZoom = (function (_super) {\r\n tslib_1.__extends(TouchZoom, _super);\r\n function TouchZoom() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.scaleOffset = createVector2D(0.1, 0.1);\r\n _this.duration = 200;\r\n _this.easeName = Ease.backOut;\r\n return _this;\r\n }\r\n TouchZoom.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n if (!this._zoomIn) {\r\n var _a = this, scaleOffset = _a.scaleOffset, duration = _a.duration, transform = _a.transform;\r\n var easeFunc = ease[this.easeName];\r\n var scaleFrom = transform.scale.clone();\r\n var scaleTo = transform.scale.clone().add(scaleOffset);\r\n this._zoomIn = createTween(transform, false, { autoPlay: false, clazz: Vector2D, fields: ['x', 'y'] })\r\n .to({ scale: scaleTo }, duration, easeFunc);\r\n this._zoomOut = createTween(transform, false, { autoPlay: false, clazz: Vector2D, fields: ['x', 'y'] })\r\n .to({ scale: scaleFrom }, duration, easeFunc);\r\n }\r\n };\r\n TouchZoom.prototype.onTouchBegin = function (e) {\r\n _super.prototype.onTouchOver.call(this, e);\r\n if (this.interactable) {\r\n this._touchBegin = true;\r\n this._zoomIn.play(true);\r\n }\r\n };\r\n TouchZoom.prototype.onGlobalTouchEnd = function (e) {\r\n _super.prototype.onGlobalTouchEnd.call(this, e);\r\n if (this._touchBegin) {\r\n this._touchBegin = false;\r\n this._zoomOut.play(true);\r\n }\r\n return false;\r\n };\r\n return TouchZoom;\r\n}(InteractComponent));\r\nexport default TouchZoom;\r\n//# sourceMappingURL=TouchZoom.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\":\"TouchInterrupt.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/base/TouchInterrupt.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD;IAA4C,0CAAiB;IAA7D;QAAA,qEAEC;QADA,oBAAc,GAAY,IAAI,CAAC;;IAChC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAFD,CAA4C,iBAAiB,GAE5D\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport InteractComponent from \"./InteractComponent\";\r\nvar TouchInterrupt = (function (_super) {\r\n tslib_1.__extends(TouchInterrupt, _super);\r\n function TouchInterrupt() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.touchInterrupt = true;\r\n return _this;\r\n }\r\n return TouchInterrupt;\r\n}(InteractComponent));\r\nexport default TouchInterrupt;\r\n//# sourceMappingURL=TouchInterrupt.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\":\"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,GA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AG,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 + '.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\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/editor/index.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,WAAW,EAAE,UAAU,GAAG,MAAM,eAAe,CAAC;AACxD,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,S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O,IAAI,EAAC;;;;CACZ;AAED,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { cleanEntity, 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 cleanEntity(scene.root);\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\":\"Rotation.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/animation/Rotation.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,WAAW,EAAE,eAAe,EAAE,WAAW,EAAQ,MAAM,QAAQ,CAAC;AAExE;IAAsC,oCAAe;IAArD;QAAA,qEAgCC;QA/BA,cAAQ,GAAW,KAAK,CAAC;QACzB,cAAQ,GAAY,KAAK,CAAC;QAC1B,UAAI,GAAW,CAAC,CAAC,CAAC;QAClB,gBAAU,GAAgB,IAAI,WAAW,EAAE,CAAC;;IA4B7C,CAAC;IAxBA,2BAAQ,GAAR;QACC,iBAAM,QAAQ,WAAE,CAAC;IAElB,CAAC;IAED,0BAAO,GAAP;QAAA,iBAUC;QATA,iBAAM,OAAO,WAAE,CAAC;QAEhB,IAAG,CAAC,IAAI,CAAC,MAAM,EAAC;YACf,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,EAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,WAAW,CAAC,EAAC,CAAC;iBACrH,EAAE,CAAC,EAAC,QAAQ,EAAE,GAAG,EAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;iBAClC,IAAI,CAAC;gBACL,KAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YAC1B,CAAC,CAAC,CAAC;SACJ;IACF,CAAC;IAED,uBAAI,GAAJ;QACC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,uBAAI,GAAJ;QACC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;IACF,eAAC;AAAD,CAAC,AAhCD,CAAsC,eAAe,GAgCpD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { createTween, ScillaComponent, ScillaEvent } from \"scilla\";\r\nvar Rotation = (function (_super) {\r\n tslib_1.__extends(Rotation, _super);\r\n function Rotation() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.duration = 10000;\r\n _this.autoPlay = false;\r\n _this.loop = -1;\r\n _this.onComplete = new ScillaEvent();\r\n return _this;\r\n }\r\n Rotation.prototype.onCreate = function () {\r\n _super.prototype.onCreate.call(this);\r\n };\r\n Rotation.prototype.onAwake = function () {\r\n var _this = this;\r\n _super.prototype.onAwake.call(this);\r\n if (!this._tween) {\r\n this._tween = createTween(this.transform, false, { autoPlay: this.autoPlay, loop: this.loop, initFields: ['_rotation'] })\r\n .to({ rotation: 360 }, this.duration)\r\n .call(function () {\r\n _this.onComplete.invoke();\r\n });\r\n }\r\n };\r\n Rotation.prototype.play = function () {\r\n this._tween.play(true);\r\n };\r\n Rotation.prototype.stop = function () {\r\n this._tween.stop();\r\n };\r\n return Rotation;\r\n}(ScillaComponent));\r\nexport default Rotation;\r\n//# sourceMappingURL=Rotation.js.map"}
{"map":"{\"version\":3,\"file\":\"Fade.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/animation/Fade.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,IAAI,EAAE,eAAe,EAAC,MAAM,QAAQ,CAAC;AAE7C;IAAkC,gCAAe;IAAjD;QAAA,qEAkCC;QAjCA,eAAS,GAAW,CAAC,CAAC;QACtB,aAAO,GAAW,CAAC,CAAC;QACpB,cAAQ,GAAW,IAAI,CAAC;;IA+BzB,CAAC;IA1BA,uBAAQ,GAAR,UAAS,CAAC;QACT,iBAAM,QAAQ,YAAC,CAAC,CAAC,CAAC;QAElB,IAAG,IAAI,CAAC,QAAQ,EAAC;YAChB,IAAG,CAAC,IAAI,CAAC,UAAU,EAAC;gBACnB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;aACpB;YAED,IAAI,KAAK,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;YAElD,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAEtE,IAAG,KAAK,IAAI,CAAC,EAAC;gBACb,IAAI,CAAC,IAAI,EAAE,CAAC;aACZ;SACD;IACF,CAAC;IAED,mBAAI,GAAJ;QACC,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,mBAAI,GAAJ;QACC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACvB,CAAC;IACF,WAAC;AAAD,CAAC,AAlCD,CAAkC,eAAe,GAkChD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { math, ScillaComponent } from \"scilla\";\r\nvar Fade = (function (_super) {\r\n tslib_1.__extends(Fade, _super);\r\n function Fade() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.fromAlpha = 0;\r\n _this.toAlpha = 1;\r\n _this.duration = 1000;\r\n return _this;\r\n }\r\n Fade.prototype.onUpdate = function (t) {\r\n _super.prototype.onUpdate.call(this, t);\r\n if (this._playing) {\r\n if (!this._startTime) {\r\n this._startTime = t;\r\n }\r\n var ratio = (t - this._startTime) / this.duration;\r\n this.transform.alpha = math.lerp(this.fromAlpha, this.toAlpha, ratio);\r\n if (ratio >= 1) {\r\n this.stop();\r\n }\r\n }\r\n };\r\n Fade.prototype.play = function () {\r\n this._startTime = 0;\r\n this._playing = true;\r\n };\r\n Fade.prototype.stop = function () {\r\n this._playing = false;\r\n };\r\n return Fade;\r\n}(ScillaComponent));\r\nexport default Fade;\r\n//# sourceMappingURL=Fade.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,qEA0DC;QAzDA,oBAAc,GAAa,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAEpD,cAAQ,GAAG,GAAG,CAAC;;IAuDhB,CAAC;IAjDA,mCAAQ,GAAR;QACC,iBAAM,QAAQ,WAAE,CAAC;IAClB,CAAC;IAED,kCAAO,GAAP;QACC,iBAAM,OAAO,WAAE,CAAC;QAET,IAAA,oBAAM,CAAU;QAEvB,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,cAAc,EAAE,CAAC;IACvB,CAAC;IAED,mCAAQ,GAAR,UAAS,CAAC;QACT,iBAAM,QAAQ,YAAC,CAAC,CAAC,CAAC;QAElB,IAAI,CAAC,YAAY,EAAE,CAAC;IACrB,CAAC;IAED,yCAAc,GAAd;QACC,IAAI,IAAI,CAAC,cAAc,EAAE;YAClB,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;YACrD,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;YAC7B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;SAC/B;IACF,CAAC;IAED,uCAAY,GAAZ;QACC,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;IACF,uBAAC;AAAD,CAAC,AA1DD,CAA8C,eAAe,GA0D5D\"}","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(0.5, 0.5);\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 target = this.target;\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 this.updateViewport();\r\n };\r\n CameraController.prototype.onUpdate = function (t) {\r\n _super.prototype.onUpdate.call(this, t);\r\n this.followTarget();\r\n };\r\n CameraController.prototype.updateViewport = function () {\r\n if (this.viewportAnchor) {\r\n var _a = this.stageSize, width = _a.width, height = _a.height;\r\n var _b = this.viewportAnchor, x_1 = _b.x, y = _b.y;\r\n this.transform.position.setXY(width * x_1, height * y);\r\n this.transform.width = width;\r\n this.transform.height = height;\r\n }\r\n };\r\n CameraController.prototype.followTarget = function () {\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 return CameraController;\r\n}(ScillaComponent));\r\nexport default CameraController;\r\n//# sourceMappingURL=CameraController.js.map"}
{"map":"{\"version\":3,\"file\":\"BounceZoom.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/animation/BounceZoom.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,eAAe,EAAE,WAAW,EAAS,QAAQ,EAAE,cAAc,EAAC,MAAM,QAAQ,CAAC;AAErF,IAAM,WAAW,GAAa,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEnD;IAAwC,sCAAe;IAAvD;QAAA,qEAmBC;QAlBA,iBAAW,GAAa,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACjD,cAAQ,GAAU,GAAG,CAAC;;IAiBvB,CAAC;IAbA,4BAAO,GAAP;QACC,iBAAM,OAAO,WAAE,CAAC;QAEhB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAC9C,EAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAC,CACrD;aACA,EAAE,CAAC,EAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,EAAC,EAAE,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;aAC1D,EAAE,CAAC,EAAC,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,EAAC,EAAE,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAA;IACxD,CAAC;IAED,yBAAI,GAAJ;QACC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IACF,iBAAC;AAAD,CAAC,AAnBD,CAAwC,eAAe,GAmBtD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent, createTween, Vector2D, createVector2D } from \"scilla\";\r\nvar originScale = createVector2D(1, 1);\r\nvar BounceZoom = (function (_super) {\r\n tslib_1.__extends(BounceZoom, _super);\r\n function BounceZoom() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.targetScale = createVector2D(1.5, 1.5);\r\n _this.duration = 100;\r\n return _this;\r\n }\r\n BounceZoom.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n this._tween = createTween(this.transform, false, { clazz: Vector2D, fields: ['x', 'y'], autoPlay: false })\r\n .to({ scale: this.targetScale.clone() }, this.duration * 0.5)\r\n .to({ scale: originScale.clone() }, this.duration * 0.5);\r\n };\r\n BounceZoom.prototype.play = function () {\r\n this._tween.play(true);\r\n };\r\n return BounceZoom;\r\n}(ScillaComponent));\r\nexport default BounceZoom;\r\n//# sourceMappingURL=BounceZoom.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;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAA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A3hBD,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\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/other/index.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,kBAAkB,CAAA\"}","code":"export { default as CameraController } from './CameraController';\r\nexport { default as ContentSizeFitter } from './ContentSizeFitter';\r\nexport { default as RelativeLayout } from './RelativeLayout';\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/animation/index.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,cAAc,CAAA;AAClD,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAA;AAChD,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,SAAS,CAAA;AACxC,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAA;AAChD,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAA\"}","code":"export { default as BounceZoom } from './BounceZoom';\r\nexport { default as Fade } from './Fade';\r\nexport { default as Rotation } from './Rotation';\r\nexport { default as RoundLoop } from './RoundLoop';\r\nexport { default as Swing } from './Swing';\r\nexport { default as TouchZoom } from './TouchZoom';\r\nexport { default as Wave } from './Wave';\r\nexport { default as ZoomLoop } from './ZoomLoop';\r\n//# sourceMappingURL=index.js.map"}
{"map":"{\"version\":3,\"file\":\"Button.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/ui/Button.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAC,WAAW,GAAW,MAAM,QAAQ,CAAC;AAC7C,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAE5C;IAAoC,kCAAiB;IAWpD;QAAA,YACC,iBAAO,SAGP;QADA,KAAI,CAAC,cAAc,GAAG,IAAI,CAAC;;IAC5B,CAAC;IAED,sBAAI,6BAAS;aAAb;YACC,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,C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QACX,iBAAM,UAAU,YAAC,CAAC,CAAC,CAAC;QAEpB,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC5B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC/B;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,iCAAgB,GAAhB,UAAiB,CAAC;QACjB,iBAAM,gBAAgB,YAAC,CAAC,CAAC,CAAC;QAE1B,IAAI,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC9C,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;SACtB;QAED,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAED,8BAAa,GAAb,UAAc,GAAI;QACjB,IAAG,CAAC,IAAI,CAAC,UAAU,EAAC;YACnB,OAAO;SACP;QAED,IAAI,CAAC,UAAU,GAAG,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC;QACpC,IAAG,IAAI,CAAC,YAAY,EAAC;YACpB,IAAI,CAAC,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;SAC1C;aAAI;YACJ,IAAI,CAAC,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC;SAC3C;IACF,CAAC;IACF,aAAC;AAAD,CAAC,AAlGD,CAAoC,iBAAiB,GAkGpD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaEvent, } from \"scilla\";\r\nimport TouchZoom from \"../animation/TouchZoom\";\r\nimport { InteractComponent } from \"../base\";\r\nimport { TextureRenderer } from \"../renderer\";\r\nvar Button = (function (_super) {\r\n tslib_1.__extends(Button, _super);\r\n function Button() {\r\n var _this = _super.call(this) || this;\r\n _this.touchInterrupt = true;\r\n return _this;\r\n }\r\n Object.defineProperty(Button.prototype, \"touchZoom\", {\r\n get: function () {\r\n return this.entity && this.entity.getComponent(TouchZoom);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Button.prototype.onModify = function (value, key, oldValue) {\r\n _super.prototype.onModify.call(this, value, key, oldValue);\r\n if (key === 'interactable') {\r\n if (this.touchZoom) {\r\n this.touchZoom.interactable = value;\r\n }\r\n try {\r\n this.changeTexture();\r\n }\r\n catch (e) { }\r\n }\r\n };\r\n Button.prototype.onCreate = function () {\r\n _super.prototype.onCreate.call(this);\r\n this.onClick = new ScillaEvent();\r\n };\r\n Button.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n this.bgRenderer = this.entity.getComponent(TextureRenderer);\r\n this.changeTexture(this.upRes);\r\n };\r\n Button.prototype.onTouchBegin = function (e) {\r\n _super.prototype.onTouchBegin.call(this, e);\r\n this.touchBeginWithSelf = true;\r\n this.changeTexture(this.downRes);\r\n };\r\n Button.prototype.onTouchOver = function (e) {\r\n _super.prototype.onTouchOver.call(this, e);\r\n if (this.touchBeginWithSelf) {\r\n this.touchBeginWithSelf = true;\r\n this.changeTexture(this.downRes);\r\n }\r\n this.touchOut = false;\r\n };\r\n Button.prototype.onTouchOut = function (e) {\r\n _super.prototype.onTouchOut.call(this, e);\r\n if (this.touchBeginWithSelf) {\r\n this.changeTexture(this.upRes);\r\n }\r\n this.touchOut = true;\r\n };\r\n Button.prototype.onGlobalTouchEnd = function (e) {\r\n _super.prototype.onGlobalTouchEnd.call(this, e);\r\n if (this.touchBeginWithSelf && !this.touchOut) {\r\n this.onClick.invoke();\r\n }\r\n this.touchBeginWithSelf = false;\r\n this.changeTexture(this.upRes);\r\n };\r\n Button.prototype.changeTexture = function (res) {\r\n if (!this.bgRenderer) {\r\n return;\r\n }\r\n this.currentRes = res || this.upRes;\r\n if (this.interactable) {\r\n this.bgRenderer.texture = this.currentRes;\r\n }\r\n else {\r\n this.bgRenderer.texture = this.disabledRes;\r\n }\r\n };\r\n return Button;\r\n}(InteractComponent));\r\nexport default Button;\r\n//# sourceMappingURL=Button.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,mCAAY,EAAE,6BAAS,EAAE,2CAAgB,CAAY;IAEjF,IAAI,aAAa,GAAG,OAAO,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAEzF,oBAAoB,CAAC;QACpB,MAAM,EAAE,aAAa;QACrB,YAAY,EAAE;YACb,YAAY,cAAA;YACZ,WAAW,aAAA;YACX,UAAU,YAAA;SACV;KACD,CAAC,CAAC;IACH,kBAAkB,CAAC;QAClB,MAAM,EAAE,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G,IAAI,CAAC,GAAG,EAAE,CAAC;IAC1B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC;IAC9C,MAAM,GAAG,KAAK,CAAC;IACf,OAAO,GAAG,MAAM,CAAC;IACjB,IAAM,EAAE,GAAG,KAAK,GAAG,OAAO,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,UAAU,KAAK;QAC7B,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE;YACnC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;SACnB;aAAM;YACN,OAAO,IAAI,CAAC;SACZ;IACF,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,OAAO;QAC7B,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\":\"GraphicRenderer.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/renderer/GraphicRenderer.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAMlC;IAA6C,2CAAQ;IAArD;QAAA,qEAsGC;QArGA,eAAS,GAAU,SAAS,CAAC;QAC7B,iBAAW,GAAU,SAAS,CAAC;QAC/B,iBAAW,GAAG,CAAC,CAAC;QAGhB,kBAAY,GAAG,KAAK,CAAC;QAErB,iBAAW,GAAG,KAAK,CAAC;;IA8FrB,CAAC;IA5FU,yCAAe,GAAzB;QACC,OAAO,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;IACjD,CAAC;IAKS,uCAAa,GAAvB;QACC,OAAO,EAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC;IAC9B,CAAC;IAKS,oCAAU,GAApB;QACC,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;IAC1B,CAAC;IAKS,8BAAI,GAAd;QACC,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AC;QAC7E,IAAA,yBAAuD,EAAtD,iBAAa,EAAE,mBAAuC,CAAC;QAE9D,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;QAC/C,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;QAEnD,iBAAM,aAAa,WAAE,CAAC;IACvB,CAAC;IACF,sBAAC;AAAD,CAAC,AAtGD,CAA6C,QAAQ,GAsGpD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport Renderer from \"./Renderer\";\r\nvar GraphicRenderer = (function (_super) {\r\n tslib_1.__extends(GraphicRenderer, _super);\r\n function GraphicRenderer() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.fillColor = '#42bce4';\r\n _this.borderColor = '#0899d0';\r\n _this.borderWidth = 0;\r\n _this.isUsedToMask = false;\r\n _this.maskVisible = false;\r\n return _this;\r\n }\r\n GraphicRenderer.prototype.getUseCacheMode = function () {\r\n return this._useCacheMode && !this.isUsedToMask;\r\n };\r\n GraphicRenderer.prototype.getRenderSize = function () {\r\n return { width: 0, height: 0 };\r\n };\r\n GraphicRenderer.prototype.beforeDraw = function () {\r\n _super.prototype.beforeDraw.call(this);\r\n this.applyStyle();\r\n this.context.beginPath();\r\n };\r\n GraphicRenderer.prototype.draw = function () {\r\n _super.prototype.draw.call(this);\r\n if (this.isUsedToMask) {\r\n this._context.clip();\r\n this.maskVisible && this.fillAndStoke();\r\n }\r\n else {\r\n this.fillAndStoke();\r\n }\r\n };\r\n GraphicRenderer.prototype.applyStyle = function () {\r\n var _a = this, context = _a.context, fillColor = _a.fillColor, borderColor = _a.borderColor, borderWidth = _a.borderWidth;\r\n context.fillStyle = fillColor;\r\n if (borderWidth > 0) {\r\n context.strokeStyle = borderColor;\r\n context.lineWidth = borderWidth;\r\n }\r\n };\r\n GraphicRenderer.prototype.fillAndStoke = function () {\r\n var _a = this, context = _a.context, borderWidth = _a.borderWidth;\r\n context.fill();\r\n if (borderWidth > 0) {\r\n context.stroke();\r\n }\r\n };\r\n GraphicRenderer.prototype.drawClip = function () {\r\n this.isUsedToMask && this.context.save();\r\n };\r\n GraphicRenderer.prototype.afterUpdate = function () {\r\n this.isUsedToMask && this.context.restore();\r\n };\r\n GraphicRenderer.prototype.measureBounds = function () {\r\n if (this.entity.name == 'content') {\r\n console.log();\r\n }\r\n if (!this.dirty) {\r\n return;\r\n }\r\n this._margin = this.borderWidth;\r\n var _a = this, bounds = _a.bounds, _b = _a.transform, tWidth = _b.explicitWidth, tHeight = _b.explicitHeight;\r\n var _c = this.getRenderSize(), sWidth = _c.width, sHeight = _c.height;\r\n bounds.width = isNaN(tWidth) ? sWidth : tWidth;\r\n bounds.height = isNaN(tHeight) ? sHeight : tHeight;\r\n _super.prototype.measureBounds.call(this);\r\n };\r\n return GraphicRenderer;\r\n}(Renderer));\r\nexport default GraphicRenderer;\r\n//# sourceMappingURL=GraphicRenderer.js.map"}
{"map":"{\"version\":3,\"file\":\"utils.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../assets/scripts/utils.ts\"],\"names\":[],\"mappings\":\"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,CAAC,IAAM,YAAY,GAAC,UAAC,CAAQ,IAAI,OAAA,CAAC,CAAC,YAAY,CAAC,SAAS,CAAc,EAAtC,CAAsC,CAAC;AAC9E,MAAM,CAAC,IAAM,eAAe,GAAC,UAAC,CAAQ,IAAG,OAAA,CAAC,CAAC,YAAY,CAAC,YAAY,CAAiB,EAA5C,CAA4C,CAAC;AACtF,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,CAAQ,IAAG,OAAA,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,EAAtB,CAAsB,CAAC\"}","code":"import { Transform, TextRenderer } from 'scilla-components/src';\r\nexport var getTransForm = function (e) { return e.getComponent(Transform); };\r\nexport var getTextRenderer = function (e) { return e.getComponent(TextRenderer); };\r\nexport var getHeight = function (e) { return getTransForm(e).height; };\r\n//# sourceMappingURL=utils.js.map"}
{"map":"{\"version\":3,\"file\":\"ZoomLoop.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/animation/ZoomLoop.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,EAAC,eAAe,EAAC,MAAM,QAAQ,CAAC;AAEvC;IAAsC,oCAAe;IAArD;;IAOA,CAAC;IALA,2BAAQ,GAAR,UAAS,CAAC;QACT,iBAAM,QAAQ,YAAC,CAAC,CAAC,CAAC;QAElB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;IAC5F,CAAC;IACF,eAAC;AAAD,CAAC,AAPD,CAAsC,eAAe,GAOpD\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent } from \"scilla\";\r\nvar ZoomLoop = (function (_super) {\r\n tslib_1.__extends(ZoomLoop, _super);\r\n function ZoomLoop() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ZoomLoop.prototype.onUpdate = function (t) {\r\n _super.prototype.onUpdate.call(this, t);\r\n this.transform.scale.x = this.transform.scale.y = Math.abs(Math.sin(t * 0.001)) * 0.15 + 1;\r\n };\r\n return ZoomLoop;\r\n}(ScillaComponent));\r\nexport default ZoomLoop;\r\n//# sourceMappingURL=ZoomLoop.js.map"}
{"map":"{\"version\":3,\"file\":\"Vector2D.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-core/src/support/Vector2D.ts\"],\"names\":[],\"mappings\":\"AAKA,OAAO,EAAC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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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\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\":\"labelUtils.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../assets/scripts/labelUtils.ts\"],\"names\":[],\"mappings\":\"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,CAAC,IAAM,aAAa,GAAG,UAAC,KAAa,EAAE,KAAa;IACtD,eAAe,CAAC,KAAK,CAAC,CAAC,SAAS,GAAG,KAAK,CAAA;AAC5C,CAAC,CAAA;AAED,MAAM,CAAC,IAAM,YAAY,GAAG,UAAC,KAAa,EAAE,IAAY,EAAE,QAAgB;IAAhB,yBAAA,EAAA,gBAAgB;IACtE,IAAI,QAAQ;QACR,eAAe,CAAC,KAAK,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC;;QAEvC,eAAe,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;AAC3C,CAAC,CAAA\"}","code":"import { getTextRenderer } from './utils';\r\nexport var setLabelColor = function (label, color) {\r\n getTextRenderer(label).fillColor = color;\r\n};\r\nexport var setLabelText = function (label, text, textFlow) {\r\n if (textFlow === void 0) { textFlow = false; }\r\n if (textFlow)\r\n getTextRenderer(label).textFlow = text;\r\n else\r\n getTextRenderer(label).text = text;\r\n};\r\n//# sourceMappingURL=labelUtils.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,CAA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AAM;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\":\"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;AAE7D,OAAO,UAAU,MAAM,qCAAqC,CAAC;AAC7D,WAAW,CAAC,qCAAqC,EAAE,UAAU,CAAC,CAAC;AAE/D,OAAO,UAAU,MAAM,gCAAgC,CAAC;AACxD,WAAW,CAAC,gCAAgC,EAAE,UAAU,CAAC,CAAC;AAE1D,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,WAAW,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;AAEhD,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAC1D,WAAW,CAAC,kCAAkC,EAAE,UAAU,CAAC,CAAC;AAE5D,OAAO,UAAU,MAAM,iCAAiC,CAAC;AACzD,WAAW,CAAC,iCAAiC,EAAE,UAAU,CAAC,CAAC;AAE3D,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAC1D,WAAW,CAAC,kCAAkC,EAAE,UAAU,CAAC,CAAC;AAE5D,OAAO,UAAU,MAAM,qCAAqC,CAAC;AAC7D,WAAW,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC;AAEpD,OAAO,UAAU,MAAM,6BAA6B,CAAC;AACrD,WAAW,CAAC,kBAAkB,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\nimport component2 from 'components/renderer/TextureRenderer';\r\nregisterDef('components/renderer/TextureRenderer', component2);\r\nimport component3 from 'components/animation/TouchZoom';\r\nregisterDef('components/animation/TouchZoom', component3);\r\nimport component4 from 'components/ui/Button';\r\nregisterDef('components/ui/Button', component4);\r\nimport component5 from 'components/renderer/TextRenderer';\r\nregisterDef('components/renderer/TextRenderer', component5);\r\nimport component6 from 'components/other/RelativeLayout';\r\nregisterDef('components/other/RelativeLayout', component6);\r\nimport component7 from 'components/renderer/RectRenderer';\r\nregisterDef('components/renderer/RectRenderer', component7);\r\nimport component8 from '../../assets/scripts/MainController';\r\nregisterDef('./scripts/MainController', component8);\r\nimport component9 from '../../assets/scripts/Slider';\r\nregisterDef('./scripts/Slider', component9);\r\n//# sourceMappingURL=MustCompile.js.map"}
{"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/base/index.ts\"],\"names\":[],\"mappings\":\"AAIA,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAA\"}","code":"export { default as InteractComponent } from './InteractComponent';\r\nexport { default as TouchInterrupt } from './TouchInterrupt';\r\nexport { default as Transform } from './Transform';\r\n//# sourceMappingURL=index.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,GAA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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\":\"MainController.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../assets/scripts/MainController.ts\"],\"names\":[],\"mappings\":\";AAAA,OAAO,EAAU,eAAe,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B;IAA4C,0CAAe;IAA3D;;IAiDA,CAAC;IA3CG,iCAAQ,GAAR;QACI,iBAAM,QAAQ,WAAE,CAAC;IAGrB,CAAC;IAED,gCAAO,GAAP;QAAA,iBAYC;QAXG,iBAAM,OAAO,WAAE,CAAC;QAChB,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,WAAW,CAAC;YACR,GAAG,EAAE,CAAC;YACN,IAAI,GAAG,GAAG,GAAG;gBAAE,GAAG,GAAG,GAAG,CAAC;YACzB,IAAI,CAAC,KAAI,CAAC,kBAAkB,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;QAClE,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAC5B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,GAAC,CAAC,GAAG,YAAY,EAAE,CAAC,MAAM,GAAG,GAAG,GAAC,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,oCAAW,GAAX,UAAY,GAAG;QACX,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;IAClE,CAAC;IAED,yCAAgB,GAAhB;QACI,KAAK,CAAC,kBAAkB,CAAC,CAAA;IAC7B,CAAC;IAED,uCAAc,GAAd;QACI,KAAK,CAAC,gBAAgB,CAAC,CAAA;IAC3B,CAAC;IAED,qCAAY,GAAZ;QACI,KAAK,CAAC,cAAc,CAAC,CAAA;IACzB,CAAC;IAED,sCAAa,GAAb;QACI,KAAK,CAAC,eAAe,CAAC,CAAA;IAC1B,CAAC;IAED,qCAAY,GAAZ;QACI,KAAK,CAAC,cAAc,CAAC,CAAA;IACzB,CAAC;IACL,qBAAC;AAAD,CAAC,AAjDD,CAA4C,eAAe,GAiD1D\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent, getStageSize } from 'scilla-core/src';\r\nimport { setY } from './setXY';\r\nvar MainController = (function (_super) {\r\n tslib_1.__extends(MainController, _super);\r\n function MainController() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n MainController.prototype.onCreate = function () {\r\n _super.prototype.onCreate.call(this);\r\n };\r\n MainController.prototype.onAwake = function () {\r\n var _this = this;\r\n _super.prototype.onAwake.call(this);\r\n this.setProgress(0);\r\n var per = 0;\r\n setInterval(function () {\r\n per++;\r\n if (per > 100)\r\n per = 100;\r\n setY(_this.progressBarFrontBg, -148 + 295 * (100 - per) / 100);\r\n }, 50);\r\n console.log(this.mainbottom);\r\n setY(this.mainbottom, -1624 / 2 + getStageSize().height - 146 / 2);\r\n };\r\n MainController.prototype.setProgress = function (per) {\r\n setY(this.progressBarFrontBg, -148 + 295 * (100 - per) / 100);\r\n };\r\n MainController.prototype.onWithdrawBtnTap = function () {\r\n alert('onWithdrawBtnTap');\r\n };\r\n MainController.prototype.onRecordBtnTap = function () {\r\n alert('onRecordBtnTap');\r\n };\r\n MainController.prototype.onRuleBtnTap = function () {\r\n alert('onRuleBtnTap');\r\n };\r\n MainController.prototype.onTasksBtnTap = function () {\r\n alert('onTasksBtnTap');\r\n };\r\n MainController.prototype.onEggsBtnTap = function () {\r\n alert('onEggsBtnTap');\r\n };\r\n return MainController;\r\n}(ScillaComponent));\r\nexport default MainController;\r\n//# sourceMappingURL=MainController.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,gB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G,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/requestA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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,QA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Obj } 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\":\"Wave.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node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,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,EAAC,CAAC;IAC3C,CAAC;CACD,CAAC\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent, ScillaEvent } from \"scilla\";\r\nvar PI2 = Math.PI * 2;\r\nexport var WaveMethod;\r\n(function (WaveMethod) {\r\n WaveMethod[\"round\"] = \"round\";\r\n WaveMethod[\"rotate\"] = \"rotate\";\r\n WaveMethod[\"zoom\"] = \"zoom\";\r\n WaveMethod[\"fade\"] = \"fade\";\r\n WaveMethod[\"cosWave\"] = \"cosWave\";\r\n WaveMethod[\"sinWave\"] = \"sinWave\";\r\n WaveMethod[\"shake\"] = \"shake\";\r\n WaveMethod[\"breath\"] = \"breath\";\r\n})(WaveMethod || (WaveMethod = {}));\r\nvar Wave = (function (_super) {\r\n tslib_1.__extends(Wave, _super);\r\n function Wave() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.duration = 1000;\r\n _this.loop = -1;\r\n _this.autoPlay = true;\r\n _this.onComplete = new ScillaEvent();\r\n _this.onLoopComplete = new ScillaEvent();\r\n _this._oldProps = {};\r\n return _this;\r\n }\r\n Wave.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n this._waveMethod = waveLibs[this.waveMethod];\r\n this._startTime = 0;\r\n var position = this.transform.position;\r\n this._oldProps.x = position.x;\r\n this._oldProps.y = position.y;\r\n if (this.autoPlay) {\r\n this.play();\r\n }\r\n };\r\n Wave.prototype.onUpdate = function (t) {\r\n _super.prototype.onUpdate.call(this, t);\r\n if (this._playing) {\r\n if (!this._startTime) {\r\n this._startTime = t;\r\n }\r\n var _a = this, duration = _a.duration, waveParams = _a.waveParams, _waveMethod = _a._waveMethod, transform = _a.transform, _b = _a.transform, position = _b.position, scale = _b.scale, _oldProps = _a._oldProps;\r\n var pass = (t - this._startTime) % duration;\r\n var r = pass / duration * PI2;\r\n var loopCounting = Math.floor((t - this._startTime) / duration);\r\n if (loopCounting != this._loopCounting) {\r\n this._loopCounting = loopCounting;\r\n if (this.onLoopEnd()) {\r\n r = PI2;\r\n }\r\n }\r\n var params = waveParams || [];\r\n var props = _waveMethod.apply(void 0, tslib_1.__spread(params, [r]));\r\n if (props.hasOwnProperty('x')) {\r\n position.x = (props.x || 0) + _oldProps.x;\r\n }\r\n if (props.hasOwnProperty('y')) {\r\n position.y = (props.y || 0) + _oldProps.y;\r\n }\r\n if (props.hasOwnProperty('sx')) {\r\n scale.x = props.sx;\r\n }\r\n if (props.hasOwnProperty('sy')) {\r\n scale.y = props.sy;\r\n }\r\n if (props.hasOwnProperty('r')) {\r\n transform.rotation = props.r;\r\n }\r\n }\r\n };\r\n Wave.prototype.onLoopEnd = function () {\r\n if (this.loop < 0) {\r\n this.onLoopComplete.invoke();\r\n }\r\n else if (this._loopCounting < this.loop) {\r\n this.onLoopComplete.invoke();\r\n }\r\n else {\r\n this._playing = false;\r\n this.onComplete.invoke();\r\n return true;\r\n }\r\n };\r\n Wave.prototype.play = function () {\r\n this._loopCounting = 0;\r\n this._playing = true;\r\n this._startTime = 0;\r\n };\r\n Wave.prototype.stop = function () {\r\n this._playing = false;\r\n };\r\n return Wave;\r\n}(ScillaComponent));\r\nexport default Wave;\r\nvar cos = Math.cos, sin = Math.sin, PI = Math.PI;\r\nvar waveLibs = {\r\n round: function (h, t) {\r\n return { x: cos(t) * h, y: sin(t) * h };\r\n },\r\n cosWave: function (h, t) {\r\n return { x: cos(t) * h, y: 0 };\r\n },\r\n sinWave: function (h, t) {\r\n h = h || 1;\r\n return { x: 0, y: sin(t) * h };\r\n },\r\n rotate: function (t) {\r\n return { r: 360 * t / PI / 2 };\r\n },\r\n shake: function (angle, count, t) {\r\n return { r: sin(t * count) * angle };\r\n },\r\n breath: function (scale, t) {\r\n if (scale === void 0) { scale = 0.1; }\r\n return { sx: sin(t) * scale + 1, sy: -sin(t + PI / 4) * scale + 1 };\r\n },\r\n zoom: function (scale, t) {\r\n if (scale === void 0) { scale = 0.1; }\r\n return { sx: sin(t) * scale + 1, sy: sin(t) * scale + 1 };\r\n },\r\n fade: function (base, t) {\r\n if (base === void 0) { base = 1; }\r\n return { alpha: (sin(t) + 1) * 0.5 + base };\r\n },\r\n};\r\n//# sourceMappingURL=Wave.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,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI;IACrD,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE;QAC7B,MAAM,IAAI,SAAS,CAAC,iCAAiC,CAAC,CAAC;KACvD;IAED,IAAI,QAAQ,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,OAAO,IAAI,OAAO,EAAE,IAAI,CAAC,EAChD,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IAEzC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,O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AI,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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C,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\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../node_modules/scilla-components/src/index.ts\"],\"names\":[],\"mappings\":\"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,MAAM,CAAC;AAErB,cAAc,yBAAyB,CAAA\"}","code":"export * from './animation';\r\nexport * from './base';\r\nexport * from './other';\r\nexport * from './renderer';\r\nexport * from './ui';\r\nexport * from './registerAllComponents';\r\n//# sourceMappingURL=index.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,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AAC,MAAM,CAAC;QAC9B,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,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\":\"RectRenderer.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/renderer/RectRenderer.ts\"],\"names\":[],\"mappings\":\";AAIA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAA;AAE1B,IAAA,kDAAkB,CAAe;AAKxC;IAA0C,wCAAe;IAAzD;QAAA,qEAsCC;QApCA,WAAK,GAAG,GAAG,CAAC;QAEZ,YAAM,GAAG,GAAG,CAAC;QAEb,kBAAY,GAAG,CAAC,CAAC;;IAgClB,CAAC;IA9BU,oCAAa,GAAvB;QACO,IAAA,SAAsB,EAArB,gBAAK,EAAE,kBAAc,CAAC;QAC7B,OAAO,EAAC,KAAK,OAAA,EAAE,MAAM,QAAA,EAAC,CAAC;IACxB,CAAC;IAKS,2BAAI,GAAd;QACQ,IAAA,YAAE,CAAS;QACZ,IAAA,SAAkF,EAAjF,oBAAO,EAAE,mBAAe,EAAE,cAAuB,EAAd,gBAAK,EAAE,kBAAM,EAAG,oBAAO,EAAE,gCAAqB,CAAC;QAEzF,IAAI,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAEzC,IAAI,CAAC,EAAE;YACN,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;YACvC,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;YAC/C,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;YACnE,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC;YACpD,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;YACnE,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;YAC5C,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5D,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;YACvC,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;SACvD;aAAM;YACN,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;SAC5C;QAED,iBAAM,IAAI,WAAE,CAAC;IACd,CAAC;IAnCD;QADC,kBAAkB;+CACP;IAEZ;QADC,kBAAkB;gDACN;IAEb;QADC,kBAAkB;sDACF;IAgClB,mBAAC;CAAA,AAtCD,CAA0C,eAAe,GAsCxD;eAtCoB,YAAY\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport GraphicRenderer from \"./GraphicRenderer\";\r\nimport { decorators } from \"scilla\";\r\nvar dirtyFieldDetector = decorators.dirtyFieldDetector;\r\nvar RectRenderer = (function (_super) {\r\n tslib_1.__extends(RectRenderer, _super);\r\n function RectRenderer() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.width = 100;\r\n _this.height = 100;\r\n _this.cornerRadius = 0;\r\n return _this;\r\n }\r\n RectRenderer.prototype.getRenderSize = function () {\r\n var _a = this, width = _a.width, height = _a.height;\r\n return { width: width, height: height };\r\n };\r\n RectRenderer.prototype.draw = function () {\r\n var PI = Math.PI;\r\n var _a = this, context = _a.context, r = _a.cornerRadius, _b = _a.bounds, width = _b.width, height = _b.height, _margin = _a._margin, _useCacheMode = _a._useCacheMode;\r\n var offset = _useCacheMode ? _margin : 0;\r\n if (r) {\r\n context.moveTo(offset + r, offset + 0);\r\n context.lineTo(offset + width - r, offset + 0);\r\n context.arc(offset + width - r, offset + r, r, PI * 3 / 2, PI * 2);\r\n context.lineTo(offset + width, offset + height - r);\r\n context.arc(offset + width - r, offset + height - r, r, 0, PI / 2);\r\n context.lineTo(offset + r, offset + height);\r\n context.arc(offset + r, offset + height - r, r, PI / 2, PI);\r\n context.lineTo(offset + 0, offset + r);\r\n context.arc(offset + r, offset + r, r, PI, PI * 3 / 2);\r\n }\r\n else {\r\n context.rect(offset, offset, width, height);\r\n }\r\n _super.prototype.draw.call(this);\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], RectRenderer.prototype, \"width\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], RectRenderer.prototype, \"height\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldDetector\r\n ], RectRenderer.prototype, \"cornerRadius\", void 0);\r\n return RectRenderer;\r\n}(GraphicRenderer));\r\nexport default RectRenderer;\r\n//# sourceMappingURL=RectRenderer.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\":\"ProgressBar.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../../node_modules/scilla-components/src/ui/ProgressBar.ts\"],\"names\":[],\"mappings\":\";AAMA,OAAO,EAAS,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC9E,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAE7C,IAAA,gDAAiB,CAAe;AAEvC,SAAS,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO;IACrD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAC5D,CAAC;AAED;IAAyC,uCAAe;IAAxD;QAAA,qEA+FC;QAxFA,WAAK,GAAW,CAAC,CAAC;QAElB,aAAO,GAAW,CAAC,CAAC;QAEpB,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,GAAG,IAAI,CAAC;gBAC5B,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;aAC7B;SACD;IACF,CAAC;IAvFD;QADC,iBAAiB;8CACA;IAElB;QADC,iBAAiB;gDACE;IAEpB;QADC,iBAAiB;gDACE;IAEpB;QADC,iBAAiB;qDACO;IAEzB;QADC,iBAAiB;wDACQ;IAE1B;QADC,iBAAiB;qDACW;IA8E9B,kBAAC;CAAA,AA/FD,CAAyC,eAAe,GA+FvD;eA/FoB,WAAW\"}","code":"import * as tslib_1 from \"tslib\";\r\nimport { ScillaComponent, decorators, createTween, ease } from \"scilla\";\r\nimport RectRenderer from \"../renderer/RectRenderer\";\r\nimport Transform from \"../base/Transform\";\r\nimport TextRenderer from \"../renderer/TextRenderer\";\r\nvar dirtyFieldTrigger = decorators.dirtyFieldTrigger;\r\nfunction renderLabelFuncSample(value, maximum, minimum) {\r\n return Math.floor(value / (maximum - minimum) * 100) + '%';\r\n}\r\nvar ProgressBar = (function (_super) {\r\n tslib_1.__extends(ProgressBar, _super);\r\n function ProgressBar() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.value = 0;\r\n _this.minimum = 0;\r\n _this.maximum = 0;\r\n _this.snapInterval = 1;\r\n _this.fixWithRange = true;\r\n _this.updateThumbSize = function () {\r\n var _a = _this.thumb.getComponent(Transform), width = _a.width, height = _a.height;\r\n _this._thumbSize = { width: width, height: height };\r\n _this.update();\r\n };\r\n return _this;\r\n }\r\n ProgressBar.prototype.onCreate = function () {\r\n _super.prototype.onCreate.call(this);\r\n this.renderLabelFunc = renderLabelFuncSample;\r\n };\r\n ProgressBar.prototype.onAwake = function () {\r\n _super.prototype.onAwake.call(this);\r\n this._mask = this.viewport.getComponent(RectRenderer);\r\n this._mask.width = 0;\r\n if (this.widget) {\r\n this._widgetTransform = this.widget.getComponent(Transform);\r\n }\r\n this._label = this.label.getComponent(TextRenderer);\r\n this.callOnNextTick(this.updateThumbSize);\r\n };\r\n ProgressBar.prototype.onModify = function (value, key, oldValue) {\r\n _super.prototype.onModify.call(this, value, key, oldValue);\r\n if (oldValue === undefined) {\r\n return;\r\n }\r\n this.callOnNextTick(this.update);\r\n };\r\n ProgressBar.prototype.update = function () {\r\n var _a = this, minimum = _a.minimum, maximum = _a.maximum, _thumbSize = _a._thumbSize;\r\n if (!_thumbSize) {\r\n return;\r\n }\r\n var range = maximum - minimum;\r\n var value = Math.max(minimum, Math.min(maximum, this.value));\r\n var percentage = (value - minimum) / range;\r\n var width = percentage * _thumbSize.width;\r\n createTween(this._mask, true)\r\n .to({ width: width }, 300, ease.cubicOut);\r\n if (this._widgetTransform) {\r\n this._widgetTransform.position.x = width;\r\n }\r\n var renderValue = this.fixWithRange ? Math.max(minimum, Math.min(maximum, this.value)) : this.value;\r\n this.value = value;\r\n if (this._label) {\r\n var text = this.renderLabelFunc(renderValue, this.maximum, this.minimum);\r\n if (typeof text == 'string') {\r\n this._label.text = text;\r\n this._label.textFlow = null;\r\n }\r\n else {\r\n this._label.textFlow = text;\r\n this._label.updateTextFlow();\r\n }\r\n }\r\n };\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], ProgressBar.prototype, \"value\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], ProgressBar.prototype, \"minimum\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], ProgressBar.prototype, \"maximum\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], ProgressBar.prototype, \"snapInterval\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], ProgressBar.prototype, \"renderLabelFunc\", void 0);\r\n tslib_1.__decorate([\r\n dirtyFieldTrigger\r\n ], ProgressBar.prototype, \"fixWithRange\", void 0);\r\n return ProgressBar;\r\n}(ScillaComponent));\r\nexport default ProgressBar;\r\n//# sourceMappingURL=ProgressBar.js.map"}
......@@ -8,8 +8,7 @@
],
"children": [
{
"name": "MainStage",
"uuid": "20181212032053",
"name": "Entity",
"components": [
{
"script": "components/base/Transform",
......@@ -20,21 +19,6 @@
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|69227bac-6549-4561-87ba-cc9ca243882d"
}
},
{
"script": "./scripts/MainController",
"properties": {
"progressBarFrontBg": "entity|2ff83b99-0e1c-4930-8cd3-3c9153e56e98",
"progress": "entity|90e21483-3c35-43f7-b1e7-cc0fd3038f26",
"mask": "entity|5ed38999-810b-42a6-837d-a0d06af65bc4",
"mainbottom": "entity|6f5efe1f-ee26-4741-b447-4d4ca9a818af"
}
},
{
"script": "components/other/CameraController",
"properties": {
......@@ -43,39 +27,216 @@
"y": 0,
"_type_": "scilla/support/Vector2D"
}
}
},
"disabled": false
}
],
"uuid": "2bc9e8b4-41b7-4174-8d87-b0e0b7ffc47f",
"children": [
{
"name": "mainbottom",
"name": "MainStage",
"uuid": "20181212032053",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"position": {
"y": 0,
"_type_": "scilla/support/Vector2D"
}
"texture": "res|69227bac-6549-4561-87ba-cc9ca243882d"
}
},
{
"script": "components/renderer/TextureRenderer",
"script": "./scripts/MainController",
"properties": {
"progressBarFrontBg": "entity|2ff83b99-0e1c-4930-8cd3-3c9153e56e98",
"progress": "entity|90e21483-3c35-43f7-b1e7-cc0fd3038f26",
"mask": "entity|5ed38999-810b-42a6-837d-a0d06af65bc4",
"mainbottom": "entity|6f5efe1f-ee26-4741-b447-4d4ca9a818af"
}
},
{
"script": "components/other/CameraController",
"properties": {
"texture": "res|53b2bf73-1ee6-43ba-af3f-2af10b432ffa"
"viewportAnchor": {
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
}
}
}
],
"uuid": "6f5efe1f-ee26-4741-b447-4d4ca9a818af",
"children": [
{
"name": "eggsBtn",
"name": "mainbottom",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"y": 0,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|53b2bf73-1ee6-43ba-af3f-2af10b432ffa"
}
}
],
"uuid": "6f5efe1f-ee26-4741-b447-4d4ca9a818af",
"children": [
{
"name": "eggsBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -180,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/animation/TouchZoom",
"properties": {
"easeName": "backOut"
}
},
{
"script": "components/ui/Button",
"properties": {
"onClick": [
{
"entity": "entity|20181212032053",
"component": 2,
"method": "onEggsBtnTap"
}
],
"disabledRes": "res|19cc0f39-3a5d-4e06-a4a3-9a722b69b52c",
"downRes": "res|19cc0f39-3a5d-4e06-a4a3-9a722b69b52c",
"upRes": "res|19cc0f39-3a5d-4e06-a4a3-9a722b69b52c"
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|19cc0f39-3a5d-4e06-a4a3-9a722b69b52c"
}
}
],
"children": [
{
"name": "label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "",
"fillColor": "rgba(255, 255, 255, 1)"
}
}
],
"uuid": "e142df49-43dd-4cc7-9cdd-ed0583a7aa59"
}
],
"uuid": "5c2e75f3-83cd-440c-bc0d-ef18149bd30e"
},
{
"name": "tasksBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 180,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/animation/TouchZoom",
"properties": {
"easeName": "backOut"
}
},
{
"script": "components/ui/Button",
"properties": {
"downRes": "res|1029947c-ac65-49c5-a2f0-0cccba73cc9f",
"upRes": "res|1029947c-ac65-49c5-a2f0-0cccba73cc9f",
"disabledRes": "res|1029947c-ac65-49c5-a2f0-0cccba73cc9f"
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|1029947c-ac65-49c5-a2f0-0cccba73cc9f"
}
}
],
"children": [
{
"name": "label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "",
"fillColor": "rgba(255, 255, 255, 1)"
}
}
],
"uuid": "27b61e9c-8fd0-451c-8c59-9896a148ec21"
}
],
"uuid": "f5333e72-ad59-4a82-8390-770d601202b4"
},
{
"name": "addTimesBtnTip",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 180,
"y": -80,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|ee82006d-123d-4463-8cd4-4c9904aaa65c"
}
}
],
"uuid": "7df5486b-06ac-4e55-a5f4-e06433530fe2"
}
]
},
{
"name": "withdrawBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -180,
"x": -297,
"y": -762,
"_type_": "scilla/support/Vector2D"
}
}
......@@ -89,22 +250,28 @@
{
"script": "components/ui/Button",
"properties": {
"upRes": "res|36a7e2ae-8426-46d3-8d63-64045ad7527a",
"downRes": "res|36a7e2ae-8426-46d3-8d63-64045ad7527a",
"onClick": [
{
"entity": "entity|20181212032053",
"component": 2,
"method": "onEggsBtnTap"
"method": "onWithdrawBtnTap"
}
],
"disabledRes": "res|19cc0f39-3a5d-4e06-a4a3-9a722b69b52c",
"downRes": "res|19cc0f39-3a5d-4e06-a4a3-9a722b69b52c",
"upRes": "res|19cc0f39-3a5d-4e06-a4a3-9a722b69b52c"
]
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|19cc0f39-3a5d-4e06-a4a3-9a722b69b52c"
"texture": "res|36a7e2ae-8426-46d3-8d63-64045ad7527a"
}
},
{
"script": "components/other/RelativeLayout",
"properties": {
"left": 0,
"top": 50
}
}
],
......@@ -124,22 +291,17 @@
}
}
],
"uuid": "e142df49-43dd-4cc7-9cdd-ed0583a7aa59"
"uuid": "d31f7998-1c8c-4c19-bc71-5bc0a270a648"
}
],
"uuid": "5c2e75f3-83cd-440c-bc0d-ef18149bd30e"
"uuid": "284cdcb2-7830-4d38-b984-ca6bc71a15d7"
},
{
"name": "tasksBtn",
"name": "recordBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 180,
"_type_": "scilla/support/Vector2D"
}
}
"properties": {}
},
{
"script": "components/animation/TouchZoom",
......@@ -150,16 +312,30 @@
{
"script": "components/ui/Button",
"properties": {
"downRes": "res|1029947c-ac65-49c5-a2f0-0cccba73cc9f",
"upRes": "res|1029947c-ac65-49c5-a2f0-0cccba73cc9f",
"disabledRes": "res|1029947c-ac65-49c5-a2f0-0cccba73cc9f"
"upRes": "res|bec9f772-1392-4b9c-83dc-456a97885f9f",
"downRes": "res|bec9f772-1392-4b9c-83dc-456a97885f9f",
"onClick": [
{
"entity": "entity|20181212032053",
"component": 2,
"method": "onRecordBtnTap"
}
]
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|1029947c-ac65-49c5-a2f0-0cccba73cc9f"
"texture": "res|bec9f772-1392-4b9c-83dc-456a97885f9f"
}
},
{
"script": "components/other/RelativeLayout",
"properties": {
"right": 0,
"top": 50
},
"disabled": false
}
],
"children": [
......@@ -178,502 +354,512 @@
}
}
],
"uuid": "27b61e9c-8fd0-451c-8c59-9896a148ec21"
"uuid": "04a34126-7ef0-43a3-a254-b053bde5a9a8"
}
],
"uuid": "f5333e72-ad59-4a82-8390-770d601202b4"
"uuid": "975f0da0-857f-4289-b88a-edfdf2726383"
},
{
"name": "addTimesBtnTip",
"name": "ruleBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 180,
"y": -80,
"x": 296.5,
"y": -702,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"script": "components/animation/TouchZoom",
"properties": {
"texture": "res|ee82006d-123d-4463-8cd4-4c9904aaa65c"
"easeName": "backOut"
}
}
],
"uuid": "7df5486b-06ac-4e55-a5f4-e06433530fe2"
}
]
},
{
"name": "withdrawBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -297,
"y": -762,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/animation/TouchZoom",
"properties": {
"easeName": "backOut"
}
},
{
"script": "components/ui/Button",
"properties": {
"upRes": "res|36a7e2ae-8426-46d3-8d63-64045ad7527a",
"downRes": "res|36a7e2ae-8426-46d3-8d63-64045ad7527a",
"onClick": [
{
"entity": "entity|20181212032053",
"component": 2,
"method": "onWithdrawBtnTap"
},
{
"script": "components/ui/Button",
"properties": {
"upRes": "res|2257099a-016f-4fb8-9049-47ee93da4e0f",
"downRes": "res|2257099a-016f-4fb8-9049-47ee93da4e0f",
"onClick": [
{
"entity": "entity|20181212032053",
"component": 2,
"method": "onRuleBtnTap"
}
]
}
]
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|36a7e2ae-8426-46d3-8d63-64045ad7527a"
}
}
],
"children": [
{
"name": "label",
"components": [
},
{
"script": "components/base/Transform",
"properties": {}
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|2257099a-016f-4fb8-9049-47ee93da4e0f"
}
},
{
"script": "components/renderer/TextRenderer",
"script": "components/other/RelativeLayout",
"properties": {
"text": "",
"fillColor": "rgba(255, 255, 255, 1)"
"right": 0,
"top": 100
}
}
],
"uuid": "d31f7998-1c8c-4c19-bc71-5bc0a270a648"
}
],
"uuid": "284cdcb2-7830-4d38-b984-ca6bc71a15d7"
},
{
"name": "recordBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 296.5,
"y": -762,
"_type_": "scilla/support/Vector2D"
"children": [
{
"name": "label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "",
"fillColor": "rgba(255, 255, 255, 1)"
}
}
],
"uuid": "fea9fcf6-e9dd-4964-a301-8ebd9dc22911"
}
}
},
{
"script": "components/animation/TouchZoom",
"properties": {
"easeName": "backOut"
}
},
{
"script": "components/ui/Button",
"properties": {
"upRes": "res|bec9f772-1392-4b9c-83dc-456a97885f9f",
"downRes": "res|bec9f772-1392-4b9c-83dc-456a97885f9f",
"onClick": [
{
"entity": "entity|20181212032053",
"component": 2,
"method": "onRecordBtnTap"
}
]
}
],
"uuid": "2d627639-ca10-4414-a9ca-a29bfaaef46c"
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|bec9f772-1392-4b9c-83dc-456a97885f9f"
}
}
],
"children": [
{
"name": "label",
"name": "sliderbg",
"components": [
{
"script": "components/base/Transform",
"properties": {}
"properties": {
"position": {
"y": -742,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextRenderer",
"script": "components/renderer/TextureRenderer",
"properties": {
"text": "",
"fillColor": "rgba(255, 255, 255, 1)"
"texture": "res|9e6302b3-cde4-4a25-96b9-6b74baab93b5"
}
},
{
"script": "./scripts/Slider",
"properties": {
"mask": "entity|b76fcfc5-6883-4a6b-aa13-7173a2898097",
"slidermask": "entity|b76fcfc5-6883-4a6b-aa13-7173a2898097",
"sliderLabel1": "entity|37e7b1e5-3435-4b7e-ae66-7016ff593be6",
"sliderLabel2": "entity|00c40b17-ed87-4c03-aa90-8bcad44c916b"
}
}
],
"uuid": "04a34126-7ef0-43a3-a254-b053bde5a9a8"
}
],
"uuid": "975f0da0-857f-4289-b88a-edfdf2726383"
},
{
"name": "ruleBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 296.5,
"y": -702,
"_type_": "scilla/support/Vector2D"
"uuid": "6bb74bb8-11f9-414c-afcb-20a32808a0cf",
"children": [
{
"name": "slidermask",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"width": 362,
"height": 41,
"alpha": 1,
"isUsedToMask": true
}
}
],
"uuid": "b76fcfc5-6883-4a6b-aa13-7173a2898097",
"children": [
{
"name": "sliderLabel1",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "1111",
"fillColor": "rgba(242, 242, 242, 1)"
}
}
],
"uuid": "37e7b1e5-3435-4b7e-ae66-7016ff593be6"
},
{
"name": "sliderLabel2",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"y": 41,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "1111",
"fillColor": "rgba(242, 242, 242, 1)"
}
}
],
"uuid": "00c40b17-ed87-4c03-aa90-8bcad44c916b"
}
]
}
}
},
{
"script": "components/animation/TouchZoom",
"properties": {
"easeName": "backOut"
}
},
{
"script": "components/ui/Button",
"properties": {
"upRes": "res|2257099a-016f-4fb8-9049-47ee93da4e0f",
"downRes": "res|2257099a-016f-4fb8-9049-47ee93da4e0f",
"onClick": [
{
"entity": "entity|20181212032053",
"component": 2,
"method": "onRuleBtnTap"
}
]
}
],
"disabled": true
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|2257099a-016f-4fb8-9049-47ee93da4e0f"
}
}
],
"children": [
{
"name": "label",
"name": "mainwrapper",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "",
"fillColor": "rgba(255, 255, 255, 1)"
}
}
],
"uuid": "fea9fcf6-e9dd-4964-a301-8ebd9dc22911"
}
],
"uuid": "2d627639-ca10-4414-a9ca-a29bfaaef46c"
},
{
"name": "sliderbg",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"y": -742,
"_type_": "scilla/support/Vector2D"
"uuid": "0961456e-d52a-447c-a9f2-d5a9d516a610",
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|e7fb8664-3d0e-46aa-978b-08d5a53f377a"
}
}
],
"uuid": "9d0590bf-f5c8-4dd5-9b75-332f226a9845"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|663c6d8e-a2f6-4022-a19f-00be63f9debc"
}
}
],
"uuid": "14b49110-4d87-412e-b5d7-02c2798688dd"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|86fe7352-2826-4219-9d52-11b5162a2a6e"
}
}
],
"uuid": "d1c872c3-880f-4390-910a-dd9f785c7e68"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|5188c337-79fa-4b48-930e-7bdc81f4fe90"
}
}
],
"uuid": "684bd63a-1475-49d6-9f7c-22058fcd9de9"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|9e6302b3-cde4-4a25-96b9-6b74baab93b5"
}
],
"disabled": true
},
{
"script": "./scripts/Slider",
"properties": {
"mask": "entity|b76fcfc5-6883-4a6b-aa13-7173a2898097",
"slidermask": "entity|b76fcfc5-6883-4a6b-aa13-7173a2898097",
"sliderLabel1": "entity|37e7b1e5-3435-4b7e-ae66-7016ff593be6",
"sliderLabel2": "entity|00c40b17-ed87-4c03-aa90-8bcad44c916b"
}
}
],
"uuid": "6bb74bb8-11f9-414c-afcb-20a32808a0cf",
"children": [
{
"name": "slidermask",
"name": "progress",
"components": [
{
"script": "components/base/Transform",
"properties": {}
"properties": {
"position": {
"x": -292,
"y": -273,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/RectRenderer",
"script": "components/renderer/TextureRenderer",
"properties": {
"width": 362,
"height": 41,
"alpha": 1,
"isUsedToMask": true
"texture": "res|561d9875-a3c1-47c9-90a2-017b1f40c76b"
}
}
],
"uuid": "b76fcfc5-6883-4a6b-aa13-7173a2898097",
"uuid": "90e21483-3c35-43f7-b1e7-cc0fd3038f26",
"children": [
{
"name": "sliderLabel1",
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
"properties": {
"position": {
"y": 210,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "1111",
"fillColor": "rgba(242, 242, 242, 1)"
"text": "1/5",
"fillColor": "rgba(255, 255, 255, 1)"
}
}
],
"uuid": "37e7b1e5-3435-4b7e-ae66-7016ff593be6"
"uuid": "4670831d-6a01-473d-a4e6-5104554dc605"
},
{
"name": "sliderLabel2",
"name": "mask",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"y": 41,
"y": 36,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextRenderer",
"script": "components/renderer/RectRenderer",
"properties": {
"text": "1111",
"fillColor": "rgba(242, 242, 242, 1)"
"isUsedToMask": true,
"width": 29,
"height": 295,
"cornerRadius": 15
}
}
],
"uuid": "00c40b17-ed87-4c03-aa90-8bcad44c916b"
}
]
}
]
},
{
"name": "rulePanel",
"components": [
{
"script": "components/base/Transform",
"properties": {
"alpha": 0
}
}
],
"uuid": "702054c6-f4db-4b72-9b71-d2016408e511",
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|32117cd8-e67c-4875-89de-e10368409a6d"
}
"uuid": "5ed38999-810b-42a6-837d-a0d06af65bc4",
"children": [
{
"name": "progressFrontBg",
"components": [
{
"script": "components/base/Transform",
"properties": {
"pivot": {
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
},
"position": {
"x": -14,
"y": -148,
"_type_": "scilla/support/Vector2D"
},
"alpha": 1
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|8534d43e-c1b0-42da-83af-027b43a88447"
}
}
],
"uuid": "2ff83b99-0e1c-4930-8cd3-3c9153e56e98"
}
]
}
],
"uuid": "88ce1e4f-c008-4970-a963-b58105003e95"
"disabled": true
},
{
"name": "Label",
"name": "countTxtWrapper",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "hello"
"position": {
"y": -400,
"_type_": "scilla/support/Vector2D"
}
}
}
],
"uuid": "6553edc4-39c3-4a8d-8d56-b7efe591ab70"
}
]
},
{
"name": "mainwrapper",
"components": [
{
"script": "components/base/Transform",
"properties": {}
}
],
"uuid": "0961456e-d52a-447c-a9f2-d5a9d516a610",
"children": [
{
"name": "Image",
"components": [
"uuid": "d1acd99a-da62-4eb2-a2b8-7885ff080de6",
"children": [
{
"script": "components/base/Transform",
"properties": {}
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|33e58a7f-3ce4-4307-9642-cec604c74cb8"
}
}
],
"uuid": "3701c8bc-6f02-4dc1-b272-9463f4943d3f"
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|e7fb8664-3d0e-46aa-978b-08d5a53f377a"
}
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"y": -4,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "剩2次",
"fillColor": "rgba(255, 255, 255, 1)",
"textStyle": {
"fontSize": 20
}
}
}
],
"uuid": "29037594-5f9f-47f1-bcb8-e5da5390f5fc"
}
],
"uuid": "9d0590bf-f5c8-4dd5-9b75-332f226a9845"
"disabled": true
},
{
"name": "Image",
"name": "layerMask",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"script": "components/renderer/RectRenderer",
"properties": {
"texture": "res|663c6d8e-a2f6-4022-a19f-00be63f9debc"
"width": 750,
"height": 1624,
"fillColor": "rgba(0, 0, 0, 1)",
"alpha": 0.7
}
}
],
"uuid": "14b49110-4d87-412e-b5d7-02c2798688dd"
"uuid": "25335791-822e-4778-b267-bc87b15ef1c0",
"disabled": true
},
{
"name": "Image",
"name": "rulePanel",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|86fe7352-2826-4219-9d52-11b5162a2a6e"
"alpha": 0
}
}
],
"uuid": "d1c872c3-880f-4390-910a-dd9f785c7e68"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|5188c337-79fa-4b48-930e-7bdc81f4fe90"
"texture": "res|32117cd8-e67c-4875-89de-e10368409a6d"
}
}
],
"uuid": "684bd63a-1475-49d6-9f7c-22058fcd9de9"
}
]
},
{
"name": "progress",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -292,
"y": -273,
"_type_": "scilla/support/Vector2D"
"uuid": "702054c6-f4db-4b72-9b71-d2016408e511",
"children": [
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {
"width": 500
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "对方的付多所付所付多付多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多对方的付多所付所付多付多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多对方的付多所付所付多付多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多对方的付多所付所付多付多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多对方的付多所付所付多付多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多",
"verticalAlign": "middle",
"textAlign": "center",
"fillColor": "rgba(255, 255, 255, 1)",
"textStyle": {
"fontSize": 22
},
"lineSpacing": 8
}
}
],
"uuid": "1ce217cc-11a8-4e80-af1c-e1229bcff60f"
}
}
],
"disabled": true
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|561d9875-a3c1-47c9-90a2-017b1f40c76b"
}
}
],
"uuid": "90e21483-3c35-43f7-b1e7-cc0fd3038f26",
"children": [
{
"name": "Label",
"name": "newRulePanel",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"y": 210,
"_type_": "scilla/support/Vector2D"
}
"alpha": 0
}
},
{
"script": "components/renderer/TextRenderer",
"script": "components/renderer/TextureRenderer",
"properties": {
"text": "1/5",
"fillColor": "rgba(255, 255, 255, 1)"
"texture": "res|e2b50ed3-098c-4467-ad7a-433135896f74"
}
}
],
"uuid": "4670831d-6a01-473d-a4e6-5104554dc605"
"uuid": "aaf0f393-fe09-4c33-8f70-adc8fa9ec82e",
"disabled": true
},
{
"name": "mask",
"name": "eggPanel",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"y": 36,
"x": -375,
"y": -814,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"isUsedToMask": true,
"width": 29,
"height": 295,
"cornerRadius": 15
}
}
],
"uuid": "5ed38999-810b-42a6-837d-a0d06af65bc4",
"uuid": "b52ec1cd-fb38-469a-8202-73061a4adc7d",
"children": [
{
"name": "progressFrontBg",
"name": "Image",
"components": [
{
"script": "components/base/Transform",
......@@ -684,81 +870,73 @@
"_type_": "scilla/support/Vector2D"
},
"position": {
"x": -14,
"y": -148,
"x": 70,
"_type_": "scilla/support/Vector2D"
},
"alpha": 1
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|8534d43e-c1b0-42da-83af-027b43a88447"
"texture": "res|01a59dc7-b850-4110-b167-34f0aa346b70"
}
}
],
"uuid": "2ff83b99-0e1c-4930-8cd3-3c9153e56e98"
}
]
}
]
},
{
"name": "countTxtWrapper",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"y": -400,
"_type_": "scilla/support/Vector2D"
}
}
}
],
"uuid": "d1acd99a-da62-4eb2-a2b8-7885ff080de6",
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
"uuid": "c01a7640-c14e-4b7d-8827-facbcd00d18c"
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|33e58a7f-3ce4-4307-9642-cec604c74cb8"
}
}
],
"uuid": "3701c8bc-6f02-4dc1-b272-9463f4943d3f"
},
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"y": -4,
"_type_": "scilla/support/Vector2D"
"name": "Button",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"fillColor": "rgba(0, 192, 255, 1)",
"width": 150,
"height": 60,
"cornerRadius": 10
}
},
{
"script": "components/animation/TouchZoom",
"properties": {
"easeName": "backOut"
}
},
{
"script": "components/ui/Button",
"properties": {
"upRes": "res|31777b1f-d07f-4b7e-bc34-539ed9a6a85f",
"downRes": "res|31777b1f-d07f-4b7e-bc34-539ed9a6a85f",
"disabledRes": "res|31777b1f-d07f-4b7e-bc34-539ed9a6a85f"
}
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "剩2次",
"fillColor": "rgba(255, 255, 255, 1)",
"textStyle": {
"fontSize": 20
],
"children": [
{
"name": "label",
"components": [
{
"script": "components/base/Transform"
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "button",
"fillColor": "rgba(255, 255, 255, 1)"
}
}
],
"uuid": "32ffd73e-bd18-4f2f-b3b1-a540daf143a1"
}
}
],
"uuid": "90dee563-f2cb-4487-9257-14c5b5766b27"
}
],
"uuid": "29037594-5f9f-47f1-bcb8-e5da5390f5fc"
"disabled": true
}
]
}
......@@ -786,6 +964,26 @@
"uuid": "69227bac-6549-4561-87ba-cc9ca243882d",
"url": "bg/bg.jpg"
},
{
"uuid": "21295d1f-5d14-4e92-ac63-838d9b8c85a7",
"url": "sheets/egg.sht-disperse",
"config": {
"textures": [
{
"name": "egg_likebtn",
"uuid": "31777b1f-d07f-4b7e-bc34-539ed9a6a85f"
},
{
"name": "eggbg",
"uuid": "01a59dc7-b850-4110-b167-34f0aa346b70"
},
{
"name": "eggheart",
"uuid": "eaed6b84-e9d1-456e-a338-2794827729be"
}
]
}
},
{
"uuid": "6fe5aa11-4868-46e0-9619-6c515ec538f7",
"url": "sheets/main.sht-disperse",
......@@ -862,6 +1060,18 @@
]
}
},
{
"uuid": "58efe21b-79ea-460c-b6d6-2c8a635cb165",
"url": "sheets/newrule.sht-disperse",
"config": {
"textures": [
{
"name": "newrulebg",
"uuid": "e2b50ed3-098c-4467-ad7a-433135896f74"
}
]
}
},
{
"uuid": "d79b80f9-cd09-46a4-9167-d712ba3ecdbe",
"url": "sheets/rule.sht-disperse",
......
No preview for this file type
{"ver":"1.0.1","uuid":"21295d1f-5d14-4e92-ac63-838d9b8c85a7","subMetas":{"egg_likebtn":{"ver":"1.0.1","uuid":"31777b1f-d07f-4b7e-bc34-539ed9a6a85f","rawTextureUuid":"21295d1f-5d14-4e92-ac63-838d9b8c85a7","type":"texture"},"eggbg":{"ver":"1.0.1","uuid":"01a59dc7-b850-4110-b167-34f0aa346b70","rawTextureUuid":"21295d1f-5d14-4e92-ac63-838d9b8c85a7","type":"texture"},"eggheart":{"ver":"1.0.1","uuid":"eaed6b84-e9d1-456e-a338-2794827729be","rawTextureUuid":"21295d1f-5d14-4e92-ac63-838d9b8c85a7","type":"texture"}},"type":"sheet"}
{"ver":"1.0.1","uuid":"58efe21b-79ea-460c-b6d6-2c8a635cb165","subMetas":{"newrulebg":{"ver":"1.0.1","uuid":"e2b50ed3-098c-4467-ad7a-433135896f74","rawTextureUuid":"58efe21b-79ea-460c-b6d6-2c8a635cb165","type":"texture"}},"type":"sheet"}
......@@ -33,80 +33,14 @@
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics$1 = function(d, b) {
extendStatics$1 = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics$1(d, b);
};
function __extends$1(d, b) {
extendStatics$1(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __decorate$1(decorators, target, key, desc) {
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __awaiter$1(thisArg, _arguments, P, generator) {
function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
......@@ -115,7 +49,7 @@
});
}
function __generator$1(thisArg, body) {
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
......@@ -143,7 +77,7 @@
}
}
function __values$1(o) {
function __values(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
......@@ -154,7 +88,7 @@
};
}
function __read$1(o, n) {
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
......@@ -171,9 +105,9 @@
return ar;
}
function __spread$1() {
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read$1(arguments[i]));
ar = ar.concat(__read(arguments[i]));
return ar;
}
......@@ -235,7 +169,7 @@
'_dealGlobalTouchEnd',
];
var ScillaComponent = (function (_super) {
__extends$1(ScillaComponent, _super);
__extends(ScillaComponent, _super);
function ScillaComponent() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.delayCallbacks = [];
......@@ -289,9 +223,6 @@
ScillaComponent.prototype.invokeDelayCallback = function (t) {
var e_1, _a;
var removed = [];
if (this.entity.name.indexOf('progress') >= 0) {
console.log();
}
for (var i = 0, li = this.delayCallbacks.length; i < li; i++) {
var _b = this.delayCallbacks[i], callback = _b.callback, once = _b.once;
if (once) {
......@@ -300,7 +231,7 @@
callback.call(this, t);
}
try {
for (var removed_1 = __values$1(removed), removed_1_1 = removed_1.next(); !removed_1_1.done; removed_1_1 = removed_1.next()) {
for (var removed_1 = __values(removed), removed_1_1 = removed_1.next(); !removed_1_1.done; removed_1_1 = removed_1.next()) {
var item = removed_1_1.value;
this.delayCallbacks.splice(item, 1);
}
......@@ -327,7 +258,7 @@
var e_2, _a;
var result;
try {
for (var _b = __values$1(this.delayCallbacks), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = __values(this.delayCallbacks), _c = _b.next(); !_c.done; _c = _b.next()) {
var item = _c.value;
if (item.callback == callback) {
result = item;
......@@ -396,7 +327,7 @@
params[_i - 2] = arguments[_i];
}
var _a;
(_a = this.entity).broadcast.apply(_a, __spread$1([method, level], params));
(_a = this.entity).broadcast.apply(_a, __spread([method, level], params));
};
ScillaComponent.prototype.bubbling = function (method) {
var params = [];
......@@ -404,7 +335,7 @@
params[_i - 1] = arguments[_i];
}
var _a;
(_a = this.entity).bubbling.apply(_a, __spread$1([method], params));
(_a = this.entity).bubbling.apply(_a, __spread([method], params));
};
return ScillaComponent;
}(HashObject));
......@@ -418,17 +349,17 @@
}
var e_1, _a;
if (includeSelf) {
hitChild.apply(void 0, __spread$1([target], params));
hitChild.apply(void 0, __spread([target], params));
}
if (level !== 0) {
try {
for (var _b = __values$1(target.children), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = __values(target.children), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
if (hitChild.apply(void 0, __spread$1([child], params))) {
if (hitChild.apply(void 0, __spread([child], params))) {
continue;
}
if (child.children.length > 0) {
traverse.apply(void 0, __spread$1([child, hitChild, level - 1, false, fullCallback], params));
traverse.apply(void 0, __spread([child, hitChild, level - 1, false, fullCallback], params));
}
}
}
......@@ -452,16 +383,16 @@
if (level !== 0) {
for (var i = target.children.length - 1; i >= 0; i--) {
var child = target.children[i];
if (traversePostorder.apply(void 0, __spread$1([child, hitChild, level - 1, false, fullCallback], params))) {
if (traversePostorder.apply(void 0, __spread([child, hitChild, level - 1, false, fullCallback], params))) {
return true;
}
if (hitChild.apply(void 0, __spread$1([child], params))) {
if (hitChild.apply(void 0, __spread([child], params))) {
return true;
}
}
}
if (includeSelf) {
hitChild.apply(void 0, __spread$1([target], params));
hitChild.apply(void 0, __spread([target], params));
}
fullCallback && fullCallback(target);
}
......@@ -472,17 +403,17 @@
params[_i - 3] = arguments[_i];
}
if (includeSelf) {
hitParent.apply(void 0, __spread$1([target], params));
hitParent.apply(void 0, __spread([target], params));
}
var entity = target;
while (entity = entity.parent) {
if (hitParent.apply(void 0, __spread$1([entity], params))) {
if (hitParent.apply(void 0, __spread([entity], params))) {
break;
}
}
}
var Entity = (function (_super) {
__extends$1(Entity, _super);
__extends(Entity, _super);
function Entity(name, uuid) {
var _this = _super.call(this) || this;
_this.name = 'Entity';
......@@ -710,7 +641,7 @@
Entity.prototype.forEachComponent = function (func) {
var e_2, _a;
try {
for (var _b = __values$1(this._components), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = __values(this._components), _c = _b.next(); !_c.done; _c = _b.next()) {
var component = _c.value;
if (func(component)) {
break;
......@@ -799,14 +730,14 @@
for (var _i = 2; _i < arguments.length; _i++) {
params[_i - 2] = arguments[_i];
}
traverse.apply(void 0, __spread$1([this, this.invokeOnEntity, level, true, null, method], params));
traverse.apply(void 0, __spread([this, this.invokeOnEntity, level, true, null, method], params));
};
Entity.prototype.bubbling = function (method) {
var params = [];
for (var _i = 1; _i < arguments.length; _i++) {
params[_i - 1] = arguments[_i];
}
bubbling.apply(void 0, __spread$1([this, this.invokeOnEntity, false, method], params));
bubbling.apply(void 0, __spread([this, this.invokeOnEntity, false, method], params));
};
return Entity;
}(HashObject));
......@@ -1130,7 +1061,7 @@
}
var Texture = (function (_super) {
__extends$1(Texture, _super);
__extends(Texture, _super);
function Texture() {
var _this = _super.call(this) || this;
_this.bounds = new Bounds();
......@@ -1193,7 +1124,7 @@
}
var Sheet = (function (_super) {
__extends$1(Sheet, _super);
__extends(Sheet, _super);
function Sheet(img, frames) {
var _this = _super.call(this) || this;
_this._textureCache = {};
......@@ -1310,7 +1241,7 @@
var e_1, _a;
var result;
try {
for (var _b = __values$1(this._animData.labels), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = __values(this._animData.labels), _c = _b.next(); !_c.done; _c = _b.next()) {
var label = _c.value;
if (label.name == name) {
result = label;
......@@ -1404,9 +1335,9 @@
if (cache === void 0) { cache = true; }
if (options === void 0) { options = {}; }
if (type === void 0) { type = 'arraybuffer'; }
return __awaiter$1(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var response, result;
return __generator$1(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, fetch(resolveUrl(url), options)];
case 1:
......@@ -1455,9 +1386,9 @@
}
function loadJson5(url, uuid, cache, config) {
if (cache === void 0) { cache = true; }
return __awaiter$1(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var txt, jsonData;
return __generator$1(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, loadTxt(url, uuid)];
case 1:
......@@ -1485,7 +1416,7 @@
cacheRes(sheet, url, uuid);
if (config) {
try {
for (var _b = __values$1(config.textures), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = __values(config.textures), _c = _b.next(); !_c.done; _c = _b.next()) {
var textureConfig = _c.value;
var name_1 = textureConfig.name, uuid_1 = textureConfig.uuid;
var texture = sheet.getTexture(name_1);
......@@ -1512,13 +1443,13 @@
}
function loadSheetDisperse(url, uuid, cache, config) {
if (cache === void 0) { cache = true; }
return __awaiter$1(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var e_2, _a, _b, _c, _d, name_2, uuid_2, subUrl, e_2_1;
return __generator$1(this, function (_e) {
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
_e.trys.push([0, 5, 6, 7]);
_b = __values$1(config.textures), _c = _b.next();
_b = __values(config.textures), _c = _b.next();
_e.label = 1;
case 1:
if (!!_c.done) return [3, 4];
......@@ -1610,9 +1541,9 @@
}
function loadImageFromBlob(url, uuid, cache, config) {
if (cache === void 0) { cache = true; }
return __awaiter$1(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var imgBlob, e_3;
return __generator$1(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 3, , 4]);
......@@ -1632,9 +1563,9 @@
}
function loadTexture(url, uuid, cache, config) {
if (cache === void 0) { cache = true; }
return __awaiter$1(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var img, texture;
return __generator$1(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, loadImage(url, uuid, false)];
case 1:
......@@ -1650,9 +1581,9 @@
}
function loadTextureFromBlob(url, uuid, cache, config) {
if (cache === void 0) { cache = true; }
return __awaiter$1(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var img, texture;
return __generator$1(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, loadImageFromBlob(url, uuid, false)];
case 1:
......@@ -1715,9 +1646,9 @@
});
}
function blobToImage(blob) {
return __awaiter$1(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var dataUrl;
return __generator$1(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, fileOrBlobToDataURL(blob)];
case 1:
......@@ -1756,8 +1687,8 @@
}
};
Scene.prototype.loadResGroup = function (name, progress) {
return __awaiter$1(this, void 0, void 0, function () {
return __generator$1(this, function (_a) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, loadResItems(this.resourceGroups[name], progress)];
case 1:
......@@ -1854,7 +1785,7 @@
return a.priority - b.priority;
});
try {
for (var _subscribers_1 = __values$1(_subscribers), _subscribers_1_1 = _subscribers_1.next(); !_subscribers_1_1.done; _subscribers_1_1 = _subscribers_1.next()) {
for (var _subscribers_1 = __values(_subscribers), _subscribers_1_1 = _subscribers_1.next(); !_subscribers_1_1.done; _subscribers_1_1 = _subscribers_1.next()) {
var subscriber = _subscribers_1_1.value;
if (subscriber) {
var callback = subscriber.callback, thisObj = subscriber.thisObj, once = subscriber.once, params = subscriber.params;
......@@ -2018,10 +1949,9 @@
entityCache = {};
return scene;
}
function destroyScene(scene) {
var root = scene.root;
root.removeAllComponents();
root.removeChildren();
function cleanEntity(entity) {
entity.removeAllComponents();
entity.removeChildren();
}
function instantiateConfig(config, root) {
var entity = setupEntity(config, root);
......@@ -2085,7 +2015,7 @@
var e_1, _a;
if (config.components) {
try {
for (var _b = __values$1(config.components), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = __values(config.components), _c = _b.next(); !_c.done; _c = _b.next()) {
var component = _c.value;
instantiateComponent(entity, component);
}
......@@ -2104,15 +2034,18 @@
var components = entity.components;
for (var i = 0, li = config.components.length; i < li; i++) {
var component = config.components[i];
var properties = component.properties;
if (properties) {
injectProperties(components[i], properties, pid);
}
injectComponentProperties(components[i], component, pid);
}
}
}
function injectComponentProperties(component, config, pid) {
var properties = config.properties;
if (properties) {
injectProperties(component, properties, pid);
}
}
function instantiateComponent(entity, config) {
var script = config.script, properties = config.properties;
var script = config.script;
var def = getDefByName(script);
if (!def) {
return;
......@@ -2120,6 +2053,7 @@
var instance = new def();
instance.enabled = !config.disabled;
entity.addComponent(instance);
return instance;
}
function getDefByName(name) {
var def;
......@@ -2194,7 +2128,7 @@
function injectEvent(event, config, pid) {
var e_2, _a;
try {
for (var config_1 = __values$1(config), config_1_1 = config_1.next(); !config_1_1.done; config_1_1 = config_1.next()) {
for (var config_1 = __values(config), config_1_1 = config_1.next(); !config_1_1.done; config_1_1 = config_1.next()) {
var _b = config_1_1.value, entityName = _b.entity, componentIndex = _b.component, methodName = _b.method, param = _b.param;
if (entityName && componentIndex >= 0 && methodName) {
var entity = getLink(entityName, pid);
......@@ -2241,9 +2175,9 @@
var currentScene;
var resUUIDs;
function launchScene(name, progress) {
return __awaiter$1(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var scene;
return __generator$1(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, loadScene("scenes/" + name + ".scene", 'scene_' + name)];
case 1:
......@@ -2270,14 +2204,14 @@
}
function unmountScene(scene) {
pause();
destroyScene(scene);
cleanEntity(scene.root);
destroyRes(resUUIDs);
}
function loadScene(url, uuid, cache, config) {
if (cache === void 0) { cache = false; }
return __awaiter$1(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var sceneConfig, scene;
return __generator$1(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, loadJson5(url)];
case 1:
......@@ -2291,9 +2225,9 @@
}
function loadPrefab(url, uuid, cache, config) {
if (cache === void 0) { cache = true; }
return __awaiter$1(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var data;
return __generator$1(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, loadJson5(url, uuid, false)];
case 1:
......@@ -2331,7 +2265,7 @@
else {
instance = pool.pop();
}
initFunc.apply(void 0, __spread$1([instance], params));
initFunc.apply(void 0, __spread([instance], params));
return instance;
}
......@@ -2559,7 +2493,7 @@
}
var temp = new clazz();
try {
for (var fields_1 = __values$1(fields), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {
for (var fields_1 = __values(fields), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {
var field = fields_1_1.value;
temp[field] = lerp(begin[field], end[field], t, allowOutOfBounds);
}
......@@ -2602,7 +2536,7 @@
var tweens = target['tweens'];
if (tweens) {
try {
for (var tweens_1 = __values$1(tweens), tweens_1_1 = tweens_1.next(); !tweens_1_1.done; tweens_1_1 = tweens_1.next()) {
for (var tweens_1 = __values(tweens), tweens_1_1 = tweens_1.next(); !tweens_1_1.done; tweens_1_1 = tweens_1.next()) {
var tween = tweens_1_1.value;
tween.stop();
}
......@@ -2625,7 +2559,7 @@
tweens.push(tween);
}
var Tween = (function (_super) {
__extends$1(Tween, _super);
__extends(Tween, _super);
function Tween(target, options, plugins) {
if (plugins === void 0) { plugins = []; }
var _this = _super.call(this) || this;
......@@ -2731,7 +2665,7 @@
var e_2, _a;
var props = {};
try {
for (var fields_1 = __values$1(fields), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {
for (var fields_1 = __values(fields), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {
var field = fields_1_1.value;
if (field in this.target) {
props[field] = this.target[field];
......@@ -3261,10 +3195,10 @@
Size.prototype.onModify = function (value, key, oldValue) {
this.onChange && this.onChange(value, key, oldValue);
};
__decorate$1([
__decorate([
dirtyFieldTrigger
], Size.prototype, "width", void 0);
__decorate$1([
__decorate([
dirtyFieldTrigger
], Size.prototype, "height", void 0);
return Size;
......@@ -3299,19 +3233,19 @@
TextStyle.prototype.onModify = function (value, key, oldValue) {
this.onChange && this.onChange(value, key, oldValue, 'textStyle');
};
__decorate$1([
__decorate([
dirtyFieldTrigger
], TextStyle.prototype, "fontStyle", void 0);
__decorate$1([
__decorate([
dirtyFieldTrigger
], TextStyle.prototype, "fontVariant", void 0);
__decorate$1([
__decorate([
dirtyFieldTrigger
], TextStyle.prototype, "fontWeight", void 0);
__decorate$1([
__decorate([
dirtyFieldTrigger
], TextStyle.prototype, "fontSize", void 0);
__decorate$1([
__decorate([
dirtyFieldTrigger
], TextStyle.prototype, "fontFamily", void 0);
return TextStyle;
......@@ -3706,79 +3640,9 @@
elasticInOut: elasticInOut
});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics$2 = function(d, b) {
extendStatics$2 = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics$2(d, b);
};
function __extends$2(d, b) {
extendStatics$2(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __decorate$2(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __values$2(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
}
function __read$2(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
function __spread$2() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read$2(arguments[i]));
return ar;
}
var dirtyFieldTrigger$1 = dirtyFieldTrigger;
var Renderer = (function (_super) {
__extends$2(Renderer, _super);
__extends(Renderer, _super);
function Renderer() {
var _this = _super.call(this) || this;
_this.onVector2DModify = function () {
......@@ -3928,7 +3792,7 @@
Renderer.prototype.hitTest = function (x, y) {
return this.bounds.contains(x, y);
};
__decorate$2([
__decorate([
dirtyFieldTrigger$1
], Renderer.prototype, "anchor", void 0);
return Renderer;
......@@ -3941,13 +3805,13 @@
MATRIX_ORDER[MATRIX_ORDER["ROTATE_SCALE"] = 1] = "ROTATE_SCALE";
})(MATRIX_ORDER || (MATRIX_ORDER = {}));
var Transform = (function (_super) {
__extends$2(Transform, _super);
__extends(Transform, _super);
function Transform() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.onVector2DModify = function (value, key, oldValue) {
_this.makeDirty(value, key, oldValue);
};
_this.position = new Vector2D(0);
_this.position = new Vector2D(0, 0);
_this.alpha = 1;
_this._width = NaN;
_this._height = NaN;
......@@ -4017,7 +3881,7 @@
case 'height':
var renderers = this.entity.getComponents(Renderer);
try {
for (var renderers_1 = __values$2(renderers), renderers_1_1 = renderers_1.next(); !renderers_1_1.done; renderers_1_1 = renderers_1.next()) {
for (var renderers_1 = __values(renderers), renderers_1_1 = renderers_1.next(); !renderers_1_1.done; renderers_1_1 = renderers_1.next()) {
var renderer = renderers_1_1.value;
renderer.makeDirty();
}
......@@ -4084,24 +3948,71 @@
this.updateGlobalMatrix();
_super.prototype.onUpdate.call(this, t);
};
__decorate$2([
__decorate([
dirtyFieldTrigger$2
], Transform.prototype, "position", void 0);
__decorate$2([
__decorate([
dirtyFieldTrigger$2
], Transform.prototype, "alpha", void 0);
__decorate$2([
__decorate([
dirtyFieldTrigger$2
], Transform.prototype, "scale", void 0);
__decorate$2([
__decorate([
dirtyFieldTrigger$2
], Transform.prototype, "pivot", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$1
], Transform.prototype, "rotation", void 0);
return Transform;
}(ScillaComponent));
var CameraController = (function (_super) {
__extends(CameraController, _super);
function CameraController() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.viewportAnchor = createVector2D(0.5, 0.5);
_this.maxScale = 1.2;
return _this;
}
CameraController.prototype.onCreate = function () {
_super.prototype.onCreate.call(this);
};
CameraController.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
var target = this.target;
this.stageSize = getStageSize();
if (target) {
this.targetPosition = target.getComponent(Transform).position;
}
this.followPosition = createVector2D();
this.updateViewport();
};
CameraController.prototype.onUpdate = function (t) {
_super.prototype.onUpdate.call(this, t);
this.followTarget();
};
CameraController.prototype.updateViewport = function () {
if (this.viewportAnchor) {
var _a = this.stageSize, width = _a.width, height = _a.height;
var _b = this.viewportAnchor, x_1 = _b.x, y = _b.y;
this.transform.position.setXY(width * x_1, height * y);
this.transform.width = width;
this.transform.height = height;
}
};
CameraController.prototype.followTarget = function () {
if (!this.targetPosition) {
return;
}
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;
var newScale = maxScale - length * maxScale / 2048;
scale.setXY(newScale, newScale);
this.followPosition.setXY(width / 2, height / 2).subtract(this.targetPosition);
position.copyFrom(lerpObj(position, this.followPosition, 0.1, Vector2D, ['x', 'y']));
};
return CameraController;
}(ScillaComponent));
var dirtyFieldDetector$2 = dirtyFieldDetector;
var FillMode;
(function (FillMode) {
......@@ -4110,7 +4021,7 @@
FillMode[FillMode["TILED"] = 2] = "TILED";
})(FillMode || (FillMode = {}));
var TextureRenderer = (function (_super) {
__extends$2(TextureRenderer, _super);
__extends(TextureRenderer, _super);
function TextureRenderer() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.fillMode = FillMode.NORMAL;
......@@ -4137,7 +4048,7 @@
var _c = texture.bounds, textureWidth = _c.width, textureHeight = _c.height;
var imageData = context.getImageData(0, 0, textureWidth, textureHeight);
try {
for (var filters_1 = __values$2(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
var filter = filters_1_1.value;
filter.drawFilter(imageData);
}
......@@ -4188,66 +4099,21 @@
}
_super.prototype.measureBounds.call(this);
};
__decorate$2([
__decorate([
dirtyFieldDetector$2
], TextureRenderer.prototype, "texture", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$2
], TextureRenderer.prototype, "fillMode", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$2
], TextureRenderer.prototype, "filters", void 0);
return TextureRenderer;
}(Renderer));
var CameraController = (function (_super) {
__extends$2(CameraController, _super);
function CameraController() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.viewportAnchor = createVector2D();
_this.maxScale = 1.2;
return _this;
}
CameraController.prototype.onCreate = function () {
_super.prototype.onCreate.call(this);
};
CameraController.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
var _a = this, target = _a.target, viewportAnchor = _a.viewportAnchor;
this.stageSize = getStageSize();
if (target) {
this.targetPosition = target.getComponent(Transform).position;
}
this.followPosition = createVector2D();
if (viewportAnchor) {
var _b = this.stageSize, width = _b.width, height = _b.height;
var _c = this.viewportAnchor, x_1 = _c.x, y = _c.y;
this.transform.position.setXY(width * x_1, height * y);
}
};
CameraController.prototype.onUpdate = function (t) {
_super.prototype.onUpdate.call(this, t);
if (!this.targetPosition) {
return;
}
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;
var newScale = maxScale - length * maxScale / 2048;
scale.setXY(newScale, newScale);
this.followPosition.setXY(width / 2, height / 2).subtract(this.targetPosition);
position.copyFrom(lerpObj(position, this.followPosition, 0.1, Vector2D, ['x', 'y']));
};
CameraController.prototype.onSleep = function () {
_super.prototype.onSleep.call(this);
};
CameraController.prototype.onDestroy = function () {
_super.prototype.onDestroy.call(this);
};
return CameraController;
}(ScillaComponent));
var dirtyFieldTrigger$3 = dirtyFieldTrigger;
var InteractComponent = (function (_super) {
__extends$2(InteractComponent, _super);
__extends(InteractComponent, _super);
function InteractComponent() {
var _this = _super.call(this) || this;
_this.interactable = true;
......@@ -4326,7 +4192,7 @@
var result = false;
var renderers = this.entity.getComponents(Renderer);
try {
for (var renderers_1 = __values$2(renderers), renderers_1_1 = renderers_1.next(); !renderers_1_1.done; renderers_1_1 = renderers_1.next()) {
for (var renderers_1 = __values(renderers), renderers_1_1 = renderers_1.next(); !renderers_1_1.done; renderers_1_1 = renderers_1.next()) {
var renderer = renderers_1_1.value;
if (renderer.hitTest(this.localPos.x, this.localPos.y)) {
if (renderer.isUsedToMask) {
......@@ -4351,14 +4217,14 @@
}
return result;
};
__decorate$2([
__decorate([
dirtyFieldTrigger$3
], InteractComponent.prototype, "interactable", void 0);
return InteractComponent;
}(ScillaComponent));
var TouchInterrupt = (function (_super) {
__extends$2(TouchInterrupt, _super);
__extends(TouchInterrupt, _super);
function TouchInterrupt() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.touchInterrupt = true;
......@@ -4368,7 +4234,7 @@
}(InteractComponent));
var TouchZoom = (function (_super) {
__extends$2(TouchZoom, _super);
__extends(TouchZoom, _super);
function TouchZoom() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.scaleOffset = createVector2D(0.1, 0.1);
......@@ -4408,7 +4274,7 @@
}(InteractComponent));
var GraphicRenderer = (function (_super) {
__extends$2(GraphicRenderer, _super);
__extends(GraphicRenderer, _super);
function GraphicRenderer() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.fillColor = '#42bce4';
......@@ -4479,7 +4345,7 @@
var dirtyFieldDetector$3 = dirtyFieldDetector;
var CircleRenderer = (function (_super) {
__extends$2(CircleRenderer, _super);
__extends(CircleRenderer, _super);
function CircleRenderer() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.radius = 50;
......@@ -4511,23 +4377,23 @@
}
_super.prototype.draw.call(this);
};
__decorate$2([
__decorate([
dirtyFieldDetector$3
], CircleRenderer.prototype, "radius", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$3
], CircleRenderer.prototype, "startAngle", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$3
], CircleRenderer.prototype, "endAngle", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$3
], CircleRenderer.prototype, "backToCenter", void 0);
return CircleRenderer;
}(GraphicRenderer));
var FrameAnimationRenderer = (function (_super) {
__extends$2(FrameAnimationRenderer, _super);
__extends(FrameAnimationRenderer, _super);
function FrameAnimationRenderer() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.autoPlay = false;
......@@ -4625,7 +4491,7 @@
}(Renderer));
var LineRenderer = (function (_super) {
__extends$2(LineRenderer, _super);
__extends(LineRenderer, _super);
function LineRenderer() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.x0 = 0;
......@@ -4651,7 +4517,7 @@
var dirtyFieldDetector$4 = dirtyFieldDetector;
var RectRenderer = (function (_super) {
__extends$2(RectRenderer, _super);
__extends(RectRenderer, _super);
function RectRenderer() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.width = 100;
......@@ -4683,13 +4549,13 @@
}
_super.prototype.draw.call(this);
};
__decorate$2([
__decorate([
dirtyFieldDetector$4
], RectRenderer.prototype, "width", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$4
], RectRenderer.prototype, "height", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$4
], RectRenderer.prototype, "cornerRadius", void 0);
return RectRenderer;
......@@ -4709,7 +4575,7 @@
VerticalAlign["BOTTOM"] = "bottom";
})(VerticalAlign || (VerticalAlign = {}));
var TextRenderer = (function (_super) {
__extends$2(TextRenderer, _super);
__extends(TextRenderer, _super);
function TextRenderer() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.text = '';
......@@ -4744,7 +4610,7 @@
var text = '';
if (this.textFlow) {
try {
for (var _b = __values$2(this.textFlow), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = __values(this.textFlow), _c = _b.next(); !_c.done; _c = _b.next()) {
var item = _c.value;
text += item.text;
}
......@@ -4872,7 +4738,7 @@
var targetItem;
var count = 0;
try {
for (var _b = __values$2(this.textFlow), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = __values(this.textFlow), _c = _b.next(); !_c.done; _c = _b.next()) {
var item = _c.value;
count += item.text.length;
if (index < count) {
......@@ -4942,7 +4808,7 @@
else {
var totalWidth = 0, totalHeight = 0;
try {
for (var text_1 = __values$2(text), text_1_1 = text_1.next(); !text_1_1.done; text_1_1 = text_1.next()) {
for (var text_1 = __values(text), text_1_1 = text_1.next(); !text_1_1.done; text_1_1 = text_1.next()) {
var char = text_1_1.value;
var measureResult = this.measureText(char);
totalWidth += measureResult.width;
......@@ -4976,7 +4842,7 @@
}
if (letterSpacing != 0 && text.length > 1 || this.textFlow) {
try {
for (var text_2 = __values$2(text), text_2_1 = text_2.next(); !text_2_1.done; text_2_1 = text_2.next()) {
for (var text_2 = __values(text), text_2_1 = text_2.next(); !text_2_1.done; text_2_1 = text_2.next()) {
var char = text_2_1.value;
this.measureCache[char] = this.measureText(char);
}
......@@ -5002,7 +4868,7 @@
if (isNaN(explicitWidth)) {
var lines = text.split('\n');
try {
for (var lines_1 = __values$2(lines), lines_1_1 = lines_1.next(); !lines_1_1.done; lines_1_1 = lines_1.next()) {
for (var lines_1 = __values(lines), lines_1_1 = lines_1.next(); !lines_1_1.done; lines_1_1 = lines_1.next()) {
var line = lines_1_1.value;
measureResult = this.measureText(line);
var mw = measureResult.width;
......@@ -5104,38 +4970,38 @@
this.splitText();
_super.prototype.measureBounds.call(this);
};
__decorate$2([
__decorate([
dirtyFieldDetector$5
], TextRenderer.prototype, "text", void 0);
__decorate$2([
__decorate([
dirtyFieldTrigger$4
], TextRenderer.prototype, "textFlow", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$5
], TextRenderer.prototype, "textAlign", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$5
], TextRenderer.prototype, "verticalAlign", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$5
], TextRenderer.prototype, "lineSpacing", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$5
], TextRenderer.prototype, "letterSpacing", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$5
], TextRenderer.prototype, "fontRes", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$5
], TextRenderer.prototype, "textStyle", void 0);
__decorate$2([
__decorate([
dirtyFieldDetector$5
], TextRenderer.prototype, "useCacheMode", void 0);
return TextRenderer;
}(GraphicRenderer));
var Button = (function (_super) {
__extends$2(Button, _super);
__extends(Button, _super);
function Button() {
var _this = _super.call(this) || this;
_this.touchInterrupt = true;
......@@ -5212,9 +5078,154 @@
return Button;
}(InteractComponent));
var RelativeLayout = (function (_super) {
__extends(RelativeLayout, _super);
function RelativeLayout() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.left = NaN;
_this.right = NaN;
_this.top = NaN;
_this.bottom = NaN;
_this.horizontalCenter = NaN;
_this.verticalCenter = NaN;
_this.once = true;
_this.adjust = function () {
var e_1, _a, e_2, _b, e_3, _c;
var _d = _this, entity = _d.entity, parent = _d.entity.parent, transform = _d.transform, _e = _d.transform, position = _e.position, _f = _e.pivot, ax = _f.x, ay = _f.y, left = _d.left, right = _d.right, top = _d.top, bottom = _d.bottom, horizontalCenter = _d.horizontalCenter, verticalCenter = _d.verticalCenter;
var hasLeft = !isNaN(left);
var hasRight = !isNaN(right);
var hasTop = !isNaN(top);
var hasBottom = !isNaN(bottom);
var hasHorizontalCenter = !isNaN(horizontalCenter);
var hasVerticalCenter = !isNaN(verticalCenter);
var parentRenderers = parent.getComponents(Renderer);
try {
for (var parentRenderers_1 = __values(parentRenderers), parentRenderers_1_1 = parentRenderers_1.next(); !parentRenderers_1_1.done; parentRenderers_1_1 = parentRenderers_1.next()) {
var parentRenderer = parentRenderers_1_1.value;
parentRenderer.measureBounds();
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (parentRenderers_1_1 && !parentRenderers_1_1.done && (_a = parentRenderers_1.return)) _a.call(parentRenderers_1);
}
finally { if (e_1) throw e_1.error; }
}
var parentTransform = parent.getComponent(Transform);
var pWidth, pHeight;
if (parentRenderers.length > 0) {
var parentBounds = parentRenderers[0].bounds;
pWidth = parentBounds.width;
pHeight = parentBounds.height;
}
else {
pWidth = parentTransform.explicitWidth;
pHeight = parentTransform.explicitHeight;
}
var _g = parentTransform.pivot, pax = _g.x, pay = _g.y;
var renderers = entity.getComponents(Renderer);
try {
for (var renderers_1 = __values(renderers), renderers_1_1 = renderers_1.next(); !renderers_1_1.done; renderers_1_1 = renderers_1.next()) {
var renderer = renderers_1_1.value;
renderer.measureBounds();
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (renderers_1_1 && !renderers_1_1.done && (_b = renderers_1.return)) _b.call(renderers_1);
}
finally { if (e_2) throw e_2.error; }
}
var width = transform.width, height = transform.height;
var x = position.x, y = position.y;
var widthModified = false, heightModified = false;
{
if (hasHorizontalCenter) {
x = (pWidth - width) / 2 - pWidth * pax + width * ax;
}
else if (hasLeft) {
if (hasRight) {
widthModified = true;
width = pWidth - right - left;
x = (left - right) / 2 - (0.5 - ax) * width;
}
else {
x = left - pWidth * pax + width * ax;
}
}
else if (hasRight) {
x = -right + pWidth * (1 - pax) - width * (1 - ax);
}
if (hasVerticalCenter) {
y = (pHeight - height) / 2 - pHeight * pay + height * ay;
}
else if (hasTop) {
if (hasBottom) {
heightModified = true;
height = pHeight - bottom - top;
y = (top - bottom) / 2 - (0.5 - ay) * height;
}
else {
y = top - pHeight * pay + height * ay;
}
}
else if (hasBottom) {
y = -bottom + pHeight * (1 - pay) - height * (1 - ay);
}
}
position.x = x;
position.y = y;
if (widthModified) {
transform.width = width;
}
if (heightModified) {
transform.height = height;
}
if (widthModified || heightModified) {
try {
for (var renderers_2 = __values(renderers), renderers_2_1 = renderers_2.next(); !renderers_2_1.done; renderers_2_1 = renderers_2.next()) {
var renderer = renderers_2_1.value;
renderer.measureBounds();
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (renderers_2_1 && !renderers_2_1.done && (_c = renderers_2.return)) _c.call(renderers_2);
}
finally { if (e_3) throw e_3.error; }
}
}
};
return _this;
}
RelativeLayout.prototype.onCreate = function () {
_super.prototype.onCreate.call(this);
};
RelativeLayout.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
this.adjust();
};
RelativeLayout.prototype.onUpdate = function (t) {
_super.prototype.onUpdate.call(this, t);
if (!this.once) {
this.adjust();
}
};
RelativeLayout.prototype.onSleep = function () {
_super.prototype.onSleep.call(this);
};
RelativeLayout.prototype.onDestroy = function () {
_super.prototype.onDestroy.call(this);
};
return RelativeLayout;
}(ScillaComponent));
var originScale = createVector2D(1, 1);
var BounceZoom = (function (_super) {
__extends$2(BounceZoom, _super);
__extends(BounceZoom, _super);
function BounceZoom() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.targetScale = createVector2D(1.5, 1.5);
......@@ -5234,7 +5245,7 @@
}(ScillaComponent));
var Fade = (function (_super) {
__extends$2(Fade, _super);
__extends(Fade, _super);
function Fade() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.fromAlpha = 0;
......@@ -5266,7 +5277,7 @@
}(ScillaComponent));
var Rotation = (function (_super) {
__extends$2(Rotation, _super);
__extends(Rotation, _super);
function Rotation() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.duration = 10000;
......@@ -5299,7 +5310,7 @@
}(ScillaComponent));
var RoundLoop = (function (_super) {
__extends$2(RoundLoop, _super);
__extends(RoundLoop, _super);
function RoundLoop() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.duration = 10000;
......@@ -5314,7 +5325,7 @@
}(ScillaComponent));
var Swing = (function (_super) {
__extends$2(Swing, _super);
__extends(Swing, _super);
function Swing() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.duration = 10000;
......@@ -5340,7 +5351,7 @@
WaveMethod["breath"] = "breath";
})(WaveMethod || (WaveMethod = {}));
var Wave = (function (_super) {
__extends$2(Wave, _super);
__extends(Wave, _super);
function Wave() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.duration = 1000;
......@@ -5379,7 +5390,7 @@
}
}
var params = waveParams || [];
var props = _waveMethod.apply(void 0, __spread$2(params, [r]));
var props = _waveMethod.apply(void 0, __spread(params, [r]));
if (props.hasOwnProperty('x')) {
position.x = (props.x || 0) + _oldProps.x;
}
......@@ -5453,7 +5464,7 @@
};
var ZoomLoop = (function (_super) {
__extends$2(ZoomLoop, _super);
__extends(ZoomLoop, _super);
function ZoomLoop() {
return _super !== null && _super.apply(this, arguments) || this;
}
......@@ -5465,7 +5476,7 @@
}(ScillaComponent));
var ContentSizeFitter = (function (_super) {
__extends$2(ContentSizeFitter, _super);
__extends(ContentSizeFitter, _super);
function ContentSizeFitter() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._measureSize = new Size();
......@@ -5477,7 +5488,7 @@
var measureSize = this._measureSize;
measureSize.set(0, 0);
try {
for (var _b = __values$2(this.entity.children), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = __values(this.entity.children), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
var transform = child.getComponent(Transform);
if (transform) {
......@@ -5500,157 +5511,12 @@
return ContentSizeFitter;
}(ScillaComponent));
var RelativeLayout = (function (_super) {
__extends$2(RelativeLayout, _super);
function RelativeLayout() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.left = NaN;
_this.right = NaN;
_this.top = NaN;
_this.bottom = NaN;
_this.horizontalCenter = NaN;
_this.verticalCenter = NaN;
_this.once = true;
_this.adjust = function () {
var e_1, _a, e_2, _b, e_3, _c;
var _d = _this, entity = _d.entity, parent = _d.entity.parent, transform = _d.transform, _e = _d.transform, position = _e.position, _f = _e.pivot, ax = _f.x, ay = _f.y, left = _d.left, right = _d.right, top = _d.top, bottom = _d.bottom, horizontalCenter = _d.horizontalCenter, verticalCenter = _d.verticalCenter;
var hasLeft = !isNaN(left);
var hasRight = !isNaN(right);
var hasTop = !isNaN(top);
var hasBottom = !isNaN(bottom);
var hasHorizontalCenter = !isNaN(horizontalCenter);
var hasVerticalCenter = !isNaN(verticalCenter);
var parentRenderers = parent.getComponents(Renderer);
try {
for (var parentRenderers_1 = __values$2(parentRenderers), parentRenderers_1_1 = parentRenderers_1.next(); !parentRenderers_1_1.done; parentRenderers_1_1 = parentRenderers_1.next()) {
var parentRenderer = parentRenderers_1_1.value;
parentRenderer.measureBounds();
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (parentRenderers_1_1 && !parentRenderers_1_1.done && (_a = parentRenderers_1.return)) _a.call(parentRenderers_1);
}
finally { if (e_1) throw e_1.error; }
}
var parentTransform = parent.getComponent(Transform);
var pWidth, pHeight;
if (parentRenderers.length > 0) {
var parentBounds = parentRenderers[0].bounds;
pWidth = parentBounds.width;
pHeight = parentBounds.height;
}
else {
pWidth = parentTransform.explicitWidth;
pHeight = parentTransform.explicitHeight;
}
var _g = parentTransform.pivot, pax = _g.x, pay = _g.y;
var renderers = entity.getComponents(Renderer);
try {
for (var renderers_1 = __values$2(renderers), renderers_1_1 = renderers_1.next(); !renderers_1_1.done; renderers_1_1 = renderers_1.next()) {
var renderer = renderers_1_1.value;
renderer.measureBounds();
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (renderers_1_1 && !renderers_1_1.done && (_b = renderers_1.return)) _b.call(renderers_1);
}
finally { if (e_2) throw e_2.error; }
}
var width = transform.width, height = transform.height;
var x = position.x, y = position.y;
var widthModified = false, heightModified = false;
{
if (hasHorizontalCenter) {
x = (pWidth - width) / 2 - pWidth * pax + width * ax;
}
else if (hasLeft) {
if (hasRight) {
widthModified = true;
width = pWidth - right - left;
x = (left - right) / 2 - (0.5 - ax) * width;
}
else {
x = left - pWidth * pax + width * ax;
}
}
else if (hasRight) {
x = -right + pWidth * (1 - pax) - width * (1 - ax);
}
if (hasVerticalCenter) {
y = (pHeight - height) / 2 - pHeight * pay + height * ay;
}
else if (hasTop) {
if (hasBottom) {
heightModified = true;
height = pHeight - bottom - top;
y = (top - bottom) / 2 - (0.5 - ay) * height;
}
else {
y = top - pHeight * pay + height * ay;
}
}
else if (hasBottom) {
y = -bottom + pHeight * (1 - pay) - height * (1 - ay);
}
}
position.x = x;
position.y = y;
if (widthModified) {
transform.width = width;
}
if (heightModified) {
transform.height = height;
}
if (widthModified || heightModified) {
try {
for (var renderers_2 = __values$2(renderers), renderers_2_1 = renderers_2.next(); !renderers_2_1.done; renderers_2_1 = renderers_2.next()) {
var renderer = renderers_2_1.value;
renderer.measureBounds();
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (renderers_2_1 && !renderers_2_1.done && (_c = renderers_2.return)) _c.call(renderers_2);
}
finally { if (e_3) throw e_3.error; }
}
}
};
return _this;
}
RelativeLayout.prototype.onCreate = function () {
_super.prototype.onCreate.call(this);
};
RelativeLayout.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
this.adjust();
};
RelativeLayout.prototype.onUpdate = function (t) {
_super.prototype.onUpdate.call(this, t);
if (!this.once) {
this.adjust();
}
};
RelativeLayout.prototype.onSleep = function () {
_super.prototype.onSleep.call(this);
};
RelativeLayout.prototype.onDestroy = function () {
_super.prototype.onDestroy.call(this);
};
return RelativeLayout;
}(ScillaComponent));
var dirtyFieldTrigger$5 = dirtyFieldTrigger;
function renderLabelFuncSample(value, maximum, minimum) {
return Math.floor(value / (maximum - minimum) * 100) + '%';
}
var ProgressBar = (function (_super) {
__extends$2(ProgressBar, _super);
__extends(ProgressBar, _super);
function ProgressBar() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.value = 0;
......@@ -5714,22 +5580,22 @@
}
}
};
__decorate$2([
__decorate([
dirtyFieldTrigger$5
], ProgressBar.prototype, "value", void 0);
__decorate$2([
__decorate([
dirtyFieldTrigger$5
], ProgressBar.prototype, "minimum", void 0);
__decorate$2([
__decorate([
dirtyFieldTrigger$5
], ProgressBar.prototype, "maximum", void 0);
__decorate$2([
__decorate([
dirtyFieldTrigger$5
], ProgressBar.prototype, "snapInterval", void 0);
__decorate$2([
__decorate([
dirtyFieldTrigger$5
], ProgressBar.prototype, "renderLabelFunc", void 0);
__decorate$2([
__decorate([
dirtyFieldTrigger$5
], ProgressBar.prototype, "fixWithRange", void 0);
return ProgressBar;
......@@ -5742,7 +5608,7 @@
LockingType[LockingType["VERTICAL"] = 2] = "VERTICAL";
})(LockingType || (LockingType = {}));
var ScrollView = (function (_super) {
__extends$2(ScrollView, _super);
__extends(ScrollView, _super);
function ScrollView() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.lockingType = LockingType.NOSET;
......@@ -5952,11 +5818,12 @@
}(ScillaComponent));
registerDef('components/base/Transform', Transform);
registerDef('components/renderer/TextureRenderer', TextureRenderer);
registerDef('components/other/CameraController', CameraController);
registerDef('components/renderer/TextureRenderer', TextureRenderer);
registerDef('components/animation/TouchZoom', TouchZoom);
registerDef('components/ui/Button', Button);
registerDef('components/renderer/TextRenderer', TextRenderer);
registerDef('components/other/RelativeLayout', RelativeLayout);
registerDef('components/renderer/RectRenderer', RectRenderer);
registerDef('./scripts/MainController', MainController);
registerDef('./scripts/Slider', Slider);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
No preview for this file type
/**
* Created by rockyl on 2019-03-19.
*/
const glob = require('glob');
const fs = require('fs');
let files = glob.sync('src/**/!(index|registerAllComponents).ts');
let fileContent = `import {registerDef} from "scilla-core"
`;
const imports = [];
const contents = [];
for(let file of files){
let requirePath = '.' + file.replace('src', '').replace('.ts', '');
let fullClassName = file.replace('src', 'components').replace('.ts', '');
let shortClassName = fullClassName.substr(fullClassName.lastIndexOf('/') + 1);
imports.push(`import ${shortClassName} from '${requirePath}';`);
contents.push(` registerDef('${fullClassName}', ${shortClassName});`);
}
fileContent += imports.join('\n') + `
export function registerAllComponents(){
` + contents.join('\n') + '\n}';
fs.writeFileSync('src/registerAllComponents.ts', fileContent);
\ No newline at end of file
*.js linguist-language=TypeScript
\ No newline at end of file
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of this License; and
You must cause any modified files to carry prominent notices stating that You changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
# tslib
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
This library is primarily used by the `--importHelpers` flag in TypeScript.
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
```ts
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
exports.x = {};
exports.y = __assign({}, exports.x);
```
will instead be emitted as something like the following:
```ts
var tslib_1 = require("tslib");
exports.x = {};
exports.y = tslib_1.__assign({}, exports.x);
```
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
# Installing
For the latest stable version, run:
## npm
```sh
# TypeScript 2.3.3 or later
npm install --save tslib
# TypeScript 2.3.2 or earlier
npm install --save tslib@1.6.1
```
## bower
```sh
# TypeScript 2.3.3 or later
bower install tslib
# TypeScript 2.3.2 or earlier
bower install tslib@1.6.1
```
## JSPM
```sh
# TypeScript 2.3.3 or later
jspm install tslib
# TypeScript 2.3.2 or earlier
jspm install tslib@1.6.1
```
# Usage
Set the `importHelpers` compiler option on the command line:
```
tsc --importHelpers file.ts
```
or in your tsconfig.json:
```json
{
"compilerOptions": {
"importHelpers": true
}
}
```
#### For bower and JSPM users
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
```json
{
"compilerOptions": {
"module": "amd",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["bower_components/tslib/tslib.d.ts"]
}
}
}
```
For JSPM users:
```json
{
"compilerOptions": {
"module": "system",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["jspm_packages/npm/tslib@1.9.3/tslib.d.ts"]
}
}
}
```
# Contribute
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).
# Documentation
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
* [Programming handbook](http://www.typescriptlang.org/Handbook)
* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)
* [Homepage](http://www.typescriptlang.org/)
{
"name": "tslib",
"authors": [
"Microsoft Corp."
],
"homepage": "http://typescriptlang.org/",
"version": "1.9.3",
"license": "Apache-2.0",
"description": "Runtime library for TypeScript helper functions",
"keywords": [
"TypeScript",
"Microsoft",
"compiler",
"language",
"javascript",
"tslib",
"runtime"
],
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/tslib.git"
},
"main": "tslib.js",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"docs",
"package.json",
".npmignore",
".gitignore",
".gitattributes"
]
}
# The `__generator` helper
The `__generator` helper is a function designed to support TypeScript's down-level emit for
async functions when targeting ES5 and earlier. But how, exactly, does it work?
Here's the body of the `__generator` helper:
```js
__generator = function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t;
return { next: verb(0), "throw": verb(1), "return": verb(2) };
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
```
And here's an example of it in use:
```ts
// source
async function func(x) {
try {
await x;
}
catch (e) {
console.error(e);
}
finally {
console.log("finally");
}
}
// generated
function func(x) {
return __awaiter(this, void 0, void 0, function () {
var e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 1, 3, 4]);
return [4 /*yield*/, x];
case 1:
_a.sent();
return [3 /*break*/, 4];
case 2:
e_1 = _a.sent();
console.error(e_1);
return [3 /*break*/, 4];
case 3:
console.log("finally");
return [7 /*endfinally*/];
case 4: return [2 /*return*/];
}
});
});
}
```
There is a lot going on in this function, so the following will break down what each part of the
`__generator` helper does and how it works.
# Opcodes
The `__generator` helper uses opcodes which represent various operations that are interpreted by
the helper to affect its internal state. The following table lists the various opcodes, their
arguments, and their purpose:
| Opcode | Arguments | Purpose |
|----------------|-----------|--------------------------------------------------------------------------------------------------------------------------------|
| 0 (next) | *value* | Starts the generator, or resumes the generator with *value* as the result of the `AwaitExpression` where execution was paused. |
| 1 (throw) | *value* | Resumes the generator, throwing *value* at `AwaitExpression` where execution was paused. |
| 2 (return) | *value* | Exits the generator, executing any `finally` blocks starting at the `AwaitExpression` where execution was paused. |
| 3 (break) | *label* | Performs an unconditional jump to the specified label, executing any `finally` between the current instruction and the label. |
| 4 (yield) | *value* | Suspends the generator, setting the resume point at the next label and yielding the value. |
| 5 (yieldstar) | *value* | Suspends the generator, setting the resume point at the next label and delegating operations to the supplied value. |
| 6 (catch) | *error* | An internal instruction used to indicate an exception that was thrown from the body of the generator. |
| 7 (endfinally) | | Exits a finally block, resuming any previous operation (such as a break, return, throw, etc.) |
# State
The `_`, `f`, `y`, and `t` variables make up the persistent state of the `__generator` function. Each variable
has a specific purpose, as described in the following sections:
## The `_` variable
The `__generator` helper must share state between its internal `step` orchestration function and
the `body` function passed to the helper.
```ts
var _ = {
label: 0,
sent: function() {
if (t[0] & 1) // NOTE: true for `throw`, but not `next` or `catch`
throw t[1];
return sent[1];
},
trys: [],
ops: []
};
```
The following table describes the members of the `_` state object and their purpose:
| Name | Description |
|---------|---------------------------------------------------------------------------------------------------------------------------|
| `label` | Specifies the next switch case to execute in the `body` function. |
| `sent` | Handles the completion result passed to the generator. |
| `trys` | A stack of **Protected Regions**, which are 4-tuples that describe the labels that make up a `try..catch..finally` block. |
| `ops` | A stack of pending operations used for `try..finally` blocks. |
The `__generator` helper passes this state object to the `body` function for use with switching
between switch cases in the body, handling completions from `AwaitExpression`, etc.
## The `f` variable
The `f` variable indicates whether the generator is currently executing, to prevent re-entry of
the same generator during its execution.
## The `y` variable
The `y` variable stores the iterator passed to a `yieldstar` instruction to which operations should be delegated.
## The `t` variable
The `t` variable is a temporary variable that stores one of the following values:
- The completion value when resuming from a `yield` or `yield*`.
- The error value for a catch block.
- The current **Protected Region**.
- The verb (`next`, `throw`, or `return` method) to delegate to the expression of a `yield*`.
- The result of evaluating the verb delegated to the expression of a `yield*`.
> NOTE: None of the above cases overlap.
# Protected Regions
A **Protected Region** is a region within the `body` function that indicates a
`try..catch..finally` statement. It consists of a 4-tuple that contains 4 labels:
| Offset | Description |
|--------|-----------------------------------------------------------------------------------------|
| 0 | *Required* The label that indicates the beginning of a `try..catch..finally` statement. |
| 1 | *Optional* The label that indicates the beginning of a `catch` clause. |
| 2 | *Optional* The label that indicates the beginning of a `finally` clause. |
| 3 | *Required* The label that indicates the end of the `try..catch..finally` statement. |
# The generator object
The final step of the `__generator` helper is the allocation of an object that implements the
`Generator` protocol, to be used by the `__awaiter` helper:
```ts
return { next: verb(0), "throw": verb(1), "return": verb(2) };
function verb(n) { return function (v) { return step([n, v]); }; }
```
This object translates calls to `next`, `throw`, and `return` to the appropriate Opcodes and
invokes the `step` orchestration function to continue execution. The `throw` and `return` method
names are quoted to better support ES3.
# Orchestration
The `step` function is the main orechestration mechanism for the `__generator` helper. It
interprets opcodes, handles **protected regions**, and communicates results back to the caller.
Here's a closer look at the `step` function:
```ts
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
```
The main body of `step` exists in a `while` loop. This allows us to continually interpret
operations until we have reached some completion value, be it a `return`, `await`, or `throw`.
## Preventing re-entry
The first part of the `step` function is used as a check to prevent re-entry into a currently
executing generator:
```ts
if (f) throw new TypeError("Generator is already executing.");
```
## Running the generator
The main body of the `step` function consists of a `while` loop which continues to evaluate
instructions until the generator exits or is suspended:
```ts
while (_) try ...
```
When the generator has run to completion, the `_` state variable will be cleared, forcing the loop
to exit.
## Evaluating the generator body.
```ts
try {
...
op = body.call(thisArg, _);
}
catch (e) {
op = [6, e];
y = 0;
}
finally {
f = t = 0;
}
```
Depending on the current operation, we re-enter the generator body to start or continue execution.
Here we invoke `body` with `thisArg` as the `this` binding and the `_` state object as the only
argument. The result is a tuple that contains the next Opcode and argument.
If evaluation of the body resulted in an exception, we convert this into an Opcode 6 ("catch")
operation to be handled in the next spin of the `while` loop. We also clear the `y` variable in
case it is set to ensure we are no longer delegating operations as the exception occurred in
user code *outside* of, or at the function boundary of, the delegated iterator (otherwise the
iterator would have handled the exception itself).
After executing user code, we clear the `f` flag that indicates we are executing the generator,
as well as the `t` temporary value so that we don't hold onto values sent to the generator for
longer than necessary.
Inside of the `try..finally` statement are a series of statements that are used to evaluate the
operations of the transformed generator body.
The first thing we do is mark the generator as executing:
```ts
if (f = 1, ...)
```
Despite the fact this expression is part of the head of an `if` statement, the comma operator
causes it to be evaluated and the result thrown out. This is a minification added purely to
reduce the overall footprint of the helper.
## Delegating `yield*`
The first two statements of the `try..finally` statement handle delegation for `yield*`:
```ts
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
```
If the `y` variable is set, and `y` has a `next`, `throw`, or `return` method (depending on the
current operation), we invoke this method and store the return value (an IteratorResult) in `t`.
If `t` indicates it is a yielded value (e.g. `t.done === false`), we return `t` to the caller.
If `t` indicates it is a returned value (e.g. `t.done === true`), we mark the operation with the
`next` Opcode, and the returned value.
If `y` did not have the appropriate method, or `t` was a returned value, we reset `y` to a falsey
value and continue processing the operation.
## Handling operations
The various Opcodes are handled in the following switch statement:
```ts
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
```
The following sections describe the various Opcodes:
### Opcode 0 ("next") and Opcode 1 ("throw")
```ts
case 0: // next
case 1: // throw
t = op;
break;
```
Both Opcode 0 ("next") and Opcode 1 ("throw") have the same behavior. The current operation is
stored in the `t` variable and the `body` function is invoked. The `body` function should call
`_.sent()` which will evaluate the appropriate completion result.
### Opcode 4 ("yield")
```ts
case 4: // yield
_.label++;
return { value: op[1], done: false };
```
When we encounter Opcode 4 ("yield"), we increment the label by one to indicate the point at which
the generator will resume execution. We then return an `IteratorResult` whose `value` is the
yielded value, and `done` is `false`.
### Opcode 5 ("yieldstar")
```ts
case 5: // yieldstar
_.label++;
y = op[1];
op = [0];
continue;
```
When we receive Opcode 5 ("yieldstar"), we increment the label by one to indicate the point at which
the generator will resume execution. We then store the iterator in `op[1]` in the `y` variable, and
set the operation to delegate to Opcode 0 ("next") with no value. Finally, we continue execution at
the top of the loop to start delegation.
### Opcode 7 ("endfinally")
```ts
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
```
Opcode 7 ("endfinally") indicates that we have hit the end of a `finally` clause, and that the last
operation recorded before entering the `finally` block should be evaluated.
### Opcode 2 ("return"), Opcode 3 ("break"), and Opcode 6 ("catch")
```ts
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
if (t[2])
_.ops.pop();
_.trys.pop();
continue;
}
```
The handling for Opcode 2 ("return"), Opcode 3 ("break") and Opcode 6 ("catch") is more
complicated, as we must obey the specified runtime semantics of generators. The first line in this
clause gets the current **Protected Region** if found and stores it in the `t` temp variable:
```ts
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && ...) ...
```
The remainder of this statement, as well as the following by several `if` statements test for more
complex conditions. The first of these is the following:
```ts
if (!(t = ...) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
```
If we encounter an Opcode 6 ("catch") or Opcode 2 ("return"), and we are not in a protected region,
then this operation completes the generator by setting the `_` variable to a falsey value. The
`continue` statement resumes execution at the top of the `while` statement, which will exit the loop
so that we continue execution at the statement following the loop.
```ts
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
_.label = op[1];
break;
}
```
The `if` statement above handles Opcode 3 ("break") when we are either not in a **protected region**, or
are performing an unconditional jump to a label inside of the current **protected region**. In this case
we can unconditionally jump to the specified label.
```ts
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
```
The `if` statement above handles Opcode 6 ("catch") when inside the `try` block of a **protected
region**. In this case we jump to the `catch` block, if present. We replace the value of `t` with
the operation so that the exception can be read as the first statement of the transformed `catch`
clause of the transformed generator body.
```ts
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
```
This `if` statement handles all Opcodes when in a **protected region** with a `finally` clause.
As long as we are not already inside the `finally` clause, we jump to the `finally` clause and
push the pending operation onto the `_.ops` stack. This allows us to resume execution of the
pending operation once we have completed execution of the `finally` clause, as long as it does not
supersede this operation with its own completion value.
```ts
if (t[2])
_.ops.pop();
```
Any other completion value inside of a `finally` clause will supersede the pending completion value
from the `try` or `catch` clauses. The above `if` statement pops the pending completion from the
stack.
```ts
_.trys.pop();
continue;
```
The remaining statements handle the point at which we exit a **protected region**. Here we pop the
current **protected region** from the stack and spin the `while` statement to evaluate the current
operation again in the next **protected region** or at the function boundary.
## Handling a completed generator
Once the generator has completed, the `_` state variable will be falsey. As a result, the `while`
loop will terminate and hand control off to the final statement of the orchestration function,
which deals with how a completed generator is evaluated:
```ts
if (op[0] & 5)
throw op[1];
return { value: op[0] ? op[1] : void 0, done: true };
```
If the caller calls `throw` on the generator it will send Opcode 1 ("throw"). If an exception
is uncaught within the body of the generator, it will send Opcode 6 ("catch"). As the generator has
completed, it throws the exception. Both of these cases are caught by the bitmask `5`, which does
not collide with the only two other valid completion Opcodes.
If the caller calls `next` on the generator, it will send Opcode 0 ("next"). As the generator has
completed, it returns an `IteratorResult` where `value` is `undefined` and `done` is true.
If the caller calls `return` on the generator, it will send Opcode 2 ("return"). As the generator
has completed, it returns an `IteratorResult` where `value` is the value provided to `return`, and
`done` is true.
\ No newline at end of file
{
"_from": "tslib@1.9.3",
"_id": "tslib@1.9.3",
"_inBundle": false,
"_integrity": "sha1-1+TdeSRdhUKMTX5IIqeZF5VMooY=",
"_location": "/scilla-components/tslib",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "tslib@1.9.3",
"name": "tslib",
"escapedName": "tslib",
"rawSpec": "1.9.3",
"saveSpec": null,
"fetchSpec": "1.9.3"
},
"_requiredBy": [
"/scilla-components"
],
"_resolved": "http://npm.dui88.com:80/tslib/-/tslib-1.9.3.tgz",
"_shasum": "d7e4dd79245d85428c4d7e4822a79917954ca286",
"_spec": "tslib@1.9.3",
"_where": "/Users/wanghongyuan/kuwo/node_modules/scilla-components",
"author": {
"name": "Microsoft Corp."
},
"bugs": {
"url": "https://github.com/Microsoft/TypeScript/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Runtime library for TypeScript helper functions",
"homepage": "http://typescriptlang.org/",
"jsnext:main": "tslib.es6.js",
"keywords": [
"TypeScript",
"Microsoft",
"compiler",
"language",
"javascript",
"tslib",
"runtime"
],
"license": "Apache-2.0",
"main": "tslib.js",
"module": "tslib.es6.js",
"name": "tslib",
"repository": {
"type": "git",
"url": "git+https://github.com/Microsoft/tslib.git"
},
"typings": "tslib.d.ts",
"version": "1.9.3"
}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
export declare function __extends(d: Function, b: Function): void;
export declare function __assign(t: any, ...sources: any[]): any;
export declare function __rest(t: any, propertyNames: (string | symbol)[]): any;
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
export declare function __param(paramIndex: number, decorator: Function): Function;
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
export declare function __generator(thisArg: any, body: Function): any;
export declare function __exportStar(m: any, exports: any): void;
export declare function __values(o: any): any;
export declare function __read(o: any, n?: number): any[];
export declare function __spread(...args: any[]): any[];
export declare function __await(v: any): any;
export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any;
export declare function __asyncDelegator(o: any): any;
export declare function __asyncValues(o: any): any;
export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
export declare function __importStar<T>(mod: T): T;
export declare function __importDefault<T>(mod: T): T | { default: T };
<script src="tslib.es6.js"></script>
\ No newline at end of file
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
export function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
export var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
}
return __assign.apply(this, arguments);
}
export function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
return t;
}
export function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
export function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
export function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
export function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
export function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
export function __exportStar(m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
export function __values(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
}
export function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
export function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
export function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
export function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}
export function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}
export function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}
export function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
export function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result.default = mod;
return result;
}
export function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
<script src="tslib.js"></script>
\ No newline at end of file
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global global, define, System, Reflect, Promise */
var __extends;
var __assign;
var __rest;
var __decorate;
var __param;
var __metadata;
var __awaiter;
var __generator;
var __exportStar;
var __values;
var __read;
var __spread;
var __await;
var __asyncGenerator;
var __asyncDelegator;
var __asyncValues;
var __makeTemplateObject;
var __importStar;
var __importDefault;
(function (factory) {
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
if (typeof define === "function" && define.amd) {
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
}
else if (typeof module === "object" && typeof module.exports === "object") {
factory(createExporter(root, createExporter(module.exports)));
}
else {
factory(createExporter(root));
}
function createExporter(exports, previous) {
if (exports !== root) {
if (typeof Object.create === "function") {
Object.defineProperty(exports, "__esModule", { value: true });
}
else {
exports.__esModule = true;
}
}
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
}
})
(function (exporter) {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
__extends = function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
__rest = function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
return t;
};
__decorate = function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
__param = function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
__metadata = function (metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
};
__awaiter = function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
__generator = function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
__exportStar = function (m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
};
__values = function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
};
__read = function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
__spread = function () {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
};
__await = function (v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
};
__asyncGenerator = function (thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
};
__asyncDelegator = function (o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
};
__asyncValues = function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
__makeTemplateObject = function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
__importStar = function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
__importDefault = function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
exporter("__extends", __extends);
exporter("__assign", __assign);
exporter("__rest", __rest);
exporter("__decorate", __decorate);
exporter("__param", __param);
exporter("__metadata", __metadata);
exporter("__awaiter", __awaiter);
exporter("__generator", __generator);
exporter("__exportStar", __exportStar);
exporter("__values", __values);
exporter("__read", __read);
exporter("__spread", __spread);
exporter("__await", __await);
exporter("__asyncGenerator", __asyncGenerator);
exporter("__asyncDelegator", __asyncDelegator);
exporter("__asyncValues", __asyncValues);
exporter("__makeTemplateObject", __makeTemplateObject);
exporter("__importStar", __importStar);
exporter("__importDefault", __importDefault);
});
......@@ -17,7 +17,7 @@
"#USER",
"/"
],
"_resolved": "git+http://gitlab2.dui88.com/laoqifeng/scilla-components.git#1738e61183bc06977f08ae4cf2675916346e9bd2",
"_resolved": "git+http://gitlab2.dui88.com/laoqifeng/scilla-components.git#efdac5b1dec3c0d57a6f792a355b964736ba0712",
"_spec": "git+http://gitlab2.dui88.com/laoqifeng/scilla-components.git",
"_where": "/Users/wanghongyuan/kuwo",
"bundleDependencies": false,
......@@ -26,6 +26,7 @@
},
"deprecated": false,
"devDependencies": {
"glob": "^7.1.3",
"rollup": "^0.66.6",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^3.4.0",
......@@ -35,7 +36,7 @@
"typescript": "^3.1.6"
},
"license": "MIT",
"main": "./dist/bundle.js",
"main": "./dist/index.js",
"name": "scilla-components",
"scripts": {
"build": "rollup -c"
......
......@@ -25,6 +25,6 @@ export default {
useTsconfigDeclarationDir: true,
}),
commonjs(),
uglify({}),
//uglify({}),
]
};
......@@ -30,7 +30,7 @@ export default class Transform extends ScillaComponent {
* 坐标
*/
@dirtyFieldTrigger
position: Vector2D = new Vector2D(0);
position: Vector2D = new Vector2D(0, 0);
/**
* 节点透明度
......
......@@ -7,3 +7,5 @@ export * from './base';
export * from './other';
export * from './renderer';
export * from './ui';
export * from './registerAllComponents'
......@@ -10,13 +10,12 @@ import Transform from "../base/Transform";
* 相机控制组件
*/
export default class CameraController extends ScillaComponent {
viewportAnchor: Vector2D = createVector2D(0.5, 0.5);
target: Entity;
viewportAnchor: Vector2D = createVector2D();
targetPosition: Vector2D;
maxScale = 1.2;
private targetPosition: Vector2D;
private followPosition: Vector2D;
private stageSize;
onCreate() {
......@@ -26,7 +25,7 @@ export default class CameraController extends ScillaComponent {
onAwake() {
super.onAwake();
const {target, viewportAnchor} = this;
const {target,} = this;
this.stageSize = getStageSize();
......@@ -35,16 +34,26 @@ export default class CameraController extends ScillaComponent {
}
this.followPosition = createVector2D();
if (viewportAnchor) {
this.updateViewport();
}
onUpdate(t) {
super.onUpdate(t);
this.followTarget();
}
updateViewport() {
if (this.viewportAnchor) {
const {width, height} = this.stageSize;
const {x, y} = this.viewportAnchor;
this.transform.position.setXY(width * x, height * y);
this.transform.width = width;
this.transform.height = height;
}
}
onUpdate(t) {
super.onUpdate(t);
followTarget() {
if (!this.targetPosition) {
return;
}
......@@ -58,12 +67,4 @@ export default class CameraController extends ScillaComponent {
position.copyFrom(math.lerpObj(position, this.followPosition, 0.1, Vector2D, ['x', 'y']));
}
onSleep() {
super.onSleep();
}
onDestroy() {
super.onDestroy();
}
}
import {registerDef} from "scilla"
import BounceZoom from './animation/BounceZoom';
import Fade from './animation/Fade';
import Rotation from './animation/Rotation';
import RoundLoop from './animation/RoundLoop';
import Swing from './animation/Swing';
import TouchZoom from './animation/TouchZoom';
import Wave from './animation/Wave';
import ZoomLoop from './animation/ZoomLoop';
import InteractComponent from './base/InteractComponent';
import TouchInterrupt from './base/TouchInterrupt';
import Transform from './base/Transform';
import CameraController from './other/CameraController';
import ContentSizeFitter from './other/ContentSizeFitter';
import RelativeLayout from './other/RelativeLayout';
import CircleRenderer from './renderer/CircleRenderer';
import FrameAnimationRenderer from './renderer/FrameAnimationRenderer';
import GraphicRenderer from './renderer/GraphicRenderer';
import LineRenderer from './renderer/LineRenderer';
import RectRenderer from './renderer/RectRenderer';
import Renderer from './renderer/Renderer';
import TextRenderer from './renderer/TextRenderer';
import TextureRenderer from './renderer/TextureRenderer';
import Button from './ui/Button';
import ProgressBar from './ui/ProgressBar';
import ScrollView from './ui/ScrollView';
export function registerAllComponents(){
registerDef('components/animation/BounceZoom', BounceZoom);
registerDef('components/animation/Fade', Fade);
registerDef('components/animation/Rotation', Rotation);
registerDef('components/animation/RoundLoop', RoundLoop);
registerDef('components/animation/Swing', Swing);
registerDef('components/animation/TouchZoom', TouchZoom);
registerDef('components/animation/Wave', Wave);
registerDef('components/animation/ZoomLoop', ZoomLoop);
registerDef('components/base/InteractComponent', InteractComponent);
registerDef('components/base/TouchInterrupt', TouchInterrupt);
registerDef('components/base/Transform', Transform);
registerDef('components/other/CameraController', CameraController);
registerDef('components/other/ContentSizeFitter', ContentSizeFitter);
registerDef('components/other/RelativeLayout', RelativeLayout);
registerDef('components/renderer/CircleRenderer', CircleRenderer);
registerDef('components/renderer/FrameAnimationRenderer', FrameAnimationRenderer);
registerDef('components/renderer/GraphicRenderer', GraphicRenderer);
registerDef('components/renderer/LineRenderer', LineRenderer);
registerDef('components/renderer/RectRenderer', RectRenderer);
registerDef('components/renderer/Renderer', Renderer);
registerDef('components/renderer/TextRenderer', TextRenderer);
registerDef('components/renderer/TextureRenderer', TextureRenderer);
registerDef('components/ui/Button', Button);
registerDef('components/ui/ProgressBar', ProgressBar);
registerDef('components/ui/ScrollView', ScrollView);
}
\ No newline at end of file
......@@ -5,7 +5,7 @@
*/
import Renderer from "./Renderer";
import {color} from 'scilla';
import {color} from "scilla";
/**
* 图形渲染组件
......
......@@ -3,7 +3,7 @@
*/
import GraphicRenderer from "./GraphicRenderer";
import {decorators} from 'scilla'
import {decorators} from "scilla"
const {dirtyFieldDetector} = decorators;
......
{
"compilerOptions": {
"target": "es5",
"outDir": "dist",
"experimentalDecorators": true,
"sourceMap": true,
"declarationDir": "./types",
"declarationDir": "types",
"declaration": true,
"lib": [
"es5",
......@@ -13,11 +14,10 @@
],
"baseUrl": "./",
"paths": {
"scilla": ["node_modules/scilla/src"]
"scilla": ["node_modules/scilla-core/src"]
}
},
"include": [
"src",
"libs"
"src"
]
}
\ No newline at end of file
......@@ -52,6 +52,19 @@ array-unique@^0.2.1:
resolved "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=
balanced-match@^1.0.0:
version "1.0.0"
resolved "http://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
brace-expansion@^1.1.7:
version "1.1.11"
resolved "http://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
integrity sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
braces@^1.8.2:
version "1.8.5"
resolved "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
......@@ -92,6 +105,11 @@ commander@~2.17.1:
resolved "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==
concat-map@0.0.1:
version "0.0.1"
resolved "http://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
......@@ -170,6 +188,11 @@ fs-extra@7.0.0:
jsonfile "^4.0.0"
universalify "^0.1.0"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "http://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
glob-base@^0.3.0:
version "0.3.0"
resolved "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
......@@ -185,6 +208,18 @@ glob-parent@^2.0.0:
dependencies:
is-glob "^2.0.0"
glob@^7.1.3:
version "7.1.3"
resolved "http://registry.npm.taobao.org/glob/download/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
integrity sha1-OWCDLT8VdBCDQtr9OmezMsCWnfE=
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
graceful-fs@^4.1.2, graceful-fs@^4.1.6:
version "4.1.15"
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
......@@ -195,7 +230,15 @@ has-flag@^3.0.0:
resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
inherits@~2.0.3:
inflight@^1.0.4:
version "1.0.6"
resolved "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2, inherits@~2.0.3:
version "2.0.3"
resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
......@@ -342,6 +385,13 @@ micromatch@^2.3.11:
parse-glob "^3.0.4"
regex-cache "^0.4.2"
minimatch@^3.0.4:
version "3.0.4"
resolved "http://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=
dependencies:
brace-expansion "^1.1.7"
normalize-path@^2.0.1:
version "2.1.1"
resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
......@@ -357,6 +407,13 @@ object.omit@^2.0.0:
for-own "^0.1.4"
is-extendable "^0.1.1"
once@^1.3.0:
version "1.4.0"
resolved "http://registry.npm.taobao.org/once/download/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
dependencies:
wrappy "1"
parse-glob@^3.0.4:
version "3.0.4"
resolved "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
......@@ -367,6 +424,11 @@ parse-glob@^3.0.4:
is-extglob "^1.0.0"
is-glob "^2.0.0"
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "http://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
path-parse@^1.0.5, path-parse@^1.0.6:
version "1.0.6"
resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
......@@ -556,3 +618,8 @@ util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
wrappy@1:
version "1.0.2"
resolved "http://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
*.js linguist-language=TypeScript
\ No newline at end of file
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of this License; and
You must cause any modified files to carry prominent notices stating that You changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
# tslib
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
This library is primarily used by the `--importHelpers` flag in TypeScript.
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
```ts
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
exports.x = {};
exports.y = __assign({}, exports.x);
```
will instead be emitted as something like the following:
```ts
var tslib_1 = require("tslib");
exports.x = {};
exports.y = tslib_1.__assign({}, exports.x);
```
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
# Installing
For the latest stable version, run:
## npm
```sh
# TypeScript 2.3.3 or later
npm install --save tslib
# TypeScript 2.3.2 or earlier
npm install --save tslib@1.6.1
```
## bower
```sh
# TypeScript 2.3.3 or later
bower install tslib
# TypeScript 2.3.2 or earlier
bower install tslib@1.6.1
```
## JSPM
```sh
# TypeScript 2.3.3 or later
jspm install tslib
# TypeScript 2.3.2 or earlier
jspm install tslib@1.6.1
```
# Usage
Set the `importHelpers` compiler option on the command line:
```
tsc --importHelpers file.ts
```
or in your tsconfig.json:
```json
{
"compilerOptions": {
"importHelpers": true
}
}
```
#### For bower and JSPM users
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
```json
{
"compilerOptions": {
"module": "amd",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["bower_components/tslib/tslib.d.ts"]
}
}
}
```
For JSPM users:
```json
{
"compilerOptions": {
"module": "system",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["jspm_packages/npm/tslib@1.9.3/tslib.d.ts"]
}
}
}
```
# Contribute
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).
# Documentation
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
* [Programming handbook](http://www.typescriptlang.org/Handbook)
* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)
* [Homepage](http://www.typescriptlang.org/)
{
"name": "tslib",
"authors": [
"Microsoft Corp."
],
"homepage": "http://typescriptlang.org/",
"version": "1.9.3",
"license": "Apache-2.0",
"description": "Runtime library for TypeScript helper functions",
"keywords": [
"TypeScript",
"Microsoft",
"compiler",
"language",
"javascript",
"tslib",
"runtime"
],
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/tslib.git"
},
"main": "tslib.js",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"docs",
"package.json",
".npmignore",
".gitignore",
".gitattributes"
]
}
# The `__generator` helper
The `__generator` helper is a function designed to support TypeScript's down-level emit for
async functions when targeting ES5 and earlier. But how, exactly, does it work?
Here's the body of the `__generator` helper:
```js
__generator = function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t;
return { next: verb(0), "throw": verb(1), "return": verb(2) };
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
```
And here's an example of it in use:
```ts
// source
async function func(x) {
try {
await x;
}
catch (e) {
console.error(e);
}
finally {
console.log("finally");
}
}
// generated
function func(x) {
return __awaiter(this, void 0, void 0, function () {
var e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 1, 3, 4]);
return [4 /*yield*/, x];
case 1:
_a.sent();
return [3 /*break*/, 4];
case 2:
e_1 = _a.sent();
console.error(e_1);
return [3 /*break*/, 4];
case 3:
console.log("finally");
return [7 /*endfinally*/];
case 4: return [2 /*return*/];
}
});
});
}
```
There is a lot going on in this function, so the following will break down what each part of the
`__generator` helper does and how it works.
# Opcodes
The `__generator` helper uses opcodes which represent various operations that are interpreted by
the helper to affect its internal state. The following table lists the various opcodes, their
arguments, and their purpose:
| Opcode | Arguments | Purpose |
|----------------|-----------|--------------------------------------------------------------------------------------------------------------------------------|
| 0 (next) | *value* | Starts the generator, or resumes the generator with *value* as the result of the `AwaitExpression` where execution was paused. |
| 1 (throw) | *value* | Resumes the generator, throwing *value* at `AwaitExpression` where execution was paused. |
| 2 (return) | *value* | Exits the generator, executing any `finally` blocks starting at the `AwaitExpression` where execution was paused. |
| 3 (break) | *label* | Performs an unconditional jump to the specified label, executing any `finally` between the current instruction and the label. |
| 4 (yield) | *value* | Suspends the generator, setting the resume point at the next label and yielding the value. |
| 5 (yieldstar) | *value* | Suspends the generator, setting the resume point at the next label and delegating operations to the supplied value. |
| 6 (catch) | *error* | An internal instruction used to indicate an exception that was thrown from the body of the generator. |
| 7 (endfinally) | | Exits a finally block, resuming any previous operation (such as a break, return, throw, etc.) |
# State
The `_`, `f`, `y`, and `t` variables make up the persistent state of the `__generator` function. Each variable
has a specific purpose, as described in the following sections:
## The `_` variable
The `__generator` helper must share state between its internal `step` orchestration function and
the `body` function passed to the helper.
```ts
var _ = {
label: 0,
sent: function() {
if (t[0] & 1) // NOTE: true for `throw`, but not `next` or `catch`
throw t[1];
return sent[1];
},
trys: [],
ops: []
};
```
The following table describes the members of the `_` state object and their purpose:
| Name | Description |
|---------|---------------------------------------------------------------------------------------------------------------------------|
| `label` | Specifies the next switch case to execute in the `body` function. |
| `sent` | Handles the completion result passed to the generator. |
| `trys` | A stack of **Protected Regions**, which are 4-tuples that describe the labels that make up a `try..catch..finally` block. |
| `ops` | A stack of pending operations used for `try..finally` blocks. |
The `__generator` helper passes this state object to the `body` function for use with switching
between switch cases in the body, handling completions from `AwaitExpression`, etc.
## The `f` variable
The `f` variable indicates whether the generator is currently executing, to prevent re-entry of
the same generator during its execution.
## The `y` variable
The `y` variable stores the iterator passed to a `yieldstar` instruction to which operations should be delegated.
## The `t` variable
The `t` variable is a temporary variable that stores one of the following values:
- The completion value when resuming from a `yield` or `yield*`.
- The error value for a catch block.
- The current **Protected Region**.
- The verb (`next`, `throw`, or `return` method) to delegate to the expression of a `yield*`.
- The result of evaluating the verb delegated to the expression of a `yield*`.
> NOTE: None of the above cases overlap.
# Protected Regions
A **Protected Region** is a region within the `body` function that indicates a
`try..catch..finally` statement. It consists of a 4-tuple that contains 4 labels:
| Offset | Description |
|--------|-----------------------------------------------------------------------------------------|
| 0 | *Required* The label that indicates the beginning of a `try..catch..finally` statement. |
| 1 | *Optional* The label that indicates the beginning of a `catch` clause. |
| 2 | *Optional* The label that indicates the beginning of a `finally` clause. |
| 3 | *Required* The label that indicates the end of the `try..catch..finally` statement. |
# The generator object
The final step of the `__generator` helper is the allocation of an object that implements the
`Generator` protocol, to be used by the `__awaiter` helper:
```ts
return { next: verb(0), "throw": verb(1), "return": verb(2) };
function verb(n) { return function (v) { return step([n, v]); }; }
```
This object translates calls to `next`, `throw`, and `return` to the appropriate Opcodes and
invokes the `step` orchestration function to continue execution. The `throw` and `return` method
names are quoted to better support ES3.
# Orchestration
The `step` function is the main orechestration mechanism for the `__generator` helper. It
interprets opcodes, handles **protected regions**, and communicates results back to the caller.
Here's a closer look at the `step` function:
```ts
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
```
The main body of `step` exists in a `while` loop. This allows us to continually interpret
operations until we have reached some completion value, be it a `return`, `await`, or `throw`.
## Preventing re-entry
The first part of the `step` function is used as a check to prevent re-entry into a currently
executing generator:
```ts
if (f) throw new TypeError("Generator is already executing.");
```
## Running the generator
The main body of the `step` function consists of a `while` loop which continues to evaluate
instructions until the generator exits or is suspended:
```ts
while (_) try ...
```
When the generator has run to completion, the `_` state variable will be cleared, forcing the loop
to exit.
## Evaluating the generator body.
```ts
try {
...
op = body.call(thisArg, _);
}
catch (e) {
op = [6, e];
y = 0;
}
finally {
f = t = 0;
}
```
Depending on the current operation, we re-enter the generator body to start or continue execution.
Here we invoke `body` with `thisArg` as the `this` binding and the `_` state object as the only
argument. The result is a tuple that contains the next Opcode and argument.
If evaluation of the body resulted in an exception, we convert this into an Opcode 6 ("catch")
operation to be handled in the next spin of the `while` loop. We also clear the `y` variable in
case it is set to ensure we are no longer delegating operations as the exception occurred in
user code *outside* of, or at the function boundary of, the delegated iterator (otherwise the
iterator would have handled the exception itself).
After executing user code, we clear the `f` flag that indicates we are executing the generator,
as well as the `t` temporary value so that we don't hold onto values sent to the generator for
longer than necessary.
Inside of the `try..finally` statement are a series of statements that are used to evaluate the
operations of the transformed generator body.
The first thing we do is mark the generator as executing:
```ts
if (f = 1, ...)
```
Despite the fact this expression is part of the head of an `if` statement, the comma operator
causes it to be evaluated and the result thrown out. This is a minification added purely to
reduce the overall footprint of the helper.
## Delegating `yield*`
The first two statements of the `try..finally` statement handle delegation for `yield*`:
```ts
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
```
If the `y` variable is set, and `y` has a `next`, `throw`, or `return` method (depending on the
current operation), we invoke this method and store the return value (an IteratorResult) in `t`.
If `t` indicates it is a yielded value (e.g. `t.done === false`), we return `t` to the caller.
If `t` indicates it is a returned value (e.g. `t.done === true`), we mark the operation with the
`next` Opcode, and the returned value.
If `y` did not have the appropriate method, or `t` was a returned value, we reset `y` to a falsey
value and continue processing the operation.
## Handling operations
The various Opcodes are handled in the following switch statement:
```ts
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
```
The following sections describe the various Opcodes:
### Opcode 0 ("next") and Opcode 1 ("throw")
```ts
case 0: // next
case 1: // throw
t = op;
break;
```
Both Opcode 0 ("next") and Opcode 1 ("throw") have the same behavior. The current operation is
stored in the `t` variable and the `body` function is invoked. The `body` function should call
`_.sent()` which will evaluate the appropriate completion result.
### Opcode 4 ("yield")
```ts
case 4: // yield
_.label++;
return { value: op[1], done: false };
```
When we encounter Opcode 4 ("yield"), we increment the label by one to indicate the point at which
the generator will resume execution. We then return an `IteratorResult` whose `value` is the
yielded value, and `done` is `false`.
### Opcode 5 ("yieldstar")
```ts
case 5: // yieldstar
_.label++;
y = op[1];
op = [0];
continue;
```
When we receive Opcode 5 ("yieldstar"), we increment the label by one to indicate the point at which
the generator will resume execution. We then store the iterator in `op[1]` in the `y` variable, and
set the operation to delegate to Opcode 0 ("next") with no value. Finally, we continue execution at
the top of the loop to start delegation.
### Opcode 7 ("endfinally")
```ts
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
```
Opcode 7 ("endfinally") indicates that we have hit the end of a `finally` clause, and that the last
operation recorded before entering the `finally` block should be evaluated.
### Opcode 2 ("return"), Opcode 3 ("break"), and Opcode 6 ("catch")
```ts
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
if (t[2])
_.ops.pop();
_.trys.pop();
continue;
}
```
The handling for Opcode 2 ("return"), Opcode 3 ("break") and Opcode 6 ("catch") is more
complicated, as we must obey the specified runtime semantics of generators. The first line in this
clause gets the current **Protected Region** if found and stores it in the `t` temp variable:
```ts
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && ...) ...
```
The remainder of this statement, as well as the following by several `if` statements test for more
complex conditions. The first of these is the following:
```ts
if (!(t = ...) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
```
If we encounter an Opcode 6 ("catch") or Opcode 2 ("return"), and we are not in a protected region,
then this operation completes the generator by setting the `_` variable to a falsey value. The
`continue` statement resumes execution at the top of the `while` statement, which will exit the loop
so that we continue execution at the statement following the loop.
```ts
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
_.label = op[1];
break;
}
```
The `if` statement above handles Opcode 3 ("break") when we are either not in a **protected region**, or
are performing an unconditional jump to a label inside of the current **protected region**. In this case
we can unconditionally jump to the specified label.
```ts
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
```
The `if` statement above handles Opcode 6 ("catch") when inside the `try` block of a **protected
region**. In this case we jump to the `catch` block, if present. We replace the value of `t` with
the operation so that the exception can be read as the first statement of the transformed `catch`
clause of the transformed generator body.
```ts
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
```
This `if` statement handles all Opcodes when in a **protected region** with a `finally` clause.
As long as we are not already inside the `finally` clause, we jump to the `finally` clause and
push the pending operation onto the `_.ops` stack. This allows us to resume execution of the
pending operation once we have completed execution of the `finally` clause, as long as it does not
supersede this operation with its own completion value.
```ts
if (t[2])
_.ops.pop();
```
Any other completion value inside of a `finally` clause will supersede the pending completion value
from the `try` or `catch` clauses. The above `if` statement pops the pending completion from the
stack.
```ts
_.trys.pop();
continue;
```
The remaining statements handle the point at which we exit a **protected region**. Here we pop the
current **protected region** from the stack and spin the `while` statement to evaluate the current
operation again in the next **protected region** or at the function boundary.
## Handling a completed generator
Once the generator has completed, the `_` state variable will be falsey. As a result, the `while`
loop will terminate and hand control off to the final statement of the orchestration function,
which deals with how a completed generator is evaluated:
```ts
if (op[0] & 5)
throw op[1];
return { value: op[0] ? op[1] : void 0, done: true };
```
If the caller calls `throw` on the generator it will send Opcode 1 ("throw"). If an exception
is uncaught within the body of the generator, it will send Opcode 6 ("catch"). As the generator has
completed, it throws the exception. Both of these cases are caught by the bitmask `5`, which does
not collide with the only two other valid completion Opcodes.
If the caller calls `next` on the generator, it will send Opcode 0 ("next"). As the generator has
completed, it returns an `IteratorResult` where `value` is `undefined` and `done` is true.
If the caller calls `return` on the generator, it will send Opcode 2 ("return"). As the generator
has completed, it returns an `IteratorResult` where `value` is the value provided to `return`, and
`done` is true.
\ No newline at end of file
{
"_from": "tslib@^1.9.3",
"_id": "tslib@1.9.3",
"_inBundle": false,
"_integrity": "sha1-1+TdeSRdhUKMTX5IIqeZF5VMooY=",
"_location": "/scilla-core/tslib",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "tslib@^1.9.3",
"name": "tslib",
"escapedName": "tslib",
"rawSpec": "^1.9.3",
"saveSpec": null,
"fetchSpec": "^1.9.3"
},
"_requiredBy": [
"/scilla-core"
],
"_resolved": "http://npm.dui88.com:80/tslib/-/tslib-1.9.3.tgz",
"_shasum": "d7e4dd79245d85428c4d7e4822a79917954ca286",
"_spec": "tslib@^1.9.3",
"_where": "/Users/wanghongyuan/kuwo/node_modules/scilla-core",
"author": {
"name": "Microsoft Corp."
},
"bugs": {
"url": "https://github.com/Microsoft/TypeScript/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Runtime library for TypeScript helper functions",
"homepage": "http://typescriptlang.org/",
"jsnext:main": "tslib.es6.js",
"keywords": [
"TypeScript",
"Microsoft",
"compiler",
"language",
"javascript",
"tslib",
"runtime"
],
"license": "Apache-2.0",
"main": "tslib.js",
"module": "tslib.es6.js",
"name": "tslib",
"repository": {
"type": "git",
"url": "git+https://github.com/Microsoft/tslib.git"
},
"typings": "tslib.d.ts",
"version": "1.9.3"
}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
export declare function __extends(d: Function, b: Function): void;
export declare function __assign(t: any, ...sources: any[]): any;
export declare function __rest(t: any, propertyNames: (string | symbol)[]): any;
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
export declare function __param(paramIndex: number, decorator: Function): Function;
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
export declare function __generator(thisArg: any, body: Function): any;
export declare function __exportStar(m: any, exports: any): void;
export declare function __values(o: any): any;
export declare function __read(o: any, n?: number): any[];
export declare function __spread(...args: any[]): any[];
export declare function __await(v: any): any;
export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any;
export declare function __asyncDelegator(o: any): any;
export declare function __asyncValues(o: any): any;
export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
export declare function __importStar<T>(mod: T): T;
export declare function __importDefault<T>(mod: T): T | { default: T };
<script src="tslib.es6.js"></script>
\ No newline at end of file
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
export function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
export var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
}
return __assign.apply(this, arguments);
}
export function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
return t;
}
export function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
export function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
export function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
export function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
export function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
export function __exportStar(m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
export function __values(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
}
export function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
export function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
export function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
export function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}
export function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}
export function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}
export function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
export function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result.default = mod;
return result;
}
export function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
<script src="tslib.js"></script>
\ No newline at end of file
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global global, define, System, Reflect, Promise */
var __extends;
var __assign;
var __rest;
var __decorate;
var __param;
var __metadata;
var __awaiter;
var __generator;
var __exportStar;
var __values;
var __read;
var __spread;
var __await;
var __asyncGenerator;
var __asyncDelegator;
var __asyncValues;
var __makeTemplateObject;
var __importStar;
var __importDefault;
(function (factory) {
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
if (typeof define === "function" && define.amd) {
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
}
else if (typeof module === "object" && typeof module.exports === "object") {
factory(createExporter(root, createExporter(module.exports)));
}
else {
factory(createExporter(root));
}
function createExporter(exports, previous) {
if (exports !== root) {
if (typeof Object.create === "function") {
Object.defineProperty(exports, "__esModule", { value: true });
}
else {
exports.__esModule = true;
}
}
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
}
})
(function (exporter) {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
__extends = function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
__rest = function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
return t;
};
__decorate = function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
__param = function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
__metadata = function (metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
};
__awaiter = function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
__generator = function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
__exportStar = function (m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
};
__values = function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
};
__read = function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
__spread = function () {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
};
__await = function (v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
};
__asyncGenerator = function (thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
};
__asyncDelegator = function (o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
};
__asyncValues = function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
__makeTemplateObject = function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
__importStar = function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
__importDefault = function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
exporter("__extends", __extends);
exporter("__assign", __assign);
exporter("__rest", __rest);
exporter("__decorate", __decorate);
exporter("__param", __param);
exporter("__metadata", __metadata);
exporter("__awaiter", __awaiter);
exporter("__generator", __generator);
exporter("__exportStar", __exportStar);
exporter("__values", __values);
exporter("__read", __read);
exporter("__spread", __spread);
exporter("__await", __await);
exporter("__asyncGenerator", __asyncGenerator);
exporter("__asyncDelegator", __asyncDelegator);
exporter("__asyncValues", __asyncValues);
exporter("__makeTemplateObject", __makeTemplateObject);
exporter("__importStar", __importStar);
exporter("__importDefault", __importDefault);
});
......@@ -17,7 +17,7 @@
"#USER",
"/"
],
"_resolved": "git+http://gitlab2.dui88.com/laoqifeng/scilla-core.git#5424a3f331ffa8d9ec018ba8d706b0ffa45af806",
"_resolved": "git+http://gitlab2.dui88.com/laoqifeng/scilla-core.git#ac856bdf0b99e69d76d211f6df48de94d4a62010",
"_spec": "git+http://gitlab2.dui88.com/laoqifeng/scilla-core.git",
"_where": "/Users/wanghongyuan/kuwo",
"bundleDependencies": false,
......@@ -35,7 +35,7 @@
"typescript": "^3.1.6"
},
"license": "MIT",
"main": "./dist/bundle.js",
"main": "./dist/index.js",
"name": "scilla-core",
"scripts": {
"build": "rollup -c"
......
......@@ -25,6 +25,6 @@ export default {
useTsconfigDeclarationDir: true,
}),
commonjs(),
uglify({}),
//uglify({}),
]
};
......@@ -102,9 +102,6 @@ export class ScillaComponent extends HashObject {
private invokeDelayCallback(t){
const removed = [];
if(this.entity.name.indexOf('progress') >= 0){
console.log();
}
for (let i = 0, li = this.delayCallbacks.length; i < li; i++) {
let {callback, once} = this.delayCallbacks[i];
if(once){
......
......@@ -2,7 +2,7 @@
* Created by rockyl on 2018-12-04.
*/
import {destroyScene, setupScene, } from "./interpreter";
import {cleanEntity, setupScene, } from "./interpreter";
import {addLoader, cacheRes, destroyRes, getAllResUuids, loadJson5} from "../assets-manager";
import {getRoot, pause, Scene, start} from "../core";
......@@ -49,7 +49,7 @@ export function mountScene(scene){
*/
export function unmountScene(scene){
pause();
destroyScene(scene);
cleanEntity(scene.root);
destroyRes(resUUIDs);
}
......
......@@ -38,13 +38,12 @@ export function setupScene(scene: Scene, root: Entity): Scene {
}
/**
* 销毁场景
* @param scene
* 清空实体
* @param entity
*/
export function destroyScene(scene: Scene) {
const root = scene.root;
root.removeAllComponents();
root.removeChildren();
export function cleanEntity(entity: Entity) {
entity.removeAllComponents();
entity.removeChildren();
}
/**
......@@ -187,22 +186,27 @@ function injectComponents(entity: Entity, config: any, pid?) {
const components = entity.components;
for (let i = 0, li = config.components.length; i < li; i++) {
const component = config.components[i];
const {properties} = component;
if (properties) {
injectProperties(components[i], properties, pid);
}
injectComponentProperties(components[i], component, pid);
}
}
}
export function injectComponentProperties(component, config, pid?){
const {properties} = config;
if (properties) {
injectProperties(component, properties, pid);
}
}
/**
* 实例化组件
* @param entity
* @param config
*/
function instantiateComponent(entity: Entity, config: any) {
const {script, properties} = config;
export function instantiateComponent(entity: Entity, config: any) {
const {script, } = config;
let def = getDefByName(script);
......@@ -214,6 +218,7 @@ function instantiateComponent(entity: Entity, config: any) {
entity.addComponent(instance);
return instance;
}
/**
......
{
"compilerOptions": {
"target": "es5",
"outDir": "dist",
"experimentalDecorators": true,
"sourceMap": true,
"declarationDir": "./types",
"declarationDir": "types",
"declaration": true,
"lib": [
"es5",
......@@ -13,7 +14,6 @@
]
},
"include": [
"src",
"libs"
"src"
]
}
\ No newline at end of file
......@@ -5,31 +5,17 @@
"requires": true,
"dependencies": {
"scilla-components": {
"version": "git+http://gitlab2.dui88.com/laoqifeng/scilla-components.git#1738e61183bc06977f08ae4cf2675916346e9bd2",
"version": "git+http://gitlab2.dui88.com/laoqifeng/scilla-components.git#efdac5b1dec3c0d57a6f792a355b964736ba0712",
"from": "git+http://gitlab2.dui88.com/laoqifeng/scilla-components.git",
"requires": {
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.9.3",
"resolved": "http://npm.dui88.com:80/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha1-1+TdeSRdhUKMTX5IIqeZF5VMooY="
}
}
},
"scilla-core": {
"version": "git+http://gitlab2.dui88.com/laoqifeng/scilla-core.git#5424a3f331ffa8d9ec018ba8d706b0ffa45af806",
"version": "git+http://gitlab2.dui88.com/laoqifeng/scilla-core.git#ac856bdf0b99e69d76d211f6df48de94d4a62010",
"from": "git+http://gitlab2.dui88.com/laoqifeng/scilla-core.git",
"requires": {
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.9.3",
"resolved": "http://npm.dui88.com:80/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha1-1+TdeSRdhUKMTX5IIqeZF5VMooY="
}
}
},
"tslib": {
......
......@@ -8,11 +8,11 @@ import {registerDef} from 'scilla'
import component0 from 'components/base/Transform';
registerDef('components/base/Transform', component0);
import component1 from 'components/renderer/TextureRenderer';
registerDef('components/renderer/TextureRenderer', component1);
import component1 from 'components/other/CameraController';
registerDef('components/other/CameraController', component1);
import component2 from 'components/other/CameraController';
registerDef('components/other/CameraController', component2);
import component2 from 'components/renderer/TextureRenderer';
registerDef('components/renderer/TextureRenderer', component2);
import component3 from 'components/animation/TouchZoom';
registerDef('components/animation/TouchZoom', component3);
......@@ -23,11 +23,14 @@ registerDef('components/ui/Button', component4);
import component5 from 'components/renderer/TextRenderer';
registerDef('components/renderer/TextRenderer', component5);
import component6 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component6);
import component6 from 'components/other/RelativeLayout';
registerDef('components/other/RelativeLayout', component6);
import component7 from '../../assets/scripts/MainController';
registerDef('./scripts/MainController', component7);
import component7 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component7);
import component8 from '../../assets/scripts/Slider';
registerDef('./scripts/Slider', component8);
import component8 from '../../assets/scripts/MainController';
registerDef('./scripts/MainController', component8);
import component9 from '../../assets/scripts/Slider';
registerDef('./scripts/Slider', component9);
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