Repository navigation
[Chess] Use time-based animation values and dynamic OKLCH palette - #119
Open
kraskevich wants to merge 1 commit into
Open
kraskevich wants to merge 1 commit into
kraskevich wants to merge 1 commit into
Conversation
In the current Chess subtest, `--anim-value` is incremented by `1` on each `animate()` call and passed through `mod(var(--anim-input), 400) * 1grad` against a fixed 5-color OKLCH palette. Why this matters: - Driving animation progress from a frame counter (`++this._animValue`) rather than elapsed time (`performance.now()`) couples the visual speed of the workload to the display refresh rate and frame drops (e.g., running twice as fast at 120 Hz as at 60 Hz), whereas real web animations advance as a continuous function of elapsed time. - Stepping an integer modulo 400 against a static palette restricts every leaf's conic and linear gradient to 400 discrete states across the entire benchmark run. An engine can cache or pre-bake those 400 resolved gradient states after the first few seconds instead of evaluating dynamic CSS gradients and `color-mix()` styles each frame. Using continuous floating-point elapsed time and modulating the stage's OKLCH palette channels over time ensures the subtest measures ongoing CSS color/gradient evaluation and rasterization while preserving `contain: strict` and static glyph masks.
✅ Deploy Preview for webkit-motionmark-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
In the current Chess subtest,
--anim-valueis incremented by1on eachanimate()call and passed throughmod(var(--anim-input), 400) * 1gradagainst a fixed 5-color OKLCH palette.Why this matters:
++this._animValue) rather than elapsed time (performance.now()) couples the visual speed of the workload to the display refresh rate and frame drops (e.g., running twice as fast at 120 Hz as at 60 Hz), whereas real web animations advance as a continuous function of elapsed time.color-mix()styles each frame. Using continuous floating-point elapsed time and modulating the stage's OKLCH palette channels over time ensures the subtest measures ongoing CSS color/gradient evaluation and rasterization while preservingcontain: strictand static glyph masks.