Replies: 1 comment
-
hey @Achi00 you can use useScroll from drei to get a offset. With the offset you can write a function that creates new colors, and put that on your canvas background or css background for the body. Here is a sandbox from drei where they use an useFrame and take the useScroll offset from it. hopefully this helps |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am tring to change bg color with scrollcontrols I tried it with window.addEventListener('scroll' and then state) but it didn't work maybe bcz im am scrolling canvas only with scrollcontrols, is there any other way to make it changeable with drei or react three/fiber?
thanks
Beta Was this translation helpful? Give feedback.
All reactions