addon/classes/layered-sound.js:17
LayeredSound
Allows multiple instances of anything that uses Playable to be loaded up and played at the same time.
Property Summary
| Public Properties | |
|---|---|
| public |
Acts as a register for different types of sounds. Anything that uses Playable can be added to this register. If not set on instantiation, set to |
Method Summary
| Public Methods | |
|---|---|
| public |
play( )
Maps through objects in |
| public |
playAt(time)
Maps through objects in |
| public |
playFor(seconds)
Maps through objects in |
| public |
playForIn(playIn, stopAfter)
Maps through objects in |
| public |
playIn(seconds)
Maps through objects in |
| Private Methods | |
|---|---|
| private |
_initSounds( )
If |
Public Properties
addon/classes/layered-sound.js:26
public sounds: Array | Sound | Oscillator
Acts as a register for different types of sounds. Anything that uses
Playable can be added to this register.
If not set on instantiation, set to A() via _initSounds.
Public Methods
addon/classes/layered-sound.js:37
public play( )
Maps through objects in sounds and calls play on each
addon/classes/layered-sound.js:47
public playAt(time)
Maps through objects in sounds and calls playAt on each, passing
through the time param to each sound.
Parameters:
| Name | Type | Attribute | Description |
|---|---|---|---|
| time | Number |
|
The time to pass to each object's |
addon/classes/layered-sound.js:73
public playFor(seconds)
Maps through objects in sounds and calls playFor on each, passing
through the seconds param to each sound.
Parameters:
| Name | Type | Attribute | Description |
|---|---|---|---|
| seconds | Number |
|
The seconds to pass to each object's |
addon/classes/layered-sound.js:86
public playForIn(playIn, stopAfter)
Maps through objects in sounds and calls playInAndStopAfter on each,
passing through the playIn and stopAfter params to each sound.
addon/classes/layered-sound.js:60
public playIn(seconds)
Maps through objects in sounds and calls playIn on each, passing
through the seconds param to each sound.
Parameters:
| Name | Type | Attribute | Description |
|---|---|---|---|
| seconds | Number |
|
The seconds to pass to each object's |
Private Methods
addon/classes/layered-sound.js:103
private _initSounds( )
If sounds is null on instantiation, sets it to A()