import { Buffer, Device, type RenderPass } from '@luma.gl/core'; import { type NumericArray } from '@math.gl/core'; import type { DirectionalLight, Light, PointLight, SpotLight } from '@luma.gl/shadertools'; import { Model, type ModelProps } from "../model/model.js"; import type { Geometry } from "../geometry/geometry.js"; export type LightModelBounds = [[number, number, number], [number, number, number]]; export type BaseLightModelProps = Omit & { lights: ReadonlyArray; viewMatrix: NumericArray; projectionMatrix: NumericArray; bounds?: LightModelBounds; markerScale?: number; }; export type PointLightModelProps = BaseLightModelProps & { pointLightRadius?: number; }; export type SpotLightModelProps = BaseLightModelProps & { spotLightLength?: number; }; export type DirectionalLightModelProps = BaseLightModelProps & { directionalLightLength?: number; }; export type LightMarkerInstanceData = { instanceCount: number; instancePositions: Float32Array; instanceDirections: Float32Array; instanceScales: Float32Array; instanceColors: Float32Array; }; type ManagedInstanceBuffers = Record<'instancePosition' | 'instanceDirection' | 'instanceScale' | 'instanceColor', Buffer>; type LightMarkerAnchorMode = 'centered' | 'apex'; type LightMarkerModelOptions = { anchorMode: LightMarkerAnchorMode; buildInstanceData: (props: PropsT) => LightMarkerInstanceData; geometry: Geometry; idPrefix: string; sizePropNames: Array; }; export declare abstract class BaseLightModel extends Model { protected lightModelProps: PropsT; protected _instanceData: LightMarkerInstanceData; protected _managedBuffers: ManagedInstanceBuffers; private readonly buildInstanceData; private readonly sizePropNames; constructor(device: Device, props: PropsT, options: LightMarkerModelOptions); destroy(): void; draw(renderPass: RenderPass): boolean; setProps(props: Partial): void; private rebuildInstanceData; } export declare function buildPointLightInstanceData(props: PointLightModelProps): LightMarkerInstanceData; export declare function buildSpotLightInstanceData(props: SpotLightModelProps): LightMarkerInstanceData; export declare function buildDirectionalLightInstanceData(props: DirectionalLightModelProps): LightMarkerInstanceData; export declare function getPointLights(lights: ReadonlyArray): PointLight[]; export declare function getSpotLights(lights: ReadonlyArray): SpotLight[]; export declare function getDirectionalLights(lights: ReadonlyArray): DirectionalLight[]; export declare function getLightMarkerContext(props: BaseLightModelProps): { bounds: LightModelBounds; markerScale: number; sceneCenter: [number, number, number]; sceneScale: number; }; export declare function getDisplayColor(light: { color?: Readonly<[number, number, number]>; intensity?: number; }): [number, number, number, number]; export declare function normalizeDirection(direction?: Readonly<[number, number, number]>): [number, number, number]; export {}; //# sourceMappingURL=light-model-utils.d.ts.map