(o: Record<string, string | number>)
| 141 | const timeColor = (f: number) => `hsl(${190 + f * 150} 90% 65%)`; |
| 142 | |
| 143 | const attrs = (o: Record<string, string | number>) => |
| 144 | Object.entries(o) |
| 145 | .map(([k, v]) => `${k}="${v}"`) |
| 146 | .join(" "); |
| 147 | |
| 148 | const polygon = (corners: Pt[], fill: string, fillOpacity: number, stroke: string) => |
| 149 | `<polygon ${attrs({ |