Qarticles
A lightweight and high performance JavaScript library for creating particles
Live Demos
How to Use
basic
var qarticles = new Qarticles(document.getElementById('cov'))
advanced
var covColorFuc = function (dot, screenWidth, screenHeight) {
return `rgb(${Math.floor(255 * (1 - dot.x / screenWidth))}, ${Math.floor(255 * (1 - dot.y / screenHeight))}, ${Math.floor(255 * (dot.speedArr[0]/ 100))})`
}
var canvas = document.getElementById('cov')
var options = {
dotColorFuc: covColorFuc,
lineColorFuc: covColorFuc,
count: 32,
linkCount: 4,
screenWidth: 1080,
screenHeight: 1920
}
var qarticles = new Qarticles(canvas, options)
License
This project is licensed under the terms of the MIT license.
项目描述:A lightweight and high performance JavaScript library for creating physical particles — 查看更多内容...