@eva/plugin-renderer-event 1.2.2-mini.3 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EVA.plugin.renderer.event.js +12 -6
- package/dist/EVA.plugin.renderer.event.min.js +1 -1
- package/dist/miniprogram.js +12 -6
- package/dist/plugin-renderer-event.cjs.js +6 -0
- package/dist/plugin-renderer-event.cjs.prod.js +1 -1
- package/dist/plugin-renderer-event.d.ts +4 -0
- package/dist/plugin-renderer-event.esm.js +6 -0
- package/package.json +3 -3
|
@@ -167,7 +167,8 @@ var _EVA_IIFE_event = function (exports, pluginRenderer, eva_js, pixi_js) {
|
|
|
167
167
|
position: {
|
|
168
168
|
x: e.data.global.x,
|
|
169
169
|
y: e.data.global.y
|
|
170
|
-
}
|
|
170
|
+
},
|
|
171
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
171
172
|
},
|
|
172
173
|
gameObject: component.gameObject
|
|
173
174
|
});
|
|
@@ -182,7 +183,8 @@ var _EVA_IIFE_event = function (exports, pluginRenderer, eva_js, pixi_js) {
|
|
|
182
183
|
position: {
|
|
183
184
|
x: e.data.global.x,
|
|
184
185
|
y: e.data.global.y
|
|
185
|
-
}
|
|
186
|
+
},
|
|
187
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
186
188
|
},
|
|
187
189
|
gameObject: component.gameObject
|
|
188
190
|
});
|
|
@@ -197,7 +199,8 @@ var _EVA_IIFE_event = function (exports, pluginRenderer, eva_js, pixi_js) {
|
|
|
197
199
|
position: {
|
|
198
200
|
x: e.data.global.x,
|
|
199
201
|
y: e.data.global.y
|
|
200
|
-
}
|
|
202
|
+
},
|
|
203
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
201
204
|
},
|
|
202
205
|
gameObject: component.gameObject
|
|
203
206
|
});
|
|
@@ -212,7 +215,8 @@ var _EVA_IIFE_event = function (exports, pluginRenderer, eva_js, pixi_js) {
|
|
|
212
215
|
position: {
|
|
213
216
|
x: e.data.global.x,
|
|
214
217
|
y: e.data.global.y
|
|
215
|
-
}
|
|
218
|
+
},
|
|
219
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
216
220
|
},
|
|
217
221
|
gameObject: component.gameObject
|
|
218
222
|
});
|
|
@@ -227,7 +231,8 @@ var _EVA_IIFE_event = function (exports, pluginRenderer, eva_js, pixi_js) {
|
|
|
227
231
|
position: {
|
|
228
232
|
x: e.data.global.x,
|
|
229
233
|
y: e.data.global.y
|
|
230
|
-
}
|
|
234
|
+
},
|
|
235
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
231
236
|
},
|
|
232
237
|
gameObject: component.gameObject
|
|
233
238
|
});
|
|
@@ -242,7 +247,8 @@ var _EVA_IIFE_event = function (exports, pluginRenderer, eva_js, pixi_js) {
|
|
|
242
247
|
position: {
|
|
243
248
|
x: e.data.global.x,
|
|
244
249
|
y: e.data.global.y
|
|
245
|
-
}
|
|
250
|
+
},
|
|
251
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
246
252
|
},
|
|
247
253
|
gameObject: component.gameObject
|
|
248
254
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t}).apply(this,arguments)}var _EVA_IIFE_event=function(t,e,o,n){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)};function a(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function i(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,a=o.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function
|
|
1
|
+
function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t}).apply(this,arguments)}var _EVA_IIFE_event=function(t,e,o,n){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)};function a(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function i(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,a=o.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function p(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t}var l,c={Circle:n.Circle,Ellipse:n.Ellipse,Polygon:n.Polygon,Rect:n.Rectangle,RoundedRect:n.RoundedRectangle},d={Circle:["x","y","radius"],Ellipse:["x","y","width","height"],Rect:["x","y","width","height"],RoundedRect:["x","y","width","height","radius"],Polygon:["paths"]},s=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Event",e}return a(n,t),n.prototype.init=function(t){var o=(void 0===t?{}:t).moveWhenInside,n=void 0!==o&&o;this.renderSystem=this.game.getSystem(e.RendererSystem),this.renderSystem.rendererManager.register(this);try{this.renderSystem.application.renderer.plugins.interaction.moveWhenInside=n}catch(t){console.error("Setting moveWhenInside error.",t)}},n.prototype.componentChanged=function(t){switch(t.type){case o.OBSERVER_TYPE.ADD:this.add(t);break;case o.OBSERVER_TYPE.REMOVE:this.remove(t);break;case o.OBSERVER_TYPE.CHANGE:this.change(t)}},n.prototype.add=function(t){var e=this.containerManager.getContainer(t.gameObject.id);e.interactive=!0,e.interactiveChildren=!0;var o=t.component;o.hitArea&&this.addHitArea(t,e,o.hitArea),e.on("pointertap",(function(t){o.emit("tap",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})})),e.on("pointerdown",(function(t){o.emit("touchstart",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})})),e.on("pointermove",(function(t){o.emit("touchmove",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})})),e.on("pointerup",(function(t){o.emit("touchend",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})})),e.on("pointerupoutside",(function(t){o.emit("touchendoutside",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})})),e.on("pointercancel",(function(t){o.emit("touchcancel",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})}))},n.prototype.remove=function(t){var e=this.containerManager.getContainer(t.gameObject.id);e.interactive=!1,e.off("tap"),e.off("pointerdown"),e.off("pointermove"),e.off("pointerup"),e.off("pointerupoutside"),e.off("pointercancel"),t.component.removeAllListeners()},n.prototype.change=function(t){var e=this.containerManager.getContainer(t.gameObject.id);e.interactive=!0;var o=t.component;o.hitArea?this.addHitArea(t,e,o.hitArea):o.hitArea=null},n.prototype.addHitArea=function(t,e,o){var n,r,a,i=o.type,l=o.style;if(c[i]){var s=[];try{for(var u=function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(d[i]),f=u.next();!f.done;f=u.next()){var y=f.value;s.push(l[y])}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}var g=new((a=c[i]).bind.apply(a,p([void 0],s)));e.hitArea=g}else console.error(t.gameObject.name+"'s hitArea type is not defined")},n.systemName="Event",n=function(t,e,o,n){var r,a=arguments.length,i=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(i=(a<3?r(i):a>3?r(e,o,i):r(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i}([o.decorators.componentObserver({Event:[{prop:["hitArea"],deep:!0}]})],n)}(e.Renderer);t.HIT_AREA_TYPE=void 0,(l=t.HIT_AREA_TYPE||(t.HIT_AREA_TYPE={})).Circle="Circle",l.Ellipse="Ellipse",l.Polygon="Polygon",l.Rect="Rect",l.RoundedRect="RoundedRect";var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hitArea=void 0,e}return a(e,t),e.prototype.init=function(t){t&&_extends(this,t)},e.prototype.emit=function(e){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];return t.prototype.emit.apply(this,p([e],o))},e.prototype.once=function(e,o,n){return t.prototype.once.call(this,e,o,n)},e.prototype.on=function(e,o,n){return t.prototype.on.call(this,e,o,n)},e.componentName="Event",e}(o.Component);return t.Event=u,t.EventSystem=s,Object.defineProperty(t,"__esModule",{value:!0}),t}({},EVA.plugin.renderer,EVA,PIXI);
|
package/dist/miniprogram.js
CHANGED
|
@@ -78,7 +78,8 @@ var Event$2 = function (_super) {
|
|
|
78
78
|
position: {
|
|
79
79
|
x: e.data.global.x,
|
|
80
80
|
y: e.data.global.y
|
|
81
|
-
}
|
|
81
|
+
},
|
|
82
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
82
83
|
},
|
|
83
84
|
gameObject: component.gameObject
|
|
84
85
|
});
|
|
@@ -93,7 +94,8 @@ var Event$2 = function (_super) {
|
|
|
93
94
|
position: {
|
|
94
95
|
x: e.data.global.x,
|
|
95
96
|
y: e.data.global.y
|
|
96
|
-
}
|
|
97
|
+
},
|
|
98
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
97
99
|
},
|
|
98
100
|
gameObject: component.gameObject
|
|
99
101
|
});
|
|
@@ -108,7 +110,8 @@ var Event$2 = function (_super) {
|
|
|
108
110
|
position: {
|
|
109
111
|
x: e.data.global.x,
|
|
110
112
|
y: e.data.global.y
|
|
111
|
-
}
|
|
113
|
+
},
|
|
114
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
112
115
|
},
|
|
113
116
|
gameObject: component.gameObject
|
|
114
117
|
});
|
|
@@ -123,7 +126,8 @@ var Event$2 = function (_super) {
|
|
|
123
126
|
position: {
|
|
124
127
|
x: e.data.global.x,
|
|
125
128
|
y: e.data.global.y
|
|
126
|
-
}
|
|
129
|
+
},
|
|
130
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
127
131
|
},
|
|
128
132
|
gameObject: component.gameObject
|
|
129
133
|
});
|
|
@@ -138,7 +142,8 @@ var Event$2 = function (_super) {
|
|
|
138
142
|
position: {
|
|
139
143
|
x: e.data.global.x,
|
|
140
144
|
y: e.data.global.y
|
|
141
|
-
}
|
|
145
|
+
},
|
|
146
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
142
147
|
},
|
|
143
148
|
gameObject: component.gameObject
|
|
144
149
|
});
|
|
@@ -153,7 +158,8 @@ var Event$2 = function (_super) {
|
|
|
153
158
|
position: {
|
|
154
159
|
x: e.data.global.x,
|
|
155
160
|
y: e.data.global.y
|
|
156
|
-
}
|
|
161
|
+
},
|
|
162
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
157
163
|
},
|
|
158
164
|
gameObject: component.gameObject
|
|
159
165
|
});
|
|
@@ -138,6 +138,7 @@ var Event$2 = (function (_super) {
|
|
|
138
138
|
x: e.data.global.x,
|
|
139
139
|
y: e.data.global.y,
|
|
140
140
|
},
|
|
141
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
141
142
|
},
|
|
142
143
|
gameObject: component.gameObject,
|
|
143
144
|
});
|
|
@@ -151,6 +152,7 @@ var Event$2 = (function (_super) {
|
|
|
151
152
|
x: e.data.global.x,
|
|
152
153
|
y: e.data.global.y,
|
|
153
154
|
},
|
|
155
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
154
156
|
},
|
|
155
157
|
gameObject: component.gameObject,
|
|
156
158
|
});
|
|
@@ -164,6 +166,7 @@ var Event$2 = (function (_super) {
|
|
|
164
166
|
x: e.data.global.x,
|
|
165
167
|
y: e.data.global.y,
|
|
166
168
|
},
|
|
169
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
167
170
|
},
|
|
168
171
|
gameObject: component.gameObject,
|
|
169
172
|
});
|
|
@@ -177,6 +180,7 @@ var Event$2 = (function (_super) {
|
|
|
177
180
|
x: e.data.global.x,
|
|
178
181
|
y: e.data.global.y,
|
|
179
182
|
},
|
|
183
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
180
184
|
},
|
|
181
185
|
gameObject: component.gameObject,
|
|
182
186
|
});
|
|
@@ -190,6 +194,7 @@ var Event$2 = (function (_super) {
|
|
|
190
194
|
x: e.data.global.x,
|
|
191
195
|
y: e.data.global.y,
|
|
192
196
|
},
|
|
197
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
193
198
|
},
|
|
194
199
|
gameObject: component.gameObject,
|
|
195
200
|
});
|
|
@@ -203,6 +208,7 @@ var Event$2 = (function (_super) {
|
|
|
203
208
|
x: e.data.global.x,
|
|
204
209
|
y: e.data.global.y,
|
|
205
210
|
},
|
|
211
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
206
212
|
},
|
|
207
213
|
gameObject: component.gameObject,
|
|
208
214
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@eva/plugin-renderer"),e=require("@eva/eva.js"),o=require("pixi.js"),n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)};function r(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function a(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,a=o.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t}var p,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@eva/plugin-renderer"),e=require("@eva/eva.js"),o=require("pixi.js"),n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)};function r(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function a(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,a=o.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t}var p,l={Circle:o.Circle,Ellipse:o.Ellipse,Polygon:o.Polygon,Rect:o.Rectangle,RoundedRect:o.RoundedRectangle},c={Circle:["x","y","radius"],Ellipse:["x","y","width","height"],Rect:["x","y","width","height"],RoundedRect:["x","y","width","height","radius"],Polygon:["paths"]},d=function(o){function n(){var t=null!==o&&o.apply(this,arguments)||this;return t.name="Event",t}return r(n,o),n.prototype.init=function(e){var o=(void 0===e?{}:e).moveWhenInside,n=void 0!==o&&o;this.renderSystem=this.game.getSystem(t.RendererSystem),this.renderSystem.rendererManager.register(this);try{this.renderSystem.application.renderer.plugins.interaction.moveWhenInside=n}catch(t){console.error("Setting moveWhenInside error.",t)}},n.prototype.componentChanged=function(t){switch(t.type){case e.OBSERVER_TYPE.ADD:this.add(t);break;case e.OBSERVER_TYPE.REMOVE:this.remove(t);break;case e.OBSERVER_TYPE.CHANGE:this.change(t)}},n.prototype.add=function(t){var e=this.containerManager.getContainer(t.gameObject.id);e.interactive=!0,e.interactiveChildren=!0;var o=t.component;o.hitArea&&this.addHitArea(t,e,o.hitArea),e.on("pointertap",(function(t){o.emit("tap",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})})),e.on("pointerdown",(function(t){o.emit("touchstart",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})})),e.on("pointermove",(function(t){o.emit("touchmove",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})})),e.on("pointerup",(function(t){o.emit("touchend",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})})),e.on("pointerupoutside",(function(t){o.emit("touchendoutside",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})})),e.on("pointercancel",(function(t){o.emit("touchcancel",{stopPropagation:function(){return t.stopPropagation()},data:{pointerId:t.data.pointerId,position:{x:t.data.global.x,y:t.data.global.y},localPosition:e.worldTransform.applyInverse(t.data.global)},gameObject:o.gameObject})}))},n.prototype.remove=function(t){var e=this.containerManager.getContainer(t.gameObject.id);e.interactive=!1,e.off("tap"),e.off("pointerdown"),e.off("pointermove"),e.off("pointerup"),e.off("pointerupoutside"),e.off("pointercancel"),t.component.removeAllListeners()},n.prototype.change=function(t){var e=this.containerManager.getContainer(t.gameObject.id);e.interactive=!0;var o=t.component;o.hitArea?this.addHitArea(t,e,o.hitArea):o.hitArea=null},n.prototype.addHitArea=function(t,e,o){var n,r,a,p=o.type,d=o.style;if(l[p]){var s=[];try{for(var u=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],o=0;return e?e.call(t):{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}}}(c[p]),f=u.next();!f.done;f=u.next()){var y=f.value;s.push(d[y])}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}var g=new((a=l[p]).bind.apply(a,i([void 0],s)));e.hitArea=g}else console.error(t.gameObject.name+"'s hitArea type is not defined")},n.systemName="Event",n=function(t,e,o,n){var r,a=arguments.length,i=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(i=(a<3?r(i):a>3?r(e,o,i):r(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i}([e.decorators.componentObserver({Event:[{prop:["hitArea"],deep:!0}]})],n)}(t.Renderer);exports.HIT_AREA_TYPE=void 0,(p=exports.HIT_AREA_TYPE||(exports.HIT_AREA_TYPE={})).Circle="Circle",p.Ellipse="Ellipse",p.Polygon="Polygon",p.Rect="Rect",p.RoundedRect="RoundedRect";var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hitArea=void 0,e}return r(e,t),e.prototype.init=function(t){t&&Object.assign(this,t)},e.prototype.emit=function(e){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];return t.prototype.emit.apply(this,i([e],o))},e.prototype.once=function(e,o,n){return t.prototype.once.call(this,e,o,n)},e.prototype.on=function(e,o,n){return t.prototype.on.call(this,e,o,n)},e.componentName="Event",e}(e.Component);exports.Event=s,exports.EventSystem=d;
|
|
@@ -134,6 +134,7 @@ var Event$2 = (function (_super) {
|
|
|
134
134
|
x: e.data.global.x,
|
|
135
135
|
y: e.data.global.y,
|
|
136
136
|
},
|
|
137
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
137
138
|
},
|
|
138
139
|
gameObject: component.gameObject,
|
|
139
140
|
});
|
|
@@ -147,6 +148,7 @@ var Event$2 = (function (_super) {
|
|
|
147
148
|
x: e.data.global.x,
|
|
148
149
|
y: e.data.global.y,
|
|
149
150
|
},
|
|
151
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
150
152
|
},
|
|
151
153
|
gameObject: component.gameObject,
|
|
152
154
|
});
|
|
@@ -160,6 +162,7 @@ var Event$2 = (function (_super) {
|
|
|
160
162
|
x: e.data.global.x,
|
|
161
163
|
y: e.data.global.y,
|
|
162
164
|
},
|
|
165
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
163
166
|
},
|
|
164
167
|
gameObject: component.gameObject,
|
|
165
168
|
});
|
|
@@ -173,6 +176,7 @@ var Event$2 = (function (_super) {
|
|
|
173
176
|
x: e.data.global.x,
|
|
174
177
|
y: e.data.global.y,
|
|
175
178
|
},
|
|
179
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
176
180
|
},
|
|
177
181
|
gameObject: component.gameObject,
|
|
178
182
|
});
|
|
@@ -186,6 +190,7 @@ var Event$2 = (function (_super) {
|
|
|
186
190
|
x: e.data.global.x,
|
|
187
191
|
y: e.data.global.y,
|
|
188
192
|
},
|
|
193
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
189
194
|
},
|
|
190
195
|
gameObject: component.gameObject,
|
|
191
196
|
});
|
|
@@ -199,6 +204,7 @@ var Event$2 = (function (_super) {
|
|
|
199
204
|
x: e.data.global.x,
|
|
200
205
|
y: e.data.global.y,
|
|
201
206
|
},
|
|
207
|
+
localPosition: container.worldTransform.applyInverse(e.data.global)
|
|
202
208
|
},
|
|
203
209
|
gameObject: component.gameObject,
|
|
204
210
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eva/plugin-renderer-event",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "@eva/plugin-renderer-event",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-renderer-event.esm.js",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"homepage": "https://eva.js.org",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@eva/plugin-renderer": "1.2.
|
|
22
|
-
"@eva/eva.js": "1.2.
|
|
21
|
+
"@eva/plugin-renderer": "1.2.3",
|
|
22
|
+
"@eva/eva.js": "1.2.3",
|
|
23
23
|
"pixi.js": "^4.8.7"
|
|
24
24
|
}
|
|
25
25
|
}
|