@eva/plugin-renderer-spine 1.2.7-editor.6 → 1.2.7-editor.9

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.
@@ -59,8 +59,8 @@ var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
59
59
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
60
60
  }
61
61
 
62
- var _assign = function __assign() {
63
- _assign = Object.assign || function __assign(t) {
62
+ var _assign$ = function __assign$1() {
63
+ _assign$ = Object.assign || function __assign(t) {
64
64
  for (var s, i = 1, n = arguments.length; i < n; i++) {
65
65
  s = arguments[i];
66
66
 
@@ -72,7 +72,7 @@ var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
72
72
  return t;
73
73
  };
74
74
 
75
- return _assign.apply(this, arguments);
75
+ return _assign$.apply(this, arguments);
76
76
  };
77
77
 
78
78
  var SymbolKeysNotSupportedError = function (_super) {
@@ -144,7 +144,7 @@ var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
144
144
  }
145
145
 
146
146
  var properties = Reflect.getMetadata(IDE_PROPERTY_METADATA, target.constructor) || {};
147
- properties[key] = _assign({
147
+ properties[key] = _assign$({
148
148
  type: type,
149
149
  isArray: isArray
150
150
  }, options);
@@ -210,6 +210,22 @@ var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
210
210
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
211
211
  }
212
212
 
213
+ var _assign = function __assign() {
214
+ _assign = Object.assign || function __assign(t) {
215
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
216
+ s = arguments[i];
217
+
218
+ for (var p in s) {
219
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
220
+ }
221
+ }
222
+
223
+ return t;
224
+ };
225
+
226
+ return _assign.apply(this, arguments);
227
+ };
228
+
213
229
  function __decorate(decorators, target, key, desc) {
214
230
  var c = arguments.length,
215
231
  r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
@@ -378,6 +394,12 @@ var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
378
394
  };
379
395
  }
380
396
 
397
+ var sleep = function sleep(time) {
398
+ return new Promise(function (resolve) {
399
+ return setTimeout(resolve, time);
400
+ });
401
+ };
402
+
381
403
  var Spine$2 = function (_super) {
382
404
  __extends$1(Spine, _super);
383
405
 
@@ -547,7 +569,41 @@ var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
547
569
  type: 'resource'
548
570
  }), __metadata("design:type", String)], Spine.prototype, "resource", void 0);
549
571
 
550
- __decorate([Field(), __metadata("design:type", String)], Spine.prototype, "animationName", void 0);
572
+ __decorate([Field({
573
+ type: 'selector',
574
+ options: function options(that) {
575
+ var _a, _b, _c;
576
+
577
+ return __awaiter(this, void 0, void 0, function () {
578
+ var animations;
579
+ return __generator(this, function (_d) {
580
+ switch (_d.label) {
581
+ case 0:
582
+ return [4, sleep(0)];
583
+
584
+ case 1:
585
+ _d.sent();
586
+
587
+ if (!that.resource || !eva_js.resource.promiseMap[that.resource]) {
588
+ return [2, {}];
589
+ }
590
+
591
+ return [4, eva_js.resource.promiseMap[that.resource]];
592
+
593
+ case 2:
594
+ _d.sent();
595
+
596
+ animations = (_c = (_b = (_a = eva_js.resource.resourcesMap[that.resource]) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.ske) === null || _c === void 0 ? void 0 : _c.animations;
597
+ return [2, animations ? Object.keys(animations).reduce(function (prev, key) {
598
+ var _a;
599
+
600
+ return _assign(_assign({}, prev), (_a = {}, _a[key] = key, _a));
601
+ }, {}) : {}];
602
+ }
603
+ });
604
+ });
605
+ }
606
+ }), __metadata("design:type", String)], Spine.prototype, "animationName", void 0);
551
607
 
552
608
  __decorate([Field(), __metadata("design:type", Boolean)], Spine.prototype, "autoPlay", void 0);
553
609