@lukasz-okuniewicz
CustomPIXIParticles byCustom PIXI Particles.
Editor for particles: custom-pixi-particles-editor
How to use:
npm install custom-pixi-particles
then:
const customPIXIParticles = require('custom-pixi-particles')
// or
import customPIXIParticles from 'custom-pixi-particles'
// Define array of textures
const textures = ['texture1.png', 'texture2.png']
// Define generated emiter config
const emitterConfig = {...}
// Create particles
this.particles = customParticles.create({ textures, emitterConfig })
// Start to play
this.particles.play()
// Add particles to PIXI container
container.addChild(this.particles)
// On complete
this.particles.onComplete = () => {
//...
}
// Define array of new textures
const newTextures = ['texture3.png', 'texture4.png']
// Change textures
this.particles.setTextures(newTextures)