birkir / react-three-gui

GUI tools for react-three-fiber and react-spring
527 stars 29 forks source link

react-spring related issue workaround? #38

Open fnick851 opened 3 years ago

fnick851 commented 3 years ago

It seems like react-spring has an issue in production that affects the dragging capability of this library: https://github.com/pmndrs/react-spring/issues/1078

I wonder we should wait for react-spring to fix this, or if there is a workaround? Thanks.

danvk commented 3 years ago

I was able to work around this by pinning to some old versions of react-spring using Yarn's resolutions in my package.json:

  "resolutions": {
    "@react-spring/three": "9.0.0-rc.3",
    "@react-spring/web": "9.0.0-rc.3",
    "@react-spring/core": "9.0.0-rc.3",
    "@react-spring/shared": "9.0.0-rc.3",
    "@react-spring/animated": "9.0.0-rc.3"
  }

Then

yarn add react-three-fiber@5 @react-three/drei@3 react-three-gui

But probably just switch to ~https://github.com/pmndrs/use-tweaks~ https://github.com/pmndrs/leva instead

fnick851 commented 3 years ago

@danvk Yes, I switched to leva. Thanks.