From e69ed57de1f8e07bfb6c6c1a879e85a5753f3f93 Mon Sep 17 00:00:00 2001 From: Aly Yvette <153143837+aly-yvette@users.noreply.github.com> Date: Thu, 28 Nov 2024 06:26:39 +0000 Subject: [PATCH] fix (docs): warn about three/web interactions Refs: https://github.com/pmndrs/react-spring/issues/1586 --- docs/app/routes/docs.guides.react-three-fiber.mdx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/app/routes/docs.guides.react-three-fiber.mdx b/docs/app/routes/docs.guides.react-three-fiber.mdx index ffee227e0..34dfa12d3 100644 --- a/docs/app/routes/docs.guides.react-three-fiber.mdx +++ b/docs/app/routes/docs.guides.react-three-fiber.mdx @@ -33,6 +33,18 @@ and `react-three-fiber` you'll need to install the `@react-spring/three` package yarn add @react-spring/three @react-three/fiber three ``` +:::warning +By default, importing `@react-spring/three` hands frameloop control over to r3f - this is a global setting and means that any other reconcilers +(such as `@react-spring/web`) will no longer advance on their own, and will appear to be paused. A workaround is to adjust the global setting after +import using - +```typescript +import { Globals } from '@react-spring/web' +Globals.assign({ + frameLoop: 'always', +}) +``` +::: + ## Why use the library? A common question asked is why use `react-spring` with `react-three-fiber` when you can use the `useFrame` hook to update your meshes & objects