@antv/g-plugin-canvas-picker
A G plugin for picking in canvas
Last updated 2 months ago by zhanba .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @antv/g-plugin-canvas-picker 
SYNC missed versions from official npm registry.

@antv/g-plugin-canvas-picker

基于 Canvas2D API 实现的拾取:

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

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

Current Tags

  • 1.0.0-alpha.3                                ...           latest (2 months ago)
  • 1.0.0-alpha.15                                ...           next (9 days ago)

16 Versions

  • 1.0.0-alpha.15                                ...           9 days ago
  • 1.0.0-alpha.14                                ...           14 days ago
  • 1.0.0-alpha.13                                ...           14 days ago
  • 1.0.0-alpha.12                                ...           15 days ago
  • 1.0.0-alpha.11                                ...           17 days ago
  • 1.0.0-alpha.10                                ...           22 days ago
  • 1.0.0-alpha.9                                ...           a month ago
  • 1.0.0-alpha.8                                ...           a month ago
  • 1.0.0-alpha.7                                ...           a month ago
  • 1.0.0-alpha.6                                ...           2 months ago
  • 1.0.0-alpha.5                                ...           2 months ago
  • 1.0.0-alpha.4                                ...           2 months ago
  • 1.0.0-alpha.3                                ...           2 months ago
  • 1.0.0-alpha.2                                ...           3 months ago
  • 1.0.0-alpha.1                                ...           3 months ago
  • 1.0.0-alpha.0                                ...           4 months ago
Downloads
Today 0
This Week 0
This Month 2,405
Last Day 0
Last Week 902
Last Month 2,569
Dependencies (0)
None
Dev Dependencies (4)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |