From 7eab3c03e47000c41fb48dc48011e6d399a33492 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Thu, 30 Apr 2015 15:04:33 +0200 Subject: [PATCH] Save the intial state --- prototype/arrows/index.md | 4 ++-- static/js/PointerCamera.js | 1 - static/js/prototype/arrows/main.js | 5 +++-- static/js/prototype/viewport/main.js | 5 +++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/prototype/arrows/index.md b/prototype/arrows/index.md index 81485b8..bfbdb37 100644 --- a/prototype/arrows/index.md +++ b/prototype/arrows/index.md @@ -27,11 +27,11 @@ button. - - diff --git a/static/js/PointerCamera.js b/static/js/PointerCamera.js index c3f10fa..f176b5e 100644 --- a/static/js/PointerCamera.js +++ b/static/js/PointerCamera.js @@ -134,7 +134,6 @@ PointerCamera.prototype.reset = function() { this.position.copy(new THREE.Vector3(-8.849933489419644, 9.050627639459208, 0.6192960680432451)); this.target.copy(new THREE.Vector3(17.945323228767702, -15.156828589982375, -16.585740412769756)); this.anglesFromVectors(); - this.save(); } PointerCamera.prototype.vectorsFromAngles = function() { diff --git a/static/js/prototype/arrows/main.js b/static/js/prototype/arrows/main.js index c7192aa..1fffe41 100644 --- a/static/js/prototype/arrows/main.js +++ b/static/js/prototype/arrows/main.js @@ -41,13 +41,13 @@ var redoElement = document.getElementById('redo'); function updateElements() { // Update icon if (!cameras.mainCamera().undoable()) { - undoElement.className = "btn btn-danger"; + undoElement.className = "btn btn-default"; } else { undoElement.className = "btn btn-primary"; } if (!cameras.mainCamera().redoable()) { - redoElement.className = "btn btn-danger"; + redoElement.className = "btn btn-default"; } else { redoElement.className = "btn btn-primary"; } @@ -139,6 +139,7 @@ function init() { var camera1 = new PointerCamera(50, container_size.width() / container_size.height(), 0.01, 100000, container); camera1.speed = 0.001; camera1.reset(); + camera1.save(); scene.add(camera1); cameras.push(camera1); diff --git a/static/js/prototype/viewport/main.js b/static/js/prototype/viewport/main.js index f6ba744..7bafc21 100644 --- a/static/js/prototype/viewport/main.js +++ b/static/js/prototype/viewport/main.js @@ -41,13 +41,13 @@ var redoElement = document.getElementById('redo'); function updateElements() { // Update icon if (!cameras.mainCamera().undoable()) { - undoElement.className = "btn btn-danger"; + undoElement.className = "btn btn-default"; } else { undoElement.className = "btn btn-primary"; } if (!cameras.mainCamera().redoable()) { - redoElement.className = "btn btn-danger"; + redoElement.className = "btn btn-default"; } else { redoElement.className = "btn btn-primary"; } @@ -139,6 +139,7 @@ function init() { var camera1 = new PointerCamera(50, container_size.width() / container_size.height(), 0.01, 100000, container); camera1.speed = 0.001; camera1.reset(); + camera1.save(); scene.add(camera1); cameras.push(camera1);