[CLJ] Call to run sketch.

35 views
Skip to first unread message

Boris Kourtoukov

unread,
Jan 18, 2016, 7:58:02 PM1/18/16
to clj-processing
Is it possible to not have the sketch run when declared? I would like to call and run it when I am ready, passing new parameters each time.
I noticed that that appears to be possible in CLJS but not CLJ?

Thank you for any help.

Nikita Beloglazov

unread,
Jan 18, 2016, 8:46:24 PM1/18/16
to clj-processing
Yes, it is possible. Use sketch function instead of defskecth. Example:

(defn start-sketch [size]
  (q/sketch
    :size [size size]
    :draw draw
    :setup setup))

; and then from some other function
...
(start-sketch 500)
...

Thanks,
Nikita

--
You received this message because you are subscribed to the Google Groups "clj-processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clj-processin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Boris Kourtoukov

unread,
Jan 18, 2016, 9:31:13 PM1/18/16
to clj-processing
Ah thanks, I was looking at :no-start and thought that that was the only way.

Best,
Boris
Reply all
Reply to author
Forward
0 new messages