From ae05687b214c93dcb86abb6b8590fe188be7a2c2 Mon Sep 17 00:00:00 2001 From: "wayo.cavazos" Date: Sun, 8 Oct 2006 12:04:38 +0000 Subject: [PATCH] Keys 1,2,3,4 move the camera to preset views --- contrib/lindenmayer/camera-slate.factor | 34 ++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/contrib/lindenmayer/camera-slate.factor b/contrib/lindenmayer/camera-slate.factor index 5bbf9be448..38d79b6f50 100644 --- a/contrib/lindenmayer/camera-slate.factor +++ b/contrib/lindenmayer/camera-slate.factor @@ -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 -- 2.34.1