Class: ThirdRoom
ThirdRoom.ThirdRoom
Table of contents
Constructors
Accessors
Methods
Constructors
constructor
• new ThirdRoom()
Accessors
actionBar
• get
actionBar(): ActionBar
Returns the ActionBar object.
Returns
Defined in
Methods
enableMatrixMaterial
▸ enableMatrixMaterial(enabled
): undefined
Enables or disables the use of the custom Matrix-style material on the world.
Note that this is not a standard function and could be removed or disabled in the future.
Parameters
Name | Type | Description |
---|---|---|
enabled | boolean | Whether to enable or disable Matrix materials. |
Returns
undefined
Defined in
getAudioDataSize
▸ getAudioDataSize(): number
Gets the size of the local audio input source's audio data buffer. Similar to the WebAudio AnalyserNode.frequencyBinCount
Returns
number
- The size of the audio data buffer.
Defined in
getAudioFrequencyData
▸ getAudioFrequencyData(data
): number
Gets the local audio input source's frequency data and fills the provided Uint8Array. The data array must be at least the size returned by getAudioDataSize. Similar to the WebAudio AnalyserNode.getByteFrequencyData
Parameters
Name | Type | Description |
---|---|---|
data | Float32Array | The array to store the audio frequency data. |
Returns
number
- The number of elements filled in the data array.
Defined in
getAudioTimeData
▸ getAudioTimeData(data
): number
Gets the local audio input source's time data and fills the provided Uint8Array. The data array must be at least the size returned by getAudioDataSize. Similar to the WebAudio AnalyserNode.getByteTimeDomainData
Parameters
Name | Type | Description |
---|---|---|
data | Float32Array | The array to store the audio time data. |
Returns
number
- The number of elements filled in the data array.
Defined in
inAR
▸ inAR(): boolean
Determines if the local user is currently in an Augmented Reality (AR) environment. Checks to see if the local user is in immersive AR mode and if the world supports AR.
Returns
boolean
- True if the script is running in an AR environment, false otherwise.