News for hackers. Stuff that matters.
Re:Show HN: De Jong Attractor visualization by cjlarose on Monday June 01, 2015 @12:27AM (#9636802)
Written in Clojurescript using Om (React) and THREE.js. Code at https://github.com/cjlarose/de-jong
Re:Show HN: De Jong Attractor visualization by markc on Monday June 01, 2015 @09:27AM (#9638339)
Very cool!

Nice UI touches too, e.g. maintaining js/history and show/hide editors. I notice the app state is captured in the URL which lets you save a favorite shape. Neat.

What does the throttling do? And what happens without it?

I'd enjoy reading someday about how you developed this (w/ annotated source) and your experiences using core.async, Om, figwheel, etc.

Thanks for sharing it!

Re:Show HN: De Jong Attractor visualization by cjlarose on Monday June 01, 2015 @10:42AM (#9638894)
Yeah, so the application state is captured in the URL with throttling. The behavior isn't too different from Underscore/Lodash's throttle function (https://lodash.com/docs#throttle). Basically, you can click and drag the range sliders to update the visualization pretty rapidly. If I updated the URL with windows.history.pushState every time the state changed for a single keyframe, it would overload the history and be a pain to hit the "back" button. So instead, I throttle calls to pushState so it fires no more than every 500ms.

I think it might be too to do a write-up. I definitely learned a lot doing it!

Re:Show HN: De Jong Attractor visualization by kriro on Monday June 01, 2015 @07:19AM (#9637777)
Pretty awesome. Any specific reason for picking the de Jong attractor (other than the fact that it's pretty)? I usually see Lorenz attractors in tech demos so I'm curious :)
Re:Show HN: De Jong Attractor visualization by cjlarose on Monday June 01, 2015 @10:39AM (#9638867)
I first found out about the de Jong attractor from a talk recently at the Clojure West conference. https://www.youtube.com/watch?v=vLlbEZt-3j0. I found a few videos around where people were animating between different plots of the attractor, but nothing interactive.
Re:Show HN: De Jong Attractor visualization by 317070 on Monday June 01, 2015 @07:37AM (#9637840)
The website is completely black in Chrome 43.0.2357.65 (64-bit) on Ubuntu.
Re:Show HN: De Jong Attractor visualization by cjlarose on Monday June 01, 2015 @10:48AM (#9638937)
Uh oh. I don't have a VM up and ready, but I'll check it out when I do. Thanks for letting me know!