[ts] Fixed compilation error.

This commit is contained in:
Nathan Sweet 2021-06-20 13:52:30 -04:00
parent cae8b6036e
commit 4742c0d987
5 changed files with 45 additions and 35 deletions

View File

@ -12561,15 +12561,18 @@ var spine;
this.play();
if (config.success)
config.success(this);
if (!this.animationState.getCurrent(0)) {
var entry = this.animationState.getCurrent(0);
if (!entry) {
if (this.config.animation)
this.setAnimation(this.config.animation);
else {
var entry = this.animationState.setEmptyAnimation(0);
entry = this.animationState.setEmptyAnimation(0);
entry.trackEnd = 100000000;
this.setViewport(entry.animation);
}
}
else if (!this.currentViewport)
this.setViewport(entry.animation);
};
SpinePlayer.prototype.setupInput = function () {
var _this = this;
@ -12816,8 +12819,9 @@ var spine;
width: this.currentViewport.width + this.currentViewport.padLeft + this.currentViewport.padRight,
height: this.currentViewport.height + this.currentViewport.padBottom + this.currentViewport.padTop
};
if (this.previousViewport) {
var transitionAlpha = ((performance.now() - this.viewportTransitionStart) / 1000) / config.viewport.transitionTime;
if (this.previousViewport && transitionAlpha < 1) {
if (transitionAlpha < 1) {
var oldViewport = {
x: this.previousViewport.x - this.previousViewport.padLeft,
y: this.previousViewport.y - this.previousViewport.padBottom,
@ -12831,6 +12835,7 @@ var spine;
height: oldViewport.height + (viewport.height - oldViewport.height) * transitionAlpha
};
}
}
var viewportSize = this.scale(viewport.width, viewport.height, this.canvas.width, this.canvas.height);
var gl = this.context.gl;
gl.clearColor(bg.r, bg.g, bg.b, bg.a);

File diff suppressed because one or more lines are too long

View File

@ -11884,15 +11884,18 @@ var spine;
this.play();
if (config.success)
config.success(this);
if (!this.animationState.getCurrent(0)) {
var entry = this.animationState.getCurrent(0);
if (!entry) {
if (this.config.animation)
this.setAnimation(this.config.animation);
else {
var entry = this.animationState.setEmptyAnimation(0);
entry = this.animationState.setEmptyAnimation(0);
entry.trackEnd = 100000000;
this.setViewport(entry.animation);
}
}
else if (!this.currentViewport)
this.setViewport(entry.animation);
};
SpinePlayer.prototype.setupInput = function () {
var _this = this;
@ -12139,8 +12142,9 @@ var spine;
width: this.currentViewport.width + this.currentViewport.padLeft + this.currentViewport.padRight,
height: this.currentViewport.height + this.currentViewport.padBottom + this.currentViewport.padTop
};
if (this.previousViewport) {
var transitionAlpha = ((performance.now() - this.viewportTransitionStart) / 1000) / config.viewport.transitionTime;
if (this.previousViewport && transitionAlpha < 1) {
if (transitionAlpha < 1) {
var oldViewport = {
x: this.previousViewport.x - this.previousViewport.padLeft,
y: this.previousViewport.y - this.previousViewport.padBottom,
@ -12154,6 +12158,7 @@ var spine;
height: oldViewport.height + (viewport.height - oldViewport.height) * transitionAlpha
};
}
}
var viewportSize = this.scale(viewport.width, viewport.height, this.canvas.width, this.canvas.height);
var gl = this.context.gl;
gl.clearColor(bg.r, bg.g, bg.b, bg.a);

File diff suppressed because one or more lines are too long

View File

@ -459,7 +459,7 @@ module spine {
if (this.config.animation)
this.setAnimation(this.config.animation);
else {
var entry = this.animationState.setEmptyAnimation(0);
entry = this.animationState.setEmptyAnimation(0);
entry.trackEnd = 100000000;
this.setViewport(entry.animation);
}