Skip to content
Snippets Groups Projects
Commit c70bf6af authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

initial camera position

parent f7159042
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,9 @@ function ThreeModel(){
function initialize(){
camera.position.z = 500;
camera.position.x = 125;
camera.position.y = 100;
camera.position.z = 165;
scene.fog = new THREE.FogExp2(0xcccccc, 0.002);
// lights
......
......@@ -39,11 +39,11 @@ FillGeometryView = PushPullMeshView.extend({
updateBounds: function(){
var bounds = this.model.get("bounds");//this has not been scaled or rotated, as is when model was first imported
var max = bounds.max.toArray();
var min = bounds.min.toArray()
var min = bounds.min.toArray();
var size = numeric.sub(max, min);
var translation = numeric.mul(numeric.add(max, min), 0.5);
var geometry = new THREE.BoxGeometry(size[0], size[1], size[2]);
geometry.applyMatrix( new THREE.Matrix4().makeTranslation(translation[0], translation[1], translation[2]));
geometry.applyMatrix(new THREE.Matrix4().makeTranslation(translation[0], translation[1], translation[2]));
this.boundsBox.geometry = geometry;
this.boxHelper.update(this.boundsBox);
this.render();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment