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

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 (3) hide show
  1. package/README.md +0 -4
  2. package/index.d.ts +134 -89
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -3,7 +3,3 @@
3
3
 
4
4
  # Summary
5
5
  This package contains type definitions for Ascon **PilotWeb3D** component (https://pilotcloud.ascon.net/).
6
-
7
- ### Additional Details
8
- * Last updated: Thu, 15 Nov 2022 16:10:25 GMT
9
- * Global values: `PilotWeb3d`
package/index.d.ts CHANGED
@@ -58,6 +58,11 @@ export abstract class ViewObject extends THREE.Object3D {
58
58
  * @default zeroGuid
59
59
  */
60
60
  readonly modelGuid: string;
61
+ /**
62
+ * If true, applies this object's renderOrder as a groupOrder to its children.
63
+ * @default true
64
+ */
65
+ readonly isGroup: boolean;
61
66
 
62
67
  constructor(entityGuid?: string, modelGuid?: string, color?: Color);
63
68
  /**Mesh representation of the object */
@@ -125,13 +130,16 @@ export abstract class CustomMaterial extends THREE.ShaderMaterial {
125
130
 
126
131
  constructor();
127
132
  copy(source: CustomMaterial): this;
128
- protected customProgramCacheKeyCallback(): string;
129
- protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
133
+ protected refreshUniforms(uniforms: {
134
+ [uniform: string]: THREE.IUniform;
135
+ }, material: CustomMaterial, renderer: THREE.WebGLRenderer): void;
130
136
  protected onBeforeCompileCallback(shader: THREE.Shader): void;
131
137
  protected refreshTransformUniform(map: THREE.Texture, uniform: THREE.IUniform): void;
138
+ protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
132
139
  }
133
140
  export interface CustomMeshLambertMaterialParameters extends THREE.ShaderMaterialParameters, THREE.MeshLambertMaterialParameters {
134
141
  instancing?: boolean | undefined;
142
+ instancingColor?: boolean | undefined;
135
143
  }
136
144
  export class CustomMeshLambertMaterial extends CustomMaterial {
137
145
  type: string;
@@ -142,6 +150,11 @@ export class CustomMeshLambertMaterial extends CustomMaterial {
142
150
  */
143
151
  get instancing(): boolean;
144
152
  set instancing(value: boolean);
153
+ /**
154
+ * @default false
155
+ */
156
+ get instancingColor(): boolean;
157
+ set instancingColor(value: boolean);
145
158
  /**
146
159
  * @default new THREE.Color( 0xffffff )
147
160
  */
@@ -259,11 +272,15 @@ export class CustomMeshLambertMaterial extends CustomMaterial {
259
272
  protected refreshUniformsCommon(uniforms: {
260
273
  [uniform: string]: THREE.IUniform;
261
274
  }, material: CustomMeshLambertMaterial, renderer: THREE.WebGLRenderer): void;
262
- protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
275
+ protected refreshUniforms(uniforms: {
276
+ [uniform: string]: THREE.IUniform<any>;
277
+ }, material: CustomMaterial, renderer: THREE.WebGLRenderer): void;
263
278
  copy(source: CustomMeshLambertMaterial): this;
264
279
  }
265
- export interface CustomLineMaterialParameters extends THREE.ShaderMaterialParameters, THREE.LineBasicMaterialParameters {
280
+ export interface CustomLineMaterialParameters extends THREE.ShaderMaterialParameters {
266
281
  instancing?: boolean | undefined;
282
+ instancingColor?: boolean | undefined;
283
+ color?: THREE.ColorRepresentation | undefined;
267
284
  }
268
285
  export class CustomLineMaterial extends CustomMaterial {
269
286
  type: string;
@@ -275,70 +292,67 @@ export class CustomLineMaterial extends CustomMaterial {
275
292
  get instancing(): boolean;
276
293
  set instancing(value: boolean);
277
294
  /**
278
- * @default 0xffffff
279
- */
280
- color: THREE.Color;
281
- /**
282
- * Whether the material is affected by fog. Default is true.
283
- * @default true
284
- */
285
- fog: boolean;
286
- /**
287
- * @default 1
288
- */
289
- linewidth: number;
290
- /**
291
- * @default 'round'
292
- */
293
- linecap: string;
294
- /**
295
- * @default 'round'
295
+ * @default false
296
296
  */
297
- linejoin: string;
297
+ get instancingColor(): boolean;
298
+ set instancingColor(value: boolean);
298
299
  /**
299
- * @default null
300
+ * @default 0xffffff
300
301
  */
301
- map: THREE.Texture | null;
302
- protected refreshUniformsCommon(uniforms: {
302
+ color: THREE.Color;
303
+ copy(source: CustomLineMaterial): this;
304
+ protected refreshUniforms(uniforms: {
303
305
  [uniform: string]: THREE.IUniform;
304
306
  }, material: CustomLineMaterial, renderer: THREE.WebGLRenderer): void;
305
- protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
306
- copy(source: CustomLineMaterial): this;
307
307
  }
308
308
  export interface MeshLineMaterialParameters extends THREE.ShaderMaterialParameters {
309
- alphaToCoverage?: boolean | undefined;
310
309
  color?: THREE.ColorRepresentation | undefined;
311
310
  dashed?: boolean | undefined;
312
311
  dashScale?: number | undefined;
313
312
  dashSize?: number | undefined;
314
313
  dashOffset?: number | undefined;
315
314
  gapSize?: number | undefined;
316
- linewidth?: number | undefined;
317
- resolution?: THREE.Vector2 | undefined;
318
- wireframe?: boolean | undefined;
319
315
  worldUnits?: boolean | undefined;
320
316
  }
321
317
  export class MeshLineMaterial extends CustomMaterial {
322
318
  type: string;
323
319
 
324
320
  constructor(parameters: MeshLineMaterialParameters);
325
- get color(): THREE.Color;
326
- set color(value: THREE.ColorRepresentation);
321
+ /**
322
+ * @default false
323
+ */
327
324
  get worldUnits(): boolean;
328
325
  set worldUnits(value: boolean);
326
+ /**
327
+ * @default false
328
+ */
329
329
  get dashed(): boolean;
330
330
  set dashed(value: boolean);
331
- get dashScale(): number;
332
- set dashScale(value: number);
333
- get dashSize(): number;
334
- set dashSize(value: number);
335
- get dashOffset(): number;
336
- set dashOffset(value: number);
337
- get gapSize(): number;
338
- set gapSize(value: number);
339
331
  get resolution(): THREE.Vector2;
340
- set resolution(value: THREE.Vector2);
341
- onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
332
+ /**
333
+ * @default 0xffffff
334
+ */
335
+ color: THREE.Color;
336
+ /**
337
+ * @default 1
338
+ */
339
+ dashScale: number;
340
+ /**
341
+ * @default 1
342
+ */
343
+ dashSize: number;
344
+ /**
345
+ * @default 0
346
+ */
347
+ dashOffset: number;
348
+ /**
349
+ * @default 1
350
+ */
351
+ gapSize: number;
352
+ copy(source: MeshLineMaterial): this;
353
+ protected refreshUniforms(uniforms: {
354
+ [uniform: string]: THREE.IUniform<any>;
355
+ }, material: CustomMaterial, renderer: THREE.WebGLRenderer): void;
342
356
  }
343
357
  export interface CustomPointMaterialParameters extends THREE.ShaderMaterialParameters, THREE.PointsMaterialParameters {
344
358
  }
@@ -366,16 +380,13 @@ export class CustomPointMaterial extends CustomMaterial {
366
380
  * @default true
367
381
  */
368
382
  sizeAttenuation: boolean;
369
- /**
370
- * Whether the material is affected by fog. Default is true.
371
- * @default fog
372
- */
373
- fog: boolean;
383
+ copy(source: CustomPointMaterial): this;
374
384
  protected refreshUniformsCommon(uniforms: {
375
385
  [uniform: string]: THREE.IUniform;
376
386
  }, material: CustomPointMaterial, renderer: THREE.WebGLRenderer): void;
377
- protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
378
- copy(source: CustomPointMaterial): this;
387
+ protected refreshUniforms(uniforms: {
388
+ [uniform: string]: THREE.IUniform<any>;
389
+ }, material: CustomMaterial, renderer: THREE.WebGLRenderer): void;
379
390
  }
380
391
  export namespace Viewer3DIcons {
381
392
  const VIEWER_SETTINGS_ICON: string;
@@ -1103,7 +1114,6 @@ export interface CustomSpriteMaterialParameters extends THREE.ShaderMaterialPara
1103
1114
  alphaMap?: THREE.Texture | null | undefined;
1104
1115
  rotation?: number | undefined;
1105
1116
  sizeAttenuation?: boolean | undefined;
1106
- fog?: boolean | undefined;
1107
1117
  center?: THREE.Vector2 | undefined;
1108
1118
  discreteClipping?: boolean | undefined;
1109
1119
  offset?: THREE.Vector2 | undefined;
@@ -1113,6 +1123,12 @@ export class CustomSpriteMaterial extends CustomMaterial {
1113
1123
  readonly isSpriteMaterial: true;
1114
1124
 
1115
1125
  constructor(parameters?: CustomSpriteMaterialParameters);
1126
+ /**
1127
+ * @default true
1128
+ */
1129
+ get discreteClipping(): boolean;
1130
+ set discreteClipping(value: boolean);
1131
+ get resolution(): THREE.Vector2;
1116
1132
  /**
1117
1133
  * @default new THREE.Color( 0xffffff )
1118
1134
  */
@@ -1133,15 +1149,6 @@ export class CustomSpriteMaterial extends CustomMaterial {
1133
1149
  * @default true
1134
1150
  */
1135
1151
  sizeAttenuation: boolean;
1136
- /**
1137
- * @default true
1138
- */
1139
- transparent: boolean;
1140
- /**
1141
- * Whether the material is affected by fog. Default is true.
1142
- * @default fog
1143
- */
1144
- fog: boolean;
1145
1152
  /**
1146
1153
  * @default new THREE.Vector2(0.5, 0.5)
1147
1154
  */
@@ -1150,18 +1157,13 @@ export class CustomSpriteMaterial extends CustomMaterial {
1150
1157
  * @default new THREE.Vector2(0.0, 0.0)
1151
1158
  */
1152
1159
  offset: THREE.Vector2;
1153
- /**
1154
- * @default true
1155
- */
1156
- get discreteClipping(): boolean;
1157
- set discreteClipping(value: boolean);
1158
- get resolution(): THREE.Vector2;
1159
- set resolution(value: THREE.Vector2);
1160
+ copy(source: CustomSpriteMaterial): this;
1160
1161
  protected refreshUniformsCommon(uniforms: {
1161
1162
  [uniform: string]: THREE.IUniform;
1162
1163
  }, material: CustomSpriteMaterial, renderer: THREE.WebGLRenderer): void;
1163
- protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
1164
- copy(source: CustomSpriteMaterial): this;
1164
+ protected refreshUniforms(uniforms: {
1165
+ [uniform: string]: THREE.IUniform<any>;
1166
+ }, material: CustomMaterial, renderer: THREE.WebGLRenderer): void;
1165
1167
  }
1166
1168
 
1167
1169
  export class SettingsNames {
@@ -1252,16 +1254,26 @@ export class CoreEventTypes {
1252
1254
  static VIEWER_MOUSE_MOVE_EVENT: string;
1253
1255
  static VIEWER_MOUSE_UP_EVENT: string;
1254
1256
  static VIEWER_MOUSE_LONG_TOUCH_EVENT: string;
1257
+ static VIEWER_TOUCHSTART_EVENT: string;
1258
+ static VIEWER_TOUCHEND_EVENT: string;
1255
1259
  static SETTING_CHANGED_EVENT: string;
1256
1260
  static SETTING_RESET_EVENT: string;
1257
1261
  static SETTING_LANGUAGE_CHANGED_EVENT: string;
1258
1262
  static SETTING_THEME_CHANGED_EVENT: string;
1259
1263
  }
1264
+ export namespace ControlState {
1265
+ enum State {
1266
+ ACTIVE = 0,
1267
+ INACTIVE = 1,
1268
+ DISABLED = 2
1269
+ }
1270
+ }
1260
1271
  export interface IControl {
1261
1272
  container: HTMLElement;
1262
1273
  getId(): string;
1263
1274
  setToolTip(tooltipText: string): void;
1264
1275
  setText(text: string): void;
1276
+ setState(state: ControlState.State): void;
1265
1277
  }
1266
1278
  export class Control implements IControl {
1267
1279
  container: HTMLElement;
@@ -1272,6 +1284,7 @@ export class Control implements IControl {
1272
1284
  getId(): string;
1273
1285
  setToolTip(tooltipText: string): void;
1274
1286
  setText(text: string): void;
1287
+ setState(state: ControlState.State): void;
1275
1288
  }
1276
1289
  export interface IMenu {
1277
1290
  controls: IControl[];
@@ -1305,11 +1318,15 @@ export class ExtensionBase {
1305
1318
  * @returns {string} Returns the name of the extension.
1306
1319
  */
1307
1320
  getName(): string;
1321
+ addCursorPhantomFromSvg(template: string): void;
1322
+ removeCursorPhantom(): void;
1308
1323
  onMouseDown(event: MouseEvent): void;
1309
1324
  onMouseMove(event: MouseEvent): void;
1310
1325
  onMouseUp(event: MouseEvent): void;
1311
1326
  onMouseLongTouch(event: MouseEvent): void;
1312
1327
  onToolbarCreated(toolbar: Toolbar): void;
1328
+ onTouchStart(event: TouchEvent): void;
1329
+ onTouchEnd(event: TouchEvent): void;
1313
1330
  protected bindDomEvents(): void;
1314
1331
  }
1315
1332
  export class ExtensionManager {
@@ -2765,7 +2782,7 @@ export class Viewer3D extends ViewerBase {
2765
2782
  * @param onSuccessCallback
2766
2783
  * @param onErrorCallback
2767
2784
  */
2768
- loadModelPart(buffer: ArrayBuffer, options: ModelLoadingOptions, onSuccessCallback: SuccessCallback, onErrorCallback: ErrorCallback): void;
2785
+ loadModelPart(data: ArrayBuffer | string, options: ModelLoadingOptions, onSuccessCallback: SuccessCallback, onErrorCallback: ErrorCallback): void;
2769
2786
  /**
2770
2787
  * unloads model part from the viewer
2771
2788
  * @param modelPart - model part id or model part instance
@@ -2932,6 +2949,7 @@ export interface LabelSpriteParameters {
2932
2949
  }
2933
2950
  export class LabelSprite extends THREE.Sprite {
2934
2951
  readonly extraHeightFactor = 1.4;
2952
+ material: CustomSpriteMaterial;
2935
2953
 
2936
2954
  constructor(parameters: LabelSpriteParameters);
2937
2955
  get sizeAttenuation(): boolean;
@@ -2982,6 +3000,7 @@ export class LabelSprite extends THREE.Sprite {
2982
3000
  */
2983
3001
  get textPadding(): THREE.Vector4Tuple;
2984
3002
  set textPadding(value: THREE.Vector4Tuple);
3003
+ raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]): void;
2985
3004
  dispose(): void;
2986
3005
  }
2987
3006
  export interface MeshPointMaterialParameters extends THREE.ShaderMaterialParameters {
@@ -2991,22 +3010,20 @@ export interface MeshPointMaterialParameters extends THREE.ShaderMaterialParamet
2991
3010
  export class MeshPointMaterial extends CustomMaterial {
2992
3011
 
2993
3012
  constructor(parameters?: MeshPointMaterialParameters);
2994
- /**
2995
- * @default true
2996
- */
2997
- sizeAttenuation: boolean;
2998
3013
  /**
2999
3014
  * @default true
3000
3015
  */
3001
3016
  get discreteClipping(): boolean;
3002
3017
  set discreteClipping(value: boolean);
3003
3018
  get resolution(): THREE.Vector2;
3004
- set resolution(value: THREE.Vector2);
3005
- protected refreshUniformsCommon(uniforms: {
3006
- [uniform: string]: THREE.IUniform;
3007
- }, material: MeshPointMaterial, renderer: THREE.WebGLRenderer): void;
3008
- protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
3019
+ /**
3020
+ * @default true
3021
+ */
3022
+ sizeAttenuation: boolean;
3009
3023
  copy(source: MeshPointMaterial): this;
3024
+ protected refreshUniforms(uniforms: {
3025
+ [uniform: string]: THREE.IUniform<any>;
3026
+ }, material: CustomMaterial, renderer: THREE.WebGLRenderer): void;
3010
3027
  }
3011
3028
  export interface MeshPointParamter {
3012
3029
  point?: THREE.Vector3;
@@ -3064,13 +3081,6 @@ export class Dragger {
3064
3081
  constructor(allowedDraggableElement: HTMLElement, draggableContainer: HTMLElement, containerToRestriction: HTMLElement, windowStater?: WindowStater);
3065
3082
  get windowState(): IWindowStyle | null;
3066
3083
  }
3067
- export namespace ControlState {
3068
- enum State {
3069
- ACTIVE = 0,
3070
- INACTIVE = 1,
3071
- DISABLED = 2
3072
- }
3073
- }
3074
3084
  export class Button extends Control {
3075
3085
 
3076
3086
  constructor(id: string);
@@ -3106,6 +3116,7 @@ export class SubMenu implements IMenu {
3106
3116
  readonly controls: IControl[];
3107
3117
  set selectedIndex(value: number);
3108
3118
  get selectedIndex(): number;
3119
+ setEnabled(index: number, value: boolean): void;
3109
3120
  addControl(control: IControl, index?: number): void;
3110
3121
  removeControl(index?: number): void;
3111
3122
  clearList(): void;
@@ -3127,6 +3138,40 @@ export class ComboButton extends Control {
3127
3138
  setText(text: string): void;
3128
3139
  setFromSvgTemlate(template: string): void;
3129
3140
  }
3141
+ export class Checkbox {
3142
+
3143
+ constructor(id: string, checked: boolean, disabled: boolean, placeholder: string);
3144
+ get checked(): boolean;
3145
+ set checked(value: boolean);
3146
+ get disabled(): boolean;
3147
+ set disabled(value: boolean);
3148
+ get label(): HTMLLabelElement;
3149
+ onChange(value: boolean): void;
3150
+ createElement(): Element;
3151
+ }
3152
+ interface ISelectItem {
3153
+ text: string;
3154
+ value: string;
3155
+ }
3156
+ export class Select {
3157
+
3158
+ constructor(id: string, items: ISelectItem[], placeholder: string);
3159
+ get select(): HTMLElement;
3160
+ get disabled(): boolean;
3161
+ set disabled(value: boolean);
3162
+ get selectedIndex(): number;
3163
+ set selectedIndex(value: number);
3164
+ get placeholder(): string;
3165
+ set placeholder(value: string);
3166
+ get label(): HTMLElement;
3167
+ get previousSelectedIndex(): number;
3168
+ onChange({ index, value }: {
3169
+ index: any;
3170
+ value: any;
3171
+ }): void;
3172
+ update(array: ISelectItem[], selectedIndex?: number): void;
3173
+ }
3174
+ export {};
3130
3175
  interface ElementClass {
3131
3176
  panelClassName?: string;
3132
3177
  contentClassName?: string;
@@ -3142,13 +3187,13 @@ export class Dialog extends Control {
3142
3187
  setDialogContent(value: HTMLElement): Dialog;
3143
3188
  setHeader(value: HTMLElement): Dialog;
3144
3189
  setCaption(value: string): Dialog;
3145
- setIcon(iconClassName: string): Dialog;
3190
+ setSvgIcon(template: string): Dialog;
3146
3191
  setFooter(value: HTMLElement): Dialog;
3147
3192
  setDialogElementClassNames(value: ElementClass): Dialog;
3148
3193
  setResizable(value: boolean): Dialog;
3149
3194
  setWindowOptions(value: IWindowStateOptions): Dialog;
3150
3195
  setDraggable(value: boolean): Dialog;
3151
- openDialog(): HTMLElement;
3196
+ openDialog(x?: number, y?: number): HTMLElement;
3152
3197
  destroyDialog(): void;
3153
3198
  isDialogShown(): boolean;
3154
3199
  subscribe(fn: (state: boolean) => void): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pilotdev/pilot-web-3d",
3
- "version": "23.0.7",
3
+ "version": "23.0.8",
4
4
  "description": "TypeScript definitions for ASCON PilotWeb3D component",
5
5
  "main": "",
6
6
  "types": "index.d.ts",