Skip to content

Documentation / @ripl/3d / LIGHT_DIRECTION

Variable: LIGHT_DIRECTION

const LIGHT_DIRECTION: object

Defined in: 3d/src/core/constants.ts:6

Pre-normalised light direction vectors for common light positions.

Type Declaration

back

readonly back: [0, 0, 1]

Light shining from behind the scene.

bottom

readonly bottom: [0, 1, 0]

Light shining straight up from below.

bottomLeft

readonly bottomLeft: [-0.707, 0.707, 0]

Light shining from the lower-left.

bottomRight

readonly bottomRight: [0.707, 0.707, 0]

Light shining from the lower-right.

front

readonly front: [0, 0, -1]

Light shining from the front (towards the viewer).

left

readonly left: [-1, 0, 0]

Light shining from the left.

readonly right: [1, 0, 0]

Light shining from the right.

top

readonly top: [0, -1, 0]

Light shining straight down from above.

topBack

readonly topBack: [0, -0.707, 0.707]

Light shining from above and behind.

topFront

readonly topFront: [0, -0.707, -0.707]

Light shining from above and in front.

topLeft

readonly topLeft: [-0.707, -0.707, 0]

Light shining from the upper-left.

topLeftBehind

readonly topLeftBehind: [-0.577, -0.577, 0.577]

Light shining from the upper-left and behind.

topLeftFront

readonly topLeftFront: [-0.577, -0.577, -0.577]

Light shining from the upper-left and in front.

topRight

readonly topRight: [0.707, -0.707, 0]

Light shining from the upper-right.

topRightBehind

readonly topRightBehind: [0.577, -0.577, 0.577]

Light shining from the upper-right and behind.

topRightFront

readonly topRightFront: [0.577, -0.577, -0.577]

Light shining from the upper-right and in front.