import { Light, DebugDrawPolygon } from "./Light"; import type { RayHandler } from "../RayHandler"; import { Rectangle, Matrix3, Vector2, XY } from "../math"; import { RGBA } from "../utils"; /** * A light whose ray starting points are evenly distributed along a chain of * vertices * *
Extends {@link Light} * * @author spruce */ export declare class ChainLight extends Light { static defaultRayStartOffset: number; rayStartOffset: number; readonly chain: number[]; protected rayDirection: number; protected bodyAngle: number; protected bodyAngleOffset: number; protected body: any; protected readonly segmentAngles: number[]; protected readonly segmentLengths: number[]; protected readonly startX: number[]; protected readonly startY: number[]; protected readonly endX: number[]; protected readonly endY: number[]; protected readonly bodyPosition: Vector2; protected readonly tmpEnd: Vector2; protected readonly tmpStart: Vector2; protected readonly tmpPerp: Vector2; protected readonly tmpVec: Vector2; protected readonly zeroPosition: Matrix3; protected readonly rotateAroundZero: Matrix3; protected readonly restorePosition: Matrix3; protected readonly chainLightBounds: Rectangle; protected readonly rayHandlerBounds: Rectangle; /** * Creates chain light from specified vertices * * @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 distance * distance of light * @param rayDirection * direction of rays *
MIN value capped to 0.1 meter *
Actual recalculations will be done only on {@link #update()} call */ setDistance(dist: number): void; /** Not applicable for this light type */ setDirection(_directionDegree: number): void; /** * Calculates ray positions and angles along chain. This should be called * any time the number or values of elements changes in {@link #chain}. */ updateChain(): void; /** * Applies attached body initial transform to all lights rays */ applyAttachment(): void; protected cull(): boolean; updateBody(): void; protected updateMesh(): void; protected setMesh(): void; /** Internal method for bounding rectangle recalculation */ protected updateBoundingRects(): void; } //# sourceMappingURL=ChainLight.d.ts.map