Skip to content

feat: Camera distance is now scaled to >= 90% of the screen real estate#383

Closed
ShrimpCryptid wants to merge 4 commits intomainfrom
fix/camera-too-zoomed-out
Closed

feat: Camera distance is now scaled to >= 90% of the screen real estate#383
ShrimpCryptid wants to merge 4 commits intomainfrom
fix/camera-too-zoomed-out

Conversation

@ShrimpCryptid
Copy link
Copy Markdown
Contributor

@ShrimpCryptid ShrimpCryptid commented May 13, 2024

Time Estimate or Size

Estimated size: small, 5-10 minutes

Problem

Closes #330, a bug where the camera would be zoomed too far out on reset.

Solution

  • If camera settings are undefined, the camera's max orbit radius will be determined using its FOV and the size of the object's bounding sphere, keeping the bounding sphere at 90% of the vertical screen real estate.
  • Changes cameraDefault to be an optional property in TrajectoryFileInfo, so

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Steps to Verify:

  1. Clone the branch and build.
  2. Change your local clone of the simularium-website repo to use your local, built version of volume-viewer.
  3. Open the following file: https://www.dropbox.com/scl/fi/2srfuliyjnu3sr1tlfgwf/cells_2023-10-04.simularium?rlkey=hg35vs9cwrla19eq2m0al81t4
  4. Switch between orthographic and perspective mode and reset the camera to home.
  5. Go to the main page and open other simulations. They should look the same or be slightly closer to the camera than before.

Screenshots (optional):

Before After
image image
image image

Unchanged:

Before After
image image

@ShrimpCryptid ShrimpCryptid added the bug Something isn't working label May 13, 2024
@ShrimpCryptid ShrimpCryptid requested a review from toloudis May 13, 2024 22:35
@ShrimpCryptid ShrimpCryptid self-assigned this May 13, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented May 13, 2024

jest coverage report 🧪

Total coverage

Status Category Percentage Covered / Total
🔴 Statements 40.25% 2048/5087
🔴 Branches 42.93% 845/1968
🔴 Functions 36.79% 418/1136
🔴 Lines 40.47% 1961/4845

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Show files with reduced coverage 🔻

Reduced coverage

Status Filename Statements Branches Functions Lines
🔴 index.ts 7.6% 7.2% 5.73% 7.56%
🔴 src/visGeometry 21.63% 22.71% 27.71% 21.51%

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initial camera view zoomed far out

1 participant