import { css, render_and_copy, svg_url } from "./common.tsx"; const displace = (width: number, amplitude = 1) => (t: number) => amplitude * Math.sin((Math.PI / width) * t); const rotation = css.rotate(css.deg(-20)); const Row = ({ children, max_width = 10, }: { children: string; max_width?: number; }) => { const d = displace(max_width); const out = children.split("").map((c, i) => (
{c}
)); return (
{...out}
); }; const TextBox = ({ lines }: { lines: string[] }) => { const max_width = Math.max(...lines.map(l => l.length)); return (
{...lines.map(line => {line})}
); }; render_and_copy( );