- added region painting context and components
- can switch to target detection on region select
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user