Files
Zos/Skills/@be/node_modules/pixi-animate/dist/pixi-animate.min.js

10 lines
25 KiB
JavaScript
Raw Normal View History

/*!
* pixi-animate - v1.3.3
* Compiled Mon, 08 Jan 2018 01:44:54 UTC
*
* pixi-animate is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.pixiAnimate=t()}}(function(){return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var f=r[a]={exports:{}};e[a][0].call(f.exports,function(t){var r=e[a][1][t];return i(r||t)},f,f.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=t("./AnimatorTimeline"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=[],l=function(){function t(){n(this,t)}return t.play=function(t,e,r){var n=!1,i=void 0,o=void 0,a="function"==typeof e;if(void 0===e||a)i=0,o=t.totalFrames-1,a&&(r=e);else{if(i=t.labelsMap[e],o=t.labelsMap[e+this.STOP_LABEL],void 0===o&&(o=t.labelsMap[e+this.LOOP_LABEL],n=!0),void 0===i)throw new Error("No start label matching '"+e+"'");if(void 0===o)throw new Error("No end label matching '"+e+"'")}return this.fromTo(t,i,o,n,r)},t.to=function(t,e,r){return this.fromTo(t,t.currentFrame,e,!1,r)},t.fromTo=function(t,e,r,n,i){if("string"==typeof e){var o=e;if(void 0===(e=t.labelsMap[o]))throw new Error("No start label matching '"+o+"'")}if("string"==typeof r){var s=r;if(void 0===(r=t.labelsMap[s]))throw new Error("No end label matching '"+s+"'")}if(e<0)throw new Error("Start frame is out of bounds");if(r>=t.totalFrames)throw new Error("End frame is out of bounds");if(e>=r)throw new Error("End frame is before start frame");this.stop(t),n=!!n;var l=a.default.create(t,e,r,n,i);return this._timelines.push(l),t.currentFrame!==e?t.gotoAndPlay(e):t.play(),l},t.stop=function(t){for(var e=0,r=this._timelines.length;e<r;e++){var n=this._timelines[e];if(n.instance===t){this._internalStop(n);break}}},t.stopAll=function(){for(var t=this._timelines.length-1;t>=0;t--)this._internalStop(this._timelines[t])},t._internalStop=function(t){this._timelines.splice(this._timelines.indexOf(t),1),t.instance.stop(),t.destroy()},i(t,null,[{key:"_timelines",get:function(){return s}},{key:"STOP_LABEL",get:function(){return"_stop"}},{key:"LOOP_LABEL",get:function(){return"_loop"}}]),t}();e.exports=l},{"./AnimatorTimeline":2}],2:[function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=[],a=function(){function t(){n(this,t),this._update=this.update.bind(this),this.init(null,0,0,!1,null)}return t.prototype.init=function(t,e,r,n,i){this.instance=t,this.loop=n,this.start=e,this.end=r,this.callback=i,t&&(t.gotoAndStop(e),t._beforeUpdate=this._update)},t.prototype.destroy=function(){this.instance._beforeUpdate=null,this.init(null,0,0,!1,null),t._pool.push(this)},t.prototype.update=function(t){var e=void 0;return t.currentFrame>=this.end&&(t.currentFrame=this.end,this.loop?(t._updateTimeline(),t.gotoAndPlay(this.start)):(t.stop(),this.callback&&(e=this.callback),this.stop())),e},t.prototype.stop=function(){PIXI.animate.Animator._internalStop(this)},t.create=function(e,r,n,i,o){var a;return a=this._pool.length?this._pool.pop():new t,a.init(e,r,n,i,o),a},i(t,[{key:"progress",get:function(){var t=(this.instance.currentFrame-this.start)/(this.end-this.start);return Math.max(0,Math.
//# sourceMappingURL=pixi-animate.min.js.map