three-nebula API
    Preparing search index...

    Class Rate

    Calculates the rate of particle emission.

    NOTE This doesn't need to be an initializer, it doesn't have an initialize method, it overrides the base init method and it is only relevent to the Emitter class. It would be better to move this to the Emitter module itself as a standalone class.

    Hierarchy

    • default
      • Rate
    Index
    • Constructs a Rate instance.

      Parameters

      • numPan: number | number[] | Span<number> = DEFAULT_RATE_NUM_PAN

        The number of particles to emit

      • timePan: number | number[] | Span<number> = DEFAULT_RATE_TIME_PAN

        The time between each particle emission

      Returns Rate

    isEnabled: boolean
    nextTime: number
    numPan: Span<number>
    startTime: number
    timePan: Span<number>
    type: string
    • Gets the number of particles to emit.

      Parameters

      • time: number

        Current particle engine time

      Returns number

    • Sets the startTime and nextTime properties.

      Returns void

    • Creates a Rate initializer from JSON.

      Parameters

      • json: RateJSON

        The JSON to construct the instance from.

      Returns Rate

    • Determines if the initializer requires a WebGL API to be provided to its constructor.

      Returns boolean