import { Light, DebugDrawPolygon } from "./Light"; import type { RayHandler } from "../RayHandler"; import { RGBA } from "../utils"; import { XY, Vector2 } from "../math"; /** * Light which source is at infinite distance * *
Extends {@link Light} * * @author kalle_h */ export declare class DirectionalLight extends Light { protected readonly start: Vector2[]; protected readonly end: Vector2[]; protected sin: number; protected cos: number; /** The body that could be set as ignored by this light type */ protected body: any; /** * Creates directional light which source is at infinite distance, * direction and intensity is same everywhere * *
-90 direction is straight from up * * @param rayHandler * not {@code null} instance of RayHandler * @param rays * number of rays - more rays make light to look more realistic * but will decrease performance, can't be less than MIN_RAYS * @param color * color, set to {@code null} to use the default color * @param directionDegree * direction in degrees */ constructor(rayHandler: RayHandler, rays: number, color: RGBA, directionDegree: number); setDirection(direction: number): void; update(): void; updateMesh(): void; protected setMesh(): void; render(): void; /** * Draws a polygon, using ray start and end points as vertices */ debugRender(drawPolygon: DebugDrawPolygon): void; contains(x: number, y: number): boolean; /** Not applicable for this light type */ attachToBody(_body: any): void; /** Not applicable for this light type */ setPosition(_x: number, _y: number): void; /** Returns the ignored by this light body or {@code null} if not set */ getBody(): any; /** Not applicable for this light type *
Always return {@code 0} */ getX(): number; /** Not applicable for this light type *
Always return {@code 0} */ getY(): number; /** Not applicable for this light type */ setPositionV(_position: XY): void; /** Not applicable for this light type */ setDistance(_dist: number): void; /** Not applicable for this light type */ setIgnoreAttachedBody(_flag: boolean): void; /** Not applicable for this light type *
Always return {@code false} */ getIgnoreAttachedBody(): boolean; /** Sets the body to be ignored by this light, pass {@code null} to disable it */ setIgnoreBody(body: any): void; } //# sourceMappingURL=DirectionalLight.d.ts.map