How the Shake Screen (Earthquake) Effect Works Technically in the Browser
What makes the Shake Screen (Earthquake) effect (`earthquake.js`) so psychologically effective is not continuous vibration, but intermittent silence. If a webpage vibrated non-stop from the millisecond it opened, the visitor would immediately close it. Instead, our Earthquake engine waits 8 to 15 seconds while the user becomes absorbed in reading, triggers a 1.5-to-3-second seismic burst with realistic P-wave/S-wave ramp-up and decay, and then resets the DOM to `transform: none`. By the time the user blinks or looks around their desk, the page is completely still again.
Attack-Sustain-Decay Envelope & 3-Axis CSS Jitter
Rather than using a static repeating CSS `@keyframes` loop (which looks mechanical and predictable), `earthquake.js` computes a dynamic per-frame displacement vector inside `requestAnimationFrame`:
- Stochastic Displacement & Rotational Roll: On every animation frame during an active quake, the script calculates independent horizontal and vertical offsets (`x = (Math.random() - 0.5) * intensity`, `y = (Math.random() - 0.5) * intensity`) plus a proportional rotational roll angle (`r = (Math.random() - 0.5) * (intensity * 0.15)`), applying `transform: translate(x, y) rotate(r deg)` to the viewport frame.
- Seismic Envelope Shaping: Each tremor initializes at an base amplitude between `8px` and `20px`. A `100ms` attack interval (`rampUp`) increases the amplitude by `+2px` per tick up to `startIntensity + 10px`, simulating the arrival of shear waves. After `1,500β3,000ms`, a `50ms` decay interval (`rampDown`) smoothly attenuates `intensity` by `-1.5px` per step until it reaches zero and snaps cleanly to `transform = 'none'`.
- Pre-Tremor Sub-Surface Rumble Bar: Every 10β25 seconds, a subtle 3px linear-gradient pulse (`#ff440040`) briefly flashes along the bottom edge of the viewport via a 500ms `@keyframes rumblePulse` animationβgiving eagle-eyed users a split-second hint before the next aftershock hits.
Mobile Haptic Bonus: Want to trigger subtle physical vibrations on mobile devices alongside visual micro-shakes? Select Phantom Micro-Vibrate (`phantom_vibrate`) in the effect dropdown above, which pairs CSS micro-tremors with the browser's `navigator.vibrate()` API!
Fun & Harmless Scenarios to Use the Shake Screen Prank
- The "Look Away, Look Back" Desk Joke: If you sit near a friend or coworker, send them a long-form article link wrapped in Shake Screen. When the 2-second quake hits and they look over at you in confusion, the tremor has already stoppedβso when they look back at their monitor, the page looks 100% normal!
- Classic MSN Messenger "Nudge" Nostalgia: Anyone who used MSN Messenger or Windows Live Messenger in the 2000s remembers the iconic "Send a Nudge" button that shook the chat window. Shake Screen brings that nostalgic energy to any modern website.
- Escalating Prank Chain Opener: Use Shake Screen as Phase 1 of a Prank Chain, followed by Cracked Screen in Phase 2 and Gravity Drop in Phase 3 so the website trembles, cracks, and finally collapses!
How Recipients Can Exit the Shake Screen Prank
- Click the Persistent Exit Button: The
β Exitbutton in the bottom-right corner sits on its own fixed layer outside the shaking frame (`z-index: 9999`), so it never moves during a tremor and is always easy to click. - Wait for the 30-Second Auto-Reveal: At 30 seconds, all quake intervals are cleared and the reveal screen offers a direct link to the unpranked destination URL.
- Close the Browser Tab: Closing or refreshing the tab immediately terminates all JavaScript timers.
Frequently Asked Questions About Shake Screen
How does the Shake Screen (Earthquake) effect animate the viewport?
The script uses requestAnimationFrame to apply randomized X/Y pixel translations and rotational jitter (translate(x, y) rotate(r)) with an attack-sustain-decay intensity envelope.
Why does the shaking stop after a couple of seconds?
Each tremor is designed to last 1.5 to 3 seconds followed by 12 to 25 seconds of stillness so the recipient questions whether they imagined the screen shaking.