Browse Source

[ts][player] Closes #1279, expose setAnimation().

badlogic 6 years ago
parent
commit
c9e760a025

+ 1 - 1
spine-ts/build/spine-all.d.ts

@@ -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);
 	}

+ 1 - 1
spine-ts/build/spine-all.js

@@ -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 it is too large
+ 0 - 0
spine-ts/build/spine-all.js.map


+ 1 - 1
spine-ts/build/spine-player.d.ts

@@ -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);
 	}

+ 1 - 1
spine-ts/build/spine-player.js

@@ -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 it is too large
+ 0 - 0
spine-ts/build/spine-player.js.map


+ 2 - 2
spine-ts/player/src/Player.ts

@@ -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 {

Some files were not shown because too many files changed in this diff