oneshotlm
Compare all models on this prompt →

Matrix digital rain · grok-4.20

Output generated Cost / run $0.0198 Runtime 36.9s

Prompt for this run

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 ↗

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

METRICS

runtime36.9s
tokens in7.8k
tokens out6.0k
cached4.7k
cost / run$0.0198
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.