fix(viewer): clamp GLB floor animation on slow frames - #820
Open
FenjuFu wants to merge 1 commit into
Open
Conversation
Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: 1a9cf6ac-9c83-4baa-b35c-9a397f573112 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #616 by clamping the remaining GLB floor-animation interpolation factor to 1. A slow frame or resumed background tab can otherwise move baked floors past their target and make their positions diverge. This matches the already-clamped parametric LevelSystem; walkthrough mode still snaps to the baked elevation.
How to test
Focused validation executed the actual priority-5
useFramecallback extracted from the source with the TypeScript AST, using structural level objects. All 14 stacked/exploded cases passed for frame deltas of 0, 1/60, 1/12, 0.1, 0.2, 0.5, and 30 seconds; ordinary-frame behavior and walkthrough snapping were preserved. At 0.5-second frames, the original callback diverged to approximately -4.5e28 while the fix settled at the expected 7.7 m elevation. This is deterministic frame-callback validation, not a full browser render.Pinned Biome 2.4.16 and
git diff --checkpassed. Complete fork CI also passed: lint/format, agent-skill validation, type checking, the full test suite, application/package builds, and the macOS packed CLI/runtime smoke test. The validation branch contains the same fix plus isolated CI-trigger configuration; those workflow changes are not part of this PR.Screenshots / screen recording
No UI layout change; the regression concerns slow-frame level transforms.
Checklist
bun devmainbranch