@pilotdev/pilot-web-3d 24.19.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.
Files changed (2) hide show
  1. package/index.d.ts +73 -2
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1354,6 +1354,12 @@ export class GizmoBuilder {
1354
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;
1355
1355
  static buildScaleAxis(axisDir: THREE.Vector3, handleBaseMatrial?: THREE.Material, handleHoveredMaterial?: THREE.Material, handleSelectedMaterial?: THREE.Material): GizmoAxis;
1356
1356
  }
1357
+ export interface MergeableMaterial extends THREE.ShaderMaterial {
1358
+ readonly isMergeable?: boolean;
1359
+ color?: THREE.Color;
1360
+ mergeableHash?: number;
1361
+ hash?: number;
1362
+ }
1357
1363
  export abstract class CustomMaterial extends THREE.ShaderMaterial {
1358
1364
 
1359
1365
  constructor();
@@ -1365,16 +1371,19 @@ export abstract class CustomMaterial extends THREE.ShaderMaterial {
1365
1371
  protected onBeforeCompileCallback(shader: THREE.Shader): void;
1366
1372
  protected refreshTransformUniform(map: THREE.Texture, uniform: THREE.IUniform): void;
1367
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;
1368
1375
  }
1369
1376
  export interface CustomMeshLambertMaterialParameters extends THREE.ShaderMaterialParameters {
1370
1377
  instancing?: boolean | undefined;
1371
1378
  instancingColor?: boolean | undefined;
1372
1379
  color?: THREE.ColorRepresentation | undefined;
1373
1380
  }
1374
- export class CustomMeshLambertMaterial extends CustomMaterial {
1381
+ export class CustomMeshLambertMaterial extends CustomMaterial implements MergeableMaterial {
1375
1382
  type: string;
1383
+ isMergeable: boolean;
1376
1384
 
1377
1385
  constructor(parameters?: CustomMeshLambertMaterialParameters);
1386
+ get mergeableHash(): number;
1378
1387
  /**
1379
1388
  * @default false
1380
1389
  */
@@ -1402,10 +1411,12 @@ export interface CustomLineMaterialParameters extends THREE.ShaderMaterialParame
1402
1411
  instancingColor?: boolean | undefined;
1403
1412
  color?: THREE.ColorRepresentation | undefined;
1404
1413
  }
1405
- export class CustomLineMaterial extends CustomMaterial {
1414
+ export class CustomLineMaterial extends CustomMaterial implements MergeableMaterial {
1406
1415
  type: string;
1416
+ isMergeable: boolean;
1407
1417
 
1408
1418
  constructor(parameters?: CustomLineMaterialParameters);
1419
+ get mergeableHash(): number;
1409
1420
  /**
1410
1421
  * @default false
1411
1422
  */
@@ -3022,6 +3033,66 @@ export class Viewer3DConfiguration extends ViewerConfiguration {
3022
3033
  constructor(appearance?: ViewerSettings, render?: ViewerSettings);
3023
3034
  }
3024
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 {};
3025
3096
  export class ModelLoadingOptions {
3026
3097
  guid: string;
3027
3098
  isConsolidatedModel?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pilotdev/pilot-web-3d",
3
- "version": "24.19.0",
3
+ "version": "24.20.0",
4
4
  "description": "TypeScript definitions for ASCON PilotWeb3D component",
5
5
  "main": "",
6
6
  "types": "index.d.ts",