Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antv/g-plugin-canvas-picker

Package Overview
Dependencies
Maintainers
66
Versions
239
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-plugin-canvas-picker

A G plugin for picking in canvas

  • 2.0.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
32K
decreased by-14.11%
Maintainers
66
Weekly downloads
 
Created
Source

@antv/g-plugin-canvas-picker

基于 Canvas2D API 实现的拾取:

  1. 使用 R-Tree 空间索引查找拾取点命中的一系列图形包围盒
  2. 在这些图形中找到最顶层的一个图形,依据 z-index
  3. 使用数学计算精确判定是否命中该图形,例如 Circle 测算到圆心距离是否小于半径

该方案基于 CPU,因此优化点在于包围盒相交运算是否足够快。

Keywords

FAQs

Package last updated on 30 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc