Better HN
topnewbestaskshowjobs
Log inSign up

ericleong

4 karma · joined May 9, 2022 (4y ago) · 1 submissions

Submissions

comment 4y ago · link · parent

Another way to do this (albeit without simple support for fluids) is to use the Moore neighborhood and use a left and right "bias" to decide which direction a grain should fall towards if it can't fall straight down. This works pretty well as a shader, and has the same side effect with the horizontal lines.

https://github.com/ericleong/sand.js