[CLJ] Call to run sketch.

瀏覽次數:35 次
跳到第一則未讀訊息

Boris Kourtoukov

未讀,
2016年1月18日 晚上7:58:022016/1/18
收件者: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

未讀,
2016年1月18日 晚上8:46:242016/1/18
收件者: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

未讀,
2016年1月18日 晚上9:31:132016/1/18
收件者:clj-processing
Ah thanks, I was looking at :no-start and thought that that was the only way.

Best,
Boris
回覆所有人
回覆作者
轉寄
0 則新訊息