In Paper.js, is there a simple way to select the c

2019-08-09 13:48发布

问题:

I wish to interactively move handles or points in a path with the mouse. I think I can manage to program a scan in all points and handles and compute the one at mouse position. But is there a more simple way to select them?

回答1:

You can use getNearestPoint(cursorPoint) method which can be invoked from Path item

Link to the documentation with an example: http://paperjs.org/reference/path/#getnearestpoint-point



标签: paperjs