feat: fix cursor lag, add Blade Runner city map, trim visual noise#4
Open
a20r wants to merge 1 commit into
Open
feat: fix cursor lag, add Blade Runner city map, trim visual noise#4a20r wants to merge 1 commit into
a20r wants to merge 1 commit into
Conversation
Cursor performance: - Position via translate3d (compositor-only) instead of left/top, which triggered layout/reflow on every mousemove — the cause of the lag, worst over the animation-heavy hero - Single rAF loop; ring tracks 1:1, trail lerps - Replace expensive body:has(a:hover) selector with delegated class toggle - Hide custom cursor on touch / coarse-pointer devices Cleanup: - Remove full-screen #flicker overlay (constant 10fps repaint + visual noise) - Drop second hero boot-text line; trim hero badges 6 -> 4 - Status bar 3 items -> 2 City map: - New "City Grid" section: SVG Blade Runner map with angled grid district, downtown ring road, radial plaza, coastal expressway, rail line and bay - Animated traffic dots via SMIL animateMotion; pulsing plaza marker - Static road network glow via single SVG filter (renders once) - Grid streets generated in JS; legend + HUD corner brackets - Added Map nav link https://claude.ai/code/session_01Y8g3FHp9dy1wN86ThR4hYp
Contributor
|
Preview: https://a20r.github.io/previews/pr-4/ Commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cursor performance fix
The custom cursor lagged badly, worst near the top of the page. Cause: it was positioned with
left/top, which are layout properties — everymousemovetriggered a reflow, and the hero is animation-heavy, so the main thread couldn't keep up.transform: translate3d(...)— compositor-only, no layout/reflowrequestAnimationFrameloop: the ring tracks the pointer 1:1, the trail lerps toward itbody:has(a:hover)selector with a delegatedmouseover/mouseoutclass toggleVerified: after moving the mouse,
#cursorcarriestranslate3d(800px, 500px, 0px)— pure transform, zero layout cost.Cleanup (less busy)
#flickeroverlay — it animated opacity ~10×/sec, a constant full-viewport repaint that also worsened the cursor lagCity map (the bonus)
New "City Grid" section — a stylized Blade Runner street map rendered in SVG:
animateMotion)Mapnav linkVerification
Screenshotted with headless Chromium:
scrollWidth === innerWidth— no horizontal scrollfile://)Test plan
Mapnav link scrolls to the sectionhttps://claude.ai/code/session_01Y8g3FHp9dy1wN86ThR4hYp
Generated by Claude Code