summaryrefslogtreecommitdiff
path: root/js/3D_Landscape.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/3D_Landscape.js')
-rw-r--r--js/3D_Landscape.js49
1 files changed, 29 insertions, 20 deletions
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;
- });
-
}