Splitting DOM Elements Into Animated Canvas Particles | Disintegrate.js

Disintegrate is a small JS library for splitting DOM elements into animated canvas particles. Disintegrate.js is a great javascript library for simulating destroy and explosion effects that splits any DOM element into particles, fragments, or canvas-based fragments.

parallax particles, particle animation css, css particle effects, how to add particles in html, particle js, html5 canvas particle animation and parallax demo

How to make use of it:

Install & download.

$ npm install disintegrate --save

Load the required html2canvas.js and Disintegrate.js libraries within the doc.

<script src="/path/to/html2canvas.min.js"></script>
<script src="/path/to/disintegrate.js"></script>

Create the aspect on which you wish to apply the destruction and explosion results.

<div data-dis-container>
  <div data-dis-type="contained">
    Target element

Initialize the Disintegrate.js library.


API strategies.

// An array of all Disintegrate objects.

// Intiates the simultaneous particle creation for the given Disintegrate object.

// Gets the Disintegrate object for a given element.

// Adds custom particle types.

Remove disintegrate object from the saved information and removes the related canvas from the web page.

disObj.elem.addEventListener("disComplete", () => disObj.kill() );

Break Elements Into Particles, Disintegrate Plugin/Github, text particles js, css particle explosion

See Demo And Download

Official Website(ZachSaucier): Click Here

This superior jQuery/javascript plugin is developed by ZachSaucier. For extra Advanced Usages, please go to the official website.

Leave a Comment