dataarts / dat.gui

Lightweight controller library for JavaScript.
Apache License 2.0
7.46k stars 1.08k forks source link

dat.gui is present after leaving the page #311

Open onixapple opened 2 years ago

onixapple commented 2 years ago

Hello , due to lack of time i implemented three js in react the primitive way, set route for it and works fine untill i switch to another link.

const Modeling = () => { const mountRef = useRef(null); useEffect(() => { three.js codee )} return (

After going back to the another page, dat.gui is present there Any idea why?

andrevenancio commented 2 years ago

the code above doesn't really help because you are not referencing any dat.gui code. But dat.gui add's to the document.body automatically unless you tell it not to via new dat.GUI({ autoPlace: false });