Creates a new instance of SphericalHarmonics3.
An array holding the (9) SH coefficients. A single coefficient is represented as an instance of Vector3.
Adds the given SH to this instance.
The SH to add.
A convenience method for performing .add() and .scale() at once.
The SH to add.
Returns a new instance of SphericalHarmonics3 with equal coefficients.
Copies the given SH to this instance.
The SH to copy.
The SH to compare with.
Returns true if the given SH and this instance have equal coefficients.
Sets the coefficients of this instance from the given array.
The array holding the numbers of the SH coefficients.
The array offset.
Linear interpolates between the given SH and this instance by the given alpha factor.
The SH to interpolate with.
Scales this SH by the given scale factor.
Sets the given SH coefficients to this instance.
The target array.
The array offset.
Returns an array with the coefficients, or copies them into the provided array. The coefficients are represented as numbers.
Returns an array with the values of this spherical harmonics, or copies them into the provided array-like.
array-like to store the spherical harmonics to.
(optional) optional offset into the array-like.
The provided array-like.
Sets all SH coefficients to 0.
Generated using TypeDoc
Represents a third-order spherical harmonics (SH). Light probes use this class to encode lighting information. See the ngx3js docs page for details.