@eva/renderer-adapter 1.2.7-fix.4 → 1.2.7-fix.5

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,4 +1,5 @@
1
1
  window.EVA = window.EVA || {};
2
+
2
3
  var _EVA_IIFE_rendererAdapter = function (exports, pixi_js) {
3
4
  'use strict';
4
5
 
@@ -12,62 +13,88 @@ var _EVA_IIFE_rendererAdapter = function (exports, pixi_js) {
12
13
  if (b.hasOwnProperty(p)) d[p] = b[p];
13
14
  }
14
15
  };
16
+
15
17
  return _extendStatics(d, b);
16
18
  };
19
+
17
20
  function __extends(d, b) {
18
21
  _extendStatics(d, b);
22
+
19
23
  function __() {
20
24
  this.constructor = d;
21
25
  }
26
+
22
27
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23
28
  }
29
+
24
30
  var Application = function (_super) {
25
31
  __extends(Application, _super);
32
+
26
33
  function Application(params) {
27
34
  var _this = this;
35
+
28
36
  params.autoStart = false;
29
37
  _this = _super.call(this, params) || this;
30
38
  return _this;
31
39
  }
40
+
32
41
  return Application;
33
42
  }(pixi_js.Application);
43
+
34
44
  var Application$1 = Application;
45
+
35
46
  var Container = function (_super) {
36
47
  __extends(Container, _super);
48
+
37
49
  function Container() {
38
50
  return _super !== null && _super.apply(this, arguments) || this;
39
51
  }
52
+
40
53
  return Container;
41
54
  }(pixi_js.Container);
55
+
42
56
  var Container$1 = Container;
57
+
43
58
  var Graphics = function (_super) {
44
59
  __extends(Graphics, _super);
60
+
45
61
  function Graphics() {
46
62
  return _super !== null && _super.apply(this, arguments) || this;
47
63
  }
64
+
48
65
  return Graphics;
49
66
  }(pixi_js.Graphics);
67
+
50
68
  var Graphics$1 = Graphics;
69
+
51
70
  var NinePatch = function (_super) {
52
71
  __extends(NinePatch, _super);
72
+
53
73
  function NinePatch(img, leftWidth, topHeight, rightWidth, bottomHeight) {
54
74
  var _this = this;
75
+
55
76
  var texture;
77
+
56
78
  if (img === 'string') {
57
79
  texture = pixi_js.Texture.fromFrame(img);
58
80
  } else {
59
81
  texture = pixi_js.Texture.from(img);
60
82
  }
83
+
61
84
  _this = _super.call(this, texture, leftWidth, topHeight, rightWidth, bottomHeight) || this;
62
85
  return _this;
63
86
  }
87
+
64
88
  return NinePatch;
65
89
  }(pixi_js.mesh.NineSlicePlane);
90
+
66
91
  var NinePatch$1 = NinePatch;
