dataarts / dat.gui

Lightweight controller library for JavaScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dat.gui is present after leaving the page

onixapple opened this issue · comments

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?

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 });