Fix the playback speed issue caused by multiple timeScale multiplications in Spine. (#16745)

* Fix the playback speed issue caused by multiple timeScale multiplications in Spine.
This commit is contained in:
bofeng-song
2024-02-22 13:41:15 +08:00
committed by GitHub
parent 0e6212280b
commit a7efee6ce7
+2 -1
View File
@@ -1038,8 +1038,9 @@ export class Skeleton extends UIRenderer {
this.markForUpdateRenderData();
if (EDITOR_NOT_IN_PREVIEW) return;
if (this.paused) return;
dt *= this._timeScale * timeScale;
if (this.isAnimationCached()) {
// On realTime mode, dt is multiplied at native side.
dt *= this._timeScale * timeScale;
if (this._isAniComplete) {
if (this._animationQueue.length === 0 && !this._headAniInfo) {
const frameCache = this._animCache;