2.8.0+ breaks q/fill and q/stroke

13 views
Skip to first unread message

asdfqwerty2000

unread,
Aug 1, 2019, 2:41:19 AM8/1/19
to clj-processing
I have found Quil enormously useful but upgrading to 2.8.0 or above breaks all of my visualizations because of the API changes to q/fill and q/stroke. I can't imagine I'm the only person who used the arity-1 versions of those functions to specify colors something like this: (q/fill (:fill thing)). If somebody wants gray then he could use (q/fill (q/color shade)) without breaking any code. Have I overlooked a possible good rationale for this change?

Mikita Belahlazau

unread,
Aug 2, 2019, 1:01:54 AM8/2/19
to clj-processing
Hi

The arity-1 version was removed because it didn't work for cljs: it relied on a color being encoded in an integer and that wasn't supported in processing.js so I decided to remove to make clj and cljs versions of Quil consistent. Well, actually you can still use arity-1 version to provide full color, but instead of an integer - pass a vector of [r g b] values: https://github.com/quil/quil/blob/master/src/cljc/quil/core.cljc#L1700 This is not reflected in docs/examples unfortunately, which was an oversight on my part.

On Wed, Jul 31, 2019 at 11:41 PM 'asdfqwerty2000' via clj-processing <clj-pro...@googlegroups.com> wrote:
I have found Quil enormously useful but upgrading to 2.8.0 or above breaks all of my visualizations because of the API changes to q/fill and q/stroke. I can't imagine I'm the only person who used the arity-1 versions of those functions to specify colors something like this: (q/fill (:fill thing)). If somebody wants gray then he could use (q/fill (q/color shade)) without breaking any code. Have I overlooked a possible good rationale for this change?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/clj-processing/911c3bb3-1f77-487c-8b1c-ca9a38b81c8f%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages