Skip to content

TypeScript, new friction option

Choose a tag to compare
@dulnan dulnan released this 08 Jan 11:17
· 4 commits to master since this release

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.