dxfview 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/dxfview.esm.min.js +7 -0
- package/dist/types/components/dxf-layout-bar/DxfLayoutBar.d.ts +26 -0
- package/dist/types/components/dxf-layout-bar/index.d.ts +1 -0
- package/dist/types/components/pop-panel/PopPanel.d.ts +14 -0
- package/dist/types/components/pop-panel/index.d.ts +1 -0
- package/dist/types/components/progress-bar/ProgressBar.d.ts +34 -0
- package/dist/types/components/progress-bar/index.d.ts +1 -0
- package/dist/types/components/settings/ProjectSettingsDef.d.ts +44 -0
- package/dist/types/components/settings/index.d.ts +1 -0
- package/dist/types/components/tool-tip/Tooltip.d.ts +20 -0
- package/dist/types/components/tool-tip/index.d.ts +1 -0
- package/dist/types/core/Configs.d.ts +238 -0
- package/dist/types/core/Constants.d.ts +164 -0
- package/dist/types/core/Units.d.ts +16 -0
- package/dist/types/core/VersionManager.d.ts +3 -0
- package/dist/types/core/camera-controls/CameraControls.d.ts +773 -0
- package/dist/types/core/camera-controls/Constants.d.ts +2 -0
- package/dist/types/core/camera-controls/EventDispatcher.d.ts +41 -0
- package/dist/types/core/camera-controls/index.d.ts +2 -0
- package/dist/types/core/camera-controls/types.d.ts +112 -0
- package/dist/types/core/camera-controls/utils/extractClientCoordFromEvent.d.ts +3 -0
- package/dist/types/core/camera-controls/utils/math-utils.d.ts +11 -0
- package/dist/types/core/camera-controls/utils/notSupportedInOrthographicCamera.d.ts +2 -0
- package/dist/types/core/canvas/CanvasRender.d.ts +52 -0
- package/dist/types/core/canvas/Constants.d.ts +28 -0
- package/dist/types/core/canvas/Drawable.d.ts +87 -0
- package/dist/types/core/canvas/DrawableList.d.ts +29 -0
- package/dist/types/core/canvas/index.d.ts +4 -0
- package/dist/types/core/compare/BaseDxfCompareHelper.d.ts +104 -0
- package/dist/types/core/compare/CompareDrawable.d.ts +17 -0
- package/dist/types/core/compare/DxfCompareHelper.d.ts +69 -0
- package/dist/types/core/compare/DxfCompareMarkupManager.d.ts +11 -0
- package/dist/types/core/compare/index.d.ts +4 -0
- package/dist/types/core/controls/CameraControlsEx.d.ts +34 -0
- package/dist/types/core/controls/index.d.ts +1 -0
- package/dist/types/core/dxf/DxfCompare.d.ts +151 -0
- package/dist/types/core/dxf/DxfConstants.d.ts +15 -0
- package/dist/types/core/dxf/DxfLoader.d.ts +526 -0
- package/dist/types/core/dxf/DxfObject.d.ts +32 -0
- package/dist/types/core/dxf/DxfUtils.d.ts +79 -0
- package/dist/types/core/dxf/HatchPatternShaders.d.ts +12 -0
- package/dist/types/core/dxf/LinePatternShaders.d.ts +12 -0
- package/dist/types/core/dxf/bspline.d.ts +8 -0
- package/dist/types/core/dxf/dxfom-mtext.d.ts +46 -0
- package/dist/types/core/dxf/dxfom-text.d.ts +16 -0
- package/dist/types/core/dxf/index.d.ts +10 -0
- package/dist/types/core/dxf/round10.d.ts +2 -0
- package/dist/types/core/dxf-parser/AutoCadColorIndex.d.ts +8 -0
- package/dist/types/core/dxf-parser/DxfBaseReader.d.ts +12 -0
- package/dist/types/core/dxf-parser/DxfBinaryReader.d.ts +14 -0
- package/dist/types/core/dxf-parser/DxfParser.d.ts +327 -0
- package/dist/types/core/dxf-parser/DxfTextReader.d.ts +31 -0
- package/dist/types/core/dxf-parser/ParseHelpers.d.ts +36 -0
- package/dist/types/core/dxf-parser/entities/3dface.d.ts +11 -0
- package/dist/types/core/dxf-parser/entities/arc.d.ts +16 -0
- package/dist/types/core/dxf-parser/entities/attdef.d.ts +31 -0
- package/dist/types/core/dxf-parser/entities/attrib.d.ts +31 -0
- package/dist/types/core/dxf-parser/entities/circle.d.ts +13 -0
- package/dist/types/core/dxf-parser/entities/dimension.d.ts +22 -0
- package/dist/types/core/dxf-parser/entities/ellipse.d.ts +15 -0
- package/dist/types/core/dxf-parser/entities/geomtry.d.ts +40 -0
- package/dist/types/core/dxf-parser/entities/hatch.d.ts +108 -0
- package/dist/types/core/dxf-parser/entities/image.d.ts +37 -0
- package/dist/types/core/dxf-parser/entities/insert.d.ts +20 -0
- package/dist/types/core/dxf-parser/entities/leader.d.ts +23 -0
- package/dist/types/core/dxf-parser/entities/line.d.ts +10 -0
- package/dist/types/core/dxf-parser/entities/lwpolyline.d.ts +21 -0
- package/dist/types/core/dxf-parser/entities/mleader.d.ts +101 -0
- package/dist/types/core/dxf-parser/entities/mtext.d.ts +18 -0
- package/dist/types/core/dxf-parser/entities/ole2frame.d.ts +20 -0
- package/dist/types/core/dxf-parser/entities/point.d.ts +11 -0
- package/dist/types/core/dxf-parser/entities/polyline.d.ts +20 -0
- package/dist/types/core/dxf-parser/entities/ray.d.ts +10 -0
- package/dist/types/core/dxf-parser/entities/region.d.ts +10 -0
- package/dist/types/core/dxf-parser/entities/seqend.d.ts +8 -0
- package/dist/types/core/dxf-parser/entities/solid.d.ts +10 -0
- package/dist/types/core/dxf-parser/entities/spline.d.ts +23 -0
- package/dist/types/core/dxf-parser/entities/table.d.ts +42 -0
- package/dist/types/core/dxf-parser/entities/text.d.ts +18 -0
- package/dist/types/core/dxf-parser/entities/vertex.d.ts +20 -0
- package/dist/types/core/dxf-parser/entities/viewport.d.ts +46 -0
- package/dist/types/core/dxf-parser/entities/xline.d.ts +10 -0
- package/dist/types/core/dxf-parser/index.d.ts +27 -0
- package/dist/types/core/dxf-parser/objects/common.d.ts +15 -0
- package/dist/types/core/dxf-parser/objects/dictionary.d.ts +19 -0
- package/dist/types/core/dxf-parser/objects/imagedef.d.ts +24 -0
- package/dist/types/core/dxf-parser/objects/layout.d.ts +29 -0
- package/dist/types/core/dxf-parser/objects/sortentstable.d.ts +12 -0
- package/dist/types/core/dxf-parser/objects/spatialfilter.d.ts +22 -0
- package/dist/types/core/dxf-parser/objects/xrecord.d.ts +11 -0
- package/dist/types/core/font/BaseFont.d.ts +88 -0
- package/dist/types/core/font/FontManager.d.ts +107 -0
- package/dist/types/core/font/MeshFont.d.ts +44 -0
- package/dist/types/core/font/ShxFont.d.ts +108 -0
- package/dist/types/core/font/index.d.ts +1 -0
- package/dist/types/core/font/shx/ExtraLettersTemplate.d.ts +1 -0
- package/dist/types/core/font/shx/Shx.constants.d.ts +11 -0
- package/dist/types/core/font/shx/ShxParser.d.ts +18 -0
- package/dist/types/core/font/shx/TextShape.d.ts +24 -0
- package/dist/types/core/font/shx/gbk/index.d.ts +4 -0
- package/dist/types/core/font/shx/index.d.ts +1 -0
- package/dist/types/core/font/shx/util/BitConverter.d.ts +18 -0
- package/dist/types/core/geometry-offset/Edge.d.ts +27 -0
- package/dist/types/core/geometry-offset/Offset.d.ts +46 -0
- package/dist/types/core/geometry-offset/index.d.ts +1 -0
- package/dist/types/core/helpers/BinaryReader.d.ts +24 -0
- package/dist/types/core/helpers/BoxSelectHelper.d.ts +44 -0
- package/dist/types/core/helpers/LoadingHelper.d.ts +46 -0
- package/dist/types/core/helpers/MobileTouchHelperDrawable.d.ts +26 -0
- package/dist/types/core/helpers/OSnapHelper.d.ts +167 -0
- package/dist/types/core/helpers/ObjectPixelSizeHelper.d.ts +13 -0
- package/dist/types/core/helpers/PickMarkupHelper.d.ts +29 -0
- package/dist/types/core/helpers/RafHelper.d.ts +18 -0
- package/dist/types/core/helpers/ZoomToRectHelper.d.ts +17 -0
- package/dist/types/core/helpers/index.d.ts +9 -0
- package/dist/types/core/index.d.ts +18 -0
- package/dist/types/core/indexeddb/AnnotationTable.d.ts +14 -0
- package/dist/types/core/indexeddb/BaseTable.d.ts +36 -0
- package/dist/types/core/indexeddb/DxfDataTable.d.ts +22 -0
- package/dist/types/core/indexeddb/FontDataTable.d.ts +32 -0
- package/dist/types/core/indexeddb/IndexedDbManager.d.ts +29 -0
- package/dist/types/core/indexeddb/ViewpointTable.d.ts +14 -0
- package/dist/types/core/indexeddb/index.d.ts +6 -0
- package/dist/types/core/input/InputManager.d.ts +161 -0
- package/dist/types/core/input/index.d.ts +1 -0
- package/dist/types/core/license/AutoConfig.d.ts +17 -0
- package/dist/types/core/license/LicenseManager.d.ts +107 -0
- package/dist/types/core/license/PublicKey.d.ts +1 -0
- package/dist/types/core/license/index.d.ts +1 -0
- package/dist/types/core/markup/ArrowMarkup.d.ts +14 -0
- package/dist/types/core/markup/BaseMarkup.d.ts +28 -0
- package/dist/types/core/markup/CircleMarkup.d.ts +12 -0
- package/dist/types/core/markup/CloudLineMarkup.d.ts +10 -0
- package/dist/types/core/markup/CloudRectMarkup.d.ts +11 -0
- package/dist/types/core/markup/CloudRectWithTextMarkup.d.ts +43 -0
- package/dist/types/core/markup/Constants.d.ts +17 -0
- package/dist/types/core/markup/DotMarkup.d.ts +9 -0
- package/dist/types/core/markup/EllipseMarkup.d.ts +12 -0
- package/dist/types/core/markup/LeaderLineMarkup.d.ts +25 -0
- package/dist/types/core/markup/MarkupManager.d.ts +91 -0
- package/dist/types/core/markup/PolylineMarkup.d.ts +11 -0
- package/dist/types/core/markup/RectMarkup.d.ts +10 -0
- package/dist/types/core/markup/TextMarkup.d.ts +40 -0
- package/dist/types/core/markup/XMarkup.d.ts +10 -0
- package/dist/types/core/markup/index.d.ts +13 -0
- package/dist/types/core/model/Constants.d.ts +51 -0
- package/dist/types/core/model/Model.d.ts +18 -0
- package/dist/types/core/model/Model2d.d.ts +115 -0
- package/dist/types/core/model/index.d.ts +3 -0
- package/dist/types/core/patches/Constants.d.ts +4 -0
- package/dist/types/core/patches/Line.d.ts +2 -0
- package/dist/types/core/patches/Mesh.d.ts +2 -0
- package/dist/types/core/patches/Points.d.ts +2 -0
- package/dist/types/core/patches/index.d.ts +4 -0
- package/dist/types/core/undo-redo/AddAnnotationCommand.d.ts +11 -0
- package/dist/types/core/undo-redo/AddMarkupCommand.d.ts +10 -0
- package/dist/types/core/undo-redo/AddMeasurementCommand.d.ts +9 -0
- package/dist/types/core/undo-redo/Command.d.ts +6 -0
- package/dist/types/core/undo-redo/RemoveAnnotationCommand.d.ts +11 -0
- package/dist/types/core/undo-redo/RemoveMarkupCommand.d.ts +10 -0
- package/dist/types/core/undo-redo/RemoveMeasurementCommand.d.ts +9 -0
- package/dist/types/core/undo-redo/UndoRedoManager.d.ts +21 -0
- package/dist/types/core/undo-redo/UpdateMarkupCommand.d.ts +11 -0
- package/dist/types/core/undo-redo/index.d.ts +9 -0
- package/dist/types/core/utils/CSS2DObjectUtils.d.ts +14 -0
- package/dist/types/core/utils/ColorUtils.d.ts +21 -0
- package/dist/types/core/utils/CommonUtils.d.ts +125 -0
- package/dist/types/core/utils/CoordinateUtils.d.ts +81 -0
- package/dist/types/core/utils/DecimalPrecisionUtils.d.ts +4 -0
- package/dist/types/core/utils/DeviceUtils.d.ts +15 -0
- package/dist/types/core/utils/EdgeUtils.d.ts +14 -0
- package/dist/types/core/utils/Event.d.ts +33 -0
- package/dist/types/core/utils/FpsUtils.d.ts +13 -0
- package/dist/types/core/utils/GeometryUtils.d.ts +111 -0
- package/dist/types/core/utils/Locale.d.ts +190 -0
- package/dist/types/core/utils/LogUtils.d.ts +7 -0
- package/dist/types/core/utils/MaterialUtils.d.ts +40 -0
- package/dist/types/core/utils/MathUtils.d.ts +59 -0
- package/dist/types/core/utils/MergeUtils.d.ts +638 -0
- package/dist/types/core/utils/ObjectUtils.d.ts +87 -0
- package/dist/types/core/utils/PolygonUtils.d.ts +8 -0
- package/dist/types/core/utils/SVGObjectUtils.d.ts +16 -0
- package/dist/types/core/utils/SceneUtils.d.ts +26 -0
- package/dist/types/core/utils/SectionUtils.d.ts +11 -0
- package/dist/types/core/utils/UnitConversionUtils.d.ts +31 -0
- package/dist/types/core/utils/index.d.ts +21 -0
- package/dist/types/core/viewers/BaseViewer.d.ts +265 -0
- package/dist/types/core/viewers/DxfViewer.d.ts +1372 -0
- package/dist/types/core/viewers/Plugin.d.ts +29 -0
- package/dist/types/core/viewers/ViewerEvent.d.ts +178 -0
- package/dist/types/core/viewers/index.d.ts +4 -0
- package/dist/types/export.doc.d.ts +10 -0
- package/dist/types/fetch-polyfill.d.ts +2 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/plugins/annotation/AnnotationPlugin.d.ts +139 -0
- package/dist/types/plugins/annotation/AutoDrawAnnotation.d.ts +63 -0
- package/dist/types/plugins/annotation/BaseAnnotation.d.ts +113 -0
- package/dist/types/plugins/annotation/BaseAnnotationDrawable.d.ts +139 -0
- package/dist/types/plugins/annotation/CopyAnnotation.d.ts +36 -0
- package/dist/types/plugins/annotation/CopyDrawable.d.ts +26 -0
- package/dist/types/plugins/annotation/FreeDrawAnnotation.d.ts +59 -0
- package/dist/types/plugins/annotation/RectAnnotation.d.ts +53 -0
- package/dist/types/plugins/annotation/RectDrawable.d.ts +42 -0
- package/dist/types/plugins/annotation/ShapeFinder.d.ts +51 -0
- package/dist/types/plugins/annotation/freeDrawDrawable.d.ts +21 -0
- package/dist/types/plugins/annotation/index.d.ts +8 -0
- package/dist/types/plugins/annotation/type.d.ts +182 -0
- package/dist/types/plugins/axis-gizmo/AxisGizmoPlugin.d.ts +49 -0
- package/dist/types/plugins/axis-gizmo/CoordinateAxes.d.ts +12 -0
- package/dist/types/plugins/axis-gizmo/index.d.ts +1 -0
- package/dist/types/plugins/bottom-bar/BottomBarPlugin.d.ts +44 -0
- package/dist/types/plugins/bottom-bar/index.d.ts +1 -0
- package/dist/types/plugins/divide/CoverLayerManager.d.ts +44 -0
- package/dist/types/plugins/divide/DivGeometryUtils.d.ts +66 -0
- package/dist/types/plugins/divide/DividePlugin.d.ts +181 -0
- package/dist/types/plugins/divide/FrameAnnotation.d.ts +142 -0
- package/dist/types/plugins/divide/FrameDrawable.d.ts +75 -0
- package/dist/types/plugins/divide/index.d.ts +6 -0
- package/dist/types/plugins/divide/types.d.ts +38 -0
- package/dist/types/plugins/hotpoint/HotpointPlugin.d.ts +93 -0
- package/dist/types/plugins/hotpoint/index.d.ts +1 -0
- package/dist/types/plugins/index.d.ts +12 -0
- package/dist/types/plugins/layer-manager/LayerManagerPlugin.d.ts +59 -0
- package/dist/types/plugins/layer-manager/index.d.ts +1 -0
- package/dist/types/plugins/local-model-uploader/IUploader.d.ts +10 -0
- package/dist/types/plugins/local-model-uploader/LocalDxfUploader.d.ts +19 -0
- package/dist/types/plugins/local-model-uploader/index.d.ts +1 -0
- package/dist/types/plugins/measure/AngleMeasureDrawable.d.ts +12 -0
- package/dist/types/plugins/measure/AngleMeasurement.d.ts +16 -0
- package/dist/types/plugins/measure/AreaMeasureDrawable.d.ts +14 -0
- package/dist/types/plugins/measure/AreaMeasurement.d.ts +31 -0
- package/dist/types/plugins/measure/BaseMeasureDrawable.d.ts +35 -0
- package/dist/types/plugins/measure/BaseMeasurement.d.ts +127 -0
- package/dist/types/plugins/measure/CoordinateMeasureDrawable.d.ts +10 -0
- package/dist/types/plugins/measure/CoordinateMeasurement.d.ts +15 -0
- package/dist/types/plugins/measure/DistanceMeasureDrawable.d.ts +15 -0
- package/dist/types/plugins/measure/DistanceMeasurement.d.ts +28 -0
- package/dist/types/plugins/measure/MeasurementPlugin.d.ts +131 -0
- package/dist/types/plugins/measure/index.d.ts +3 -0
- package/dist/types/plugins/overview-map/ImageDrawable.d.ts +41 -0
- package/dist/types/plugins/overview-map/LineDrawable.d.ts +20 -0
- package/dist/types/plugins/overview-map/OverviewMapDrawable.d.ts +24 -0
- package/dist/types/plugins/overview-map/OverviewMapPlugin.d.ts +156 -0
- package/dist/types/plugins/overview-map/TextDrawable.d.ts +50 -0
- package/dist/types/plugins/overview-map/index.d.ts +5 -0
- package/dist/types/plugins/screenshot/ScreenshotPlugin.d.ts +88 -0
- package/dist/types/plugins/screenshot/index.d.ts +1 -0
- package/dist/types/plugins/stats/StatsPlugin.d.ts +20 -0
- package/dist/types/plugins/stats/index.d.ts +1 -0
- package/dist/types/plugins/toolbars/DxfViewerToolbarPlugin.d.ts +67 -0
- package/dist/types/plugins/toolbars/MarkupToolbar.d.ts +33 -0
- package/dist/types/plugins/toolbars/Toolbar.config.d.ts +5 -0
- package/dist/types/plugins/toolbars/Toolbar.constants.d.ts +96 -0
- package/dist/types/plugins/toolbars/Toolbar.d.ts +102 -0
- package/dist/types/plugins/toolbars/index.d.ts +5 -0
- package/dist/types/version.d.ts +2 -0
- package/package.json +90 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DxfViewer } from "../../core/viewers";
|
|
2
|
+
export declare class DxfLayoutBar {
|
|
3
|
+
protected readonly viewer: DxfViewer;
|
|
4
|
+
private element?;
|
|
5
|
+
private content?;
|
|
6
|
+
private itemList;
|
|
7
|
+
constructor(viewer: DxfViewer);
|
|
8
|
+
init(): void;
|
|
9
|
+
private handleMouseWheel;
|
|
10
|
+
private createItem;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
show(): void;
|
|
13
|
+
hide(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare class ModelLayoutSwitchItem {
|
|
16
|
+
protected readonly viewer: DxfViewer;
|
|
17
|
+
private eventBus;
|
|
18
|
+
element: HTMLElement;
|
|
19
|
+
resetActivate?: () => void;
|
|
20
|
+
active: boolean;
|
|
21
|
+
constructor(viewer: DxfViewer, name: string);
|
|
22
|
+
private createItem;
|
|
23
|
+
setActive(active: boolean): void;
|
|
24
|
+
resetActive(): void;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DxfLayoutBar";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class PopPanel {
|
|
2
|
+
private readonly container;
|
|
3
|
+
private element;
|
|
4
|
+
header: HTMLElement;
|
|
5
|
+
body: HTMLElement;
|
|
6
|
+
private isFollowing;
|
|
7
|
+
private diffX;
|
|
8
|
+
private diffY;
|
|
9
|
+
constructor(id: string, content: string | HTMLElement, container?: HTMLElement);
|
|
10
|
+
start: (event: MouseEvent) => void;
|
|
11
|
+
stop: () => void;
|
|
12
|
+
follow: (event: MouseEvent) => void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./PopPanel";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface ProgressItem {
|
|
2
|
+
id: string;
|
|
3
|
+
div: HTMLDivElement;
|
|
4
|
+
}
|
|
5
|
+
export declare class ProgressBar {
|
|
6
|
+
private element;
|
|
7
|
+
private progresseItems;
|
|
8
|
+
constructor(parentElement: HTMLElement);
|
|
9
|
+
setVisible(visible: boolean): void;
|
|
10
|
+
/**
|
|
11
|
+
* Adds a progress item
|
|
12
|
+
* @param progressItemId
|
|
13
|
+
* @param message Initial message
|
|
14
|
+
* @param progress number between 0-100
|
|
15
|
+
*/
|
|
16
|
+
addProgressItem(progressItemId: string, message?: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Updates a progress item
|
|
19
|
+
* @param progressItemId
|
|
20
|
+
* @param message
|
|
21
|
+
* @param progress number between 0-100
|
|
22
|
+
*/
|
|
23
|
+
updateProgress(progressItemId: string, message?: string, progress?: number): void;
|
|
24
|
+
/**
|
|
25
|
+
* Removes a progress item
|
|
26
|
+
* @param progressItemId
|
|
27
|
+
*/
|
|
28
|
+
removeProgressItem(progressItemId: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Removes a progress item after some time
|
|
31
|
+
* @param progressItemId
|
|
32
|
+
*/
|
|
33
|
+
delayRemoveProgressItem(progressItemId: string, delayInMs?: number): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ProgressBar";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Perspective and Orthographic camera share the same settings
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export interface CameraSettings {
|
|
6
|
+
near: number;
|
|
7
|
+
far: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export interface MouseSetting {
|
|
13
|
+
sensitivity: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export interface KeyboardSetting {
|
|
19
|
+
sensitivity: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export interface Settings {
|
|
25
|
+
unit: string;
|
|
26
|
+
decimalPrecision: number;
|
|
27
|
+
camera: CameraSettings;
|
|
28
|
+
mouse: MouseSetting;
|
|
29
|
+
keyboard: KeyboardSetting;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare const defaultSettings: Settings;
|
|
35
|
+
export declare const cameraNearRange: number[];
|
|
36
|
+
export declare const cameraFarRange: number[];
|
|
37
|
+
export declare const unitRange: {
|
|
38
|
+
[key: string]: string;
|
|
39
|
+
};
|
|
40
|
+
export declare const sensitivityRange: number[];
|
|
41
|
+
export declare const decimalPrecisionRange: {
|
|
42
|
+
[key: string]: number;
|
|
43
|
+
};
|
|
44
|
+
export declare const settingStoreKeyName = "THREE_RENDER_SETTING";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ProjectSettingsDef";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface TooltipConfig {
|
|
2
|
+
showOnCreate?: boolean;
|
|
3
|
+
followPointer?: boolean;
|
|
4
|
+
parentNode?: HTMLElement;
|
|
5
|
+
target?: HTMLElement;
|
|
6
|
+
}
|
|
7
|
+
export declare class Tooltip {
|
|
8
|
+
private node;
|
|
9
|
+
private parentNode;
|
|
10
|
+
private target;
|
|
11
|
+
private childNode;
|
|
12
|
+
constructor(id: string, content?: string | HTMLElement | null, cfg?: TooltipConfig);
|
|
13
|
+
setContent(content: string | HTMLElement): void;
|
|
14
|
+
updateChildContent(content: string | HTMLElement): void;
|
|
15
|
+
follow: (event: MouseEvent) => void;
|
|
16
|
+
show: () => false | void;
|
|
17
|
+
hide: () => false | void;
|
|
18
|
+
destroy: () => void;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Tooltip";
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Camera config
|
|
3
|
+
*/
|
|
4
|
+
export interface CameraConfig {
|
|
5
|
+
/**
|
|
6
|
+
* The camera location
|
|
7
|
+
*/
|
|
8
|
+
eye: number[];
|
|
9
|
+
/**
|
|
10
|
+
* The location that the camera looks to
|
|
11
|
+
*/
|
|
12
|
+
look: number[];
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
up?: number[];
|
|
17
|
+
/**
|
|
18
|
+
* The camera's near clip plane
|
|
19
|
+
*/
|
|
20
|
+
near?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The camera's far clip plane
|
|
23
|
+
*/
|
|
24
|
+
far?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Model config
|
|
28
|
+
*/
|
|
29
|
+
export interface ModelConfig {
|
|
30
|
+
/**
|
|
31
|
+
* Unique id of the model
|
|
32
|
+
*/
|
|
33
|
+
modelId?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Model name
|
|
36
|
+
*/
|
|
37
|
+
name?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Source url of the model
|
|
40
|
+
*/
|
|
41
|
+
src: string;
|
|
42
|
+
/**
|
|
43
|
+
* Used to distinguish format, because it may be hard to know the format by src!
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
fileFormat?: string;
|
|
47
|
+
/**
|
|
48
|
+
* File encoding, can be used by dxf. Common encoding include "UTF-8", "gb2312", etc.
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
encoding?: string;
|
|
52
|
+
/**
|
|
53
|
+
* A float array of length 16, definds model's position, rotation and scale
|
|
54
|
+
*/
|
|
55
|
+
matrix?: number[];
|
|
56
|
+
/**
|
|
57
|
+
* If we want to merge meshes/lines/points with the same material
|
|
58
|
+
* @internal
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
merge?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* If we want to generate and show edges/outlines to the modle.
|
|
64
|
+
* It is useful for BimViewer.
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
edges?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* If this model is visible by default.
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
visible?: boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Dxf model config
|
|
76
|
+
*/
|
|
77
|
+
export interface DxfModelConfig extends ModelConfig {
|
|
78
|
+
/**
|
|
79
|
+
* If to ignore anything of paper space.
|
|
80
|
+
* There are some scenarios to ignore paper space by default, includes:
|
|
81
|
+
* - Dxf overlay, aka, loading more than one dxf files into a viewer. We'll only load model space for the first file.
|
|
82
|
+
* - Dxf compare. Since we'll only compare model space, it won't load paper space at all.
|
|
83
|
+
*
|
|
84
|
+
* This option is useful when user want to explicitly ignore paper space.
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
ignorePaperSpace?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Applies this color to everything in this model.
|
|
90
|
+
* This allows user to show a drawing with a pure color (black, white, etc.).
|
|
91
|
+
* Color value is between 0 and 1, e.g., [1, 0, 0] means 'red'.
|
|
92
|
+
*/
|
|
93
|
+
overrideColor?: number[];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Common viewer config
|
|
97
|
+
*/
|
|
98
|
+
export interface BaseViewerConfig {
|
|
99
|
+
/**
|
|
100
|
+
* @description canvas id to contain the viewer.
|
|
101
|
+
*/
|
|
102
|
+
containerId: string;
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
language?: "cn" | "en";
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
logLevel?: "debug" | "info" | "warn" | "error" | "silent";
|
|
111
|
+
/**
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
enableSpinner?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
enableProgressBar?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* @description just for react native
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
context?: WebGLRenderingContext | WebGL2RenderingContext;
|
|
124
|
+
/**
|
|
125
|
+
* @description just for react native
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
context2d?: CanvasRenderingContext2D;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* This wrappers most config for BimViewer
|
|
132
|
+
*/
|
|
133
|
+
export interface BimViewerConfig extends BaseViewerConfig {
|
|
134
|
+
/**
|
|
135
|
+
* If user can select an entity by mouse click
|
|
136
|
+
* @internal
|
|
137
|
+
* @default true
|
|
138
|
+
*/
|
|
139
|
+
enableSelection?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Default is `meters`
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
units?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Sets the default locale
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
149
|
+
locale?: "cn" | "en";
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* This wrappers most config for DxfViewer
|
|
153
|
+
*/
|
|
154
|
+
export interface DxfViewerConfig extends BaseViewerConfig {
|
|
155
|
+
/**
|
|
156
|
+
* Enables layout bar so we can switch to other layouts.
|
|
157
|
+
* The default layout bar is an example UI of the viewer, since plenty of APIs are exposed,
|
|
158
|
+
* you are recommended to create your own layout bar with customized style, location, etc.
|
|
159
|
+
*/
|
|
160
|
+
enableLayoutBar?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* If to cache model into indexeddb (or maybe local storage in future).
|
|
163
|
+
* If enabled, it will get model data from cache the next time model is loaded.
|
|
164
|
+
* @internal
|
|
165
|
+
* @default true
|
|
166
|
+
*/
|
|
167
|
+
enableLocalCache?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* If user can select an entity by mouse click
|
|
170
|
+
* @internal
|
|
171
|
+
* @default false
|
|
172
|
+
*/
|
|
173
|
+
enableSelection?: boolean;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Dxf compare config.
|
|
177
|
+
*/
|
|
178
|
+
export interface DxfCompareConfig {
|
|
179
|
+
/**
|
|
180
|
+
* Enables to compare properties (color, linetype, line width, etc.)
|
|
181
|
+
*/
|
|
182
|
+
enableDetailComparision: boolean;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* VR Viewpoint's hotpoint, which can be a user defined html element.
|
|
186
|
+
* A hotpoint can be clicked, then caller can do their own operation,
|
|
187
|
+
* e.g. open a description panel, jump to another viewpoint, etc.
|
|
188
|
+
*/
|
|
189
|
+
export interface Hotpoint {
|
|
190
|
+
hotpointId: string;
|
|
191
|
+
anchorPosition: number[];
|
|
192
|
+
visible?: boolean;
|
|
193
|
+
html: string;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* A default BimViewerConfig as a template, which enables most plugins.
|
|
197
|
+
* @internal
|
|
198
|
+
*/
|
|
199
|
+
export declare const DEFAULT_BIM_VIEWER_CONFIG: BimViewerConfig;
|
|
200
|
+
/**
|
|
201
|
+
* @internal
|
|
202
|
+
*/
|
|
203
|
+
export interface IsolateObjectsParam {
|
|
204
|
+
id: string;
|
|
205
|
+
modelId: string;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* @internal
|
|
209
|
+
*/
|
|
210
|
+
export interface IsolateObjectsParams {
|
|
211
|
+
familyInstanceIds: IsolateObjectsParam[];
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* @internal
|
|
215
|
+
*/
|
|
216
|
+
export interface ScreenshotConfig {
|
|
217
|
+
type: string;
|
|
218
|
+
quality: number;
|
|
219
|
+
includeOverlay: boolean;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Icon class.
|
|
223
|
+
* Used by toolbar and bottom bar icons, etc.
|
|
224
|
+
*/
|
|
225
|
+
export interface IconClass {
|
|
226
|
+
/**
|
|
227
|
+
* The default icon.
|
|
228
|
+
*/
|
|
229
|
+
default: string;
|
|
230
|
+
/**
|
|
231
|
+
* The icon when item is actived.
|
|
232
|
+
*/
|
|
233
|
+
active?: string;
|
|
234
|
+
/**
|
|
235
|
+
* The icon font class name.
|
|
236
|
+
*/
|
|
237
|
+
iconFont?: string;
|
|
238
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* To improve performance, we can set object.matrixAutoUpdate = false for static or rarely moving objects and
|
|
3
|
+
* manually call object.updateMatrix() whenever their position/rotation/quaternion/scale are updated.
|
|
4
|
+
* Add a constrant here, so developer can change it here easily for debugging.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare const matrixAutoUpdate = false;
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare const sceneAutoUpdate = false;
|
|
12
|
+
/**
|
|
13
|
+
* These concept can be complex: hitable, snapable, selectable, visible
|
|
14
|
+
* Mesh Y Y Y Y
|
|
15
|
+
* text in DxfViewer Y N Y Y
|
|
16
|
+
* ground plan Y Y N Y
|
|
17
|
+
* outline N Y N Y
|
|
18
|
+
* OSnap auxiliary object N Y N N
|
|
19
|
+
*
|
|
20
|
+
* So, we must handle them properly. We'll try to put them into different layers.
|
|
21
|
+
*
|
|
22
|
+
* For each created object with geometry and material, the default layer is set to enableAll.
|
|
23
|
+
* If the object is only displayed, it is not necessary to call enableAll. For example, some auxiliary display objects.
|
|
24
|
+
* For objects that cannot be hitable, snapable, selectable, etc., call ObjectUtils.disableLayerChannels to exclude the corresponding channel.
|
|
25
|
+
* @example
|
|
26
|
+
* ``` typescript
|
|
27
|
+
* this.groundPlane.layers.enableAll();
|
|
28
|
+
* ObjectUtils.disableLayerChannels(this.groundPlane, [layerForSelectableObjects]);
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare const layerForHitableObjects = 10;
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export declare const layerForSnapableObjects = 11;
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export declare const layerForSelectableObjects = 12;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
export declare const ICON_FONT_CLASS = "iconfont";
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export declare const KEYDOWN_EVENT = "keydown";
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export declare const KEYUP_EVENT = "keyup";
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export declare const MOUSEMOVE_EVENT = "mousemove";
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
export declare const MOUSEUP_EVENT = "mouseup";
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
export declare const MOUSEDOWN_EVENT = "mousedown";
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
export declare const ESC_KEY = "Escape";
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
export declare const ENTER_KEY = "Enter";
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
export declare const AXIS_SECTION_PLANE_ID = "axis-section-plane";
|
|
79
|
+
/**
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
export declare const AXIS_SECTION_PLANE_CONTROL_ID = "axis-section-plane-control";
|
|
83
|
+
/**
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
export declare const SECTION_PLANE_ID = "section-plane";
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
export declare const SECTION_PLANE_CONTROL_ID = "section-plane-control";
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
export declare const SECTION_BOX_ID = "section-box";
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
export declare const SECTION_PLANE_NAME = "plane-section-boxface";
|
|
99
|
+
/**
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
export declare const GROUND_PLANE_RENDER_ORDER = -1000;
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
* Angle threshold at which two plane normals are parallel. Used to calculate edges.
|
|
106
|
+
*/
|
|
107
|
+
export declare const ANGLE_THRESHOLD_FOR_EDGE = 10;
|
|
108
|
+
/**
|
|
109
|
+
* Section type
|
|
110
|
+
*/
|
|
111
|
+
export declare enum SectionType {
|
|
112
|
+
ObjectsBoxSection = "ObjectsBoxSection",
|
|
113
|
+
PickPlaneSection = "PickPlaneSection",
|
|
114
|
+
AxisPlaneSection = "AxisPlaneSection"
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Screenshot mode.
|
|
118
|
+
*/
|
|
119
|
+
export declare enum ScreenshotMode {
|
|
120
|
+
/**
|
|
121
|
+
* Take screenshot of the whole canvas.
|
|
122
|
+
*/
|
|
123
|
+
Default = "Default",
|
|
124
|
+
/**
|
|
125
|
+
* Take screenshot by box selecting an area.
|
|
126
|
+
*/
|
|
127
|
+
BoxSelection = "BoxSelection",
|
|
128
|
+
/**
|
|
129
|
+
* Take screenshot by picking a markup.
|
|
130
|
+
*/
|
|
131
|
+
PickMarkup = "PickMarkup"
|
|
132
|
+
}
|
|
133
|
+
export interface Vector2 {
|
|
134
|
+
x: number;
|
|
135
|
+
y: number;
|
|
136
|
+
}
|
|
137
|
+
export interface Vector3 {
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
z: number;
|
|
141
|
+
}
|
|
142
|
+
export declare type Box = [number, number, number, number, number, number];
|
|
143
|
+
export declare type Mat4 = [
|
|
144
|
+
number,
|
|
145
|
+
number,
|
|
146
|
+
number,
|
|
147
|
+
number,
|
|
148
|
+
number,
|
|
149
|
+
number,
|
|
150
|
+
number,
|
|
151
|
+
number,
|
|
152
|
+
number,
|
|
153
|
+
number,
|
|
154
|
+
number,
|
|
155
|
+
number,
|
|
156
|
+
number,
|
|
157
|
+
number,
|
|
158
|
+
number,
|
|
159
|
+
number
|
|
160
|
+
] | Float32Array;
|
|
161
|
+
export interface Box2 {
|
|
162
|
+
min: Vector2;
|
|
163
|
+
max: Vector2;
|
|
164
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Units are defined the same order as to Dxf format
|
|
3
|
+
*/
|
|
4
|
+
export declare enum Units {
|
|
5
|
+
Unitless = "Unitless",
|
|
6
|
+
Inches = "Inches",
|
|
7
|
+
Feet = "Feet",
|
|
8
|
+
Millimeters = "Millimeters",
|
|
9
|
+
Centimeters = "Centimeters",
|
|
10
|
+
Meters = "Meters"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Gets the unit scale when converting to meter
|
|
14
|
+
*/
|
|
15
|
+
export declare const unitScaleToMeter: (srcUnit: Units) => number;
|
|
16
|
+
export declare const unitScaleConversion: (srcUnit: Units, destUnit: Units) => number;
|