@eva/spine-base 1.2.7-editor.8 → 1.2.7-fix.4

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,6 +1,6 @@
1
- import { Component, resource, OBSERVER_TYPE, decorators } from '@eva/eva.js';
1
+ import { Component, OBSERVER_TYPE, decorators, resource } from '@eva/eva.js';
2
2
  import { RendererSystem, Renderer } from '@eva/plugin-renderer';
3
- import { Field } from '@eva/inspector-decorator';
3
+ import { type } from '@eva/inspector-decorator';
4
4
  import { Texture } from 'pixi.js';
5
5
 
6
6
  /*! *****************************************************************************
@@ -32,17 +32,6 @@ function __extends(d, b) {
32
32
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33
33
  }
34
34
 
35
- var __assign = function() {
36
- __assign = Object.assign || function __assign(t) {
37
- for (var s, i = 1, n = arguments.length; i < n; i++) {
38
- s = arguments[i];
39
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
40
- }
41
- return t;
42
- };
43
- return __assign.apply(this, arguments);
44
- };
45
-
46
35
  function __decorate(decorators, target, key, desc) {
47
36
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
48
37
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -50,10 +39,6 @@ function __decorate(decorators, target, key, desc) {
50
39
  return c > 3 && r && Object.defineProperty(target, key, r), r;
51
40
  }
52
41
 
53
- function __metadata(metadataKey, metadataValue) {
54
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
55
- }
56
-
57
42
  function __awaiter(thisArg, _arguments, P, generator) {
58
43
  return new (P || (P = Promise))(function (resolve, reject) {
59
44
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -102,7 +87,6 @@ function __values(o) {
102
87
  };
103
88
  }
104
89
 
105
- var sleep = function (time) { return new Promise(function (resolve) { return setTimeout(resolve, time); }); };
106
90
  var Spine = (function (_super) {
107
91
  __extends(Spine, _super);
108
92
  function Spine() {
@@ -166,7 +150,7 @@ var Spine = (function (_super) {
166
150
  playType: true,
167
151
  name: name,
168
152
  loop: loop !== null && loop !== void 0 ? loop : this.autoPlay,
169
- track: track,
153
+ track: track
170
154
  });
171
155
  }
172
156
  else {
@@ -184,7 +168,7 @@ var Spine = (function (_super) {
184
168
  if (!this.armature) {
185
169
  this.waitExecuteInfos.push({
186
170
  playType: false,
187
- track: track,
171
+ track: track
188
172
  });
189
173
  return;
190
174
  }
@@ -247,42 +231,13 @@ var Spine = (function (_super) {
247
231
  };
248
232
  Spine.componentName = 'Spine';
249
233
  __decorate([
250
- Field({ type: 'resource' }),
251
- __metadata("design:type", String)
234
+ type('string')
252
235
  ], Spine.prototype, "resource", void 0);
253
236
  __decorate([
254
- Field({
255
- type: 'selector',
256
- options: function (that) {
257
- var _a, _b, _c;
258
- return __awaiter(this, void 0, void 0, function () {
259
- var animations;
260
- return __generator(this, function (_d) {
261
- switch (_d.label) {
262
- case 0: return [4, sleep(0)];
263
- case 1:
264
- _d.sent();
265
- if (!that.resource || !resource.promiseMap[that.resource]) {
266
- return [2, {}];
267
- }
268
- return [4, resource.promiseMap[that.resource]];
269
- case 2:
270
- _d.sent();
271
- animations = (_c = (_b = (_a = 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;
272
- return [2, animations ? Object.keys(animations).reduce(function (prev, key) {
273
- var _a;
274
- return (__assign(__assign({}, prev), (_a = {}, _a[key] = key, _a)));
275
- }, {}) : {}];
276
- }
277
- });
278
- });
279
- },
280
- }),
281
- __metadata("design:type", String)
237
+ type('string')
282
238
  ], Spine.prototype, "animationName", void 0);
283
239
  __decorate([
284
- Field(),
285
- __metadata("design:type", Boolean)
240
+ type('boolean')
286
241
  ], Spine.prototype, "autoPlay", void 0);
287
242
  return Spine;
288
243
  }(Component));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eva/spine-base",
3
- "version": "1.2.7-editor.8",
3
+ "version": "1.2.7-fix.4",
4
4
  "description": "@eva/spine-base",
5
5
  "main": "index.js",
6
6
  "module": "dist/spine-base.esm.js",
@@ -18,9 +18,9 @@
18
18
  "license": "MIT",
19
19
  "homepage": "https://eva.js.org",
20
20
  "dependencies": {
21
- "@eva/eva.js": "1.2.7-editor.8",
22
- "@eva/plugin-renderer": "1.2.7-editor.8",
23
- "@eva/inspector-decorator": "0.1.0-alpha.2",
21
+ "@eva/eva.js": "1.2.7-fix.4",
22
+ "@eva/plugin-renderer": "1.2.7-fix.4",
23
+ "@eva/inspector-decorator": "^0.0.5",
24
24
  "pixi.js": "^4.8.9"
25
25
  }
26
26
  }