Fluxus tips & tricks

Fluxus : A 3D game engine for livecoding.



(blur) and (clear-frame)

(blur) displays a transparent plane over the screen instead of clearing it. The amount of transparency is defined by the blur argument. If it is 1, it means to render a totally opaque plane, which is equivalent to (clear-frame 1). (blur) is enabled when the blur parameter is above 0. in this case, (clear) won't happen. If you would like to enable clear, you have to disable blur first with (blur 0), then (clear-frame 0) will work. When you enable blur, try to use smaller values, like 0.1.

(pdata) and type "c:colour"

(hint-vertcol) is needed to be able to view modified vertex colours.

(colour (vector 1 0 0))
; next line makes previous line irrelevant
(define cube (build-cube))
; cube is all black
(with-primitive cube
    (pdata-map! (lambda (c) (vector (flxrnd)(flxrnd)(flxrnd) 1)) "c"))

.fluxus.scm startup script

The .fluxus.scm script is loaded at startup if it is located in your /home/<user>/ directory (for linux users).

Here's an example of a startup script with a slight delay inserted to be sure evry-thing is up and running before executing the script:

(spawn-timed-task (+ (time-now) .3)
    (lambda () (begin
            (set-cursor 'crosshair))
        ;(set-screen-size (vector 1440 900))
        ;(set-screen-size (vector 1152 720))
        ;(set-screen-size (vector 1280 720))