fix: increase Field of View slider precision in view panel#902
Open
mvanhorn wants to merge 1 commit into
Open
Conversation
The FoV slider in the view panel rounded to one decimal place. Camera-pose keyframes store the slider's value verbatim, so animated FoV in a Bezier curve looked choppy at ~0.1 degree resolution. Raising the SliderInput precision from 1 to 2 gives the user ~0.01 degree control without touching the event bus or keyframe storage (FoV is already a plain number with no intermediate rounding). The static-export FoV sliders in publish-settings-dialog.ts and export-popup.ts intentionally remain at integer resolution since they do not record keyframes. Refs playcanvas#862
Contributor
There was a problem hiding this comment.
Pull request overview
Increases FoV slider precision from 1 to 2 decimals in the view panel so animated FoV keyframes capture finer values, addressing choppy Bezier-animated FoV reported in #862.
Changes:
- Bump
precisionfrom 1 to 2 on the FoVSliderInputin the view panel.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Increases the FoV
SliderInputprecision in the view panel from 1 to 2 decimals so animated FoV reads back at ~0.01-degree resolution instead of ~0.1-degree.Why this matters
In #862 the reporter showed that animated FoV in a Bezier curve looked choppy because the FoV slider rounds the recorded value to one decimal. FoV flows from the view-panel slider through the
camera.setFovevent and is stored verbatim in camera-pose keyframes (src/camera-poses.ts), so widening the slider's rounding is sufficient to fix the keyframe resolution without changing the animation pipeline.Testing
src/ui/view-panel.tsline 153:precision: 1->precision: 2. Slider min/max (10/120) unchanged.npm run lintclean.tsc --noEmitclean.publish-settings-dialog.tsandexport-popup.tsare intentionally left atprecision: 0- those configure static exports, not live edits captured in keyframes.Fixes #862