@eva/plugin-renderer-graphics 1.3.0-alpha.1 → 2.0.0-beta.1

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.
@@ -1,51 +1,38 @@
1
- this.EVA = this.EVA || {};
2
- this.EVA.plugin = this.EVA.plugin || {};
3
- this.EVA.plugin.renderer = this.EVA.plugin.renderer || {};
4
-
5
- this.EVA.plugin.renderer.graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
1
+ window.EVA = window.EVA || {};
2
+ window.EVA.plugin = window.EVA.plugin || {};
3
+ window.EVA.plugin.renderer = window.EVA.plugin.renderer || {};
4
+ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
6
5
  'use strict';
7
-
8
- var _extendStatics = function extendStatics(d, b) {
9
- _extendStatics = Object.setPrototypeOf || {
6
+ var extendStatics = function (d, b) {
7
+ extendStatics = Object.setPrototypeOf || {
10
8
  __proto__: []
11
9
  } instanceof Array && function (d, b) {
12
10
  d.__proto__ = b;
13
11
  } || function (d, b) {
14
- for (var p in b) {
15
- if (b.hasOwnProperty(p)) d[p] = b[p];
16
- }
12
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
17
13
  };
18
-
19
- return _extendStatics(d, b);
14
+ return extendStatics(d, b);
20
15
  };
21
-
22
16
  function __extends(d, b) {
23
- _extendStatics(d, b);
24
-
17
+ extendStatics(d, b);
25
18
  function __() {
26
19
  this.constructor = d;
27
20
  }
28
-
29
21
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30
22
  }
31
-
32
23
  function __decorate(decorators, target, key, desc) {
33
24
  var c = arguments.length,
34
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
35
- d;
36
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
37
- if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
38
- }
25
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
26
+ d;
27
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
39
28
  return c > 3 && r && Object.defineProperty(target, key, r), r;
40
29
  }
41
-
42
30
  function __awaiter(thisArg, _arguments, P, generator) {
43
31
  function adopt(value) {
44
32
  return value instanceof P ? value : new P(function (resolve) {
45
33
  resolve(value);
46
34
  });
47
35
  }
48
-
49
36
  return new (P || (P = Promise))(function (resolve, reject) {
50
37
  function fulfilled(value) {
51
38
  try {
@@ -54,7 +41,6 @@ this.EVA.plugin.renderer.graphics = function (exports, eva_js, pixi_js, pluginRe
54
41
  reject(e);
55
42
  }
56
43
  }
57
-
58
44
  function rejected(value) {
59
45
  try {
60
46
  step(generator["throw"](value));
@@ -62,29 +48,26 @@ this.EVA.plugin.renderer.graphics = function (exports, eva_js, pixi_js, pluginRe
62
48
  reject(e);
63
49
  }
64
50
  }
65
-
66
51
  function step(result) {
67
52
  result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
68
53
  }
69
-
70
54
  step((generator = generator.apply(thisArg, _arguments || [])).next());
71
55
  });
72
56
  }
73
-
74
57
  function __generator(thisArg, body) {
75
58
  var _ = {
76
- label: 0,
77
- sent: function sent() {
78
- if (t[0] & 1) throw t[1];
79
- return t[1];
59
+ label: 0,
60
+ sent: function () {
61
+ if (t[0] & 1) throw t[1];
62
+ return t[1];
63
+ },
64
+ trys: [],
65
+ ops: []
80
66
  },
81
- trys: [],
82
- ops: []
83
- },
84
- f,
85
- y,
86
- t,
87
- g;
67
+ f,
68
+ y,
69
+ t,
70
+ g;
88
71
  return g = {
89
72
  next: verb(0),
90
73
  "throw": verb(1),
@@ -92,88 +75,66 @@ this.EVA.plugin.renderer.graphics = function (exports, eva_js, pixi_js, pluginRe
92
75
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
93
76
  return this;
94
77
  }), g;
95
-
96
78
  function verb(n) {
97
79
  return function (v) {
98
80
  return step([n, v]);
99
81
  };
100
82
  }
101
-
102
83
  function step(op) {
103
84
  if (f) throw new TypeError("Generator is already executing.");
104
-
105
- while (_) {
106
- try {
107
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
108
- if (y = 0, t) op = [op[0] & 2, t.value];
109
-
110
- switch (op[0]) {
111
- case 0:
112
- case 1:
85
+ while (_) try {
86
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
87
+ if (y = 0, t) op = [op[0] & 2, t.value];
88
+ switch (op[0]) {
89
+ case 0:
90
+ case 1:
91
+ t = op;
92
+ break;
93
+ case 4:
94
+ _.label++;
95
+ return {
96
+ value: op[1],
97
+ done: false
98
+ };
99
+ case 5:
100
+ _.label++;
101
+ y = op[1];
102
+ op = [0];
103
+ continue;
104
+ case 7:
105
+ op = _.ops.pop();
106
+ _.trys.pop();
107
+ continue;
108
+ default:
109
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
110
+ _ = 0;
111
+ continue;
112
+ }
113
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
114
+ _.label = op[1];
115
+ break;
116
+ }
117
+ if (op[0] === 6 && _.label < t[1]) {
118
+ _.label = t[1];
113
119
  t = op;
114
120
  break;
115
-
116
- case 4:
117
- _.label++;
118
- return {
119
- value: op[1],
120
- done: false
121
- };
122
-
123
- case 5:
124
- _.label++;
125
- y = op[1];
126
- op = [0];
127
- continue;
128
-
129
- case 7:
130
- op = _.ops.pop();
131
-
132
- _.trys.pop();
133
-
134
- continue;
135
-
136
- default:
137
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
138
- _ = 0;
139
- continue;
140
- }
141
-
142
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
143
- _.label = op[1];
144
- break;
145
- }
146
-
147
- if (op[0] === 6 && _.label < t[1]) {
148
- _.label = t[1];
149
- t = op;
150
- break;
151
- }
152
-
153
- if (t && _.label < t[2]) {
154
- _.label = t[2];
155
-
156
- _.ops.push(op);
157
-
158
- break;
159
- }
160
-
161
- if (t[2]) _.ops.pop();
162
-
163
- _.trys.pop();
164
-
165
- continue;
166
- }
167
-
168
- op = body.call(thisArg, _);
169
- } catch (e) {
170
- op = [6, e];
171
- y = 0;
172
- } finally {
173
- f = t = 0;
121
+ }
122
+ if (t && _.label < t[2]) {
123
+ _.label = t[2];
124
+ _.ops.push(op);
125
+ break;
126
+ }
127
+ if (t[2]) _.ops.pop();
128
+ _.trys.pop();
129
+ continue;
174
130
  }
131
+ op = body.call(thisArg, _);
132
+ } catch (e) {
133
+ op = [6, e];
134
+ y = 0;
135
+ } finally {
136
+ f = t = 0;
175
137
  }
176
-
177
138
  if (op[0] & 5) throw op[1];
178
139
  return {
179
140
  value: op[0] ? op[1] : void 0,
@@ -181,54 +142,39 @@ this.EVA.plugin.renderer.graphics = function (exports, eva_js, pixi_js, pluginRe
181
142
  };
182
143
  }
183
144
  }
184
-
185
145
  var Graphics$4 = function (_super) {
186
146
  __extends(Graphics, _super);
187
-
188
147
  function Graphics() {
189
148
  return _super !== null && _super.apply(this, arguments) || this;
190
149
  }
191
-
192
150
  return Graphics;
193
151
  }(pixi_js.Graphics);
194
-
195
152
  var GraphicsEngine = Graphics$4;
196
-
197
153
  var Graphics$2 = function (_super) {
198
154
  __extends(Graphics, _super);
199
-
200
155
  function Graphics() {
201
156
  var _this = _super !== null && _super.apply(this, arguments) || this;
202
-
203
157
  _this.graphics = null;
204
158
  return _this;
205
159
  }
206
-
207
160
  Graphics.prototype.init = function () {
208
161
  this.graphics = new GraphicsEngine();
209
162
  };
210
-
211
163
  Graphics.componentName = 'Graphics';
212
164
  return Graphics;
213
165
  }(eva_js.Component);
214
-
215
166
  var Graphics$3 = Graphics$2;
216
-
217
167
  var Graphics = function (_super) {
218
168
  __extends(Graphics, _super);
219
-
220
169
  function Graphics() {
221
170
  var _this = _super !== null && _super.apply(this, arguments) || this;
222
-
223
171
  _this.name = 'Graphics';
224
172
  return _this;
225
173
  }
226
-
227
174
  Graphics.prototype.init = function () {
228
175
  this.renderSystem = this.game.getSystem(pluginRenderer.RendererSystem);
229
176
  this.renderSystem.rendererManager.register(this);
230
177
  };
231
-
232
178
  Graphics.prototype.componentChanged = function (changed) {
233
179
  return __awaiter(this, void 0, void 0, function () {
234
180
  return __generator(this, function (_a) {
@@ -240,19 +186,16 @@ this.EVA.plugin.renderer.graphics = function (exports, eva_js, pixi_js, pluginRe
240
186
  children: true
241
187
  });
242
188
  }
243
-
244
189
  return [2];
245
190
  });
246
191
  });
247
192
  };
248
-
249
193
  Graphics.systemName = 'Graphics';
250
194
  Graphics = __decorate([eva_js.decorators.componentObserver({
251
195
  Graphics: ['graphics']
252
196
  })], Graphics);
253
197
  return Graphics;
254
198
  }(pluginRenderer.Renderer);
