API Referenceatlasatlas/graphics
DirectionalLight
Light with a direction and no positional origin, suitable for sunlight.
Module: atlas/graphics
Light with a direction and no positional origin, suitable for sunlight.
Declaration
export class DirectionalLight { ... }Constructors
Creates a new directional light.
constructor(
direction?: Magnitude3d,
color?: Color,
shineColor?: Color,
intensity?: number,
);Properties
direction
The normalized direction vector.
direction: Magnitude3d;color
The RGBA color.
color: Color;shineColor
The shine color.
shineColor: Color;intensity
The effect intensity.
intensity: number;Methods
setColor
Updates the color used by this object.
setColor(color: Color): void;castShadows
Enables shadow casting with the requested shadow-map resolution.
castShadows(resolution: number): void;