@procore/bim-webviewer-sdk 17.0.0-pins-hackathon.1 → 17.0.0-pins-hackathon.3

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.
@@ -73,6 +73,18 @@ declare type Arrow = {
73
73
  zIndex?: number;
74
74
  };
75
75
 
76
+ declare type Arrow_2 = {
77
+ start_point: Point;
78
+ end_point: Point;
79
+ color: {
80
+ r: number;
81
+ g: number;
82
+ b: number;
83
+ a: number;
84
+ };
85
+ thickness: number;
86
+ };
87
+
76
88
  export declare type Attachment = {
77
89
  id: number;
78
90
  content_type: string;
@@ -250,6 +262,12 @@ export declare type CommonOptions = {
250
262
  };
251
263
 
252
264
  declare type Configuration = {
265
+ dropdown?: boolean;
266
+ hidePlanes?: boolean;
267
+ overrideSectionBoxSetup?: boolean;
268
+ };
269
+
270
+ declare type Configuration_2 = {
253
271
  dropdown?: boolean;
254
272
  selectCIs?: boolean;
255
273
  selectObservations?: boolean;
@@ -287,6 +305,18 @@ declare type DownloadMetaData = {
287
305
  timeToDownload: number;
288
306
  };
289
307
 
308
+ declare type Ellipse = {
309
+ min_point: Point;
310
+ max_point: Point;
311
+ color: {
312
+ r: number;
313
+ g: number;
314
+ b: number;
315
+ a: number;
316
+ };
317
+ thickness: number;
318
+ };
319
+
290
320
  export declare namespace ErrorLogger {
291
321
  let logger: Logger;
292
322
  const init: (params: {
@@ -493,6 +523,18 @@ declare type Line = {
493
523
  zIndex?: number;
494
524
  };
495
525
 
526
+ declare type Line_2 = {
527
+ start_point: Point;
528
+ end_point: Point;
529
+ color: {
530
+ r: number;
531
+ g: number;
532
+ b: number;
533
+ a: number;
534
+ };
535
+ thickness: number;
536
+ };
537
+
496
538
  declare interface Logger {
497
539
  logError(error: any): void;
498
540
  }
@@ -528,6 +570,41 @@ declare type Manifest_2 = {
528
570
  numPartitions: number;
529
571
  };
530
572
 
573
+ declare class Markup {
574
+ private _markupCanvasWidth?;
575
+ private _markupCanvasHeight?;
576
+ private _rangeY?;
577
+ private _rangeX?;
578
+ private markupData;
579
+ private fov;
580
+ private svgRenderer;
581
+ constructor(params: {
582
+ svgRenderer: SvgRenderer;
583
+ });
584
+ private onSectionsCleared;
585
+ private onFieldOfViewChanged;
586
+ private get markupCanvasWidth();
587
+ private set markupCanvasWidth(value);
588
+ private get markupCanvasHeight();
589
+ private set markupCanvasHeight(value);
590
+ private get rangeX();
591
+ private set rangeX(value);
592
+ private get rangeY();
593
+ private set rangeY(value);
594
+ private onResize;
595
+ private updateRanges;
596
+ private xExtentToPixel;
597
+ private yExtentToPixel;
598
+ private xPixelToExtent;
599
+ private yPixelToExtent;
600
+ private getRGB;
601
+ private convertColor;
602
+ Draw(markupData: RedlinesData, fov: number): void;
603
+ clearMarkup(): void;
604
+ markupDisplayed(): boolean;
605
+ dispose(): void;
606
+ }
607
+
531
608
  export declare const MEASURE_MODES: {
532
609
  POINT_TO_POINT: string;
533
610
  SHORTEST_DISTANCE: string;
@@ -1566,8 +1643,9 @@ declare class PinsManager {
1566
1643
  private configuration;
1567
1644
  private windowPinsCreationComponent;
1568
1645
  private renderControllerProxy;
1569
- constructor(svgRenderer: SvgRenderer, renderControllerProxy: RenderControllerProxy, windowPinsCreationComponent: WindowPinsCreationComponent);
1570
- static readonly DEFAULT_CONFIG: Readonly<Required<Configuration>>;
1646
+ private viewpointManager;
1647
+ constructor(svgRenderer: SvgRenderer, renderControllerProxy: RenderControllerProxy, viewpointManager: ViewpointManager, windowPinsCreationComponent: WindowPinsCreationComponent);
1648
+ static readonly DEFAULT_CONFIG: Readonly<Required<Configuration_2>>;
1571
1649
  init(): Promise<void>;
1572
1650
  private onIntersectPointClick;
1573
1651
  isEnabled(): boolean;
@@ -1576,12 +1654,18 @@ declare class PinsManager {
1576
1654
  toggle(params: {
1577
1655
  enable: boolean;
1578
1656
  }): void;
1579
- getConfiguration(): Configuration;
1580
- configurePinsSelection(config?: Configuration): void;
1581
- configurePinsDisplay(config?: Configuration): void;
1657
+ getConfiguration(): Configuration_2;
1658
+ configurePinsSelection(config?: Configuration_2): void;
1659
+ configurePinsDisplay(config?: Configuration_2): void;
1582
1660
  }
1583
1661
 
1584
1662
  declare type Point = {
1663
+ x: number;
1664
+ y: number;
1665
+ z: number;
1666
+ };
1667
+
1668
+ declare type Point_2 = {
1585
1669
  position: {
1586
1670
  x: number;
1587
1671
  y: number;
@@ -2252,11 +2336,28 @@ declare type Rect = {
2252
2336
  zIndex?: number;
2253
2337
  };
2254
2338
 
2339
+ declare type RedlinesData = {
2340
+ ellipses: Ellipse[];
2341
+ lines: Line_2[];
2342
+ arrows: Arrow_2[];
2343
+ texts: Text_3[];
2344
+ };
2345
+
2255
2346
  export declare const RENDER_MODE: {
2256
2347
  readonly SHADED: "shaded";
2257
2348
  readonly XRAY: "xray";
2258
2349
  };
2259
2350
 
2351
+ declare const RENDER_MODE_ORIGIN: {
2352
+ readonly OBJECT: "object";
2353
+ readonly OBJECT_TREE: "object_tree";
2354
+ readonly OBJECT_TREE_ACTIONS: "object_tree_actions";
2355
+ readonly SDK: "sdk";
2356
+ readonly SDK_VIEWPOINT: "sdk_viewpoint";
2357
+ readonly TOOLBAR: "toolbar";
2358
+ readonly HOTKEY: "hotkey";
2359
+ };
2360
+
2260
2361
  declare function RenderController(params: any): void;
2261
2362
 
2262
2363
  declare class RenderController {
@@ -3102,6 +3203,8 @@ declare class RenderControllerWorker {
3102
3203
 
3103
3204
  export declare type RenderMode = (typeof RENDER_MODE)[keyof typeof RENDER_MODE];
3104
3205
 
3206
+ declare type RenderModeOrigin = (typeof RENDER_MODE_ORIGIN)[keyof typeof RENDER_MODE_ORIGIN];
3207
+
3105
3208
  export declare type Resource = FileExtractionModePwfV1OverrideResource | FileExtractionModePwfV2OverrideResource | FileExtractionModeResource | ModelRevisionModePwfV1Resource | ModelRevisionModePwfV2Resource;
3106
3209
 
3107
3210
  declare type ResourceDiscriminator = {
@@ -3120,6 +3223,45 @@ export declare type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
3120
3223
 
3121
3224
  declare type SceneGraphName = 'kdtree' | 'wasmtree';
3122
3225
 
3226
+ declare const SECTION_BOX_ORIGIN: {
3227
+ readonly OBJECT: "object";
3228
+ readonly OBJECT_TREE: "object_tree";
3229
+ readonly OBJECT_TREE_ACTIONS: "object_tree_actions";
3230
+ readonly SDK: "sdk";
3231
+ readonly SDK_VIEWPOINT: "sdk_viewpoint";
3232
+ readonly TOOLBAR: "toolbar";
3233
+ readonly COACHMARK_SECTIONING: "coachmark_sectioning";
3234
+ readonly VIEWS: "views";
3235
+ };
3236
+
3237
+ declare class SectionBoxDisplayManager {
3238
+ private static isSectionBoxDisplayEnabled;
3239
+ private configuration;
3240
+ private renderControllerProxy;
3241
+ constructor(params: {
3242
+ renderController: RenderControllerProxy;
3243
+ });
3244
+ static isEnabled(): boolean;
3245
+ static readonly DEFAULT_CONFIG: Readonly<Required<Configuration>>;
3246
+ getConfiguration(): Configuration;
3247
+ getSectionBoxDisplay(): Promise<SectionBoxDisplayStatus>;
3248
+ configureSectionBoxDisplay(config?: Configuration): void;
3249
+ setupSectionBox(enable: boolean): Promise<void>;
3250
+ toggleSectionBoxDisplay(params: {
3251
+ enable: boolean;
3252
+ origin?: SectionBoxOrigin;
3253
+ overrideSectionBoxSetup?: boolean;
3254
+ }): Promise<void>;
3255
+ }
3256
+
3257
+ declare type SectionBoxDisplayStatus = {
3258
+ enabled: boolean;
3259
+ configuration: Required<Configuration>;
3260
+ bbox: BoundingBox;
3261
+ };
3262
+
3263
+ declare type SectionBoxOrigin = (typeof SECTION_BOX_ORIGIN)[keyof typeof SECTION_BOX_ORIGIN];
3264
+
3123
3265
  declare class SectionController {
3124
3266
  static readonly TYPE: {
3125
3267
  NULL: number;
@@ -3427,7 +3569,7 @@ declare class SvgRenderer {
3427
3569
 
3428
3570
  export declare class TestRoutineRecorder {
3429
3571
  camera: Camera;
3430
- points: Point[];
3572
+ points: Point_2[];
3431
3573
  constructor(params: {
3432
3574
  camera: Camera;
3433
3575
  });
@@ -3444,6 +3586,17 @@ declare type Text_2 = {
3444
3586
  zIndex?: number;
3445
3587
  };
3446
3588
 
3589
+ declare type Text_3 = {
3590
+ origin: Point;
3591
+ text: string;
3592
+ color: {
3593
+ r: number;
3594
+ g: number;
3595
+ b: number;
3596
+ a: number;
3597
+ };
3598
+ };
3599
+
3447
3600
  export declare const TOOL: {
3448
3601
  readonly ALL: 0;
3449
3602
  readonly BOTTOMTOOL: 1;
@@ -3588,6 +3741,34 @@ export declare type Viewpoint = {
3588
3741
  render_mode?: RenderMode | null;
3589
3742
  };
3590
3743
 
3744
+ declare class ViewpointManager {
3745
+ private renderController;
3746
+ private sectionBoxDisplayManager;
3747
+ private markup;
3748
+ constructor(params: {
3749
+ renderController: RenderControllerProxy;
3750
+ sectionBoxDisplayManager: SectionBoxDisplayManager;
3751
+ markup: Markup;
3752
+ });
3753
+ activateHomeViewpoint: () => Promise<void>;
3754
+ private activateViewpoint;
3755
+ getViewpoint(options?: {
3756
+ defaultVisibilityAlwaysTrue?: boolean;
3757
+ }): Promise<Viewpoint>;
3758
+ setViewpoint(viewpoint: Viewpoint, options?: {
3759
+ origins?: ViewpointOrigins;
3760
+ }): Promise<void>;
3761
+ setVisibility(visibility: Visibility): Promise<void>;
3762
+ getVisibility(options?: {
3763
+ defaultVisibilityAlwaysTrue?: boolean;
3764
+ }): Promise<Visibility>;
3765
+ }
3766
+
3767
+ declare type ViewpointOrigins = {
3768
+ sectionBox?: SectionBoxOrigin;
3769
+ renderMode?: RenderModeOrigin;
3770
+ };
3771
+
3591
3772
  export declare type Visibility = {
3592
3773
  default_visibility: boolean;
3593
3774
  exceptions: {