oneshotlm
Compare all models on this prompt →

Matrix digital rain · gpt-5-mini

Create the Matrix digital rain effect on a full-screen black canvas: columns of falling green katakana glyphs with a trailing fade and a brighter leading character.

⛨ sandboxed Open in new tab ↗
transcript · 4 messages
user

Create the Matrix digital rain effect on a full-screen black canvas: columns of falling green katakana glyphs with a trailing fade and a brighter leading character.

assistant
thinking
**Creating digital rain effect**

I need to create a single index.html file that includes a full app implementing the Matrix digital rain effect on a full-screen black canvas. I want to use columns of falling green katakana glyphs with a trailing fade and a brighter leading character, and I won’t be using any external resources. 

I’ll write this file using the write function, ensuring the canvas resizes to the window while drawing these characters. I'll consider various details like font size, colors, and responsiveness!**Setting up digital rain code**

I need to avoid using external fonts since system fonts should work just fine for katakana glyphs. I'm thinking about setting the font size between 18-22, with the option to make it dynamic based on the canvas size. There's the possibility of adding an optional UI, but I want to keep everything simple.

I'll prepare the code for this: starting with HTML for a canvas with the id 'c’, then some CSS to set the margins to zero and create a full-screen black background. For the JS, I'll set the canvas dimensions and compute the necessary columns and drops. Sounds fun!**Brightening leading characters**

To make the leading character stand out, I’m going to draw the characters using a standard green fill style of 'rgba(0,255,70,0.8)', while the leading character will be brighter, either 'rgba(180,255,180,1)' or white.

I’ll implement a background fade using 'rgba(0,0,0,0.05)' to create a soft background rectangle.

I’ll create an array of characters drawn from the katakana Unicode range (0x30A0 to 0x30FF), focusing on a subset of 0x30A1 to 0x30FA. Each frame, for each column, I’ll randomly select a character and draw it using fillText, with the leading character brighter and slightly larger. Sounds good!**Tracking trail length**

I want to maintain an array of y positions to ensure the trail length, resetting them when they exceed the height based on a certain probability. Each column can have its speed randomized, and I’ll be tracking y positions in pixels instead of rows.

I’ll set the font size to about 20 times the device pixel ratio. For columns, I’ll calculate them using the width divided by the font size. Each frame, I’ll fill the background with a semi-transparent black, randomly choose a character for each column, and precisely place characters based on their respective y positions. I’ll ensure to only draw the bright leading character to avoid overlaps. Sounds like a solid plan!**Implementing the trail effect**

The columns will create a trail since the background fade doesn’t fully clear. I'll increment the drops by their respective speeds, which could range from 0.5 to 1.5 rows per frame. When the y position exceeds the height and a random chance is met, I'll reset the drop.

I’ll set the font to `monospace`, as katakana looks best that way. I'll also ensure proper scaling with the device pixel ratio. The font size will be standard in CSS pixels, not multiplied by dpr. If I implement a glow effect for the leading character, I'll use shadow settings. Lastly, I’ll craft the code and prepare the index.html content for writing!
write index.html (4910 bytes)
toolResult

Successfully wrote 4910 bytes to index.html

assistant

I created a single-file, self-contained index.html that implements the Matrix digital rain effect on a full-screen black canvas. It uses falling green katakana glyphs with trailing fade and a brighter leading character. Open index.html in a browser (press F11 for fullscreen).

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelgpt-5-mini
vendorOpenAI
harnesspi-agent
generated2026-07-22

EVALUATION

4/5 working

Classic Matrix digital rain with green katakana glyphs, fading trails, and brighter leading characters, animating continuously; inputs don't change effect but that's expected.

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion33.3%
on click26.6%
on drag26.1%
on wheel32.0%
on enter + space31.6%
on arrow keys28.8%
on w/a/s/d26.7%
frame spread17.2 / 255
console errors0
js errors none

METRICS

runtime44.7s
tokens in2.7k
tokens out2.7k
cached1.0k
cost / run$0.0060