import type { SCRTSceneWorld, TSciChart3D } from "../types/TSciChart3D"; import { Vector3 } from "./Vector3"; /** * Defines how the main scene light is positioned for a 3D chart. */ export declare enum EMainLightMode { /** * The main light direction follows the camera forward direction. */ CameraForward = "CameraForward", /** * The main light uses a fixed direction in global 3D world space. */ GlobalSpace = "GlobalSpace", /** * The main light is disabled. */ None = "None" } /** * Optional parameters passed to a {@link SceneLightingController} at construct time. */ export interface ISceneLightingControllerOptions { /** * Gets or sets how the main scene light direction is calculated. * * Default {@link EMainLightMode.CameraForward} */ lightMode?: EMainLightMode; /** * Gets or sets the main light direction in world space. * * Only used when {@link lightMode} is {@link EMainLightMode.GlobalSpace}. * Default `new Vector3(-0.25, 0.5, -0.25)` */ lightDirection?: Vector3 | { x: number; y: number; z: number; }; /** * Gets or sets the ambient light intensity. 0 is fully dark, 1 is the default ambient. * * @note The value can be greater than 1 to achieve a more brightly lit scene, but use with caution as this can reduce contrast. */ ambientLight?: number; } /** * Defines the interface to a {@link SceneLightingController}, which controls the main 3D scene light. */ export interface ISceneLightingController { /** * Gets or sets how the main scene light direction is calculated. */ lightMode: EMainLightMode; /** * Gets the configured main light direction in world space. */ readonly lightDirection: Vector3; /** * Gets or sets the ambient light intensity. */ ambientLight: number; /** * Sets the configured main light direction in world space. */ setLightDirection(lightDirection: Vector3): void; /** * Convert the object to a definition that can be serialized to JSON, or used directly with the builder api. */ toJSON(): ISceneLightingControllerOptions; } /** * The {@link SceneLightingController} provides control over the main 3D scene light. */ export declare class SceneLightingController implements ISceneLightingController { private readonly webAssemblyContext; private readonly sceneWorld; private readonly invalidateParentCallback; private lightModeProperty; private lightDirectionProperty; private ambientLightProperty; /** * Creates an instance of {@link SceneLightingController}. * @param webAssemblyContext The {@link TSciChart3D | SciChart 3D WebAssembly Context} * @param sceneWorld The native 3D scene world to update * @param invalidateParentCallback Callback to redraw the parent chart * @param options Optional lighting options */ constructor(webAssemblyContext: TSciChart3D, sceneWorld: SCRTSceneWorld, invalidateParentCallback: () => void, options?: ISceneLightingControllerOptions); /** * @inheritDoc */ get lightMode(): EMainLightMode; /** * @inheritDoc */ set lightMode(value: EMainLightMode); /** * @inheritDoc */ get lightDirection(): Vector3; /** * @inheritDoc */ setLightDirection(lightDirection: Vector3): void; /** * @inheritDoc */ get ambientLight(): number; /** * @inheritDoc */ set ambientLight(value: number); /** * Applies lighting options. * @param options Optional lighting options */ applyOptions(options?: ISceneLightingControllerOptions): void; /** * @inheritDoc */ toJSON(): ISceneLightingControllerOptions; private syncAmbientToNative; private syncLightToNative; private static normalizeLightValue; } /** @ignore */ export declare const getMainLightModeFromNative: (mode: number) => EMainLightMode;