Skip to content

SunState beta ​

Interface of @v12-engine/render

ts
export interface SunState

The sun: its light and its shadows, written in place by the game and read each frame

Members ​

colour ​

ts
colour: Vec3;

Its light's colour, as bright as it is

direction ​

ts
direction: Vec3;

The way its light travels

lambda ​

ts
lambda: number;

0 an even split of that distance into the cascades, 1 a logarithmic one

shadowDistance ​

ts
shadowDistance: number;

How far from the camera shadows are drawn

shadows ​

ts
shadows: boolean;

Whether it throws shadows: none, no cascade drawn