Handy functions to make your life easier...
time-number
Returns the number of seconds (+ fraction) since midnight January 1st 1970. This is the simpest animation source for your scripts.
(define (animate) (rotate (sin (time)) 0 0) (draw-cube)) (every-frame (animate))
time-number
Time in seconds since the last frame. Used to make animation frame rate independant.
(define (animate) (rotate (* (delta) 10) 0 0) (draw-cube)) (every-frame (animate))
random-number
Returns a random number between 0 and 1
(define (animate) (colour (flxrnd) (flxrnd) (flxrnd)) (draw-cube)) (every-frame (animate))
void
Seeds the random number generator so we can get the same sequence.
(define (animate) (colour (flxrnd) (flxrnd) (flxrnd)) (draw-cube)) (flxseed 10) (every-frame (animate)) ; the same seqence of colours will be generated
void
Sets a list of search path strings to use for looking for fluxus related files, such as textures, shaders etc. Paths will be searched in order each time.
(searchpaths (list "/path/to/my/textures" "/path/to/my/other/textures"))
fullpath-string
Searches the search paths for the specified file and returns the first location it finds.
(fullpath "myfile")
void
Saves out the current OpenGL front buffer to disk. Reads the filename extension to decide on the format used for saving, "tif", "jpg" or "ppm" are supported. This is the low level form of the frame dumping, use start-framedump and end-framedump instead.
(framedump "picture.jpg")