text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.PF=e():t.PF=e()}(window,function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=6)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(1),i=function(){function t(){this.buffer=[],this.raf=-1}return t.prototype.start=function(){this.cancel(),this.loop()},t.prototype.stop=function(){this.cancel(),this.buffer=[],this.raf=-1},t.prototype.sample=function(){var t=this.buffer[0],e=this.buffer[this.buffer.length-1]-t;return e?1e3*(this.buffer.length-1)/e:60},t.prototype.cancel=function(){window.cancelAnimationFrame(this.raf)},t.prototype.loop=function(){var t=this;this.raf=window.requestAnimationFrame(function(){t.buffer.push(n.clock.now()),t.buffer.length>=60&&t.buffer.shift(),t.loop()})},t}();e.FPS=i},function(t,e,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.clock="object"===("undefined"==typeof performance?"undefined":n(performance))&&performance.now?performance:Date},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(1),i=function(){function t(t,e){void 0===e&&(e=30),this.prev=0,this.cb=t,this.delay=e}return t.prototype.start=function(){this.cancel(),this.loop()},t.prototype.stop=function(){this.cancel(),this.raf=void 0},t.prototype.cancel=function(){window.cancelAnimationFrame(this.raf)},t.prototype.loop=function(){var t=this;this.raf=window.requestAnimationFrame(function(){var e=n.clock.now();e>t.prev+t.delay&&(t.prev=e,t.cb(0)),t.loop()})},t}();e.Timer=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=window.devicePixelRatio,i=function(){function t(){this.fps=[],this.createCanvas()}return t.prototype.createCanvas=function(){this.c=document.createElement("canvas"),this.c.setAttribute("style","position: fixed; bottom: 4px; left: 4px; width: 80px; height: 12px; z-index: 99999"),this.c.width=80*n,this.c.height=12*n,document.body.appendChild(this.c),this.ctx=this.c.getContext("2d"),this.ctx.scale(n,n),this.ctx.globalAlpha=.5,this.ctx.fillStyle="black",this.ctx.font="10px Menlo",this.ctx.textBaseline="middle"},t.prototype.append=function(t){this.fps.length>=1&&this.fps.shift(),this.fps.push(t)},t.prototype.draw=function(){this.ctx.clearRect(0,0,this.c.width,this.c.height);var t=this.fps[this.fps.length-1];this.ctx.fillText("FPS: "+t.toFixed(3),2,7)},t.prototype.destroy=function(){this.c.parentNode.removeChild(this.c),this.c=void 0,this.ctx=void 0},t}();e.G=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(5),i=o(0);e.FPS=i.FPS;var r=o(3);e.G=r.G;var c=o(2);e.Timer=c.Timer,e.default=n.PF},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(0),i=o(2),r=o(3),c=function(){function t(){var t=this;this.fps=new n.FPS,this.timer=new i.Timer(function(){t.g.append(t.fps.sample()),t.g.draw()})}return t.prototype.start=function(){this.g||(this.g=new r.G),this.fps.start(),this.timer.start()},t.prototype.stop=function(){this.fps.stop(),this.timer.stop(),this.g&&(this.g.destroy(),this.g=void 0)},t.ver="1.0.2",t}();e.PF=c},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=new(o(4).default);n.start(),e.default=n}])});