您的位置:首页 > Web前端 > JavaScript

html5 轻量级炫酷 js 粒子动画库

2016-05-11 10:43 453 查看


Qarticles

A lightweight and high performance JavaScript library for creating particles




Live Demos

click
here .


How to Use


basic

<script src="src_to_qarticles.js"></script>
<script>
var qarticles = new Qarticles(document.getElementById('cov'))
</script>


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.


hilongjw / Qarticles

Watch21Fork0

项目描述:A lightweight and high performance JavaScript library for creating physical particles — 查看更多内容...

http://hilongjw.github.io/Qarticles/demo.html

下载ZIP
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: