bimatter-viewer-react 1.0.0 → 1.0.1

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/lib/Model.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import type { BmtModelData } from "./Loaders/BmtLoader";
2
- import { Matrix4, type DataTexture } from "three";
2
+ import { Matrix4, type DataTexture, type Plane } from "three";
3
3
  import type { ViewerMaterialMode } from "./types";
4
4
  type ModelProps = {
5
5
  colorPaletteTexture: DataTexture;
6
6
  coordinationMatrix?: Matrix4 | null;
7
7
  modelID: number;
8
8
  data: BmtModelData;
9
+ getClippingPlanes?: () => Plane[];
9
10
  loadGeneration: number;
10
11
  materialMode?: ViewerMaterialMode;
11
12
  onUploadComplete?: (modelID: number, uploadedItemCount: number) => void;
@@ -16,6 +17,6 @@ type ModelProps = {
16
17
  export declare function parseModelMatrix(matrix?: string): Matrix4 | null;
17
18
  export declare function getModelCoordinationMatrix(data: BmtModelData): Matrix4 | null;
18
19
  export declare function getModelCoordinationMatrixSource(data: BmtModelData): string | undefined;
19
- declare function Model({ colorPaletteTexture, coordinationMatrix, modelID, data, loadGeneration, materialMode: materialModeOverride, onUploadComplete, onUploadProgress, trueNorthEnabled, useWebGPU, }: ModelProps): import("react/jsx-runtime").JSX.Element;
20
+ declare function Model({ colorPaletteTexture, coordinationMatrix, modelID, data, getClippingPlanes, loadGeneration, materialMode: materialModeOverride, onUploadComplete, onUploadProgress, trueNorthEnabled, useWebGPU, }: ModelProps): import("react/jsx-runtime").JSX.Element;
20
21
  declare const _default: import("react").MemoExoticComponent<typeof Model>;
21
22
  export default _default;
@@ -1,12 +1,17 @@
1
1
  import React from "react";
2
- import { Matrix4, MeshBasicMaterial, MeshLambertMaterial, type ColorRepresentation, type DataTexture, type Material } from "three";
2
+ import { Matrix4, MeshBasicMaterial, MeshLambertMaterial, type ColorRepresentation, type DataTexture, type Material, type Plane } from "three";
3
3
  import type { BmtGeomData, BmtMaterialData } from "./Loaders/BmtLoader";
4
4
  import type { ViewerMaterialMode } from "./types";
5
+ import { type SharedMeshMaterials } from "./sharedMeshMaterials";
5
6
  export type SelectableMeshProps = {
6
7
  colorPaletteTexture: DataTexture;
7
8
  data: BmtGeomData;
9
+ /** Current section planes, applied before the mesh is first rendered. */
10
+ getClippingPlanes?: () => Plane[];
8
11
  isIfcSpace?: boolean;
9
12
  material: BmtMaterialData;
13
+ /** Model-wide cache; without it the mesh owns its material. */
14
+ materialCache?: SharedMeshMaterials;
10
15
  materialMode?: ViewerMaterialMode;
11
16
  meshMatrix: Matrix4;
12
17
  onReady?: (readyKey: string) => void;
@@ -18,4 +23,4 @@ export declare function createSelectableMaterial({ colorPaletteTexture, material
18
23
  preselectionColor: ColorRepresentation;
19
24
  }): MeshBasicMaterial | MeshLambertMaterial;
20
25
  export declare function updateSelectableMaterialPreselectionColor(material: Material, preselectionColor: ColorRepresentation): void;
21
- export declare const SelectableMesh: React.MemoExoticComponent<({ colorPaletteTexture, material, materialMode, data, isIfcSpace, meshMatrix, onReady, readyKey, useDoubleSideMaterial, }: SelectableMeshProps) => import("react/jsx-runtime").JSX.Element>;
26
+ export declare const SelectableMesh: React.MemoExoticComponent<({ colorPaletteTexture, material, materialCache, materialMode, data, getClippingPlanes, isIfcSpace, meshMatrix, onReady, readyKey, useDoubleSideMaterial, }: SelectableMeshProps) => import("react/jsx-runtime").JSX.Element>;
@@ -15,5 +15,5 @@ export declare function updateWebGpuSelectableMaterialColors(material: Material,
15
15
  preselectionColor: ColorRepresentation;
16
16
  selectionColor: ColorRepresentation;
17
17
  }): void;
18
- export declare const WebGpuSelectableMesh: React.MemoExoticComponent<({ colorPaletteTexture, material, materialMode, data, isIfcSpace, meshMatrix, onReady, readyKey, useDoubleSideMaterial, }: SelectableMeshProps) => import("react/jsx-runtime").JSX.Element>;
18
+ export declare const WebGpuSelectableMesh: React.MemoExoticComponent<({ colorPaletteTexture, material, materialCache, materialMode, data, getClippingPlanes, isIfcSpace, meshMatrix, onReady, readyKey, useDoubleSideMaterial, }: SelectableMeshProps) => import("react/jsx-runtime").JSX.Element>;
19
19
  export {};