Atlas Engine
API Referenceatlasatlas/graphics

Light

Point light with position, range, diffuse color, and specular shine color.

Module: atlas/graphics

Point light with position, range, diffuse color, and specular shine color.

Declaration

export class Light { ... }

Constructors

Creates a new light.

constructor(
            position?: Position3d,
            color?: Color,
            distance?: number,
            shineColor?: Color,
            intensity?: number,
        );

Properties

position

The position in world space.

position: Position3d;

color

The RGBA color.

color: Color;

shineColor

The shine color.

shineColor: Color;

intensity

The effect intensity.

intensity: number;

distance

The distance.

distance: number;

Methods

setColor

Updates the color used by this object.

setColor(color: Color): void;

createDebugObject

Creates a visual representation of the light for debugging.

createDebugObject(): void;

castShadows

Enables shadow casting with the requested shadow-map resolution.

castShadows(resolution: number): void;

On this page