3 ms·
Looks like a burgeoning Javascript demoscene. Good luck to everyone who wants to top the 284 byte ray marcher, though: http://www.p01.org/releases/512b_jspongy/
by jdp 16y ago
Looks like a burgeoning Javascript demoscene. Good luck to everyone who wants to top the 284 byte ray marcher, though: http://www.p01.org/releases/512b_jspongy/ http://www.p01.org/releases/512b_jspongy/
It runs super slow on Firefox, it does much better in Chrome.
- johnfn 16y agoThat is really impressive. I wish the guy would release some notes about how he did it, or what his code means... Edit: I started looking into it. He does some really bizarre things, like having all of his assignments and statements in the parens of a for loop, assigning Math.cos to $, and some tricky bit ops. Unfortunately, I don't think I understand the math well enough to totally understand it.
- jcl 16y agoThere was some analysis posted when the article originally appeared on HN: http://news.ycombinator.com/item?id=1227936 http://news.ycombinator.com/item?id=1227936 As I understand it, the trig calls are just to establish the camera position and direction. The rest of the calculation (the two inner loops) is marching along a ray to find a depth value.
- p01 16y agoHopefully, http://js1k.com/demo/49 http://js1k.com/demo/49 will top JSpongy ;) This time I wrote a Quaternion Julia fractal raymarcher using the Hubbard-Douady distance estimation and tried to wrap the all thing with a nice design. Hope you like this first entry to JS1K and appreciate the efforts. PS: It works at a good 20fps in Firefox on my 2yo machines.
- jcl 16y agoGood job; it looks amazing... That one's my favorite (although the tunnel is also nice).
- swah 16y agoThen WebGL comes along and the community splits between bare-bones vs OpenGL...again!