oneshotlm
Compare all models on this prompt →

Matrix digital rain · grok-4.20

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 · 6 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
The task is to 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. It must be a single-...The task is to create the Matrix digital rain effect in a single-page web app using one index.html file with CSS and JS inside.

I need to implement it using HTML5 Canvas.

Key points:

- Full-screen black canvas

- Columns of falling green katakana glyphs

- Trailing fade

- Brighter leading character

- Random katakana characters

- Different speeds per column

- Reset when reaching bottom

Katakana Unicode: U+30A0 to U+30FF, but commonly use a string like 'ヲァィゥェォャュョ etc., but easier to use range.

For code: use String.fromCharCode for katakana.

Font: monospace with size 15px or so.

For brighter leading: in the loop, for each column, draw the body with #0F0, and the head (last one) with #0FF or brighter.

But since only one char per column drawn per frame, the current one is the head.

To make it brighter, use ctx.fillStyle = '#0F0' for most, but change for the one at the "head" position? But since it's falling, the current drawn is the leading one.

 The implementation I thought is standard and works.

Let me write the code.

First, HTML:

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<title>Matrix Digital Rain</title>

<style>

body { margin: 0; background: black; overflow: hidden; }

canvas { display: block; }

</style>

</head>

<body>

<canvas id="c"></canvas>

<script>

// JS here

const canvas = document.getElementById('c');

const ctx = canvas.getContext('2d');

let width, height;

function resize() {

  width = canvas.width = window .innerWidth;

  height = canvas.height = window.innerHeight;

}

window.addEventListener('resize', resize);

resize();

const fontSize = 15;

const columns = Math.floor(width / fontSize);

let drops = new Array(columns);

for (let i = 0; i < columns; i++) {

  drops[i] = Math.floor(Math.random() * height / fontSize);

}

const katakana = [];

for (let i = 0x30A0; i <= 0x30FF; i++) {

  katakana.push(String.fromCharCode(i));

}

function draw() {

  ctx.fillStyle = 'rgba(0,0,0,0.05)';

   ctx.fillRect(0,0,width,height);

   ctx.fillStyle = '#0F0';

   ctx.font = fontSize + 'px monospace';

   for (let i = 0; i < columns; i ++) {

     const y = drops[i] * fontSize;

     const char = katakana[Math.floor(Math.random() * katakana.length)];

     ctx.
write index.html (6299 bytes)
toolResult

Successfully wrote 6299 bytes to index.html

assistant
thinking
The task is complete. The file index.html has been created with a full-screen Matrix digital rain effect using katakana glyphs. It features:
bash {"command":"ls -la"}
toolResult

total 8 drwxr-sr-x. 2 node node 24 Aug 1 20:17 . drwxrwsrwx. 3 root node 16 Aug 1 20:16 .. -rw-r--r--. 1 node node 6379 Aug 1 20:17 index.html

assistant
thinking
The file is written successfully. The Matrix digital rain effect is implemented in a single self-contained index.html file with canvas, CSS in style tag, and JS in script tag. No external resources ar...

The file `index.html` has been created with a full-screen Matrix digital rain effect (green katakana glyphs, trailing fade, brighter leading characters, organic variable speeds, interactivity, etc.). Open it in a browser to view/run.

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

modelgrok-4.20
vendorxAI · Grok
harnesspi-agent
generated2026-08-01

EVALUATION

4/5 working

Classic Matrix digital rain with falling katakana glyphs, fade trails, and bright leading chars; animates continuously on its own.

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 motion18.5%
on click17.5%
on drag16.4%
on wheel16.1%
on enter + space17.2%
on arrow keys16.5%
on w/a/s/d17.1%
frame spread7.9 / 255
console errors1
js errors none

METRICS

runtime36.9s
tokens in3.1k
tokens out6.0k
cached4.7k
cost / run$0.0198