@pilotdev/pilot-web-3d 24.21.0 → 24.23.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 +54 -35
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -45,7 +45,13 @@ export class Color {
|
|
|
45
45
|
toArray(array: Array<number>, offset?: number): Array<number>;
|
|
46
46
|
clone(): Color;
|
|
47
47
|
}
|
|
48
|
-
export
|
|
48
|
+
export interface ViewObjectEventMap extends THREE.Object3DEventMap {
|
|
49
|
+
dispose: object;
|
|
50
|
+
update: {
|
|
51
|
+
updateType: UpdateType;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export abstract class ViewObject extends THREE.Object3D<ViewObjectEventMap> {
|
|
49
55
|
protected _isDisposed: boolean;
|
|
50
56
|
protected _isSelected: boolean;
|
|
51
57
|
protected _isHovered: boolean;
|
|
@@ -77,7 +83,7 @@ export abstract class ViewObject extends THREE.Object3D {
|
|
|
77
83
|
/**Edge representation of the object */
|
|
78
84
|
abstract get edges(): THREE.LineSegments | null;
|
|
79
85
|
add(...object: THREE.Object3D[]): this;
|
|
80
|
-
remove(...object: THREE.Object3D
|
|
86
|
+
remove(...object: THREE.Object3D[]): this;
|
|
81
87
|
updateMatrixWorld(force?: boolean): void;
|
|
82
88
|
updateWorldMatrix(updateParents: boolean, updateChildren: boolean): void;
|
|
83
89
|
updateMatrix(): void;
|
|
@@ -656,16 +662,16 @@ export class ClickedEvent extends Event {
|
|
|
656
662
|
modelId: string;
|
|
657
663
|
modelElementId: string;
|
|
658
664
|
ctrlKey: boolean;
|
|
659
|
-
intersection?: THREE.Intersection
|
|
665
|
+
intersection?: THREE.Intersection;
|
|
660
666
|
|
|
661
|
-
constructor(type: string, modelId: string, modelElementId: string, ctrlKey: boolean, intersection?: THREE.Intersection
|
|
667
|
+
constructor(type: string, modelId: string, modelElementId: string, ctrlKey: boolean, intersection?: THREE.Intersection);
|
|
662
668
|
}
|
|
663
669
|
export class HoverEvent extends Event {
|
|
664
670
|
modelId: string;
|
|
665
671
|
modelElementId: string;
|
|
666
|
-
intersection?: THREE.Intersection
|
|
672
|
+
intersection?: THREE.Intersection;
|
|
667
673
|
|
|
668
|
-
constructor(type: string, modelId: string, modelElementId: string, intersection?: THREE.Intersection
|
|
674
|
+
constructor(type: string, modelId: string, modelElementId: string, intersection?: THREE.Intersection);
|
|
669
675
|
}
|
|
670
676
|
export class GlobalEvents {
|
|
671
677
|
static events: EventsDispatcherCore;
|
|
@@ -677,6 +683,8 @@ export class RenderViewSettings {
|
|
|
677
683
|
displayMode?: DisplayMode;
|
|
678
684
|
cameraMode?: CameraMode;
|
|
679
685
|
orthoNavigationCube?: boolean;
|
|
686
|
+
hideSmallElements?: boolean;
|
|
687
|
+
smallObjectSize?: number;
|
|
680
688
|
/** Desired render framerate */
|
|
681
689
|
desiredFramerate?: number;
|
|
682
690
|
/** Allocated time for rendering operations, excluding scene rendering */
|
|
@@ -927,12 +935,12 @@ export interface ModelCheckOptions extends SceneCheckOptions {
|
|
|
927
935
|
}
|
|
928
936
|
export interface IIntersectionChecker<TOptions> {
|
|
929
937
|
/**
|
|
930
|
-
* Gets {@link THREE.Intersection
|
|
938
|
+
* Gets {@link THREE.Intersection} between a casted {@link ray} and model object.
|
|
931
939
|
* @param ray
|
|
932
940
|
* @param camera
|
|
933
941
|
* @param options - (optional) intersection check options.
|
|
934
942
|
*/
|
|
935
|
-
getIntersectionByRay(ray: THREE.Ray, camera: THREE.Camera, options?: TOptions): THREE.Intersection
|
|
943
|
+
getIntersectionByRay(ray: THREE.Ray, camera: THREE.Camera, options?: TOptions): THREE.Intersection | undefined;
|
|
936
944
|
/**
|
|
937
945
|
* Gets ID of the model object intersected by {@link ray}
|
|
938
946
|
* @param ray
|
|
@@ -949,7 +957,7 @@ export interface IIntersectionChecker<TOptions> {
|
|
|
949
957
|
* @param camera
|
|
950
958
|
* @param options - (optional) intersection check options.
|
|
951
959
|
*/
|
|
952
|
-
getIntersectionByNdcPt(ndcPoint: THREE.Vector2, camera: THREE.Camera, options?: TOptions): THREE.Intersection
|
|
960
|
+
getIntersectionByNdcPt(ndcPoint: THREE.Vector2, camera: THREE.Camera, options?: TOptions): THREE.Intersection | undefined;
|
|
953
961
|
/**
|
|
954
962
|
* Gets ID of the model object intersected by ray, casted from {@link camera} to {@link ndcPoint}.
|
|
955
963
|
* @param ndcPoint
|
|
@@ -977,14 +985,14 @@ export interface IIntersectionChecker<TOptions> {
|
|
|
977
985
|
* @param camera
|
|
978
986
|
* @param options - (optional) intersection check options.
|
|
979
987
|
*/
|
|
980
|
-
getAllIntersectionsByRay(ray: THREE.Ray, camera: THREE.Camera, options?: TOptions): THREE.Intersection
|
|
988
|
+
getAllIntersectionsByRay(ray: THREE.Ray, camera: THREE.Camera, options?: TOptions): THREE.Intersection[];
|
|
981
989
|
/**
|
|
982
990
|
* Gets IDs of the model objects intersected by ray, casted from {@link camera} to {@link ndcPoint}.
|
|
983
991
|
* @param ndcPos
|
|
984
992
|
* @param camera
|
|
985
993
|
* @param options - (optional) intersection check options.
|
|
986
994
|
*/
|
|
987
|
-
getAllIntersectionsByNdcPt(ndcPos: THREE.Vector2, camera: THREE.Camera, options?: TOptions): THREE.Intersection
|
|
995
|
+
getAllIntersectionsByNdcPt(ndcPos: THREE.Vector2, camera: THREE.Camera, options?: TOptions): THREE.Intersection[];
|
|
988
996
|
/**
|
|
989
997
|
* Gets bounding box of the model elements.
|
|
990
998
|
* @param elements
|
|
@@ -1003,7 +1011,7 @@ export interface IModelIntersectionChecker extends IIntersectionChecker<ModelChe
|
|
|
1003
1011
|
get modelCenter(): THREE.Vector3;
|
|
1004
1012
|
}
|
|
1005
1013
|
export interface I3DRenderer {
|
|
1006
|
-
clippingPlanes: THREE.Plane[];
|
|
1014
|
+
clippingPlanes: readonly THREE.Plane[];
|
|
1007
1015
|
domElement: HTMLCanvasElement;
|
|
1008
1016
|
clear(color?: boolean, depth?: boolean, stencil?: boolean): void;
|
|
1009
1017
|
getClearColor(target: THREE.Color): THREE.Color;
|
|
@@ -1273,7 +1281,7 @@ export interface IGizmoObject extends THREE.Object3D {
|
|
|
1273
1281
|
setActive(value: boolean): void;
|
|
1274
1282
|
dispose(): void;
|
|
1275
1283
|
}
|
|
1276
|
-
export class GizmoObject extends THREE.Object3D implements IGizmoObject {
|
|
1284
|
+
export class GizmoObject extends THREE.Object3D<ViewObjectEventMap> implements IGizmoObject {
|
|
1277
1285
|
protected _meshes: THREE.Mesh[];
|
|
1278
1286
|
readonly baseMaterial: THREE.Material;
|
|
1279
1287
|
readonly hoverMaterial: THREE.Material;
|
|
@@ -1285,9 +1293,9 @@ export class GizmoObject extends THREE.Object3D implements IGizmoObject {
|
|
|
1285
1293
|
getActive(): boolean;
|
|
1286
1294
|
setActive(value: boolean): void;
|
|
1287
1295
|
dispose(): void;
|
|
1288
|
-
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection
|
|
1296
|
+
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
|
|
1289
1297
|
}
|
|
1290
|
-
export abstract class GizmoAxis extends THREE.Object3D implements IGizmoObject {
|
|
1298
|
+
export abstract class GizmoAxis extends THREE.Object3D<ViewObjectEventMap> implements IGizmoObject {
|
|
1291
1299
|
readonly handle: IGizmoObject;
|
|
1292
1300
|
readonly picker?: IGizmoObject;
|
|
1293
1301
|
readonly helper?: IGizmoObject;
|
|
@@ -1306,7 +1314,7 @@ export abstract class GizmoAxis extends THREE.Object3D implements IGizmoObject {
|
|
|
1306
1314
|
getHovered(): boolean;
|
|
1307
1315
|
setHovered(value: boolean): void;
|
|
1308
1316
|
dispose(): void;
|
|
1309
|
-
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection
|
|
1317
|
+
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
|
|
1310
1318
|
abstract moveByNdcPt(ndcPos: THREE.Vector2, camera: THREE.Camera): THREE.Matrix4;
|
|
1311
1319
|
protected abstract updateGizmoPlane(camera: THREE.Camera): void;
|
|
1312
1320
|
protected setStartPt(ndcPos: THREE.Vector2, camera: THREE.Camera): void;
|
|
@@ -1334,7 +1342,12 @@ export class GizmoScaleAxis extends GizmoAxis {
|
|
|
1334
1342
|
moveByNdcPt(ndcPos: THREE.Vector2, camera: THREE.Camera): THREE.Matrix4;
|
|
1335
1343
|
protected updateGizmoPlane(camera: THREE.Camera): void;
|
|
1336
1344
|
}
|
|
1337
|
-
export
|
|
1345
|
+
export interface GizmoEventMap extends ViewObjectEventMap {
|
|
1346
|
+
activeAxisChanged: {
|
|
1347
|
+
isAxisActive: boolean;
|
|
1348
|
+
};
|
|
1349
|
+
}
|
|
1350
|
+
export class GizmoControl extends THREE.Object3D<GizmoEventMap> {
|
|
1338
1351
|
|
|
1339
1352
|
constructor(camera: THREE.Camera, navAgent: INavigationAgent);
|
|
1340
1353
|
attachTo(object: THREE.Object3D, asChild?: boolean): void;
|
|
@@ -1374,7 +1387,7 @@ export abstract class CustomMaterial extends THREE.ShaderMaterial {
|
|
|
1374
1387
|
protected refreshUniforms(uniforms: {
|
|
1375
1388
|
[uniform: string]: THREE.IUniform;
|
|
1376
1389
|
}, material: CustomMaterial, renderer: THREE.WebGLRenderer): void;
|
|
1377
|
-
protected onBeforeCompileCallback(
|
|
1390
|
+
protected onBeforeCompileCallback(parameters: THREE.WebGLProgramParametersWithUniforms, renderer: THREE.WebGLRenderer): void;
|
|
1378
1391
|
protected refreshTransformUniform(map: THREE.Texture, uniform: THREE.IUniform): void;
|
|
1379
1392
|
protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
|
|
1380
1393
|
protected materialHash(opacity?: number, color?: THREE.Color): number;
|
|
@@ -1635,7 +1648,7 @@ export class MeshLineGeometry extends THREE.InstancedBufferGeometry {
|
|
|
1635
1648
|
computeBoundingBox(): void;
|
|
1636
1649
|
computeBoundingSphere(): void;
|
|
1637
1650
|
}
|
|
1638
|
-
export class MeshLine extends THREE.Mesh {
|
|
1651
|
+
export class MeshLine extends THREE.Mesh<MeshLineGeometry, MeshLineMaterial, ViewObjectEventMap> {
|
|
1639
1652
|
type: string;
|
|
1640
1653
|
material: MeshLineMaterial;
|
|
1641
1654
|
geometry: MeshLineGeometry;
|
|
@@ -1647,7 +1660,7 @@ export class CustomSprite extends THREE.Sprite {
|
|
|
1647
1660
|
material: CustomSpriteMaterial;
|
|
1648
1661
|
|
|
1649
1662
|
constructor(material: CustomSpriteMaterial);
|
|
1650
|
-
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection
|
|
1663
|
+
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
|
|
1651
1664
|
dispose(): void;
|
|
1652
1665
|
}
|
|
1653
1666
|
export interface LabelSpriteParameters {
|
|
@@ -1743,7 +1756,7 @@ export interface MeshPointParamter {
|
|
|
1743
1756
|
color?: Color;
|
|
1744
1757
|
size?: number;
|
|
1745
1758
|
}
|
|
1746
|
-
export class MeshPoints extends THREE.Mesh {
|
|
1759
|
+
export class MeshPoints extends THREE.Mesh<THREE.InstancedBufferGeometry, MeshPointMaterial, ViewObjectEventMap> {
|
|
1747
1760
|
geometry: THREE.InstancedBufferGeometry;
|
|
1748
1761
|
material: MeshPointMaterial;
|
|
1749
1762
|
|
|
@@ -1765,7 +1778,7 @@ export class MeshPoints extends THREE.Mesh {
|
|
|
1765
1778
|
removePoint(index: number): this;
|
|
1766
1779
|
updateAttributes(): void;
|
|
1767
1780
|
dispose(): void;
|
|
1768
|
-
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection
|
|
1781
|
+
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
|
|
1769
1782
|
}
|
|
1770
1783
|
export interface ModelPart {
|
|
1771
1784
|
get id(): string;
|
|
@@ -3012,7 +3025,7 @@ export class SettingsNames {
|
|
|
3012
3025
|
static GLOBAL_LIGHT: string;
|
|
3013
3026
|
static LIGHT_SOURCE: string;
|
|
3014
3027
|
static ANTI_ALIASING: string;
|
|
3015
|
-
static
|
|
3028
|
+
static HIDE_SMALL_ELEMENTS: string;
|
|
3016
3029
|
static SMALL_ELEMENT_SIZE: string;
|
|
3017
3030
|
static LABEL_LINE_LENGTH: string;
|
|
3018
3031
|
static HIDE_EDGES_WHEN_NAVIGATING: string;
|
|
@@ -3041,8 +3054,8 @@ export class Viewer3DConfiguration extends ViewerConfiguration {
|
|
|
3041
3054
|
export const defaultViewer3DSettings: ViewerSettings;
|
|
3042
3055
|
export interface IBatchedMaterial extends CustomMaterial {
|
|
3043
3056
|
textureSize: number;
|
|
3044
|
-
blockPosTexture: DataTexture;
|
|
3045
|
-
colorTexture: DataTexture;
|
|
3057
|
+
blockPosTexture: THREE.DataTexture;
|
|
3058
|
+
colorTexture: THREE.DataTexture;
|
|
3046
3059
|
useBlockPosTexture: boolean;
|
|
3047
3060
|
useBlockColorTexture: boolean;
|
|
3048
3061
|
}
|
|
@@ -3061,11 +3074,11 @@ class BatchedMaterialBase extends CustomMaterial implements IBatchedMaterial {
|
|
|
3061
3074
|
/**
|
|
3062
3075
|
* @default null
|
|
3063
3076
|
*/
|
|
3064
|
-
blockPosTexture: DataTexture;
|
|
3077
|
+
blockPosTexture: THREE.DataTexture;
|
|
3065
3078
|
/**
|
|
3066
3079
|
* @default null
|
|
3067
3080
|
*/
|
|
3068
|
-
colorTexture: DataTexture;
|
|
3081
|
+
colorTexture: THREE.DataTexture;
|
|
3069
3082
|
/**
|
|
3070
3083
|
* @default true
|
|
3071
3084
|
*/
|
|
@@ -3157,10 +3170,11 @@ export class Model {
|
|
|
3157
3170
|
showModelPart(modelPart: string | ModelPart): void;
|
|
3158
3171
|
/**
|
|
3159
3172
|
* Hide model elements
|
|
3160
|
-
* @param {string[]|string} elementIds - An array of model elements id or just a single model element id.
|
|
3173
|
+
* @param {string[] | string} elementIds - An array of model elements id or just a single model element id.
|
|
3161
3174
|
* @param {string | ModelPart} modelPart - id of the model part that contains the element ids. By default uses the initial model part loaded into the scene.
|
|
3175
|
+
* @param {boolean} recursive - set to hide child elements. True by default.
|
|
3162
3176
|
*/
|
|
3163
|
-
hide(elementIds: string[] | string, modelPart?: string | ModelPart): void;
|
|
3177
|
+
hide(elementIds: string[] | string, modelPart?: string | ModelPart, recursive?: boolean): void;
|
|
3164
3178
|
/**
|
|
3165
3179
|
* Hides all elements and model parts from the viewer
|
|
3166
3180
|
*/
|
|
@@ -3170,9 +3184,10 @@ export class Model {
|
|
|
3170
3184
|
*
|
|
3171
3185
|
* @param {string[] | string} elementIds - An array of model elements or just a single model element.
|
|
3172
3186
|
* @param {string | ModelPart} modelPart - id of the model part that contains the model element id. By default uses the initial model part loaded into the scene.
|
|
3187
|
+
* @param {boolean} recursive - set to show child elements. True by default.
|
|
3173
3188
|
*
|
|
3174
3189
|
*/
|
|
3175
|
-
show(elementIds: string[] | string, modelPart?: string | ModelPart): void;
|
|
3190
|
+
show(elementIds: string[] | string, modelPart?: string | ModelPart, recursive?: boolean): void;
|
|
3176
3191
|
/**
|
|
3177
3192
|
* Shows all elements and model parts
|
|
3178
3193
|
*/
|
|
@@ -3181,26 +3196,30 @@ export class Model {
|
|
|
3181
3196
|
* Isolate elements of one model part.
|
|
3182
3197
|
* @param elementIds - An array of model elements or just a single model element.
|
|
3183
3198
|
* @param modelPart - id of the model part that contains the model element id. By default uses the initial model part loaded into the scene.
|
|
3199
|
+
* @param {boolean} recursive - add child elements to isolated. True by default.
|
|
3184
3200
|
*/
|
|
3185
|
-
isolate(elementIds: string[], modelPart: string | ModelPart): void;
|
|
3201
|
+
isolate(elementIds: string[], modelPart: string | ModelPart, recursive?: boolean): void;
|
|
3186
3202
|
/**
|
|
3187
3203
|
* Isolate group of elements.
|
|
3188
3204
|
* @param elements - Array of grouped model elements to isolate.
|
|
3205
|
+
* @param {boolean} recursive - add child elements to isolated. True by default.
|
|
3189
3206
|
*/
|
|
3190
|
-
isolateMultiple(elements: ModelElementIds[]): void;
|
|
3207
|
+
isolateMultiple(elements: ModelElementIds[], recursive?: boolean): void;
|
|
3191
3208
|
/**
|
|
3192
3209
|
* Selects the array of model elements. You can also pass in a single model element id instead of an array.
|
|
3193
3210
|
*
|
|
3194
3211
|
* @param {string[] | string} elementIds - element or array of elements to select.
|
|
3195
3212
|
* @param {string | ModelPart} modelPart - model part id or the model part instance containing the elements.
|
|
3213
|
+
* @param {boolean} recursive - add child elements to selection. False by default.
|
|
3196
3214
|
*/
|
|
3197
|
-
select(elementIds: string[] | string, modelPart: string | ModelPart, selectionMode: SelectionMode): void;
|
|
3215
|
+
select(elementIds: string[] | string, modelPart: string | ModelPart, selectionMode: SelectionMode, recursive?: boolean): void;
|
|
3198
3216
|
/**
|
|
3199
3217
|
* Deselects the array of model elements. You can also pass in a single model element id instead of an array.
|
|
3200
3218
|
* @param {string[] | string} elementIds - element or array of elements to select.
|
|
3201
3219
|
* @param {string | ModelPart} modelPart - model part id or the model part instance containing the elements.
|
|
3220
|
+
* @param {boolean} recursive - deselect child elements. False by default.
|
|
3202
3221
|
*/
|
|
3203
|
-
deselect(elementIds: string[] | string, modelPart?: string | ModelPart): void;
|
|
3222
|
+
deselect(elementIds: string[] | string, modelPart?: string | ModelPart, recursive?: boolean): void;
|
|
3204
3223
|
/**
|
|
3205
3224
|
* Unselect all model elements in all model parts
|
|
3206
3225
|
*/
|
|
@@ -3330,7 +3349,7 @@ export interface INavigation {
|
|
|
3330
3349
|
* @param {CameraOrientation} cameraOrientation - final orientation of the camera after fitting.
|
|
3331
3350
|
* @returns
|
|
3332
3351
|
*/
|
|
3333
|
-
fitToView(elementIds?: string[] | string, modelPart?: string | ModelPart, immediate?: boolean, cameraOrientation?: CameraOrientation): void;
|
|
3352
|
+
fitToView(elementIds?: string[] | string | ModelElementIds[], modelPart?: string | ModelPart, immediate?: boolean, cameraOrientation?: CameraOrientation): void;
|
|
3334
3353
|
/**
|
|
3335
3354
|
* Sets the camera pivot point.
|
|
3336
3355
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pilotdev/pilot-web-3d",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.23.0",
|
|
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
|
"dependencies": {
|
|
12
|
-
"@types/three": "0.
|
|
12
|
+
"@types/three": "0.161.0"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
15
|
"pilotdev",
|