PositionalAudio

THREE.PositionalAudio
class PositionalAudio(listener: AudioListener) extends Audio

Create a positional audio object. This uses the Web Audio API's PannerNode to create 3D spatial audio that changes based on the position of the listener and the audio source.

Attributes

Graph
Supertypes
class Audio
class Object
trait Any
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def getDistanceModel(): String

Get the distance model for this positional audio.

Get the distance model for this positional audio.

Attributes

def getMaxDistance(): Double

Get the max distance for this positional audio.

Get the max distance for this positional audio.

Attributes

def getRefDistance(): Double

Get the reference distance for this positional audio.

Get the reference distance for this positional audio.

Attributes

def getRolloffFactor(): Double

Get the rolloff factor for this positional audio.

Get the rolloff factor for this positional audio.

Attributes

def setDirectionalCone(coneInnerAngle: Double, coneOuterAngle: Double, coneOuterGain: Double): Unit

Set the directional cone for this positional audio.

Set the directional cone for this positional audio.

Attributes

def setDistanceModel(value: String): Unit

Set the distance model for this positional audio.

Set the distance model for this positional audio.

Attributes

def setMaxDistance(value: Double): Unit

Set the max distance for this positional audio.

Set the max distance for this positional audio.

Attributes

def setRefDistance(value: Double): Unit

Set the reference distance for this positional audio.

Set the reference distance for this positional audio.

Attributes

def setRolloffFactor(value: Double): Unit

Set the rolloff factor for this positional audio.

Set the rolloff factor for this positional audio.

Attributes

Inherited methods

def connect(audioNode: Any): Unit

Connect this audio source to another audio node.

Connect this audio source to another audio node.

Attributes

Inherited from:
Audio
def disconnect(): Unit

Disconnect this audio source from another audio node.

Disconnect this audio source from another audio node.

Attributes

Inherited from:
Audio
def getFilter(): Any

Get the filter for this audio source.

Get the filter for this audio source.

Attributes

Inherited from:
Audio
def getFilters(): Array[Any]

Get the filters for this audio source.

Get the filters for this audio source.

Attributes

Inherited from:
Audio
def getLoop(): Boolean

Get the loop property for this audio source.

Get the loop property for this audio source.

Attributes

Inherited from:
Audio
def getOutput(): Any

Get the output for this audio source.

Get the output for this audio source.

Attributes

Inherited from:
Audio
def getVolume(): Double

Get the volume for this audio source.

Get the volume for this audio source.

Attributes

Inherited from:
Audio
def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def pause(): Unit

Pause the audio playback.

Pause the audio playback.

Attributes

Inherited from:
Audio
def play(delay: Double): Unit

Start playing the audio.

Start playing the audio.

Attributes

Inherited from:
Audio
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def setBuffer(audioBuffer: AudioBuffer): Unit

Set the audio buffer for this audio source.

Set the audio buffer for this audio source.

Attributes

Inherited from:
Audio
def setFilter(filter: Any): Unit

Set the filter for this audio source.

Set the filter for this audio source.

Attributes

Inherited from:
Audio
def setFilters(value: Array[Any]): Unit

Set the filters for this audio source.

Set the filters for this audio source.

Attributes

Inherited from:
Audio
def setLoop(value: Boolean): Unit

Set the loop property for this audio source.

Set the loop property for this audio source.

Attributes

Inherited from:
Audio
def setPlaybackRate(value: Double): Unit

Set the playback rate for this audio source.

Set the playback rate for this audio source.

Attributes

Inherited from:
Audio
def setVolume(value: Double): Unit

Set the volume for this audio source.

Set the volume for this audio source.

Attributes

Inherited from:
Audio
def stop(): Unit

Stop the audio playback.

Stop the audio playback.

Attributes

Inherited from:
Audio
def toLocaleString(): String

Attributes

Inherited from:
Object
def updateMatrixWorld(force: Boolean): Unit

Update the matrix world for this audio source.

Update the matrix world for this audio source.

Attributes

Inherited from:
Audio
def valueOf(): Any

Attributes

Inherited from:
Object

Concrete fields

var panner: Any

The panner node for this positional audio.

The panner node for this positional audio.

Attributes

Inherited fields

The audio buffer for this audio source.

The audio buffer for this audio source.

Attributes

Inherited from:
Audio
var context: Any

The audio context for this audio source.

The audio context for this audio source.

Attributes

Inherited from:
Audio
var currentTime: Double

The current time of the audio playback.

The current time of the audio playback.

Attributes

Inherited from:
Audio
var gain: Any

The gain node for this audio source.

The gain node for this audio source.

Attributes

Inherited from:
Audio
var hasPlaybackControl: Boolean

Whether the audio has loaded.

Whether the audio has loaded.

Attributes

Inherited from:
Audio
var isPlaying: Boolean

Whether the audio is currently playing.

Whether the audio is currently playing.

Attributes

Inherited from:
Audio
var playbackRate: Double

The playback rate for this audio.

The playback rate for this audio.

Attributes

Inherited from:
Audio
var source: Any

The source node for this audio.

The source node for this audio.

Attributes

Inherited from:
Audio
var sourceType: String

The type of source for this audio.

The type of source for this audio.

Attributes

Inherited from:
Audio