// let's game boy ! ! !
import { ComponentChild } from "preact";
import { Cycle, render_and_copy } from "./common.tsx";
const Pixel = ({
colors,
width_px,
}: {
colors: [string, ...string[]];
width_px: number;
}) => (
{...colors.map(c => (
// p saves four bytes per
// we aren't going to get to 20x18 but less data is courteous
))}
);
const Draw = ({
width,
height = width,
pixel_width_px,
colors,
bg_color,
}: {
width: number;
height?: number;
pixel_width_px: number;
colors: [string, ...string[]];
bg_color: string;
}) => (
{...new Array(width * height)
.fill(null)
.map(() =>
)}
);
// you know what, let's just to the dark grey part. sorry!
const Shell = ({ children }: { children: ComponentChild }) => (
CHONK MATRIX WITH STERENO SOUND
{children}
);
// body: "#aaaaaa"
// horrid url, but color-picked from
// https://duet-cdn.vox-cdn.com/thumbor/0x0:2048x1364/750x500/filters:focal(1024x682:1025x683):format(webp)/cdn.vox-cdn.com/uploads/chorus_asset/file/23755199/a31768dc_f45b_4ac7_8f34_6f99e835ed358223055624103571533.jpg
render_and_copy(
<>
the screen and grey border of a Game Boy. at the top, it says "CHONK
MATRIX WITH STERENO SOUND." the blank screen's pixels are comically
large, but faithfully colored
>
);