You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@react-three/drei v9.119.0 appears to break functionality of <Bounds /> / useBounds(). Rolling back to v9.80.2 fixes the issue.
I have a component, <Rig/>, that is responsible for changing the view based on the current route and search params. It functions similarly to <SelectToZoom /> in this example referenced by the Bounds docs, except that the to() method is used to fine-tune the view.
With v9.80.2, the view transitions smoothly from whatever the current view to the new view, whenever the view should be changed.
With v9.119.0, the view instantly resets to the initial view of the scene before transitioning to the new view, whenever the view should be changed. The 'snap' back to the initial view is jarring, and I wasn't able to isolate any obvious reason for the change (for example, checking for state and dependency changes that may trigger the reset).
It's entirely reasonable to suspect the culprit is my garbage code. However, rolling back to v9.80.2 fixes the issue. Review changes made between versions that could have introduced changes to expected behaviour.
Please let me know if a demo is necessary to debug the problem and I will aim to put together a simplified version of the production code.
The text was updated successfully, but these errors were encountered:
An outsider, but I am trying to gain a good understanding of Bounds. It would indeed help if you can put together a minimal demo. (And personally, I find that half the time when I do this I find the problem in my code.)
Things of note when looking at the Bounds() source code https://github.com/pmndrs/drei/blob/master/src/core/Bounds.tsx
the damping={3}. The source has a fairly large section about animation?
And latest version has deprecated to(), @deprecated Use moveTo and lookAt instead
three
version: 0.171.0@react-three/fiber
version: 8.17.10@react-three/drei
version: 9.119.0node
version: 20.18.1npm
(oryarn
) version: npm 10.8.2 / yarn 1.22.22Problem description:
@react-three/drei v9.119.0 appears to break functionality of
<Bounds />
/useBounds()
. Rolling back to v9.80.2 fixes the issue.I have a component,
<Rig/>
, that is responsible for changing the view based on the current route and search params. It functions similarly to<SelectToZoom />
in this example referenced by the Bounds docs, except that theto()
method is used to fine-tune the view.With v9.80.2, the view transitions smoothly from whatever the current view to the new view, whenever the view should be changed.
With v9.119.0, the view instantly resets to the initial view of the scene before transitioning to the new view, whenever the view should be changed. The 'snap' back to the initial view is jarring, and I wasn't able to isolate any obvious reason for the change (for example, checking for state and dependency changes that may trigger the reset).
Relevant code:
Suggested solution:
It's entirely reasonable to suspect the culprit is my garbage code. However, rolling back to v9.80.2 fixes the issue. Review changes made between versions that could have introduced changes to expected behaviour.
Please let me know if a demo is necessary to debug the problem and I will aim to put together a simplified version of the production code.
The text was updated successfully, but these errors were encountered: