Skip to content

Releases: dulnan/lazy-brush

TypeScript, new friction option

08 Jan 11:17
Compare
Choose a tag to compare

Migrated code to TypeScript. Type definitions are included in the build.

There is also a new option on the update() method of the LazyBrush instance to provide a friction value:

lazy.update({ x: 40, y: 0 }, { friction: 0.5 })

This will make the brush "lag" behind the pointer. The lower the value the greater the lag. A value of 1 means infinite friction, 0 is equivalent to not providing a value (no friction).

There is also a new demo app to showcase the how the radius and friction values affect the brush movement.