UNPKG

@speckle/viewer

Version:

A 3d viewer for Speckle, based on threejs.

43 lines (42 loc) 1.63 kB
import { Camera, Group, Plane, Quaternion, Raycaster, Vector2, Vector3, type Intersection } from 'three'; export interface MeasurementPointGizmoStyle { dashedLine?: boolean; normalIndicatorPixelSize?: number; normalIndicatorColor?: number; normalIndicatorOpacity?: number; lineColor?: number; lineOpacity?: number; pointColor?: number; pointOpacity?: number; textColor?: number; textOpacity?: number; textPixelHeight?: number; pointPixelHeight?: number; } export declare class MeasurementPointGizmo extends Group { private normalIndicator; private normalIndicatorBuffer; private normalIndicatorNormal; private normalIndicatorTangent; private normalIndicatorBitangent; private line; private point; private text; private _style; set style(value: MeasurementPointGizmoStyle); set highlight(value: boolean); private getNormalIndicatorMaterial; private getLineMaterial; private getPointMaterial; private getTextMaterial; constructor(style?: MeasurementPointGizmoStyle); enable(normalIndicator: boolean, line: boolean, point: boolean, text: boolean): void; frameUpdate(camera: Camera, size: Vector2): void; updateNormalIndicator(position: Vector3, normal: Vector3): void; updatePoint(position: Vector3): void; updateLine(points: Vector3[]): void; updateText(value: string, position?: Vector3, quaternion?: Quaternion, scale?: Vector3): Promise<void>; updateStyle(): void; raycast(raycaster: Raycaster, intersects: Array<Intersection>): void; updateClippingPlanes(planes: Plane[]): void; }