@eva/plugin-a11y 1.2.0-alpha.6 → 1.2.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.
- package/dist/EVA.plugin.a11y.js +10 -2464
- package/dist/EVA.plugin.a11y.min.js +1 -1
- package/dist/plugin-a11y.cjs.js +2 -919
- package/dist/plugin-a11y.cjs.prod.js +1 -1
- package/dist/plugin-a11y.esm.js +2 -914
- package/package.json +3 -2
package/dist/EVA.plugin.a11y.js
CHANGED
|
@@ -3,11 +3,11 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
this.EVA = this.EVA || {};
|
|
4
4
|
this.EVA.plugin = this.EVA.plugin || {};
|
|
5
5
|
|
|
6
|
-
this.EVA.plugin.a11y = function (exports, eva_js,
|
|
6
|
+
this.EVA.plugin.a11y = function (exports, eva_js, pluginRenderer) {
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var _extendStatics
|
|
10
|
-
_extendStatics
|
|
9
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
10
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
11
11
|
__proto__: []
|
|
12
12
|
} instanceof Array && function (d, b) {
|
|
13
13
|
d.__proto__ = b;
|
|
@@ -17,11 +17,11 @@ this.EVA.plugin.a11y = function (exports, eva_js, pixi_js) {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
return _extendStatics
|
|
20
|
+
return _extendStatics(d, b);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
function __extends
|
|
24
|
-
_extendStatics
|
|
23
|
+
function __extends(d, b) {
|
|
24
|
+
_extendStatics(d, b);
|
|
25
25
|
|
|
26
26
|
function __() {
|
|
27
27
|
this.constructor = d;
|
|
@@ -216,2460 +216,6 @@ this.EVA.plugin.a11y = function (exports, eva_js, pixi_js) {
|
|
|
216
216
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
function __read(o, n) {
|
|
220
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
221
|
-
if (!m) return o;
|
|
222
|
-
var i = m.call(o),
|
|
223
|
-
r,
|
|
224
|
-
ar = [],
|
|
225
|
-
e;
|
|
226
|
-
|
|
227
|
-
try {
|
|
228
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
229
|
-
ar.push(r.value);
|
|
230
|
-
}
|
|
231
|
-
} catch (error) {
|
|
232
|
-
e = {
|
|
233
|
-
error: error
|
|
234
|
-
};
|
|
235
|
-
} finally {
|
|
236
|
-
try {
|
|
237
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
238
|
-
} finally {
|
|
239
|
-
if (e) throw e.error;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
return ar;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
function __spread() {
|
|
247
|
-
for (var ar = [], i = 0; i < arguments.length; i++) {
|
|
248
|
-
ar = ar.concat(__read(arguments[i]));
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
return ar;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
var _extendStatics = function extendStatics(d, b) {
|
|
255
|
-
_extendStatics = Object.setPrototypeOf || {
|
|
256
|
-
__proto__: []
|
|
257
|
-
} instanceof Array && function (d, b) {
|
|
258
|
-
d.__proto__ = b;
|
|
259
|
-
} || function (d, b) {
|
|
260
|
-
for (var p in b) {
|
|
261
|
-
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
return _extendStatics(d, b);
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
function __extends(d, b) {
|
|
269
|
-
_extendStatics(d, b);
|
|
270
|
-
|
|
271
|
-
function __() {
|
|
272
|
-
this.constructor = d;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
var Application = function (_super) {
|
|
279
|
-
__extends(Application, _super);
|
|
280
|
-
|
|
281
|
-
function Application(params) {
|
|
282
|
-
var _this = this;
|
|
283
|
-
|
|
284
|
-
params.autoStart = false;
|
|
285
|
-
_this = _super.call(this, params) || this;
|
|
286
|
-
return _this;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
return Application;
|
|
290
|
-
}(pixi_js.Application);
|
|
291
|
-
|
|
292
|
-
var Application$1 = Application;
|
|
293
|
-
|
|
294
|
-
var Container = function (_super) {
|
|
295
|
-
__extends(Container, _super);
|
|
296
|
-
|
|
297
|
-
function Container() {
|
|
298
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
return Container;
|
|
302
|
-
}(pixi_js.Container);
|
|
303
|
-
|
|
304
|
-
var Container$1 = Container;
|
|
305
|
-
|
|
306
|
-
(function (_super) {
|
|
307
|
-
__extends(Graphics, _super);
|
|
308
|
-
|
|
309
|
-
function Graphics() {
|
|
310
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
return Graphics;
|
|
314
|
-
})(pixi_js.Graphics);
|
|
315
|
-
|
|
316
|
-
(function (_super) {
|
|
317
|
-
__extends(NinePatch, _super);
|
|
318
|
-
|
|
319
|
-
function NinePatch(img, leftWidth, topHeight, rightWidth, bottomHeight) {
|
|
320
|
-
var _this = this;
|
|
321
|
-
|
|
322
|
-
var texture;
|
|
323
|
-
|
|
324
|
-
if (img === 'string') {
|
|
325
|
-
texture = pixi_js.Texture.fromFrame(img);
|
|
326
|
-
} else {
|
|
327
|
-
texture = pixi_js.Texture.from(img);
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
_this = _super.call(this, texture, leftWidth, topHeight, rightWidth, bottomHeight) || this;
|
|
331
|
-
return _this;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
return NinePatch;
|
|
335
|
-
})(pixi_js.mesh.NineSlicePlane);
|
|
336
|
-
|
|
337
|
-
(function () {
|
|
338
|
-
function Sprite(image) {
|
|
339
|
-
this._image = null;
|
|
340
|
-
this._image = image;
|
|
341
|
-
|
|
342
|
-
if (image) {
|
|
343
|
-
if (image instanceof HTMLImageElement) {
|
|
344
|
-
this.sprite = pixi_js.Sprite.from(image);
|
|
345
|
-
} else if (image instanceof pixi_js.Texture) {
|
|
346
|
-
this.sprite = new pixi_js.Sprite(image);
|
|
347
|
-
}
|
|
348
|
-
} else {
|
|
349
|
-
this.sprite = new pixi_js.Sprite();
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
Object.defineProperty(Sprite.prototype, "image", {
|
|
354
|
-
get: function get() {
|
|
355
|
-
return this._image;
|
|
356
|
-
},
|
|
357
|
-
set: function set(val) {
|
|
358
|
-
if (this._image === val) {
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
if (val instanceof HTMLImageElement) {
|
|
363
|
-
this.sprite.texture && this.sprite.texture.destroy(false);
|
|
364
|
-
this.sprite.texture = pixi_js.Texture.from(val);
|
|
365
|
-
} else if (val instanceof pixi_js.Texture) {
|
|
366
|
-
this.sprite.texture = val;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
this._image = val;
|
|
370
|
-
},
|
|
371
|
-
enumerable: false,
|
|
372
|
-
configurable: true
|
|
373
|
-
});
|
|
374
|
-
return Sprite;
|
|
375
|
-
})();
|
|
376
|
-
|
|
377
|
-
(function () {
|
|
378
|
-
function SpriteAnimation(_a) {
|
|
379
|
-
var frames = _a.frames;
|
|
380
|
-
this.animatedSprite = new pixi_js.extras.AnimatedSprite(frames);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
SpriteAnimation.prototype.play = function () {
|
|
384
|
-
this.animatedSprite.play();
|
|
385
|
-
};
|
|
386
|
-
|
|
387
|
-
SpriteAnimation.prototype.stop = function () {
|
|
388
|
-
this.animatedSprite.stop();
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
SpriteAnimation.prototype.gotoAndPlay = function (frameNumber) {
|
|
392
|
-
this.animatedSprite.gotoAndPlay(frameNumber);
|
|
393
|
-
};
|
|
394
|
-
|
|
395
|
-
SpriteAnimation.prototype.gotoAndStop = function (frameNumber) {
|
|
396
|
-
this.animatedSprite.gotoAndStop(frameNumber);
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
Object.defineProperty(SpriteAnimation.prototype, "speed", {
|
|
400
|
-
get: function get() {
|
|
401
|
-
return this.animatedSprite.animationSpeed;
|
|
402
|
-
},
|
|
403
|
-
set: function set(val) {
|
|
404
|
-
this.animatedSprite.animationSpeed = val;
|
|
405
|
-
},
|
|
406
|
-
enumerable: false,
|
|
407
|
-
configurable: true
|
|
408
|
-
});
|
|
409
|
-
return SpriteAnimation;
|
|
410
|
-
})();
|
|
411
|
-
|
|
412
|
-
(function (_super) {
|
|
413
|
-
__extends(Text, _super);
|
|
414
|
-
|
|
415
|
-
function Text(text, style) {
|
|
416
|
-
return _super.call(this, text, style) || this;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
return Text;
|
|
420
|
-
})(pixi_js.Text);
|
|
421
|
-
|
|
422
|
-
var PIXITilingSprite = pixi_js.extras.TilingSprite;
|
|
423
|
-
|
|
424
|
-
(function () {
|
|
425
|
-
function TilingSprite(image) {
|
|
426
|
-
this._image = null;
|
|
427
|
-
this._image = image;
|
|
428
|
-
|
|
429
|
-
if (image) {
|
|
430
|
-
if (image instanceof HTMLImageElement) {
|
|
431
|
-
this.tilingSprite = new PIXITilingSprite(pixi_js.Texture.from(image));
|
|
432
|
-
} else if (image instanceof pixi_js.Texture) {
|
|
433
|
-
this.tilingSprite = new PIXITilingSprite(image);
|
|
434
|
-
}
|
|
435
|
-
} else {
|
|
436
|
-
this.tilingSprite = new PIXITilingSprite(pixi_js.Texture.EMPTY);
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
Object.defineProperty(TilingSprite.prototype, "image", {
|
|
441
|
-
get: function get() {
|
|
442
|
-
return this._image;
|
|
443
|
-
},
|
|
444
|
-
set: function set(val) {
|
|
445
|
-
if (this._image === val) {
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
if (val instanceof HTMLImageElement) {
|
|
450
|
-
this.tilingSprite.texture = pixi_js.Texture.from(val);
|
|
451
|
-
} else if (val instanceof pixi_js.Texture) {
|
|
452
|
-
this.tilingSprite.texture = val;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
this._image = val;
|
|
456
|
-
},
|
|
457
|
-
enumerable: false,
|
|
458
|
-
configurable: true
|
|
459
|
-
});
|
|
460
|
-
return TilingSprite;
|
|
461
|
-
})();
|
|
462
|
-
|
|
463
|
-
function listCacheClear() {
|
|
464
|
-
this.__data__ = [];
|
|
465
|
-
this.size = 0;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
function eq(value, other) {
|
|
469
|
-
return value === other || value !== value && other !== other;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
function assocIndexOf(array, key) {
|
|
473
|
-
var length = array.length;
|
|
474
|
-
|
|
475
|
-
while (length--) {
|
|
476
|
-
if (eq(array[length][0], key)) {
|
|
477
|
-
return length;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
return -1;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
var arrayProto = Array.prototype;
|
|
485
|
-
var splice = arrayProto.splice;
|
|
486
|
-
|
|
487
|
-
function listCacheDelete(key) {
|
|
488
|
-
var data = this.__data__,
|
|
489
|
-
index = assocIndexOf(data, key);
|
|
490
|
-
|
|
491
|
-
if (index < 0) {
|
|
492
|
-
return false;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
var lastIndex = data.length - 1;
|
|
496
|
-
|
|
497
|
-
if (index == lastIndex) {
|
|
498
|
-
data.pop();
|
|
499
|
-
} else {
|
|
500
|
-
splice.call(data, index, 1);
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
--this.size;
|
|
504
|
-
return true;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
function listCacheGet(key) {
|
|
508
|
-
var data = this.__data__,
|
|
509
|
-
index = assocIndexOf(data, key);
|
|
510
|
-
return index < 0 ? undefined : data[index][1];
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
function listCacheHas(key) {
|
|
514
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
function listCacheSet(key, value) {
|
|
518
|
-
var data = this.__data__,
|
|
519
|
-
index = assocIndexOf(data, key);
|
|
520
|
-
|
|
521
|
-
if (index < 0) {
|
|
522
|
-
++this.size;
|
|
523
|
-
data.push([key, value]);
|
|
524
|
-
} else {
|
|
525
|
-
data[index][1] = value;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
return this;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
function ListCache(entries) {
|
|
532
|
-
var index = -1,
|
|
533
|
-
length = entries == null ? 0 : entries.length;
|
|
534
|
-
this.clear();
|
|
535
|
-
|
|
536
|
-
while (++index < length) {
|
|
537
|
-
var entry = entries[index];
|
|
538
|
-
this.set(entry[0], entry[1]);
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
ListCache.prototype.clear = listCacheClear;
|
|
543
|
-
ListCache.prototype['delete'] = listCacheDelete;
|
|
544
|
-
ListCache.prototype.get = listCacheGet;
|
|
545
|
-
ListCache.prototype.has = listCacheHas;
|
|
546
|
-
ListCache.prototype.set = listCacheSet;
|
|
547
|
-
|
|
548
|
-
function stackClear() {
|
|
549
|
-
this.__data__ = new ListCache();
|
|
550
|
-
this.size = 0;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
function stackDelete(key) {
|
|
554
|
-
var data = this.__data__,
|
|
555
|
-
result = data['delete'](key);
|
|
556
|
-
this.size = data.size;
|
|
557
|
-
return result;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
function stackGet(key) {
|
|
561
|
-
return this.__data__.get(key);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
function stackHas(key) {
|
|
565
|
-
return this.__data__.has(key);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
569
|
-
var freeGlobal$1 = freeGlobal;
|
|
570
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
571
|
-
var root = freeGlobal$1 || freeSelf || Function('return this')();
|
|
572
|
-
var root$1 = root;
|
|
573
|
-
var Symbol$1 = root$1.Symbol;
|
|
574
|
-
var Symbol$2 = Symbol$1;
|
|
575
|
-
var objectProto$b = Object.prototype;
|
|
576
|
-
var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
|
|
577
|
-
var nativeObjectToString$1 = objectProto$b.toString;
|
|
578
|
-
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
|
|
579
|
-
|
|
580
|
-
function getRawTag(value) {
|
|
581
|
-
var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
|
|
582
|
-
tag = value[symToStringTag$1];
|
|
583
|
-
|
|
584
|
-
try {
|
|
585
|
-
value[symToStringTag$1] = undefined;
|
|
586
|
-
var unmasked = true;
|
|
587
|
-
} catch (e) {}
|
|
588
|
-
|
|
589
|
-
var result = nativeObjectToString$1.call(value);
|
|
590
|
-
|
|
591
|
-
if (unmasked) {
|
|
592
|
-
if (isOwn) {
|
|
593
|
-
value[symToStringTag$1] = tag;
|
|
594
|
-
} else {
|
|
595
|
-
delete value[symToStringTag$1];
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
return result;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
var objectProto$a = Object.prototype;
|
|
603
|
-
var nativeObjectToString = objectProto$a.toString;
|
|
604
|
-
|
|
605
|
-
function objectToString(value) {
|
|
606
|
-
return nativeObjectToString.call(value);
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
var nullTag = '[object Null]',
|
|
610
|
-
undefinedTag = '[object Undefined]';
|
|
611
|
-
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : undefined;
|
|
612
|
-
|
|
613
|
-
function baseGetTag(value) {
|
|
614
|
-
if (value == null) {
|
|
615
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
function isObject(value) {
|
|
622
|
-
var type = typeof value;
|
|
623
|
-
return value != null && (type == 'object' || type == 'function');
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
var asyncTag = '[object AsyncFunction]',
|
|
627
|
-
funcTag$1 = '[object Function]',
|
|
628
|
-
genTag = '[object GeneratorFunction]',
|
|
629
|
-
proxyTag = '[object Proxy]';
|
|
630
|
-
|
|
631
|
-
function isFunction(value) {
|
|
632
|
-
if (!isObject(value)) {
|
|
633
|
-
return false;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
var tag = baseGetTag(value);
|
|
637
|
-
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
var coreJsData = root$1['__core-js_shared__'];
|
|
641
|
-
var coreJsData$1 = coreJsData;
|
|
642
|
-
|
|
643
|
-
var maskSrcKey = function () {
|
|
644
|
-
var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || '');
|
|
645
|
-
return uid ? 'Symbol(src)_1.' + uid : '';
|
|
646
|
-
}();
|
|
647
|
-
|
|
648
|
-
function isMasked(func) {
|
|
649
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
var funcProto$1 = Function.prototype;
|
|
653
|
-
var funcToString$1 = funcProto$1.toString;
|
|
654
|
-
|
|
655
|
-
function toSource(func) {
|
|
656
|
-
if (func != null) {
|
|
657
|
-
try {
|
|
658
|
-
return funcToString$1.call(func);
|
|
659
|
-
} catch (e) {}
|
|
660
|
-
|
|
661
|
-
try {
|
|
662
|
-
return func + '';
|
|
663
|
-
} catch (e) {}
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
return '';
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
670
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
671
|
-
var funcProto = Function.prototype,
|
|
672
|
-
objectProto$9 = Object.prototype;
|
|
673
|
-
var funcToString = funcProto.toString;
|
|
674
|
-
var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
|
|
675
|
-
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
|
676
|
-
|
|
677
|
-
function baseIsNative(value) {
|
|
678
|
-
if (!isObject(value) || isMasked(value)) {
|
|
679
|
-
return false;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
683
|
-
return pattern.test(toSource(value));
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
function getValue(object, key) {
|
|
687
|
-
return object == null ? undefined : object[key];
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
function getNative(object, key) {
|
|
691
|
-
var value = getValue(object, key);
|
|
692
|
-
return baseIsNative(value) ? value : undefined;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
var Map$1 = getNative(root$1, 'Map');
|
|
696
|
-
var Map$2 = Map$1;
|
|
697
|
-
var nativeCreate = getNative(Object, 'create');
|
|
698
|
-
var nativeCreate$1 = nativeCreate;
|
|
699
|
-
|
|
700
|
-
function hashClear() {
|
|
701
|
-
this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
|
|
702
|
-
this.size = 0;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
function hashDelete(key) {
|
|
706
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
707
|
-
this.size -= result ? 1 : 0;
|
|
708
|
-
return result;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
|
|
712
|
-
var objectProto$8 = Object.prototype;
|
|
713
|
-
var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
|
|
714
|
-
|
|
715
|
-
function hashGet(key) {
|
|
716
|
-
var data = this.__data__;
|
|
717
|
-
|
|
718
|
-
if (nativeCreate$1) {
|
|
719
|
-
var result = data[key];
|
|
720
|
-
return result === HASH_UNDEFINED$2 ? undefined : result;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
var objectProto$7 = Object.prototype;
|
|
727
|
-
var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
|
|
728
|
-
|
|
729
|
-
function hashHas(key) {
|
|
730
|
-
var data = this.__data__;
|
|
731
|
-
return nativeCreate$1 ? data[key] !== undefined : hasOwnProperty$5.call(data, key);
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
735
|
-
|
|
736
|
-
function hashSet(key, value) {
|
|
737
|
-
var data = this.__data__;
|
|
738
|
-
this.size += this.has(key) ? 0 : 1;
|
|
739
|
-
data[key] = nativeCreate$1 && value === undefined ? HASH_UNDEFINED$1 : value;
|
|
740
|
-
return this;
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
function Hash(entries) {
|
|
744
|
-
var index = -1,
|
|
745
|
-
length = entries == null ? 0 : entries.length;
|
|
746
|
-
this.clear();
|
|
747
|
-
|
|
748
|
-
while (++index < length) {
|
|
749
|
-
var entry = entries[index];
|
|
750
|
-
this.set(entry[0], entry[1]);
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
Hash.prototype.clear = hashClear;
|
|
755
|
-
Hash.prototype['delete'] = hashDelete;
|
|
756
|
-
Hash.prototype.get = hashGet;
|
|
757
|
-
Hash.prototype.has = hashHas;
|
|
758
|
-
Hash.prototype.set = hashSet;
|
|
759
|
-
|
|
760
|
-
function mapCacheClear() {
|
|
761
|
-
this.size = 0;
|
|
762
|
-
this.__data__ = {
|
|
763
|
-
'hash': new Hash(),
|
|
764
|
-
'map': new (Map$2 || ListCache)(),
|
|
765
|
-
'string': new Hash()
|
|
766
|
-
};
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
function isKeyable(value) {
|
|
770
|
-
var type = typeof value;
|
|
771
|
-
return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
function getMapData(map, key) {
|
|
775
|
-
var data = map.__data__;
|
|
776
|
-
return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
function mapCacheDelete(key) {
|
|
780
|
-
var result = getMapData(this, key)['delete'](key);
|
|
781
|
-
this.size -= result ? 1 : 0;
|
|
782
|
-
return result;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
function mapCacheGet(key) {
|
|
786
|
-
return getMapData(this, key).get(key);
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
function mapCacheHas(key) {
|
|
790
|
-
return getMapData(this, key).has(key);
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
function mapCacheSet(key, value) {
|
|
794
|
-
var data = getMapData(this, key),
|
|
795
|
-
size = data.size;
|
|
796
|
-
data.set(key, value);
|
|
797
|
-
this.size += data.size == size ? 0 : 1;
|
|
798
|
-
return this;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
function MapCache(entries) {
|
|
802
|
-
var index = -1,
|
|
803
|
-
length = entries == null ? 0 : entries.length;
|
|
804
|
-
this.clear();
|
|
805
|
-
|
|
806
|
-
while (++index < length) {
|
|
807
|
-
var entry = entries[index];
|
|
808
|
-
this.set(entry[0], entry[1]);
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
MapCache.prototype.clear = mapCacheClear;
|
|
813
|
-
MapCache.prototype['delete'] = mapCacheDelete;
|
|
814
|
-
MapCache.prototype.get = mapCacheGet;
|
|
815
|
-
MapCache.prototype.has = mapCacheHas;
|
|
816
|
-
MapCache.prototype.set = mapCacheSet;
|
|
817
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
818
|
-
|
|
819
|
-
function stackSet(key, value) {
|
|
820
|
-
var data = this.__data__;
|
|
821
|
-
|
|
822
|
-
if (data instanceof ListCache) {
|
|
823
|
-
var pairs = data.__data__;
|
|
824
|
-
|
|
825
|
-
if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
826
|
-
pairs.push([key, value]);
|
|
827
|
-
this.size = ++data.size;
|
|
828
|
-
return this;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
data = this.__data__ = new MapCache(pairs);
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
data.set(key, value);
|
|
835
|
-
this.size = data.size;
|
|
836
|
-
return this;
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
function Stack(entries) {
|
|
840
|
-
var data = this.__data__ = new ListCache(entries);
|
|
841
|
-
this.size = data.size;
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
Stack.prototype.clear = stackClear;
|
|
845
|
-
Stack.prototype['delete'] = stackDelete;
|
|
846
|
-
Stack.prototype.get = stackGet;
|
|
847
|
-
Stack.prototype.has = stackHas;
|
|
848
|
-
Stack.prototype.set = stackSet;
|
|
849
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
850
|
-
|
|
851
|
-
function setCacheAdd(value) {
|
|
852
|
-
this.__data__.set(value, HASH_UNDEFINED);
|
|
853
|
-
|
|
854
|
-
return this;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
function setCacheHas(value) {
|
|
858
|
-
return this.__data__.has(value);
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
function SetCache(values) {
|
|
862
|
-
var index = -1,
|
|
863
|
-
length = values == null ? 0 : values.length;
|
|
864
|
-
this.__data__ = new MapCache();
|
|
865
|
-
|
|
866
|
-
while (++index < length) {
|
|
867
|
-
this.add(values[index]);
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
872
|
-
SetCache.prototype.has = setCacheHas;
|
|
873
|
-
|
|
874
|
-
function arraySome(array, predicate) {
|
|
875
|
-
var index = -1,
|
|
876
|
-
length = array == null ? 0 : array.length;
|
|
877
|
-
|
|
878
|
-
while (++index < length) {
|
|
879
|
-
if (predicate(array[index], index, array)) {
|
|
880
|
-
return true;
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
return false;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
function cacheHas(cache, key) {
|
|
888
|
-
return cache.has(key);
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
var COMPARE_PARTIAL_FLAG$3 = 1,
|
|
892
|
-
COMPARE_UNORDERED_FLAG$1 = 2;
|
|
893
|
-
|
|
894
|
-
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
895
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
|
|
896
|
-
arrLength = array.length,
|
|
897
|
-
othLength = other.length;
|
|
898
|
-
|
|
899
|
-
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
900
|
-
return false;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
var arrStacked = stack.get(array);
|
|
904
|
-
var othStacked = stack.get(other);
|
|
905
|
-
|
|
906
|
-
if (arrStacked && othStacked) {
|
|
907
|
-
return arrStacked == other && othStacked == array;
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
var index = -1,
|
|
911
|
-
result = true,
|
|
912
|
-
seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : undefined;
|
|
913
|
-
stack.set(array, other);
|
|
914
|
-
stack.set(other, array);
|
|
915
|
-
|
|
916
|
-
while (++index < arrLength) {
|
|
917
|
-
var arrValue = array[index],
|
|
918
|
-
othValue = other[index];
|
|
919
|
-
|
|
920
|
-
if (customizer) {
|
|
921
|
-
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
if (compared !== undefined) {
|
|
925
|
-
if (compared) {
|
|
926
|
-
continue;
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
result = false;
|
|
930
|
-
break;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
if (seen) {
|
|
934
|
-
if (!arraySome(other, function (othValue, othIndex) {
|
|
935
|
-
if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
936
|
-
return seen.push(othIndex);
|
|
937
|
-
}
|
|
938
|
-
})) {
|
|
939
|
-
result = false;
|
|
940
|
-
break;
|
|
941
|
-
}
|
|
942
|
-
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
943
|
-
result = false;
|
|
944
|
-
break;
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
stack['delete'](array);
|
|
949
|
-
stack['delete'](other);
|
|
950
|
-
return result;
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
var Uint8Array$1 = root$1.Uint8Array;
|
|
954
|
-
var Uint8Array$2 = Uint8Array$1;
|
|
955
|
-
|
|
956
|
-
function mapToArray(map) {
|
|
957
|
-
var index = -1,
|
|
958
|
-
result = Array(map.size);
|
|
959
|
-
map.forEach(function (value, key) {
|
|
960
|
-
result[++index] = [key, value];
|
|
961
|
-
});
|
|
962
|
-
return result;
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
function setToArray(set) {
|
|
966
|
-
var index = -1,
|
|
967
|
-
result = Array(set.size);
|
|
968
|
-
set.forEach(function (value) {
|
|
969
|
-
result[++index] = value;
|
|
970
|
-
});
|
|
971
|
-
return result;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
var COMPARE_PARTIAL_FLAG$2 = 1,
|
|
975
|
-
COMPARE_UNORDERED_FLAG = 2;
|
|
976
|
-
var boolTag$1 = '[object Boolean]',
|
|
977
|
-
dateTag$1 = '[object Date]',
|
|
978
|
-
errorTag$1 = '[object Error]',
|
|
979
|
-
mapTag$2 = '[object Map]',
|
|
980
|
-
numberTag$1 = '[object Number]',
|
|
981
|
-
regexpTag$1 = '[object RegExp]',
|
|
982
|
-
setTag$2 = '[object Set]',
|
|
983
|
-
stringTag$1 = '[object String]',
|
|
984
|
-
symbolTag = '[object Symbol]';
|
|
985
|
-
var arrayBufferTag$1 = '[object ArrayBuffer]',
|
|
986
|
-
dataViewTag$2 = '[object DataView]';
|
|
987
|
-
var symbolProto = Symbol$2 ? Symbol$2.prototype : undefined,
|
|
988
|
-
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
989
|
-
|
|
990
|
-
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
991
|
-
switch (tag) {
|
|
992
|
-
case dataViewTag$2:
|
|
993
|
-
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
994
|
-
return false;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
object = object.buffer;
|
|
998
|
-
other = other.buffer;
|
|
999
|
-
|
|
1000
|
-
case arrayBufferTag$1:
|
|
1001
|
-
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$2(object), new Uint8Array$2(other))) {
|
|
1002
|
-
return false;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
return true;
|
|
1006
|
-
|
|
1007
|
-
case boolTag$1:
|
|
1008
|
-
case dateTag$1:
|
|
1009
|
-
case numberTag$1:
|
|
1010
|
-
return eq(+object, +other);
|
|
1011
|
-
|
|
1012
|
-
case errorTag$1:
|
|
1013
|
-
return object.name == other.name && object.message == other.message;
|
|
1014
|
-
|
|
1015
|
-
case regexpTag$1:
|
|
1016
|
-
case stringTag$1:
|
|
1017
|
-
return object == other + '';
|
|
1018
|
-
|
|
1019
|
-
case mapTag$2:
|
|
1020
|
-
var convert = mapToArray;
|
|
1021
|
-
|
|
1022
|
-
case setTag$2:
|
|
1023
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
|
|
1024
|
-
convert || (convert = setToArray);
|
|
1025
|
-
|
|
1026
|
-
if (object.size != other.size && !isPartial) {
|
|
1027
|
-
return false;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
var stacked = stack.get(object);
|
|
1031
|
-
|
|
1032
|
-
if (stacked) {
|
|
1033
|
-
return stacked == other;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
bitmask |= COMPARE_UNORDERED_FLAG;
|
|
1037
|
-
stack.set(object, other);
|
|
1038
|
-
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
1039
|
-
stack['delete'](object);
|
|
1040
|
-
return result;
|
|
1041
|
-
|
|
1042
|
-
case symbolTag:
|
|
1043
|
-
if (symbolValueOf) {
|
|
1044
|
-
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
return false;
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
function arrayPush(array, values) {
|
|
1053
|
-
var index = -1,
|
|
1054
|
-
length = values.length,
|
|
1055
|
-
offset = array.length;
|
|
1056
|
-
|
|
1057
|
-
while (++index < length) {
|
|
1058
|
-
array[offset + index] = values[index];
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
return array;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
var isArray = Array.isArray;
|
|
1065
|
-
var isArray$1 = isArray;
|
|
1066
|
-
|
|
1067
|
-
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
1068
|
-
var result = keysFunc(object);
|
|
1069
|
-
return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
function arrayFilter(array, predicate) {
|
|
1073
|
-
var index = -1,
|
|
1074
|
-
length = array == null ? 0 : array.length,
|
|
1075
|
-
resIndex = 0,
|
|
1076
|
-
result = [];
|
|
1077
|
-
|
|
1078
|
-
while (++index < length) {
|
|
1079
|
-
var value = array[index];
|
|
1080
|
-
|
|
1081
|
-
if (predicate(value, index, array)) {
|
|
1082
|
-
result[resIndex++] = value;
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
return result;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
function stubArray() {
|
|
1090
|
-
return [];
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
var objectProto$6 = Object.prototype;
|
|
1094
|
-
var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
|
|
1095
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1096
|
-
var getSymbols = !nativeGetSymbols ? stubArray : function (object) {
|
|
1097
|
-
if (object == null) {
|
|
1098
|
-
return [];
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
object = Object(object);
|
|
1102
|
-
return arrayFilter(nativeGetSymbols(object), function (symbol) {
|
|
1103
|
-
return propertyIsEnumerable$1.call(object, symbol);
|
|
1104
|
-
});
|
|
1105
|
-
};
|
|
1106
|
-
var getSymbols$1 = getSymbols;
|
|
1107
|
-
|
|
1108
|
-
function baseTimes(n, iteratee) {
|
|
1109
|
-
var index = -1,
|
|
1110
|
-
result = Array(n);
|
|
1111
|
-
|
|
1112
|
-
while (++index < n) {
|
|
1113
|
-
result[index] = iteratee(index);
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
return result;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
function isObjectLike(value) {
|
|
1120
|
-
return value != null && typeof value == 'object';
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
var argsTag$2 = '[object Arguments]';
|
|
1124
|
-
|
|
1125
|
-
function baseIsArguments(value) {
|
|
1126
|
-
return isObjectLike(value) && baseGetTag(value) == argsTag$2;
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
var objectProto$5 = Object.prototype;
|
|
1130
|
-
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
1131
|
-
var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
|
|
1132
|
-
var isArguments = baseIsArguments(function () {
|
|
1133
|
-
return arguments;
|
|
1134
|
-
}()) ? baseIsArguments : function (value) {
|
|
1135
|
-
return isObjectLike(value) && hasOwnProperty$4.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
|
|
1136
|
-
};
|
|
1137
|
-
var isArguments$1 = isArguments;
|
|
1138
|
-
|
|
1139
|
-
function stubFalse() {
|
|
1140
|
-
return false;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
1144
|
-
var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
|
|
1145
|
-
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
1146
|
-
var Buffer = moduleExports$1 ? root$1.Buffer : undefined;
|
|
1147
|
-
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
1148
|
-
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1149
|
-
var isBuffer$1 = isBuffer;
|
|
1150
|
-
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
1151
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
1152
|
-
|
|
1153
|
-
function isIndex(value, length) {
|
|
1154
|
-
var type = typeof value;
|
|
1155
|
-
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
1156
|
-
return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1160
|
-
|
|
1161
|
-
function isLength(value) {
|
|
1162
|
-
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
var argsTag$1 = '[object Arguments]',
|
|
1166
|
-
arrayTag$1 = '[object Array]',
|
|
1167
|
-
boolTag = '[object Boolean]',
|
|
1168
|
-
dateTag = '[object Date]',
|
|
1169
|
-
errorTag = '[object Error]',
|
|
1170
|
-
funcTag = '[object Function]',
|
|
1171
|
-
mapTag$1 = '[object Map]',
|
|
1172
|
-
numberTag = '[object Number]',
|
|
1173
|
-
objectTag$2 = '[object Object]',
|
|
1174
|
-
regexpTag = '[object RegExp]',
|
|
1175
|
-
setTag$1 = '[object Set]',
|
|
1176
|
-
stringTag = '[object String]',
|
|
1177
|
-
weakMapTag$1 = '[object WeakMap]';
|
|
1178
|
-
var arrayBufferTag = '[object ArrayBuffer]',
|
|
1179
|
-
dataViewTag$1 = '[object DataView]',
|
|
1180
|
-
float32Tag = '[object Float32Array]',
|
|
1181
|
-
float64Tag = '[object Float64Array]',
|
|
1182
|
-
int8Tag = '[object Int8Array]',
|
|
1183
|
-
int16Tag = '[object Int16Array]',
|
|
1184
|
-
int32Tag = '[object Int32Array]',
|
|
1185
|
-
uint8Tag = '[object Uint8Array]',
|
|
1186
|
-
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
1187
|
-
uint16Tag = '[object Uint16Array]',
|
|
1188
|
-
uint32Tag = '[object Uint32Array]';
|
|
1189
|
-
var typedArrayTags = {};
|
|
1190
|
-
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
1191
|
-
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$1] = typedArrayTags[numberTag] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] = typedArrayTags[setTag$1] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false;
|
|
1192
|
-
|
|
1193
|
-
function baseIsTypedArray(value) {
|
|
1194
|
-
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
function baseUnary(func) {
|
|
1198
|
-
return function (value) {
|
|
1199
|
-
return func(value);
|
|
1200
|
-
};
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
1204
|
-
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
1205
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1206
|
-
var freeProcess = moduleExports && freeGlobal$1.process;
|
|
1207
|
-
|
|
1208
|
-
var nodeUtil = function () {
|
|
1209
|
-
try {
|
|
1210
|
-
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
1211
|
-
|
|
1212
|
-
if (types) {
|
|
1213
|
-
return types;
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
1217
|
-
} catch (e) {}
|
|
1218
|
-
}();
|
|
1219
|
-
|
|
1220
|
-
var nodeUtil$1 = nodeUtil;
|
|
1221
|
-
var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
1222
|
-
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
1223
|
-
var isTypedArray$1 = isTypedArray;
|
|
1224
|
-
var objectProto$4 = Object.prototype;
|
|
1225
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
1226
|
-
|
|
1227
|
-
function arrayLikeKeys(value, inherited) {
|
|
1228
|
-
var isArr = isArray$1(value),
|
|
1229
|
-
isArg = !isArr && isArguments$1(value),
|
|
1230
|
-
isBuff = !isArr && !isArg && isBuffer$1(value),
|
|
1231
|
-
isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
|
|
1232
|
-
skipIndexes = isArr || isArg || isBuff || isType,
|
|
1233
|
-
result = skipIndexes ? baseTimes(value.length, String) : [],
|
|
1234
|
-
length = result.length;
|
|
1235
|
-
|
|
1236
|
-
for (var key in value) {
|
|
1237
|
-
if ((inherited || hasOwnProperty$3.call(value, key)) && !(skipIndexes && (key == 'length' || isBuff && (key == 'offset' || key == 'parent') || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || isIndex(key, length)))) {
|
|
1238
|
-
result.push(key);
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
return result;
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
var objectProto$3 = Object.prototype;
|
|
1246
|
-
|
|
1247
|
-
function isPrototype(value) {
|
|
1248
|
-
var Ctor = value && value.constructor,
|
|
1249
|
-
proto = typeof Ctor == 'function' && Ctor.prototype || objectProto$3;
|
|
1250
|
-
return value === proto;
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
function overArg(func, transform) {
|
|
1254
|
-
return function (arg) {
|
|
1255
|
-
return func(transform(arg));
|
|
1256
|
-
};
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
var nativeKeys = overArg(Object.keys, Object);
|
|
1260
|
-
var nativeKeys$1 = nativeKeys;
|
|
1261
|
-
var objectProto$2 = Object.prototype;
|
|
1262
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
1263
|
-
|
|
1264
|
-
function baseKeys(object) {
|
|
1265
|
-
if (!isPrototype(object)) {
|
|
1266
|
-
return nativeKeys$1(object);
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
var result = [];
|
|
1270
|
-
|
|
1271
|
-
for (var key in Object(object)) {
|
|
1272
|
-
if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
|
|
1273
|
-
result.push(key);
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
return result;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
function isArrayLike(value) {
|
|
1281
|
-
return value != null && isLength(value.length) && !isFunction(value);
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
function keys(object) {
|
|
1285
|
-
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
function getAllKeys(object) {
|
|
1289
|
-
return baseGetAllKeys(object, keys, getSymbols$1);
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
var COMPARE_PARTIAL_FLAG$1 = 1;
|
|
1293
|
-
var objectProto$1 = Object.prototype;
|
|
1294
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
1295
|
-
|
|
1296
|
-
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1297
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
|
|
1298
|
-
objProps = getAllKeys(object),
|
|
1299
|
-
objLength = objProps.length,
|
|
1300
|
-
othProps = getAllKeys(other),
|
|
1301
|
-
othLength = othProps.length;
|
|
1302
|
-
|
|
1303
|
-
if (objLength != othLength && !isPartial) {
|
|
1304
|
-
return false;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
var index = objLength;
|
|
1308
|
-
|
|
1309
|
-
while (index--) {
|
|
1310
|
-
var key = objProps[index];
|
|
1311
|
-
|
|
1312
|
-
if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
|
|
1313
|
-
return false;
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
var objStacked = stack.get(object);
|
|
1318
|
-
var othStacked = stack.get(other);
|
|
1319
|
-
|
|
1320
|
-
if (objStacked && othStacked) {
|
|
1321
|
-
return objStacked == other && othStacked == object;
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
var result = true;
|
|
1325
|
-
stack.set(object, other);
|
|
1326
|
-
stack.set(other, object);
|
|
1327
|
-
var skipCtor = isPartial;
|
|
1328
|
-
|
|
1329
|
-
while (++index < objLength) {
|
|
1330
|
-
key = objProps[index];
|
|
1331
|
-
var objValue = object[key],
|
|
1332
|
-
othValue = other[key];
|
|
1333
|
-
|
|
1334
|
-
if (customizer) {
|
|
1335
|
-
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
1339
|
-
result = false;
|
|
1340
|
-
break;
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
skipCtor || (skipCtor = key == 'constructor');
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
if (result && !skipCtor) {
|
|
1347
|
-
var objCtor = object.constructor,
|
|
1348
|
-
othCtor = other.constructor;
|
|
1349
|
-
|
|
1350
|
-
if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
|
1351
|
-
result = false;
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
stack['delete'](object);
|
|
1356
|
-
stack['delete'](other);
|
|
1357
|
-
return result;
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
var DataView$1 = getNative(root$1, 'DataView');
|
|
1361
|
-
var DataView$2 = DataView$1;
|
|
1362
|
-
var Promise$1 = getNative(root$1, 'Promise');
|
|
1363
|
-
var Promise$2 = Promise$1;
|
|
1364
|
-
var Set = getNative(root$1, 'Set');
|
|
1365
|
-
var Set$1 = Set;
|
|
1366
|
-
var WeakMap = getNative(root$1, 'WeakMap');
|
|
1367
|
-
var WeakMap$1 = WeakMap;
|
|
1368
|
-
var mapTag = '[object Map]',
|
|
1369
|
-
objectTag$1 = '[object Object]',
|
|
1370
|
-
promiseTag = '[object Promise]',
|
|
1371
|
-
setTag = '[object Set]',
|
|
1372
|
-
weakMapTag = '[object WeakMap]';
|
|
1373
|
-
var dataViewTag = '[object DataView]';
|
|
1374
|
-
var dataViewCtorString = toSource(DataView$2),
|
|
1375
|
-
mapCtorString = toSource(Map$2),
|
|
1376
|
-
promiseCtorString = toSource(Promise$2),
|
|
1377
|
-
setCtorString = toSource(Set$1),
|
|
1378
|
-
weakMapCtorString = toSource(WeakMap$1);
|
|
1379
|
-
var getTag = baseGetTag;
|
|
1380
|
-
|
|
1381
|
-
if (DataView$2 && getTag(new DataView$2(new ArrayBuffer(1))) != dataViewTag || Map$2 && getTag(new Map$2()) != mapTag || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag) {
|
|
1382
|
-
getTag = function getTag(value) {
|
|
1383
|
-
var result = baseGetTag(value),
|
|
1384
|
-
Ctor = result == objectTag$1 ? value.constructor : undefined,
|
|
1385
|
-
ctorString = Ctor ? toSource(Ctor) : '';
|
|
1386
|
-
|
|
1387
|
-
if (ctorString) {
|
|
1388
|
-
switch (ctorString) {
|
|
1389
|
-
case dataViewCtorString:
|
|
1390
|
-
return dataViewTag;
|
|
1391
|
-
|
|
1392
|
-
case mapCtorString:
|
|
1393
|
-
return mapTag;
|
|
1394
|
-
|
|
1395
|
-
case promiseCtorString:
|
|
1396
|
-
return promiseTag;
|
|
1397
|
-
|
|
1398
|
-
case setCtorString:
|
|
1399
|
-
return setTag;
|
|
1400
|
-
|
|
1401
|
-
case weakMapCtorString:
|
|
1402
|
-
return weakMapTag;
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
return result;
|
|
1407
|
-
};
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
var getTag$1 = getTag;
|
|
1411
|
-
var COMPARE_PARTIAL_FLAG = 1;
|
|
1412
|
-
var argsTag = '[object Arguments]',
|
|
1413
|
-
arrayTag = '[object Array]',
|
|
1414
|
-
objectTag = '[object Object]';
|
|
1415
|
-
var objectProto = Object.prototype;
|
|
1416
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1417
|
-
|
|
1418
|
-
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1419
|
-
var objIsArr = isArray$1(object),
|
|
1420
|
-
othIsArr = isArray$1(other),
|
|
1421
|
-
objTag = objIsArr ? arrayTag : getTag$1(object),
|
|
1422
|
-
othTag = othIsArr ? arrayTag : getTag$1(other);
|
|
1423
|
-
objTag = objTag == argsTag ? objectTag : objTag;
|
|
1424
|
-
othTag = othTag == argsTag ? objectTag : othTag;
|
|
1425
|
-
var objIsObj = objTag == objectTag,
|
|
1426
|
-
othIsObj = othTag == objectTag,
|
|
1427
|
-
isSameTag = objTag == othTag;
|
|
1428
|
-
|
|
1429
|
-
if (isSameTag && isBuffer$1(object)) {
|
|
1430
|
-
if (!isBuffer$1(other)) {
|
|
1431
|
-
return false;
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
objIsArr = true;
|
|
1435
|
-
objIsObj = false;
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
if (isSameTag && !objIsObj) {
|
|
1439
|
-
stack || (stack = new Stack());
|
|
1440
|
-
return objIsArr || isTypedArray$1(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
1444
|
-
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
|
1445
|
-
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
|
1446
|
-
|
|
1447
|
-
if (objIsWrapped || othIsWrapped) {
|
|
1448
|
-
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
1449
|
-
othUnwrapped = othIsWrapped ? other.value() : other;
|
|
1450
|
-
stack || (stack = new Stack());
|
|
1451
|
-
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
if (!isSameTag) {
|
|
1456
|
-
return false;
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
stack || (stack = new Stack());
|
|
1460
|
-
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
1464
|
-
if (value === other) {
|
|
1465
|
-
return true;
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
|
1469
|
-
return value !== value && other !== other;
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
function isEqual(value, other) {
|
|
1476
|
-
return baseIsEqual(value, other);
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
var RendererManager = function () {
|
|
1480
|
-
function RendererManager(_a) {
|
|
1481
|
-
var game = _a.game,
|
|
1482
|
-
rendererSystem = _a.rendererSystem;
|
|
1483
|
-
this.renderers = [];
|
|
1484
|
-
this.game = game;
|
|
1485
|
-
this.rendererSystem = rendererSystem;
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
RendererManager.prototype.register = function () {
|
|
1489
|
-
var e_1, _a;
|
|
1490
|
-
|
|
1491
|
-
var renderers = [];
|
|
1492
|
-
|
|
1493
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1494
|
-
renderers[_i] = arguments[_i];
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
try {
|
|
1498
|
-
for (var renderers_1 = __values(renderers), renderers_1_1 = renderers_1.next(); !renderers_1_1.done; renderers_1_1 = renderers_1.next()) {
|
|
1499
|
-
var renderer = renderers_1_1.value;
|
|
1500
|
-
renderer.game = this.game;
|
|
1501
|
-
renderer.rendererManager = this.rendererSystem.rendererManager;
|
|
1502
|
-
renderer.containerManager = this.rendererSystem.containerManager;
|
|
1503
|
-
this.renderers.push(renderer);
|
|
1504
|
-
}
|
|
1505
|
-
} catch (e_1_1) {
|
|
1506
|
-
e_1 = {
|
|
1507
|
-
error: e_1_1
|
|
1508
|
-
};
|
|
1509
|
-
} finally {
|
|
1510
|
-
try {
|
|
1511
|
-
if (renderers_1_1 && !renderers_1_1.done && (_a = renderers_1.return)) _a.call(renderers_1);
|
|
1512
|
-
} finally {
|
|
1513
|
-
if (e_1) throw e_1.error;
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
};
|
|
1517
|
-
|
|
1518
|
-
RendererManager.prototype.componentChanged = function (changes) {
|
|
1519
|
-
var e_2, _a;
|
|
1520
|
-
|
|
1521
|
-
var _loop_1 = function _loop_1(changed) {
|
|
1522
|
-
var e_3, _a;
|
|
1523
|
-
|
|
1524
|
-
try {
|
|
1525
|
-
for (var _b = (e_3 = void 0, __values(this_1.renderers)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1526
|
-
var renderer = _c.value;
|
|
1527
|
-
var props = renderer.observerInfo[changed.componentName];
|
|
1528
|
-
|
|
1529
|
-
if (props) {
|
|
1530
|
-
if ([eva_js.OBSERVER_TYPE.ADD, eva_js.OBSERVER_TYPE.REMOVE].indexOf(changed.type) > -1) {
|
|
1531
|
-
try {
|
|
1532
|
-
renderer.componentChanged && renderer.componentChanged(changed);
|
|
1533
|
-
} catch (e) {
|
|
1534
|
-
console.error("gameObject: " + changed.gameObject.name + ", " + changed.componentName + " is error.", changed, e);
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
continue;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
var index = props.findIndex(function (prop) {
|
|
1541
|
-
return isEqual(prop, changed.prop);
|
|
1542
|
-
});
|
|
1543
|
-
|
|
1544
|
-
if (index > -1) {
|
|
1545
|
-
try {
|
|
1546
|
-
renderer.componentChanged && renderer.componentChanged(changed);
|
|
1547
|
-
} catch (e) {
|
|
1548
|
-
console.error("gameObject: " + (changed.gameObject && changed.gameObject.name) + ", " + changed.componentName + " is componentChanged error.", changed, e);
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
} catch (e_3_1) {
|
|
1554
|
-
e_3 = {
|
|
1555
|
-
error: e_3_1
|
|
1556
|
-
};
|
|
1557
|
-
} finally {
|
|
1558
|
-
try {
|
|
1559
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1560
|
-
} finally {
|
|
1561
|
-
if (e_3) throw e_3.error;
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
};
|
|
1565
|
-
|
|
1566
|
-
var this_1 = this;
|
|
1567
|
-
|
|
1568
|
-
try {
|
|
1569
|
-
for (var changes_1 = __values(changes), changes_1_1 = changes_1.next(); !changes_1_1.done; changes_1_1 = changes_1.next()) {
|
|
1570
|
-
var changed = changes_1_1.value;
|
|
1571
|
-
|
|
1572
|
-
_loop_1(changed);
|
|
1573
|
-
}
|
|
1574
|
-
} catch (e_2_1) {
|
|
1575
|
-
e_2 = {
|
|
1576
|
-
error: e_2_1
|
|
1577
|
-
};
|
|
1578
|
-
} finally {
|
|
1579
|
-
try {
|
|
1580
|
-
if (changes_1_1 && !changes_1_1.done && (_a = changes_1.return)) _a.call(changes_1);
|
|
1581
|
-
} finally {
|
|
1582
|
-
if (e_2) throw e_2.error;
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
};
|
|
1586
|
-
|
|
1587
|
-
RendererManager.prototype.update = function (gameObject) {
|
|
1588
|
-
var e_4, _a, e_5, _b;
|
|
1589
|
-
|
|
1590
|
-
try {
|
|
1591
|
-
for (var _c = __values(gameObject.components), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
1592
|
-
var component = _d.value;
|
|
1593
|
-
|
|
1594
|
-
try {
|
|
1595
|
-
for (var _e = (e_5 = void 0, __values(this.renderers)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
1596
|
-
var renderer = _f.value;
|
|
1597
|
-
var cache = [];
|
|
1598
|
-
var props = renderer.observerInfo[component.name];
|
|
1599
|
-
|
|
1600
|
-
if (props && cache.indexOf(gameObject) === -1) {
|
|
1601
|
-
cache.push(gameObject);
|
|
1602
|
-
|
|
1603
|
-
try {
|
|
1604
|
-
renderer.rendererUpdate && renderer.rendererUpdate(gameObject);
|
|
1605
|
-
} catch (e) {
|
|
1606
|
-
console.info("gameObject: " + gameObject.name + ", " + component.name + " is update error", e);
|
|
1607
|
-
}
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
} catch (e_5_1) {
|
|
1611
|
-
e_5 = {
|
|
1612
|
-
error: e_5_1
|
|
1613
|
-
};
|
|
1614
|
-
} finally {
|
|
1615
|
-
try {
|
|
1616
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
1617
|
-
} finally {
|
|
1618
|
-
if (e_5) throw e_5.error;
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
} catch (e_4_1) {
|
|
1623
|
-
e_4 = {
|
|
1624
|
-
error: e_4_1
|
|
1625
|
-
};
|
|
1626
|
-
} finally {
|
|
1627
|
-
try {
|
|
1628
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
1629
|
-
} finally {
|
|
1630
|
-
if (e_4) throw e_4.error;
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
};
|
|
1634
|
-
|
|
1635
|
-
return RendererManager;
|
|
1636
|
-
}();
|
|
1637
|
-
|
|
1638
|
-
var RendererManager$1 = RendererManager;
|
|
1639
|
-
|
|
1640
|
-
var ContainerManager = function () {
|
|
1641
|
-
function ContainerManager() {
|
|
1642
|
-
this.containerMap = {};
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
ContainerManager.prototype.addContainer = function (_a) {
|
|
1646
|
-
var name = _a.name,
|
|
1647
|
-
container = _a.container;
|
|
1648
|
-
this.containerMap[name] = container;
|
|
1649
|
-
};
|
|
1650
|
-
|
|
1651
|
-
ContainerManager.prototype.getContainer = function (name) {
|
|
1652
|
-
return this.containerMap[name];
|
|
1653
|
-
};
|
|
1654
|
-
|
|
1655
|
-
ContainerManager.prototype.removeContainer = function (name) {
|
|
1656
|
-
var _a;
|
|
1657
|
-
|
|
1658
|
-
(_a = this.containerMap[name]) === null || _a === void 0 ? void 0 : _a.destroy({
|
|
1659
|
-
children: true
|
|
1660
|
-
});
|
|
1661
|
-
delete this.containerMap[name];
|
|
1662
|
-
};
|
|
1663
|
-
|
|
1664
|
-
ContainerManager.prototype.updateTransform = function (_a) {
|
|
1665
|
-
var name = _a.name,
|
|
1666
|
-
transform = _a.transform;
|
|
1667
|
-
var container = this.containerMap[name];
|
|
1668
|
-
if (!container) return;
|
|
1669
|
-
var anchor = transform.anchor,
|
|
1670
|
-
origin = transform.origin,
|
|
1671
|
-
position = transform.position,
|
|
1672
|
-
rotation = transform.rotation,
|
|
1673
|
-
scale = transform.scale,
|
|
1674
|
-
size = transform.size,
|
|
1675
|
-
skew = transform.skew;
|
|
1676
|
-
container.rotation = rotation;
|
|
1677
|
-
container.scale = scale;
|
|
1678
|
-
container.pivot.x = size.width * origin.x;
|
|
1679
|
-
container.pivot.y = size.height * origin.y;
|
|
1680
|
-
container.skew = skew;
|
|
1681
|
-
var x = position.x;
|
|
1682
|
-
var y = position.y;
|
|
1683
|
-
|
|
1684
|
-
if (transform.parent) {
|
|
1685
|
-
var parent_1 = transform.parent;
|
|
1686
|
-
x = x + parent_1.size.width * anchor.x;
|
|
1687
|
-
y = y + parent_1.size.height * anchor.y;
|
|
1688
|
-
}
|
|
1689
|
-
|
|
1690
|
-
container.position = {
|
|
1691
|
-
x: x,
|
|
1692
|
-
y: y
|
|
1693
|
-
};
|
|
1694
|
-
};
|
|
1695
|
-
|
|
1696
|
-
return ContainerManager;
|
|
1697
|
-
}();
|
|
1698
|
-
|
|
1699
|
-
var ContainerManager$1 = ContainerManager;
|
|
1700
|
-
|
|
1701
|
-
function createCommonjsModule(fn) {
|
|
1702
|
-
var module = {
|
|
1703
|
-
exports: {}
|
|
1704
|
-
};
|
|
1705
|
-
return fn(module, module.exports), module.exports;
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
var eventemitter3 = createCommonjsModule(function (module) {
|
|
1709
|
-
var has = Object.prototype.hasOwnProperty,
|
|
1710
|
-
prefix = '~';
|
|
1711
|
-
|
|
1712
|
-
function Events() {}
|
|
1713
|
-
|
|
1714
|
-
if (Object.create) {
|
|
1715
|
-
Events.prototype = Object.create(null);
|
|
1716
|
-
if (!new Events().__proto__) prefix = false;
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
function EE(fn, context, once) {
|
|
1720
|
-
this.fn = fn;
|
|
1721
|
-
this.context = context;
|
|
1722
|
-
this.once = once || false;
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
function addListener(emitter, event, fn, context, once) {
|
|
1726
|
-
if (typeof fn !== 'function') {
|
|
1727
|
-
throw new TypeError('The listener must be a function');
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
|
-
var listener = new EE(fn, context || emitter, once),
|
|
1731
|
-
evt = prefix ? prefix + event : event;
|
|
1732
|
-
if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);else emitter._events[evt] = [emitter._events[evt], listener];
|
|
1733
|
-
return emitter;
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
function clearEvent(emitter, evt) {
|
|
1737
|
-
if (--emitter._eventsCount === 0) emitter._events = new Events();else delete emitter._events[evt];
|
|
1738
|
-
}
|
|
1739
|
-
|
|
1740
|
-
function EventEmitter() {
|
|
1741
|
-
this._events = new Events();
|
|
1742
|
-
this._eventsCount = 0;
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
EventEmitter.prototype.eventNames = function eventNames() {
|
|
1746
|
-
var names = [],
|
|
1747
|
-
events,
|
|
1748
|
-
name;
|
|
1749
|
-
if (this._eventsCount === 0) return names;
|
|
1750
|
-
|
|
1751
|
-
for (name in events = this._events) {
|
|
1752
|
-
if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
if (Object.getOwnPropertySymbols) {
|
|
1756
|
-
return names.concat(Object.getOwnPropertySymbols(events));
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
return names;
|
|
1760
|
-
};
|
|
1761
|
-
|
|
1762
|
-
EventEmitter.prototype.listeners = function listeners(event) {
|
|
1763
|
-
var evt = prefix ? prefix + event : event,
|
|
1764
|
-
handlers = this._events[evt];
|
|
1765
|
-
if (!handlers) return [];
|
|
1766
|
-
if (handlers.fn) return [handlers.fn];
|
|
1767
|
-
|
|
1768
|
-
for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
|
|
1769
|
-
ee[i] = handlers[i].fn;
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
return ee;
|
|
1773
|
-
};
|
|
1774
|
-
|
|
1775
|
-
EventEmitter.prototype.listenerCount = function listenerCount(event) {
|
|
1776
|
-
var evt = prefix ? prefix + event : event,
|
|
1777
|
-
listeners = this._events[evt];
|
|
1778
|
-
if (!listeners) return 0;
|
|
1779
|
-
if (listeners.fn) return 1;
|
|
1780
|
-
return listeners.length;
|
|
1781
|
-
};
|
|
1782
|
-
|
|
1783
|
-
EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
|
|
1784
|
-
var evt = prefix ? prefix + event : event;
|
|
1785
|
-
if (!this._events[evt]) return false;
|
|
1786
|
-
var listeners = this._events[evt],
|
|
1787
|
-
len = arguments.length,
|
|
1788
|
-
args,
|
|
1789
|
-
i;
|
|
1790
|
-
|
|
1791
|
-
if (listeners.fn) {
|
|
1792
|
-
if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
|
|
1793
|
-
|
|
1794
|
-
switch (len) {
|
|
1795
|
-
case 1:
|
|
1796
|
-
return listeners.fn.call(listeners.context), true;
|
|
1797
|
-
|
|
1798
|
-
case 2:
|
|
1799
|
-
return listeners.fn.call(listeners.context, a1), true;
|
|
1800
|
-
|
|
1801
|
-
case 3:
|
|
1802
|
-
return listeners.fn.call(listeners.context, a1, a2), true;
|
|
1803
|
-
|
|
1804
|
-
case 4:
|
|
1805
|
-
return listeners.fn.call(listeners.context, a1, a2, a3), true;
|
|
1806
|
-
|
|
1807
|
-
case 5:
|
|
1808
|
-
return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
|
|
1809
|
-
|
|
1810
|
-
case 6:
|
|
1811
|
-
return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
for (i = 1, args = new Array(len - 1); i < len; i++) {
|
|
1815
|
-
args[i - 1] = arguments[i];
|
|
1816
|
-
}
|
|
1817
|
-
|
|
1818
|
-
listeners.fn.apply(listeners.context, args);
|
|
1819
|
-
} else {
|
|
1820
|
-
var length = listeners.length,
|
|
1821
|
-
j;
|
|
1822
|
-
|
|
1823
|
-
for (i = 0; i < length; i++) {
|
|
1824
|
-
if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
|
|
1825
|
-
|
|
1826
|
-
switch (len) {
|
|
1827
|
-
case 1:
|
|
1828
|
-
listeners[i].fn.call(listeners[i].context);
|
|
1829
|
-
break;
|
|
1830
|
-
|
|
1831
|
-
case 2:
|
|
1832
|
-
listeners[i].fn.call(listeners[i].context, a1);
|
|
1833
|
-
break;
|
|
1834
|
-
|
|
1835
|
-
case 3:
|
|
1836
|
-
listeners[i].fn.call(listeners[i].context, a1, a2);
|
|
1837
|
-
break;
|
|
1838
|
-
|
|
1839
|
-
case 4:
|
|
1840
|
-
listeners[i].fn.call(listeners[i].context, a1, a2, a3);
|
|
1841
|
-
break;
|
|
1842
|
-
|
|
1843
|
-
default:
|
|
1844
|
-
if (!args) for (j = 1, args = new Array(len - 1); j < len; j++) {
|
|
1845
|
-
args[j - 1] = arguments[j];
|
|
1846
|
-
}
|
|
1847
|
-
listeners[i].fn.apply(listeners[i].context, args);
|
|
1848
|
-
}
|
|
1849
|
-
}
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
return true;
|
|
1853
|
-
};
|
|
1854
|
-
|
|
1855
|
-
EventEmitter.prototype.on = function on(event, fn, context) {
|
|
1856
|
-
return addListener(this, event, fn, context, false);
|
|
1857
|
-
};
|
|
1858
|
-
|
|
1859
|
-
EventEmitter.prototype.once = function once(event, fn, context) {
|
|
1860
|
-
return addListener(this, event, fn, context, true);
|
|
1861
|
-
};
|
|
1862
|
-
|
|
1863
|
-
EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
|
|
1864
|
-
var evt = prefix ? prefix + event : event;
|
|
1865
|
-
if (!this._events[evt]) return this;
|
|
1866
|
-
|
|
1867
|
-
if (!fn) {
|
|
1868
|
-
clearEvent(this, evt);
|
|
1869
|
-
return this;
|
|
1870
|
-
}
|
|
1871
|
-
|
|
1872
|
-
var listeners = this._events[evt];
|
|
1873
|
-
|
|
1874
|
-
if (listeners.fn) {
|
|
1875
|
-
if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {
|
|
1876
|
-
clearEvent(this, evt);
|
|
1877
|
-
}
|
|
1878
|
-
} else {
|
|
1879
|
-
for (var i = 0, events = [], length = listeners.length; i < length; i++) {
|
|
1880
|
-
if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {
|
|
1881
|
-
events.push(listeners[i]);
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
|
-
if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;else clearEvent(this, evt);
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
return this;
|
|
1889
|
-
};
|
|
1890
|
-
|
|
1891
|
-
EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
|
|
1892
|
-
var evt;
|
|
1893
|
-
|
|
1894
|
-
if (event) {
|
|
1895
|
-
evt = prefix ? prefix + event : event;
|
|
1896
|
-
if (this._events[evt]) clearEvent(this, evt);
|
|
1897
|
-
} else {
|
|
1898
|
-
this._events = new Events();
|
|
1899
|
-
this._eventsCount = 0;
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
return this;
|
|
1903
|
-
};
|
|
1904
|
-
|
|
1905
|
-
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
|
1906
|
-
EventEmitter.prototype.addListener = EventEmitter.prototype.on;
|
|
1907
|
-
EventEmitter.prefixed = prefix;
|
|
1908
|
-
EventEmitter.EventEmitter = EventEmitter;
|
|
1909
|
-
{
|
|
1910
|
-
module.exports = EventEmitter;
|
|
1911
|
-
}
|
|
1912
|
-
});
|
|
1913
|
-
var EventEmitter = eventemitter3;
|
|
1914
|
-
|
|
1915
|
-
var Transform = function (_super) {
|
|
1916
|
-
__extends$1(Transform, _super);
|
|
1917
|
-
|
|
1918
|
-
function Transform(_a) {
|
|
1919
|
-
var system = _a.system,
|
|
1920
|
-
containerManager = _a.containerManager;
|
|
1921
|
-
|
|
1922
|
-
var _this = _super.call(this) || this;
|
|
1923
|
-
|
|
1924
|
-
_this.name = 'Transform';
|
|
1925
|
-
_this.waitRemoveIds = [];
|
|
1926
|
-
_this.waitChangeScenes = [];
|
|
1927
|
-
_this.containerManager = containerManager;
|
|
1928
|
-
|
|
1929
|
-
_this.init(system);
|
|
1930
|
-
|
|
1931
|
-
return _this;
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
Transform.prototype.init = function (system) {
|
|
1935
|
-
var _this = this;
|
|
1936
|
-
|
|
1937
|
-
this.system = system;
|
|
1938
|
-
this.on('changeScene', function (_a) {
|
|
1939
|
-
var scene = _a.scene,
|
|
1940
|
-
mode = _a.mode,
|
|
1941
|
-
application = _a.application;
|
|
1942
|
-
|
|
1943
|
-
_this.waitChangeScenes.push({
|
|
1944
|
-
scene: scene,
|
|
1945
|
-
mode: mode,
|
|
1946
|
-
application: application
|
|
1947
|
-
});
|
|
1948
|
-
});
|
|
1949
|
-
};
|
|
1950
|
-
|
|
1951
|
-
Transform.prototype.update = function () {
|
|
1952
|
-
var e_1, _a, e_2, _b;
|
|
1953
|
-
|
|
1954
|
-
try {
|
|
1955
|
-
for (var _c = __values(this.waitRemoveIds), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
1956
|
-
var id = _d.value;
|
|
1957
|
-
this.containerManager.removeContainer(id);
|
|
1958
|
-
}
|
|
1959
|
-
} catch (e_1_1) {
|
|
1960
|
-
e_1 = {
|
|
1961
|
-
error: e_1_1
|
|
1962
|
-
};
|
|
1963
|
-
} finally {
|
|
1964
|
-
try {
|
|
1965
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
1966
|
-
} finally {
|
|
1967
|
-
if (e_1) throw e_1.error;
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
|
-
|
|
1971
|
-
this.waitRemoveIds = [];
|
|
1972
|
-
|
|
1973
|
-
try {
|
|
1974
|
-
for (var _e = __values(this.waitChangeScenes), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
1975
|
-
var sceneInfo = _f.value;
|
|
1976
|
-
var container = this.containerManager.getContainer(sceneInfo.scene.id);
|
|
1977
|
-
|
|
1978
|
-
if (container) {
|
|
1979
|
-
sceneInfo.application.stage.removeChildren();
|
|
1980
|
-
sceneInfo.application.stage.addChild(container);
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
} catch (e_2_1) {
|
|
1984
|
-
e_2 = {
|
|
1985
|
-
error: e_2_1
|
|
1986
|
-
};
|
|
1987
|
-
} finally {
|
|
1988
|
-
try {
|
|
1989
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
1990
|
-
} finally {
|
|
1991
|
-
if (e_2) throw e_2.error;
|
|
1992
|
-
}
|
|
1993
|
-
}
|
|
1994
|
-
|
|
1995
|
-
this.waitChangeScenes = [];
|
|
1996
|
-
};
|
|
1997
|
-
|
|
1998
|
-
Transform.prototype.componentChanged = function (changed) {
|
|
1999
|
-
if (changed.type === eva_js.OBSERVER_TYPE.ADD) {
|
|
2000
|
-
this.addContainer(changed);
|
|
2001
|
-
} else if (changed.type === eva_js.OBSERVER_TYPE.CHANGE) {
|
|
2002
|
-
this.change(changed);
|
|
2003
|
-
} else if (changed.type === eva_js.OBSERVER_TYPE.REMOVE) {
|
|
2004
|
-
this.waitRemoveIds.push(changed.gameObject.id);
|
|
2005
|
-
}
|
|
2006
|
-
};
|
|
2007
|
-
|
|
2008
|
-
Transform.prototype.addContainer = function (changed) {
|
|
2009
|
-
var container = new Container$1();
|
|
2010
|
-
container.name = changed.gameObject.name;
|
|
2011
|
-
this.containerManager.addContainer({
|
|
2012
|
-
name: changed.gameObject.id,
|
|
2013
|
-
container: container
|
|
2014
|
-
});
|
|
2015
|
-
var transform = changed.component;
|
|
2016
|
-
transform.worldTransform = container.transform.worldTransform;
|
|
2017
|
-
};
|
|
2018
|
-
|
|
2019
|
-
Transform.prototype.change = function (changed) {
|
|
2020
|
-
var transform = changed.component;
|
|
2021
|
-
|
|
2022
|
-
if (transform.parent) {
|
|
2023
|
-
var parentContainer = this.containerManager.getContainer(transform.parent.gameObject.id);
|
|
2024
|
-
parentContainer.addChild(this.containerManager.getContainer(changed.gameObject.id));
|
|
2025
|
-
var render = changed.gameObject.transform.parent && changed.gameObject.transform.parent.gameObject.getComponent('Render');
|
|
2026
|
-
|
|
2027
|
-
if (render) {
|
|
2028
|
-
render.sortDirty = true;
|
|
2029
|
-
}
|
|
2030
|
-
} else {
|
|
2031
|
-
var container = this.containerManager.getContainer(changed.gameObject.id);
|
|
2032
|
-
delete transform.worldTransform;
|
|
2033
|
-
container.parent && container.parent.removeChild(container);
|
|
2034
|
-
}
|
|
2035
|
-
};
|
|
2036
|
-
|
|
2037
|
-
Transform.prototype.destroy = function () {
|
|
2038
|
-
this.removeAllListeners();
|
|
2039
|
-
this.waitRemoveIds = null;
|
|
2040
|
-
this.waitChangeScenes = null;
|
|
2041
|
-
this.system = null;
|
|
2042
|
-
this.containerManager = null;
|
|
2043
|
-
};
|
|
2044
|
-
|
|
2045
|
-
Transform = __decorate([eva_js.decorators.componentObserver({
|
|
2046
|
-
Transform: ['_parent']
|
|
2047
|
-
})], Transform);
|
|
2048
|
-
return Transform;
|
|
2049
|
-
}(EventEmitter);
|
|
2050
|
-
|
|
2051
|
-
var Transform$1 = Transform;
|
|
2052
|
-
var result = undefined;
|
|
2053
|
-
|
|
2054
|
-
function getSuportCompressedTextureFormats(gl) {
|
|
2055
|
-
if (result) return result;
|
|
2056
|
-
|
|
2057
|
-
if (!gl) {
|
|
2058
|
-
console.warn('WebGL not available for compressed textures. Silently failing.');
|
|
2059
|
-
return {
|
|
2060
|
-
s3tc: false,
|
|
2061
|
-
etc: false,
|
|
2062
|
-
etc1: false,
|
|
2063
|
-
pvrtc: false,
|
|
2064
|
-
atc: false,
|
|
2065
|
-
astc: false
|
|
2066
|
-
};
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
result = {
|
|
2070
|
-
s3tc: !!gl.getExtension('WEBGL_compressed_texture_s3tc'),
|
|
2071
|
-
etc: !!gl.getExtension('WEBGL_compressed_texture_etc'),
|
|
2072
|
-
etc1: !!gl.getExtension('WEBGL_compressed_texture_etc1'),
|
|
2073
|
-
pvrtc: !!gl.getExtension('WEBGL_compressed_texture_pvrtc') || !!gl.getExtension('WEBKIT_WEBGL_compressed_texture_pvrtc'),
|
|
2074
|
-
atc: !!gl.getExtension('WEBGL_compressed_texture_atc'),
|
|
2075
|
-
astc: !!gl.getExtension('WEBGL_compressed_texture_astc')
|
|
2076
|
-
};
|
|
2077
|
-
|
|
2078
|
-
try {
|
|
2079
|
-
console.log('Eva.js Supported Compressed Texture Format List: ' + Object.keys(result).filter(function (type) {
|
|
2080
|
-
return result[type];
|
|
2081
|
-
}).join(', '));
|
|
2082
|
-
} catch (e) {}
|
|
2083
|
-
|
|
2084
|
-
return result;
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
var XLS = eva_js.resourceLoader.XhrLoadStrategy;
|
|
2088
|
-
var XhrLoadStrategy = XLS;
|
|
2089
|
-
|
|
2090
|
-
var _a$2, _b;
|
|
2091
|
-
|
|
2092
|
-
var INTERNAL_FORMATS;
|
|
2093
|
-
|
|
2094
|
-
(function (INTERNAL_FORMATS) {
|
|
2095
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGB_S3TC_DXT1_EXT"] = 33776] = "COMPRESSED_RGB_S3TC_DXT1_EXT";
|
|
2096
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_S3TC_DXT1_EXT"] = 33777] = "COMPRESSED_RGBA_S3TC_DXT1_EXT";
|
|
2097
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_S3TC_DXT3_EXT"] = 33778] = "COMPRESSED_RGBA_S3TC_DXT3_EXT";
|
|
2098
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_S3TC_DXT5_EXT"] = 33779] = "COMPRESSED_RGBA_S3TC_DXT5_EXT";
|
|
2099
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT"] = 35917] = "COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT";
|
|
2100
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT"] = 35918] = "COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT";
|
|
2101
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT"] = 35919] = "COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT";
|
|
2102
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB_S3TC_DXT1_EXT"] = 35916] = "COMPRESSED_SRGB_S3TC_DXT1_EXT";
|
|
2103
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_R11_EAC"] = 37488] = "COMPRESSED_R11_EAC";
|
|
2104
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SIGNED_R11_EAC"] = 37489] = "COMPRESSED_SIGNED_R11_EAC";
|
|
2105
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RG11_EAC"] = 37490] = "COMPRESSED_RG11_EAC";
|
|
2106
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SIGNED_RG11_EAC"] = 37491] = "COMPRESSED_SIGNED_RG11_EAC";
|
|
2107
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGB8_ETC2"] = 37492] = "COMPRESSED_RGB8_ETC2";
|
|
2108
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA8_ETC2_EAC"] = 37496] = "COMPRESSED_RGBA8_ETC2_EAC";
|
|
2109
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ETC2"] = 37493] = "COMPRESSED_SRGB8_ETC2";
|
|
2110
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"] = 37497] = "COMPRESSED_SRGB8_ALPHA8_ETC2_EAC";
|
|
2111
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2"] = 37494] = "COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2";
|
|
2112
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2"] = 37495] = "COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2";
|
|
2113
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGB_PVRTC_4BPPV1_IMG"] = 35840] = "COMPRESSED_RGB_PVRTC_4BPPV1_IMG";
|
|
2114
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_PVRTC_4BPPV1_IMG"] = 35842] = "COMPRESSED_RGBA_PVRTC_4BPPV1_IMG";
|
|
2115
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGB_PVRTC_2BPPV1_IMG"] = 35841] = "COMPRESSED_RGB_PVRTC_2BPPV1_IMG";
|
|
2116
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_PVRTC_2BPPV1_IMG"] = 35843] = "COMPRESSED_RGBA_PVRTC_2BPPV1_IMG";
|
|
2117
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGB_ETC1_WEBGL"] = 36196] = "COMPRESSED_RGB_ETC1_WEBGL";
|
|
2118
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGB_ATC_WEBGL"] = 35986] = "COMPRESSED_RGB_ATC_WEBGL";
|
|
2119
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL"] = 35986] = "COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL";
|
|
2120
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL"] = 34798] = "COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL";
|
|
2121
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_10x10_KHR"] = 37819] = "COMPRESSED_RGBA_ASTC_10x10_KHR";
|
|
2122
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_10x5_KHR"] = 37816] = "COMPRESSED_RGBA_ASTC_10x5_KHR";
|
|
2123
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_10x6_KHR"] = 37817] = "COMPRESSED_RGBA_ASTC_10x6_KHR";
|
|
2124
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_10x8_KHR"] = 37818] = "COMPRESSED_RGBA_ASTC_10x8_KHR";
|
|
2125
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_12x10_KHR"] = 37820] = "COMPRESSED_RGBA_ASTC_12x10_KHR";
|
|
2126
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_12x12_KHR"] = 37821] = "COMPRESSED_RGBA_ASTC_12x12_KHR";
|
|
2127
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_4x4_KHR"] = 37808] = "COMPRESSED_RGBA_ASTC_4x4_KHR";
|
|
2128
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_5x4_KHR"] = 37809] = "COMPRESSED_RGBA_ASTC_5x4_KHR";
|
|
2129
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_5x5_KHR"] = 37810] = "COMPRESSED_RGBA_ASTC_5x5_KHR";
|
|
2130
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_6x5_KHR"] = 37811] = "COMPRESSED_RGBA_ASTC_6x5_KHR";
|
|
2131
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_6x6_KHR"] = 37812] = "COMPRESSED_RGBA_ASTC_6x6_KHR";
|
|
2132
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_8x5_KHR"] = 37813] = "COMPRESSED_RGBA_ASTC_8x5_KHR";
|
|
2133
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_8x6_KHR"] = 37814] = "COMPRESSED_RGBA_ASTC_8x6_KHR";
|
|
2134
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_RGBA_ASTC_8x8_KHR"] = 37815] = "COMPRESSED_RGBA_ASTC_8x8_KHR";
|
|
2135
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR"] = 3781] = "COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR";
|
|
2136
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR"] = 37847] = "COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR";
|
|
2137
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR"] = 37849] = "COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR";
|
|
2138
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR"] = 37850] = "COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR";
|
|
2139
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR"] = 37852] = "COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR";
|
|
2140
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"] = 37853] = "COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR";
|
|
2141
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR"] = 37840] = "COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR";
|
|
2142
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR"] = 37841] = "COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR";
|
|
2143
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR"] = 37842] = "COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR";
|
|
2144
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR"] = 37843] = "COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR";
|
|
2145
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR"] = 37844] = "COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR";
|
|
2146
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR"] = 37845] = "COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR";
|
|
2147
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR"] = 37846] = "COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR";
|
|
2148
|
-
INTERNAL_FORMATS[INTERNAL_FORMATS["COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR"] = 37847] = "COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR";
|
|
2149
|
-
})(INTERNAL_FORMATS || (INTERNAL_FORMATS = {}));
|
|
2150
|
-
|
|
2151
|
-
var INTERNAL_FORMAT_TO_BLOCK_SIZE = (_a$2 = {}, _a$2[INTERNAL_FORMATS.COMPRESSED_RGB_S3TC_DXT1_EXT] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_S3TC_DXT1_EXT] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_S3TC_DXT3_EXT] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_S3TC_DXT5_EXT] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_SRGB_S3TC_DXT1_EXT] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_R11_EAC] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_SIGNED_R11_EAC] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RG11_EAC] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_SIGNED_RG11_EAC] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGB8_ETC2] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA8_ETC2_EAC] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_SRGB8_ETC2] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGB_PVRTC_4BPPV1_IMG] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGB_PVRTC_2BPPV1_IMG] = [8, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG] = [8, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGB_ETC1_WEBGL] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGB_ATC_WEBGL] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_4x4_KHR] = [4, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_5x5_KHR] = [5, 5], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_6x6_KHR] = [6, 6], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_8x8_KHR] = [8, 8], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_10x10_KHR] = [10, 10], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_12x12_KHR] = [12, 12], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_10x5_KHR] = [10, 5], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_10x6_KHR] = [10, 6], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_10x8_KHR] = [10, 8], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_12x10_KHR] = [12, 10], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_5x4_KHR] = [5, 4], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_6x5_KHR] = [6, 5], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_8x5_KHR] = [8, 5], _a$2[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_8x6_KHR] = [8, 6], _a$2);
|
|
2152
|
-
var INTERNAL_FORMATS_TO_EXTENSION_NAME = (_b = {}, _b[INTERNAL_FORMATS.COMPRESSED_RGB_S3TC_DXT1_EXT] = 'WEBGL_compressed_texture_s3tc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_S3TC_DXT1_EXT] = 'WEBGL_compressed_texture_s3tc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_S3TC_DXT3_EXT] = 'WEBGL_compressed_texture_s3tc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_S3TC_DXT5_EXT] = 'WEBGL_compressed_texture_s3tc', _b[INTERNAL_FORMATS.COMPRESSED_SRGB_S3TC_DXT1_EXT] = 'WEBGL_compressed_texture_s3tc_srgb', _b[INTERNAL_FORMATS.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT] = 'WEBGL_compressed_texture_s3tc_srgb', _b[INTERNAL_FORMATS.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT] = 'WEBGL_compressed_texture_s3tc_srgb', _b[INTERNAL_FORMATS.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT] = 'WEBGL_compressed_texture_s3tc_srgb', _b[INTERNAL_FORMATS.COMPRESSED_R11_EAC] = 'WEBGL_compressed_texture_etc', _b[INTERNAL_FORMATS.COMPRESSED_SIGNED_R11_EAC] = 'WEBGL_compressed_texture_etc', _b[INTERNAL_FORMATS.COMPRESSED_RG11_EAC] = 'WEBGL_compressed_texture_etc', _b[INTERNAL_FORMATS.COMPRESSED_SIGNED_RG11_EAC] = 'WEBGL_compressed_texture_etc', _b[INTERNAL_FORMATS.COMPRESSED_RGB8_ETC2] = 'WEBGL_compressed_texture_etc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA8_ETC2_EAC] = 'WEBGL_compressed_texture_etc', _b[INTERNAL_FORMATS.COMPRESSED_SRGB8_ETC2] = 'WEBGL_compressed_texture_etc', _b[INTERNAL_FORMATS.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC] = 'WEBGL_compressed_texture_etc', _b[INTERNAL_FORMATS.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2] = 'WEBGL_compressed_texture_etc', _b[INTERNAL_FORMATS.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2] = 'WEBGL_compressed_texture_etc', _b[INTERNAL_FORMATS.COMPRESSED_RGB_PVRTC_4BPPV1_IMG] = 'WEBGL_compressed_texture_pvrtc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG] = 'WEBGL_compressed_texture_pvrtc', _b[INTERNAL_FORMATS.COMPRESSED_RGB_PVRTC_2BPPV1_IMG] = 'WEBGL_compressed_texture_pvrtc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG] = 'WEBGL_compressed_texture_pvrtc', _b[INTERNAL_FORMATS.COMPRESSED_RGB_ETC1_WEBGL] = 'WEBGL_compressed_texture_etc1', _b[INTERNAL_FORMATS.COMPRESSED_RGB_ATC_WEBGL] = 'WEBGL_compressed_texture_atc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL] = 'WEBGL_compressed_texture_atc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL] = 'WEBGL_compressed_texture_atc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_4x4_KHR] = 'WEBGL_compressed_texture_astc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_5x5_KHR] = 'WEBGL_compressed_texture_astc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_6x6_KHR] = 'WEBGL_compressed_texture_astc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_8x8_KHR] = 'WEBGL_compressed_texture_astc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_10x10_KHR] = 'WEBGL_compressed_texture_astc', _b[INTERNAL_FORMATS.COMPRESSED_RGBA_ASTC_12x12_KHR] = 'WEBGL_compressed_texture_astc', _b);
|
|
2153
|
-
|
|
2154
|
-
var CompressedTextureResource = function () {
|
|
2155
|
-
function CompressedTextureResource() {
|
|
2156
|
-
this.levelBuffers = [];
|
|
2157
|
-
}
|
|
2158
|
-
|
|
2159
|
-
CompressedTextureResource.prototype.upload = function (gl) {
|
|
2160
|
-
var levels = this.levels;
|
|
2161
|
-
var name = INTERNAL_FORMATS_TO_EXTENSION_NAME[this.internalFormat];
|
|
2162
|
-
|
|
2163
|
-
if (!gl[name]) {
|
|
2164
|
-
gl[name] = true;
|
|
2165
|
-
|
|
2166
|
-
if (name === 'WEBGL_compressed_texture_pvrtc') {
|
|
2167
|
-
gl.getExtension(name) || gl.getExtension('WEBKIT_WEBGL_compressed_texture_pvrtc');
|
|
2168
|
-
} else {
|
|
2169
|
-
gl.getExtension(name);
|
|
2170
|
-
}
|
|
2171
|
-
}
|
|
2172
|
-
|
|
2173
|
-
for (var i = 0; i < this.levels; ++i) {
|
|
2174
|
-
var _a = this.levelBuffers[i],
|
|
2175
|
-
levelWidth = _a.levelWidth,
|
|
2176
|
-
levelHeight = _a.levelHeight,
|
|
2177
|
-
levelBuffer = _a.levelBuffer;
|
|
2178
|
-
gl.compressedTexImage2D(gl.TEXTURE_2D, i, this.internalFormat, levelWidth, levelHeight, 0, levelBuffer);
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
|
-
if (levels > 1) {
|
|
2182
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
|
2183
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);
|
|
2184
|
-
} else {
|
|
2185
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
|
2186
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
|
|
2187
|
-
}
|
|
2188
|
-
};
|
|
2189
|
-
|
|
2190
|
-
return CompressedTextureResource;
|
|
2191
|
-
}();
|
|
2192
|
-
|
|
2193
|
-
var FILE_HEADER_SIZE = 64;
|
|
2194
|
-
var KTX_FIELDS = {
|
|
2195
|
-
FILE_IDENTIFIER: 0,
|
|
2196
|
-
ENDIANNESS: 12,
|
|
2197
|
-
GL_TYPE: 16,
|
|
2198
|
-
GL_TYPE_SIZE: 20,
|
|
2199
|
-
GL_FORMAT: 24,
|
|
2200
|
-
GL_INTERNAL_FORMAT: 28,
|
|
2201
|
-
GL_BASE_INTERNAL_FORMAT: 32,
|
|
2202
|
-
PIXEL_WIDTH: 36,
|
|
2203
|
-
PIXEL_HEIGHT: 40,
|
|
2204
|
-
PIXEL_DEPTH: 44,
|
|
2205
|
-
NUMBER_OF_ARRAY_ELEMENTS: 48,
|
|
2206
|
-
NUMBER_OF_FACES: 52,
|
|
2207
|
-
NUMBER_OF_MIPMAP_LEVELS: 56,
|
|
2208
|
-
BYTES_OF_KEY_VALUE_DATA: 60
|
|
2209
|
-
};
|
|
2210
|
-
var FILE_IDENTIFIER = [0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A];
|
|
2211
|
-
var ENDIANNESS = 0x04030201;
|
|
2212
|
-
|
|
2213
|
-
var KTXTextureResource = function (_super) {
|
|
2214
|
-
__extends$1(KTXTextureResource, _super);
|
|
2215
|
-
|
|
2216
|
-
function KTXTextureResource(source, config) {
|
|
2217
|
-
var _a;
|
|
2218
|
-
|
|
2219
|
-
var _this = _super.call(this) || this;
|
|
2220
|
-
|
|
2221
|
-
_this.complete = true;
|
|
2222
|
-
_this.src = config.url;
|
|
2223
|
-
var dataView = new DataView(source);
|
|
2224
|
-
|
|
2225
|
-
if (!validateKTX(dataView)) {
|
|
2226
|
-
throw new Error('Not a valid KTX Texture');
|
|
2227
|
-
}
|
|
2228
|
-
|
|
2229
|
-
var littleEndian = dataView.getUint32(KTX_FIELDS.ENDIANNESS, true) === ENDIANNESS;
|
|
2230
|
-
_this.internalFormat = dataView.getUint32(KTX_FIELDS.GL_INTERNAL_FORMAT, littleEndian);
|
|
2231
|
-
var pixelWidth = _this.formerWidth = dataView.getUint32(KTX_FIELDS.PIXEL_WIDTH, littleEndian);
|
|
2232
|
-
var pixelHeight = _this.formerHeight = dataView.getUint32(KTX_FIELDS.PIXEL_HEIGHT, littleEndian) || 1;
|
|
2233
|
-
var size = INTERNAL_FORMAT_TO_BLOCK_SIZE[_this.internalFormat];
|
|
2234
|
-
_this.width = pixelWidth % size[0] === 0 ? pixelWidth : pixelWidth + size[0] - pixelWidth % size[0];
|
|
2235
|
-
_this.height = pixelHeight % size[1] === 0 ? pixelHeight : pixelHeight + size[1] - pixelHeight % size[1];
|
|
2236
|
-
var src = eva_js.resource.resourcesMap[config.metadata.name].src[config.metadata.key];
|
|
2237
|
-
|
|
2238
|
-
var _b = (_a = src === null || src === void 0 ? void 0 : src.size) !== null && _a !== void 0 ? _a : {},
|
|
2239
|
-
width = _b.width,
|
|
2240
|
-
height = _b.height;
|
|
2241
|
-
|
|
2242
|
-
if (width && height) {
|
|
2243
|
-
_this.naturalWidth = width;
|
|
2244
|
-
_this.naturalHeight = height;
|
|
2245
|
-
}
|
|
2246
|
-
|
|
2247
|
-
var pixelDepth = dataView.getUint32(KTX_FIELDS.PIXEL_DEPTH, littleEndian) || 1;
|
|
2248
|
-
var numberOfArrayElements = dataView.getUint32(KTX_FIELDS.NUMBER_OF_ARRAY_ELEMENTS, littleEndian) || 1;
|
|
2249
|
-
var numberOfFaces = dataView.getUint32(KTX_FIELDS.NUMBER_OF_FACES, littleEndian);
|
|
2250
|
-
var numberOfMipmapLevels = _this.levels = dataView.getUint32(KTX_FIELDS.NUMBER_OF_MIPMAP_LEVELS, littleEndian);
|
|
2251
|
-
var bytesOfKeyValueData = dataView.getUint32(KTX_FIELDS.BYTES_OF_KEY_VALUE_DATA, littleEndian);
|
|
2252
|
-
|
|
2253
|
-
if (pixelHeight === 0 || pixelDepth !== 1) {
|
|
2254
|
-
throw new Error('Only 2D textures are supported!');
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
if (numberOfFaces !== 1) {
|
|
2258
|
-
throw new Error('CubeTextures are not supported!');
|
|
2259
|
-
}
|
|
2260
|
-
|
|
2261
|
-
if (numberOfArrayElements !== 1) {
|
|
2262
|
-
throw new Error('It does not support array textures!');
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
var mipWidth = pixelWidth;
|
|
2266
|
-
var mipHeight = pixelHeight;
|
|
2267
|
-
var imageOffset = FILE_HEADER_SIZE + bytesOfKeyValueData;
|
|
2268
|
-
|
|
2269
|
-
for (var mipmapLevel = 0; mipmapLevel < numberOfMipmapLevels; mipmapLevel++) {
|
|
2270
|
-
var imageSize = dataView.getUint32(imageOffset, littleEndian);
|
|
2271
|
-
imageOffset += 4;
|
|
2272
|
-
var size_1 = INTERNAL_FORMAT_TO_BLOCK_SIZE[_this.internalFormat];
|
|
2273
|
-
var levelWidth = mipWidth % size_1[0] === 0 ? mipWidth : mipWidth + size_1[0] - mipWidth % size_1[0];
|
|
2274
|
-
var levelHeight = mipHeight % size_1[1] === 0 ? mipHeight : mipHeight + size_1[1] - mipHeight % size_1[1];
|
|
2275
|
-
var mip = {
|
|
2276
|
-
levelID: mipmapLevel,
|
|
2277
|
-
levelWidth: levelWidth,
|
|
2278
|
-
levelHeight: levelHeight,
|
|
2279
|
-
levelBuffer: new Uint8Array(source, imageOffset, imageSize)
|
|
2280
|
-
};
|
|
2281
|
-
|
|
2282
|
-
_this.levelBuffers.push(mip);
|
|
2283
|
-
|
|
2284
|
-
imageOffset += imageSize;
|
|
2285
|
-
imageOffset += 3 - (imageOffset + 3) % 4;
|
|
2286
|
-
mipWidth = mipWidth >> 1 || 1;
|
|
2287
|
-
mipHeight = mipHeight >> 1 || 1;
|
|
2288
|
-
}
|
|
2289
|
-
|
|
2290
|
-
return _this;
|
|
2291
|
-
}
|
|
2292
|
-
|
|
2293
|
-
return KTXTextureResource;
|
|
2294
|
-
}(CompressedTextureResource);
|
|
2295
|
-
|
|
2296
|
-
function validateKTX(dataView) {
|
|
2297
|
-
for (var i = 0; i < FILE_IDENTIFIER.length; i++) {
|
|
2298
|
-
if (dataView.getUint8(i) !== FILE_IDENTIFIER[i]) {
|
|
2299
|
-
return false;
|
|
2300
|
-
}
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
return true;
|
|
2304
|
-
}
|
|
2305
|
-
|
|
2306
|
-
var KTXLoadStrategy = function (_super) {
|
|
2307
|
-
__extends$1(KTXLoadStrategy, _super);
|
|
2308
|
-
|
|
2309
|
-
function KTXLoadStrategy() {
|
|
2310
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2311
|
-
}
|
|
2312
|
-
|
|
2313
|
-
KTXLoadStrategy.prototype._complete = function (type, data) {
|
|
2314
|
-
_super.prototype._complete.call(this, type, new KTXTextureResource(data, this.config));
|
|
2315
|
-
};
|
|
2316
|
-
|
|
2317
|
-
return KTXLoadStrategy;
|
|
2318
|
-
}(XhrLoadStrategy);
|
|
2319
|
-
|
|
2320
|
-
var KTXLoadStrategy$1 = KTXLoadStrategy;
|
|
2321
|
-
var XhrResponseType = eva_js.resourceLoader.XhrResponseType;
|
|
2322
|
-
|
|
2323
|
-
function addPreProcessResourceHandler(resource, gl) {
|
|
2324
|
-
resource.addPreProcessResourceHandler(function normalizeResource(resource) {
|
|
2325
|
-
var _a, _b, _c;
|
|
2326
|
-
|
|
2327
|
-
var textures = (_b = (_a = resource.src) === null || _a === void 0 ? void 0 : _a.image) === null || _b === void 0 ? void 0 : _b.texture;
|
|
2328
|
-
if (!textures) return;
|
|
2329
|
-
|
|
2330
|
-
if (!Array.isArray(textures)) {
|
|
2331
|
-
textures = [textures];
|
|
2332
|
-
}
|
|
2333
|
-
|
|
2334
|
-
var formats = (_c = getSuportCompressedTextureFormats(gl)) !== null && _c !== void 0 ? _c : {};
|
|
2335
|
-
var target = textures.find(function (texture) {
|
|
2336
|
-
return formats[texture.type];
|
|
2337
|
-
});
|
|
2338
|
-
|
|
2339
|
-
if (target) {
|
|
2340
|
-
_extends(resource.src.image, target);
|
|
2341
|
-
}
|
|
2342
|
-
});
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
function addKTXStragetyAndRegister() {
|
|
2346
|
-
_extends(eva_js.RESOURCE_TYPE_STRATEGY, {
|
|
2347
|
-
astc: KTXLoadStrategy$1,
|
|
2348
|
-
etc: KTXLoadStrategy$1,
|
|
2349
|
-
pvrtc: KTXLoadStrategy$1,
|
|
2350
|
-
s3tc: KTXLoadStrategy$1,
|
|
2351
|
-
atc: KTXLoadStrategy$1
|
|
2352
|
-
});
|
|
2353
|
-
|
|
2354
|
-
KTXLoadStrategy$1.setExtensionXhrType('ktx', XhrResponseType.Buffer);
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
var GLTexture = pixi_js.glCore.GLTexture;
|
|
2358
|
-
var GLTextureMixin = {
|
|
2359
|
-
isCompressed: false,
|
|
2360
|
-
uploadNotCompressed: GLTexture.prototype.upload,
|
|
2361
|
-
upload: function upload(source) {
|
|
2362
|
-
if (!(source instanceof CompressedTextureResource)) {
|
|
2363
|
-
return this.uploadNotCompressed(source);
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
this.bind();
|
|
2367
|
-
var gl = this.gl;
|
|
2368
|
-
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this.premultiplyAlpha);
|
|
2369
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST_MIPMAP_NEAREST);
|
|
2370
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
|
2371
|
-
this.isCompressed = true;
|
|
2372
|
-
source.upload(gl);
|
|
2373
|
-
},
|
|
2374
|
-
enableMipmap: function enableMipmap() {
|
|
2375
|
-
if (this.isCompressed) {
|
|
2376
|
-
return;
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
var gl = this.gl;
|
|
2380
|
-
this.bind();
|
|
2381
|
-
this.mipmap = true;
|
|
2382
|
-
gl.generateMipmap(gl.TEXTURE_2D);
|
|
2383
|
-
}
|
|
2384
|
-
};
|
|
2385
|
-
|
|
2386
|
-
var _a$1;
|
|
2387
|
-
|
|
2388
|
-
var oldFrom$1 = Symbol();
|
|
2389
|
-
var TextureMixin = (_a$1 = {}, _a$1[oldFrom$1] = pixi_js.Texture.from, _a$1.from = function (source) {
|
|
2390
|
-
if (!(source instanceof CompressedTextureResource)) {
|
|
2391
|
-
return this[oldFrom$1](source);
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
|
-
return new pixi_js.Texture(pixi_js.BaseTexture.from(source));
|
|
2395
|
-
}, _a$1);
|
|
2396
|
-
|
|
2397
|
-
var _a;
|
|
2398
|
-
|
|
2399
|
-
var oldFrom = Symbol();
|
|
2400
|
-
var BaseTextureMixin = (_a = {}, _a[oldFrom] = pixi_js.BaseTexture.from, _a.from = function (source, scaleMode, sourceScale) {
|
|
2401
|
-
if (!(source instanceof CompressedTextureResource)) {
|
|
2402
|
-
return this[oldFrom](source, scaleMode, sourceScale);
|
|
2403
|
-
}
|
|
2404
|
-
|
|
2405
|
-
var imageUrl = source.src;
|
|
2406
|
-
var baseTexture = pixi_js.utils.BaseTextureCache[imageUrl];
|
|
2407
|
-
|
|
2408
|
-
if (!baseTexture) {
|
|
2409
|
-
baseTexture = new pixi_js.BaseTexture(source, scaleMode);
|
|
2410
|
-
baseTexture.imageUrl = imageUrl;
|
|
2411
|
-
|
|
2412
|
-
if (sourceScale) {
|
|
2413
|
-
baseTexture.sourceScale = sourceScale;
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
pixi_js.BaseTexture.addToCache(baseTexture, imageUrl);
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
return baseTexture;
|
|
2420
|
-
}, _a);
|
|
2421
|
-
|
|
2422
|
-
function registerCompressedTexture(gl) {
|
|
2423
|
-
addPreProcessResourceHandler(eva_js.resource, gl);
|
|
2424
|
-
addKTXStragetyAndRegister();
|
|
2425
|
-
|
|
2426
|
-
_extends(pixi_js.glCore.GLTexture.prototype, GLTextureMixin);
|
|
2427
|
-
|
|
2428
|
-
_extends(pixi_js.Texture, TextureMixin);
|
|
2429
|
-
|
|
2430
|
-
_extends(pixi_js.BaseTexture, BaseTextureMixin);
|
|
2431
|
-
}
|
|
2432
|
-
|
|
2433
|
-
var RENDERER_TYPE;
|
|
2434
|
-
|
|
2435
|
-
(function (RENDERER_TYPE) {
|
|
2436
|
-
RENDERER_TYPE[RENDERER_TYPE["UNKNOWN"] = 0] = "UNKNOWN";
|
|
2437
|
-
RENDERER_TYPE[RENDERER_TYPE["WEBGL"] = 1] = "WEBGL";
|
|
2438
|
-
RENDERER_TYPE[RENDERER_TYPE["CANVAS"] = 2] = "CANVAS";
|
|
2439
|
-
})(RENDERER_TYPE || (RENDERER_TYPE = {}));
|
|
2440
|
-
|
|
2441
|
-
var disableScroll = function disableScroll(renderer) {
|
|
2442
|
-
renderer.plugins.interaction.autoPreventDefault = true;
|
|
2443
|
-
renderer.view.style.touchAction = 'none';
|
|
2444
|
-
};
|
|
2445
|
-
|
|
2446
|
-
var enableScroll = function enableScroll(renderer) {
|
|
2447
|
-
renderer.plugins.interaction.autoPreventDefault = false;
|
|
2448
|
-
renderer.view.style.touchAction = 'auto';
|
|
2449
|
-
};
|
|
2450
|
-
|
|
2451
|
-
var Renderer = function (_super) {
|
|
2452
|
-
__extends$1(Renderer, _super);
|
|
2453
|
-
|
|
2454
|
-
function Renderer() {
|
|
2455
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
2456
|
-
|
|
2457
|
-
_this.multiApps = [];
|
|
2458
|
-
return _this;
|
|
2459
|
-
}
|
|
2460
|
-
|
|
2461
|
-
Renderer.prototype.init = function (params) {
|
|
2462
|
-
var _this = this;
|
|
2463
|
-
|
|
2464
|
-
this.params = params;
|
|
2465
|
-
this.application = this.createApplication(params);
|
|
2466
|
-
this.containerManager = new ContainerManager$1();
|
|
2467
|
-
this.rendererManager = new RendererManager$1({
|
|
2468
|
-
game: this.game,
|
|
2469
|
-
rendererSystem: this
|
|
2470
|
-
});
|
|
2471
|
-
this.game.canvas = this.application.view;
|
|
2472
|
-
this.transform = new Transform$1({
|
|
2473
|
-
system: this,
|
|
2474
|
-
containerManager: this.containerManager
|
|
2475
|
-
});
|
|
2476
|
-
this.game.on('sceneChanged', function (_a) {
|
|
2477
|
-
var scene = _a.scene,
|
|
2478
|
-
mode = _a.mode,
|
|
2479
|
-
params = _a.params;
|
|
2480
|
-
var application;
|
|
2481
|
-
|
|
2482
|
-
switch (mode) {
|
|
2483
|
-
case eva_js.LOAD_SCENE_MODE.SINGLE:
|
|
2484
|
-
application = _this.application;
|
|
2485
|
-
break;
|
|
2486
|
-
|
|
2487
|
-
case eva_js.LOAD_SCENE_MODE.MULTI_CANVAS:
|
|
2488
|
-
application = _this.createMultiApplication({
|
|
2489
|
-
params: params
|
|
2490
|
-
});
|
|
2491
|
-
break;
|
|
2492
|
-
}
|
|
2493
|
-
|
|
2494
|
-
scene.canvas = application.view;
|
|
2495
|
-
|
|
2496
|
-
_this.transform.emit('changeScene', {
|
|
2497
|
-
scene: scene,
|
|
2498
|
-
mode: mode,
|
|
2499
|
-
application: application
|
|
2500
|
-
});
|
|
2501
|
-
});
|
|
2502
|
-
var gl = this.application.renderer.gl;
|
|
2503
|
-
|
|
2504
|
-
if (gl) {
|
|
2505
|
-
this.suportedCompressedTextureFormats = getSuportCompressedTextureFormats(gl);
|
|
2506
|
-
registerCompressedTexture(gl);
|
|
2507
|
-
}
|
|
2508
|
-
};
|
|
2509
|
-
|
|
2510
|
-
Renderer.prototype.registerObserver = function (observerInfo) {
|
|
2511
|
-
var _a;
|
|
2512
|
-
|
|
2513
|
-
var thisObserverInfo = this.constructor.observerInfo;
|
|
2514
|
-
|
|
2515
|
-
for (var key in observerInfo) {
|
|
2516
|
-
if (!thisObserverInfo[key]) {
|
|
2517
|
-
thisObserverInfo[key] = [];
|
|
2518
|
-
}
|
|
2519
|
-
|
|
2520
|
-
(_a = thisObserverInfo[key]).push.apply(_a, __spread(observerInfo[key]));
|
|
2521
|
-
}
|
|
2522
|
-
};
|
|
2523
|
-
|
|
2524
|
-
Renderer.prototype.createMultiApplication = function (_a) {
|
|
2525
|
-
var params = _a.params;
|
|
2526
|
-
var app = this.createApplication(params);
|
|
2527
|
-
this.multiApps.push(app);
|
|
2528
|
-
return app;
|
|
2529
|
-
};
|
|
2530
|
-
|
|
2531
|
-
Renderer.prototype.createApplication = function (params) {
|
|
2532
|
-
params.view = params.canvas;
|
|
2533
|
-
|
|
2534
|
-
if (params.renderType === RENDERER_TYPE.CANVAS) {
|
|
2535
|
-
params.forceCanvas = true;
|
|
2536
|
-
}
|
|
2537
|
-
|
|
2538
|
-
pixi_js.ticker.shared.autoStart = false;
|
|
2539
|
-
pixi_js.ticker.shared.stop();
|
|
2540
|
-
var app = new Application$1(_assign({
|
|
2541
|
-
sharedTicker: true
|
|
2542
|
-
}, params));
|
|
2543
|
-
|
|
2544
|
-
if (params.preventScroll !== undefined) {
|
|
2545
|
-
console.warn('PreventScroll property will deprecate at next major version, please use enableEnable instead. https://eva.js.org/#/tutorials/game');
|
|
2546
|
-
params.preventScroll ? enableScroll(app.renderer) : disableScroll(app.renderer);
|
|
2547
|
-
}
|
|
2548
|
-
|
|
2549
|
-
if (params.enableScroll !== undefined) {
|
|
2550
|
-
params.enableScroll ? enableScroll(app.renderer) : disableScroll(app.renderer);
|
|
2551
|
-
}
|
|
2552
|
-
|
|
2553
|
-
if (params.preventScroll === undefined && params.enableScroll === undefined) {
|
|
2554
|
-
enableScroll(app.renderer);
|
|
2555
|
-
}
|
|
2556
|
-
|
|
2557
|
-
return app;
|
|
2558
|
-
};
|
|
2559
|
-
|
|
2560
|
-
Renderer.prototype.update = function () {
|
|
2561
|
-
var e_1, _a, e_2, _b;
|
|
2562
|
-
|
|
2563
|
-
var changes = this.componentObserver.clear();
|
|
2564
|
-
|
|
2565
|
-
try {
|
|
2566
|
-
for (var changes_1 = __values(changes), changes_1_1 = changes_1.next(); !changes_1_1.done; changes_1_1 = changes_1.next()) {
|
|
2567
|
-
var changed = changes_1_1.value;
|
|
2568
|
-
this.transform.componentChanged(changed);
|
|
2569
|
-
}
|
|
2570
|
-
} catch (e_1_1) {
|
|
2571
|
-
e_1 = {
|
|
2572
|
-
error: e_1_1
|
|
2573
|
-
};
|
|
2574
|
-
} finally {
|
|
2575
|
-
try {
|
|
2576
|
-
if (changes_1_1 && !changes_1_1.done && (_a = changes_1.return)) _a.call(changes_1);
|
|
2577
|
-
} finally {
|
|
2578
|
-
if (e_1) throw e_1.error;
|
|
2579
|
-
}
|
|
2580
|
-
}
|
|
2581
|
-
|
|
2582
|
-
try {
|
|
2583
|
-
for (var _c = __values(this.game.gameObjects), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
2584
|
-
var gameObject = _d.value;
|
|
2585
|
-
this.containerManager.updateTransform({
|
|
2586
|
-
name: gameObject.id,
|
|
2587
|
-
transform: gameObject.transform
|
|
2588
|
-
});
|
|
2589
|
-
this.rendererManager.update(gameObject);
|
|
2590
|
-
}
|
|
2591
|
-
} catch (e_2_1) {
|
|
2592
|
-
e_2 = {
|
|
2593
|
-
error: e_2_1
|
|
2594
|
-
};
|
|
2595
|
-
} finally {
|
|
2596
|
-
try {
|
|
2597
|
-
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
2598
|
-
} finally {
|
|
2599
|
-
if (e_2) throw e_2.error;
|
|
2600
|
-
}
|
|
2601
|
-
}
|
|
2602
|
-
};
|
|
2603
|
-
|
|
2604
|
-
Renderer.prototype.lateUpdate = function (e) {
|
|
2605
|
-
this.transform.update();
|
|
2606
|
-
this.application.ticker.update(e.time);
|
|
2607
|
-
};
|
|
2608
|
-
|
|
2609
|
-
Renderer.prototype.onDestroy = function () {
|
|
2610
|
-
var e_3, _a;
|
|
2611
|
-
|
|
2612
|
-
this.application.destroy();
|
|
2613
|
-
|
|
2614
|
-
try {
|
|
2615
|
-
for (var _b = __values(this.multiApps), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2616
|
-
var app = _c.value;
|
|
2617
|
-
app && app.destroy();
|
|
2618
|
-
}
|
|
2619
|
-
} catch (e_3_1) {
|
|
2620
|
-
e_3 = {
|
|
2621
|
-
error: e_3_1
|
|
2622
|
-
};
|
|
2623
|
-
} finally {
|
|
2624
|
-
try {
|
|
2625
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
2626
|
-
} finally {
|
|
2627
|
-
if (e_3) throw e_3.error;
|
|
2628
|
-
}
|
|
2629
|
-
}
|
|
2630
|
-
|
|
2631
|
-
this.transform.destroy();
|
|
2632
|
-
this.transform = null;
|
|
2633
|
-
this.params = null;
|
|
2634
|
-
this.rendererManager = null;
|
|
2635
|
-
this.containerManager = null;
|
|
2636
|
-
this.application = null;
|
|
2637
|
-
this.game = null;
|
|
2638
|
-
this.multiApps = null;
|
|
2639
|
-
};
|
|
2640
|
-
|
|
2641
|
-
Renderer.prototype.resize = function (width, height) {
|
|
2642
|
-
this.params.width = width;
|
|
2643
|
-
this.params.height = height;
|
|
2644
|
-
this.application.renderer.resize(width, height);
|
|
2645
|
-
};
|
|
2646
|
-
|
|
2647
|
-
Renderer.systemName = 'Renderer';
|
|
2648
|
-
Renderer = __decorate([eva_js.decorators.componentObserver({
|
|
2649
|
-
Transform: ['_parent']
|
|
2650
|
-
})], Renderer);
|
|
2651
|
-
return Renderer;
|
|
2652
|
-
}(eva_js.System);
|
|
2653
|
-
|
|
2654
|
-
var RendererSystem = Renderer;
|
|
2655
|
-
|
|
2656
|
-
var mixinPIXI = function mixinPIXI() {
|
|
2657
|
-
pixi_js.BaseTexture.prototype.destroy = function () {
|
|
2658
|
-
if (this.imageUrl) {
|
|
2659
|
-
delete pixi_js.utils.TextureCache[this.imageUrl];
|
|
2660
|
-
this.imageUrl = null;
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2663
|
-
this.source = null;
|
|
2664
|
-
this.dispose();
|
|
2665
|
-
pixi_js.BaseTexture.removeFromCache(this);
|
|
2666
|
-
this.textureCacheIds = null;
|
|
2667
|
-
this._destroyed = true;
|
|
2668
|
-
};
|
|
2669
|
-
};
|
|
2670
|
-
|
|
2671
|
-
mixinPIXI();
|
|
2672
|
-
|
|
2673
219
|
function getIDEPropsPropertyObj(target, propertyKey) {
|
|
2674
220
|
if (!target.constructor.IDEProps) {
|
|
2675
221
|
target.constructor.IDEProps = {};
|
|
@@ -2749,7 +295,7 @@ this.EVA.plugin.a11y = function (exports, eva_js, pixi_js) {
|
|
|
2749
295
|
};
|
|
2750
296
|
|
|
2751
297
|
var A11y = function (_super) {
|
|
2752
|
-
__extends
|
|
298
|
+
__extends(A11y, _super);
|
|
2753
299
|
|
|
2754
300
|
function A11y(param) {
|
|
2755
301
|
var _this = _super.call(this) || this;
|
|
@@ -2846,7 +392,7 @@ this.EVA.plugin.a11y = function (exports, eva_js, pixi_js) {
|
|
|
2846
392
|
};
|
|
2847
393
|
|
|
2848
394
|
var A11ySystem = function (_super) {
|
|
2849
|
-
__extends
|
|
395
|
+
__extends(A11ySystem, _super);
|
|
2850
396
|
|
|
2851
397
|
function A11ySystem(opt) {
|
|
2852
398
|
var _this = _super.call(this, opt) || this;
|
|
@@ -2992,7 +538,7 @@ this.EVA.plugin.a11y = function (exports, eva_js, pixi_js) {
|
|
|
2992
538
|
};
|
|
2993
539
|
|
|
2994
540
|
A11ySystem.prototype.getRenderRect = function () {
|
|
2995
|
-
var _a = this.game.getSystem(RendererSystem).params,
|
|
541
|
+
var _a = this.game.getSystem(pluginRenderer.RendererSystem).params,
|
|
2996
542
|
params = _a === void 0 ? {
|
|
2997
543
|
width: 300,
|
|
2998
544
|
height: 300
|
|
@@ -3326,4 +872,4 @@ this.EVA.plugin.a11y = function (exports, eva_js, pixi_js) {
|
|
|
3326
872
|
value: true
|
|
3327
873
|
});
|
|
3328
874
|
return exports;
|
|
3329
|
-
}({}, EVA,
|
|
875
|
+
}({}, EVA, EVA.plugin.renderer);
|