import { BufferGeometry, ColorRepresentation, EdgesGeometry, LineSegments, Mesh, Object3D, Raycaster, Vector3, WireframeGeometry } from 'three'; import { ScreenPointsMaterial } from './ScreenPointsMaterial'; /** * Screen points material presets. */ export declare namespace ScreenPointsMaterials { /** * Default material preset for world size units points. */ const defaultWorldUnitsMaterial: ScreenPointsMaterial; /** * Default material preset for screen size units points. */ const defaultScreenUnitsMaterial: ScreenPointsMaterial; } /** * Represents one or more points that can have different color, size, screen scaling. Has high rendering performance. */ export declare class ScreenPoints extends Object3D { isPoints: boolean; type: string; /** Screen points geometry. */ geometry: BufferGeometry; /** Screen points material. */ material: ScreenPointsMaterial; /** Maximum points count. Set when creating an instance of the class. */ readonly maxCount: any; /** * @param maxCount - Maximum points count. Can`t be changed after creation. * @param material - Point Material. If not specified, the default material will be used. */ constructor(maxCount?: number, material?: ScreenPointsMaterial | undefined); /** * Set visible points count. * @param count - Points count. */ setPointsCount(count: number): void; /** * Get visible points count. */ getPointsCount(): number; private initGeometry; /** * Fills the memory array for the points declared at creation with the default parameters [color, opacity, size]. * @param color - Default points color. * @param opacity - Default points opacity. * @param size - Default points size. */ fill(color?: ColorRepresentation, opacity?: number, size?: number): this; /** * Writes the new point data to the point memory array. * @param position - Point coordinates. * @param color - Point color. * @param opacity - Point opacity. * @param size - Point size. */ push(position: Vector3 | number[], color: ColorRepresentation | undefined, opacity?: number | undefined, size?: number | undefined): this; /** * Set point position at index. * @param index - Point index. * @param position - Point position. */ setPositionAtIndex(index: number, position: Vector3 | number[]): this; /** * Set point color at index. * @param index - Point index. * @param color - Point color. * @param opacity - Point opacity. */ setColorAtIndex(index: number, color: ColorRepresentation, opacity: number): this; /** * Set point size at index. * @param index - Point index. * @param size - Point.size. */ setSizeAtIndex(index: number, size: number): this; /** * Bach set point positions. * @param array - Point positions array. */ setPositions(array: Float32Array | ArrayLike): this; /** * Bach set point colors. * @param array - Point colors array by color components (r,g,b,a). */ setColors(array: Float32Array | ArrayLike): this; /** * Bach set point sizes. * @param array - Point sizes array. */ setSize(array: Float32Array | ArrayLike): this; /** * Writes point set data to a point memory array of points from points array. * @param points - Array of Vector3 objects. */ fromPoints(points: ArrayLike): this; /** * Writes point set data to a point memory array from wireframe geometry. * @param geometry - Geometry object. */ fromWireframeGeometry(geometry: WireframeGeometry): this; /** * Writes point set data to a point memory array from edges geometry. * @param geometry - Geometry object. */ fromEdgesGeometry(geometry: EdgesGeometry): this; /** * Writes point set data to a point memory array from mesh object. * @param mesh - Mesh object. */ fromMesh(mesh: Mesh): this; /** * Writes point set data to a point memory array from line segments object. * @param lineSegments - Line segments object. */ fromLineSegments(lineSegments: LineSegments): this; raycast(raycaster: Raycaster, intersects: any[]): void; private makeRaycast; }