From e3bb900bab29a7e93ed16f655cbc5f5681a29e7e Mon Sep 17 00:00:00 2001 From: mehbark Date: Wed, 15 Nov 2023 03:00:23 -0500 Subject: [PATCH] rain --- html/common.tsx | 1 + html/rain.tsx | 28 +++++++++++----------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/html/common.tsx b/html/common.tsx index 705f86e..e161b47 100644 --- a/html/common.tsx +++ b/html/common.tsx @@ -231,6 +231,7 @@ export const svg_url = (svg: string) => `data:image/svg+xml,${encodeURI(svg)}`; // something higher-level might be worthwhile... // could namespace; e.g. css.font.sans_serif +// could put various beziers export const css = { url(href: string) { return `url('${href}')`; diff --git a/html/rain.tsx b/html/rain.tsx index d5019c4..c9bcdc4 100644 --- a/html/rain.tsx +++ b/html/rain.tsx @@ -1,24 +1,18 @@ import { render_and_copy } from "./common.tsx"; -const Drop = ({ - color = "red", - i, - duration_s, -}: { - color?: string; - i: number; - duration_s: number; -}) => ( +const Drop = ({ color = "red", i }: { color?: string; i: number }) => (
); @@ -64,10 +58,10 @@ const Rain = ({ }} > {...Array.from({ length: drops }, (_, i) => ( - + ))} ); -render_and_copy(); +render_and_copy();