phaser - v4.0.0-rc.4
    Preparing search index...

    The Particle Bounds Processor.

    Defines a rectangular region, in world space, within which particle movement is restrained.

    Use the properties collideLeft, collideRight, collideTop and collideBottom to control if a particle will rebound off the sides of this boundary, or not.

    This happens when the particles worldPosition x/y coordinate hits the boundary.

    The strength of the rebound is determined by the Particle.bounce property.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • x: number

        The x position (top-left) of the bounds, in world space.

      • y: number

        The y position (top-left) of the bounds, in world space.

      • width: number

        The width of the bounds.

      • height: number

        The height of the bounds.

      • OptionalcollideLeft: boolean

        Whether particles interact with the left edge of the bounds. Default true.

      • OptionalcollideRight: boolean

        Whether particles interact with the right edge of the bounds. Default true.

      • OptionalcollideTop: boolean

        Whether particles interact with the top edge of the bounds. Default true.

      • OptionalcollideBottom: boolean

        Whether particles interact with the bottom edge of the bounds. Default true.

      Returns ParticleBounds

    Properties

    active: boolean

    The active state of the Particle Processor.

    An inactive Particle Processor will be skipped for processing by its parent Emitter.

    bounds: Geom.Rectangle

    A rectangular boundary constraining particle movement. Use the Emitter properties collideLeft, collideRight, collideTop and collideBottom to control if a particle will rebound off the sides of this boundary, or not. This happens when the particles x/y coordinate hits the boundary.

    collideBottom: boolean

    Whether particles interact with the bottom edge of the emitter Phaser.GameObjects.Particles.ParticleBounds#bounds.

    collideLeft: boolean

    Whether particles interact with the left edge of the emitter Phaser.GameObjects.Particles.ParticleEmitter#bounds.

    collideRight: boolean

    Whether particles interact with the right edge of the emitter Phaser.GameObjects.Particles.ParticleBounds#bounds.

    collideTop: boolean

    Whether particles interact with the top edge of the emitter Phaser.GameObjects.Particles.ParticleBounds#bounds.

    A reference to the Particle Emitter that owns this Processor. This is set automatically when the Processor is added to an Emitter and nulled when removed or destroyed.

    x: number

    The x coordinate of the Particle Processor, in world space.

    y: number

    The y coordinate of the Particle Processor, in world space.

    Methods

    • Destroys this Particle Processor by removing all external references.

      This is called automatically when the owning Particle Emitter is destroyed.

      Returns void