mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
[ts][player] Closes #1279, expose setAnimation().
This commit is contained in:
parent
c0277ff12b
commit
c9e760a025
2
spine-ts/build/spine-all.d.ts
vendored
2
spine-ts/build/spine-all.d.ts
vendored
@ -1876,7 +1876,7 @@ declare module spine {
|
||||
setupInput(): void;
|
||||
private play();
|
||||
private pause();
|
||||
private setAnimation(animation);
|
||||
setAnimation(animation: string): void;
|
||||
private percentageToWorldUnit(size, percentageOrAbsolute);
|
||||
private calculateAnimationViewport(animationName);
|
||||
}
|
||||
|
||||
@ -10987,7 +10987,7 @@ var spine;
|
||||
this.viewportTransitionStart = performance.now();
|
||||
this.animationState.clearTracks();
|
||||
this.skeleton.setToSetupPose();
|
||||
this.animationState.setAnimation(0, this.config.animation, true);
|
||||
this.animationState.setAnimation(0, animation, true);
|
||||
};
|
||||
SpinePlayer.prototype.percentageToWorldUnit = function (size, percentageOrAbsolute) {
|
||||
if (typeof percentageOrAbsolute === "string") {
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
spine-ts/build/spine-player.d.ts
vendored
2
spine-ts/build/spine-player.d.ts
vendored
@ -1786,7 +1786,7 @@ declare module spine {
|
||||
setupInput(): void;
|
||||
private play();
|
||||
private pause();
|
||||
private setAnimation(animation);
|
||||
setAnimation(animation: string): void;
|
||||
private percentageToWorldUnit(size, percentageOrAbsolute);
|
||||
private calculateAnimationViewport(animationName);
|
||||
}
|
||||
|
||||
@ -10324,7 +10324,7 @@ var spine;
|
||||
this.viewportTransitionStart = performance.now();
|
||||
this.animationState.clearTracks();
|
||||
this.skeleton.setToSetupPose();
|
||||
this.animationState.setAnimation(0, this.config.animation, true);
|
||||
this.animationState.setAnimation(0, animation, true);
|
||||
};
|
||||
SpinePlayer.prototype.percentageToWorldUnit = function (size, percentageOrAbsolute) {
|
||||
if (typeof percentageOrAbsolute === "string") {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1099,7 +1099,7 @@
|
||||
this.playButton.classList.add("spine-player-button-icon-play");
|
||||
}
|
||||
|
||||
private setAnimation (animation: string) {
|
||||
public setAnimation (animation: string) {
|
||||
// Determine viewport
|
||||
this.previousViewport = this.currentViewport;
|
||||
let animViewport = this.calculateAnimationViewport(animation);
|
||||
@ -1156,7 +1156,7 @@
|
||||
|
||||
this.animationState.clearTracks();
|
||||
this.skeleton.setToSetupPose();
|
||||
this.animationState.setAnimation(0, this.config.animation, true);
|
||||
this.animationState.setAnimation(0, animation, true);
|
||||
}
|
||||
|
||||
private percentageToWorldUnit(size: number, percentageOrAbsolute: string | number): number {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user