GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

06Ghost piece and hard drop — precomputing the landing spot

Dropping the current piece all the way down until it first collides yields the landing row — drawn translucent first, then the spacebar slams it there in one step.

Best forPrediction indicators, drag-drop placement

keydownrequestAnimationFrame
Ghost piece and hard drop — precomputing the landing spot
Open in a new tab

06 Ghost piece and hard drop — precomputing the landing spot — Measured area 27.695% · moving frames 22/23Original by GODRICH · SCSS and React ship in the zip · Tetris JavaScript: Build It in 9 Canvas Steps

The post this demo lives in

Tetris JavaScript: Build It in 9 Canvas Steps - preview of all 9 demosTetris JavaScript: Build It in 9 Canvas StepsFalling blocks, stacking, line clears — computed from rotation matrices and collision checks. A Tetris built in nine ste See all demos in this post

If you like this effect - similar demos