====== Fluxus tips & tricks ======
[[http://www.pawfal.org/fluxus/|Fluxus]] : A 3D game engine for livecoding.
===== Doc =====
* [[http://www.pawfal.org/fluxus/docs/0.17/en/index.html|Fluxus doc]] extracted and html-ised from the runtime documentation system.
* [[http://en.flossmanuals.net/fluxus/index/|Fluxus flossmanual]]
===== Notes =====
=== (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.
(clear)
(colour (vector 1 0 0))
; next line makes previous line irrelevant
(hint-vertcols)
(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// 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))
(set-full-screen)
)
)