From e95695cde757cbe62ac7245b8067d31b368fe0b9 Mon Sep 17 00:00:00 2001 From: Rex Date: Wed, 13 Sep 2023 21:39:16 +0800 Subject: [PATCH] Export plugins --- dist/rexdragrotateplugin.js | 4 ++-- dist/rexdragrotateplugin.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/rexdragrotateplugin.js b/dist/rexdragrotateplugin.js index c79de5d7ac..4c705ef122 100644 --- a/dist/rexdragrotateplugin.js +++ b/dist/rexdragrotateplugin.js @@ -490,7 +490,7 @@ value: function getOriginX(camera) { // OriginX in world position if (!this.originGameObject) { - return this._x; + return this.x; } var gameObject = this.originGameObject; var x = gameObject.x; @@ -507,7 +507,7 @@ value: function getOriginY(camera) { // OriginY in world position if (!this.originGameObject) { - return this._y; + return this.y; } var gameObject = this.originGameObject; var y = gameObject.y; diff --git a/dist/rexdragrotateplugin.min.js b/dist/rexdragrotateplugin.min.js index 284a75b1f2..06b484d43e 100644 --- a/dist/rexdragrotateplugin.min.js +++ b/dist/rexdragrotateplugin.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).rexdragrotateplugin=e();}(undefined,(function(){function t(e){return t="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(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i=this.minRadius&&(void 0===this.maxRadius||r<=this.maxRadius)}},{key:"onPointerDown",value:function(t){this.enable&&!this.pointer&&this.containsPointer(t)&&this.onDragStart(t);}},{key:"onPointerUp",value:function(t){this.enable&&this.pointer===t&&this.onDragEnd();}},{key:"onPointerMove",value:function(t){if(this.enable&&t.isDown)switch(this.state){case 0:this.containsPointer(t)&&this.onDragStart(t);break;case 1:this.containsPointer(t)?this.onDrag(t):this.onDragEnd(t);}}},{key:"dragCancel",value:function(){return 1===this.state&&this.onDragEnd(),this.pointer=void 0,this.state=0,this}},{key:"onDragStart",value:function(t){this.pointer=t;var e=this.getPointerWorldXY(t);this.prevPointerX=e.x,this.prevPointerY=e.y,this.state=1,this.emit("dragstart",this);}},{key:"onDragEnd",value:function(){this.pointer=void 0,this.prevPointerX=void 0,this.prevPointerY=void 0,this.state=0,this._deltaRotation=void 0,this.emit("dragend",this);}},{key:"onDrag",value:function(t){var e=this.getOriginX(),i=this.getOriginY(),n=this.getPointerWorldXY(t),r=n.x,o=n.y,s=_(e,i,this.prevPointerX,this.prevPointerY),a=_(e,i,r,o);this.deltaRotation=O(a-s),this.prevPointerX=r,this.prevPointerY=o,this.emit("drag",this);}},{key:"deltaAngle",get:function(){return 0===this.state?0:w(this.deltaRotation)}},{key:"cw",get:function(){return this.deltaRotation>=0}},{key:"ccw",get:function(){return !this.cw}}]),s}(d),k={};return function(t){r(o,Phaser.Plugins.BasePlugin);var i=h(o);function o(t){return e(this,o),i.call(this,t)}return n(o,[{key:"start",value:function(){this.game.events.on("destroy",this.destroy,this);}},{key:"add",value:function(t,e){return new j(t,e)}}]),o}()})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).rexdragrotateplugin=e();}(undefined,(function(){function t(e){return t="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(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i=this.minRadius&&(void 0===this.maxRadius||r<=this.maxRadius)}},{key:"onPointerDown",value:function(t){this.enable&&!this.pointer&&this.containsPointer(t)&&this.onDragStart(t);}},{key:"onPointerUp",value:function(t){this.enable&&this.pointer===t&&this.onDragEnd();}},{key:"onPointerMove",value:function(t){if(this.enable&&t.isDown)switch(this.state){case 0:this.containsPointer(t)&&this.onDragStart(t);break;case 1:this.containsPointer(t)?this.onDrag(t):this.onDragEnd(t);}}},{key:"dragCancel",value:function(){return 1===this.state&&this.onDragEnd(),this.pointer=void 0,this.state=0,this}},{key:"onDragStart",value:function(t){this.pointer=t;var e=this.getPointerWorldXY(t);this.prevPointerX=e.x,this.prevPointerY=e.y,this.state=1,this.emit("dragstart",this);}},{key:"onDragEnd",value:function(){this.pointer=void 0,this.prevPointerX=void 0,this.prevPointerY=void 0,this.state=0,this._deltaRotation=void 0,this.emit("dragend",this);}},{key:"onDrag",value:function(t){var e=this.getOriginX(),i=this.getOriginY(),n=this.getPointerWorldXY(t),r=n.x,o=n.y,s=_(e,i,this.prevPointerX,this.prevPointerY),a=_(e,i,r,o);this.deltaRotation=O(a-s),this.prevPointerX=r,this.prevPointerY=o,this.emit("drag",this);}},{key:"deltaAngle",get:function(){return 0===this.state?0:w(this.deltaRotation)}},{key:"cw",get:function(){return this.deltaRotation>=0}},{key:"ccw",get:function(){return !this.cw}}]),s}(d),k={};return function(t){r(o,Phaser.Plugins.BasePlugin);var i=h(o);function o(t){return e(this,o),i.call(this,t)}return n(o,[{key:"start",value:function(){this.game.events.on("destroy",this.destroy,this);}},{key:"add",value:function(t,e){return new j(t,e)}}]),o}()}));