This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-01
Channels
- # admin-announcements (8)
- # arachne (11)
- # beginners (17)
- # boot (64)
- # cider (26)
- # cljs-dev (7)
- # cljsrn (1)
- # clojure (115)
- # clojure-belgium (2)
- # clojure-dusseldorf (15)
- # clojure-poland (15)
- # clojure-russia (62)
- # clojure-spec (86)
- # clojure-uk (208)
- # clojurescript (36)
- # cursive (4)
- # datavis (11)
- # datomic (44)
- # editors (9)
- # hoplon (21)
- # jobs (4)
- # mount (21)
- # off-topic (3)
- # om (113)
- # onyx (65)
- # parinfer (2)
- # perun (3)
- # proton (6)
- # re-frame (29)
- # reagent (20)
- # yada (3)
FWIW, I'm leaning toward something that just creates a Clojure map, converts it to js (hopefully via clj->js
), then leaves it to Vega
to evaluate it
like gyptis does (https://github.com/dvdt/gyptis)
I guess it depends how much you plan to use it. If it's more than a little, it's not too bad usually to write a thin cljs wrapper over a js lib.
That's the approach I took with the Mathbox lib, which is another JS graphics lib. If you want to get an idea of what's involved, take a look at https://github.com/eggsyntax/cljs-mathbox
The actual wrappers (which was most of the work) are in https://github.com/eggsyntax/cljs-mathbox/tree/master/src/cljs_mathbox
A lot of it's stuff like this:
(defn bezier [mb-instance opts-map]
(. mb-instance bezier (clj->js opts-map)))
which is a bit tedious, but not hard.& if you have to do a bunch of them, you could write a fn-to-js-method
macro or something...