import { UniformGroup } from 'pixi.js'; import type { Entity, QueriesObject, QueryResults } from '../../../core'; import type { SystemInterface } from '../../../core/SystemInterface'; import { AmbientLight } from '../../lighting/lights'; import type { LightEntity } from '../../lighting/lights/LightEntity'; import type { Scene3D } from '../Scene3D'; import type { ViewSubSystemOptions } from './View3DSystem'; export interface LightData { lights: LightEntity[]; sig: string; } /** * light system is responsible for building taking all the lights in the world. * As lights are added, it will manage them and automatically update the uniforms required to run them * * PRO Tip - its best to set your lights once and then not change how many there are in the scene. * changing the number of lights / type of lights on the fly invalidates the shaders and could cause a jank moments * due to new shaders needing to be recompiled. * * This really would only become a problem if we needed to make a large open world! For now, its best to add the maximum number of lights to the scene * at start up and disable / enable them as required. */ export declare class LightSystem implements SystemInterface { static NAME: string; static Queries: QueriesObject; /** * A single ambient light. Always present in the scene. */ ambientLight: AmbientLight; /** * increments if the lights have changed within the scene (for example one was added / removed) */ lightsDirtyTick: number; /** * a uniform object that has all the light uniforms. This is attached to the materials uniforms * at render time. */ lightUniforms: UniformGroup; /** * if this is true, shaders will not be recalculated after the first time. * this means any new lights added / removed from the scene will be ignored. */ freezeLights: boolean; /** * a unique signature to the current light setup. Can be used to quickly compare if the lights have changed */ lightSig: string; scene: Scene3D; queries: QueryResults; private readonly _uid; private _lightsDirtyTick; constructor(_entity: Entity, options: ViewSubSystemOptions); renderBegin(): void; start(): void; addedToQuery(): void; removedFromQuery(): void; get lights(): LightEntity[]; } //# sourceMappingURL=LightSystem.d.ts.map