Closed sashankaryal closed 2 months ago
The updates in the looker-3d
package aim to improve user interaction with 3D models, focusing on enhancing camera control shortcuts, adding new functionalities for camera configuration, and enhancing event handling. These changes aim to enhance user navigation and interaction within the 3D environment.
File Path | Change Summary |
---|---|
.../action-bar/ViewHelp.tsx |
Updated camera control shortcuts and descriptions for translation and zoom actions. |
.../fo3d/MediaTypeFo3d.tsx |
Added camera controls import, configuration function, and key event handlers. |
.../action-bar/index.tsx |
Conditionally rendered <ViewFo3d jsonPanel={jsonPanel} /> based on the isFo3d flag. |
.../hooks/use-hot-key.ts |
Modified the callback function in the useHotkey hook for proper context handling. |
.../action-bar/ViewFo3d.tsx |
Added imports, state for isJsonPanelOpen , hotkey listener, and outside click handler. |
🌟 A Whimsical Code Celebration by CodeRabbit 🌟
In the land of 3D, where models spin and sway,
A rabbit hopped in, with code patches to display.
"Shift + drag," it cheered, with a twinkle in its eye,
Now navigate with ease, as your models fly high!
With keys and controls, so finely tuned,
Dance through digital worlds, by the silvery moon. 🌙
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 0%
with 47 lines
in your changes are missing coverage. Please review.
Project coverage is 16.02%. Comparing base (
8d2b0f1
) to head (2753171
). Report is 116 commits behind head on develop.:exclamation: Current head 2753171 differs from pull request most recent head 23d91af. Consider uploading reports for the commit 23d91af to get more accurate results
Files | Patch % | Lines |
---|---|---|
app/packages/looker-3d/src/fo3d/MediaTypeFo3d.tsx | 0.00% | 37 Missing :warning: |
app/packages/looker-3d/src/action-bar/ViewHelp.tsx | 0.00% | 10 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@brimoor good idea. How do you like this? Also added a hotkey I
for viewing FO3D.
What changes are proposed in this pull request?
New camera controls doesn't have translate on shift + left click by default. Instead, it uses right mouse drag, or two-finger move / three-finger move on trackpads. This isn't consistent with our prior CX, which used shift + click for trucking. This PR fixes that.
Also adds dolly on control + left mouse drag.
How is this patch tested? If it is not, please explain why.
Manually.
Summary by CodeRabbit
New Features
CameraControlsImpl
and a new functionupdateCameraControlsConfig
in the 3D viewer.fos.useEventHandler
.Refactor
shortcut
value andtitle
for translation and zoom actions in the 3D viewer help.