Module: util
#
Classes#
Variables#
despawningRules• Const
despawningRules: Object
Contains a set of pre-defined particle despawning rules.
#
Type declarationName | Type |
---|---|
bounds | (particle : Particle ) => boolean |
lifetime | (particle : Particle ) => boolean |
#
Defined in#
Functions#
overrideDefaultsâ–¸ overrideDefaults<T
>(defaults
, overrides?
): T
Replaces the supplied defaults with the properties specified in the overrides. This returns a new object.
#
Type parametersName |
---|
T |
#
ParametersName | Type |
---|---|
defaults | T |
overrides? | Partial <T > |
#
ReturnsT
#
Defined in#
rotationToNormalâ–¸ rotationToNormal(rotation
): Vector
Converts the specified euler rotation (in degrees) into the corresponding normal vector.
remarks
The normal is calculated by placing a (figurative) plane in a coordinate-system's
origin, and rotating it by the specified angles. Note that the z-component of the
rotation is irrelevant for the normal and can be ignored. Then, two vectors
describing the orientation of the plane are calculated. Their cross product
denotes the normal vector.
#
ParametersName | Type | Description |
---|---|---|
rotation | Vector | The euler rotation angles (in degrees) to calculate the normal for. |