import { LineSegments2 } from 'three/examples/jsm/lines/LineSegments2'; import { ColorRepresentation, EdgesGeometry, LineSegments, Mesh, Vector3, WireframeGeometry } from 'three'; import { ScreenLinesMaterial } from './ScreenLinesMaterial'; /** * Screen lines material presets. */ export declare namespace ScreenLinesMaterials { /** * Default material preset for world size units lines. */ const defaultWorldUnitsMaterial: ScreenLinesMaterial; /** * Default material preset for screen size units lines. */ const defaultScreenUnitsMaterial: ScreenLinesMaterial; } /** * Represents one or more line segments that can have different color, width, screen scaling. Has high rendering performance. */ export declare class ScreenLines extends LineSegments2 { readonly isScreendLines = true; type: string; private readonly innerGeometry; /** Maximum line segments count. Set when creating an instance of the class. */ readonly maxCount: number; /** * @param maxCount - Maximum line segments count. Can`t be changed after creation. * @param material - Line Material. If not specified, the default material will be used. */ constructor(maxCount?: number, material?: ScreenLinesMaterial | undefined); /** * Set visible line segments count. * @param count - Lines count. */ setLinesCount(count: number): void; /** * Get visible line segments count. */ getLinesCount(): number; /** * Bach set lines positions. * @param array - Line positions array by start and end coordinate components [startX,startY,startZ,endX,endY,endZ]. */ setPositions(array: Float32Array | ArrayLike): this; /** * Bach set line segments colors. * @param array - Line colors array by start and end color components [startR,startG,startB,endR,endG,endB]. */ setColors(array: Float32Array | ArrayLike): this; /** * Fills the memory array for the line segments declared at creation with the default parameters (color). * @param color - Default line segment points color. */ fill(color?: ColorRepresentation): this; /** * Writes the new line segments data to the lines memory array. * @param startPosition - Line start coordinates. * @param endPosition - Line start coordinates. * @param startColor - Line start color. * @param endColor - Line start color. */ push(startPosition: Vector3 | number[], endPosition: Vector3 | number[], startColor?: ColorRepresentation | undefined, endColor?: ColorRepresentation | undefined): this; /** * Set Line segment positions at index. * @param index - Line index. * @param startPosition - Start line position. * @param endPosition - Start line position. */ setPositionAtIndex(index: number, startPosition: Vector3 | number[], endPosition: Vector3 | number[]): this; /** * Set Line segment colors at index. * @param index - Line index. * @param startColor - Start line color. * @param endColor - Start line color. */ setColorAtIndex(index: number, startColor: ColorRepresentation, endColor: ColorRepresentation): this; /** * Writes wireframe data to a lines memory array from wireframe geometry. * @param geometry - Geometry object. */ fromWireframeGeometry(geometry: WireframeGeometry): this; /** * Writes edges data to a lines memory array from wireframe geometry. * @param geometry - Geometry object. */ fromEdgesGeometry(geometry: EdgesGeometry): this; /** * Writes mesh data to a lines memory array from wireframe geometry. * @param mesh - Mesh object. */ fromMesh(mesh: Mesh): this; /** * Writes line segments data to a lines memory array from line segments object. * @param lineSegments - Line segments object. */ fromLineSegments(lineSegments: LineSegments): this; private initGeometry; }