Skip to content
On this page

Class: ThirdRoom

ThirdRoom.ThirdRoom

Table of contents

Constructors

Accessors

Methods

Constructors

constructor

new ThirdRoom()

Accessors

actionBar

get actionBar(): ActionBar

Returns the ActionBar object.

Returns

ActionBar

Defined in

websg.d.ts:2756

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

NameTypeDescription
enabledbooleanWhether to enable or disable Matrix materials.

Returns

undefined

Defined in

websg.d.ts:2719


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

websg.d.ts:2726


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

NameTypeDescription
dataFloat32ArrayThe array to store the audio frequency data.

Returns

number

  • The number of elements filled in the data array.

Defined in

websg.d.ts:2744


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

NameTypeDescription
dataFloat32ArrayThe array to store the audio time data.

Returns

number

  • The number of elements filled in the data array.

Defined in

websg.d.ts:2735


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.

Defined in

websg.d.ts:2751