Merge branch '3.7' into 3.8-beta

This commit is contained in:
badlogic 2019-02-14 11:44:27 +01:00
commit 0908d552a1
8 changed files with 16 additions and 11 deletions

View File

@ -1232,7 +1232,8 @@ public class AnimationState {
start, interrupt, end, dispose, complete, event
}
/** The interface to implement for receiving TrackEntry events.
/** The interface to implement for receiving TrackEntry events. It is always safe to call AnimationState methods when receiving
* events.
* <p>
* See TrackEntry {@link TrackEntry#setListener(AnimationStateListener)} and AnimationState
* {@link AnimationState#addListener(AnimationStateListener)}. */
@ -1251,10 +1252,14 @@ public class AnimationState {
* References to the entry should not be kept after <code>dispose</code> is called, as it may be destroyed or reused. */
public void dispose (TrackEntry entry);
/** Invoked every time this entry's animation completes a loop. */
/** Invoked every time this entry's animation completes a loop. Because this event is trigged in
* {@link AnimationState#apply(Skeleton)}, any animations set in response to the event won't be applied until the next time
* the AnimationState is applied. */
public void complete (TrackEntry entry);
/** Invoked when this entry's animation triggers an event. */
/** Invoked when this entry's animation triggers an event. Because this event is trigged in
* {@link AnimationState#apply(Skeleton)}, any animations set in response to the event won't be applied until the next time
* the AnimationState is applied. */
public void event (TrackEntry entry, Event event);
}

View File

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

View File

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

View File

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

View File

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

View File

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