@pilotdev/pilot-web-3d 23.0.8 → 23.0.10

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 +40 -107
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -26,12 +26,16 @@ export enum UpdateType {
26
26
  }
27
27
  export const zeroGuid = "00000000-0000-0000-0000-000000000000";
28
28
  export class Color {
29
- r: number;
30
- g: number;
31
- b: number;
32
- a: number;
33
29
 
34
30
  constructor(r: number, g: number, b: number, a: number);
31
+ get r(): number;
32
+ set r(value: number);
33
+ get g(): number;
34
+ set g(value: number);
35
+ get b(): number;
36
+ set b(value: number);
37
+ get a(): number;
38
+ set a(value: number);
35
39
  static fromThreeColor(color: THREE.Color, alpha?: number): Color;
36
40
  static fromColorRepresentation(representation: THREE.ColorRepresentation): Color;
37
41
  static fromMaterial(material: THREE.Material): Color;
@@ -47,6 +51,7 @@ export abstract class ViewObject extends THREE.Object3D {
47
51
  protected _isHovered: boolean;
48
52
  protected _isVisible: boolean;
49
53
  protected _isHidden: boolean;
54
+ protected _isDecomposed: boolean;
50
55
  protected _originalColor: Color;
51
56
  /**
52
57
  * model element entity guid
@@ -73,6 +78,12 @@ export abstract class ViewObject extends THREE.Object3D {
73
78
  remove(...object: THREE.Object3D<THREE.Event>[]): this;
74
79
  updateMatrixWorld(force?: boolean): void;
75
80
  updateWorldMatrix(updateParents: boolean, updateChildren: boolean): void;
81
+ updateMatrix(): void;
82
+ applyMatrix4(matrix: THREE.Matrix4): void;
83
+ /** */
84
+ setDecomposed(value: boolean): void;
85
+ /**Check if object is decomposed: have valid position, quaternion, scale, up vectors */
86
+ isDecomposed(): boolean;
76
87
  /**Set visibility of this object */
77
88
  setVisible(iVal: boolean): void;
78
89
  /**Get visibility of this object */
@@ -137,9 +148,13 @@ export abstract class CustomMaterial extends THREE.ShaderMaterial {
137
148
  protected refreshTransformUniform(map: THREE.Texture, uniform: THREE.IUniform): void;
138
149
  protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
139
150
  }
140
- export interface CustomMeshLambertMaterialParameters extends THREE.ShaderMaterialParameters, THREE.MeshLambertMaterialParameters {
151
+ export interface CustomMeshLambertMaterialParameters extends THREE.ShaderMaterialParameters {
141
152
  instancing?: boolean | undefined;
142
153
  instancingColor?: boolean | undefined;
154
+ color?: THREE.ColorRepresentation | undefined;
155
+ emissive?: THREE.ColorRepresentation | undefined;
156
+ emissiveIntensity?: number | undefined;
157
+ fog?: boolean | undefined;
143
158
  }
144
159
  export class CustomMeshLambertMaterial extends CustomMaterial {
145
160
  type: string;
@@ -159,26 +174,6 @@ export class CustomMeshLambertMaterial extends CustomMaterial {
159
174
  * @default new THREE.Color( 0xffffff )
160
175
  */
161
176
  color: THREE.Color;
162
- /**
163
- * @default null
164
- */
165
- bumpMap: THREE.Texture | null;
166
- /**
167
- * @default 1
168
- */
169
- bumpScale: number;
170
- /**
171
- * @default null
172
- */
173
- displacementMap: THREE.Texture | null;
174
- /**
175
- * @default 1
176
- */
177
- displacementScale: number;
178
- /**
179
- * @default 0
180
- */
181
- displacementBias: number;
182
177
  /**
183
178
  * @default new THREE.Color( 0x000000 )
184
179
  */
@@ -187,83 +182,6 @@ export class CustomMeshLambertMaterial extends CustomMaterial {
187
182
  * @default 1
188
183
  */
189
184
  emissiveIntensity: number;
190
- /**
191
- * @default null
192
- */
193
- emissiveMap: THREE.Texture | null;
194
- /**
195
- * @default false
196
- */
197
- flatShading: boolean;
198
- /**
199
- * @default null
200
- */
201
- map: THREE.Texture | null;
202
- /**
203
- * @default null
204
- */
205
- lightMap: THREE.Texture | null;
206
- /**
207
- * @default 1
208
- */
209
- lightMapIntensity: number;
210
- /**
211
- * @default null
212
- */
213
- normalMap: THREE.Texture | null;
214
- normalMapType: THREE.NormalMapTypes;
215
- /**
216
- * @default new THREE.Vector2( 1, 1 )
217
- */
218
- normalScale: THREE.Vector2;
219
- /**
220
- * @default null
221
- */
222
- aoMap: THREE.Texture | null;
223
- /**
224
- * @default 1
225
- */
226
- aoMapIntensity: number;
227
- /**
228
- * @default null
229
- */
230
- specularMap: THREE.Texture | null;
231
- /**
232
- * @default null
233
- */
234
- alphaMap: THREE.Texture | null;
235
- /**
236
- * @default null
237
- */
238
- envMap: THREE.Texture | null;
239
- /**
240
- * @default THREE.MultiplyOperation
241
- */
242
- combine: THREE.Combine;
243
- /**
244
- * @default 1
245
- */
246
- reflectivity: number;
247
- /**
248
- * @default 0.98
249
- */
250
- refractionRatio: number;
251
- /**
252
- * @default false
253
- */
254
- wireframe: boolean;
255
- /**
256
- * @default 1
257
- */
258
- wireframeLinewidth: number;
259
- /**
260
- * @default 'round'
261
- */
262
- wireframeLinecap: string;
263
- /**
264
- * @default 'round'
265
- */
266
- wireframeLinejoin: string;
267
185
  /**
268
186
  * Whether the material is affected by fog. Default is true.
269
187
  * @default fog
@@ -420,6 +338,7 @@ export namespace Viewer2DIcons {
420
338
  const REMARK_CIRCLE_ICON: string;
421
339
  const ZOOM_IN: string;
422
340
  const ZOOM_OUT: string;
341
+ const FIT_WIDTH: string;
423
342
  }
424
343
  export class MeshLineGeometry extends THREE.InstancedBufferGeometry {
425
344
  type: string;
@@ -489,6 +408,7 @@ export class RenderEventTypes {
489
408
  static RENDER_CLICK_EVENT: string;
490
409
  static RENDER_HOVER_EVENT: string;
491
410
  static RENDER_DOUBLE_CLICK_EVENT: string;
411
+ static RENDER_DELETE_EVENT: string;
492
412
  }
493
413
  export class SelectionChangedEvent extends Event {
494
414
  selectedIds: ModelElementIds[];
@@ -508,6 +428,11 @@ export class HoverEvent extends Event {
508
428
 
509
429
  constructor(type: string, modelId: string, modelElementId: string);
510
430
  }
431
+ export class DeleteEvent extends Event {
432
+ deletedIds: ModelElementIds[];
433
+
434
+ constructor(type: string, deletedIds?: ModelElementIds[]);
435
+ }
511
436
  export class GlobalEvents {
512
437
  static events: EventsDispatcherCore;
513
438
  }
@@ -1009,7 +934,7 @@ export class ModelElementTree {
1009
934
  * Gets the root element of the model part
1010
935
  * @returns {ModelElement} - model element instance
1011
936
  */
1012
- getRootElement(): ModelElement;
937
+ getRootElement(): ModelElement | undefined;
1013
938
  /**
1014
939
  * Gets all elements of the model part
1015
940
  * @returns array of the model elements
@@ -1020,7 +945,7 @@ export class ModelElementTree {
1020
945
  * @param { string } id - model element id
1021
946
  * @returns model element;
1022
947
  */
1023
- getElement(id: string): ModelElement;
948
+ getElement(id: string): ModelElement | undefined;
1024
949
  /**
1025
950
  * Checks given element is viewable
1026
951
  * @param {string|ModelElement} element - element id or element instance
@@ -1254,6 +1179,7 @@ export class CoreEventTypes {
1254
1179
  static VIEWER_MOUSE_MOVE_EVENT: string;
1255
1180
  static VIEWER_MOUSE_UP_EVENT: string;
1256
1181
  static VIEWER_MOUSE_LONG_TOUCH_EVENT: string;
1182
+ static VIEWER_MOUSE_WHEEL: string;
1257
1183
  static VIEWER_TOUCHSTART_EVENT: string;
1258
1184
  static VIEWER_TOUCHEND_EVENT: string;
1259
1185
  static SETTING_CHANGED_EVENT: string;
@@ -1327,7 +1253,6 @@ export class ExtensionBase {
1327
1253
  onToolbarCreated(toolbar: Toolbar): void;
1328
1254
  onTouchStart(event: TouchEvent): void;
1329
1255
  onTouchEnd(event: TouchEvent): void;
1330
- protected bindDomEvents(): void;
1331
1256
  }
1332
1257
  export class ExtensionManager {
1333
1258
  registerExtensionType(extensionId: string, extension: typeof ExtensionBase): boolean;
@@ -2747,6 +2672,7 @@ export class EventTypes extends CoreEventTypes {
2747
2672
  static RENDER_CLICK_EVENT: string;
2748
2673
  static RENDER_HOVER_EVENT: string;
2749
2674
  static RENDER_DOUBLE_CLICK_EVENT: string;
2675
+ static RENDER_DELETE_EVENT: string;
2750
2676
  }
2751
2677
  export class ModelPartEvent extends Event {
2752
2678
  modelPartId: string;
@@ -3054,16 +2980,22 @@ export class MeshPoints extends THREE.Mesh {
3054
2980
  dispose(): void;
3055
2981
  raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]): void;
3056
2982
  }
2983
+ export class DeviceEventHandler {
2984
+ static isMobile: boolean;
2985
+ static eventStartType: string;
2986
+ static eventProcessType: string;
2987
+ static eventEndType: string;
2988
+ }
3057
2989
  export interface IWindowStyle {
3058
2990
  width: string;
3059
2991
  height: string;
3060
2992
  left: string;
3061
- right: string;
3062
2993
  top: string;
3063
2994
  }
3064
2995
  export interface IWindowStateOptions {
3065
2996
  saveKey: string;
3066
- restoreWindowSize: boolean;
2997
+ restoreWindowSize?: boolean;
2998
+ restoreWindowPosition?: boolean;
3067
2999
  }
3068
3000
  export class WindowStater {
3069
3001
  get windowStylesState(): IWindowStyle;
@@ -3193,6 +3125,7 @@ export class Dialog extends Control {
3193
3125
  setResizable(value: boolean): Dialog;
3194
3126
  setWindowOptions(value: IWindowStateOptions): Dialog;
3195
3127
  setDraggable(value: boolean): Dialog;
3128
+ setCloseble(value: boolean): Dialog;
3196
3129
  openDialog(x?: number, y?: number): HTMLElement;
3197
3130
  destroyDialog(): void;
3198
3131
  isDialogShown(): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pilotdev/pilot-web-3d",
3
- "version": "23.0.8",
3
+ "version": "23.0.10",
4
4
  "description": "TypeScript definitions for ASCON PilotWeb3D component",
5
5
  "main": "",
6
6
  "types": "index.d.ts",