Functions and macros for initialising and controlling visualisation applets.
Functions and macros for initialising and controlling visualisation applets.
(-exitActual this)
Overriding PApplet.exitActual because we don't want it to call System.exit().
Overriding PApplet.exitActual because we don't want it to call System.exit().
(-settings this)
Overriding PApplet.settings() to set size.
Overriding PApplet.settings() to set size.
(applet & opts)
Create and start a new visualisation applet. All options used here should be documented in 'defsketch' docstring.
Create and start a new visualisation applet. All options used here should be documented in 'defsketch' docstring.
(applet-disposed applet)
This function is called when PApplet executes 'dispose' method. It means we can dispose frame, call on-close function and perform other clean ups.
This function is called when PApplet executes 'dispose' method. It means we can dispose frame, call on-close function and perform other clean ups.
(applet-state applet k)
Fetch an element of state from within the applet
Fetch an element of state from within the applet
(defapplet app-name & opts)
Define and start an applet and bind it to a var with the symbol app-name. If any of the options to the various callbacks are symbols, it wraps them in a call to var to ensure they aren't inlined and that redefinitions to the original fns are reflected in the visualisation. See applet for the available options.
Define and start an applet and bind it to a var with the symbol app-name. If any of the options to the various callbacks are symbols, it wraps them in a call to var to ensure they aren't inlined and that redefinitions to the original fns are reflected in the visualisation. See applet for the available options.
(generate-listeners)
Generates all listeners like onKeyPress, onMouseClick and others.
Generates all listeners like onKeyPress, onMouseClick and others.
(resolve-renderer renderer)
Converts keyword to Processing renderer string constant. This string can be passed to native Processing methods. If renderer passed as String - do nothing and simply return it
Converts keyword to Processing renderer string constant. This string can be passed to native Processing methods. If renderer passed as String - do nothing and simply return it
(with-applet applet & body)
Binds dynamic var to current applet.
Binds dynamic var to current applet.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close