@procore/bim-webviewer-sdk 14.1.0-rc.0 → 15.0.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 +21 -0
- package/dist/Procore.Bim.Webviewer.d.ts +21 -3
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/Webviewer.d.ts +14 -3
- package/dist/types/src/components/LoadingComponent/LoadingComponent.d.ts +1 -0
- package/dist/types/src/components/StatsJS.d.ts +1 -0
- package/dist/types/src/controllers/Bootstrapper.d.ts +2 -3
- package/dist/types/src/controllers/{DomController.d.ts → DomController/DomController.d.ts} +4 -5
- package/dist/types/src/controllers/DomController/__tests__/DomController.test.d.ts +1 -0
- package/dist/types/src/controllers/DomController/__tests__/fitCanvasToSize.test.d.ts +1 -0
- package/dist/types/src/controllers/DomController/fitCanvasToSize.d.ts +4 -0
- package/dist/types/src/controllers/DomController/index.d.ts +1 -0
- package/dist/types/src/controllers/PubSubController.d.ts +1 -0
- package/dist/types/src/utils/constants.d.ts +0 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ 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
|
+
## [15.0.0] - 2024-04-29
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `model.getSnapshot` and `model.getSnapshotDataUrl` now take an optional `size` parameter, e.g. `model.getSnapshot({ size: { width: 640, height: 480 } })`
|
|
13
|
+
- When no `size` parameter is present, it will return an image with the dimensions of the canvas
|
|
14
|
+
- When a `size` parameter is present, it will return an image with the maximum dimensions that fit in the current canvas that match the aspect ratio of the requested size. This may be smaller or larger than the requested size depending on the size of the canvas.
|
|
15
|
+
- Added a Beta pill in loading screen when model is a large partitioned model.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- [Breaking Change] `model.getSnapshot` now expects a params object instead of individual params. It only had one optional argument so there is just one change:
|
|
20
|
+
- `model.getSnapshot('#aabbcc')` must now be called as `model.getSnapshot({ color: '#aabbcc' })`
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Fixes issues affecting the "Loading Screen" for Large Models:
|
|
25
|
+
- The progress bar was inaccurate when loading partitions files (first download only, w/ empty cache) - particularly on slow networks;
|
|
26
|
+
- The percentage left would indicate 100% just before the progress was reached the end;
|
|
27
|
+
- The "time left" estimates were completely wrong - indicating that there was less than 1 minute left for a solid 15 minutes for example.
|
|
28
|
+
|
|
8
29
|
## [14.1.0] - 2024-04-15
|
|
9
30
|
|
|
10
31
|
### Fixed
|
|
@@ -122,6 +122,8 @@ declare type CommonOptions = {
|
|
|
122
122
|
bimFileId?: number;
|
|
123
123
|
};
|
|
124
124
|
|
|
125
|
+
declare type CssColor = RGB | RGBA | HEX | string;
|
|
126
|
+
|
|
125
127
|
declare type FeatureFlags = Partial<{
|
|
126
128
|
enableObjectTreeSearch: boolean;
|
|
127
129
|
}>;
|
|
@@ -175,6 +177,8 @@ declare type GeometryFile = {
|
|
|
175
177
|
url: string;
|
|
176
178
|
};
|
|
177
179
|
|
|
180
|
+
declare type HEX = `#${string}`;
|
|
181
|
+
|
|
178
182
|
declare type MetricId = string;
|
|
179
183
|
|
|
180
184
|
declare type Model = {
|
|
@@ -279,6 +283,10 @@ declare type PwfV2Bundle = {
|
|
|
279
283
|
manifestUrl: GeometryFile['url'];
|
|
280
284
|
};
|
|
281
285
|
|
|
286
|
+
declare type RGB = `rgb(${number}, ${number}, ${number})`;
|
|
287
|
+
|
|
288
|
+
declare type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
|
|
289
|
+
|
|
282
290
|
declare type SectionDataAutodeskFormat = {
|
|
283
291
|
Type: 'ClipPlaneSet';
|
|
284
292
|
Version: 1;
|
|
@@ -382,9 +390,19 @@ export declare class Webviewer {
|
|
|
382
390
|
position: Vector3;
|
|
383
391
|
direction: Vector3;
|
|
384
392
|
}>;
|
|
385
|
-
getSnapshot: (
|
|
386
|
-
|
|
387
|
-
|
|
393
|
+
getSnapshot: (params: {
|
|
394
|
+
color?: CssColor;
|
|
395
|
+
aspectRatio?: {
|
|
396
|
+
width: number;
|
|
397
|
+
height: number;
|
|
398
|
+
};
|
|
399
|
+
}) => Promise<void>;
|
|
400
|
+
getSnapshotDataUrl: (params: {
|
|
401
|
+
color?: CssColor;
|
|
402
|
+
aspectRatio?: {
|
|
403
|
+
width: number;
|
|
404
|
+
height: number;
|
|
405
|
+
};
|
|
388
406
|
}) => Promise<string>;
|
|
389
407
|
setLookAt: (x: number, y: number, z: number) => Promise<{
|
|
390
408
|
position: Vector3;
|