Fork me on GitHub
#clojure-art
<
2016-09-12
>
mikebelanger14:09:50

Hey does anybody have experience using THREEjs with Clojurescript?

mikebelanger14:09:45

I was just playing around with the cljsjs bindings, and I decided to initiate the THREEjs vars in a function’s local bindings. https://gist.github.com/mikebelanger/8e9c77c0295509682c976b375d755ce3

mikebelanger14:09:41

When I went to make a render and animate function, I had to locally define them within the original init function so they could access the local vars. Defining render and animate outside the function and passing in the vars made THREE complain about too much recursion.

mikebelanger14:09:15

So the above just defines two functions within the init function, but I’m unsure this is a good coding practice. What do you guys think?