@eva/plugin-renderer-graphics 1.2.7-editor.7 → 1.2.8-fix.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.
|
@@ -5,8 +5,8 @@ window.EVA.plugin.renderer = window.EVA.plugin.renderer || {};
|
|
|
5
5
|
var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
var _extendStatics
|
|
9
|
-
_extendStatics
|
|
8
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
9
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
10
10
|
__proto__: []
|
|
11
11
|
} instanceof Array && function (d, b) {
|
|
12
12
|
d.__proto__ = b;
|
|
@@ -16,11 +16,11 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
return _extendStatics
|
|
19
|
+
return _extendStatics(d, b);
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
function __extends
|
|
23
|
-
_extendStatics
|
|
22
|
+
function __extends(d, b) {
|
|
23
|
+
_extendStatics(d, b);
|
|
24
24
|
|
|
25
25
|
function __() {
|
|
26
26
|
this.constructor = d;
|
|
@@ -182,54 +182,6 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
var _extendStatics = function extendStatics(d, b) {
|
|
186
|
-
_extendStatics = Object.setPrototypeOf || {
|
|
187
|
-
__proto__: []
|
|
188
|
-
} instanceof Array && function (d, b) {
|
|
189
|
-
d.__proto__ = b;
|
|
190
|
-
} || function (d, b) {
|
|
191
|
-
for (var p in b) {
|
|
192
|
-
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
return _extendStatics(d, b);
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
function __extends(d, b) {
|
|
200
|
-
_extendStatics(d, b);
|
|
201
|
-
|
|
202
|
-
function __() {
|
|
203
|
-
this.constructor = d;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
(function (_super) {
|
|
210
|
-
__extends(Application, _super);
|
|
211
|
-
|
|
212
|
-
function Application(params) {
|
|
213
|
-
var _this = this;
|
|
214
|
-
|
|
215
|
-
params.autoStart = false;
|
|
216
|
-
_this = _super.call(this, params) || this;
|
|
217
|
-
return _this;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
return Application;
|
|
221
|
-
})(pixi_js.Application);
|
|
222
|
-
|
|
223
|
-
(function (_super) {
|
|
224
|
-
__extends(Container, _super);
|
|
225
|
-
|
|
226
|
-
function Container() {
|
|
227
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
return Container;
|
|
231
|
-
})(pixi_js.Container);
|
|
232
|
-
|
|
233
185
|
var Graphics$4 = function (_super) {
|
|
234
186
|
__extends(Graphics, _super);
|
|
235
187
|
|
|
@@ -240,157 +192,10 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
240
192
|
return Graphics;
|
|
241
193
|
}(pixi_js.Graphics);
|
|
242
194
|
|
|
243
|
-
var
|
|
244
|
-
|
|
245
|
-
(function (_super) {
|
|
246
|
-
__extends(NinePatch, _super);
|
|
247
|
-
|
|
248
|
-
function NinePatch(img, leftWidth, topHeight, rightWidth, bottomHeight) {
|
|
249
|
-
var _this = this;
|
|
250
|
-
|
|
251
|
-
var texture;
|
|
252
|
-
|
|
253
|
-
if (img === 'string') {
|
|
254
|
-
texture = pixi_js.Texture.fromFrame(img);
|
|
255
|
-
} else {
|
|
256
|
-
texture = pixi_js.Texture.from(img);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
_this = _super.call(this, texture, leftWidth, topHeight, rightWidth, bottomHeight) || this;
|
|
260
|
-
return _this;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
return NinePatch;
|
|
264
|
-
})(pixi_js.mesh.NineSlicePlane);
|
|
265
|
-
|
|
266
|
-
(function () {
|
|
267
|
-
function Sprite(image) {
|
|
268
|
-
this._image = null;
|
|
269
|
-
this._image = image;
|
|
270
|
-
|
|
271
|
-
if (image) {
|
|
272
|
-
if (image instanceof HTMLImageElement) {
|
|
273
|
-
this.sprite = pixi_js.Sprite.from(image);
|
|
274
|
-
} else if (image instanceof pixi_js.Texture) {
|
|
275
|
-
this.sprite = new pixi_js.Sprite(image);
|
|
276
|
-
}
|
|
277
|
-
} else {
|
|
278
|
-
this.sprite = new pixi_js.Sprite();
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
Object.defineProperty(Sprite.prototype, "image", {
|
|
283
|
-
get: function get() {
|
|
284
|
-
return this._image;
|
|
285
|
-
},
|
|
286
|
-
set: function set(val) {
|
|
287
|
-
if (this._image === val) {
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
if (val instanceof HTMLImageElement) {
|
|
292
|
-
this.sprite.texture && this.sprite.texture.destroy(false);
|
|
293
|
-
this.sprite.texture = pixi_js.Texture.from(val);
|
|
294
|
-
} else if (val instanceof pixi_js.Texture) {
|
|
295
|
-
this.sprite.texture = val;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
this._image = val;
|
|
299
|
-
},
|
|
300
|
-
enumerable: false,
|
|
301
|
-
configurable: true
|
|
302
|
-
});
|
|
303
|
-
return Sprite;
|
|
304
|
-
})();
|
|
305
|
-
|
|
306
|
-
(function () {
|
|
307
|
-
function SpriteAnimation(_a) {
|
|
308
|
-
var frames = _a.frames;
|
|
309
|
-
this.animatedSprite = new pixi_js.extras.AnimatedSprite(frames);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
SpriteAnimation.prototype.play = function () {
|
|
313
|
-
this.animatedSprite.play();
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
SpriteAnimation.prototype.stop = function () {
|
|
317
|
-
this.animatedSprite.stop();
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
SpriteAnimation.prototype.gotoAndPlay = function (frameNumber) {
|
|
321
|
-
this.animatedSprite.gotoAndPlay(frameNumber);
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
SpriteAnimation.prototype.gotoAndStop = function (frameNumber) {
|
|
325
|
-
this.animatedSprite.gotoAndStop(frameNumber);
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
Object.defineProperty(SpriteAnimation.prototype, "speed", {
|
|
329
|
-
get: function get() {
|
|
330
|
-
return this.animatedSprite.animationSpeed;
|
|
331
|
-
},
|
|
332
|
-
set: function set(val) {
|
|
333
|
-
this.animatedSprite.animationSpeed = val;
|
|
334
|
-
},
|
|
335
|
-
enumerable: false,
|
|
336
|
-
configurable: true
|
|
337
|
-
});
|
|
338
|
-
return SpriteAnimation;
|
|
339
|
-
})();
|
|
340
|
-
|
|
341
|
-
(function (_super) {
|
|
342
|
-
__extends(Text, _super);
|
|
343
|
-
|
|
344
|
-
function Text(text, style) {
|
|
345
|
-
return _super.call(this, text, style) || this;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
return Text;
|
|
349
|
-
})(pixi_js.Text);
|
|
350
|
-
|
|
351
|
-
var PIXITilingSprite = pixi_js.extras.TilingSprite;
|
|
352
|
-
|
|
353
|
-
(function () {
|
|
354
|
-
function TilingSprite(image) {
|
|
355
|
-
this._image = null;
|
|
356
|
-
this._image = image;
|
|
357
|
-
|
|
358
|
-
if (image) {
|
|
359
|
-
if (image instanceof HTMLImageElement) {
|
|
360
|
-
this.tilingSprite = new PIXITilingSprite(pixi_js.Texture.from(image));
|
|
361
|
-
} else if (image instanceof pixi_js.Texture) {
|
|
362
|
-
this.tilingSprite = new PIXITilingSprite(image);
|
|
363
|
-
}
|
|
364
|
-
} else {
|
|
365
|
-
this.tilingSprite = new PIXITilingSprite(pixi_js.Texture.EMPTY);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
Object.defineProperty(TilingSprite.prototype, "image", {
|
|
370
|
-
get: function get() {
|
|
371
|
-
return this._image;
|
|
372
|
-
},
|
|
373
|
-
set: function set(val) {
|
|
374
|
-
if (this._image === val) {
|
|
375
|
-
return;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
if (val instanceof HTMLImageElement) {
|
|
379
|
-
this.tilingSprite.texture = pixi_js.Texture.from(val);
|
|
380
|
-
} else if (val instanceof pixi_js.Texture) {
|
|
381
|
-
this.tilingSprite.texture = val;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
this._image = val;
|
|
385
|
-
},
|
|
386
|
-
enumerable: false,
|
|
387
|
-
configurable: true
|
|
388
|
-
});
|
|
389
|
-
return TilingSprite;
|
|
390
|
-
})();
|
|
195
|
+
var GraphicsEngine = Graphics$4;
|
|
391
196
|
|
|
392
197
|
var Graphics$2 = function (_super) {
|
|
393
|
-
__extends
|
|
198
|
+
__extends(Graphics, _super);
|
|
394
199
|
|
|
395
200
|
function Graphics() {
|
|
396
201
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -400,7 +205,7 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
400
205
|
}
|
|
401
206
|
|
|
402
207
|
Graphics.prototype.init = function () {
|
|
403
|
-
this.graphics = new
|
|
208
|
+
this.graphics = new GraphicsEngine();
|
|
404
209
|
};
|
|
405
210
|
|
|
406
211
|
Graphics.componentName = 'Graphics';
|
|
@@ -410,7 +215,7 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
410
215
|
var Graphics$3 = Graphics$2;
|
|
411
216
|
|
|
412
217
|
var Graphics = function (_super) {
|
|
413
|
-
__extends
|
|
218
|
+
__extends(Graphics, _super);
|
|
414
219
|
|
|
415
220
|
function Graphics() {
|
|
416
221
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{},window.EVA.plugin.renderer=window.EVA.plugin.renderer||{};var _EVA_IIFE_graphics=function(
|
|
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])})(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=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 u},n.componentName="Graphics",n}(n.Component),s=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)}(r.Renderer);return e.Graphics=p,e.GraphicsSystem=s,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
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eva/plugin-renderer-graphics",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8-fix.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.2.
|
|
22
|
-
"@eva/eva.js": "1.2.
|
|
21
|
+
"@eva/plugin-renderer": "1.2.8-fix.1",
|
|
22
|
+
"@eva/eva.js": "1.2.8-fix.1"
|
|
23
23
|
}
|
|
24
24
|
}
|
package/dist/miniprogram.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { __extends, __awaiter, __generator, __decorate } from 'tslib';
|
|
2
|
-
import { Component, OBSERVER_TYPE, decorators } from '@eva/eva.js/dist/miniprogram';
|
|
3
|
-
import { Graphics as Graphics$4 } from '@eva/renderer-adapter/dist/miniprogram';
|
|
4
|
-
import { RendererSystem, Renderer } from '@eva/plugin-renderer/dist/miniprogram';
|
|
5
|
-
|
|
6
|
-
var Graphics$2 = function (_super) {
|
|
7
|
-
__extends(Graphics, _super);
|
|
8
|
-
|
|
9
|
-
function Graphics() {
|
|
10
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
-
|
|
12
|
-
_this.graphics = null;
|
|
13
|
-
return _this;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
Graphics.prototype.init = function () {
|
|
17
|
-
this.graphics = new Graphics$4();
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
Graphics.componentName = 'Graphics';
|
|
21
|
-
return Graphics;
|
|
22
|
-
}(Component);
|
|
23
|
-
|
|
24
|
-
var Graphics$3 = Graphics$2;
|
|
25
|
-
|
|
26
|
-
var Graphics = function (_super) {
|
|
27
|
-
__extends(Graphics, _super);
|
|
28
|
-
|
|
29
|
-
function Graphics() {
|
|
30
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
-
|
|
32
|
-
_this.name = 'Graphics';
|
|
33
|
-
return _this;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
Graphics.prototype.init = function () {
|
|
37
|
-
this.renderSystem = this.game.getSystem(RendererSystem);
|
|
38
|
-
this.renderSystem.rendererManager.register(this);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
Graphics.prototype.componentChanged = function (changed) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
-
return __generator(this, function (_a) {
|
|
44
|
-
if (changed.type === OBSERVER_TYPE.ADD) {
|
|
45
|
-
this.containerManager.getContainer(changed.gameObject.id).addChildAt(changed.component.graphics, 0);
|
|
46
|
-
} else if (changed.type === OBSERVER_TYPE.REMOVE) {
|
|
47
|
-
this.containerManager.getContainer(changed.gameObject.id).removeChild(changed.component.graphics);
|
|
48
|
-
changed.component.graphics.destroy({
|
|
49
|
-
children: true
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return [2];
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
Graphics.systemName = 'Graphics';
|
|
59
|
-
Graphics = __decorate([decorators.componentObserver({
|
|
60
|
-
Graphics: ['graphics']
|
|
61
|
-
})], Graphics);
|
|
62
|
-
return Graphics;
|
|
63
|
-
}(Renderer);
|
|
64
|
-
|
|
65
|
-
var Graphics$1 = Graphics;
|
|
66
|
-
export { Graphics$3 as Graphics, Graphics$1 as GraphicsSystem };
|