@pilotdev/pilot-web-3d 23.0.3 → 23.0.5

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.
Files changed (2) hide show
  1. package/index.d.ts +491 -35
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  /// <reference types="@types/three" />
2
2
  declare namespace PilotWeb3D {
3
+ export class Localization {
4
+ static initialize(options: any): Promise<void>;
5
+ static translate(stringToTrans: string): string;
6
+ static setLanguage(language: string): Promise<void>;
7
+ static extendLocalization(locales: any): boolean;
8
+ }
3
9
  export class LoadingSpinner {
4
10
  addToDOM(container: HTMLElement): void;
5
11
  removeFromDOM(container: HTMLElement): void;
@@ -13,7 +19,7 @@ export const theExtensionManager: ExtensionManager;
13
19
  export class ExtensionLoader {
14
20
  loadExtension(extensionId: string): Promise<ExtensionBase>;
15
21
  unloadExtension(extensionId: string): Promise<boolean>;
16
- getExtensions(): ExtensionBase[];
22
+ getExtensions(): string[];
17
23
  }
18
24
  export interface ILayerManager {
19
25
  createLayer(name: string): ILayer;
@@ -40,10 +46,6 @@ export interface IEventsDispatcher {
40
46
  dispatchEventAsync(event: string | Event): void;
41
47
  clearListeners(): void;
42
48
  }
43
- export type ViewerSettings = Record<string, any>;
44
- export class ViewerConfiguration {
45
- [key: string]: any;
46
- }
47
49
  export class CoreEventTypes {
48
50
  static VIEWER_RESIZE_EVENT: string;
49
51
  static VIEWER_MOUSE_DOWN_EVENT: string;
@@ -78,21 +80,54 @@ export class InMemorySettingsStorage implements ISettingsStorage {
78
80
  getKeys(): string[];
79
81
  }
80
82
  export interface ISettings {
81
- changeSetting<T>(name: string, value: T, notify?: boolean): void;
83
+ changeSetting<T>(name: string, value: T, notify?: boolean, providedData?: any): void;
82
84
  getSettingValue<T>(name: string): T;
83
85
  }
86
+
87
+ export class BaseSettingsNames {
88
+ static TOOLBAR: string;
89
+ static TOOLBAR_DIRECTION: string;
90
+ static TOOLBAR_CONTENT: string;
91
+ }
84
92
  export class SettingChangedEvent extends Event {
85
93
  name: string;
86
94
  oldValue: any;
87
95
  newValue: any;
96
+ providedData: any;
88
97
  }
89
98
  export abstract class SettingsBase implements ISettings {
90
99
  protected _eventDispatcher: IEventsDispatcher;
91
100
  protected _storage: ISettingsStorage;
92
- changeSetting<T>(name: string, value: T, notify?: boolean): void;
101
+ changeSetting<T>(name: string, value: T, notify?: boolean, providedData?: any): void;
93
102
  getSettingValue<T>(name: string): T;
94
103
  protected abstract getKeyWithPrefix(key: string): string;
95
104
  }
105
+ export enum ToolbarDirection {
106
+ TOP_FIXED = "ascn-toolbar-direction-fixed-top",
107
+ TOP_FLUENT = "ascn-toolbar-direction-top",
108
+ BOTTOM_FIXED = "ascn-toolbar-direction-fixed-bottom",
109
+ BOTTOM_FLUENT = "ascn-toolbar-direction-bottom"
110
+ }
111
+ export enum ToolbarContent {
112
+ CENTER = "ascn-toolbar-content-center",
113
+ START = "ascn-toolbar-content-start",
114
+ END = "ascn-toolbar-content-end"
115
+ }
116
+ export interface ToolbarOptions {
117
+ height: number;
118
+ direction: ToolbarDirection;
119
+ }
120
+ export interface ToolbarStyle {
121
+ direction?: ToolbarDirection;
122
+ content?: ToolbarContent;
123
+ }
124
+ export const defaultToolbarAppearance: ToolbarStyle;
125
+ export type ViewerSettings = Record<string, any>;
126
+ export class ViewerConfiguration {
127
+ settingsPrefix: string;
128
+ appearance: ViewerSettings;
129
+ createConfiguration(configuration: ViewerSettings, origin: ViewerSettings): void;
130
+ }
96
131
  export type ErrorCallback = (message: string) => void;
97
132
  export type SuccessCallback = (modelId: any) => void;
98
133
  export enum DocumentType {
@@ -100,16 +135,19 @@ export enum DocumentType {
100
135
  DOCUMENT_2D = 1,
101
136
  DOCUMENT_3D = 2
102
137
  }
138
+ export const defaultBaseSettings: ViewerConfiguration;
103
139
  export abstract class ViewerBase {
104
140
  protected _clientContainer: HTMLElement;
105
141
  protected _loadingSpinner: LoadingSpinner;
106
142
  protected _documentType: DocumentType;
107
143
  protected _configuration: ViewerConfiguration;
108
- container: HTMLElement;
109
- layerManagers: Map<number, ILayerManager>;
110
- extensionsLoader: ExtensionLoader;
144
+ readonly container: HTMLElement;
145
+ readonly layerManagers: Map<number, ILayerManager>;
146
+ readonly extensionsLoader: ExtensionLoader;
111
147
  abstract settings: ISettings;
112
148
  abstract events: IEventsDispatcher;
149
+ get rootContainer(): HTMLElement;
150
+ getConfiguration(): ViewerConfiguration;
113
151
  /**
114
152
  *
115
153
  * @returns
@@ -133,9 +171,11 @@ export class Control {
133
171
  }
134
172
  export class Toolbar extends Control {
135
173
 
136
- constructor(id: string);
174
+ constructor(id: string, toolbarContainer: HTMLElement, options?: ToolbarStyle);
137
175
  addControl(control: Control): void;
138
176
  removeControl(id: string): void;
177
+ changeToolbarPosition(direction: string): void;
178
+ changeToolbarContent(content: string): void;
139
179
  }
140
180
  export class ExtensionBase {
141
181
  protected _viewer: ViewerBase;
@@ -200,6 +240,7 @@ export class Color {
200
240
  toArray(array: Array<number>, offset?: number): Array<number>;
201
241
  }
202
242
  export abstract class ViewObject extends THREE.Object3D {
243
+ protected _isDisposed: boolean;
203
244
  protected _isSelected: boolean;
204
245
  protected _isHovered: boolean;
205
246
  protected _isVisible: boolean;
@@ -266,18 +307,297 @@ export abstract class ViewObject extends THREE.Object3D {
266
307
  */
267
308
  protected riseOnUpdated(updateType?: UpdateType, object?: THREE.Object3D): void;
268
309
  }
269
- export type EventFunction<Data> = ((data: Data) => void) | (() => void);
270
- export interface IEventListener<Data> {
271
- dispose(): void;
310
+ export abstract class CustomMaterial extends THREE.ShaderMaterial {
311
+
312
+ constructor();
313
+ copy(source: CustomMaterial): this;
314
+ protected customProgramCacheKeyCallback(): string;
315
+ protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
316
+ protected onBeforeCompileCallback(shader: THREE.Shader): void;
317
+ protected refreshTransformUniform(map: THREE.Texture, uniform: THREE.IUniform): void;
318
+ }
319
+ export interface CustomMeshLambertMaterialParameters extends THREE.ShaderMaterialParameters, THREE.MeshLambertMaterialParameters {
320
+ instancing?: boolean | undefined;
321
+ }
322
+ export class CustomMeshLambertMaterial extends CustomMaterial {
323
+ type: string;
324
+
325
+ constructor(parameters?: CustomMeshLambertMaterialParameters);
326
+ /**
327
+ * @default false
328
+ */
329
+ get instancing(): boolean;
330
+ set instancing(value: boolean);
331
+ /**
332
+ * @default new THREE.Color( 0xffffff )
333
+ */
334
+ color: THREE.Color;
335
+ /**
336
+ * @default null
337
+ */
338
+ bumpMap: THREE.Texture | null;
339
+ /**
340
+ * @default 1
341
+ */
342
+ bumpScale: number;
343
+ /**
344
+ * @default null
345
+ */
346
+ displacementMap: THREE.Texture | null;
347
+ /**
348
+ * @default 1
349
+ */
350
+ displacementScale: number;
351
+ /**
352
+ * @default 0
353
+ */
354
+ displacementBias: number;
355
+ /**
356
+ * @default new THREE.Color( 0x000000 )
357
+ */
358
+ emissive: THREE.Color;
359
+ /**
360
+ * @default 1
361
+ */
362
+ emissiveIntensity: number;
363
+ /**
364
+ * @default null
365
+ */
366
+ emissiveMap: THREE.Texture | null;
367
+ /**
368
+ * @default false
369
+ */
370
+ flatShading: boolean;
371
+ /**
372
+ * @default null
373
+ */
374
+ map: THREE.Texture | null;
375
+ /**
376
+ * @default null
377
+ */
378
+ lightMap: THREE.Texture | null;
379
+ /**
380
+ * @default 1
381
+ */
382
+ lightMapIntensity: number;
383
+ /**
384
+ * @default null
385
+ */
386
+ normalMap: THREE.Texture | null;
387
+ normalMapType: THREE.NormalMapTypes;
388
+ /**
389
+ * @default new THREE.Vector2( 1, 1 )
390
+ */
391
+ normalScale: THREE.Vector2;
392
+ /**
393
+ * @default null
394
+ */
395
+ aoMap: THREE.Texture | null;
396
+ /**
397
+ * @default 1
398
+ */
399
+ aoMapIntensity: number;
400
+ /**
401
+ * @default null
402
+ */
403
+ specularMap: THREE.Texture | null;
404
+ /**
405
+ * @default null
406
+ */
407
+ alphaMap: THREE.Texture | null;
408
+ /**
409
+ * @default null
410
+ */
411
+ envMap: THREE.Texture | null;
412
+ /**
413
+ * @default THREE.MultiplyOperation
414
+ */
415
+ combine: THREE.Combine;
416
+ /**
417
+ * @default 1
418
+ */
419
+ reflectivity: number;
420
+ /**
421
+ * @default 0.98
422
+ */
423
+ refractionRatio: number;
424
+ /**
425
+ * @default false
426
+ */
427
+ wireframe: boolean;
428
+ /**
429
+ * @default 1
430
+ */
431
+ wireframeLinewidth: number;
432
+ /**
433
+ * @default 'round'
434
+ */
435
+ wireframeLinecap: string;
436
+ /**
437
+ * @default 'round'
438
+ */
439
+ wireframeLinejoin: string;
440
+ /**
441
+ * Whether the material is affected by fog. Default is true.
442
+ * @default fog
443
+ */
444
+ fog: boolean;
445
+ protected refreshUniformsCommon(uniforms: {
446
+ [uniform: string]: THREE.IUniform;
447
+ }, material: CustomMeshLambertMaterial, renderer: THREE.WebGLRenderer): void;
448
+ protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
449
+ copy(source: CustomMeshLambertMaterial): this;
272
450
  }
273
- export interface IEventSigner<Data> {
274
- listen(callback: EventFunction<Data>, options?: {
275
- bind?: object;
276
- }): IEventListener<Data>;
277
- unlisten(callback: EventFunction<Data>, options?: {
278
- bind?: object;
279
- allowMissing?: boolean;
280
- }): boolean;
451
+ export interface CustomLineMaterialParameters extends THREE.ShaderMaterialParameters, THREE.LineBasicMaterialParameters {
452
+ instancing?: boolean | undefined;
453
+ }
454
+ export class CustomLineMaterial extends CustomMaterial {
455
+ type: string;
456
+
457
+ constructor(parameters?: CustomLineMaterialParameters);
458
+ /**
459
+ * @default false
460
+ */
461
+ get instancing(): boolean;
462
+ set instancing(value: boolean);
463
+ /**
464
+ * @default 0xffffff
465
+ */
466
+ color: THREE.Color;
467
+ /**
468
+ * Whether the material is affected by fog. Default is true.
469
+ * @default true
470
+ */
471
+ fog: boolean;
472
+ /**
473
+ * @default 1
474
+ */
475
+ linewidth: number;
476
+ /**
477
+ * @default 'round'
478
+ */
479
+ linecap: string;
480
+ /**
481
+ * @default 'round'
482
+ */
483
+ linejoin: string;
484
+ /**
485
+ * @default null
486
+ */
487
+ map: THREE.Texture | null;
488
+ protected refreshUniformsCommon(uniforms: {
489
+ [uniform: string]: THREE.IUniform;
490
+ }, material: CustomLineMaterial, renderer: THREE.WebGLRenderer): void;
491
+ protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
492
+ copy(source: CustomLineMaterial): this;
493
+ }
494
+ export interface MeshLineMaterialParameters extends THREE.ShaderMaterialParameters {
495
+ alphaToCoverage?: boolean | undefined;
496
+ color?: THREE.ColorRepresentation | undefined;
497
+ dashed?: boolean | undefined;
498
+ dashScale?: number | undefined;
499
+ dashSize?: number | undefined;
500
+ dashOffset?: number | undefined;
501
+ gapSize?: number | undefined;
502
+ linewidth?: number | undefined;
503
+ resolution?: THREE.Vector2 | undefined;
504
+ wireframe?: boolean | undefined;
505
+ worldUnits?: boolean | undefined;
506
+ }
507
+ export class MeshLineMaterial extends CustomMaterial {
508
+ type: string;
509
+
510
+ constructor(parameters: MeshLineMaterialParameters);
511
+ get color(): THREE.Color;
512
+ set color(value: THREE.ColorRepresentation);
513
+ get worldUnits(): boolean;
514
+ set worldUnits(value: boolean);
515
+ get dashed(): boolean;
516
+ set dashed(value: boolean);
517
+ get dashScale(): number;
518
+ set dashScale(value: number);
519
+ get dashSize(): number;
520
+ set dashSize(value: number);
521
+ get dashOffset(): number;
522
+ set dashOffset(value: number);
523
+ get gapSize(): number;
524
+ set gapSize(value: number);
525
+ get resolution(): THREE.Vector2;
526
+ set resolution(value: THREE.Vector2);
527
+ onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
528
+ }
529
+ export interface CustomPointMaterialParameters extends THREE.ShaderMaterialParameters, THREE.PointsMaterialParameters {
530
+ }
531
+ export class CustomPointMaterial extends CustomMaterial {
532
+ type: string;
533
+
534
+ constructor(parameters?: CustomPointMaterialParameters);
535
+ /**
536
+ * @default new THREE.Color( 0xffffff )
537
+ */
538
+ color: THREE.Color;
539
+ /**
540
+ * @default null
541
+ */
542
+ map: THREE.Texture | null;
543
+ /**
544
+ * @default null
545
+ */
546
+ alphaMap: THREE.Texture | null;
547
+ /**
548
+ * @default 1
549
+ */
550
+ size: number;
551
+ /**
552
+ * @default true
553
+ */
554
+ sizeAttenuation: boolean;
555
+ /**
556
+ * Whether the material is affected by fog. Default is true.
557
+ * @default fog
558
+ */
559
+ fog: boolean;
560
+ protected refreshUniformsCommon(uniforms: {
561
+ [uniform: string]: THREE.IUniform;
562
+ }, material: CustomPointMaterial, renderer: THREE.WebGLRenderer): void;
563
+ protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
564
+ copy(source: CustomPointMaterial): this;
565
+ }
566
+ export class MeshLineGeometry extends THREE.InstancedBufferGeometry {
567
+ type: string;
568
+ instanceStart: THREE.BufferAttribute;
569
+ instanceEnd: THREE.BufferAttribute;
570
+ instanceColorStart: THREE.BufferAttribute;
571
+ instanceColorEnd: THREE.BufferAttribute;
572
+
573
+ constructor();
574
+ applyMatrix4(matrix: THREE.Matrix4): this;
575
+ updatePoint(index: number, point: THREE.Vector3): void;
576
+ updateColor(index: number, color: THREE.Color): void;
577
+ setPoints(points: THREE.Vector3[]): this;
578
+ setPositions(array: ArrayLike<number>): this;
579
+ setColors(array: ArrayLike<number>): this;
580
+ computeLineDistances(): this;
581
+ toBufferGeometry(): THREE.BufferGeometry;
582
+ toWireframeGeometry(): THREE.BufferGeometry;
583
+ fromWireframeGeometry(geometry: THREE.WireframeGeometry): this;
584
+ fromEdgesGeometry(geometry: THREE.EdgesGeometry): this;
585
+ fromMesh(mesh: THREE.Mesh): this;
586
+ fromLineSegments(lineSegments: THREE.LineSegments): this;
587
+ computeBoundingBox(): void;
588
+ computeBoundingSphere(): void;
589
+ }
590
+ export class MeshLine extends THREE.Mesh {
591
+ type: string;
592
+ material: MeshLineMaterial;
593
+ geometry: MeshLineGeometry;
594
+
595
+ constructor(geometry?: MeshLineGeometry, material?: MeshLineMaterial);
596
+ raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
597
+ }
598
+ export class TPair<TKey, TValue> {
599
+ get key(): TKey;
600
+ get value(): TValue;
281
601
  }
282
602
  export type Point3 = {
283
603
  x: number;
@@ -373,6 +693,19 @@ export interface ICameraControl {
373
693
  */
374
694
  setNavigationMode(mode: CameraNavigationMode, isEnable: boolean, duration?: number): void;
375
695
  }
696
+ export type EventFunction<Data> = ((data: Data) => void) | (() => void);
697
+ export interface IEventListener<Data> {
698
+ dispose(): void;
699
+ }
700
+ export interface IEventSigner<Data> {
701
+ listen(callback: EventFunction<Data>, options?: {
702
+ bind?: object;
703
+ }): IEventListener<Data>;
704
+ unlisten(callback: EventFunction<Data>, options?: {
705
+ bind?: object;
706
+ allowMissing?: boolean;
707
+ }): boolean;
708
+ }
376
709
  export interface IModelIntersectionChecker {
377
710
  /** Gets the center of the model*/
378
711
  get modelCenter(): THREE.Vector3;
@@ -422,10 +755,6 @@ export interface IModelIntersectionChecker {
422
755
  guid: string;
423
756
  }[];
424
757
  }
425
- export class TPair<TKey, TValue> {
426
- get key(): TKey;
427
- get value(): TValue;
428
- }
429
758
  export class RenderViewSettings {
430
759
  telemetry?: boolean;
431
760
  hideEdgesWhenNavigation?: boolean;
@@ -532,6 +861,8 @@ export interface IUserScene {
532
861
  render(context: IRenderOperationContext): void;
533
862
  /** Clear scene */
534
863
  clear(): void;
864
+ /** Dispose scene */
865
+ dispose(): void;
535
866
  }
536
867
  export interface I3DRenderer {
537
868
  clear(color?: boolean, depth?: boolean, stencil?: boolean): void;
@@ -662,7 +993,9 @@ export enum ValueType {
662
993
  BOOL = 3
663
994
  }
664
995
  export class Viewer3DConfiguration extends ViewerConfiguration {
665
- settings?: ViewerSettings;
996
+ render: ViewerSettings;
997
+
998
+ constructor(appearance?: ViewerSettings, render?: ViewerSettings);
666
999
  }
667
1000
  export const defaultViewer3DSettings: ViewerSettings;
668
1001
  export enum IfcType {
@@ -2108,7 +2441,7 @@ export class Model {
2108
2441
  * Returns specific model part loaded in the viewer by its id.
2109
2442
  * @returns {ModelPart} - a model part with specified id
2110
2443
  */
2111
- getModelPart(id: string): ModelPart;
2444
+ getModelPart(id: string): ModelPart | null;
2112
2445
  /**
2113
2446
  * Gets visible model parst
2114
2447
  * @returns {ModelPart[]} - An array of visible model parts
@@ -2214,6 +2547,7 @@ export class Viewer3D extends ViewerBase {
2214
2547
  settings: Readonly<ISettings>;
2215
2548
  get navigation(): INavigation;
2216
2549
  events: Readonly<IEventsDispatcher>;
2550
+ getConfiguration(): Viewer3DConfiguration;
2217
2551
  start(): Promise<number>;
2218
2552
  finish(): void;
2219
2553
  /**
@@ -2250,7 +2584,16 @@ export class GuiViewer3D extends Viewer3D {
2250
2584
  onPostExtensionLoad(extension: ExtensionBase): void;
2251
2585
  protected getToolbarHeight(): number;
2252
2586
  }
2587
+ export type InitializeSuccessCallback = () => void;
2588
+ export function coreInitializer(options: InitializerOptions, callback: InitializeSuccessCallback): void;
2589
+ export function coreShutdown(): void;
2253
2590
  export function CreateViewer(container: HTMLElement, configuration?: Viewer3DConfiguration): GuiViewer3D;
2591
+ /**
2592
+ * @param options
2593
+ * @param callback
2594
+ */
2595
+ export function Initializer(options: InitializerOptions, callback: InitializeSuccessCallback): void;
2596
+ export function shutdown(): void;
2254
2597
  export class Extension extends ExtensionBase {
2255
2598
  protected _viewer: Viewer3D;
2256
2599
 
@@ -2361,13 +2704,99 @@ export class GizmoBuilder {
2361
2704
  static buildRotationAxis(axisDir: THREE.Vector3, handleBaseMatrial?: THREE.Material, handleHoveredMaterial?: THREE.Material, handleSelectedMaterial?: THREE.Material, pickerBaseMatrial?: THREE.Material, pickerHoveredMaterial?: THREE.Material, pickerSelectedMaterial?: THREE.Material): GizmoAxis;
2362
2705
  static buildScaleAxis(axisDir: THREE.Vector3, handleBaseMatrial?: THREE.Material, handleHoveredMaterial?: THREE.Material, handleSelectedMaterial?: THREE.Material): GizmoAxis;
2363
2706
  }
2364
- export type InitializeSuccessCallback = () => void;
2365
- /**
2366
- * @param options
2367
- * @param callback
2368
- */
2369
- export function Initializer(options: any, callback: InitializeSuccessCallback): void;
2370
- export function shutdown(): void;
2707
+ export interface LabelSpriteParameters {
2708
+ text?: string | undefined;
2709
+ sizeAttenuation?: boolean | undefined;
2710
+ fontFace?: string | FontFace | undefined;
2711
+ fontSize?: number | undefined;
2712
+ borderColor?: Color | undefined;
2713
+ backgroundColor?: Color | undefined;
2714
+ borderThickness?: number | undefined;
2715
+ borderRadius?: number | undefined;
2716
+ textColor?: Color | undefined;
2717
+ textPadding?: THREE.Vector4Tuple | undefined;
2718
+ }
2719
+ export class LabelSprite extends THREE.Sprite {
2720
+ readonly extraHeightFactor = 1.4;
2721
+
2722
+ constructor(parameters: LabelSpriteParameters);
2723
+ get sizeAttenuation(): boolean;
2724
+ set sizeAttenuation(value: boolean);
2725
+ /**
2726
+ * @default ''
2727
+ */
2728
+ get text(): string;
2729
+ set text(value: string);
2730
+ /**
2731
+ * @default 'Roboto, sans-serif'
2732
+ */
2733
+ get fontFace(): string | FontFace;
2734
+ set fontFace(value: string | FontFace);
2735
+ /**
2736
+ * @default 12
2737
+ */
2738
+ get fontSize(): number;
2739
+ set fontSize(value: number);
2740
+ /**
2741
+ * @default 2
2742
+ */
2743
+ get borderThickness(): number;
2744
+ set borderThickness(value: number);
2745
+ /**
2746
+ * @default new Color(0, 0, 0, 1.0)
2747
+ */
2748
+ get borderColor(): Color;
2749
+ set borderColor(value: Color);
2750
+ /**
2751
+ * @default 1
2752
+ */
2753
+ get borderRadius(): number;
2754
+ set borderRadius(value: number);
2755
+ /**
2756
+ * @default new Color(1.0, 1.0, 1.0, 1.0)
2757
+ */
2758
+ get backgroundColor(): Color;
2759
+ set backgroundColor(value: Color);
2760
+ /**
2761
+ * @default new Color(0, 0, 0, 1.0)
2762
+ */
2763
+ get textColor(): Color;
2764
+ set textColor(value: Color);
2765
+ /**
2766
+ * Label text padding: left, top, right, bottom
2767
+ * @default [0, 0, 0, 0]
2768
+ */
2769
+ get textPadding(): THREE.Vector4Tuple;
2770
+ set textPadding(value: THREE.Vector4Tuple);
2771
+ dispose(): void;
2772
+ }
2773
+ export interface IWindowStyle {
2774
+ width: string;
2775
+ height: string;
2776
+ left: string;
2777
+ right: string;
2778
+ top: string;
2779
+ }
2780
+ export interface IWindowStateOptions {
2781
+ saveKey: string;
2782
+ restoreWindowSize: boolean;
2783
+ }
2784
+ export class WindowStater {
2785
+ get windowStylesState(): IWindowStyle;
2786
+ get windowOptionsState(): IWindowStateOptions;
2787
+ restore(): void;
2788
+ saveWindowState(): void;
2789
+ }
2790
+ export class Resizer {
2791
+
2792
+ constructor(resizableContainer: HTMLElement, containerToRestriction: HTMLElement, elementAnchor?: HTMLElement, windowStater?: WindowStater);
2793
+ get windowState(): IWindowStyle | null;
2794
+ }
2795
+ export class Dragger {
2796
+
2797
+ constructor(allowedDraggableElement: HTMLElement, draggableContainer: HTMLElement, containerToRestriction: HTMLElement, windowStater?: WindowStater);
2798
+ get windowState(): IWindowStyle | null;
2799
+ }
2371
2800
  export class Button extends Control {
2372
2801
 
2373
2802
  constructor(id: string);
@@ -2402,5 +2831,32 @@ export namespace Button {
2402
2831
  CLICK = "click"
2403
2832
  }
2404
2833
  }
2834
+ interface ElementClass {
2835
+ panelClassName?: string;
2836
+ contentClassName?: string;
2837
+ headerClassName?: string;
2838
+ }
2839
+ export class Dialog extends Control {
2840
+ responseDialog: (state?: boolean) => void;
2841
+
2842
+ constructor(id: string, panelToAttach: HTMLElement);
2843
+ get dialog(): HTMLElement;
2844
+ get dialogContent(): HTMLElement;
2845
+ get resizable(): boolean;
2846
+ setDialogContent(value: HTMLElement): Dialog;
2847
+ setHeader(value: HTMLElement): Dialog;
2848
+ setCaption(value: string): Dialog;
2849
+ setIcon(iconClassName: string): Dialog;
2850
+ setFooter(value: HTMLElement): Dialog;
2851
+ setDialogElementClassNames(value: ElementClass): Dialog;
2852
+ setResizable(value: boolean): Dialog;
2853
+ setWindowOptions(value: IWindowStateOptions): Dialog;
2854
+ setDraggable(value: boolean): Dialog;
2855
+ openDialog(): HTMLElement;
2856
+ destroyDialog(): void;
2857
+ isDialogShown(): boolean;
2858
+ subscribe(fn: (state: boolean) => void): void;
2859
+ }
2860
+ export {};
2405
2861
 
2406
2862
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pilotdev/pilot-web-3d",
3
- "version": "23.0.3",
3
+ "version": "23.0.5",
4
4
  "description": "TypeScript definitions for ASCON PilotWeb3D component",
5
5
  "main": "",
6
6
  "types": "index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "license": "MIT",
10
10
  "typeScriptVersion": "4.9.4",
11
11
  "devDependencies": {
12
- "@types/three": "0.135.0"
12
+ "@types/three": "0.148.0"
13
13
  },
14
14
  "keywords": [
15
15
  "pilotdev",