🚀 optimize svg with csso
This commit is contained in:
@@ -7,8 +7,11 @@ import { getPathToPose } from "@snk/compute/getPathToPose";
|
||||
|
||||
const chain = getBestRoute(grid, snake);
|
||||
chain.push(...getPathToPose(chain.slice(-1)[0], snake)!);
|
||||
const svg = createSvg(grid, chain, drawOptions, { frameDuration: 200 });
|
||||
|
||||
const container = document.createElement("div");
|
||||
container.innerHTML = svg;
|
||||
document.body.appendChild(container);
|
||||
(async () => {
|
||||
const svg = await createSvg(grid, chain, drawOptions, { frameDuration: 200 });
|
||||
|
||||
const container = document.createElement("div");
|
||||
container.innerHTML = svg;
|
||||
document.body.appendChild(container);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user