92
+
67
93
  var Sprite = function () {
68
94
  function Sprite(image) {
69
95
  this._image = null;
70
96
  this._image = image;
97
+
71
98
  if (image) {
72
99
  if (image instanceof HTMLImageElement) {
73
100
  this.sprite = pixi_js.Sprite.from(image);
@@ -78,6 +105,7 @@ var _EVA_IIFE_rendererAdapter = function (exports, pixi_js) {
78
105
  this.sprite = new pixi_js.Sprite();
79
106
  }
80
107
  }
108
+
81
109
  Object.defineProperty(Sprite.prototype, "image", {
82
110
  get: function get() {
83
111
  return this._image;
@@ -86,12 +114,14 @@ var _EVA_IIFE_rendererAdapter = function (exports, pixi_js) {
86
114
  if (this._image === val) {
87
115
  return;
88
116
  }
117
+
89
118
  if (val instanceof HTMLImageElement) {
90
119
  this.sprite.texture && this.sprite.texture.destroy(false);
91
120
  this.sprite.texture = pixi_js.Texture.from(val);
92
121
  } else if (val instanceof pixi_js.Texture) {
93
122
  this.sprite.texture = val;
94
123
  }
124
+
95
125
  this._image = val;
96
126
  },
97
127
  enumerable: false,
@@ -99,24 +129,31 @@ var _EVA_IIFE_rendererAdapter = function (exports, pixi_js) {
99
129
  });
100
130
  return Sprite;
101
131
  }();
132
+
102
133
  var Sprite$1 = Sprite;
134
+
103
135
  var SpriteAnimation = function () {
104
136
  function SpriteAnimation(_a) {
105
137
  var frames = _a.frames;
106
138
  this.animatedSprite = new pixi_js.extras.AnimatedSprite(frames);
107
139
  }
140
+
108
141
  SpriteAnimation.prototype.play = function () {
109
142
  this.animatedSprite.play();
110
143
  };
144
+
111
145
  SpriteAnimation.prototype.stop = function () {
112
146
  this.animatedSprite.stop();
113
147
  };
148
+
114
149
  SpriteAnimation.prototype.gotoAndPlay = function (frameNumber) {
115
150
  this.animatedSprite.gotoAndPlay(frameNumber);
116
151
  };
152
+
117
153
  SpriteAnimation.prototype.gotoAndStop = function (frameNumber) {
118
154
  this.animatedSprite.gotoAndStop(frameNumber);
119
155
  };
156
+
120
157
  Object.defineProperty(SpriteAnimation.prototype, "speed", {
121
158
  get: function get() {
122
159
  return this.animatedSprite.animationSpeed;
@@ -129,20 +166,27 @@ var _EVA_IIFE_rendererAdapter = function (exports, pixi_js) {
129
166
  });
130
167
  return SpriteAnimation;
131
168
  }();
169
+
132
170
  var SpriteAnimation$1 = SpriteAnimation;
171
+
133
172
  var Text = function (_super) {
134
173
  __extends(Text, _super);
174
+
135
175
  function Text(text, style) {
136
176
  return _super.call(this, text, style) || this;
137
177
  }
178
+
138
179
  return Text;
139
180
  }(pixi_js.Text);
181
+
140
182
  var Text$1 = Text;
141
183
  var PIXITilingSprite = pixi_js.extras.TilingSprite;
184
+
142
185
  var TilingSprite = function () {
143
186
  function TilingSprite(image) {
144
187
  this._image = null;
145
188
  this._image = image;
189
+
146
190
  if (image) {
147
191
  if (image instanceof HTMLImageElement) {
148
192
  this.tilingSprite = new PIXITilingSprite(pixi_js.Texture.from(image));
@@ -153,6 +197,7 @@ var _EVA_IIFE_rendererAdapter = function (exports, pixi_js) {
153
197
  this.tilingSprite = new PIXITilingSprite(pixi_js.Texture.EMPTY);
154
198
  }
155
199
  }
200
+
156
201
  Object.defineProperty(TilingSprite.prototype, "image", {
157
202
  get: function get() {
158
203
  return this._image;
@@ -161,11 +206,13 @@ var _EVA_IIFE_rendererAdapter = function (exports, pixi_js) {
161
206
  if (this._image === val) {
162
207
  return;
163
208
  }
209
+
164
210
  if (val instanceof HTMLImageElement) {
165
211
  this.tilingSprite.texture = pixi_js.Texture.from(val);
166
212
  } else if (val instanceof pixi_js.Texture) {
167
213
  this.tilingSprite.texture = val;
168
214
  }
215
+
169
216
  this._image = val;
170
217
  },
171
218
  enumerable: false,
@@ -173,6 +220,7 @@ var _EVA_IIFE_rendererAdapter = function (exports, pixi_js) {
173
220
  });
174
221
  return TilingSprite;
175
222
  }();
223
+
176
224
  var TilingSprite$1 = TilingSprite;
177
225
  exports.Application = Application$1;
178
226
  exports.Container = Container$1;
@@ -187,4 +235,5 @@ var _EVA_IIFE_rendererAdapter = function (exports, pixi_js) {
187
235
  });
188
236
  return exports;
189
237
  }({}, PIXI);
238
+
190
239
  window.EVA.rendererAdapter = window.EVA.rendererAdapter || _EVA_IIFE_rendererAdapter;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EVA.rendererAdapter.js","sources":["../../../node_modules/tslib/tslib.es6.js","../lib/Application.ts","../lib/Container.ts","../lib/Graphics.ts","../lib/NinePatch.ts","../lib/Sprite.ts","../lib/SpriteAnimation.ts","../lib/Text.ts","../lib/TilingSprite.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { Application as PIXIApplication } from 'pixi.js';\nexport default class Application extends PIXIApplication {\n constructor(params?: any) {\n params.autoStart = false;\n super(params);\n }\n [propName: string]: any;\n}\n","import { Container as PIXIContainer } from 'pixi.js';\n\nexport default class Container extends PIXIContainer {\n [propName: string]: any;\n}\n","import { Graphics as PIXIGraphics } from 'pixi.js';\nexport default class Graphics extends PIXIGraphics {\n [propName: string]: any;\n}\n","import { Texture, mesh } from 'pixi.js';\n\nexport default class NinePatch extends mesh.NineSlicePlane {\n constructor(img, leftWidth, topHeight, rightWidth, bottomHeight) {\n let texture;\n if (img === 'string') {\n texture = Texture.fromFrame(img);\n } else {\n texture = Texture.from(img);\n }\n super(texture, leftWidth, topHeight, rightWidth, bottomHeight);\n }\n}\n","import { Texture as PIXITexture, Sprite as PIXISprite } from 'pixi.js';\n\nexport default class Sprite {\n _image: HTMLImageElement | PIXITexture = null;\n public sprite: PIXISprite;\n constructor(image: HTMLImageElement | PIXITexture) {\n this._image = image;\n if (image) {\n if (image instanceof HTMLImageElement) {\n this.sprite = PIXISprite.from(image as any);\n } else if (image instanceof PIXITexture) {\n this.sprite = new PIXISprite(image);\n }\n } else {\n this.sprite = new PIXISprite();\n }\n }\n set image(val) {\n if (this._image === val) {\n return;\n }\n\n if (val instanceof HTMLImageElement) {\n this.sprite.texture && this.sprite.texture.destroy(false);\n this.sprite.texture = PIXITexture.from(val);\n } else if (val instanceof PIXITexture) {\n this.sprite.texture = val;\n }\n this._image = val;\n }\n get image() {\n return this._image;\n }\n}\n","import { extras } from 'pixi.js';\n\nexport default class SpriteAnimation {\n animatedSprite: extras.AnimatedSprite;\n constructor({ frames }) {\n this.animatedSprite = new extras.AnimatedSprite(frames);\n }\n play() {\n this.animatedSprite.play();\n }\n stop() {\n this.animatedSprite.stop();\n }\n gotoAndPlay(frameNumber) {\n this.animatedSprite.gotoAndPlay(frameNumber);\n }\n gotoAndStop(frameNumber) {\n this.animatedSprite.gotoAndStop(frameNumber);\n }\n set speed(val) {\n this.animatedSprite.animationSpeed = val;\n }\n get speed() {\n return this.animatedSprite.animationSpeed;\n }\n}\n","import { Text as PIXIText } from 'pixi.js';\n\nexport default class Text extends PIXIText {\n text: string;\n style: any;\n width: number;\n height: number;\n constructor(text, style) {\n super(text, style);\n }\n}\n","import { Texture as PIXITexture, extras } from 'pixi.js';\nconst PIXITilingSprite = extras.TilingSprite;\n\nexport default class TilingSprite {\n _image: HTMLImageElement | PIXITexture = null;\n // public tilingSprite: PIXI.extras.TilingSprite;\n public tilingSprite: any;\n constructor(image: HTMLImageElement | PIXITexture) {\n this._image = image;\n if (image) {\n if (image instanceof HTMLImageElement) {\n this.tilingSprite = new PIXITilingSprite(PIXITexture.from(image));\n } else if (image instanceof PIXITexture) {\n this.tilingSprite = new PIXITilingSprite(image);\n }\n } else {\n this.tilingSprite = new PIXITilingSprite(PIXITexture.EMPTY);\n }\n }\n set image(val) {\n if (this._image === val) {\n return;\n }\n\n if (val instanceof HTMLImageElement) {\n this.tilingSprite.texture = PIXITexture.from(val);\n } else if (val instanceof PIXITexture) {\n this.tilingSprite.texture = val;\n }\n this._image = val;\n }\n get image() {\n return this._image;\n }\n}\n"],"names":["PIXIApplication","PIXIContainer","PIXIGraphics","Texture","mesh","PIXISprite","PIXITexture","extras","PIXIText"],"mappings":";;;;;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AC;IAE7C;QAIE,sBAAY,KAAqC;YAHjD,WAAM,GAAmC,IAAI,CAAC;YAI5C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,KAAK,EAAE;gBACT,IAAI,KAAK,YAAY,gBAAgB,EAAE;oBACrC,IAAI,CAAC,YAAY,GAAG,IAAI,gBAAgB,CAACD,eAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;iBACnE;qBAAM,IAAI,KAAK,YAAYA,eAAW,EAAE;oBACvC,IAAI,CAAC,YAAY,GAAG,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;iBACjD;aACF;iBAAM;gBACL,IAAI,CAAC,YAAY,GAAG,IAAI,gBAAgB,CAACA,eAAW,CAAC,KAAK,CAAC,CAAC;aAC7D;SACF;QACD,sBAAI,+BAAK;iBAYT;gBACE,OAAO,IAAI,CAAC,MAAM,CAAC;aACpB;iBAdD,UAAU,GAAG;gBACX,IAAI,IAAI,CAAC,MAAM,KAAK,GAAG,EAAE;oBACvB,OAAO;iBACR;gBAED,IAAI,GAAG,YAAY,gBAAgB,EAAE;oBACnC,IAAI,CAAC,YAAY,CAAC,OAAO,GAAGA,eAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnD;qBAAM,IAAI,GAAG,YAAYA,eAAW,EAAE;oBACrC,IAAI,CAAC,YAAY,CAAC,OAAO,GAAG,GAAG,CAAC;iBACjC;gBACD,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;aACnB;;;WAAA;QAIH,mBAAC;IAAD,CAAC,IAAA;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
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])},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=o,u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(e.Graphics),p=u,s=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),c=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}(),f=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}(),h=function(t){function e(e,i){return t.call(this,e,i)||this}return n(e,t),e}(e.Text),l=e.extras.TilingSprite,m=function(){function t(t){this._image=null,this._image=t,t?t instanceof HTMLImageElement?this.tilingSprite=new l(e.Texture.from(t)):t instanceof e.Texture&&(this.tilingSprite=new l(t)):this.tilingSprite=new l(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=a,t.Graphics=p,t.NinePatch=s,t.Sprite=c,t.SpriteAnimation=f,t.Text=h,t.TilingSprite=m,Object.defineProperty(t,"__esModule",{value:!0}),t}({},PIXI);window.EVA.rendererAdapter=window.EVA.rendererAdapter||_EVA_IIFE_rendererAdapter;
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,53 +1,75 @@
1
1
  import { __extends } from 'tslib';
2
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
3
  import { Image } from '@eva/miniprogram-adapter';
4
+
4
5
  var Application = function (_super) {
5
6
  __extends(Application, _super);
7
+
6
8
  function Application(params) {
7
9
  var _this = this;
10
+
8
11
  params.autoStart = false;
9
12
  _this = _super.call(this, params) || this;
10
13
  return _this;
11
14
  }
15
+
12
16
  return Application;
13
17
  }(Application$2);
18
+
14
19
  var Application$1 = Application;
20
+
15
21
  var Container = function (_super) {
16
22
  __extends(Container, _super);
23
+
17
24
  function Container() {
18
25
  return _super !== null && _super.apply(this, arguments) || this;
19
26
  }
27
+
20
28
  return Container;
21
29
  }(Container$2);
30
+
22
31
  var Container$1 = Container;
32
+
23
33
  var Graphics = function (_super) {
24
34
  __extends(Graphics, _super);
35
+
25
36
  function Graphics() {
26
37
  return _super !== null && _super.apply(this, arguments) || this;
27
38
  }
39
+
28
40
  return Graphics;
29
41
  }(Graphics$2);
42
+
30
43
  var Graphics$1 = Graphics;
44
+
31
45
  var NinePatch = function (_super) {
32
46
  __extends(NinePatch, _super);
47
+
33
48
  function NinePatch(img, leftWidth, topHeight, rightWidth, bottomHeight) {
34
49
  var _this = this;
50
+
35
51
  var texture;
52
+
36
53
  if (img === 'string') {
37
54
  texture = Texture.fromFrame(img);
38
55
  } else {
39
56
  texture = Texture.from(img);
40
57
  }
58
+
41
59
  _this = _super.call(this, texture, leftWidth, topHeight, rightWidth, bottomHeight) || this;
42
60
  return _this;
43
61
  }
62
+
44
63
  return NinePatch;
45
64
  }(mesh.NineSlicePlane);
65
+
46
66
  var NinePatch$1 = NinePatch;
67
+
47
68
  var Sprite = function () {
48
69
  function Sprite(image) {
49
70
  this._image = null;
50
71
  this._image = image;
72
+
51
73
  if (image) {
52
74
  if (image instanceof Image) {
53
75
  this.sprite = Sprite$2.from(image);
@@ -58,6 +80,7 @@ var Sprite = function () {
58
80
  this.sprite = new Sprite$2();
59
81
  }
60
82
  }
83
+
61
84
  Object.defineProperty(Sprite.prototype, "image", {
62
85
  get: function get() {
63
86
  return this._image;
@@ -66,12 +89,14 @@ var Sprite = function () {
66
89
  if (this._image === val) {
67
90
  return;
68
91
  }
92
+
69
93
  if (val instanceof Image) {
70
94
  this.sprite.texture && this.sprite.texture.destroy(false);
71
95
  this.sprite.texture = Texture.from(val);
72
96
  } else if (val instanceof Texture) {
73
97
  this.sprite.texture = val;
74
98
  }
99
+
75
100
  this._image = val;
76
101
  },
77
102
  enumerable: false,
@@ -79,24 +104,31 @@ var Sprite = function () {
79
104
  });
80
105
  return Sprite;
81
106
  }();
107
+
82
108
  var Sprite$1 = Sprite;
109
+
83
110
  var SpriteAnimation = function () {
84
111
  function SpriteAnimation(_a) {
85
112
  var frames = _a.frames;
86
113
  this.animatedSprite = new extras.AnimatedSprite(frames);
87
114
  }
115
+
88
116
  SpriteAnimation.prototype.play = function () {
89
117
  this.animatedSprite.play();
90
118
  };
119
+
91
120
  SpriteAnimation.prototype.stop = function () {
92
121
  this.animatedSprite.stop();
93
122
  };
123
+
94
124
  SpriteAnimation.prototype.gotoAndPlay = function (frameNumber) {
95
125
  this.animatedSprite.gotoAndPlay(frameNumber);
96
126
  };
127
+
97
128
  SpriteAnimation.prototype.gotoAndStop = function (frameNumber) {
98
129
  this.animatedSprite.gotoAndStop(frameNumber);
99
130
  };
131
+
100
132
  Object.defineProperty(SpriteAnimation.prototype, "speed", {
101
133
  get: function get() {
102
134
  return this.animatedSprite.animationSpeed;
@@ -109,20 +141,27 @@ var SpriteAnimation = function () {
109
141
  });
110
142
  return SpriteAnimation;
111
143
  }();
144
+
112
145
  var SpriteAnimation$1 = SpriteAnimation;
146
+
113
147
  var Text = function (_super) {
114
148
  __extends(Text, _super);
149
+
115
150
  function Text(text, style) {
116
151
  return _super.call(this, text, style) || this;
117
152
  }
153
+
118
154
  return Text;
119
155
  }(Text$2);
156
+
120
157
  var Text$1 = Text;
121
158
  var PIXITilingSprite = extras.TilingSprite;
159
+
122
160
  var TilingSprite = function () {
123
161
  function TilingSprite(image) {
124
162
  this._image = null;
125
163
  this._image = image;
164
+
126
165
  if (image) {
127
166
  if (image instanceof Image) {
128
167
  this.tilingSprite = new PIXITilingSprite(Texture.from(image));
@@ -133,6 +172,7 @@ var TilingSprite = function () {
133
172
  this.tilingSprite = new PIXITilingSprite(Texture.EMPTY);
134
173
  }
135
174
  }
175
+
136
176
  Object.defineProperty(TilingSprite.prototype, "image", {
137
177
  get: function get() {
138
178
  return this._image;
@@ -141,11 +181,13 @@ var TilingSprite = function () {
141
181
  if (this._image === val) {
142
182
  return;
143
183
  }
184
+
144
185
  if (val instanceof Image) {
145
186
  this.tilingSprite.texture = Texture.from(val);
146
187
  } else if (val instanceof Texture) {
147
188
  this.tilingSprite.texture = val;
148
189
  }
190
+
149
191
  this._image = val;
150
192
  },
151
193
  enumerable: false,
@@ -153,5 +195,6 @@ var TilingSprite = function () {
153
195
  });
154
196
  return TilingSprite;
155
197
  }();
198
+
156
199
  var TilingSprite$1 = TilingSprite;
157
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 };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer-adapter.cjs.js","sources":["../lib/Application.ts","../lib/Container.ts","../lib/Graphics.ts","../lib/NinePatch.ts","../lib/Sprite.ts","../lib/SpriteAnimation.ts","../lib/Text.ts","../lib/TilingSprite.ts"],"sourcesContent":["import { Application as PIXIApplication } from 'pixi.js';\nexport default class Application extends PIXIApplication {\n constructor(params?: any) {\n params.autoStart = false;\n super(params);\n }\n [propName: string]: any;\n}\n","import { Container as PIXIContainer } from 'pixi.js';\n\nexport default class Container extends PIXIContainer {\n [propName: string]: any;\n}\n","import { Graphics as PIXIGraphics } from 'pixi.js';\nexport default class Graphics extends PIXIGraphics {\n [propName: string]: any;\n}\n","import { Texture, mesh } from 'pixi.js';\n\nexport default class NinePatch extends mesh.NineSlicePlane {\n constructor(img, leftWidth, topHeight, rightWidth, bottomHeight) {\n let texture;\n if (img === 'string') {\n texture = Texture.fromFrame(img);\n } else {\n texture = Texture.from(img);\n }\n super(texture, leftWidth, topHeight, rightWidth, bottomHeight);\n }\n}\n","import { Texture as PIXITexture, Sprite as PIXISprite } from 'pixi.js';\n\nexport default class Sprite {\n _image: HTMLImageElement | PIXITexture = null;\n public sprite: PIXISprite;\n constructor(image: HTMLImageElement | PIXITexture) {\n this._image = image;\n if (image) {\n if (image instanceof HTMLImageElement) {\n this.sprite = PIXISprite.from(image as any);\n } else if (image instanceof PIXITexture) {\n this.sprite = new PIXISprite(image);\n }\n } else {\n this.sprite = new PIXISprite();\n }\n }\n set image(val) {\n if (this._image === val) {\n return;\n }\n\n if (val instanceof HTMLImageElement) {\n this.sprite.texture && this.sprite.texture.destroy(false);\n this.sprite.texture = PIXITexture.from(val);\n } else if (val instanceof PIXITexture) {\n this.sprite.texture = val;\n }\n this._image = val;\n }\n get image() {\n return this._image;\n }\n}\n","import { extras } from 'pixi.js';\n\nexport default class SpriteAnimation {\n animatedSprite: extras.AnimatedSprite;\n constructor({ frames }) {\n this.animatedSprite = new extras.AnimatedSprite(frames);\n }\n play() {\n this.animatedSprite.play();\n }\n stop() {\n this.animatedSprite.stop();\n }\n gotoAndPlay(frameNumber) {\n this.animatedSprite.gotoAndPlay(frameNumber);\n }\n gotoAndStop(frameNumber) {\n this.animatedSprite.gotoAndStop(frameNumber);\n }\n set speed(val) {\n this.animatedSprite.animationSpeed = val;\n }\n get speed() {\n return this.animatedSprite.animationSpeed;\n }\n}\n","import { Text as PIXIText } from 'pixi.js';\n\nexport default class Text extends PIXIText {\n text: string;\n style: any;\n width: number;\n height: number;\n constructor(text, style) {\n super(text, style);\n }\n}\n","import { Texture as PIXITexture, extras } from 'pixi.js';\nconst PIXITilingSprite = extras.TilingSprite;\n\nexport default class TilingSprite {\n _image: HTMLImageElement | PIXITexture = null;\n // public tilingSprite: PIXI.extras.TilingSprite;\n public tilingSprite: any;\n constructor(image: HTMLImageElement | PIXITexture) {\n this._image = image;\n if (image) {\n if (image instanceof HTMLImageElement) {\n this.tilingSprite = new PIXITilingSprite(PIXITexture.from(image));\n } else if (image instanceof PIXITexture) {\n this.tilingSprite = new PIXITilingSprite(image);\n }\n } else {\n this.tilingSprite = new PIXITilingSprite(PIXITexture.EMPTY);\n }\n }\n set image(val) {\n if (this._image === val) {\n return;\n }\n\n if (val instanceof HTMLImageElement) {\n this.tilingSprite.texture = PIXITexture.from(val);\n } else if (val instanceof PIXITexture) {\n this.tilingSprite.texture = val;\n }\n this._image = val;\n }\n get image() {\n return this._image;\n }\n}\n"],"names":["PIXIApplication","PIXIContainer","PIXIGraphics","Texture","mesh","PIXISprite","PIXITexture","extras","PIXIText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;IAAyC,+BAAe;IACtD,qBAAY,MAAY;QAAxB,iBAGC;QAFC,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC;QACzB,QAAA,kBAAM,MAAM,CAAC,SAAC;;KACf;IAEH,kBAAC;AAAD,CANA,CAAyCA,mBAAe,GAMvD;;;ACLD;IAAuC,6BAAa;IAApD;;KAEC;IAAD,gBAAC;AAAD,CAFA,CAAuCC,iBAAa,GAEnD;;;ACHD;IAAsC,4BAAY;IAAlD;;KAEC;IAAD,eAAC;AAAD,CAFA,CAAsCC,gBAAY,GAEjD;;;ACDD;IAAuC,6BAAmB;IACxD,mBAAY,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY;QAA/D,iBAQC;QAPC,IAAI,OAAO,CAAC;QACZ,IAAI,GAAG,KAAK,QAAQ,EAAE;YACpB,OAAO,GAAGC,eAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;SAClC;aAAM;YACL,OAAO,GAAGA,eAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC7B;QACD,QAAA,kBAAM,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,CAAC,SAAC;;KAChE;IACH,gBAAC;AAAD,CAAC,CAVsCC,YAAI,CAAC,cAAc,GAUzD;;;ACVD;IAGE,gBAAY,KAAqC;QAFjD,WAAM,GAAmC,IAAI,CAAC;QAG5C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,KAAK,EAAE;YACT,IAAI,KAAK,YAAY,gBAAgB,EAAE;gBACrC,IAAI,CAAC,MAAM,GAAGC,cAAU,CAAC,IAAI,CAAC,KAAY,CAAC,CAAC;aAC7C;iBAAM,IAAI,KA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G,GAAG,CAAC;aACjC;YACD,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;SACnB;;;OAAA;IAIH,mBAAC;AAAD,CAAC,IAAA;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
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])},e(t,i)};
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer-adapter.esm.js","sources":["../lib/Application.ts","../lib/Container.ts","../lib/Graphics.ts","../lib/NinePatch.ts","../lib/Sprite.ts","../lib/SpriteAnimation.ts","../lib/Text.ts","../lib/TilingSprite.ts"],"sourcesContent":["import { Application as PIXIApplication } from 'pixi.js';\nexport default class Application extends PIXIApplication {\n constructor(params?: any) {\n params.autoStart = false;\n super(params);\n }\n [propName: string]: any;\n}\n","import { Container as PIXIContainer } from 'pixi.js';\n\nexport default class Container extends PIXIContainer {\n [propName: string]: any;\n}\n","import { Graphics as PIXIGraphics } from 'pixi.js';\nexport default class Graphics extends PIXIGraphics {\n [propName: string]: any;\n}\n","import { Texture, mesh } from 'pixi.js';\n\nexport default class NinePatch extends mesh.NineSlicePlane {\n constructor(img, leftWidth, topHeight, rightWidth, bottomHeight) {\n let texture;\n if (img === 'string') {\n texture = Texture.fromFrame(img);\n } else {\n texture = Texture.from(img);\n }\n super(texture, leftWidth, topHeight, rightWidth, bottomHeight);\n }\n}\n","import { Texture as PIXITexture, Sprite as PIXISprite } from 'pixi.js';\n\nexport default class Sprite {\n _image: HTMLImageElement | PIXITexture = null;\n public sprite: PIXISprite;\n constructor(image: HTMLImageElement | PIXITexture) {\n this._image = image;\n if (image) {\n if (image instanceof HTMLImageElement) {\n this.sprite = PIXISprite.from(image as any);\n } else if (image instanceof PIXITexture) {\n this.sprite = new PIXISprite(image);\n }\n } else {\n this.sprite = new PIXISprite();\n }\n }\n set image(val) {\n if (this._image === val) {\n return;\n }\n\n if (val instanceof HTMLImageElement) {\n this.sprite.texture && this.sprite.texture.destroy(false);\n this.sprite.texture = PIXITexture.from(val);\n } else if (val instanceof PIXITexture) {\n this.sprite.texture = val;\n }\n this._image = val;\n }\n get image() {\n return this._image;\n }\n}\n","import { extras } from 'pixi.js';\n\nexport default class SpriteAnimation {\n animatedSprite: extras.AnimatedSprite;\n constructor({ frames }) {\n this.animatedSprite = new extras.AnimatedSprite(frames);\n }\n play() {\n this.animatedSprite.play();\n }\n stop() {\n this.animatedSprite.stop();\n }\n gotoAndPlay(frameNumber) {\n this.animatedSprite.gotoAndPlay(frameNumber);\n }\n gotoAndStop(frameNumber) {\n this.animatedSprite.gotoAndStop(frameNumber);\n }\n set speed(val) {\n this.animatedSprite.animationSpeed = val;\n }\n get speed() {\n return this.animatedSprite.animationSpeed;\n }\n}\n","import { Text as PIXIText } from 'pixi.js';\n\nexport default class Text extends PIXIText {\n text: string;\n style: any;\n width: number;\n height: number;\n constructor(text, style) {\n super(text, style);\n }\n}\n","import { Texture as PIXITexture, extras } from 'pixi.js';\nconst PIXITilingSprite = extras.TilingSprite;\n\nexport default class TilingSprite {\n _image: HTMLImageElement | PIXITexture = null;\n // public tilingSprite: PIXI.extras.TilingSprite;\n public tilingSprite: any;\n constructor(image: HTMLImageElement | PIXITexture) {\n this._image = image;\n if (image) {\n if (image instanceof HTMLImageElement) {\n this.tilingSprite = new PIXITilingSprite(PIXITexture.from(image));\n } else if (image instanceof PIXITexture) {\n this.tilingSprite = new PIXITilingSprite(image);\n }\n } else {\n this.tilingSprite = new PIXITilingSprite(PIXITexture.EMPTY);\n }\n }\n set image(val) {\n if (this._image === val) {\n return;\n }\n\n if (val instanceof HTMLImageElement) {\n this.tilingSprite.texture = PIXITexture.from(val);\n } else if (val instanceof PIXITexture) {\n this.tilingSprite.texture = val;\n }\n this._image = val;\n }\n get image() {\n return this._image;\n }\n}\n"],"names":["PIXIApplication","PIXIContainer","PIXIGraphics","PIXISprite","PIXITexture","PIXIText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;IAAyC,+BAAe;IACtD,qBAAY,MAAY;QAAxB,iBAGC;QAFC,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC;QACzB,QAAA,kBAAM,MAAM,CAAC,SAAC;;KACf;IAEH,kBAAC;AAAD,CANA,CAAyCA,aAAe,GAMvD;;;ACLD;IAAuC,6BAAa;IAApD;;KAEC;IAAD,gBAAC;AAAD,CAFA,CAAuCC,WAAa,GAEnD;;;ACHD;IAAsC,4BAAY;IAAlD;;KAEC;IAAD,eAAC;AAAD,CAFA,CAAsCC,UAAY,GAEjD;;;ACDD;IAAuC,6BAAmB;IACxD,mBAAY,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY;QAA/D,iBAQC;QAPC,IAAI,OAAO,CAAC;QACZ,IAAI,GAAG,KAAK,QAAQ,EAAE;YACpB,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;SAClC;aAAM;YACL,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC7B;QACD,QAAA,kBAAM,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,CAAC,SAAC;;KAChE;IACH,gBAAC;AAAD,CAAC,CAVsC,IAAI,CAAC,cAAc,GAUzD;;;ACVD;IAGE,gBAAY,KAAqC;QAFjD,WAAM,GAAmC,IAAI,CAAC;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,GAAG,YAAY,gBAAgB,EAAE;gBACnC,IAAI,CAAC,YAAY,CAAC,OAAO,GAAGA,OAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACnD;iBAAM,IAAI,GAAG,YAAYA,OAAW,EAAE;gBACrC,IAAI,CAAC,YAAY,CAAC,OAAO,GAAG,GAAG,CAAC;aACjC;YACD,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;SACnB;;;OAAA;IAIH,mBAAC;AAAD,CAAC,IAAA;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eva/renderer-adapter",
3
- "version": "1.2.7-fix.4",
3
+ "version": "1.2.7-fix.5",
4
4
  "description": "@eva/renderer-adapter",
5
5
  "main": "index.js",
6
6
  "module": "dist/renderer-adapter.esm.js",