]> git.jsancho.org Git - gacela.git/commitdiff
Fran example using scenes
authorJavier Sancho <jsf@jsancho.org>
Fri, 9 Sep 2016 17:27:39 +0000 (19:27 +0200)
committerJavier Sancho <jsf@jsancho.org>
Fri, 9 Sep 2016 17:27:39 +0000 (19:27 +0200)
examples/blue.bmp [new file with mode: 0644]
examples/fran.scm
examples/red.bmp [new file with mode: 0644]

diff --git a/examples/blue.bmp b/examples/blue.bmp
new file mode 100644 (file)
index 0000000..a2e5b0d
Binary files /dev/null and b/examples/blue.bmp differ
index 291a543d46093f65ff60b699de117e9f8d943e97..9b18db8b947093be2d02c3e63b7d195d0a0ee9e1 100644 (file)
 
 ;;; Reactive positions
 
-(define PI 3.14159265)
-(define (waggle) (cos (* PI (current-time))))
-(define (wiggle) (sin (* PI (current-time))))
+(define (waggle) (cos (* pi (current-time))))
+(define (wiggle) (sin (* pi (current-time))))
 
 
 ;;; First example
 
-(define charlotte (importBitmap "charlotte.bmp"))
-(define leftRightCharlotte (moveXY wiggle 0 charlotte))
-(leftRightCharlotte)
+(define red (import-bitmap "red.bmp"))
+(define left-right-red (move-xy wiggle 0 red))
+(run-scene left-right-red)
 
-(define pat (importBitmap "pat.bmp"))
-(define upDownPat (moveXY 0 waggle pat))
-(upDownPat)
+(define blue (import-bitmap "blue.bmp"))
+(define up-down-blue (move-xy 0 waggle blue))
+(run-scene up-down-blue)
diff --git a/examples/red.bmp b/examples/red.bmp
new file mode 100644 (file)
index 0000000..8859e4b
Binary files /dev/null and b/examples/red.bmp differ