What it is
A small city at night, built from little cubes, turning slowly through 360 degrees while fireworks go off above it. The tallest tower carries a lit 2027 sign that can be read from every side. Windows switch on and off, cars circle the ring road, confetti falls, a blimp drifts across the sky, and a far skyline twinkles behind. Drag the city to spin it yourself, or press Fireworks! for a five-second burst.
The countdown
The line above the scene counts down to midnight on January 1, 2027. It uses the clock and time zone of the device that shows it, so every visitor sees the time left until their own midnight. At midnight the text changes to “Happy New Year 2027!”, the fireworks speed up and the sign changes colour for the whole of January 1. After that it shows a quiet “Happy 2027!”.
To see the midnight celebration now, open the scene with #celebrate at the end of the address. This is useful for testing before you put it on your page.
How to take it
1. Download the file
Press Download the HTML file above. You get pixel-new-year-2027.html. Open it in a browser, or upload it to your own site. It works offline too.
2. Copy the code
Press Copy the code, paste it into a new file, and save it with a name ending in .html.
View the code
Loading…3. Embed it on your page
Paste this where you want the city to appear. It loads from this site, so you do not need to host anything.
<iframe src="https://aspect.tools/pixel-new-year" width="420" height="740" style="border:0;max-width:100%" title="Pixel New Year 2027 city" loading="lazy"></iframe>
License and credit
A visible credit is not required, but it is appreciated. If you want to give one, use:
Pixel New Year, 2027 series, by aspect.tools (https://aspect.tools/new-year), MIT License
The file comes with no warranty. The small credit line under the scene can be removed if you keep the notice inside the file.
How to change it
It is published early so there is time to adapt it before New Year’s Eve. Open the file in any text editor. The settings are short lines near the top of the script:
| What to change | Where | Example |
|---|---|---|
| The year on the sign and the countdown target | YEAR. The sign knows the digits 0, 2 and 7; add other digits to DIGITS as 4 × 7 text pictures | var YEAR = '2027'; |
| Buildings | the building(...) lines: centre x, centre z, width, depth, height, wall colour | building(18, 15, 12, 10, 36, P.b5) |
| How often fireworks launch | the numbers in the line that sets nextLaunch | 0.6 + Math.random() * 0.9 |
| Firework colours | the pal('fw...') lines (red, green, blue values) | pal('fwGold', 255, 212, 92) |
| Cars | the CARS list: start angle, speed, colour, distance from the centre | { a: 0, w: 0.5, c: P.fwRed, r: 35 } |
| Blimp timing | BFLY (seconds to cross) and BGAP (seconds between flights) | BFLY = 16, BGAP = 36 |
| Amount of confetti | the number in the confetti loop | s < 110 |
The title text and the messages (“Happy New Year”) are plain text in the file, so they are easy to translate.
More like this
See all scenes on the animations page, including the 2026 series: Thanksgiving and Christmas.
Questions
Does the New Year countdown use my time zone?
Yes. It counts down to midnight on January 1, 2027 using the clock and time zone of the device that displays it.
What happens at midnight?
The text changes to "Happy New Year 2027!", fireworks launch much faster and the sign changes colour. This lasts for all of January 1.
Can I preview the midnight celebration?
Yes. Add #celebrate to the end of the scene address to see it immediately.
Can I use it on my own website or stream?
Yes. It is under the MIT License, so personal and commercial use are both allowed. Keep the license notice inside the file.
Can I change the year?
Yes. Change YEAR near the top of the script. The sign includes the digits 0, 2 and 7; other digits can be added as small text pictures.