From 26abd0b6097e9af3f774824ccf36028841c47ce0 Mon Sep 17 00:00:00 2001 From: Pepper Date: Sat, 14 Feb 2015 22:03:01 -0500 Subject: changes --- js/3D_Landscape.js | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) (limited to 'js/3D_Landscape.js') diff --git a/js/3D_Landscape.js b/js/3D_Landscape.js index 777323f..e0fd5e6 100644 --- a/js/3D_Landscape.js +++ b/js/3D_Landscape.js @@ -200,27 +200,36 @@ function init_controls(){ }, "this" : my_scope }, + { + "keys" : "delete", + "is_exclusive" : true, + "on_keydown" : function() { + mesh.position.x = pos_x; + mesh.position.y = pos_y; + mesh.position.z = pos_z; + mesh.rotation.x = rot_x; + mesh.rotation.y = rot_y; + mesh.rotation.z = rot_z; + }, + "this" : my_scope + }, + { + "keys" : "pageup", + "is_exclusive" : true, + "on_keydown" : function() { + mesh.position.z += 150; + }, + "this" : my_scope + }, + { + "keys" : "pagedown", + "is_exclusive" : true, + "on_keydown" : function() { + mesh.position.z -= 150; + }, + "this" : my_scope + }, ]); - //Reset - listener.simple_combo("delete",function() { - mesh.position.x = pos_x; - mesh.position.y = pos_y; - mesh.position.z = pos_z; - mesh.rotation.x = rot_x; - mesh.rotation.y = rot_y; - mesh.rotation.z = rot_z; - - }); - //Zoom In - listener.simple_combo("pageup",function() { - mesh.position.z += 150; - }); - - //Zoom Out - listener.simple_combo("pagedown",function() { - mesh.position.z -= 150; - }); - } -- cgit v1.2.3-70-g09d2