three-dat.gui
A package which create THREE.js controls on Dat.GUI
Install
First install the npm package
npm install three-dat.gui
Or with yarn
yarn add three-dat.gui
How to use
Let's create a simple THREE.js example which display a gui controller for our THREE.MeshStandardMaterial
;; // Import initialization method; // Init three-dat.gui with Dat /* ... init scene, renderer & camera*/ var gui = ;var geometry = 1 1 1;var material = ;var mesh = geometry material;scene; gui;
You can add quickly many kind of THREE.js objects.
THREE.Material
withgui.addMaterial("name", material)
THREE.Light
withgui.addLight("name", light)
THREE.Vector
withgui.addVector("name", vector)
THREE.Scene
withgui.addScene("name", scene)
THREE.Object3D
withgui.addObject3D("name", object)
THREE.Mesh
withgui.addMesh("name", mesh)
THREE.Fog
withgui.addFog("name", fog)
THREE.FogExp2
withgui.addFogExp2("name", fog)
Todo
- Add helpers on
THREE.Object3D
- Refactoring
- Climate