@pilotdev/pilot-web-3d 24.18.0 → 24.20.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 +79 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -676,6 +676,7 @@ export class RenderViewSettings {
|
|
|
676
676
|
antiAliasing?: boolean;
|
|
677
677
|
displayMode?: DisplayMode;
|
|
678
678
|
cameraMode?: CameraMode;
|
|
679
|
+
orthoNavigationCube?: boolean;
|
|
679
680
|
/** Desired render framerate */
|
|
680
681
|
desiredFramerate?: number;
|
|
681
682
|
/** Allocated time for rendering operations, excluding scene rendering */
|
|
@@ -1048,7 +1049,7 @@ export interface IRenderViewer3D {
|
|
|
1048
1049
|
* @param name
|
|
1049
1050
|
* @param isClippable
|
|
1050
1051
|
*/
|
|
1051
|
-
addScene(name: string, isClippable
|
|
1052
|
+
addScene(name: string | IUserScene, isClippable?: boolean): IUserScene;
|
|
1052
1053
|
/**
|
|
1053
1054
|
*
|
|
1054
1055
|
* @param scene
|
|
@@ -1353,6 +1354,12 @@ export class GizmoBuilder {
|
|
|
1353
1354
|
static buildRotationAxis(axisDir: THREE.Vector3, handleBaseMatrial?: THREE.Material, handleHoveredMaterial?: THREE.Material, handleSelectedMaterial?: THREE.Material, pickerBaseMatrial?: THREE.Material, pickerHoveredMaterial?: THREE.Material, pickerSelectedMaterial?: THREE.Material): GizmoAxis;
|
|
1354
1355
|
static buildScaleAxis(axisDir: THREE.Vector3, handleBaseMatrial?: THREE.Material, handleHoveredMaterial?: THREE.Material, handleSelectedMaterial?: THREE.Material): GizmoAxis;
|
|
1355
1356
|
}
|
|
1357
|
+
export interface MergeableMaterial extends THREE.ShaderMaterial {
|
|
1358
|
+
readonly isMergeable?: boolean;
|
|
1359
|
+
color?: THREE.Color;
|
|
1360
|
+
mergeableHash?: number;
|
|
1361
|
+
hash?: number;
|
|
1362
|
+
}
|
|
1356
1363
|
export abstract class CustomMaterial extends THREE.ShaderMaterial {
|
|
1357
1364
|
|
|
1358
1365
|
constructor();
|
|
@@ -1364,16 +1371,19 @@ export abstract class CustomMaterial extends THREE.ShaderMaterial {
|
|
|
1364
1371
|
protected onBeforeCompileCallback(shader: THREE.Shader): void;
|
|
1365
1372
|
protected refreshTransformUniform(map: THREE.Texture, uniform: THREE.IUniform): void;
|
|
1366
1373
|
protected onBeforeRender(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, geometry: THREE.BufferGeometry, material: THREE.Material, group: THREE.Group): void;
|
|
1374
|
+
protected materialHash(opacity?: number, color?: THREE.Color): number;
|
|
1367
1375
|
}
|
|
1368
1376
|
export interface CustomMeshLambertMaterialParameters extends THREE.ShaderMaterialParameters {
|
|
1369
1377
|
instancing?: boolean | undefined;
|
|
1370
1378
|
instancingColor?: boolean | undefined;
|
|
1371
1379
|
color?: THREE.ColorRepresentation | undefined;
|
|
1372
1380
|
}
|
|
1373
|
-
export class CustomMeshLambertMaterial extends CustomMaterial {
|
|
1381
|
+
export class CustomMeshLambertMaterial extends CustomMaterial implements MergeableMaterial {
|
|
1374
1382
|
type: string;
|
|
1383
|
+
isMergeable: boolean;
|
|
1375
1384
|
|
|
1376
1385
|
constructor(parameters?: CustomMeshLambertMaterialParameters);
|
|
1386
|
+
get mergeableHash(): number;
|
|
1377
1387
|
/**
|
|
1378
1388
|
* @default false
|
|
1379
1389
|
*/
|
|
@@ -1401,10 +1411,12 @@ export interface CustomLineMaterialParameters extends THREE.ShaderMaterialParame
|
|
|
1401
1411
|
instancingColor?: boolean | undefined;
|
|
1402
1412
|
color?: THREE.ColorRepresentation | undefined;
|
|
1403
1413
|
}
|
|
1404
|
-
export class CustomLineMaterial extends CustomMaterial {
|
|
1414
|
+
export class CustomLineMaterial extends CustomMaterial implements MergeableMaterial {
|
|
1405
1415
|
type: string;
|
|
1416
|
+
isMergeable: boolean;
|
|
1406
1417
|
|
|
1407
1418
|
constructor(parameters?: CustomLineMaterialParameters);
|
|
1419
|
+
get mergeableHash(): number;
|
|
1408
1420
|
/**
|
|
1409
1421
|
* @default false
|
|
1410
1422
|
*/
|
|
@@ -3001,6 +3013,7 @@ export class SettingsNames {
|
|
|
3001
3013
|
static DISPLAY_MODE: string;
|
|
3002
3014
|
static CAMERA_MODE: string;
|
|
3003
3015
|
static NAVIGATION_CUBE: string;
|
|
3016
|
+
static ORTHO_NAVIGATION_CUBE: string;
|
|
3004
3017
|
static DESIRED_FRAMERATE: string;
|
|
3005
3018
|
static MANAGE_TIME: string;
|
|
3006
3019
|
static HOVER_MESHES: string;
|
|
@@ -3020,6 +3033,66 @@ export class Viewer3DConfiguration extends ViewerConfiguration {
|
|
|
3020
3033
|
constructor(appearance?: ViewerSettings, render?: ViewerSettings);
|
|
3021
3034
|
}
|
|
3022
3035
|
export const defaultViewer3DSettings: ViewerSettings;
|
|
3036
|
+
export interface IBatchedMaterial extends CustomMaterial {
|
|
3037
|
+
textureSize: number;
|
|
3038
|
+
blockPosTexture: DataTexture;
|
|
3039
|
+
colorTexture: DataTexture;
|
|
3040
|
+
useBlockPosTexture: boolean;
|
|
3041
|
+
useBlockColorTexture: boolean;
|
|
3042
|
+
}
|
|
3043
|
+
export interface BatchedMaterialParameters extends THREE.ShaderMaterialParameters {
|
|
3044
|
+
textureSize?: number;
|
|
3045
|
+
useBlockColorTexture: boolean;
|
|
3046
|
+
useBlockPosTexture: boolean;
|
|
3047
|
+
}
|
|
3048
|
+
class BatchedMaterialBase extends CustomMaterial implements IBatchedMaterial {
|
|
3049
|
+
|
|
3050
|
+
constructor(parameters?: BatchedMaterialParameters);
|
|
3051
|
+
/**
|
|
3052
|
+
* @default 64
|
|
3053
|
+
*/
|
|
3054
|
+
textureSize: number;
|
|
3055
|
+
/**
|
|
3056
|
+
* @default null
|
|
3057
|
+
*/
|
|
3058
|
+
blockPosTexture: DataTexture;
|
|
3059
|
+
/**
|
|
3060
|
+
* @default null
|
|
3061
|
+
*/
|
|
3062
|
+
colorTexture: DataTexture;
|
|
3063
|
+
/**
|
|
3064
|
+
* @default true
|
|
3065
|
+
*/
|
|
3066
|
+
get useBlockPosTexture(): boolean;
|
|
3067
|
+
set useBlockPosTexture(value: boolean);
|
|
3068
|
+
/**
|
|
3069
|
+
* @default true
|
|
3070
|
+
*/
|
|
3071
|
+
get useBlockColorTexture(): boolean;
|
|
3072
|
+
set useBlockColorTexture(value: boolean);
|
|
3073
|
+
protected refreshUniformsCommon(uniforms: {
|
|
3074
|
+
[uniform: string]: THREE.IUniform;
|
|
3075
|
+
}, material: BatchedMaterialBase, renderer: THREE.WebGLRenderer): void;
|
|
3076
|
+
protected refreshUniforms(uniforms: {
|
|
3077
|
+
[uniform: string]: THREE.IUniform;
|
|
3078
|
+
}, material: CustomMaterial, renderer: THREE.WebGLRenderer): void;
|
|
3079
|
+
copy(source: BatchedMaterialBase): this;
|
|
3080
|
+
protected materialHash(): number;
|
|
3081
|
+
dispose(): void;
|
|
3082
|
+
}
|
|
3083
|
+
export class BatchedMeshMaterial extends BatchedMaterialBase {
|
|
3084
|
+
type: string;
|
|
3085
|
+
|
|
3086
|
+
constructor(parameters?: BatchedMaterialParameters);
|
|
3087
|
+
static fromMaterial(material: THREE.Material, textureSize: number, useBlockColorTexture: boolean, useBlockPosTexture: boolean): BatchedMeshMaterial;
|
|
3088
|
+
}
|
|
3089
|
+
export class BatchedLineMaterial extends BatchedMaterialBase {
|
|
3090
|
+
type: string;
|
|
3091
|
+
|
|
3092
|
+
constructor(parameters?: BatchedMaterialParameters);
|
|
3093
|
+
static fromMaterial(material: THREE.Material, textureSize: number, useBlockColorTexture: boolean, useBlockPosTexture: boolean): BatchedLineMaterial;
|
|
3094
|
+
}
|
|
3095
|
+
export {};
|
|
3023
3096
|
export class ModelLoadingOptions {
|
|
3024
3097
|
guid: string;
|
|
3025
3098
|
isConsolidatedModel?: boolean;
|
|
@@ -3248,9 +3321,10 @@ export interface INavigation {
|
|
|
3248
3321
|
* @param {string[] | string} elementIds - element or array of elements
|
|
3249
3322
|
* @param {string | ModelPart} modelPart - the model part id or the model part instance containing the elements.
|
|
3250
3323
|
* @param {boolean} immediate - true to avoid the default transition.
|
|
3324
|
+
* @param {CameraOrientation} cameraOrientation - final orientation of the camera after fitting.
|
|
3251
3325
|
* @returns
|
|
3252
3326
|
*/
|
|
3253
|
-
fitToView(elementIds?: string[] | string, modelPart?: string | ModelPart, immediate?: boolean): void;
|
|
3327
|
+
fitToView(elementIds?: string[] | string, modelPart?: string | ModelPart, immediate?: boolean, cameraOrientation?: CameraOrientation): void;
|
|
3254
3328
|
/**
|
|
3255
3329
|
* Sets the camera pivot point.
|
|
3256
3330
|
*/
|
|
@@ -3281,6 +3355,7 @@ export class Viewer3D extends ViewerBase {
|
|
|
3281
3355
|
getConfiguration(): Viewer3DConfiguration;
|
|
3282
3356
|
start(): Promise<number>;
|
|
3283
3357
|
finish(): Promise<void>;
|
|
3358
|
+
protected loadExtensions(): void;
|
|
3284
3359
|
/**
|
|
3285
3360
|
* Loads new model part to the viewer
|
|
3286
3361
|
* @param buffer
|