-
Notifications
You must be signed in to change notification settings - Fork 200
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] 在 document 上提供 elementsFromPoint 方法 #948
Comments
这个API应用场景是什么,第一次听说。。 |
目前有两个场景:
只需要把 G 内部实现的拾取方法暴露出来就行:
考虑到 最后在 可以参考 luma.gl 的做法:visgl/luma.gl#432 |
目前 |
* fix: test whether native event came from context's dom element #928 * fix: add offscreenCanvas in Canvas config #940 * feat: add CSS API, includes CSS Typed OM & Layout API * fix: add shadow for Line / Polyline / Path #959 * feat: add for multiple-layer picking #948 * fix: put raf/cancelRaf to Canvas #953 * fix: add limits query such as to Canvas #953 * fix: account for 'none' value in <color> #952 * feat: support multi-layer picking in g-webgl #948 * fix: support when picking in g-webgl #952 * feat: support inheritance in style system * fix: encode html entity in g-svg #963 * feat: add get/setLocalMatrix for legacy G4.0 * fix: animations example * feat: add pointerEvents property #942 * fix: skip number2string when parsing number * Publish - @antv/g-canvas@1.0.20 - @antv/g-components@1.0.18 - @antv/g-devtool@0.3.4 - @antv/g-math@1.0.18 - @antv/g-mobile-canvas@0.0.2 - @antv/g-mobile-svg@0.0.2 - @antv/g-mobile-webgl@0.0.2 - @antv/g-mobile@1.0.5 - @antv/g-plugin-3d@1.0.22 - @antv/g-plugin-box2d@1.0.11 - @antv/g-plugin-canvas-picker@1.0.18 - @antv/g-plugin-canvas-renderer@1.0.18 - @antv/g-plugin-control@1.0.19 - @antv/g-plugin-css-select@1.0.18 - @antv/g-plugin-dom-interaction@1.0.18 - @antv/g-plugin-gpgpu@1.0.19 - @antv/g-plugin-html-renderer@1.0.19 - @antv/g-plugin-matterjs@1.0.8 - @antv/g-plugin-mobile-interaction@0.0.7 - @antv/g-plugin-physx@1.0.11 - @antv/g-plugin-svg-picker@1.0.18 - @antv/g-plugin-svg-renderer@1.0.18 - @antv/g-plugin-webgl-renderer@1.0.24 - @antv/g-plugin-yoga@1.0.8 - @antv/g-shader-components@1.0.16 - @antv/g-svg@1.0.18 - @antv/g-web-component@1.0.5 - @antv/g-webgl@1.0.24 - @antv/g-webgpu-compiler@1.0.19 - @antv/g@5.0.21 - @antv/react-g@1.0.14 - @antv/g-site@1.0.24 * publish Co-authored-by: yuqi.pyq <yuqi.pyq@antgroup.com>
来自:https://www.khronos.org/events/webgl-meetup-april-2022 在 Three.js 中通过 暂时不提供基于 Raycast 的 CPU 拾取。 |
将拾取方法挂载到 document 对象上:
返回该位置最顶层的一个图形:https://developer.mozilla.org/zh-CN/docs/Web/API/Document/elementFromPoint
返回该位置最顶层的一组图形:https://developer.mozilla.org/zh-CN/docs/Web/API/Document/elementsFromPoint
如果点在可视范围外,返回 null 和空数组。
The text was updated successfully, but these errors were encountered: