{"repo":"marginalhours/dom-particles","free":true,"listed":false,"github":"https://github.com/marginalhours/dom-particles","clone":"git clone https://github.com/marginalhours/dom-particles.git","description":"Particle effects in the DOM","language":"JavaScript","stars":25,"topics":["particles","dom","javascript-library","gamedev","incremental-game"],"license":"MIT","category":"game-templates","readme_excerpt":"dom-particles A small JS library to provide particle-style effects within the DOM, without leveraging or other techniques. Demo Page Quickstart Include this tag in the of your page: Then somewhere in the include the following script: Alternative installation via NPM npm install --save dom-particles then in your code: Development git clone this repository, then: API Reference DomParticles object The DomParticles object is the chief way of creating particles and emitters. By default, a DomParticles only uses the requestAnimationFrame API to update itself while a particle or emitter is extant. After the last particle or emitter reaches the end of its lifespan, the DomParticles will unregister itself and stop updating until the next add or addEmitter call. Options Name Default Remarks ------------- ------------------- --------------------------------------------------------------------------------------------------------------------------- max 100 Maximum number of particles on screen at any one time. Global across all emitters preallocate 10 How many particle elements to create by default and add to the DOM. More will be created on-demand, up to the max amount. tagName span Tag to use for particle elements container document body tag Parent container for all particles. Will have position:relative applied to the styles. autostart true If false , particles will not be animated until .start() is called on the parent DomParticles instance Methods - .addParticle(options) - Create a p","default_branch":null,"files":null,"tree":[],"storefront":"/r/marginalhours","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/marginalhours/dom-particles/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}