@procore/bim-webviewer-sdk 16.2.0-rc.0 → 16.3.0-rc.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 +15 -3
- package/dist/Procore.Bim.Webviewer.d.ts +78 -17
- 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/controllers/SettingsController.d.ts +5 -3
- package/dist/types/src/measuring/DistanceLabel.d.ts +41 -0
- package/dist/types/src/measuring/MeasureToolUtils.d.ts +2 -1
- package/dist/types/src/measuring/MeasurementRenderer.d.ts +66 -0
- package/dist/types/src/measuring/PointToPointController.d.ts +2 -2
- package/dist/types/src/measuring/PointToPointManager.d.ts +13 -10
- 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,26 @@ 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
|
+
## [16.3.0]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- ([#1331](https://github.com/procore/bim-webviewer/pull/1331)) Distance labels for measurement tool will now stack vertically when they overlap.
|
|
13
|
+
- ([#1347](https://github.com/procore/bim-webviewer/pull/1347)) Display units are automatically determined based on the locale.
|
|
14
|
+
- 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).
|
|
15
|
+
- Changes to the display units settings will be saved local to the browser per project id. This saved settings supersedes the locale-based ones.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- ([#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¼”.
|
|
20
|
+
- Also, `gui.getSettings().displayUnit` is returns type `DisplayUnit` instead of `string`. Actual return values are unchanged.
|
|
21
|
+
- ([#1344](https://github.com/procore/bim-webviewer/pull/1344)) Update toolbar button tooltips to share styles with tooltips on custom coachmarks
|
|
22
|
+
|
|
8
23
|
## [16.2.0] 2024-09-27
|
|
9
24
|
|
|
10
25
|
### Added
|
|
11
26
|
|
|
12
27
|
- 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
28
|
- Add new methods for converting and formatting values with units
|
|
17
29
|
- Add `gui.getEquivalentUnitForDisplayUnit(unit: Uom, displayUnit: displayUnit): Uom`
|
|
18
30
|
- 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;
|
|
@@ -1300,11 +1340,11 @@ declare type Point = {
|
|
|
1300
1340
|
declare class PointToPointController {
|
|
1301
1341
|
private pickingController;
|
|
1302
1342
|
private models;
|
|
1303
|
-
private camera;
|
|
1343
|
+
private readonly camera;
|
|
1304
1344
|
private currentHoverMeshnodeIndex;
|
|
1305
1345
|
private meshTopologyCache;
|
|
1306
1346
|
private _enabled;
|
|
1307
|
-
private globalOffset;
|
|
1347
|
+
private readonly globalOffset;
|
|
1308
1348
|
private prevLastWorldIntersectionSnapResult;
|
|
1309
1349
|
private lastWorldIntersectionSnapResult;
|
|
1310
1350
|
private debugGui;
|
|
@@ -1330,42 +1370,43 @@ declare class PointToPointController {
|
|
|
1330
1370
|
declare class PointToPointManager {
|
|
1331
1371
|
private svgRenderer;
|
|
1332
1372
|
private renderControllerProxy;
|
|
1333
|
-
private
|
|
1373
|
+
private settingsController;
|
|
1374
|
+
private 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 dist;
|
|
1340
|
-
private xDist;
|
|
1341
|
-
private yDist;
|
|
1342
|
-
private zDist;
|
|
1343
1381
|
private gui;
|
|
1344
1382
|
private globalOffset;
|
|
1383
|
+
private temporaryDistanceLabel;
|
|
1384
|
+
private camera;
|
|
1345
1385
|
constructor(params: {
|
|
1346
1386
|
renderControllerProxy: RenderControllerProxy;
|
|
1387
|
+
settingsController: SettingsController;
|
|
1347
1388
|
svgRenderer: SvgRenderer;
|
|
1348
1389
|
globalOffset: {
|
|
1349
1390
|
offsetX: number;
|
|
1350
1391
|
offsetY: number;
|
|
1351
1392
|
offsetZ: number;
|
|
1352
1393
|
};
|
|
1394
|
+
measurementRenderer: MeasurementRenderer;
|
|
1353
1395
|
});
|
|
1396
|
+
private onCameraUpdated;
|
|
1354
1397
|
private onSelectTool;
|
|
1355
1398
|
private onNavigationChanged;
|
|
1356
1399
|
private onMeasurementObjectMove;
|
|
1400
|
+
private updateTemporaryDistanceLabel;
|
|
1357
1401
|
private onMeasurementObjectLeave;
|
|
1358
1402
|
private onMeasurementObjectClick;
|
|
1359
1403
|
private resetMeasurement;
|
|
1360
|
-
private calculateDistances;
|
|
1361
1404
|
static isEnabled(): boolean;
|
|
1362
1405
|
togglePointToPoint(params: {
|
|
1363
1406
|
enable: boolean;
|
|
1364
1407
|
}): void;
|
|
1365
1408
|
private setCameraAndNavigationControls;
|
|
1366
1409
|
private updateSvg;
|
|
1367
|
-
private createLine;
|
|
1368
|
-
private createEllipse;
|
|
1369
1410
|
}
|
|
1370
1411
|
|
|
1371
1412
|
export declare type ProcoreFormatClipPlane = {
|
|
@@ -1389,6 +1430,10 @@ export declare type Project = {
|
|
|
1389
1430
|
id: number;
|
|
1390
1431
|
};
|
|
1391
1432
|
|
|
1433
|
+
export declare type ProjectSettings = {
|
|
1434
|
+
displayUnits: DisplayUnit;
|
|
1435
|
+
};
|
|
1436
|
+
|
|
1392
1437
|
export declare type PropertiesExtractionItem = {
|
|
1393
1438
|
item_type: 'Properties';
|
|
1394
1439
|
artifact: {
|
|
@@ -1623,9 +1668,9 @@ declare class PWF {
|
|
|
1623
1668
|
forEachNode(callback: any): void;
|
|
1624
1669
|
getMeshObject(meshRef: any): MeshObject;
|
|
1625
1670
|
findFirstObject(meshnodeIndex: any): Node_2;
|
|
1626
|
-
captureModelStats(): number
|
|
1671
|
+
captureModelStats(): number;
|
|
1627
1672
|
captureStandardModelStats(pwfModel: any): number;
|
|
1628
|
-
capturePartitionedModelStats(pwfModel: any): number
|
|
1673
|
+
capturePartitionedModelStats(pwfModel: any): number;
|
|
1629
1674
|
numFirstObjects(): number;
|
|
1630
1675
|
#private;
|
|
1631
1676
|
}
|
|
@@ -2774,6 +2819,23 @@ declare type SetNodeColorParams = {
|
|
|
2774
2819
|
nodeIds: number[];
|
|
2775
2820
|
};
|
|
2776
2821
|
|
|
2822
|
+
declare class SettingsController {
|
|
2823
|
+
private projectId;
|
|
2824
|
+
private projectSettings;
|
|
2825
|
+
private db?;
|
|
2826
|
+
private locale;
|
|
2827
|
+
constructor(params: {
|
|
2828
|
+
locale?: string;
|
|
2829
|
+
projectId: number;
|
|
2830
|
+
});
|
|
2831
|
+
private onDatabaseOpened;
|
|
2832
|
+
private loadSettings;
|
|
2833
|
+
private updateProjectSettings;
|
|
2834
|
+
private needsUpdating;
|
|
2835
|
+
SetValue(key: string, value: number): void;
|
|
2836
|
+
getSettings(): ProjectSettings;
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2777
2839
|
declare class ShortestDistanceController {
|
|
2778
2840
|
private measureSet;
|
|
2779
2841
|
private models;
|
|
@@ -3112,6 +3174,7 @@ export declare type WebFormatExtractionItem = {
|
|
|
3112
3174
|
export declare class Webviewer {
|
|
3113
3175
|
options: Options;
|
|
3114
3176
|
pointToPointManager: PointToPointManager;
|
|
3177
|
+
private measurementRenderer;
|
|
3115
3178
|
static readonly tools: {
|
|
3116
3179
|
readonly ALL: 0;
|
|
3117
3180
|
readonly BOTTOMTOOL: 1;
|
|
@@ -3354,9 +3417,7 @@ export declare class Webviewer {
|
|
|
3354
3417
|
tooltipMessage?: string;
|
|
3355
3418
|
}) => void;
|
|
3356
3419
|
hideCoachmark: (coachmarkId: string) => void;
|
|
3357
|
-
getSettings: () =>
|
|
3358
|
-
displayUnits: string;
|
|
3359
|
-
};
|
|
3420
|
+
getSettings: () => ProjectSettings;
|
|
3360
3421
|
setToolbarHidden: (hidden: boolean) => void;
|
|
3361
3422
|
setHotkeysEnabled: (enabled: boolean) => void;
|
|
3362
3423
|
getEquivalentUnitForDisplayUnit: (unit: Uom, displayUnit: DisplayUnit) => Uom;
|