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

Carlton17Y 8年前
   <p> </p>    <h2>Qarticles</h2>    <p>A lightweight and high performance JavaScript library for creating particles</p>    <p><img src="https://simg.open-open.com/show/79c8d32add0089fb2177ce597bbb4afb.gif"></p>    <h2>Live Demos</h2>    <p><a href="/misc/goto?guid=4959672841288690609" rel="nofollow,noindex">click here</a> .</p>    <h2>How to Use</h2>    <h3>basic</h3>    <pre>  <script src="src_to_qarticles.js"></script>  <script>      var qarticles = new Qarticles(document.getElementById('cov'))  </script></pre>    <h3>advanced</h3>    <pre>  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)</pre>    <h2>License</h2>    <p>This project is licensed under the terms of the <strong>MIT</strong> license.</p>