Forum

Clojurescript-blend4web status

16 November 2016 20:02
Hi guys,

I'm getting to grips with a clojurescript-controlled blend4web scene. I still don't know what I'm doing, but it looks like this isn't as crazy as it sounds.

Here's a video showing me fooling around with it. Note how I trigger a B4W engine panic whenever I save the clojurescript file (on the left). I don't fault blend4web for this, as I'm using blend4web for a very unorthodox purpose.

That said, I think it's interesting that blend4web's engine doesn't fully restart every time I save – and I don't know why :P The JS get's re-compiled every time it saves - including the JS that starts the engine. My guess is that because blend4web uses a separate web-worker for asset loading, and because clojurescript only targets the main thread whenever I load, the separate worker thread keeps going as I save the file. This is actually kind of neat, but probably something I should resolve.
07 December 2016 18:39
Hi guys,

So progress is still happening, I can even get some audio-reactive stuff (with the help of tonejs).

Here's a simple test : http://clojurescript-experiments.neocities.org/ (you'll need a microphone). You can even 'live-code' some of the functions changing, if you compile it un-optimized!

I'm also trying to set up the clojurescript externs for blend4web. Because blend4web is already Google Closure enabled, I found that using your own externs actually works with clojurescript as well.

That said, in order to get advanced compilation, I had to include the files in:

https://github.com/TriumphLLC/Blend4Web/tree/master/src/ext

in addition to those prefixed with 'externs_' - which leads me to believe these are externs too? Or are they for extensions? Sorry for my silly questions.

-Mike
 
Please register or log in to leave a reply.