Use antialiasing again, no SSR on table, extract to BoxTable, transparent text

This commit is contained in:
Xevion
2022-12-17 16:15:10 -06:00
parent ea0785cc97
commit 30343f1d48
7 changed files with 96 additions and 23 deletions

View File

@@ -0,0 +1,28 @@
import {range} from "../utils/helpers";
import BoxGraphic from "./BoxGraphic";
import Chance from "chance";
const chance = new Chance();
const sources = range(0, 100 - 1);
const destinations = chance.shuffle(sources);
const boxes: [number, number][] = sources.map((e, i) => [e, destinations[i] as number])
const BoxTable = () => {
return (
<div className="grid grid-cols-10 w-full space-y-2">
{boxes.map(([source, destination]) =>
<div key={source} className="col-span-1 px-2">
<div className="box aspect-square relative">
<span className="absolute left-6 top-8 cursor-pointer">{destination}</span>
<BoxGraphic className="transition-all cursor-pointer relative z-30">
{source + 1}
</BoxGraphic>
</div>
</div>
)}
</div>
);
}
export default BoxTable;