Add type to controls and change colour types

This commit is contained in:
Mitchell McCaffrey
2021-07-09 22:06:32 +10:00
parent 72b6994a2e
commit 49b8caa2d7
21 changed files with 238 additions and 148 deletions

View File

@@ -1,4 +1,5 @@
import Vector2 from "../helpers/Vector2";
import { Color } from "../helpers/colors";
export type DrawingToolType =
| "brush"
@@ -11,7 +12,7 @@ export type DrawingToolType =
export type DrawingToolSettings = {
type: DrawingToolType;
color: string;
color: Color;
useBlending: boolean;
};

View File

@@ -1,4 +1,5 @@
import Vector2 from "../helpers/Vector2";
import { Color } from "../helpers/colors";
export type FogToolType =
| "polygon"
@@ -20,7 +21,7 @@ export type FogData = {
};
export type Fog = {
color: string;
color: Color;
data: FogData;
id: string;
strokeWidth: number;

View File

@@ -1,6 +1,8 @@
import { Color } from "../helpers/colors";
export type Note = {
id: string;
color: string;
color: Color;
lastModified: number;
lastModifiedBy: string;
locked: boolean;

View File

@@ -1,12 +1,13 @@
import Vector2 from "../helpers/Vector2";
import { Color } from "../helpers/colors";
export type PointerToolSettings = {
color: string;
color: Color;
};
export type PointerState = {
position: Vector2;
visible: boolean;
id: string;
color: string;
color: Color;
};