]> gitweb.factorcode.org Git - factor.git/commitdiff
Keys 1,2,3,4 move the camera to preset views
authorwayo.cavazos <wayo.cavazos@gmail.com>
Sun, 8 Oct 2006 12:04:38 +0000 (12:04 +0000)
committerwayo.cavazos <wayo.cavazos@gmail.com>
Sun, 8 Oct 2006 12:04:38 +0000 (12:04 +0000)
contrib/lindenmayer/camera-slate.factor

index 5bbf9be44840b1ea024ee2a31129391dae4f1ad1..38d79b6f50eae9a8ba8ce8af3e0f9f0b88ae19d5 100644 (file)
@@ -1,5 +1,5 @@
 
-USING: kernel namespaces generic gadgets vars slate turtle turtle-camera ;
+USING: kernel namespaces generic math gadgets vars slate turtle turtle-camera ;
 
 IN: camera-slate
 
@@ -39,4 +39,36 @@ camera-slate H{
     [ slate-ns [ [ 1 strafe-up ] camera> with-turtle .slate ] bind ] }
   { T{ key-down f { A+ } "DOWN" }
     [ slate-ns [ [ 1 strafe-down ] camera> with-turtle .slate ] bind ] }
+
+  { T{ key-down f f "1" }
+    [ slate-ns
+      [
+        [ position> norm reset-turtle 90 turn-left step-turtle 180 turn-left ]
+        camera> with-turtle .slate
+      ] bind
+    ] }
+  { T{ key-down f f "2" }
+    [ slate-ns
+      [
+        [ position> norm reset-turtle 90 pitch-up step-turtle 180 pitch-down ]
+        camera> with-turtle .slate
+      ] bind
+    ] }
+  { T{ key-down f f "3" }
+    [ slate-ns
+      [
+        [ position> norm reset-turtle step-turtle 180 turn-left ]
+        camera> with-turtle .slate
+      ] bind
+    ] }
+
+{ T{ key-down f f "4" }
+    [ slate-ns
+      [
+        [ position> norm
+          reset-turtle 45 turn-left 45 pitch-up step-turtle 180 turn-left ]
+        camera> with-turtle .slate
+      ] bind
+    ] }
+
 } set-gestures
\ No newline at end of file