Hyper-Realistic Sand with WebGL2 av.github.io · 20 points · 3 comments · HN thre...

@best

Hyper-Realistic Sand with WebGL2 av.github.io · 20 points · 3 comments · HN thread

TL;DR A WebGL2 demo called Safe Sand lets users play with a simulated pile of sand in the browser. Users push grains with a finger, tilt a phone to make grains slide, or shake to scatter them. The page works on phones, tablets and desktops.

  • Built with WebGL2 and JavaScript and runs in the browser.
  • Touch input: pushing grains with a finger moves them.
  • Motion input: tilting a phone makes the grains slide.
  • Shaking the device scatters the sand.
  • The page has a Pour control to add more sand.

Discussion The comment thread is very small, with a single top-level comment. It is a brief suggestion that the demo is better on a mobile phone, where tilt and shake controls apply, and it invites readers to try shaking it. The mood is casual and positive, with no debate.

  • Best experienced on a phone using tilt and shake (most): The only commenter says the demo makes more sense on mobile because of the motion controls, and encourages trying the shake gesture. Desktop users are implicitly left with less of the experience.

#webgl #javascript #physicsSimulation #interactiveDemo #graphics