party-js
Version:
A JavaScript library to brighten up your user's site experience with visual effects!
15 lines (14 loc) • 685 B
TypeScript
import { Vector } from "../components";
/**
* 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.
*
* @param rotation The euler rotation angles (in degrees) to calculate the normal for.
*/
export declare function rotationToNormal(rotation: Vector): Vector;