groworld/bamboo/llink.scm

28 lines
528 B
Scheme
Raw Normal View History

2009-04-13 13:06:10 +00:00
;; simple example of setting texture, colour and rotation of an object
;; in fluxus from pd. requires llink.pd to be running in pd and the
;; 'frame-functions' to be loaded.
(define t1 0)
(define c1 (vector 0 0 0))
(define v1 (vector 0 0 0))
(define (set-texture str)
(set! t1 (load-texture str)))
(define (set-colour r g b)
(set! c1 (vector r g b)))
(define (set-rotor x y z)
(set! v1 (vector x y z)))
(define (spin)
(push)
(colour c1)
(texture t1)
(rotate v1)
(draw-cube)
(pop))
(add-frame-fcn spin)