Removed hueShift from move indicators as incompatible with some targets
This commit is contained in:
@@ -31,37 +31,10 @@ const drawMoveIndicators = async (
|
||||
(v) => v * squareSize + borderWidth
|
||||
);
|
||||
|
||||
let fromStyle;
|
||||
let toStyle;
|
||||
|
||||
if (moveIndicator.hueShift !== 0) {
|
||||
const newLight: Solid = {
|
||||
type: "solid",
|
||||
data: {
|
||||
color: light.data.color
|
||||
? changeHSL(light.data.color, moveIndicator.hueShift)
|
||||
: "#00ff0055",
|
||||
},
|
||||
};
|
||||
|
||||
const newDark: Solid = {
|
||||
type: "solid",
|
||||
data: {
|
||||
color: dark.data.color
|
||||
? changeHSL(dark.data.color, moveIndicator.hueShift)
|
||||
: "#00ff0055",
|
||||
},
|
||||
};
|
||||
|
||||
fromStyle = (x0 + y0) % 2 === 0 ? newLight : newDark;
|
||||
toStyle = (x1 + y1) % 2 === 0 ? newLight : newDark;
|
||||
} else {
|
||||
fromStyle = {
|
||||
type: "solid",
|
||||
data: { color: moveIndicator.color },
|
||||
} as SquareStyle;
|
||||
toStyle = fromStyle;
|
||||
}
|
||||
const style = {
|
||||
type: "solid",
|
||||
data: { color: moveIndicator.color },
|
||||
} as SquareStyle;
|
||||
|
||||
drawRectangle(
|
||||
ctx,
|
||||
@@ -69,7 +42,7 @@ const drawMoveIndicators = async (
|
||||
squareSize,
|
||||
fromX,
|
||||
fromY + margin,
|
||||
fromStyle,
|
||||
style,
|
||||
loadImage
|
||||
);
|
||||
drawRectangle(
|
||||
@@ -78,7 +51,7 @@ const drawMoveIndicators = async (
|
||||
squareSize,
|
||||
toX,
|
||||
toY + margin,
|
||||
toStyle,
|
||||
style,
|
||||
loadImage
|
||||
);
|
||||
};
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#3cff0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffaa0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00ffff55",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffaa0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffff0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#3cff0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#3cff0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff00ff55",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00ffff55",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00ffee55",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00ffee55",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -22,7 +22,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffaa0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#55ff0033",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#1c67c933",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#1c67c933",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#55ff0033",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#55ff0022",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#55ff0022",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff007733",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff007733",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#55ff0022",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#55ff0022",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#55ff0022",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#55ff0022",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#0099ff55",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff000044",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#7dacc97f",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffff0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffff007f",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00bfff7f",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00ff807f",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#40ff007f",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff38637f",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff38af7f",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffaf387f",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffff007f",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00a5ff7f",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#40bf4044",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#9bc70069",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#40bf4044",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#0088ff66",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff00bb33",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#33ff0033",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00ff0033",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00ff0033",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00ffaa55",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff770055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#55ff0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffff0033",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#0077ff33",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00ff0033",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#009dff33",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#7b00ff33",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffff0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffff0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff00d433",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff910044",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffff0033",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00aaff44",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#aaff0033",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -27,7 +27,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00ff0033",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#9940bf33",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#bd4b2b2a",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff00d044",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffff0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffbf0044",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#00ffff55",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ffff0055",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -21,7 +21,6 @@ const style: Style = {
|
||||
},
|
||||
},
|
||||
moveIndicator: {
|
||||
hueShift: 0,
|
||||
color: "#ff000044",
|
||||
},
|
||||
border: {
|
||||
|
||||
@@ -49,7 +49,6 @@ export type Coords = {
|
||||
export type SquareStyle = Gradient | Solid | Image;
|
||||
|
||||
export type MoveIndicator = {
|
||||
hueShift: 0;
|
||||
color: string;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user