Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | import {Datguif} from '../datguif/datguif';
/**
* A class that setups guif with a three.js scene.
*/
export class ThreeInspector {
constructor(element: HTMLElement) {
console.log('setting up new GUI');
// Setup GUIF.
const gui = new Datguif({
load: JSON,
autoPlace: false,
});
element.appendChild(gui.getGui().domElement);
gui.addFolder('Renderer', 'Settings');
// gui.addFolder('Camera', 'Settings');
// gui.addObjectToFolder(
// 'Camera',
// camera,
// [
// { keyName: 'fov', min: 0, max: 50, step: 0.01, callback: ()=> {
// camera.updateProjectionMatrix();
// } },
// { keyName: 'zoom', min: 0, max: 10, step: 0.0001, callback: ()=> {
// camera.updateProjectionMatrix();
// } },
// ]
// );
gui.addFolder('Objects');
}
}
|