Added colours and gradients to pointers

This commit is contained in:
Mitchell McCaffrey
2021-01-28 15:12:30 +11:00
parent 72ecd002dd
commit 2108d32501
9 changed files with 147 additions and 33 deletions

View File

@@ -21,6 +21,7 @@ function MapPointer({
onPointerMove,
onPointerUp,
visible,
color,
}) {
const { mapWidth, mapHeight, interactionEmitter } = useContext(
MapInteractionContext
@@ -69,7 +70,7 @@ function MapPointer({
{visible && (
<Trail
position={multiply(position, { x: mapWidth, y: mapHeight })}
color={colors.red}
color={colors[color]}
size={size}
duration={200}
/>
@@ -78,4 +79,8 @@ function MapPointer({
);
}
MapPointer.defaultProps = {
color: "red",
};
export default MapPointer;