@eva/plugin-renderer-sprite 1.1.0 → 1.1.1-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.
Files changed (52) hide show
  1. package/README.md +1 -2
  2. package/dist/plugin-renderer-sprite.cjs.js +197 -105
  3. package/dist/plugin-renderer-sprite.cjs.prod.js +1 -16
  4. package/dist/plugin-renderer-sprite.esm.js +203 -111
  5. package/index.js +3 -3
  6. package/package.json +3 -3
  7. package/dist/EVA.plugin.renderer.sprite.js +0 -199
  8. package/dist/EVA.plugin.renderer.sprite.min.js +0 -1
  9. package/dist/examples/index.d.ts +0 -2
  10. package/dist/examples/index.d.ts.map +0 -1
  11. package/dist/examples/src/a11y.d.ts +0 -3
  12. package/dist/examples/src/a11y.d.ts.map +0 -1
  13. package/dist/examples/src/component.d.ts +0 -3
  14. package/dist/examples/src/component.d.ts.map +0 -1
  15. package/dist/examples/src/compressed-texture.d.ts +0 -1
  16. package/dist/examples/src/compressed-texture.d.ts.map +0 -1
  17. package/dist/examples/src/dragonbone.d.ts +0 -3
  18. package/dist/examples/src/dragonbone.d.ts.map +0 -1
  19. package/dist/examples/src/event.d.ts +0 -3
  20. package/dist/examples/src/event.d.ts.map +0 -1
  21. package/dist/examples/src/graphics.d.ts +0 -3
  22. package/dist/examples/src/graphics.d.ts.map +0 -1
  23. package/dist/examples/src/image.d.ts +0 -3
  24. package/dist/examples/src/image.d.ts.map +0 -1
  25. package/dist/examples/src/loader.d.ts +0 -3
  26. package/dist/examples/src/loader.d.ts.map +0 -1
  27. package/dist/examples/src/lottie.d.ts +0 -3
  28. package/dist/examples/src/lottie.d.ts.map +0 -1
  29. package/dist/examples/src/mask.d.ts +0 -4
  30. package/dist/examples/src/mask.d.ts.map +0 -1
  31. package/dist/examples/src/matter.d.ts +0 -3
  32. package/dist/examples/src/matter.d.ts.map +0 -1
  33. package/dist/examples/src/multi-canvas.d.ts +0 -3
  34. package/dist/examples/src/multi-canvas.d.ts.map +0 -1
  35. package/dist/examples/src/ninePatch.d.ts +0 -3
  36. package/dist/examples/src/ninePatch.d.ts.map +0 -1
  37. package/dist/examples/src/sound.d.ts +0 -3
  38. package/dist/examples/src/sound.d.ts.map +0 -1
  39. package/dist/examples/src/spine.d.ts +0 -3
  40. package/dist/examples/src/spine.d.ts.map +0 -1
  41. package/dist/examples/src/sprite.d.ts +0 -3
  42. package/dist/examples/src/sprite.d.ts.map +0 -1
  43. package/dist/examples/src/spriteAnimation.d.ts +0 -3
  44. package/dist/examples/src/spriteAnimation.d.ts.map +0 -1
  45. package/dist/examples/src/text.d.ts +0 -3
  46. package/dist/examples/src/text.d.ts.map +0 -1
  47. package/dist/examples/src/tilingSprite.d.ts +0 -3
  48. package/dist/examples/src/tilingSprite.d.ts.map +0 -1
  49. package/dist/examples/src/transition.d.ts +0 -3
  50. package/dist/examples/src/transition.d.ts.map +0 -1
  51. package/dist/miniprogram.js +0 -248
  52. package/dist/plugin-renderer-sprite.d.ts +0 -36
