As you can see in the attached screenshot, this leads to a small problem: `clj->js` is really slow (this was run with a grid of 100x100).
Annotating the arrays with '#js' won't work since they are generated dynamically. Making the arrays offline is, as I see it, not an option either, since the colors of the tiles should change based on input, so one large JavaScript array at least is needed during the execution.
I was wondering if there is some other workaround for this? Or did I just stumble upon a use case where ClojureScript might not be a good solution?
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
A example might help to really figure out what I am trying to do here. I have code like the following:
(defn build-tile-vertices [x-coord y-coord]
(let [tile-template [[0 0 0]
[1 0 0]
[1 1 0]
[0 1 0]]
translate (fn [[x y z]] [(+ x x-coord) (+ y y-coord) z])]
(mapcat translate tile-template)))
Would there be a way to keep all of this directly as a JavaScript array? Or did you mean I should fall back to bare JavaScript? Or is there something totally different that I am missing?
You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/Z2pFr_qy79w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.