canvas 点线浮动连接

demo点这里
源码点这里

截图

使用简单

// html
<canvas id="canvas"></canvas>

// js

// npm install point-plot
import pointPlot from 'point-plot'

 pointPlot({
  canvas: document.getElementById('canvas'), // require
  color: '255,255,255', // default
  r: 4, // defalut
  distance: 100, // defarlt
  isConnect: true, // default
  isOnClick: true // default
  isOnMove: true// default
 })

// or

<script src="../dist/bundle.iife.js"></script>
<script>
  const canvas = document.getElementById('canvas')
  pointPlot({ canvas })
</script>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • # Awesome Python [![Awesome](https://cdn.rawgit.com/sindr...
    emily_007阅读 6,675评论 0 3
  • # Python 资源大全中文版 我想很多程序员应该记得 GitHub 上有一个 Awesome - XXX 系列...
    小迈克阅读 8,178评论 1 3
  • # An illustrated introduction to the t-SNE algorithm In t...
    野牛公爵阅读 3,382评论 0 0
  • 1-------- 走进前端 2-------- jQuery 3-------- CSS 4-------- A...
    依依玖玥阅读 6,917评论 0 34
  • 每当创建类或结构时,将会调用其构造函数。 类或结构可能具有采用不同参数的多个构造函数。 使用构造函数,程序员能够设...
    func_老衲姓罗阅读 2,833评论 0 1

友情链接更多精彩内容