Have ideas to improve npm?Join in the discussion! »

    custom-pixi-particles
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.5 • Public • Published

    CustomPIXIParticles by @lukasz-okuniewicz

    Custom 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)

    Install

    npm i custom-pixi-particles

    DownloadsWeekly Downloads

    7

    Version

    2.0.5

    License

    MIT

    Unpacked Size

    194 kB

    Total Files

    120

    Last publish

    Collaborators

    • avatar