@eva/renderer-adapter 1.2.7-editor.7 → 1.2.8-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.
|
@@ -1 +1 @@
|
|
|
1
|
-
window.EVA=window.EVA||{};var _EVA_IIFE_rendererAdapter=function(t,e){"use strict";var i=function(t,e){return
|
|
1
|
+
window.EVA=window.EVA||{};var _EVA_IIFE_rendererAdapter=function(t,e){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function n(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var r=function(t){function e(e){return e.autoStart=!1,t.call(this,e)||this}return n(e,t),e}(e.Application),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(e.Container),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(e.Graphics),u=function(t){function i(i,n,r,o,a){var u;return u="string"===i?e.Texture.fromFrame(i):e.Texture.from(i),t.call(this,u,n,r,o,a)||this}return n(i,t),i}(e.mesh.NineSlicePlane),p=function(){function t(t){this._image=null,this._image=t,t?t instanceof HTMLImageElement?this.sprite=e.Sprite.from(t):t instanceof e.Texture&&(this.sprite=new e.Sprite(t)):this.sprite=new e.Sprite}return Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(t){this._image!==t&&(t instanceof HTMLImageElement?(this.sprite.texture&&this.sprite.texture.destroy(!1),this.sprite.texture=e.Texture.from(t)):t instanceof e.Texture&&(this.sprite.texture=t),this._image=t)},enumerable:!1,configurable:!0}),t}(),s=function(){function t(t){var i=t.frames;this.animatedSprite=new e.extras.AnimatedSprite(i)}return t.prototype.play=function(){this.animatedSprite.play()},t.prototype.stop=function(){this.animatedSprite.stop()},t.prototype.gotoAndPlay=function(t){this.animatedSprite.gotoAndPlay(t)},t.prototype.gotoAndStop=function(t){this.animatedSprite.gotoAndStop(t)},Object.defineProperty(t.prototype,"speed",{get:function(){return this.animatedSprite.animationSpeed},set:function(t){this.animatedSprite.animationSpeed=t},enumerable:!1,configurable:!0}),t}(),c=function(t){function e(e,i){return t.call(this,e,i)||this}return n(e,t),e}(e.Text),f=e.extras.TilingSprite,h=function(){function t(t){this._image=null,this._image=t,t?t instanceof HTMLImageElement?this.tilingSprite=new f(e.Texture.from(t)):t instanceof e.Texture&&(this.tilingSprite=new f(t)):this.tilingSprite=new f(e.Texture.EMPTY)}return Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(t){this._image!==t&&(t instanceof HTMLImageElement?this.tilingSprite.texture=e.Texture.from(t):t instanceof e.Texture&&(this.tilingSprite.texture=t),this._image=t)},enumerable:!1,configurable:!0}),t}();return t.Application=r,t.Container=o,t.Graphics=a,t.NinePatch=u,t.Sprite=p,t.SpriteAnimation=s,t.Text=c,t.TilingSprite=h,Object.defineProperty(t,"__esModule",{value:!0}),t}({},PIXI);window.EVA.rendererAdapter=window.EVA.rendererAdapter||_EVA_IIFE_rendererAdapter;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("pixi.js"),e=function(t,i){return
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("pixi.js"),e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,i)};
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
package/package.json
CHANGED
package/dist/miniprogram.js
DELETED
|
@@ -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 };
|