Represents light source parameters based on corresponding C++ class Graphic3d_CLight defined by OCCT. See also OccViewer.LightsController and OccViewer.lights for managing light sources.

interface WasmLightParams {
    angle: number;
    color: string;
    dir: WasmVector3d;
    intensity: number;
    isEnabled: boolean;
    isHeadlight: boolean;
    name: string;
    position: WasmVector3d;
    range: number;
    toCastShadows: boolean;
    type: Graphic3d_TypeOfLightSource;
}

Properties

angle: number

Angle of spotlight cone in radians.

color: string

Light source (normalized) base color.

Direction vector of directional light source.

intensity: number

Intensity of light source.

isEnabled: boolean

Light source enabled state.

isHeadlight: boolean

Flag managing headlight mode.

name: string

Light source name.

position: WasmVector3d

3D position vector of positional light source.

range: number

Range limit of positional light source.

toCastShadows: boolean

Flag managing shadow casting from directional light source.

Type of light source.