updating the state of a variable resets my Three.js Scene #3061
Unanswered
DiegoCruz17
asked this question in
Q&A
Replies: 0 comments
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.
-
Hey there!
I am new to React and Three.js but I have somehow managed to build a Pergola builder. My Three js scene is able to dynamically build pergolas according to the width, height and projection inputs. However, what is bugging me off is that whenever I update my dimension variables using the setState function provided, the Three.js scene flickers and resets. I should be able to move around and keep the position of my camera without seeing any visible flicker or reset. Also, I am experience "lag" once I start changing the dimensions multiple times. Said lag dissapears once I refresh the page.
Beta Was this translation helpful? Give feedback.
All reactions