All examples By author By category About

tomshanley

Area segment fill using gradient

Suggested answer to an SO question on filling a segment of an area between two paths

A linearGradient is created and used as fill on the area between two lines. And then a rect with 0 opacity has mousemove event attached, which uses the mouse's position to update a linearGradient's offsets' proportions.

forked from tomshanley's block: Area segment fill using gradient to pre-calculate each coordinate on each path, so that the interaction is smoother.

Built with blockbuilder.org