diff --git a/build/phaser-web-workers.min.js b/build/phaser-web-workers.min.js index 245c85e..e928cf1 100644 --- a/build/phaser-web-workers.min.js +++ b/build/phaser-web-workers.min.js @@ -1,10 +1,10 @@ /*! - * phaser-web-workers - version 0.0.3 + * phaser-web-workers - version 0.1.0 * A simple Phaser plugin that allows you to easily integrate Web Workers in your game * * OrangeGames - * Build at 08-12-2016 + * Build at 27-01-2017 * Released under MIT License */ -var __extends=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)},Fabrique;!function(a){var b;!function(b){var c=function(b){function c(a,c,d,e){b.call(this,a,c),this.addWorkerLoader(),this.addWorkerFactory(),this.addWorkerCache()}return __extends(c,b),c.prototype.addWorkerLoader=function(){Phaser.Loader.prototype.worker=function(a,b,c,d){var e=this;return void 0===c&&(c=!1),c!==!1&&void 0===d&&(d=this),this.addToFileList("script",a,b,{syncPoint:!0,callback:function(a,b){var c=new Blob([b],{type:"javascript/worker"});e.game.cache.addWorker(a,window.URL.createObjectURL(c))},callbackContext:d},!1,".js")}},c.prototype.addWorkerFactory=function(){Phaser.GameObjectFactory.prototype.worker=function(b){return new a.WebWorker(this.game,b)},Phaser.GameObjectCreator.prototype.worker=function(b){return new a.WebWorker(this.game,b)}},c.prototype.addWorkerCache=function(){Phaser.Cache.prototype._workers={},Phaser.Cache.prototype.addWorker=function(a,b){this._workers[a]=b},Phaser.Cache.prototype.removeWorker=function(a){this._workers.hasOwnProperty(a)&&(window.URL.revokeObjectURL(this._workers[a]),delete this._workers[a])},Phaser.Cache.prototype.getWorker=function(a){if(this._workers.hasOwnProperty(a))return this._workers[a]}},c}(Phaser.Plugin);b.WebWorkers=c}(b=a.Plugins||(a.Plugins={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b=function(){function a(a,b){var c=this;this.game=a;var d=this.game.cache.getWorker(b);null!==d&&(this.name=b,this.worker=new Worker(d),this.onMessage=new Phaser.Signal,this.worker.onmessage=function(a){c.onMessage.dispatch(a)})}return a.prototype.postMessage=function(){for(var a=[],b=0;b