@@ -1,3 +0,0 @@
1
- export declare const name = "dragonbone";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=dragonbone.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dragonbone.d.ts","sourceRoot":"","sources":["dragonbone.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,eAAe,CAAC;AACjC,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBA8DhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "event";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=event.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["event.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,UAAU,CAAC;AAC5B,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBAiFhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "graphics";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=graphics.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphics.d.ts","sourceRoot":"","sources":["graphics.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,aAAa,CAAC;AAC/B,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBAsDhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "image";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=image.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["image.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,UAAU,CAAC;AAC5B,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBA8ChC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "loader";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["loader.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,WAAW,CAAC;AAC7B,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBA0HhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "lottie";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=lottie.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lottie.d.ts","sourceRoot":"","sources":["lottie.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,WAAW,CAAC;AAE7B,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBAmHhC"}
@@ -1,4 +0,0 @@
1
- import "@eva/plugin-renderer-sprite";
2
- export declare const name = "mask";
3
- export declare function init(canavs: any): Promise<void>;
4
- //# sourceMappingURL=mask.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mask.d.ts","sourceRoot":"","sources":["mask.ts"],"names":[],"mappings":"AAGA,OAAO,6BAA6B,CAAC;AAErC,eAAO,MAAM,IAAI,SAAS,CAAC;AAC3B,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBAoHhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "matter";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=matter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"matter.d.ts","sourceRoot":"","sources":["matter.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,IAAI,WAAW,CAAC;AAC7B,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBA4ahC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "multi-canavs";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=multi-canvas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multi-canvas.d.ts","sourceRoot":"","sources":["multi-canvas.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,iBAAiB,CAAC;AACnC,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBAoFhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "ninePatch";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=ninePatch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ninePatch.d.ts","sourceRoot":"","sources":["ninePatch.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,cAAc,CAAC;AAChC,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBA2EhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "sound";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=sound.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sound.d.ts","sourceRoot":"","sources":["sound.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI,UAAU,CAAC;AAC5B,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBA2NhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "spine";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=spine.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spine.d.ts","sourceRoot":"","sources":["spine.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,UAAU,CAAC;AAC5B,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBA+DhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "sprite";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=sprite.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sprite.d.ts","sourceRoot":"","sources":["sprite.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,WAAW,CAAC;AAC7B,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBA4HhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "spriteAnimation";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=spriteAnimation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spriteAnimation.d.ts","sourceRoot":"","sources":["spriteAnimation.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,oBAAoB,CAAC;AACtC,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBAwDhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "text";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=text.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["text.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,SAAS,CAAA;AAC1B,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBA+DhC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "tilingSprite";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=tilingSprite.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tilingSprite.d.ts","sourceRoot":"","sources":["tilingSprite.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,iBAAiB,CAAC;AACnC,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBAuChC"}
@@ -1,3 +0,0 @@
1
- export declare const name = "transition";
2
- export declare function init(canvas: any): Promise<void>;
3
- //# sourceMappingURL=transition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["transition.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,eAAe,CAAC;AACjC,wBAAsB,IAAI,CAAC,MAAM,KAAA,iBAoIhC"}
@@ -1,248 +0,0 @@
1
- import { decorators, Component, resource, RESOURCE_TYPE, OBSERVER_TYPE } from '@eva/eva.js/dist/miniprogram';
2
- import { RendererSystem, Renderer } from '@eva/plugin-renderer/dist/miniprogram';
3
- import { Sprite as Sprite$2 } from '@eva/renderer-adapter/dist/miniprogram';
4
- import { BaseTexture, Spritesheet } from '@eva/miniprogram-pixi';
5
-
6
- /*! *****************************************************************************
7
- Copyright (c) Microsoft Corporation.
8
-
9
- Permission to use, copy, modify, and/or distribute this software for any
10
- purpose with or without fee is hereby granted.
11
-
12
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
13
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
15
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
17
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18
- PERFORMANCE OF THIS SOFTWARE.
19
- ***************************************************************************** */
20
- /* global Reflect, Promise */
21
-
22
- var extendStatics = function(d, b) {
23
- extendStatics = Object.setPrototypeOf ||
24
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
26
- return extendStatics(d, b);
27
- };
28
-
29
- function __extends(d, b) {
30
- extendStatics(d, b);
31
- function __() { this.constructor = d; }
32
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33
- }
34
-
35
- function __decorate(decorators, target, key, desc) {
36
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
37
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38
- 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
- return c > 3 && r && Object.defineProperty(target, key, r), r;
40
- }
41
-
42
- function __awaiter(thisArg, _arguments, P, generator) {
43
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
44
- return new (P || (P = Promise))(function (resolve, reject) {
45
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
46
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
47
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
48
- step((generator = generator.apply(thisArg, _arguments || [])).next());
49
- });
50
- }
51
-
52
- function __generator(thisArg, body) {
53
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
54
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
55
- function verb(n) { return function (v) { return step([n, v]); }; }
56
- function step(op) {
57
- if (f) throw new TypeError("Generator is already executing.");
58
- while (_) try {
59
- 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;
60
- if (y = 0, t) op = [op[0] & 2, t.value];
61
- switch (op[0]) {
62
- case 0: case 1: t = op; break;
63
- case 4: _.label++; return { value: op[1], done: false };
64
- case 5: _.label++; y = op[1]; op = [0]; continue;
65
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
66
- default:
67
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
68
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
69
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
70
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
71
- if (t[2]) _.ops.pop();
72
- _.trys.pop(); continue;
73
- }
74
- op = body.call(thisArg, _);
75
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
76
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
77
- }
78
- }
79
-
80
- function __values(o) {
81
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
82
- if (m) return m.call(o);
83
- if (o && typeof o.length === "number") return {
84
- next: function () {
85
- if (o && i >= o.length) o = void 0;
86
- return { value: o && o[i++], done: !o };
87
- }
88
- };
89
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
90
- }
91
-
92
- var Sprite$1 = /** @class */ (function (_super) {
93
- __extends(Sprite, _super);
94
- function Sprite() {
95
- var _this = _super !== null && _super.apply(this, arguments) || this;
96
- _this.resource = '';
97
- _this.spriteName = '';
98
- return _this;
99
- }
100
- Sprite.prototype.init = function (obj) {
101
- if (obj && obj.resource) {
102
- this.resource = obj.resource;
103
- this.spriteName = obj.spriteName;
104
- }
105
- };
106
- Sprite.componentName = 'Sprite';
107
- __decorate([
108
- decorators.IDEProp
109
- ], Sprite.prototype, "resource", void 0);
110
- __decorate([
111
- decorators.IDEProp
112
- ], Sprite.prototype, "spriteName", void 0);
113
- return Sprite;
114
- }(Component));
115
-
116
- var resourceKeySplit = '_s|r|c_'; // Notice: This key be used in ninepatch system.
117
- resource.registerInstance(RESOURCE_TYPE.SPRITE, function (_a) {
118
- var name = _a.name, data = _a.data;
119
- return new Promise(function (r) {
120
- var e_1, _a;
121
- var textureObj = data.json;
122
- var texture = BaseTexture.from(data.image);
123
- var frames = textureObj.frames || {};
124
- var animations = textureObj.animations || {};
125
- var newFrames = {};
126
- for (var key in frames) {
127
- var newKey = name + resourceKeySplit + key;
128
- newFrames[newKey] = frames[key];
129
- }
130
- for (var key in animations) {
131
- var spriteList = [];
132
- if (animations[key] && animations[key].length >= 0) {
133
- try {
134
- for (var _b = (e_1 = void 0, __values(animations[key])), _c = _b.next(); !_c.done; _c = _b.next()) {
135
- var spriteName = _c.value;
136
- var newSpriteName = name + resourceKeySplit + spriteName;
137
- spriteList.push(newSpriteName);
138
- }
139
- }
140
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
141
- finally {
142
- try {
143
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
144
- }
145
- finally { if (e_1) throw e_1.error; }
146
- }
147
- }
148
- animations[key] = spriteList;
149
- }
150
- textureObj.frames = newFrames;
151
- var spriteSheet = new Spritesheet(texture, textureObj);
152
- spriteSheet.parse(function () {
153
- var textures = spriteSheet.textures;
154
- r(textures);
155
- });
156
- });
157
- });
158
- resource.registerDestroy(RESOURCE_TYPE.SPRITE, function (_a) {
159
- var instance = _a.instance;
160
- if (!instance)
161
- return;
162
- for (var key in instance) {
163
- instance[key].destroy(true);
164
- }
165
- });
166
- var Sprite = /** @class */ (function (_super) {
167
- __extends(Sprite, _super);
168
- function Sprite() {
169
- var _this = _super !== null && _super.apply(this, arguments) || this;
170
- _this.name = 'Sprite';
171
- _this.sprites = {};
172
- return _this;
173
- }
174
- Sprite.prototype.init = function () {
175
- this.renderSystem = this.game.getSystem(RendererSystem);
176
- this.renderSystem.rendererManager.register(this);
177
- };
178
- Sprite.prototype.rendererUpdate = function (gameObject) {
179
- var _a = gameObject.transform.size, width = _a.width, height = _a.height;
180
- if (this.sprites[gameObject.id]) {
181
- this.sprites[gameObject.id].sprite.width = width;
182
- this.sprites[gameObject.id].sprite.height = height;
183
- }
184
- };
185
- Sprite.prototype.componentChanged = function (changed) {
186
- return __awaiter(this, void 0, void 0, function () {
187
- var component_1, sprite_1, instance, sprite;
188
- var _this = this;
189
- return __generator(this, function (_a) {
190
- switch (_a.label) {
191
- case 0:
192
- if (!(changed.componentName === 'Sprite')) return [3 /*break*/, 4];
193
- component_1 = changed.component;
194
- if (!(changed.type === OBSERVER_TYPE.ADD)) return [3 /*break*/, 1];
195
- sprite_1 = new Sprite$2(null);
196
- resource.getResource(component_1.resource).then(function (_a) {
197
- var instance = _a.instance;
198
- return __awaiter(_this, void 0, void 0, function () {
199
- return __generator(this, function (_b) {
200
- if (!instance) {
201
- throw new Error("GameObject:" + changed.gameObject.name + "'s Sprite resource load error");
202
- }
203
- sprite_1.image =
204
- instance[component_1.resource + resourceKeySplit + component_1.spriteName];
205
- return [2 /*return*/];
206
- });
207
- });
208
- });
209
- this.sprites[changed.gameObject.id] = sprite_1;
210
- this.containerManager
211
- .getContainer(changed.gameObject.id)
212
- .addChildAt(sprite_1.sprite, 0);
213
- return [3 /*break*/, 4];
214
- case 1:
215
- if (!(changed.type === OBSERVER_TYPE.CHANGE)) return [3 /*break*/, 3];
216
- return [4 /*yield*/, resource.getResource(component_1.resource)];
217
- case 2:
218
- instance = (_a.sent()).instance;
219
- if (!instance) {
220
- throw new Error("GameObject:" + changed.gameObject.name + "'s Sprite resource load error");
221
- }
222
- this.sprites[changed.gameObject.id].image =
223
- instance[component_1.resource + resourceKeySplit + component_1.spriteName];
224
- return [3 /*break*/, 4];
225
- case 3:
226
- if (changed.type === OBSERVER_TYPE.REMOVE) {
227
- sprite = this.sprites[changed.gameObject.id];
228
- this.containerManager
229
- .getContainer(changed.gameObject.id)
230
- .removeChild(sprite.sprite);
231
- delete this.sprites[changed.gameObject.id];
232
- }
233
- _a.label = 4;
234
- case 4: return [2 /*return*/];
235
- }
236
- });
237
- });
238
- };
239
- Sprite.systemName = 'Sprite';
240
- Sprite = __decorate([
241
- decorators.componentObserver({
242
- Sprite: ['spriteName'],
243
- })
244
- ], Sprite);
245
- return Sprite;
246
- }(Renderer));
247
-
248
- export { Sprite$1 as Sprite, Sprite as SpriteSystem };
@@ -1,36 +0,0 @@
1
- import { Component } from '@eva/eva.js';
2
- import { ComponentChanged } from '@eva/eva.js';
3
- import { ContainerManager } from '@eva/plugin-renderer';
4
- import { GameObject } from '@eva/eva.js';
5
- import { Renderer } from '@eva/plugin-renderer';
6
- import { RendererManager } from '@eva/plugin-renderer';
7
- import { RendererSystem } from '@eva/plugin-renderer';
8
- import { Sprite as Sprite_2 } from '@eva/renderer-adapter';
9
-
10
- export declare class Sprite extends Component<SpriteParams> {
11
- static componentName: string;
12
- resource: string;
13
- spriteName: string;
14
- init(obj?: SpriteParams): void;
15
- }
16
-
17
- export declare interface SpriteParams {
18
- resource: string;
19
- spriteName: string;
20
- }
21
-
22
- export declare class SpriteSystem extends Renderer {
23
- static systemName: string;
24
- name: string;
25
- sprites: {
26
- [propName: number]: Sprite_2;
27
- };
28
- renderSystem: RendererSystem;
29
- rendererManager: RendererManager;
30
- containerManager: ContainerManager;
31
- init(): void;
32
- rendererUpdate(gameObject: GameObject): void;
33
- componentChanged(changed: ComponentChanged): Promise<void>;
34
- }
35
-
36
- export { }