Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

phaser-ui-comps

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phaser-ui-comps - npm Package Compare versions

Comparing version 1.0.14 to 1.1.0

0

dist/phaser-ui-comps.min.js
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("phaser")):"function"==typeof define&&define.amd?define(["phaser"],e):"object"==typeof exports?exports.PhaserComps=e(require("phaser")):t.PhaserComps=e(t.Phaser)}(window,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(2);var i,o=n(1);(i=o)&&i.__esModule;var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r._lockId=null,r._parent=t,r._key=n,r._clip=null,r._texts={},n&&t&&t.on("event_state",r._onEventState,r),r._clipUpdate(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Phaser.Events.EventEmitter),r(e,null,[{key:"EVENT_STATE",get:function(){return"event_state"}}]),r(e,[{key:"appendClip",value:function(t){this._clip!==t&&(null!==this._clip&&this.removeClip(),this._clip=t,this._clip&&this.onClipAppend(this._clip),this._clipProcess())}},{key:"onClipAppend",value:function(t){}},{key:"removeClip",value:function(){this.onClipRemove(this._clip),this._clip=null}},{key:"onClipRemove",value:function(t){}},{key:"doState",value:function(){var t=this.getStateId();this._setupState(t)}},{key:"getText",value:function(t){return this._texts[t]}},{key:"setText",value:function(t,e){if(this._texts[t]!==e&&(this._texts[t]=e,this._clip)){var n=this._clip.getChildText(t);n&&(n.text=e)}}},{key:"getStateId",value:function(){return"default"}},{key:"destroy",value:function(t){this._parent&&this._parent.removeListener("event_state",this._onEventState),this._clip&&this._clip.destroy(t),function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"_clipUpdate",value:function(){if(this._key)if(this._parent._clip){var t=this._parent._clip.getChildClip(this._key);this.appendClip(t)}else this.appendClip(null);else;}},{key:"_clipProcess",value:function(){this._clip&&(this.doState(),this.onClipProcess())}},{key:"onClipProcess",value:function(){}},{key:"_setupState",value:function(t){if(this._clip)for(var e in this._clip.setState(t),this._texts){var n=this._clip.getChildText(e);n&&(n.text=this._texts[e])}this.emit("event_state")}},{key:"_onEventState",value:function(){this._clipUpdate()}},{key:"lockId",get:function(){return this._lockId},set:function(t){this._lockId!==t&&(this._lockId&&PhaserComps.UIManager.unregister(this),this._lockId=t,this._lockId&&PhaserComps.UIManager.register(this))}},{key:"lockClipBounds",get:function(){return null}},{key:"lockClip",get:function(){return null}}]),e}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var i=!1,o=[],a={},u=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return r(t,null,[{key:"lock",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&this.unlock(),"string"==typeof t?o.push(t):t.forEach((function(t){return o.push(t)})),i=!0}},{key:"unlock",value:function(){o.length=0,i=!1}},{key:"register",value:function(t){a[t.lockId]=t}},{key:"unregister",value:function(t){a[t.lockId]&&(a[t.lockId]=null,delete a[t.lockId])}},{key:"check",value:function(t){return!i||-1!==o.indexOf(t)}},{key:"getById",value:function(t){return a[t]}},{key:"getBoundsById",value:function(t){var e=this.getById(t);return e?e.lockClipBounds:null}},{key:"getClipById",value:function(t){var e=this.getById(t);return e?e.lockClip:null}}]),t}();e.default=u},function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(1));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._enable=!0,i._isPressed=!1,i._isOver=!1,i._hitZone=null,r&&(i.label=r),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,null,[{key:"EVENT_CLICK",get:function(){return"event_click"}}]),r(e,[{key:"onClipAppend",value:function(t){this._updateInteractive()}},{key:"onClipRemove",value:function(t){var e=t.getChildClip("HIT_ZONE");e&&this._removeInteractive(e)}},{key:"_setupInteractive",value:function(t){t.setInteractive({useHandCursor:!0}),t.on("pointerdown",this._onPointerDown,this),t.on("pointerup",this._onPointerUp,this),t.on("pointerover",this._onPointerOver,this),t.on("pointerout",this._onPointerOut,this),this._hitZone=t}},{key:"_removeInteractive",value:function(t){t.disableInteractive(),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_DOWN,this._onPointerDown,this),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_UP,this._onPointerUp,this),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_OVER,this._onPointerOver,this),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_OUT,this._onPointerOut,this),this._hitZone=null}},{key:"_updateInteractive",value:function(){if(this._clip){var t=this._clip.getChildClip("HIT_ZONE");t&&(this.enable?this._setupInteractive(t):this._removeInteractive(t))}}},{key:"getStateId",value:function(){return this.enable?this._isPressed?this.STATE_DOWN:this._isOver?this.STATE_OVER:this.STATE_UP:this.STATE_DISABLE}},{key:"_onClick",value:function(){this.emit("event_click")}},{key:"_onPointerOut",value:function(){this._isOver=!1,this._isPressed=!1,this.doState()}},{key:"_onPointerOver",value:function(){this._isOver=!0,this.doState()}},{key:"_onPointerDown",value:function(t,e,n,r){this._isPressed=!0,this.doState(),r.stopPropagation()}},{key:"_onPointerUp",value:function(t,e,n,r){var i=this._isPressed&&this._isOver;this._isPressed=!1,this.doState(),i&&(r.stopPropagation(),o.default.check(this.lockId)&&this._onClick())}},{key:"destroy",value:function(t){if(this._clip){var n=this._clip.getChildClip("HIT_ZONE");n&&this._removeInteractive(n)}(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this,t)}},{key:"label",get:function(){return this.getText("label")},set:function(t){this.setText("label",t)}},{key:"enable",get:function(){return this._enable},set:function(t){this._enable!==t&&(this._enable=t,this._updateInteractive(),this.doState())}},{key:"lockClipBounds",get:function(){return this._hitZone?this._hitZone.getBounds():null}},{key:"lockClip",get:function(){return this._hitZone}},{key:"STATE_UP",get:function(){return"up"}},{key:"STATE_DOWN",get:function(){return"down"}},{key:"STATE_OVER",get:function(){return"over"}},{key:"STATE_DISABLE",get:function(){return"disable"}}]),e}(i.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(2),a=(r=o)&&r.__esModule?r:{default:r};function u(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var s=function(t){function e(t,n,r){l(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,0,0));return i.childComponentClips=[],i._config=n,i._key=n.key,i._textures=Array.isArray(r)?r:[r],i.imageFramesMap={},i._stateManager=new f(i,n),i._childrenById={},i._createImagesMap(r),i._parseConfig(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"getStateConfig",value:function(t){return this._stateManager.getStateConfigById(t)}},{key:"getStateIds",value:function(){return this._stateManager.stateIds}},{key:"setState",value:function(t,e){this._stateManager.setState(t,e)}},{key:"applyChildParams",value:function(t,n){this._childrenById.hasOwnProperty(t)&&e._setupCommonParams(this._childrenById[t],n)}},{key:"getChildClip",value:function(t){return this._stateManager.getActiveComponentByKey(t)}},{key:"getChildText",value:function(t){return this._stateManager.getActiveComponentByKey(t)}},{key:"destroy",value:function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=this.childComponentClips[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){o.value.destroy(t)}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this,t)}},{key:"_createImagesMap",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value,u=this.scene.textures.get(a);if(!u)return;var l=u.getFrameNames(),s=!0,c=!1,f=void 0;try{for(var p,h=l[Symbol.iterator]();!(s=(p=h.next()).done);s=!0){var _=p.value;this.imageFramesMap[_]=a}}catch(t){c=!0,f=t}finally{try{!s&&h.return&&h.return()}finally{if(c)throw f}}}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"_parseConfig",value:function(){if(this._config.hasOwnProperty("children")){var t=!0,e=!1,n=void 0;try{for(var r,i=this._config.children[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value;this._createChildFromConfig(o)}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}}}},{key:"_createChildFromConfig",value:function(t){var n=null,r=t.childId,i=t.key,o=!0;if("image"===t.type)n=this._createImageFromConfig(t);else if("text"===t.type)n=this._createTextFromConfig(t);else if("tileSprite"===t.type)n=this._createTileSpriteFromConfig(t);else if("component"===t.type)n=new e(this.scene,t,this._textures),e._setupCommonParams(n,t);else if("zone"===t.type)n=this._createHitZoneFromConfig(t);else if("polygon"===t.type&&(n=this._createPolygonFromConfig(t),t.hasOwnProperty("masking"))){var a=n.createGeometryMask(),u=!0,l=!1,s=void 0;try{for(var c,f=t.masking[Symbol.iterator]();!(u=(c=f.next()).done);u=!0){var p=c.value;this._childrenById[p].setMask(a)}}catch(t){l=!0,s=t}finally{try{!u&&f.return&&f.return()}finally{if(l)throw s}}o=!1}null!==n&&(this._childrenById[r]=n,this.childComponentClips.push(n),o&&this.add(n),this._stateManager.addComponent(n,r,i))}},{key:"_createPolygonFromConfig",value:function(t){var n=this.scene.make.graphics();n.fillStyle(t.color,t.hasOwnProperty("alpha")?t.alpha:1),n.beginPath();for(var r=t.vertices,i=r.length,o=0;o<i;o+=2)n.lineTo(r[o],r[o+1]);return n.closePath(),n.fillPath(),e._setupCommonParams(n,t),t.hasOwnProperty("masking")||this.scene.add.existing(n),n}},{key:"_createTileSpriteFromConfig",value:function(t){var n=this.scene.add.tileSprite(0,0,t.width,t.height,this.imageFramesMap[t.image],t.image);return n.setOrigin(.5,.5),e._setupCommonParams(n,t),n}},{key:"_createImageFromConfig",value:function(t){var n=this.scene.add.image(0,0,this.imageFramesMap[t.image],t.image);return n.setOrigin(0),e._setupCommonParams(n,t),n}},{key:"_createTextFromConfig",value:function(t){var n=this.scene.add.text(0,0,t.text,t.textStyle);return"center"===t.textStyle.align?n.setOrigin(.5,0):"right"===t.textStyle.align?n.setOrigin(1,0):n.setOrigin(0),e._setupCommonParams(n,t),n}},{key:"_createHitZoneFromConfig",value:function(t){return this.scene.add.zone(t.x||0,t.y||0,t.width,t.height).setOrigin(0)}}],[{key:"_setupCommonParams",value:function(t,e){var n=e.x||0,r=e.y||0,i=e.scaleX||1,o=e.scaleY||1,a=e.angle||0,u=e.hasOwnProperty("alpha")?e.alpha:1;t.x=n,t.y=r,t.scaleX=i,t.scaleY=o,t.angle=a,t.alpha=u}}]),e}(a.default.GameObjects.Container);e.default=s;var c=function t(e){l(this,t),this.config=e,this.componentIds=[],this.componentIds=Object.keys(e)},f=function(){function t(e,n){l(this,t),this._clip=e,this._dynamicChildrenIds=[],this._states={},this.stateIds=[],this._components={},this._currentState=null,this._currentStateId=null,this._componentKeys={},this._residentComponentsByKey={};var r=[];for(var i in n.states){this.stateIds.push(i);var o=new c(n.states[i]);this._states[i]=o,r.push.apply(r,u(o.componentIds))}var a=[],s=!0,f=!1,p=void 0;try{for(var h,_=r[Symbol.iterator]();!(s=(h=_.next()).done);s=!0){var y=h.value;a.includes(y)||a.push(y)}}catch(t){f=!0,p=t}finally{try{!s&&_.return&&_.return()}finally{if(f)throw p}}this._dynamicChildrenIds=a}return i(t,[{key:"getStateConfigById",value:function(t){return this._states.hasOwnProperty(t)?this._states[t].config:null}},{key:"addComponent",value:function(t,e,n){this._dynamicChildrenIds.includes(e)?(this._components[e]=t,void 0!==n&&(this._componentKeys[e]=n)):void 0!==n&&(this._residentComponentsByKey[n]=t)}},{key:"setState",value:function(t,e){(this._currentStateId!==t||e)&&this._states.hasOwnProperty(t)&&(this._currentStateId=t,this._currentState=this._states[t],this.setupState())}},{key:"getActiveComponentByKey",value:function(t){if(this._residentComponentsByKey.hasOwnProperty(t))return this._residentComponentsByKey[t];if(null===this._currentState)return null;for(var e in this._currentState.componentIds){var n=this._currentState.componentIds[e];if(this._componentKeys[n]===t)return this._components[n]}return null}},{key:"setupState",value:function(){var t=this._currentState.componentIds,e=!0,n=!1,r=void 0;try{for(var i,o=this._dynamicChildrenIds[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value,u=this._components[a];t.includes(a)?(u.visible=!0,s._setupCommonParams(u,this._currentState.config[a])):u.visible=!1}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}}]),t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(3);var u=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return i._select=!1,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"getStateId",value:function(){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"getStateId",this).call(this)+(this._select?"_select":"")}},{key:"_onClick",value:function(){this._select=!this._select,this.doState(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_onClick",this).call(this)}},{key:"select",get:function(){return this._select},set:function(t){this._select!==t&&(this._select=t,this.doState())}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=u(n(3)),a=u(n(1));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return i._dragBounds={minX:0,maxX:0,minY:0,maxY:0},i._startDragX=0,i._startDragY=0,i._dragZone=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"EVENT_DRAG",get:function(){return"event_drag"}}]),i(e,[{key:"setDragBounds",value:function(t,e,n,r){this._dragBounds.minX=t,this._dragBounds.maxX=n,this._dragBounds.minY=e,this._dragBounds.maxY=r}},{key:"_onDragStart",value:function(t,e){this._dragZone&&this._dragZone===e&&this._clip&&(this._startDragX=this._clip.x-e.input.dragStartX,this._startDragY=this._clip.y-e.input.dragStartY)}},{key:"_onDrag",value:function(t,e,n,r){if(a.default.check(this.lockId)&&this._dragZone&&this._dragZone===e&&!this.clip){var i=this._startDragX+n,o=this._startDragY+r;i<this._dragBounds.minX?i=this._dragBounds.minX:i>this._dragBounds.maxX&&(i=this._dragBounds.maxX),o<this._dragBounds.minY?o=this._dragBounds.minY:o>this._dragBounds.maxY&&(o=this._dragBounds.maxY),this.emit("event_drag",i,o)}}},{key:"_setupInteractive",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_setupInteractive",this).call(this,t),this._dragZone=t,t.scene.input.setDraggable(t,!0),t.scene.input.on("dragstart",this._onDragStart,this),t.scene.input.on("drag",this._onDrag,this)}},{key:"_removeInteractive",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_removeInteractive",this).call(this,t),this._dragZone=null,t.scene.input.setDraggable(t,!1),t.scene.input.removeListener("dragstart",this._onDragStart),t.scene.input.removeListener("drag",this._onDrag)}}]),e}(o.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=s(n(0)),a=s(n(3)),u=s(n(6)),l=s(n(1));function s(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._vertical=r||!1,i._value=0,i._minValue=0,i._maxValue=1,i._valueStep=0,i._buttonStep=.1,i.btnPrev=new a.default(i,"btn_up"),i.btnPrev.on(a.default.EVENT_CLICK,i.onPrevClick,i),i.btnNext=new a.default(i,"btn_down"),i.btnNext.on(a.default.EVENT_CLICK,i.onNextClick,i),i.thumb=new u.default(i,"thumb"),i.thumb.on(u.default.EVENT_DRAG,i._onThumbDrag,i),i._trackStart=0,i._trackLength=100,i._thumbClip=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"EVENT_CHANGE",get:function(){return"event_change"}}]),i(e,[{key:"setValueBounds",value:function(t,e,n){this._minValue=t,this._maxValue=e,void 0!==n?(this._valueStep=n,this._buttonStep<n&&(this._buttonStep=n)):this._valueStep=0}},{key:"setButtonStep",value:function(t){this._buttonStep=t}},{key:"onClipAppend",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),this._updateClips()}},{key:"_updateClips",value:function(){if(this._clip){this._thumbClip=this.thumb._clip;var t=this._clip.getChildClip("DIMENSIONS");t&&(this._trackStart=this._vertical?t.y:t.x,this._trackLength=this._vertical?t.height:t.width,this._thumbClip&&this.thumb.setDragBounds(this._vertical?this._thumbClip.x:t.x,this._vertical?t.y:this._thumbClip.y,this._vertical?this._thumbClip.x:t.x+t.width,this._vertical?t.y+t.height:this._thumbClip.y));var e=this._clip.getChildClip("HIT_ZONE");e&&e.on("pointerdown",this._onZoneDown,this),this._updateThumbFromValue()}}},{key:"onClipProcess",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipProcess",this).call(this),this.thumb&&this._updateClips()}},{key:"onPrevClick",value:function(){l.default.check(this.lockId)&&(this.value-=this._buttonStep)}},{key:"onNextClick",value:function(){l.default.check(this.lockId)&&(this.value+=this._buttonStep)}},{key:"_updateThumbFromValue",value:function(){if(this._thumbClip){var t=Math.round(this._trackStart+this._trackLength*this._value);this._vertical?this._thumbClip.y=t:this._thumbClip.x=t,this.emit("event_change",this.value)}}},{key:"_onThumbDrag",value:function(t,e){if(0!==this._trackLength&&l.default.check(this.lockId)){var n=((this._vertical?e:t)-this._trackStart)/this._trackLength*(this._maxValue-this._minValue);0!==this._valueStep&&(n=Math.round(n/this._valueStep)*this._valueStep),this.value=n+this._minValue}}},{key:"_onZoneDown",value:function(){}},{key:"value",get:function(){var t=this._value*(this._maxValue-this._minValue);return 0===this._valueStep?t+this._minValue:(t=Math.round(t/this._valueStep)*this._valueStep)+this._minValue},set:function(t){var e=(t-this._minValue)/(this._maxValue-this._minValue);e<0&&(e=0),e>1&&(e=1),e!==this._value&&(this._value=e,this._updateThumbFromValue())}}]),e}(o.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(0),a=(r=o)&&r.__esModule?r:{default:r};var u=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._rendererClass=r,i._items=[],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"EVENT_ITEM_CHANGE",get:function(){return"event_change"}}]),i(e,[{key:"clean",value:function(){for(;0!==this._items.length;){this._items.pop().destroy(!0)}}},{key:"_updateData",value:function(){for(var t=this._data.length,e=0;e<t;e++){var n=this._data[e];this._getRenderer(e).data=n}this.doState()}},{key:"_getRenderer",value:function(t){if(this._items.length-1<t){var n=new this._rendererClass(this,"item_"+t);this._items[t]=n,n.on(e.EVENT_ITEM_CHANGE,this.onItemChange,this)}return this._items[t]}},{key:"getStateId",value:function(){return"count_"+(this._data?this._data.length:"0")}},{key:"destroy",value:function(){this.clean(),function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"onItemChange",value:function(t){this.emit(e.EVENT_ITEM_CHANGE,t)}},{key:"data",get:function(){return this._data},set:function(t){this._data=t,this._updateData()}}]),e}(a.default);e.default=u},function(t,e,n){t.exports=n(10)},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r=u(n(4)),i=u(n(12)),o=u(n(18)),a=u(n(1));function u(t){return t&&t.__esModule?t:{default:t}}var l={ComponentClip:r.default,UIComponents:i.default,Plugin:o.default,UIManager:a.default};e.default=l,t.PhaserComps=l}).call(this,n(11))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=_(n(3)),i=_(n(13)),o=_(n(0)),a=_(n(5)),u=_(n(6)),l=_(n(7)),s=_(n(14)),c=_(n(15)),f=_(n(16)),p=_(n(8)),h=_(n(17));function _(t){return t&&t.__esModule?t:{default:t}}var y={UIComponentPrototype:o.default,UIButton:r.default,UIButtonSelect:a.default,UIButtonRadio:i.default,UIButtonDraggable:u.default,UIScrollBar:l.default,UIScrollPanel:s.default,UIProgressBar:c.default,UIContainer:f.default,UIList:p.default,UIListBaseItem:h.default};e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(5),a=(r=o)&&r.__esModule?r:{default:r};var u=function(t){function e(t,n,r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return a._sibling=a,a._value=i,void 0!==o&&a.appendToRadio(o),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"EVENT_SELECT",get:function(){return"event_select"}}]),i(e,[{key:"appendToRadio",value:function(t){this._sibling!==this&&this.removeFromSibling(),this._sibling=t._sibling,t._sibling=this}},{key:"removeFromSibling",value:function(){}},{key:"_onClick",value:function(){this.select=!0}},{key:"_broadcastSelect",value:function(){this.emit("event_select",this.value);for(var t=this._sibling;t!==this;)t.emit("event_select",this._value),t=t._sibling}},{key:"select",get:function(){return function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"select",this)},set:function(t){if(this._select!==t&&(function t(e,n,r,i){var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var a=Object.getPrototypeOf(e);null!==a&&t(a,n,r,i)}else if("value"in o&&o.writable)o.value=r;else{var u=o.set;void 0!==u&&u.call(i,r)}return r}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"select",t,this),t)){for(var n=this._sibling;n!==this;)n.select=!1,n=n._sibling;this._broadcastSelect()}}},{key:"value",get:function(){return this._value},set:function(t){this._value=t}},{key:"valueSelected",get:function(){if(this.select)return this.value;for(var t=this._sibling;t!==this;){if(t.select)return t.value;t=t._sibling}return null},set:function(t){if(this.value!==t){for(var e=this._sibling;e!==this;)if(e.value===t)return void(e.select=!0)}else this.select=!0}}]),e}(a.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(7));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(e,n,r,a,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._container=e,e.on(i.default.EVENT_STATE,this._onContainerUpdate,this),this._panelKey=n,this._dimensionsKey=a,this._scrollBar=new o.default(e,r,u),this._scrollBar.on(o.default.EVENT_CHANGE,this._onScrollBar,this),this._vertical=u||!1}return r(t,[{key:"_onContainerUpdate",value:function(){var t=this._container._clip;if(t){this._panel=t.getChildClip(this._panelKey);var e=t.getChildClip(this._dimensionsKey);this._panel&&e&&(this._scrollBounds={x:e.x,y:e.y,len:this._vertical?this._panel.height-e.height:this._panel.width-e.width},this._onScrollBar(this._onScrollBar.value))}}},{key:"_onScrollBar",value:function(t){this._panel&&this._scrollBounds&&(this._vertical?this._panel.y=this._scrollBounds.y-this._scrollBounds.len*t:this._panel.x=this._scrollBounds.x-this._scrollBounds.len*t)}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(0),a=(r=o)&&r.__esModule?r:{default:r};var u=/progress_(\d+)$/,l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._value=0,r._steps=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"onClipAppend",value:function(t){(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),this._makeSteps(t),this._applyValue()}},{key:"_applyValue",value:function(){if(this._clip){var t=void 0,e=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=this._steps.length;for(t=0;t<a-1;t++){var u=this._steps[t],l=this._steps[t+1];if(u.stepValue===this._value){i=u.config;break}if(l.stepValue===this._value){i=l.config;break}if(this._value>u.stepValue&&this._value<l.stepValue){e=u.config,n=l.config,r=(this._value-u.stepValue)/(l.stepValue-u.stepValue);break}}if(!i)for(o in i={},e)if(n.hasOwnProperty(o)){var s=e[o],c=n[o];i[o]={x:s.x+(c.x-s.x)*r,y:s.y+(c.y-s.y)*r,scaleX:s.scaleX+(c.scaleX-s.scaleX)*r,scaleY:s.scaleY+(c.scaleY-s.scaleY)*r,angle:s.angle+(c.angle-s.angle)*r,alpha:s.alpha+(c.alpha-s.alpha)*r}}for(o in i)this._clip.applyChildParams(o,i[o])}}},{key:"_makeSteps",value:function(t){var n=t.getStateIds();this._steps=[];var r=!0,i=!1,o=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var s=a.value;if(u.test(s)){var c={},f={stepValue:parseInt(u.exec(s)[1])/100,config:c},p=t.getStateConfig(s);for(var h in p)c[h]=e._makeFullConfig(p[h]);this._steps.push(f)}}}catch(t){i=!0,o=t}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}this._steps.sort((function(t,e){return t.stepValue-e.stepValue}))}},{key:"value",get:function(){return this._value},set:function(t){this._value=t,this._applyValue()}}],[{key:"_makeFullConfig",value:function(t){return{x:t.hasOwnProperty("x")?t.x:0,y:t.hasOwnProperty("y")?t.y:0,scaleX:t.hasOwnProperty("scaleX")?t.scaleX:1,scaleY:t.hasOwnProperty("scaleY")?t.scaleY:1,angle:t.hasOwnProperty("angle")?t.angle:0,alpha:t.hasOwnProperty("alpha")?t.alpha:1}}}]),e}(a.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),u=(r=a)&&r.__esModule?r:{default:r};n(2);var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._children=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"addChild",value:function(t){return-1!==this._children.indexOf(t)||(this._children.push(t),this._clip?(t._clip.visible=!0,this._addUIComponentToContainerClip(t)):t._clip.visible=!1),t}},{key:"removeChild",value:function(t){var e=this._children.indexOf(t);return-1===e||(this._children.splice(e,1),this._clip&&this._removeUIComponentFromContainerClip(t)),t}},{key:"_addUIComponentToContainerClip",value:function(t){this._clip.add(t._clip),t._clip.visible=!0}},{key:"_removeUIComponentFromContainerClip",value:function(t,e){this._clip.remove(t._clip,e),t._clip.visible=!1}},{key:"onClipAppend",value:function(t){if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),t){var n=!0,r=!1,i=void 0;try{for(var a,u=this._children[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){var l=a.value;this._addUIComponentToContainerClip(l)}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}}}},{key:"onClipRemove",value:function(t){if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipRemove",this).call(this,t),t){var n=!0,r=!1,i=void 0;try{for(var a,u=this._children[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){var l=a.value;this._removeUIComponentFromContainerClip(l)}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}}}},{key:"destroy",value:function(){var t=!0,n=!1,r=void 0;try{for(var i,a=this._children[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var u=i.value;this._clip&&this._removeUIComponentFromContainerClip(u),u.destroy()}}catch(t){n=!0,r=t}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}this._children.length=0,o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}}]),e}(u.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(8));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._data=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"notifyChange",value:function(){this.emit(o.default.EVENT_ITEM_CHANGE,this)}},{key:"_commitData",value:function(){}},{key:"data",get:function(){return this._data},set:function(t){this._data=t,this._commitData()}}]),e}(i.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(2);var i,o=n(4),a=(i=o)&&i.__esModule?i:{default:i};var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return t.registerGameObject("ui_component",n.addComponent,n.makeComponent),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Phaser.Plugins.BasePlugin),r(e,[{key:"addComponent",value:function(t,e){var n=new a.default(this.scene,t,e);return this.scene.add.existing(n),n}},{key:"makeComponent",value:function(t,e){return new a.default(this.scene,t,e)}}]),e}();e.default=u;var l={key:"UIComponents",plugin:u,start:!0};u.DefaultCfg=l}])}));
//# sourceMappingURL=phaser-ui-comps.min.js.map

2

package.json
{
"name": "phaser-ui-comps",
"version": "1.0.14",
"version": "1.1.0",
"description": "Phaser 3 UI Components Framework and JSFL builder for Adobe Animate",

@@ -5,0 +5,0 @@ "main": "src/phasercomps.js",

import UIComponentPrototype from "./UIComponentPrototype";
import UIManager from "../manager/UIManager";
import Phaser from "phaser";

@@ -4,0 +5,0 @@ const HIT_ZONE = "HIT_ZONE";

import UIButton from "./UIButton";
import UIManager from "../manager/UIManager";
const _EVENT_DRAG = "event_drag";

@@ -5,0 +4,0 @@

@@ -1,3 +0,3 @@

import "phaser";
import UIManager from "../manager/UIManager";
import Phaser from "phaser";
import PhaserComps from "../phasercomps";

@@ -28,2 +28,6 @@ const _EVENT_STATE = "event_state";

/**
* @param {PhaserComps.UIComponents.UIComponentPrototype} parent
* @param {String} key
*/
constructor(parent, key) {

@@ -30,0 +34,0 @@ super();

import UIComponentPrototype from "./UIComponentPrototype";
import 'phaser';

@@ -4,0 +3,0 @@ /**

@@ -97,5 +97,5 @@ import UIComponentPrototype from "./UIComponentPrototype";

*/
destroy() {
destroy(fromScene) {
this.clean();
super.destroy();
super.destroy(fromScene);
}

@@ -102,0 +102,0 @@

@@ -10,3 +10,3 @@ /**

var PhaserComps = {
const PhaserComps = {
ComponentClip: ComponentClip,

@@ -18,4 +18,2 @@ UIComponents: UIComponents,

export default PhaserComps;
global.PhaserComps = PhaserComps;
export default PhaserComps;

@@ -1,2 +0,2 @@

import "phaser";
import Phaser from "phaser";
import ComponentClip from "../clip/ComponentClip";

@@ -3,0 +3,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc