Interface AudioAnalysisComponentDefinitionExtended

Hierarchy

Properties

componentId: number
componentName: string
componentType: LastWriteWinElementSet

Methods

  • Creates an AudioAnalysis component for the given entity.

    If a component already exists on the entity, this call fails (does not replace).

    Parameters

    • entity: Entity

      The entity to attach the component to.

    • Optional mode: PBAudioAnalysisMode

      Analysis mode. Defaults to PBAudioAnalysisMode.MODE_LOGARITHMIC.

    • Optional amplitudeGain: number

      Optional amplitude gain multiplier.

    • Optional bandsGain: number

      Optional gain multiplier applied to all frequency bands.

    Returns void

  • Creates the AudioAnalysis component if missing, or replaces the existing one.

    Parameters

    • entity: Entity

      The target entity.

    • Optional mode: PBAudioAnalysisMode

      Analysis mode. Defaults to PBAudioAnalysisMode.MODE_LOGARITHMIC.

    • Optional amplitudeGain: number

      Optional amplitude gain multiplier.

    • Optional bandsGain: number

      Optional gain multiplier applied to the frequency bands.

    Returns void

  • Marks the entity as deleted and signals it cannot be used ever again. It must clear the component internal state, produces a synchronization message to remove the component from the entity.

    Parameters

    • entity: Entity

      Entity ID that was deleted.

    • markAsDirty: boolean

    Returns void

  • Reads the component data of entity into the provided out view.

    Throws

    Error if the entity does not have an AudioAnalysis component.

    Parameters

    • entity: Entity

      The entity whose AudioAnalysis data will be read.

    • out: AudioAnalysisView

      An existing AudioAnalysisView to populate with the latest values.

    Returns void

  • Attempts to read the component data of entity into the provided out view.

    Returns

    true if the component exists and data was written into out, false if the entity does not have an AudioAnalysis component.

    Parameters

    • entity: Entity

      The entity whose AudioAnalysis data will be read.

    • out: AudioAnalysisView

      An existing AudioAnalysisView to populate.

    Returns boolean