DEV Community

Cover image for Useless project.
Ifeanyi Chima
Ifeanyi Chima

Posted on

Useless project.

April Fools Challenge Submission ☕️🤡

This is a submission for the DEV April Fools Challenge

What I Built

A button. Just a button.

You click it, and lines start crawling across your screen. 50 vertical lines and 50 horizontal lines slowly forming a grid of boxes like graph paper possessed by a ghost. That's it. That's the whole app. No data. No purpose. No redemption arc.

You can control how many lines appear, how fast they draw, and what color they are. You can also clear the grid and do it all over again, because apparently that's how you want to spend your time.

Demo

Code

How I Built It

Built with pure HTML5 Canvas, vanilla JavaScript, and zero regrets.

The core idea is simple, the canvas is just a blank piece of paper. I grab a "pencil" using getContext('2d'), pre-calculate all the x and y positions for each line by dividing the canvas width and height by the number of lines, store them in two arrays (verticals[] and horizontals[]), then draw them one by one using setTimeout so you can actually watch the chaos unfold in real time.

No frameworks. No libraries. No npm install. Just a canvas, a loop, and a questionable life decision.

Prize Category

Community Favorite.

Top comments (0)