-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[g-canvas] 贝塞尔曲线拾取效率很低 #1193
Labels
Comments
xiaoiver
added a commit
that referenced
this issue
Oct 31, 2022
14 tasks
xiaoiver
added a commit
that referenced
this issue
Nov 1, 2022
…1193 (#1194) * chore: remove prepublish build script * fix(g-lottie-player): both canvas and mounted display object can be used as container of lottie * fix(g-svg): use curved path when marker applied #1191 * chore: fix test case for marker * fix: preprocess path and generate bbox of each segment for later use #1193 * chore: add test case for clippath * fix(g-canvaskit): support clippath * chore: update test case for path * Publish - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
目前在
g-plugin-canvas-picker
中使用的判定点是否在曲线上的方法效率比较低,这也是切换到 SVG 不卡的原因(使用原生 DOM API):参考 4.0 的实现优化如下:
Snap.svg 的实现:
https://github.com/adobe-webplatform/Snap.svg/blob/master/src/path.js#L409-L413
由此引发的另一个问题是,在 Path 初始化阶段是否有必要统一转化成三阶贝塞尔曲线。这一步的本意是:
M
C
Z
三种命令但问题就在于这一步
path2Curve
会有一定的开销。理想的做法应该是推迟转换的时机。The text was updated successfully, but these errors were encountered: