From 5df1d177463fcaac0fc28e7c8d918ebb4a18d115 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Wed, 29 Apr 2015 10:08:57 +0200 Subject: [PATCH] Removed useless stuff --- static/js/FixedCamera.js | 36 ------------------------------------ static/js/PointerCamera.js | 27 +-------------------------- 2 files changed, 1 insertion(+), 62 deletions(-) diff --git a/static/js/FixedCamera.js b/static/js/FixedCamera.js index 52c9a37..dea32ce 100644 --- a/static/js/FixedCamera.js +++ b/static/js/FixedCamera.js @@ -22,11 +22,6 @@ var FixedCamera = function(arg1, arg2, arg3, arg4, position, target) { this.target = this.position.clone(); this.target.add(Tools.mul(direction,20)); - // this.up = new THREE.Vector3(0,0,1); - - // Compute corners - - // Create the mesh to draw var geometry = new THREE.Geometry(); @@ -58,37 +53,6 @@ var FixedCamera = function(arg1, arg2, arg3, arg4, position, target) { geometry.computeFaceNormals(); - (function(self, direction, left, other, position) { - var material = new THREE.LineBasicMaterial({ color: '0x000000', transparent: true}); - var geometry = new THREE.Geometry(); - // var direction = Tools.mul(direction, 1); - var target = Tools.sum(position, direction); - // geometry.vertices.push(position, target); - geometry.vertices.push( - Tools.sum(Tools.sum(position, left), other), - Tools.diff(Tools.sum(position, other),left), - Tools.diff(Tools.diff(position, left),other), - Tools.sum(Tools.diff(position, other), left), - Tools.sum(Tools.sum(position, left), other), - Tools.sum(Tools.diff(position, other), left), - - Tools.sum(position, direction), - Tools.sum(Tools.sum(position, left), other), - - Tools.sum(position, direction), - Tools.diff(Tools.sum(position, other),left), - - Tools.sum(position, direction), - Tools.diff(Tools.diff(position, left),other), - - Tools.sum(position, direction), - Tools.sum(Tools.diff(position, other), left) - ); - - self.border = new THREE.Line(geometry, material); - })(this, direction, left, other, position); - - var material = new THREE.MeshLambertMaterial({ color : 0xff0000, transparent : true, diff --git a/static/js/PointerCamera.js b/static/js/PointerCamera.js index e713cf5..b4d699a 100644 --- a/static/js/PointerCamera.js +++ b/static/js/PointerCamera.js @@ -23,7 +23,6 @@ var PointerCamera = function() { this.position = new THREE.Vector3(); this.forward = new THREE.Vector3(); this.left = new THREE.Vector3(); - // this.up = new THREE.Vector3(0,0,1); this.target = new THREE.Vector3(0,1,0); // Stuff for events @@ -62,7 +61,7 @@ PointerCamera.prototype.constructor = PointerCamera; // Update function PointerCamera.prototype.update = function() { if (this.moving) { - // Linear version + // Linear motion var position_direction = Tools.diff(this.new_position, this.position); var target_direction = Tools.diff(this.new_target, this.target); @@ -75,30 +74,6 @@ PointerCamera.prototype.update = function() { this.anglesFromVectors(); } - // Hermite polynom version - // var eval = this.hermite.eval(this.t); - // this.position.x = eval.x; - // this.position.y = eval.y; - // this.position.z = eval.z; - - // this.target = Tools.sum(this.position, this.hermite.prime(this.t)); - - // this.t += 0.005; - - // if (this.t > 1) { - // this.moving = false; - // // Update phi and theta so that return to reality does not hurt - // var forward = Tools.diff(this.target, this.position); - // forward.normalize(); - - // this.phi = Math.asin(forward.y); - - // // Don't know why this line works... But thanks Thierry-san and - // // Bastien because it seems to work... - // this.theta = Math.atan2(forward.x, forward.z); - - // } - } else { // Update angles if (this.increasePhi) this.phi += this.sensitivity;