255
-
256
199
  var Graphics$1 = Graphics;
257
200
  exports.Graphics = Graphics$3;
258
201
  exports.GraphicsSystem = Graphics$1;
@@ -261,3 +204,4 @@ this.EVA.plugin.renderer.graphics = function (exports, eva_js, pixi_js, pluginRe
261
204
  });
262
205
  return exports;
263
206
  }({}, EVA, PIXI, EVA.plugin.renderer);
207
+ window.EVA.plugin.renderer.graphics = window.EVA.plugin.renderer.graphics || _EVA_IIFE_graphics;
@@ -1 +1 @@
1
- this.EVA=this.EVA||{},this.EVA.plugin=this.EVA.plugin||{},this.EVA.plugin.renderer=this.EVA.plugin.renderer||{},this.EVA.plugin.renderer.graphics=function(e,t,n,r){"use strict";var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function c(e,t,n,r){return new(n||(n=Promise))((function(o,i){function c(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,a)}u((r=r.apply(e,t||[])).next())}))}function a(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n.Graphics),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.graphics=null,t}return i(t,e),t.prototype.init=function(){this.graphics=new u},t.componentName="Graphics",t}(t.Component),p=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Graphics",t}return i(n,e),n.prototype.init=function(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)},n.prototype.componentChanged=function(e){return c(this,void 0,void 0,(function(){return a(this,(function(n){return e.type===t.OBSERVER_TYPE.ADD?this.containerManager.getContainer(e.gameObject.id).addChildAt(e.component.graphics,0):e.type===t.OBSERVER_TYPE.REMOVE&&(this.containerManager.getContainer(e.gameObject.id).removeChild(e.component.graphics),e.component.graphics.destroy({children:!0})),[2]}))}))},n.systemName="Graphics",n=function(e,t,n,r){var o,i=arguments.length,c=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(c=(i<3?o(c):i>3?o(t,n,c):o(t,n))||c);return i>3&&c&&Object.defineProperty(t,n,c),c}([t.decorators.componentObserver({Graphics:["graphics"]})],n)}(r.Renderer);return e.Graphics=s,e.GraphicsSystem=p,Object.defineProperty(e,"__esModule",{value:!0}),e}({},EVA,PIXI,EVA.plugin.renderer);
1
+ window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{},window.EVA.plugin.renderer=window.EVA.plugin.renderer||{};var _EVA_IIFE_graphics=function(e,n,t,r){"use strict";var o=function(e,n){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},o(e,n)};function i(e,n){function t(){this.constructor=e}o(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}function c(e,n,t,r){return new(t||(t=Promise))((function(o,i){function c(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(c,a)}u((r=r.apply(e,n||[])).next())}))}function a(e,n){var t,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;c;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=n.call(e,c)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var u=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i(n,e),n}(t.Graphics),p=u,s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.graphics=null,n}return i(n,e),n.prototype.init=function(){this.graphics=new p},n.componentName="Graphics",n}(n.Component),l=s,f=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.name="Graphics",n}return i(t,e),t.prototype.init=function(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)},t.prototype.componentChanged=function(e){return c(this,void 0,void 0,(function(){return a(this,(function(t){return e.type===n.OBSERVER_TYPE.ADD?this.containerManager.getContainer(e.gameObject.id).addChildAt(e.component.graphics,0):e.type===n.OBSERVER_TYPE.REMOVE&&(this.containerManager.getContainer(e.gameObject.id).removeChild(e.component.graphics),e.component.graphics.destroy({children:!0})),[2]}))}))},t.systemName="Graphics",t=function(e,n,t,r){var o,i=arguments.length,c=i<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,t,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(c=(i<3?o(c):i>3?o(n,t,c):o(n,t))||c);return i>3&&c&&Object.defineProperty(n,t,c),c}([n.decorators.componentObserver({Graphics:["graphics"]})],t),t}(r.Renderer),h=f;return e.Graphics=l,e.GraphicsSystem=h,Object.defineProperty(e,"__esModule",{value:!0}),e}({},EVA,PIXI,EVA.plugin.renderer);window.EVA.plugin.renderer.graphics=window.EVA.plugin.renderer.graphics||_EVA_IIFE_graphics;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@eva/eva.js"),t=require("pixi.js"),n=require("@eva/plugin-renderer"),r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function i(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t.Graphics),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.graphics=null,t}return o(t,e),t.prototype.init=function(){this.graphics=new c},t.componentName="Graphics",t}(e.Component),u=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Graphics",e}return o(r,t),r.prototype.init=function(){this.renderSystem=this.game.getSystem(n.RendererSystem),this.renderSystem.rendererManager.register(this)},r.prototype.componentChanged=function(t){return n=this,r=void 0,c=function(){return i(this,(function(n){return t.type===e.OBSERVER_TYPE.ADD?this.containerManager.getContainer(t.gameObject.id).addChildAt(t.component.graphics,0):t.type===e.OBSERVER_TYPE.REMOVE&&(this.containerManager.getContainer(t.gameObject.id).removeChild(t.component.graphics),t.component.graphics.destroy({children:!0})),[2]}))},new((o=void 0)||(o=Promise))((function(e,t){function i(e){try{u(c.next(e))}catch(e){t(e)}}function a(e){try{u(c.throw(e))}catch(e){t(e)}}function u(t){t.done?e(t.value):new o((function(e){e(t.value)})).then(i,a)}u((c=c.apply(n,r||[])).next())}));var n,r,o,c},r.systemName="Graphics",r=function(e,t,n,r){var o,i=arguments.length,c=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(c=(i<3?o(c):i>3?o(t,n,c):o(t,n))||c);return i>3&&c&&Object.defineProperty(t,n,c),c}([e.decorators.componentObserver({Graphics:["graphics"]})],r)}(n.Renderer);exports.Graphics=a,exports.GraphicsSystem=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@eva/eva.js"),t=require("pixi.js"),n=require("@eva/plugin-renderer"),r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function i(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t.Graphics),a=c,u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.graphics=null,t}return o(t,e),t.prototype.init=function(){this.graphics=new a},t.componentName="Graphics",t}(e.Component),s=u,p=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Graphics",e}return o(r,t),r.prototype.init=function(){this.renderSystem=this.game.getSystem(n.RendererSystem),this.renderSystem.rendererManager.register(this)},r.prototype.componentChanged=function(t){return n=this,r=void 0,c=function(){return i(this,(function(n){return t.type===e.OBSERVER_TYPE.ADD?this.containerManager.getContainer(t.gameObject.id).addChildAt(t.component.graphics,0):t.type===e.OBSERVER_TYPE.REMOVE&&(this.containerManager.getContainer(t.gameObject.id).removeChild(t.component.graphics),t.component.graphics.destroy({children:!0})),[2]}))},new((o=void 0)||(o=Promise))((function(e,t){function i(e){try{u(c.next(e))}catch(e){t(e)}}function a(e){try{u(c.throw(e))}catch(e){t(e)}}function u(t){t.done?e(t.value):new o((function(e){e(t.value)})).then(i,a)}u((c=c.apply(n,r||[])).next())}));var n,r,o,c},r.systemName="Graphics",r=function(e,t,n,r){var o,i=arguments.length,c=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(c=(i<3?o(c):i>3?o(t,n,c):o(t,n))||c);return i>3&&c&&Object.defineProperty(t,n,c),c}([e.decorators.componentObserver({Graphics:["graphics"]})],r),r}(n.Renderer);exports.Graphics=s,exports.GraphicsSystem=p;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eva/plugin-renderer-graphics",
3
- "version": "1.3.0-alpha.1",
3
+ "version": "2.0.0-beta.1",
4
4
  "description": "@eva/plugin-renderer-graphics",
5
5
  "main": "index.js",
6
6
  "module": "dist/plugin-renderer-graphics.esm.js",
@@ -18,7 +18,7 @@
18
18
  "license": "MIT",
19
19
  "homepage": "https://eva.js.org",
20
20
  "dependencies": {
21
- "@eva/plugin-renderer": "1.3.0-alpha.1",
22
- "@eva/eva.js": "1.3.0-alpha.1"
21
+ "@eva/plugin-renderer": "2.0.0-beta.1",
22
+ "@eva/eva.js": "2.0.0-beta.1"
23
23
  }
24
24
  }