Live data from Hacker News

Show HN: Minimal 3D creative coding tool – control 8×8×8 dots with JavaScript

doersino.github.io

21–30 of 31 posts

Re: Show HN: Minimal 3D creative coding tool – control 8×8×8 dots with JavaScript

#21

Did you fix the bug in the tixy.land code where one could inject as much code as wanted via location.hash? Here is the post from when I discovered it: https://news.ycombinator.com/item?id=24980221 Edit: no, that still works, here is an example: https://doersino.github.io/tixyz/?code=eval(%27%2F*%27%2Bpar...

That "bug" has become sort of a feature – the author of tixy.land added support for it a while ago [1], which I also merged into tixyz. [1]: https://twitter.com/aemkei/status/1325918933375987712

I assume he means the size of the payload remains technically below 32 while the "real" code is larger due to evaluating location.hash. `eval(location.hash.substring(1))` is 32 characters, but the hash itself can be few kilobytes

I used this to merge two tixies a while back, and execute an XSS as proof of concept [0]

[0] https://twitter.com/AntoGarand/status/1327101941760086017

Re: Show HN: Minimal 3D creative coding tool – control 8×8×8 dots with JavaScript

#22
post #9

I've wanted to build a LED cube [1] for a while, but just haven't had the time to get to it yet. This is basically a virtual version of the same thing, very cool. And significantly simpler to experiment with before committing to several days of soldering. [1] https://www.instructables.com/Led-Cube-8x8x8/

Blatant self promotion, but my friend and I just launched an LED cube kit on Kickstarter [1] which you might be interested in (no soldering). It's just the outermost LEDs on three sides, but the idea is similar, you create all sorts of animations in just a few lines of Python, e.g. use 4D noise to create a digital lava lamp effect etc. Also every component exposes a REST endpoint, so you can use other languages too.…

Wow, what a cool idea!

Re: Show HN: Minimal 3D creative coding tool – control 8×8×8 dots with JavaScript

#23

Earlier quoted context omitted.

That "bug" has become sort of a feature – the author of tixy.land added support for it a while ago [1], which I also merged into tixyz. [1]: https://twitter.com/aemkei/status/1325918933375987712

I assume he means the size of the payload remains technically below 32 while the "real" code is larger due to evaluating location.hash. `eval(location.hash.substring(1))` is 32 characters, but the hash itself can be few kilobytes I used this to merge two tixies a while back, and execute an XSS as proof of concept [0] [0] https://twitter.com/AntoGarand/status/1327101941760086017

Interesting, I thought I had exhausted the list of string modification functions when checking how to work around the hash symbol. That's nicer than my solution by far.

Re: Show HN: Minimal 3D creative coding tool – control 8×8×8 dots with JavaScript

#25

This is so cool! Great job. sin(i+t) : https://doersino.github.io/tixyz/?code=sin(i%2Bt) If you stop that one rotating with the mouse, it's some kind of brain-damaging illusion. Or thousands of illusions, most of which do something weird to your eyes–it looks very different from different angles. Hmm that is such a great way of generating (2D) optical illusions!

This is so cool, I am still unable to clearly comprehend what is going on at one layer. I wonder if there is some way to set others layers to zero!

Re: Show HN: Minimal 3D creative coding tool – control 8×8×8 dots with JavaScript

#26

This is so cool! Great job. sin(i+t) : https://doersino.github.io/tixyz/?code=sin(i%2Bt) If you stop that one rotating with the mouse, it's some kind of brain-damaging illusion. Or thousands of illusions, most of which do something weird to your eyes–it looks very different from different angles. Hmm that is such a great way of generating (2D) optical illusions!

This is so cool, I am still unable to clearly comprehend what is going on at one layer. I wonder if there is some way to set others layers to zero!

There sure is – one way is using the good ol' conditional operator:

  (x==3)?sin(i+t):0
Result: https://doersino.github.io/tixyz/?code=%28x%3D%3D3%29%3Fsin%...

Another is multiplying with a boolean expression that's automatically cast to 0 or 1 depending on its value:

  sin(i+t)*(x==3)
Result: https://doersino.github.io/tixyz/?code=sin%28i%2Bt%29*%28x%3...

Re: Show HN: Minimal 3D creative coding tool – control 8×8×8 dots with JavaScript

#27

There can be a real-life 2D version of this: it probably can be integrated to an Arduino project using a LED 8x8 Red Dot Matrix Display (piece code MAX7219).

That's been done before with tixy.land, the project that inspired my tool:

https://twitter.com/atesgoral/status/1325947885817565185

https://twitter.com/aemkei/status/1325888127102226432

3D LED cubes are also a thing, as another commenter in this thread noted:

https://news.ycombinator.com/item?id=26978173

Re: Show HN: Minimal 3D creative coding tool – control 8×8×8 dots with JavaScript

#30

Jelly: Math.random(1) https://doersino.github.io/tixyz/?code=Math.random(1)

James Bond: https://doersino.github.io/tixyz/?code=%21y%26%21z%26%26x-t%...

Filler: https://doersino.github.io/tixyz/?code=%21z%26%26x%2By*8-t*2...

24h clock: https://doersino.github.io/tixyz/?code=x%3C6%26z%3C3%26z*48%...

Each ball is 10 minutes, it first counts to 6 for 1 line is 1 hour, then fills a rectangle for 8 hours, then fills two more rectangles to 24 hours.

Post reply on HN