✨Effect Lab
Read the full guide完整技术长文 Why broken looks expensive为什么「坏掉」看起来很贵
📺

CRT Scanlines CRT 扫描线

Horizontal lines every 4px, plus a full-canvas green wash that pulses in brightness. 每 4px 一条横线,再盖一层亮度会脉动的绿色。

Canvas 2DScanlinesAlpha flicker
Live demo实时演示

Runs live on this page. Move the pointer, click, or drag — whichever the effect listens for. 就在本页实时运行。移动鼠标、点击或拖拽——看它响应哪一种。

How it works原理拆解

The scanlines are strokes at y += 4 with 15% opacity green. The flicker is a separate fillRect whose alpha is 0.04 + abs(sin(f))*0.05 — tying it to a sine of an accumulating counter rather than to time keeps the rhythm stable even if the frame rate varies. 扫描线是以 y += 4 步进、15% 透明度的绿色描边。闪烁是另一层 fillRect,透明度为 0.04 + abs(sin(f))*0.05——用的是累积计数器的正弦而不是时间,帧率波动时节奏也稳。

What to change可以改的地方

  • 1Change the line spacing to 3px for a sharper, more modern display.
  • 2Add slight horizontal offset per row to simulate signal noise.
  • 1行距改成 3px,屏幕会更锐、更现代。
  • 2每一行加一点横向偏移,就是信号噪声。

Source code源码

Self-contained — paste it into any HTML file and it runs. No libraries. 完全独立——粘进任意 HTML 文件就能跑,不需要任何库。

crt.html