@pilotdev/pilot-web-3d 23.0.4 → 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.
- package/index.d.ts +418 -84
- package/package.json +2 -2
- package/.script.py +0 -15
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():
|
|
22
|
+
getExtensions(): string[];
|
|
17
23
|
}
|
|
18
24
|
export interface ILayerManager {
|
|
19
25
|
createLayer(name: string): ILayer;
|
|
@@ -74,42 +80,51 @@ export class InMemorySettingsStorage implements ISettingsStorage {
|
|
|
74
80
|
getKeys(): string[];
|
|
75
81
|
}
|
|
76
82
|
export interface ISettings {
|
|
77
|
-
changeSetting<T>(name: string, value: T, notify?: boolean): void;
|
|
83
|
+
changeSetting<T>(name: string, value: T, notify?: boolean, providedData?: any): void;
|
|
78
84
|
getSettingValue<T>(name: string): T;
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
export class BaseSettingsNames {
|
|
82
88
|
static TOOLBAR: string;
|
|
89
|
+
static TOOLBAR_DIRECTION: string;
|
|
90
|
+
static TOOLBAR_CONTENT: string;
|
|
83
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
|
}
|
|
96
105
|
export enum ToolbarDirection {
|
|
97
|
-
TOP_FIXED = "ascn-toolbar-fixed-top",
|
|
98
|
-
TOP_FLUENT = "ascn-toolbar-top",
|
|
99
|
-
BOTTOM_FIXED = "ascn-toolbar-fixed-bottom",
|
|
100
|
-
BOTTOM_FLUENT = "ascn-toolbar-bottom"
|
|
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"
|
|
101
110
|
}
|
|
102
111
|
export enum ToolbarContent {
|
|
103
112
|
CENTER = "ascn-toolbar-content-center",
|
|
104
113
|
START = "ascn-toolbar-content-start",
|
|
105
114
|
END = "ascn-toolbar-content-end"
|
|
106
115
|
}
|
|
116
|
+
export interface ToolbarOptions {
|
|
117
|
+
height: number;
|
|
118
|
+
direction: ToolbarDirection;
|
|
119
|
+
}
|
|
107
120
|
export interface ToolbarStyle {
|
|
108
121
|
direction?: ToolbarDirection;
|
|
109
122
|
content?: ToolbarContent;
|
|
110
123
|
}
|
|
124
|
+
export const defaultToolbarAppearance: ToolbarStyle;
|
|
111
125
|
export type ViewerSettings = Record<string, any>;
|
|
112
126
|
export class ViewerConfiguration {
|
|
127
|
+
settingsPrefix: string;
|
|
113
128
|
appearance: ViewerSettings;
|
|
114
129
|
createConfiguration(configuration: ViewerSettings, origin: ViewerSettings): void;
|
|
115
130
|
}
|
|
@@ -126,11 +141,12 @@ export abstract class ViewerBase {
|
|
|
126
141
|
protected _loadingSpinner: LoadingSpinner;
|
|
127
142
|
protected _documentType: DocumentType;
|
|
128
143
|
protected _configuration: ViewerConfiguration;
|
|
129
|
-
container: HTMLElement;
|
|
130
|
-
layerManagers: Map<number, ILayerManager>;
|
|
131
|
-
extensionsLoader: ExtensionLoader;
|
|
144
|
+
readonly container: HTMLElement;
|
|
145
|
+
readonly layerManagers: Map<number, ILayerManager>;
|
|
146
|
+
readonly extensionsLoader: ExtensionLoader;
|
|
132
147
|
abstract settings: ISettings;
|
|
133
148
|
abstract events: IEventsDispatcher;
|
|
149
|
+
get rootContainer(): HTMLElement;
|
|
134
150
|
getConfiguration(): ViewerConfiguration;
|
|
135
151
|
/**
|
|
136
152
|
*
|
|
@@ -158,6 +174,8 @@ export class Toolbar extends Control {
|
|
|
158
174
|
constructor(id: string, toolbarContainer: HTMLElement, options?: ToolbarStyle);
|
|
159
175
|
addControl(control: Control): void;
|
|
160
176
|
removeControl(id: string): void;
|
|
177
|
+
changeToolbarPosition(direction: string): void;
|
|
178
|
+
changeToolbarContent(content: string): void;
|
|
161
179
|
}
|
|
162
180
|
export class ExtensionBase {
|
|
163
181
|
protected _viewer: ViewerBase;
|
|
@@ -289,79 +307,297 @@ export abstract class ViewObject extends THREE.Object3D {
|
|
|
289
307
|
*/
|
|
290
308
|
protected riseOnUpdated(updateType?: UpdateType, object?: THREE.Object3D): void;
|
|
291
309
|
}
|
|
292
|
-
export class
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
*
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
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;
|
|
450
|
+
}
|
|
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;
|
|
315
493
|
}
|
|
316
494
|
export interface MeshLineMaterialParameters extends THREE.ShaderMaterialParameters {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
export class MeshLineMaterial extends THREE.ShaderMaterial {
|
|
333
|
-
isMeshLineMaterial: boolean;
|
|
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;
|
|
334
509
|
|
|
335
510
|
constructor(parameters: MeshLineMaterialParameters);
|
|
336
|
-
get lineWidth(): number;
|
|
337
|
-
set lineWidth(value: number);
|
|
338
|
-
get map(): THREE.Texture;
|
|
339
|
-
set map(value: THREE.Texture);
|
|
340
|
-
get useMap(): number;
|
|
341
|
-
set useMap(value: number);
|
|
342
|
-
get alphaMap(): THREE.Texture;
|
|
343
|
-
set alphaMap(value: THREE.Texture);
|
|
344
|
-
get useAlphaMap(): number;
|
|
345
|
-
set useAlphaMap(value: number);
|
|
346
511
|
get color(): THREE.Color;
|
|
347
|
-
set color(value: THREE.
|
|
348
|
-
get
|
|
349
|
-
set
|
|
350
|
-
get
|
|
351
|
-
set
|
|
352
|
-
get
|
|
353
|
-
set
|
|
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);
|
|
354
521
|
get dashOffset(): number;
|
|
355
522
|
set dashOffset(value: number);
|
|
356
|
-
get
|
|
357
|
-
set
|
|
358
|
-
get
|
|
359
|
-
set
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
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;
|
|
365
601
|
}
|
|
366
602
|
export type Point3 = {
|
|
367
603
|
x: number;
|
|
@@ -519,10 +755,6 @@ export interface IModelIntersectionChecker {
|
|
|
519
755
|
guid: string;
|
|
520
756
|
}[];
|
|
521
757
|
}
|
|
522
|
-
export class TPair<TKey, TValue> {
|
|
523
|
-
get key(): TKey;
|
|
524
|
-
get value(): TValue;
|
|
525
|
-
}
|
|
526
758
|
export class RenderViewSettings {
|
|
527
759
|
telemetry?: boolean;
|
|
528
760
|
hideEdgesWhenNavigation?: boolean;
|
|
@@ -2315,7 +2547,7 @@ export class Viewer3D extends ViewerBase {
|
|
|
2315
2547
|
settings: Readonly<ISettings>;
|
|
2316
2548
|
get navigation(): INavigation;
|
|
2317
2549
|
events: Readonly<IEventsDispatcher>;
|
|
2318
|
-
|
|
2550
|
+
getConfiguration(): Viewer3DConfiguration;
|
|
2319
2551
|
start(): Promise<number>;
|
|
2320
2552
|
finish(): void;
|
|
2321
2553
|
/**
|
|
@@ -2472,6 +2704,99 @@ export class GizmoBuilder {
|
|
|
2472
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;
|
|
2473
2705
|
static buildScaleAxis(axisDir: THREE.Vector3, handleBaseMatrial?: THREE.Material, handleHoveredMaterial?: THREE.Material, handleSelectedMaterial?: THREE.Material): GizmoAxis;
|
|
2474
2706
|
}
|
|
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
|
+
}
|
|
2475
2800
|
export class Button extends Control {
|
|
2476
2801
|
|
|
2477
2802
|
constructor(id: string);
|
|
@@ -2514,14 +2839,23 @@ interface ElementClass {
|
|
|
2514
2839
|
export class Dialog extends Control {
|
|
2515
2840
|
responseDialog: (state?: boolean) => void;
|
|
2516
2841
|
|
|
2517
|
-
constructor(id: string, panelToAttach: HTMLElement
|
|
2842
|
+
constructor(id: string, panelToAttach: HTMLElement);
|
|
2518
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;
|
|
2519
2855
|
openDialog(): HTMLElement;
|
|
2520
2856
|
destroyDialog(): void;
|
|
2521
2857
|
isDialogShown(): boolean;
|
|
2522
2858
|
subscribe(fn: (state: boolean) => void): void;
|
|
2523
|
-
addCheckBox(value: boolean, caption: string, id: string, action: (isChecked: boolean) => void): void;
|
|
2524
|
-
addComboBox(index: number, caption: string, id: string, values: string[], action: (selectedIndex: number) => void): void;
|
|
2525
2859
|
}
|
|
2526
2860
|
export {};
|
|
2527
2861
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pilotdev/pilot-web-3d",
|
|
3
|
-
"version": "23.0.
|
|
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.
|
|
12
|
+
"@types/three": "0.148.0"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
15
|
"pilotdev",
|
package/.script.py
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
text = '''
|
|
2
|
-
; good config
|
|
3
|
-
;@myorg:registry=https://somewhere-else.com/myorg
|
|
4
|
-
;@another:registry=https://somewhere-else.com/another
|
|
5
|
-
//registry.npmjs.org/:_authToken=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
|
|
6
|
-
; would apply to both @myorg and @another
|
|
7
|
-
; //somewhere-else.com/:_authToken=MYTOKEN
|
|
8
|
-
; would apply only to @myorg
|
|
9
|
-
;//somewhere-else.com/myorg/:_authToken=MYTOKEN1
|
|
10
|
-
; would apply only to @another
|
|
11
|
-
;//somewhere-else.com/another/:_authToken=MYTOKEN2
|
|
12
|
-
'''
|
|
13
|
-
file = open("/home/teamcityagent/.BuildAgent/work/3abf6afd0f88818/3d_view/types/.npmrc","w")
|
|
14
|
-
file.write(text)
|
|
15
|
-
file.close()
|