Repository navigation
Website: keep the deck at 60 fps while every card plays - #19
Merged
Merged
Conversation
Chrome drops the whole page to 30 fps while two or more videos play on screen, and the fan played six, so scrolling and hovering felt laggy whenever the deck was in view. Each scene now plays in a video that never goes on the page, and the cards paint its frames onto canvases in one frame loop. Every card still plays; the deck measures 61 fps instead of 31. Bump the asset versions so browsers fetch the new deck.js and styles.css. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
The site lagged whenever the poster deck was on screen: scrolling and hovering dropped to 30 fps.
Cause
Chrome drops the whole page to 30 fps while two or more videos play on screen. This happens even for plain videos on a blank page, so no CSS change helps. The fan plays six. Turning off the foil, glare, 3D tilt, clipping and shadows didn't help; pausing all but one video did. Main-thread time was low throughout, with no long tasks.
Fix
Each scene plays in a video that never goes on the page. The cards paint its frames onto canvases in one frame loop, and only when the video moves to a new frame. Nothing is removed:
Asset URLs go to
?v=4so browsers fetch the newdeck.jsandstyles.css.Measured (Chrome on an M2, 1440×900)
Also checked at 375 px (61 fps, only the centred card plays), in dark mode (no console errors) and with reduced motion (stills, no playback).
Merging this into
maindeploys it to morphotype.srivtx.xyz.🤖 Generated with Claude Code