1
0
Fork
You've already forked tetris
0
A simple HTML/CSS/JS implementation of Tetris
  • JavaScript 74.1%
  • CSS 15.5%
  • HTML 10.4%
2026年06月16日 12:03:20 +02:00
index.html stylize OSD text 2026年06月16日 12:03:20 +02:00
LICENSE add LICENSE 2026年06月14日 22:03:12 +02:00
README.md add Demo link 2026年06月14日 22:00:36 +02:00
styles.css stylize OSD text 2026年06月16日 12:03:20 +02:00
tetris.js stylize OSD text 2026年06月16日 12:03:20 +02:00
tetris.png fix grace period (4), remove unused images 2026年06月14日 23:25:45 +02:00
tetrisbg-small.png add Demo link 2026年06月14日 22:00:36 +02:00

▟ Tetris

A feature-rich Tetris implementation in pure JavaScript - no frameworks, no dependencies.

Based on jorisroovers/tetris.

Demo

Want to try it out in your web browser? https://bsd.pm/tetris/

Features

  • Classic Tetris gameplay with all 7 standard tetrominoes
  • 3D Depth - extrusion effect that gives the playfield depth
  • Afterglow system - falling pieces leave customizable trails:
    • Toggle on/off, adjust opacity, decay time, and hue
    • Smoke Decay, Pulse Decay, and Wireframe afterglow modes
    • Colorize Afterglow with adjustable hue
  • Row Clear - enable/disable the row clear animation
  • Score tracking and level progression
  • Next block preview
  • Hard drop and rotation

Controls

Key Action
← / H Move left
→ / L Move right
↓ / J Soft drop
↑ / K Rotate
Space Hard drop
P Pause / Resume
Enter Restart (when game over)

How to run

Open index.html in any modern browser. No build step, no server required.