@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.
@@ -6,6 +6,7 @@ import { PublicNode } from './types/PublicNode';
6
6
  import { NavigationMode } from './navigation/NavigationModes';
7
7
  import { SectionDataAutodeskFormat, SectionDataProcoreFormat } from './sectioning/SectionController';
8
8
  import type { Viewpoint } from './api/types/Model';
9
+ import type { CssColor } from './components/Markup/SvgRenderer';
9
10
  export declare class Webviewer {
10
11
  options: Options;
11
12
  static readonly tools: {
@@ -53,9 +54,19 @@ export declare class Webviewer {
53
54
  position: Vector3;
54
55
  direction: Vector3;
55
56
  }>;
56
- getSnapshot: (color: string) => Promise<void>;
57
- getSnapshotDataUrl: (params?: {
58
- color: unknown;
57
+ getSnapshot: (params: {
58
+ color?: CssColor;
59
+ aspectRatio?: {
60
+ width: number;
61
+ height: number;
62
+ };
63
+ }) => Promise<void>;
64
+ getSnapshotDataUrl: (params: {
65
+ color?: CssColor;
66
+ aspectRatio?: {
67
+ width: number;
68
+ height: number;
69
+ };
59
70
  }) => Promise<string>;
60
71
  setLookAt: (x: number, y: number, z: number) => Promise<{
61
72
  position: Vector3;
@@ -30,6 +30,7 @@ export declare class LoadingComponent {
30
30
  private onModelInitializationFailed;
31
31
  private onFileTooBigError;
32
32
  private onPropertyServiceCheck;
33
+ private onModelTypeDetermined;
33
34
  private updateModelOpening;
34
35
  private updateInitProgressBar;
35
36
  }
@@ -8,4 +8,5 @@ export declare class StatsJS {
8
8
  private static MemCss;
9
9
  attach(document: Document): void;
10
10
  update(): void;
11
+ dispose(): void;
11
12
  }
@@ -20,10 +20,9 @@ export declare class Bootstrapper {
20
20
  static partitionUrlsToDownload: Set<string>;
21
21
  static estimatedInitializationSteps: number;
22
22
  static bootstrap(renderController: RenderController): Promise<void>;
23
- static setPartitionedMode(numPartitions: number): void;
23
+ static setPartitionsCount(numPartitions: number): void;
24
24
  static totalStepsCount(): number;
25
- static addDownloadSteps(url: string, count: number): void;
26
- static incrementPartitionStepsCount(): void;
25
+ static addDownloadSteps(count: number): void;
27
26
  static recordCompleteDownload(url: string, duration: number): void;
28
27
  static recordPartialDownload(url: string): void;
29
28
  static determineTotalStepsCount(): Promise<void>;
@@ -13,15 +13,14 @@ export class DomController {
13
13
  removePanel(panel: any): boolean;
14
14
  onResize(): void;
15
15
  onDoubleClick(evt: any): void;
16
- getSnapshot(color: any): Promise<void>;
16
+ getSnapshot(params: any): Promise<void>;
17
17
  setSectionBoxDisplayManager(sectionBoxDisplayManager: any): void;
18
18
  sectionBoxDisplayManager: any;
19
- getSnapshotDataUrl({ color, }: {
20
- color: any;
21
- }): Promise<any>;
19
+ getSnapshotDataUrl(params: any): Promise<any>;
22
20
  currentSnapshotPromise: any;
23
- buildSnapshotDataUrl({ color, }: {
21
+ buildSnapshotDataUrl({ color, aspectRatio, }?: {
24
22
  color?: string | undefined;
23
+ aspectRatio: any;
25
24
  }): Promise<string>;
26
25
  dispose(): void;
27
26
  }
@@ -0,0 +1,4 @@
1
+ export declare function fitCanvasToSize(canvas: HTMLCanvasElement, aspectRatio?: {
2
+ width?: number;
3
+ height?: number;
4
+ }): HTMLCanvasElement;
@@ -0,0 +1 @@
1
+ export { DomController } from './DomController';
@@ -51,6 +51,7 @@ export namespace PubSubController {
51
51
  measured: "measured";
52
52
  messages: "messages";
53
53
  modelTreeParentInteracted: "modelTreeParentInteracted";
54
+ modelTypeDetermined: "modelTypeDetermined";
54
55
  navigationChanged: "navigationChanged";
55
56
  navigationMouseDown: "navigationMouseDown";
56
57
  navigationMouseUp: "navigationMouseUp";
@@ -2,4 +2,3 @@ export const EMPTY_SPACE_MESHNODE_INDEX: -1;
2
2
  export const EMPTY_SPACE_OBJECT_ID: -1;
3
3
  export const DEFAULT_FOV: 65;
4
4
  export const NO_CURRENT_NODE: -1;
5
- export const MAX_NUMBER_OF_DOWNLOADS_ALLOWED_IN_PARALLEL: 4;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procore/bim-webviewer-sdk",
3
- "version": "14.1.0-rc.0",
3
+ "version": "15.0.0-rc.0",
4
4
  "description": "Procore BIM Webviewer SDK",
5
5
  "main": "dist/Procore.Bim.Webviewer.js",
6
6
  "types": "dist/Procore.Bim.Webviewer.d.ts",