change Fog color at runtime #1244
Unanswered
carmandale
asked this question in
Q&A
Replies: 1 comment 6 replies
-
havent tried but this should work <Canvas>
<fog attach="fog" color="hotpink" near={1} far={10} />
...
const scene = useThree(state => state.scene)
// ..
scene.fog.color.set('peachpuff') |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Does anyone know if it is possible to change the fog color dynamically? with a click? it isn't working for me, but I wanted to check. I have the color in a state, and would like it to change on mouse clicks. It is working for the ground and light colors. But not the fog.
thanks,
Dale
Beta Was this translation helpful? Give feedback.
All reactions