@eva/renderer-adapter 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/dist/miniprogram.js +0 -200
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eva/renderer-adapter",
3
- "version": "1.2.7-editor.6",
3
+ "version": "1.2.7-editor.9",
4
4
  "description": "@eva/renderer-adapter",
5
5
  "main": "index.js",
6
6
  "module": "dist/renderer-adapter.esm.js",
@@ -1,200 +0,0 @@
1
- import { __extends } from 'tslib';
2
- import { Application as Application$2, Container as Container$2, Graphics as Graphics$2, Texture, mesh, Sprite as Sprite$2, extras, Text as Text$2 } from '@eva/miniprogram-pixi';
3
- import { Image } from '@eva/miniprogram-adapter';
4
-
5
- var Application = function (_super) {
6
- __extends(Application, _super);
7
-
8
- function Application(params) {
9
- var _this = this;
10
-
11
- params.autoStart = false;
12
- _this = _super.call(this, params) || this;
13
- return _this;
14
- }
15
-
16
- return Application;
17
- }(Application$2);
18
-
19
- var Application$1 = Application;
20
-
21
- var Container = function (_super) {
22
- __extends(Container, _super);
23
-
24
- function Container() {
25
- return _super !== null && _super.apply(this, arguments) || this;
26
- }
27
-
28
- return Container;
29
- }(Container$2);
30
-
31
- var Container$1 = Container;
32
-
33
- var Graphics = function (_super) {
34
- __extends(Graphics, _super);
35
-
36
- function Graphics() {
37
- return _super !== null && _super.apply(this, arguments) || this;
38
- }
39
-
40
- return Graphics;
41
- }(Graphics$2);
42
-
43
- var Graphics$1 = Graphics;
44
-
45
- var NinePatch = function (_super) {
46
- __extends(NinePatch, _super);
47
-
48
- function NinePatch(img, leftWidth, topHeight, rightWidth, bottomHeight) {
49
- var _this = this;
50
-
51
- var texture;
52
-
53
- if (img === 'string') {
54
- texture = Texture.fromFrame(img);
55
- } else {
56
- texture = Texture.from(img);
57
- }
58
-
59
- _this = _super.call(this, texture, leftWidth, topHeight, rightWidth, bottomHeight) || this;
60
- return _this;
61
- }
62
-
63
- return NinePatch;
64
- }(mesh.NineSlicePlane);
65
-
66
- var NinePatch$1 = NinePatch;
67
-
68
- var Sprite = function () {
69
- function Sprite(image) {
70
- this._image = null;
71
- this._image = image;
72
-
73
- if (image) {
74
- if (image instanceof Image) {
75
- this.sprite = Sprite$2.from(image);
76
- } else if (image instanceof Texture) {
77
- this.sprite = new Sprite$2(image);
78
- }
79
- } else {
80
- this.sprite = new Sprite$2();
81
- }
82
- }
83
-
84
- Object.defineProperty(Sprite.prototype, "image", {
85
- get: function get() {
86
- return this._image;
87
- },
88
- set: function set(val) {
89
- if (this._image === val) {
90
- return;
91
- }
92
-
93
- if (val instanceof Image) {
94
- this.sprite.texture && this.sprite.texture.destroy(false);
95
- this.sprite.texture = Texture.from(val);
96
- } else if (val instanceof Texture) {
97
- this.sprite.texture = val;
98
- }
99
-
100
- this._image = val;
101
- },
102
- enumerable: false,
103
- configurable: true
104
- });
105
- return Sprite;
106
- }();
107
-
108
- var Sprite$1 = Sprite;
109
-
110
- var SpriteAnimation = function () {
111
- function SpriteAnimation(_a) {
112
- var frames = _a.frames;
113
- this.animatedSprite = new extras.AnimatedSprite(frames);
114
- }
115
-
116
- SpriteAnimation.prototype.play = function () {
117
- this.animatedSprite.play();
118
- };
119
-
120
- SpriteAnimation.prototype.stop = function () {
121
- this.animatedSprite.stop();
122
- };
123
-
124
- SpriteAnimation.prototype.gotoAndPlay = function (frameNumber) {
125
- this.animatedSprite.gotoAndPlay(frameNumber);
126
- };
127
-
128
- SpriteAnimation.prototype.gotoAndStop = function (frameNumber) {
129
- this.animatedSprite.gotoAndStop(frameNumber);
130
- };
131
-
132
- Object.defineProperty(SpriteAnimation.prototype, "speed", {
133
- get: function get() {
134
- return this.animatedSprite.animationSpeed;
135
- },
136
- set: function set(val) {
137
- this.animatedSprite.animationSpeed = val;
138
- },
139
- enumerable: false,
140
- configurable: true
141
- });
142
- return SpriteAnimation;
143
- }();
144
-
145
- var SpriteAnimation$1 = SpriteAnimation;
146
-
147
- var Text = function (_super) {
148
- __extends(Text, _super);
149
-
150
- function Text(text, style) {
151
- return _super.call(this, text, style) || this;
152
- }
153
-
154
- return Text;
155
- }(Text$2);
156
-
157
- var Text$1 = Text;
158
- var PIXITilingSprite = extras.TilingSprite;
159
-
160
- var TilingSprite = function () {
161
- function TilingSprite(image) {
162
- this._image = null;
163
- this._image = image;
164
-
165
- if (image) {
166
- if (image instanceof Image) {
167
- this.tilingSprite = new PIXITilingSprite(Texture.from(image));
168
- } else if (image instanceof Texture) {
169
- this.tilingSprite = new PIXITilingSprite(image);
170
- }
171
- } else {
172
- this.tilingSprite = new PIXITilingSprite(Texture.EMPTY);
173
- }
174
- }
175
-
176
- Object.defineProperty(TilingSprite.prototype, "image", {
177
- get: function get() {
178
- return this._image;
179
- },
180
- set: function set(val) {
181
- if (this._image === val) {
182
- return;
183
- }
184
-
185
- if (val instanceof Image) {
186
- this.tilingSprite.texture = Texture.from(val);
187
- } else if (val instanceof Texture) {
188
- this.tilingSprite.texture = val;
189
- }
190
-
191
- this._image = val;
192
- },
193
- enumerable: false,
194
- configurable: true
195
- });
196
- return TilingSprite;
197
- }();
198
-
199
- var TilingSprite$1 = TilingSprite;
200
- export { Application$1 as Application, Container$1 as Container, Graphics$1 as Graphics, NinePatch$1 as NinePatch, Sprite$1 as Sprite, SpriteAnimation$1 as SpriteAnimation, Text$1 as Text, TilingSprite$1 as TilingSprite };