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