diff --git a/web/app/3d/ctrl.js b/web/app/3d/ctrl.js index b27a9692..d1636710 100644 --- a/web/app/3d/ctrl.js +++ b/web/app/3d/ctrl.js @@ -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'); }; diff --git a/web/app/3d/viewer.js b/web/app/3d/viewer.js index a4b394db..6a4e9def 100644 --- a/web/app/3d/viewer.js +++ b/web/app/3d/viewer.js @@ -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);