A collection of useful constants used throughout the library. These can be overridden at runtime.
- Source:
Members
(static) eulerToQuaternion :String
Default rotation sequence when converting Euler angles to quaternions. Valid values include:
- XYZ
- XZY
- YXZ
- YZX
- ZXY
- ZYX
Type:
- String
- Source:
(static) gravity :Number
The gravitational constant.
Type:
- Number
- Source:
(static) maxFrequency :Number
Upper bound of perceptible frequencies, in Hertz.
Type:
- Number
- Source:
(static) maxSafeFloat :Number
The largest float before precision loss becomes problematic.
This value is derived from Number.MAX_SAFE_INTEGER / (2 ** 10)
to deliver about three decimal places of precision, which is suitable for most purposes.
Type:
- Number
- Source:
(static) midiReferenceFrequency :Number
Frequency of the MIDI reference note, in Hertz.
Type:
- Number
- Source:
(static) midiReferenceNote :Number
Reference note number used when converting MIDI notes to frequencies.
Type:
- Number
- Source:
(static) minFrequency :Number
Lower bound of perceptible frequencies, in Hertz.
Type:
- Number
- Source:
(static) speedOfSound :Number
The speed of sound, in meters per second.
Type:
- Number
- Source:
(static) tau :Number
The circle constant, i.e. 2π.
Type:
- Number
- Source:
(static) unit2 :Number
Length that satisfies x=y
for a 2D unit circle.
Type:
- Number
- Source:
(static) unit3 :Number
Length that satisfies x=y=z
for a 3D unit sphere.
Type:
- Number
- Source:
(static) unit4 :Number
Length that satisfies w=x=y=z
for a 4D unit hypersphere.
Type:
- Number
- Source:
(static) zero :Number
Close enough to zero for most calculations that can't use zero, like ramping AudioParam
s exponentially to zero.
Type:
- Number
- Source:
(static) zeroDb :Number
Value in decibels that, for most purposes, is perceptibly silent.
Type:
- Number
- Source:
(static) zeroGain :Number
Value in gain that, for most purposes, is perceptibly silent.
Type:
- Number
- Source:
(static) zeroTime :Number
Length of time that, for most purposes, is perceptibly instantaneous.
Type:
- Number
- Source: