mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[ts] Fixed compilation error.
This commit is contained in:
parent
cae8b6036e
commit
4742c0d987
@ -12561,15 +12561,18 @@ var spine;
|
|||||||
this.play();
|
this.play();
|
||||||
if (config.success)
|
if (config.success)
|
||||||
config.success(this);
|
config.success(this);
|
||||||
if (!this.animationState.getCurrent(0)) {
|
var entry = this.animationState.getCurrent(0);
|
||||||
|
if (!entry) {
|
||||||
if (this.config.animation)
|
if (this.config.animation)
|
||||||
this.setAnimation(this.config.animation);
|
this.setAnimation(this.config.animation);
|
||||||
else {
|
else {
|
||||||
var entry = this.animationState.setEmptyAnimation(0);
|
entry = this.animationState.setEmptyAnimation(0);
|
||||||
entry.trackEnd = 100000000;
|
entry.trackEnd = 100000000;
|
||||||
this.setViewport(entry.animation);
|
this.setViewport(entry.animation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!this.currentViewport)
|
||||||
|
this.setViewport(entry.animation);
|
||||||
};
|
};
|
||||||
SpinePlayer.prototype.setupInput = function () {
|
SpinePlayer.prototype.setupInput = function () {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
@ -12816,20 +12819,22 @@ var spine;
|
|||||||
width: this.currentViewport.width + this.currentViewport.padLeft + this.currentViewport.padRight,
|
width: this.currentViewport.width + this.currentViewport.padLeft + this.currentViewport.padRight,
|
||||||
height: this.currentViewport.height + this.currentViewport.padBottom + this.currentViewport.padTop
|
height: this.currentViewport.height + this.currentViewport.padBottom + this.currentViewport.padTop
|
||||||
};
|
};
|
||||||
var transitionAlpha = ((performance.now() - this.viewportTransitionStart) / 1000) / config.viewport.transitionTime;
|
if (this.previousViewport) {
|
||||||
if (this.previousViewport && transitionAlpha < 1) {
|
var transitionAlpha = ((performance.now() - this.viewportTransitionStart) / 1000) / config.viewport.transitionTime;
|
||||||
var oldViewport = {
|
if (transitionAlpha < 1) {
|
||||||
x: this.previousViewport.x - this.previousViewport.padLeft,
|
var oldViewport = {
|
||||||
y: this.previousViewport.y - this.previousViewport.padBottom,
|
x: this.previousViewport.x - this.previousViewport.padLeft,
|
||||||
width: this.previousViewport.width + this.previousViewport.padLeft + this.previousViewport.padRight,
|
y: this.previousViewport.y - this.previousViewport.padBottom,
|
||||||
height: this.previousViewport.height + this.previousViewport.padBottom + this.previousViewport.padTop
|
width: this.previousViewport.width + this.previousViewport.padLeft + this.previousViewport.padRight,
|
||||||
};
|
height: this.previousViewport.height + this.previousViewport.padBottom + this.previousViewport.padTop
|
||||||
viewport = {
|
};
|
||||||
x: oldViewport.x + (viewport.x - oldViewport.x) * transitionAlpha,
|
viewport = {
|
||||||
y: oldViewport.y + (viewport.y - oldViewport.y) * transitionAlpha,
|
x: oldViewport.x + (viewport.x - oldViewport.x) * transitionAlpha,
|
||||||
width: oldViewport.width + (viewport.width - oldViewport.width) * transitionAlpha,
|
y: oldViewport.y + (viewport.y - oldViewport.y) * transitionAlpha,
|
||||||
height: oldViewport.height + (viewport.height - oldViewport.height) * transitionAlpha
|
width: oldViewport.width + (viewport.width - oldViewport.width) * transitionAlpha,
|
||||||
};
|
height: oldViewport.height + (viewport.height - oldViewport.height) * transitionAlpha
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var viewportSize = this.scale(viewport.width, viewport.height, this.canvas.width, this.canvas.height);
|
var viewportSize = this.scale(viewport.width, viewport.height, this.canvas.width, this.canvas.height);
|
||||||
var gl = this.context.gl;
|
var gl = this.context.gl;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -11884,15 +11884,18 @@ var spine;
|
|||||||
this.play();
|
this.play();
|
||||||
if (config.success)
|
if (config.success)
|
||||||
config.success(this);
|
config.success(this);
|
||||||
if (!this.animationState.getCurrent(0)) {
|
var entry = this.animationState.getCurrent(0);
|
||||||
|
if (!entry) {
|
||||||
if (this.config.animation)
|
if (this.config.animation)
|
||||||
this.setAnimation(this.config.animation);
|
this.setAnimation(this.config.animation);
|
||||||
else {
|
else {
|
||||||
var entry = this.animationState.setEmptyAnimation(0);
|
entry = this.animationState.setEmptyAnimation(0);
|
||||||
entry.trackEnd = 100000000;
|
entry.trackEnd = 100000000;
|
||||||
this.setViewport(entry.animation);
|
this.setViewport(entry.animation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!this.currentViewport)
|
||||||
|
this.setViewport(entry.animation);
|
||||||
};
|
};
|
||||||
SpinePlayer.prototype.setupInput = function () {
|
SpinePlayer.prototype.setupInput = function () {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
@ -12139,20 +12142,22 @@ var spine;
|
|||||||
width: this.currentViewport.width + this.currentViewport.padLeft + this.currentViewport.padRight,
|
width: this.currentViewport.width + this.currentViewport.padLeft + this.currentViewport.padRight,
|
||||||
height: this.currentViewport.height + this.currentViewport.padBottom + this.currentViewport.padTop
|
height: this.currentViewport.height + this.currentViewport.padBottom + this.currentViewport.padTop
|
||||||
};
|
};
|
||||||
var transitionAlpha = ((performance.now() - this.viewportTransitionStart) / 1000) / config.viewport.transitionTime;
|
if (this.previousViewport) {
|
||||||
if (this.previousViewport && transitionAlpha < 1) {
|
var transitionAlpha = ((performance.now() - this.viewportTransitionStart) / 1000) / config.viewport.transitionTime;
|
||||||
var oldViewport = {
|
if (transitionAlpha < 1) {
|
||||||
x: this.previousViewport.x - this.previousViewport.padLeft,
|
var oldViewport = {
|
||||||
y: this.previousViewport.y - this.previousViewport.padBottom,
|
x: this.previousViewport.x - this.previousViewport.padLeft,
|
||||||
width: this.previousViewport.width + this.previousViewport.padLeft + this.previousViewport.padRight,
|
y: this.previousViewport.y - this.previousViewport.padBottom,
|
||||||
height: this.previousViewport.height + this.previousViewport.padBottom + this.previousViewport.padTop
|
width: this.previousViewport.width + this.previousViewport.padLeft + this.previousViewport.padRight,
|
||||||
};
|
height: this.previousViewport.height + this.previousViewport.padBottom + this.previousViewport.padTop
|
||||||
viewport = {
|
};
|
||||||
x: oldViewport.x + (viewport.x - oldViewport.x) * transitionAlpha,
|
viewport = {
|
||||||
y: oldViewport.y + (viewport.y - oldViewport.y) * transitionAlpha,
|
x: oldViewport.x + (viewport.x - oldViewport.x) * transitionAlpha,
|
||||||
width: oldViewport.width + (viewport.width - oldViewport.width) * transitionAlpha,
|
y: oldViewport.y + (viewport.y - oldViewport.y) * transitionAlpha,
|
||||||
height: oldViewport.height + (viewport.height - oldViewport.height) * transitionAlpha
|
width: oldViewport.width + (viewport.width - oldViewport.width) * transitionAlpha,
|
||||||
};
|
height: oldViewport.height + (viewport.height - oldViewport.height) * transitionAlpha
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var viewportSize = this.scale(viewport.width, viewport.height, this.canvas.width, this.canvas.height);
|
var viewportSize = this.scale(viewport.width, viewport.height, this.canvas.width, this.canvas.height);
|
||||||
var gl = this.context.gl;
|
var gl = this.context.gl;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -459,7 +459,7 @@ module spine {
|
|||||||
if (this.config.animation)
|
if (this.config.animation)
|
||||||
this.setAnimation(this.config.animation);
|
this.setAnimation(this.config.animation);
|
||||||
else {
|
else {
|
||||||
var entry = this.animationState.setEmptyAnimation(0);
|
entry = this.animationState.setEmptyAnimation(0);
|
||||||
entry.trackEnd = 100000000;
|
entry.trackEnd = 100000000;
|
||||||
this.setViewport(entry.animation);
|
this.setViewport(entry.animation);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user