Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@newkrok/three-particles

NewKrok219MIT2.1.0TypeScript support: included

Three.js-based high-performance particle system library designed for creating visually stunning particle effects with ease. Perfect for game developers and 3D applications.

three, three.js, particles, particle system, webgl, 3d, visual effects, game development, 3d applications, high performance, javascript, typescript, three-particles, threejs effects

readme

THREE Particles Logo

THREE Particles

Run Tests NPM Version NPM Downloads Bundle Size

Particle system for ThreeJS.

Features

  • Easy integration with Three.js.
  • Visual editor for creating and fine-tuning effects: THREE Particles Editor
  • Highly customizable particle properties (position, velocity, size, color, alpha, rotation, etc.).
  • Support for various emitter shapes and parameters.
  • TypeDoc API documentation available.

Live Demo & Examples

Installation

NPM

npm install @newkrok/three-particles

CDN (Browser)

Include the script directly in your HTML:

<script src="https://cdn.jsdelivr.net/npm/@newkrok/three-particles@latest/dist/three-particles.min.js"></script>
<!-- or -->
<script src="https://unpkg.com/@newkrok/three-particles@latest/dist/three-particles.min.js"></script>

Usage

Here's a basic example of how to load and use a particle system:

// Create a particle system
const effect = {
  // Your effect configuration here
  // It can be empty to use default settings
};
const { instance } = createParticleSystem(effect);
scene.add(instance);

// Update the particle system in your animation loop
// Pass the current time, delta time, and elapsed time
updateParticleSystems({now, delta, elapsed});

Documentation

Automatically generated TypeDoc: https://newkrok.github.io/three-particles/