Previous: ScratchPadInput, Up: Functions



12.15 ScratchPad

The scratchpad is the fluxus editor and gl window.

Example
     

12.15.1 (every-frame callback-function)

Returns

void

Description

Sets a function to be called every time the render is about to draw a new frame.

Example
      (define count 0)
     
      (define (myfunc)
          (display count)(display " frames have been rendered!")
          (newline)
          (set! count (+ count 1)))
     
      (every-frame (myfunc))
     

12.15.2 (clear)

Returns

void

Description

Clears out the renderer of all objects and lights. Clears the physics system and resets the every-frame callback. Generally a Good Thing to put this at the beginning of scripts to make sure everything is cleared out each time you execute.

Example
      (clear) ; without this we would accumulate a new cube every time F5 was pressed
      (build-cube)
     

12.15.3 (start-framedump name-string type-string)

Returns

void

Description

Starts saving frames to disk. Type can be one of "tif", "jpg" or "ppm". Filenames are built with the frame number added, padded to 5 zeros.

Example
      (start-framedump "frame" "jpg")
     

12.15.4 (end-framedump)

Returns

void

Description

Stops saving frames to disk.

Example
      (end-framedump)
     

12.15.5 (help function-string)

Returns

void

Description

Displays help information on a fluxus function. For running in the repl mainly.

Example
      (help "pop")