From a49de250ed100ec1a2ad467c953b37f59da9d9d7 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 6 Dec 2023 03:09:03 +0100 Subject: [PATCH] [ts][player] Fixed scrubbing + physics --- spine-ts/spine-player/example/physics.html | 39 ++++++++++++++++++++++ spine-ts/spine-player/src/Player.ts | 1 + 2 files changed, 40 insertions(+) create mode 100644 spine-ts/spine-player/example/physics.html diff --git a/spine-ts/spine-player/example/physics.html b/spine-ts/spine-player/example/physics.html new file mode 100644 index 000000000..fbe16c5cd --- /dev/null +++ b/spine-ts/spine-player/example/physics.html @@ -0,0 +1,39 @@ + + + + + + + + + +
+
+ + \ No newline at end of file diff --git a/spine-ts/spine-player/src/Player.ts b/spine-ts/spine-player/src/Player.ts index 166c048c5..8de7eecb8 100644 --- a/spine-ts/spine-player/src/Player.ts +++ b/spine-ts/spine-player/src/Player.ts @@ -373,6 +373,7 @@ export class SpinePlayer implements Disposable { let time = animationDuration * percentage; this.animationState!.update(time - this.playTime); this.animationState!.apply(this.skeleton!); + this.skeleton!.update(time - this.playTime); this.skeleton!.updateWorldTransform(Physics.update); this.playTime = time; };