@procore/bim-webviewer-sdk 16.2.0-rc.0 → 16.3.0-BIM-4701.0
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/CHANGELOG.md +27 -3
- package/dist/Procore.Bim.Webviewer.d.ts +93 -26
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/Webviewer.d.ts +4 -4
- package/dist/types/src/components/CoachmarkManagerComponent/CoachmarkManagerComponent.d.ts +12 -1
- package/dist/types/src/components/CoachmarkManagerComponent/Coachmarks.d.ts +0 -9
- package/dist/types/src/components/RootComponent.d.ts +5 -2
- package/dist/types/src/components/ShortestDistanceComponent.d.ts +35 -34
- package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +6 -8
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +16 -10
- package/dist/types/src/components/Tooltip/TooltipManager.d.ts +16 -0
- package/dist/types/src/components/Tooltip/__tests__/Tooltip.test.d.ts +2 -1
- package/dist/types/src/components/Tooltip/index.d.ts +1 -0
- package/dist/types/src/components/WindowViewPropertiesComponent/WindowViewPropertiesComponent.d.ts +4 -0
- package/dist/types/src/controllers/SettingsController.d.ts +5 -3
- package/dist/types/src/measuring/CursorTooltip/CursorToolip.d.ts +15 -0
- package/dist/types/src/measuring/CursorTooltip/__tests__/CursorToolip.test.d.ts +1 -0
- package/dist/types/src/measuring/CursorTooltip/index.d.ts +1 -0
- package/dist/types/src/measuring/DistanceLabel.d.ts +41 -0
- package/dist/types/src/measuring/FeatureTooltip/FeatureTooltip.d.ts +20 -0
- package/dist/types/src/measuring/FeatureTooltip/__tests__/FeatureTooltip.test.d.ts +1 -0
- package/dist/types/src/measuring/FeatureTooltip/index.d.ts +1 -0
- package/dist/types/src/measuring/MeasureToolUtils.d.ts +3 -2
- package/dist/types/src/measuring/MeasurementRenderer.d.ts +66 -0
- package/dist/types/src/measuring/PointToPointController.d.ts +9 -9
- package/dist/types/src/measuring/PointToPointManager.d.ts +23 -14
- package/dist/types/src/measuring/__tests__/DistanceLabel.test.d.ts +1 -0
- package/dist/types/src/measuring/__tests__/MeasurementRenderer.test.d.ts +1 -0
- package/dist/types/src/measuring/__tests__/MeasurementRendererFixtures.d.ts +3 -0
- package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +1 -19
- package/dist/types/src/measuring/createMeasureToolDebugGui.d.ts +2 -0
- package/dist/types/src/measuring/{createPointToPointManagerDebugGui.d.ts → createPointToPointLineDrawingDebugGui.d.ts} +1 -1
- package/dist/types/src/measuring/index.d.ts +2 -0
- package/dist/types/src/procoregl/MeshTopology/HalfEdge.d.ts +8 -0
- package/dist/types/src/procoregl/MeshTopology/MeshTopology.d.ts +6 -3
- package/dist/types/src/procoregl/MeshTopology/Position.d.ts +6 -7
- package/dist/types/src/procoregl/Models/Models.d.ts +2 -1
- package/dist/types/src/pwfreader/PWF.d.ts +2 -2
- package/dist/types/src/sdk.d.ts +1 -0
- package/dist/types/src/unit_util.d.ts +20 -6
- package/dist/types/src/utils/MathHelper/MathHelper.d.ts +2 -0
- package/dist/types/src/utils/MathHelper/index.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/types/src/{procoregl/MeshTopology/__tests__/Position.test.d.ts → components/Tooltip/__tests__/TooltipManager.test.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,14 +5,38 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- ([#1355](https://github.com/procore/bim-webviewer/pull/1355)) Measurement-related object properties are now automatically updated when the display units change (e.g. changed through settings), no need to reselect an object for it to update. Only applies for properties that have a typed-value.
|
|
13
|
+
- ([#1346](https://github.com/procore/bim-webviewer/pull/1346)) Point To Point now displays two tooltips, One that follows the mouse cursor and one that displays the name of a snap feature.
|
|
14
|
+
|
|
15
|
+
### Removed
|
|
16
|
+
|
|
17
|
+
- ([#1358](https://github.com/procore/bim-webviewer/pull/1358)) [Internal][QA Ignore] Removed `cypress_tests` from circle ci workflow and removed from sonarqube analysis.
|
|
18
|
+
|
|
19
|
+
## [16.3.0] 2024-10-11
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- ([#1331](https://github.com/procore/bim-webviewer/pull/1331)) Distance labels for measurement tool will now stack vertically when they overlap.
|
|
24
|
+
- ([#1347](https://github.com/procore/bim-webviewer/pull/1347)) Display units are automatically determined based on the locale.
|
|
25
|
+
- For locale='en', locale='en-US', or locale=undefined, the display units will be set to 'ft in' (feet inches). For any other value of locale the display units will be set to 'm' (meters).
|
|
26
|
+
- Changes to the display units settings will be saved local to the browser per project id. This saved settings supersedes the locale-based ones.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- ([#1350](https://github.com/procore/bim-webviewer/pull/1350)) When the "Measurement Unit" set in the Settings window (also known as `displayUnit` when queried via `gui.getSettings`) is set to Ft' In", properties with linear values will now be formatted with foot/inch tickmarks and inch fractions, e.g. 48’ 8¼”.
|
|
31
|
+
- Also, `gui.getSettings().displayUnit` is returns type `DisplayUnit` instead of `string`. Actual return values are unchanged.
|
|
32
|
+
- ([#1344](https://github.com/procore/bim-webviewer/pull/1344)) Update toolbar button tooltips to share styles with tooltips on custom coachmarks
|
|
33
|
+
- ([#1353](https://github.com/procore/bim-webviewer/pull/1353)) Remove beta pill on large models loading screen.
|
|
34
|
+
|
|
8
35
|
## [16.2.0] 2024-09-27
|
|
9
36
|
|
|
10
37
|
### Added
|
|
11
38
|
|
|
12
39
|
- Add `gui.showCoachmark` and `gui.hideCoachmark` to allow for showing and hiding custom coachmarks.
|
|
13
|
-
- [Internal] Add point to point cursor will align with object's surface.
|
|
14
|
-
- [Internal] Add DebugGUI to adjust point to point cursor size.
|
|
15
|
-
- [Internal] Add point to point snapping to edge, midpoint or endpoint.
|
|
16
40
|
- Add new methods for converting and formatting values with units
|
|
17
41
|
- Add `gui.getEquivalentUnitForDisplayUnit(unit: Uom, displayUnit: displayUnit): Uom`
|
|
18
42
|
- gets the equivalent unit (either the length, area, or volume version) based on the display unit
|
|
@@ -480,6 +480,45 @@ declare type Manifest = {
|
|
|
480
480
|
globalOffset: Vector3;
|
|
481
481
|
};
|
|
482
482
|
|
|
483
|
+
declare class MeasurementRenderer {
|
|
484
|
+
element: HTMLElement;
|
|
485
|
+
private measurements;
|
|
486
|
+
private globalOffset;
|
|
487
|
+
private readonly gui;
|
|
488
|
+
private camera;
|
|
489
|
+
private readonly settingsController;
|
|
490
|
+
private readonly svgRenderer;
|
|
491
|
+
constructor(params: {
|
|
492
|
+
settingsController: SettingsController;
|
|
493
|
+
svgRenderer: SvgRenderer;
|
|
494
|
+
});
|
|
495
|
+
setGlobalOffset(params: {
|
|
496
|
+
offsetX: number;
|
|
497
|
+
offsetY: number;
|
|
498
|
+
offsetZ: number;
|
|
499
|
+
}): void;
|
|
500
|
+
getGlobalOffset(): THREE.Vector3;
|
|
501
|
+
addMeasurement(params: {
|
|
502
|
+
measurePoint1: Vector3;
|
|
503
|
+
measurePoint2: Vector3;
|
|
504
|
+
config?: {
|
|
505
|
+
type: 'colorAxis' | 'greyTriangle';
|
|
506
|
+
};
|
|
507
|
+
}): Promise<void>;
|
|
508
|
+
clearMeasurements(): void;
|
|
509
|
+
private onProjectSettingsUpdated;
|
|
510
|
+
private onRenderReady;
|
|
511
|
+
private onResize;
|
|
512
|
+
private onCameraUpdated;
|
|
513
|
+
private updateDistanceLabelPosition;
|
|
514
|
+
private areRectsOverlapping;
|
|
515
|
+
private isOverlapping;
|
|
516
|
+
private stackElementsVerticallyToFirst;
|
|
517
|
+
private createColorAxis;
|
|
518
|
+
private createGreyTriangle;
|
|
519
|
+
private updateSvgData;
|
|
520
|
+
}
|
|
521
|
+
|
|
483
522
|
declare class Mesh {
|
|
484
523
|
private pwfMesh;
|
|
485
524
|
constructor(pwfMesh: PWFMesh);
|
|
@@ -712,7 +751,7 @@ declare class Models {
|
|
|
712
751
|
private pwfs;
|
|
713
752
|
private currentParsingPwfIndex;
|
|
714
753
|
private streaming;
|
|
715
|
-
private
|
|
754
|
+
private prefetchingPartitions;
|
|
716
755
|
private geometryFactory?;
|
|
717
756
|
private objectTrees;
|
|
718
757
|
private readonly selectionOption;
|
|
@@ -732,6 +771,7 @@ declare class Models {
|
|
|
732
771
|
selectionOption: SelectMethod;
|
|
733
772
|
startTimestamp: number;
|
|
734
773
|
startTime: number;
|
|
774
|
+
prefetchingPartitions?: boolean;
|
|
735
775
|
});
|
|
736
776
|
private sceneGraphFactory;
|
|
737
777
|
getResourceId: (resource: ResourceDiscriminator) => number;
|
|
@@ -1298,17 +1338,17 @@ declare type Point = {
|
|
|
1298
1338
|
};
|
|
1299
1339
|
|
|
1300
1340
|
declare class PointToPointController {
|
|
1301
|
-
private pickingController;
|
|
1302
|
-
private models;
|
|
1303
|
-
private camera;
|
|
1341
|
+
private readonly pickingController;
|
|
1342
|
+
private readonly models;
|
|
1343
|
+
private readonly camera;
|
|
1304
1344
|
private currentHoverMeshnodeIndex;
|
|
1305
|
-
private meshTopologyCache;
|
|
1345
|
+
private readonly meshTopologyCache;
|
|
1306
1346
|
private _enabled;
|
|
1307
|
-
private globalOffset;
|
|
1347
|
+
private readonly globalOffset;
|
|
1308
1348
|
private prevLastWorldIntersectionSnapResult;
|
|
1309
1349
|
private lastWorldIntersectionSnapResult;
|
|
1310
|
-
private debugGui;
|
|
1311
|
-
private viewerRenderer;
|
|
1350
|
+
private readonly debugGui;
|
|
1351
|
+
private readonly viewerRenderer;
|
|
1312
1352
|
constructor(params: {
|
|
1313
1353
|
pickingController: PickingController;
|
|
1314
1354
|
models: Models;
|
|
@@ -1328,44 +1368,51 @@ declare class PointToPointController {
|
|
|
1328
1368
|
}
|
|
1329
1369
|
|
|
1330
1370
|
declare class PointToPointManager {
|
|
1331
|
-
private svgRenderer;
|
|
1332
|
-
private renderControllerProxy;
|
|
1333
|
-
private
|
|
1371
|
+
private readonly svgRenderer;
|
|
1372
|
+
private readonly renderControllerProxy;
|
|
1373
|
+
private readonly settingsController;
|
|
1374
|
+
private readonly measurementRenderer;
|
|
1334
1375
|
private firstMeasurePoint;
|
|
1335
1376
|
private secondMeasurePoint;
|
|
1377
|
+
private snapPosition;
|
|
1378
|
+
private static pointToPointEnabled;
|
|
1336
1379
|
private outlines;
|
|
1337
|
-
private intersection;
|
|
1338
1380
|
private pivot;
|
|
1339
|
-
private
|
|
1340
|
-
private
|
|
1341
|
-
private
|
|
1342
|
-
private
|
|
1343
|
-
private
|
|
1344
|
-
private
|
|
1381
|
+
private readonly gui;
|
|
1382
|
+
private readonly globalOffset;
|
|
1383
|
+
private temporaryDistanceLabel;
|
|
1384
|
+
private camera;
|
|
1385
|
+
private readonly locale;
|
|
1386
|
+
private cursorTooltip;
|
|
1387
|
+
private featureTooltip;
|
|
1345
1388
|
constructor(params: {
|
|
1346
1389
|
renderControllerProxy: RenderControllerProxy;
|
|
1390
|
+
settingsController: SettingsController;
|
|
1347
1391
|
svgRenderer: SvgRenderer;
|
|
1348
1392
|
globalOffset: {
|
|
1349
1393
|
offsetX: number;
|
|
1350
1394
|
offsetY: number;
|
|
1351
1395
|
offsetZ: number;
|
|
1352
1396
|
};
|
|
1397
|
+
measurementRenderer: MeasurementRenderer;
|
|
1398
|
+
locale: string;
|
|
1353
1399
|
});
|
|
1400
|
+
private onCameraUpdated;
|
|
1354
1401
|
private onSelectTool;
|
|
1355
1402
|
private onNavigationChanged;
|
|
1356
1403
|
private onMeasurementObjectMove;
|
|
1404
|
+
private updateTemporaryDistanceLabel;
|
|
1357
1405
|
private onMeasurementObjectLeave;
|
|
1358
1406
|
private onMeasurementObjectClick;
|
|
1359
1407
|
private resetMeasurement;
|
|
1360
|
-
private calculateDistances;
|
|
1361
1408
|
static isEnabled(): boolean;
|
|
1362
1409
|
togglePointToPoint(params: {
|
|
1363
1410
|
enable: boolean;
|
|
1364
1411
|
}): void;
|
|
1412
|
+
private createCursors;
|
|
1413
|
+
private removeCursors;
|
|
1365
1414
|
private setCameraAndNavigationControls;
|
|
1366
1415
|
private updateSvg;
|
|
1367
|
-
private createLine;
|
|
1368
|
-
private createEllipse;
|
|
1369
1416
|
}
|
|
1370
1417
|
|
|
1371
1418
|
export declare type ProcoreFormatClipPlane = {
|
|
@@ -1389,6 +1436,10 @@ export declare type Project = {
|
|
|
1389
1436
|
id: number;
|
|
1390
1437
|
};
|
|
1391
1438
|
|
|
1439
|
+
export declare type ProjectSettings = {
|
|
1440
|
+
displayUnits: DisplayUnit;
|
|
1441
|
+
};
|
|
1442
|
+
|
|
1392
1443
|
export declare type PropertiesExtractionItem = {
|
|
1393
1444
|
item_type: 'Properties';
|
|
1394
1445
|
artifact: {
|
|
@@ -1623,9 +1674,9 @@ declare class PWF {
|
|
|
1623
1674
|
forEachNode(callback: any): void;
|
|
1624
1675
|
getMeshObject(meshRef: any): MeshObject;
|
|
1625
1676
|
findFirstObject(meshnodeIndex: any): Node_2;
|
|
1626
|
-
captureModelStats(): number
|
|
1677
|
+
captureModelStats(): number;
|
|
1627
1678
|
captureStandardModelStats(pwfModel: any): number;
|
|
1628
|
-
capturePartitionedModelStats(pwfModel: any): number
|
|
1679
|
+
capturePartitionedModelStats(pwfModel: any): number;
|
|
1629
1680
|
numFirstObjects(): number;
|
|
1630
1681
|
#private;
|
|
1631
1682
|
}
|
|
@@ -2774,6 +2825,23 @@ declare type SetNodeColorParams = {
|
|
|
2774
2825
|
nodeIds: number[];
|
|
2775
2826
|
};
|
|
2776
2827
|
|
|
2828
|
+
declare class SettingsController {
|
|
2829
|
+
private projectId;
|
|
2830
|
+
private projectSettings;
|
|
2831
|
+
private db?;
|
|
2832
|
+
private locale;
|
|
2833
|
+
constructor(params: {
|
|
2834
|
+
locale?: string;
|
|
2835
|
+
projectId: number;
|
|
2836
|
+
});
|
|
2837
|
+
private onDatabaseOpened;
|
|
2838
|
+
private loadSettings;
|
|
2839
|
+
private updateProjectSettings;
|
|
2840
|
+
private needsUpdating;
|
|
2841
|
+
SetValue(key: string, value: number): void;
|
|
2842
|
+
getSettings(): ProjectSettings;
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2777
2845
|
declare class ShortestDistanceController {
|
|
2778
2846
|
private measureSet;
|
|
2779
2847
|
private models;
|
|
@@ -3112,6 +3180,7 @@ export declare type WebFormatExtractionItem = {
|
|
|
3112
3180
|
export declare class Webviewer {
|
|
3113
3181
|
options: Options;
|
|
3114
3182
|
pointToPointManager: PointToPointManager;
|
|
3183
|
+
private measurementRenderer;
|
|
3115
3184
|
static readonly tools: {
|
|
3116
3185
|
readonly ALL: 0;
|
|
3117
3186
|
readonly BOTTOMTOOL: 1;
|
|
@@ -3354,9 +3423,7 @@ export declare class Webviewer {
|
|
|
3354
3423
|
tooltipMessage?: string;
|
|
3355
3424
|
}) => void;
|
|
3356
3425
|
hideCoachmark: (coachmarkId: string) => void;
|
|
3357
|
-
getSettings: () =>
|
|
3358
|
-
displayUnits: string;
|
|
3359
|
-
};
|
|
3426
|
+
getSettings: () => ProjectSettings;
|
|
3360
3427
|
setToolbarHidden: (hidden: boolean) => void;
|
|
3361
3428
|
setHotkeysEnabled: (enabled: boolean) => void;
|
|
3362
3429
|
getEquivalentUnitForDisplayUnit: (unit: Uom, displayUnit: DisplayUnit) => Uom;
|