canvas 点线浮动连接
2019-04-02 本文已影响0人
_MEmeNTO_
截图
使用简单
// 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>