@eva/plugin-renderer-lottie 1.1.1-fix.1 → 1.1.1-fix.2

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.
@@ -0,0 +1,69 @@
1
+ import { Component } from '@eva/eva.js';
2
+ import { ComponentChanged } from '@eva/eva.js';
3
+ import { ContainerManager } from '@eva/plugin-renderer';
4
+ import { Renderer } from '@eva/plugin-renderer';
5
+ import { RendererManager } from '@eva/plugin-renderer';
6
+
7
+ declare interface ExtendOptions extends IOptions {
8
+ autoStart: boolean;
9
+ }
10
+
11
+ declare interface IExpandOpts {
12
+ repeats?: number;
13
+ infinite?: boolean;
14
+ slot?: Array<{
15
+ name: string;
16
+ type: 'TEXT' | 'IMAGE';
17
+ value: string;
18
+ style: {
19
+ [key: string]: any;
20
+ };
21
+ }>;
22
+ }
23
+
24
+ declare interface IOptions {
25
+ resource: string;
26
+ width?: number;
27
+ height?: number;
28
+ }
29
+
30
+ export declare class Lottie extends Component<IOptions> {
31
+ slot: {
32
+ [key: string]: string;
33
+ };
34
+ static componentName: string;
35
+ static application: any;
36
+ anim: any;
37
+ options: ExtendOptions;
38
+ loadStatus: boolean;
39
+ firstPlay: () => void | null;
40
+ slotCache: {
41
+ [key: string]: any;
42
+ };
43
+ prevSlot: {
44
+ [name: string]: any;
45
+ };
46
+ currentSlot: {
47
+ [name: string]: any;
48
+ };
49
+ constructor(options: IOptions);
50
+ play(params?: number[], expandOpts?: IExpandOpts): void;
51
+ playParamsHandle(params: any): any[];
52
+ onTap(name: any, callback: any): void;
53
+ }
54
+
55
+ export declare class LottieSystem extends Renderer {
56
+ static systemName: string;
57
+ manager: any;
58
+ app: any;
59
+ renderSystem: any;
60
+ rendererManager: RendererManager;
61
+ containerManager: ContainerManager;
62
+ managerLife: string[];
63
+ init(): void;
64
+ componentChanged(changed: ComponentChanged): Promise<void>;
65
+ add(changed: ComponentChanged): Promise<void>;
66
+ remove(changed: ComponentChanged): void;
67
+ }
68
+
69
+ export { }
@@ -5069,7 +5069,7 @@ var LottieSystem = (function (_super) {
5069
5069
  return _this;
5070
5070
  }
5071
5071
  LottieSystem.prototype.init = function () {
5072
- this.renderSystem = this.game.systems.find(function (s) { return s.application; });
5072
+ this.renderSystem = this.game.getSystem('Renderer');
5073
5073
  this.app = this.renderSystem.application;
5074
5074
  };
5075
5075
  LottieSystem.prototype.componentChanged = function (changed) {
@@ -5126,7 +5126,7 @@ var LottieSystem = (function (_super) {
5126
5126
  var container = this.renderSystem.containerManager.getContainer(changed.gameObject.id);
5127
5127
  if (container) {
5128
5128
  container.removeChild(component.anim.group);
5129
- component.anim.group.destory(true);
5129
+ component.anim.destroy();
5130
5130
  }
5131
5131
  component.anim = null;
5132
5132
  };
@@ -5231,11 +5231,10 @@ var Lottie = (function (_super) {
5231
5231
  });
5232
5232
  };
5233
5233
  Lottie.componentName = 'Lottie';
5234
- __decorate([
5235
- decorators.IDEProp
5236
- ], Lottie.prototype, "slot", void 0);
5237
5234
  return Lottie;
5238
5235
  }(Component));
5239
5236
  var Lottie$1 = Lottie;
5240
5237
 
5238
+ resource.registerResourceType('LOTTIE');
5239
+
5241
5240
  export { Lottie$1 as Lottie, LottieSystem$1 as LottieSystem };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eva/plugin-renderer-lottie",
3
- "version": "1.1.1-fix.1",
3
+ "version": "1.1.1-fix.2",
4
4
  "description": "@eva/plugin-renderer-lottie",
5
5
  "main": "index.js",
6
6
  "module": "dist/plugin-renderer-lottie.esm.js",
@@ -18,8 +18,8 @@
18
18
  "license": "MIT",
19
19
  "homepage": "https://eva.js.org",
20
20
  "dependencies": {
21
- "@eva/eva.js": "1.1.1-fix.1",
22
- "@eva/plugin-renderer": "1.1.1-fix.1",
21
+ "@eva/eva.js": "1.1.1-fix.2",
22
+ "@eva/plugin-renderer": "1.1.1-fix.2",
23
23
  "ios-version": "^1.0.1",
24
24
  "pixi.js": "^4.8.7"
25
25
  }