Threejs TypeScript : Dat.gui
Documentation : https://sbcode.net/threejs/dat-gui/
YT Members : https://www.youtube.com/channel/UCmUILI2AWt2MSUgPlZwFdOg/join
Three.js and TypeScript (Book) : https://www.amazon.com/dp/B09GYTKRCH
Course Coupons : https://sbcode.net/coupons#threejs
The Dat GUI is another very useful tool that we can use to learn about Three.js as it allows us to quickly add a very basic user interface which allows us to interact with our 3d scene and the objects within it.
The Three.js install includes a copy of dat.gui.module.js so we will use that. And we can also add a copy of the type definitions file.
npm install @types/dat.gui
We also need to inform the VSCode IDE and the TypeScript compiler which type definition file to use for the imported dat.gui.module file.
You have several options here to correct the missing type definition reference.
One option is to manually copy the file index.d.ts from the node_modules/@types/dat.gui folder into the node_modules/three/examples/jsm/libs folder and rename it to dat.gui.module.d.ts.
or
add a path to the ./src/client/tsconfig.json that indicates to the VSCode IDE and TypeScript compiler which type definition to use when it sees the import to /jsm/libs/dat.gui.module
#dat.gui
#threejsdatgui
#datgui
#threejs