Skip to content

@modoki/engine / index / keyDirFromEuler

Function: keyDirFromEuler()

keyDirFromEuler(rx, ry): [number, number, number]

Direction TOWARD a directional/spot light from its world Euler, i.e. the negation of the light's -Z forward that syncLights aims at its target. forward = (-sin(ry)cos(rx), sin(rx), -cos(ry)cos(rx)); toward-light = -forward. Already unit length (it's a rotation of a unit axis).

Parameters

rx

number

ry

number

Returns

[number, number, number]

Built with Modoki.