@pilotdev/pilot-web-3d 23.0.12 → 24.2.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/index.d.ts +67 -7
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -275,6 +275,7 @@ export class CoreEventTypes {
|
|
|
275
275
|
static EXTENSION_LOADED: string;
|
|
276
276
|
static EXTENSION_UNLOADING: string;
|
|
277
277
|
static EXTENSION_UNLOADED: string;
|
|
278
|
+
static ACTIVE_EXTENSION_CHANGED_EVENT: string;
|
|
278
279
|
}
|
|
279
280
|
export class ExtensionEvent extends Event {
|
|
280
281
|
extensionName: string;
|
|
@@ -292,6 +293,7 @@ export interface IControl {
|
|
|
292
293
|
setToolTip(tooltipText: string): void;
|
|
293
294
|
setText(text: string): void;
|
|
294
295
|
setState(state: ControlState.State): void;
|
|
296
|
+
getState(): ControlState.State;
|
|
295
297
|
}
|
|
296
298
|
export class Control implements IControl {
|
|
297
299
|
container: HTMLElement;
|
|
@@ -303,6 +305,7 @@ export class Control implements IControl {
|
|
|
303
305
|
setToolTip(tooltipText: string): void;
|
|
304
306
|
setText(text: string): void;
|
|
305
307
|
setState(state: ControlState.State): void;
|
|
308
|
+
getState(): ControlState.State;
|
|
306
309
|
}
|
|
307
310
|
export enum ToolbarPosition {
|
|
308
311
|
TOP_FIXED = "ascn-toolbar-position-fixed-top",
|
|
@@ -352,6 +355,7 @@ export class ExtensionBase {
|
|
|
352
355
|
* @returns {string} Returns the name of the extension.
|
|
353
356
|
*/
|
|
354
357
|
getName(): string;
|
|
358
|
+
isActive(): boolean;
|
|
355
359
|
addCursorPhantomFromSvg(template: string): void;
|
|
356
360
|
removeCursorPhantom(): void;
|
|
357
361
|
onMouseDown(event: MouseEvent): void;
|
|
@@ -418,6 +422,11 @@ export class ViewerConfiguration {
|
|
|
418
422
|
mergeConfigurationAndSettings(configuration: ViewerSettings, settings: ISettings): void;
|
|
419
423
|
changeTheme(newTheme: string): void;
|
|
420
424
|
}
|
|
425
|
+
export class ExtensionActivationController {
|
|
426
|
+
getActive(): string;
|
|
427
|
+
activate(name: string): void;
|
|
428
|
+
deactivate(): void;
|
|
429
|
+
}
|
|
421
430
|
export type ErrorCallback = (message: string) => void;
|
|
422
431
|
export type SuccessCallback = (modelId: any) => void;
|
|
423
432
|
export enum DocumentType {
|
|
@@ -435,6 +444,7 @@ export abstract class ViewerBase {
|
|
|
435
444
|
readonly extensionsLoader: ExtensionLoader;
|
|
436
445
|
abstract settings: ISettings;
|
|
437
446
|
abstract events: IEventsDispatcher;
|
|
447
|
+
abstract activatedExtension: ExtensionActivationController;
|
|
438
448
|
get rootContainer(): HTMLElement;
|
|
439
449
|
getConfiguration(): ViewerConfiguration;
|
|
440
450
|
/**
|
|
@@ -494,8 +504,8 @@ export namespace Button {
|
|
|
494
504
|
}
|
|
495
505
|
export class SubMenu implements IMenu {
|
|
496
506
|
readonly controls: IControl[];
|
|
497
|
-
set selectedIndex(value:
|
|
498
|
-
get selectedIndex():
|
|
507
|
+
set selectedIndex(value: MDCListIndex);
|
|
508
|
+
get selectedIndex(): MDCListIndex;
|
|
499
509
|
setEnabled(index: number, value: boolean): void;
|
|
500
510
|
addControl(control: IControl, index?: number): void;
|
|
501
511
|
removeControl(index?: number): void;
|
|
@@ -529,13 +539,14 @@ export class Checkbox {
|
|
|
529
539
|
onChange(value: boolean): void;
|
|
530
540
|
createElement(): Element;
|
|
531
541
|
}
|
|
532
|
-
interface ISelectItem {
|
|
542
|
+
export interface ISelectItem {
|
|
533
543
|
text: string;
|
|
534
544
|
value: string;
|
|
535
545
|
}
|
|
536
546
|
export class Select {
|
|
537
547
|
|
|
538
548
|
constructor(id: string, items: ISelectItem[], placeholder: string);
|
|
549
|
+
get items(): ISelectItem[];
|
|
539
550
|
get select(): HTMLElement;
|
|
540
551
|
get disabled(): boolean;
|
|
541
552
|
set disabled(value: boolean);
|
|
@@ -543,15 +554,13 @@ export class Select {
|
|
|
543
554
|
set selectedIndex(value: number);
|
|
544
555
|
get placeholder(): string;
|
|
545
556
|
set placeholder(value: string);
|
|
546
|
-
get label():
|
|
547
|
-
get previousSelectedIndex(): number;
|
|
557
|
+
get label(): HTMLLabelElement;
|
|
548
558
|
onChange({ index, value }: {
|
|
549
559
|
index: any;
|
|
550
560
|
value: any;
|
|
551
561
|
}): void;
|
|
552
562
|
update(array: ISelectItem[], selectedIndex?: number): void;
|
|
553
563
|
}
|
|
554
|
-
export {};
|
|
555
564
|
export class ViewerToolbar extends Toolbar {
|
|
556
565
|
}
|
|
557
566
|
interface ElementClass {
|
|
@@ -613,6 +622,10 @@ export abstract class SettingsBase implements ISettings {
|
|
|
613
622
|
getSettingValue<T>(name: string): T;
|
|
614
623
|
protected abstract getKeyWithPrefix(key: string): string;
|
|
615
624
|
}
|
|
625
|
+
export function createSvgElement(svgString: string): HTMLElement;
|
|
626
|
+
export function isString(element: any): boolean;
|
|
627
|
+
export function isSvg(element: string): boolean;
|
|
628
|
+
export function isSvgString(element: any): boolean;
|
|
616
629
|
export const MouseButtons: {
|
|
617
630
|
Left: number;
|
|
618
631
|
Middle: number;
|
|
@@ -863,7 +876,7 @@ export interface IIntersectionChecker<TOptions> {
|
|
|
863
876
|
*/
|
|
864
877
|
getIntersectionPoint(): THREE.Intersection<THREE.Object3D> | undefined;
|
|
865
878
|
/**
|
|
866
|
-
* Gets {@link THREE.Intersection} between a casted {@link ray} and model object.
|
|
879
|
+
* Gets {@link THREE.Intersection<THREE.Object3D>} between a casted {@link ray} and model object.
|
|
867
880
|
* @param ray
|
|
868
881
|
* @param camera
|
|
869
882
|
* @param options - (optional) intersection check options.
|
|
@@ -907,6 +920,20 @@ export interface IIntersectionChecker<TOptions> {
|
|
|
907
920
|
modelId: string;
|
|
908
921
|
guid: string;
|
|
909
922
|
}[];
|
|
923
|
+
/**
|
|
924
|
+
* Gets all intersections between a ray, casted from {@link camera} to {@link ndcPoint} and model objects.
|
|
925
|
+
* @param ray
|
|
926
|
+
* @param camera
|
|
927
|
+
* @param options - (optional) intersection check options.
|
|
928
|
+
*/
|
|
929
|
+
getAllIntersectionsByRay(ray: THREE.Ray, camera: THREE.Camera, options?: TOptions): THREE.Intersection<THREE.Object3D>[];
|
|
930
|
+
/**
|
|
931
|
+
* Gets IDs of the model objects intersected by ray, casted from {@link camera} to {@link ndcPoint}.
|
|
932
|
+
* @param ndcPos
|
|
933
|
+
* @param camera
|
|
934
|
+
* @param options - (optional) intersection check options.
|
|
935
|
+
*/
|
|
936
|
+
getAllIntersectionsByNdcPt(ndcPos: THREE.Vector2, camera: THREE.Camera, options?: TOptions): THREE.Intersection<THREE.Object3D>[];
|
|
910
937
|
}
|
|
911
938
|
export interface ISceneIntersectionChecker extends IIntersectionChecker<SceneCheckOptions> {
|
|
912
939
|
/** Gets the bounding box of the scene*/
|
|
@@ -2963,6 +2990,7 @@ export class DeletionManager {
|
|
|
2963
2990
|
* This class describes the coordination model. The coordination model contains parts of the model (aka ModelPart).
|
|
2964
2991
|
*/
|
|
2965
2992
|
export class Model {
|
|
2993
|
+
readonly eventDispatcher: IEventsDispatcher;
|
|
2966
2994
|
/**
|
|
2967
2995
|
* Returns all model parts loaded in the viewer.
|
|
2968
2996
|
* @returns {ModelPart[]} - An array of visible and hidden model parts
|
|
@@ -3114,6 +3142,21 @@ export class Model {
|
|
|
3114
3142
|
* @param filter - filter to remove.
|
|
3115
3143
|
*/
|
|
3116
3144
|
removeDeletionFilter(filter: DeleteEventFilter): void;
|
|
3145
|
+
/**
|
|
3146
|
+
* Set model version.
|
|
3147
|
+
* @param value - specified version of the model.
|
|
3148
|
+
*/
|
|
3149
|
+
setModelVersion(value: bigint): void;
|
|
3150
|
+
/**
|
|
3151
|
+
* Get current version of the model.
|
|
3152
|
+
* @returns current model version.
|
|
3153
|
+
*/
|
|
3154
|
+
getModelVersion(): bigint;
|
|
3155
|
+
/**
|
|
3156
|
+
* Get list of all model versions.
|
|
3157
|
+
* @returns list of all model versions.
|
|
3158
|
+
*/
|
|
3159
|
+
getAllModelVersions(): bigint[];
|
|
3117
3160
|
}
|
|
3118
3161
|
export interface INavigation {
|
|
3119
3162
|
/**
|
|
@@ -3187,6 +3230,7 @@ export class Viewer3D extends ViewerBase {
|
|
|
3187
3230
|
protected _configuration: Viewer3DConfiguration;
|
|
3188
3231
|
settings: Readonly<ISettings>;
|
|
3189
3232
|
events: Readonly<IEventsDispatcher>;
|
|
3233
|
+
activatedExtension: ExtensionActivationController;
|
|
3190
3234
|
/**
|
|
3191
3235
|
* Returns general model
|
|
3192
3236
|
* @returns { Model } - general model
|
|
@@ -3206,12 +3250,28 @@ export class Viewer3D extends ViewerBase {
|
|
|
3206
3250
|
* @param onErrorCallback
|
|
3207
3251
|
*/
|
|
3208
3252
|
loadModelPart(data: ArrayBuffer | string, options: ModelLoadingOptions, onSuccessCallback: SuccessCallback, onErrorCallback: ErrorCallback): void;
|
|
3253
|
+
/**
|
|
3254
|
+
* Updates the model part data file
|
|
3255
|
+
* @param data
|
|
3256
|
+
* @param options
|
|
3257
|
+
* @param onSuccessCallback
|
|
3258
|
+
* @param onErrorCallback
|
|
3259
|
+
*/
|
|
3260
|
+
updateModelPart(data: ArrayBuffer | string, options: ModelLoadingOptions, onSuccessCallback: SuccessCallback, onErrorCallback: ErrorCallback): void;
|
|
3209
3261
|
/**
|
|
3210
3262
|
* unloads model part from the viewer
|
|
3211
3263
|
* @param modelPart - model part id or model part instance
|
|
3212
3264
|
*/
|
|
3213
3265
|
unloadModelPart(modelPart?: string | ModelPart): void;
|
|
3266
|
+
/**
|
|
3267
|
+
* Sets virtual origin of the model
|
|
3268
|
+
* @param point \{ x , y , z } coordinates of the virtual origin
|
|
3269
|
+
*/
|
|
3214
3270
|
setVirtualOrigin(point: Point3): Promise<void>;
|
|
3271
|
+
/**
|
|
3272
|
+
* Gets virtual origin of the model
|
|
3273
|
+
* @returns \{ x , y , z } coordinates of the virtual origin
|
|
3274
|
+
*/
|
|
3215
3275
|
getVirtualOrigin(): Point3;
|
|
3216
3276
|
/**
|
|
3217
3277
|
* Makes screenshot
|