bimatter-viewer-react 0.5.11 → 0.5.12

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.
@@ -2,11 +2,15 @@ import { DataTexture, type ColorRepresentation } from "three";
2
2
  import type { GeometryIndexApi } from "../GeometryUtils/useGeometryIndex";
3
3
  export declare const MAX_ELEMENT_COLOR_PALETTE_SIZE = 256;
4
4
  export declare const SELECTION_COLOR_INDEX = 1;
5
+ export type ViewerModelColorConfig = Record<string, number[]>;
6
+ export type ViewerColorConfigByModel = Record<number, ViewerModelColorConfig>;
5
7
  export type ViewerElementColorsApi = {
6
8
  applyStoredColors: () => void;
7
9
  clearAllColors: () => void;
8
10
  clearColor: (modelID: number, ids: number[]) => void;
9
11
  clearModelColors: (modelID: number) => void;
12
+ rebuildByColors: (colorsByModel: ViewerColorConfigByModel, defaultColor?: ColorRepresentation) => void;
13
+ rebuildModelByColors: (modelID: number, colorsByIds: ViewerModelColorConfig, defaultColor?: ColorRepresentation) => void;
10
14
  setColor: (modelID: number, ids: number[], color: ColorRepresentation) => void;
11
15
  };
12
16
  export type ViewerElementColors = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimatter-viewer-react",
3
- "version": "0.5.11",
3
+ "version": "0.5.12",
4
4
  "license": "PolyForm-Noncommercial-1.0.0",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",