steveruizok / perfect-freehand

Draw perfect pressure-sensitive freehand lines.

Home Page:https://perfectfreehand.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] getStrokes returns NaN when provided two or more points with the same coordinates

tarngerine opened this issue · comments

getStroke([
  [1, 1],
  [1, 1],
])

ends up with

image

this can happen when sampling points on each frame (as opposed to onmousemove)

im not sure what the best expected result is, maybe drawing the points as a single dot/circle? or return an empty array if any of the results are NaN

Good catch! Fixed in 629d767