pixi.js
    Preparing search index...

    Interface ParticleContainerOptions

    Options for configuring a ParticleContainer. Controls how particles are rendered, updated, and managed.

    // Create a basic particle container
    const container = new ParticleContainer({
    texture: Texture.from('particle.png'),
    particles: [
    new Particle(texture),
    new Particle(texture)
    ],
    dynamicProperties: {
    position: true, // Update positions each frame
    rotation: true // Update rotations each frame
    }
    });
    interface ParticleContainerOptions {
        dynamicProperties?: ParticleProperties & Record<string, boolean>;
        particles?: IParticle[];
        roundPixels?: boolean;
        shader?: Shader;
        texture?: Texture;
    }

    Hierarchy

    Index

    Properties

    dynamicProperties?: ParticleProperties & Record<string, boolean>

    Specifies which particle properties should update each frame. Set properties to true for per-frame updates, false for static values.

    { position: true, rotation: false, vertex: false, uvs: false, color: false }
    
    particles?: IParticle[]

    Initial array of particles to add to the container. All particles must share the same base texture.

    roundPixels?: boolean

    When true, particle positions are rounded to the nearest pixel. Helps achieve crisp rendering at the cost of smooth motion.

    false
    
    shader?: Shader

    Custom shader for rendering particles. Allows for custom visual effects.

    texture?: Texture

    The texture used for all particles in this container. If not provided, uses the texture of the first particle added.