GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

03Water flow — a liquid rule that spreads sideways when blocked below

Water cells try down, then diagonals, then sideways with an alternating direction each frame — sand piles while water seeks the low ground, two behaviors coexisting in one grid.

Best forA paint-bleed effect, terrain flooding in an interactive game

ImageDataputImageDatarequestAnimationFrame
Water flow — a liquid rule that spreads sideways when blocked below
Open in a new tab

03 Water flow — a liquid rule that spreads sideways when blocked below — Measured area 33.589% · moving frames 23/23Original by GODRICH · SCSS and React ship in the zip · Falling Sand Simulator, 9 Ways (No Library)

The post this demo lives in

Falling Sand Simulator, 9 Ways (No Library) - preview of all 9 demosFalling Sand Simulator, 9 Ways (No Library)No library, no WebGL — four rules per cell (down, down-left, down-right, sideways) make sand pile up, water flow and fir See all demos in this post

If you like this effect - similar demos