@eva/plugin-renderer-spine 2.0.0-beta.1 → 2.0.0-beta.11
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.renderer.spine.js +2 -2
- package/dist/EVA.plugin.renderer.spine.min.js +1 -1
- package/dist/plugin-renderer-spine.cjs.js +25 -61
- package/dist/plugin-renderer-spine.cjs.prod.js +1 -1
- package/dist/plugin-renderer-spine.d.ts +2 -0
- package/dist/plugin-renderer-spine.esm.js +23 -60
- package/package.json +5 -5
|
@@ -2,37 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var spineBase = require('@eva/spine-base');
|
|
6
5
|
var pixi_js = require('pixi.js');
|
|
7
|
-
|
|
8
|
-
/*! *****************************************************************************
|
|
9
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
11
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
12
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
|
|
14
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
16
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
17
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
18
|
-
|
|
19
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
20
|
-
and limitations under the License.
|
|
21
|
-
***************************************************************************** */
|
|
22
|
-
/* global Reflect, Promise */
|
|
23
|
-
|
|
24
|
-
var extendStatics = function(d, b) {
|
|
25
|
-
extendStatics = Object.setPrototypeOf ||
|
|
26
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
27
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
28
|
-
return extendStatics(d, b);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
function __extends(d, b) {
|
|
32
|
-
extendStatics(d, b);
|
|
33
|
-
function __() { this.constructor = d; }
|
|
34
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
35
|
-
}
|
|
6
|
+
var spineBase = require('@eva/spine-base');
|
|
36
7
|
|
|
37
8
|
var __defProp = Object.defineProperty;
|
|
38
9
|
var __defNormalProp = (obj, key, value) =>
|
|
@@ -3724,14 +3695,17 @@ var _AnimationState = class {
|
|
|
3724
3695
|
let finished = this.updateMixingFrom(from, delta);
|
|
3725
3696
|
from.animationLast = from.nextAnimationLast;
|
|
3726
3697
|
from.trackLast = from.nextTrackLast;
|
|
3727
|
-
if (to.
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
if (from.
|
|
3731
|
-
|
|
3732
|
-
|
|
3698
|
+
if (to.nextTrackLast != -1) {
|
|
3699
|
+
const discard = to.mixTime == 0 && from.mixTime == 0;
|
|
3700
|
+
if (to.mixTime >= to.mixDuration || discard) {
|
|
3701
|
+
if (from.totalAlpha == 0 || to.mixDuration == 0 || discard) {
|
|
3702
|
+
to.mixingFrom = from.mixingFrom;
|
|
3703
|
+
if (from.mixingFrom != null) from.mixingFrom.mixingTo = to;
|
|
3704
|
+
to.interruptAlpha = from.interruptAlpha;
|
|
3705
|
+
this.queue.end(from);
|
|
3706
|
+
}
|
|
3707
|
+
return finished;
|
|
3733
3708
|
}
|
|
3734
|
-
return finished;
|
|
3735
3709
|
}
|
|
3736
3710
|
from.trackTime += delta * from.timeScale;
|
|
3737
3711
|
to.mixTime += delta;
|
|
@@ -12427,7 +12401,7 @@ var vectorAux = new Vector2();
|
|
|
12427
12401
|
Skeleton.yDown = true;
|
|
12428
12402
|
var clipper = new SkeletonClipping();
|
|
12429
12403
|
var maskPool = new Pool(() => new pixi_js.Graphics());
|
|
12430
|
-
var Spine$
|
|
12404
|
+
var Spine$1 = class extends pixi_js.ViewContainer {
|
|
12431
12405
|
// Pixi properties
|
|
12432
12406
|
batched = true;
|
|
12433
12407
|
buildId = 0;
|
|
@@ -12971,7 +12945,7 @@ var Spine$2 = class extends pixi_js.ViewContainer {
|
|
|
12971
12945
|
static from({ skeleton, atlas, scale = 1, darkTint, autoUpdate = true }) {
|
|
12972
12946
|
const cacheKey = `${skeleton}-${atlas}-${scale}`;
|
|
12973
12947
|
if (pixi_js.Cache.has(cacheKey)) {
|
|
12974
|
-
return new Spine$
|
|
12948
|
+
return new Spine$1(pixi_js.Cache.get(cacheKey));
|
|
12975
12949
|
}
|
|
12976
12950
|
const skeletonAsset = pixi_js.Assets.get(skeleton);
|
|
12977
12951
|
const atlasAsset = pixi_js.Assets.get(atlas);
|
|
@@ -12981,7 +12955,7 @@ var Spine$2 = class extends pixi_js.ViewContainer {
|
|
|
12981
12955
|
parser.scale = scale;
|
|
12982
12956
|
const skeletonData = parser.readSkeletonData(skeletonAsset);
|
|
12983
12957
|
pixi_js.Cache.set(cacheKey, skeletonData);
|
|
12984
|
-
return new Spine$
|
|
12958
|
+
return new Spine$1({
|
|
12985
12959
|
skeletonData,
|
|
12986
12960
|
darkTint,
|
|
12987
12961
|
autoUpdate,
|
|
@@ -13476,6 +13450,7 @@ var pixiSpine = {
|
|
|
13476
13450
|
ShearXTimeline,
|
|
13477
13451
|
ShearYTimeline,
|
|
13478
13452
|
Skeleton,
|
|
13453
|
+
SpineTexture,
|
|
13479
13454
|
SkeletonBinary,
|
|
13480
13455
|
SkeletonBounds,
|
|
13481
13456
|
SkeletonClipping,
|
|
@@ -13486,7 +13461,7 @@ var pixiSpine = {
|
|
|
13486
13461
|
Slot,
|
|
13487
13462
|
SlotData,
|
|
13488
13463
|
SpacingMode,
|
|
13489
|
-
Spine: Spine$
|
|
13464
|
+
Spine: Spine$1,
|
|
13490
13465
|
SpineDebugRenderer,
|
|
13491
13466
|
SpinePipe,
|
|
13492
13467
|
SpineTexture,
|
|
@@ -13514,26 +13489,15 @@ var pixiSpine = {
|
|
|
13514
13489
|
WindowedMean,
|
|
13515
13490
|
};
|
|
13516
13491
|
|
|
13517
|
-
|
|
13518
|
-
|
|
13519
|
-
|
|
13520
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
13492
|
+
class SpineSystem extends spineBase.SpineSystem {
|
|
13493
|
+
init() {
|
|
13494
|
+
super.init({ pixiSpine });
|
|
13521
13495
|
}
|
|
13522
|
-
|
|
13523
|
-
_super.prototype.init.call(this, { pixiSpine: pixiSpine });
|
|
13524
|
-
};
|
|
13525
|
-
return SpineSystem;
|
|
13526
|
-
}(spineBase.SpineSystem));
|
|
13527
|
-
var SpineSystem$1 = SpineSystem;
|
|
13496
|
+
}
|
|
13528
13497
|
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
function Spine() {
|
|
13532
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
13533
|
-
}
|
|
13534
|
-
return Spine;
|
|
13535
|
-
}(spineBase.Spine));
|
|
13536
|
-
var Spine$1 = Spine;
|
|
13498
|
+
class Spine extends spineBase.Spine {
|
|
13499
|
+
}
|
|
13537
13500
|
|
|
13538
|
-
exports.
|
|
13539
|
-
exports.
|
|
13501
|
+
exports.PixiSpine = pixiSpine;
|
|
13502
|
+
exports.Spine = Spine;
|
|
13503
|
+
exports.SpineSystem = SpineSystem;
|