mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-10 10:25:36 +01:00
bind camera with data gui
This commit is contained in:
parent
706505a006
commit
e57c0a2eb9
2 changed files with 7 additions and 3 deletions
|
|
@ -5,9 +5,6 @@ TCAD.UI = function(app) {
|
|||
this.dat = new dat.GUI();
|
||||
var gui = this.dat;
|
||||
|
||||
gui.TEXT_CLOSED = 'XXX Controls';
|
||||
gui.TEXT_OPEN = 'Open FFF';
|
||||
|
||||
var actionsF = gui.addFolder('Add Object');
|
||||
var actions = new TCAD.UI.Actions(this);
|
||||
actionsF.add(actions.tools, 'extrude');
|
||||
|
|
@ -17,6 +14,12 @@ TCAD.UI = function(app) {
|
|||
actionsF.add(actions.tools, 'refreshSketches');
|
||||
actionsF.open();
|
||||
|
||||
var camera = gui.addFolder('Camera');
|
||||
camera.add(app.viewer.camera.position, 'x').listen();
|
||||
camera.add(app.viewer.camera.position, 'y').listen();
|
||||
camera.add(app.viewer.camera.position, 'z').listen();
|
||||
camera.open();
|
||||
|
||||
// var propsF = gui.addFolder('Properties');
|
||||
// propsF.add(object3DProto.position, 'x');
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ TCAD.Viewer = function() {
|
|||
this.scene = new THREE.Scene();
|
||||
var scene = this.scene;
|
||||
var camera = new THREE.PerspectiveCamera( 500*75, aspect(), 0.1, 10000 );
|
||||
this.camera = camera;
|
||||
camera.position.z = 1000;
|
||||
|
||||
var light = new THREE.PointLight( 0xffffff);
|
||||
|
|
|
|||
Loading…
Reference in a new issue