pwambach / threejs-particle-shader

Shader based particle system for ThreeJS
83 stars 11 forks source link

threejs-particle-shader

View Demo

This project offers an configurable and easy way to integrate a shader based particle system into a three.js project.
Basically it's a rewrite of my particle shader experiments with the goal to reuse the basic shader code anywhere but keeping everything flexible.

WIP!

Inspired by the "One Million Particles" Chrome Experiment

Usage

  1. Load the script from the dist folder

    <script src="https://github.com/pwambach/threejs-particle-shader/raw/master/dist/particles.js"></script>
  2. Create a particle system. This function expects your THREE.js WebGL renderer and the rendered scene. Optionally you can customize the particle system by providing an options object.

    var particles = new Particles(renderer, scene, options);
  3. To animate the particles you have to update the the system in your render loop.

    particles.update();

Options

License

MIT