Lights controller is a global object accessible via OccViewer.lights, responsible for managing the scene lighting properties.

interface LightsController {
    addLight(theLightParams: WasmLightParams, theToUpdate: boolean): boolean;
    getLights(): WasmLightParams[];
    removeLight(theName: string, theToUpdate: boolean): boolean;
    updateLight(theLightParams: WasmLightParams, theToUpdate: boolean): boolean;
}

Methods

  • Add light

    Parameters

    • theLightParams: WasmLightParams

      parameters of light to add

    • theToUpdate: boolean

      viewer update flag

    Returns boolean

    status of operation

  • Remove light

    Parameters

    • theName: string

      name of light

    • theToUpdate: boolean

      viewer update flag

    Returns boolean

    status of operation

  • Update light

    Parameters

    • theLightParams: WasmLightParams

      parameters of light

    • theToUpdate: boolean

      viewer update flag

    Returns boolean

    status of operation