A specialized subclass of the BaseEffectSource which describes a point-based source of sound.

Mixes

Hierarchy (view full)

Constructors

Properties

object: object

Some other object which is responsible for this source.

sourceId: string

The source id linked to this effect source.

data: any = ...

The data of this source.

shape: any

The geometric shape of the effect source which is generated later.

suppression: Record<string, boolean> = {}

Records of suppression strings with a boolean value. If any of this record is true, the source is suppressed.

_flags: Record<string, number | boolean> = {}

A collection of boolean flags which control rendering and refresh behavior for the source.

sourceType: string = "sound"
effectsCollection: string

The target collection into the effects canvas group.

Abstract

defaultData: SourceData = ...

Effect source default data.

Accessors

  • get effectsCollection(): any
  • Returns any

  • get x(): number
  • The x-coordinate of the point source origin.

    Returns number

  • get y(): number
  • The y-coordinate of the point source origin.

    Returns number

  • get elevation(): number
  • The elevation bound to this source.

    Returns number

  • get updateId(): number
  • Returns the update ID associated with this source. The update ID is increased whenever the shape of the source changes.

    Returns number

  • get active(): boolean
  • Is this source currently active? A source is active if it is attached to an effect collection and is not disabled or suppressed.

    Returns boolean

  • get attached(): boolean
  • Is this source attached to an effect collection?

    Returns boolean

  • get suppressed(): boolean
  • Is this source temporarily suppressed?

    Returns boolean

Methods

  • Returns any

    Inherit Doc

  • Get the effective volume at which an AmbientSound source should be played for a certain listener.

    Parameters

    • listener: Point
    • Optional options: {
          easing: boolean;
      } = {}
      • easing: boolean

    Returns number

  • Initialize and configure the source using provided data.

    Parameters

    • data: Partial<any> = {}

      Provided data for configuration

    • options: {
          behaviors: object;
          reset: boolean;
      } = {}

      Additional options which modify source initialization

      • behaviors: object

        An object containing optional behaviors to apply.

      • reset: boolean

        Should source data be reset to default values before applying changes?

    Returns BaseEffectSource<any, any>

    The initialized source

  • Subclass specific data initialization steps.

    Parameters

    • data: Partial<any>

      Provided data for configuration

    Returns void

    Abstract

  • Refresh the state and uniforms of the source. Only active sources are refreshed.

    Returns void

  • Steps that must be performed when the source is destroyed.

    Returns void

  • Add this BaseEffectSource instance to the active collection.

    Returns void

  • Remove this BaseEffectSource instance from the active collection.

    Returns void

  • Protected

    Create the polygon shape (or shapes) for this source using configured data.

    Returns void

    Abstract

  • Protected

    Subclass specific configuration steps. Occurs after data initialization and shape computation. Only called if the source is attached and not disabled.

    Parameters

    • changes: Partial<any>

      Changes to the source data which were applied

    Returns void