- added region painting context and components

- can switch to target detection on region select
This commit is contained in:
2026-01-09 16:16:28 +00:00
parent 58e9490a09
commit 1555221825
9 changed files with 308 additions and 25 deletions

View File

@@ -52,12 +52,25 @@ export type NpedJSON = {
"INSURANCE STATUS": string;
};
export type Region = {
name: string;
brushColour: string;
};
export type PaintedCell = {
colour: string;
region: Region;
};
export type CameraSettings = {
cameraMode: number;
mode: number;
imageSize: { width: number; height: number };
regionPainter: {
paintedCells: { x: number; y: number }[];
regions: { name: string; brushColour: string; cells: { x: number; y: number }[] }[];
paintmode: "painter" | "eraser";
paintedCells: Map<string, PaintedCell>;
regions: Region[];
selectedRegionIndex: number;
};
};
export type CameraSettingsAction =
@@ -68,7 +81,16 @@ export type CameraSettingsAction =
| {
type: "SET_IMAGE_SIZE";
payload: { width: number; height: number };
};
}
| {
type: "SET_CAMERA_MODE";
payload: number;
}
| {
type: "SET_REGION_PAINTMODE";
payload: "painter" | "eraser";
}
| { type: "SET_SELECTED_REGION_INDEX"; payload: number };
export type CameraStatus = {
id: string;