Skip to content
pixi-silk
GitHub repository
Function

lightVector

import { lightVector } from 'pixi-silk/glass';
function lightVector(angle: number): [number, number];

Unit vector towards the light for an angle in radians, in screen space with y pointing down.

Parameters#

ParameterType
anglenumber

Returns#

[number, number]