Repository navigation
Conversation
RainRings drew in each cell one thin line growing linearly, clipped to its cell, in one flat color: painted circles. A ring is now a ripple: its radius grows with the square root of its age, it fades in over its first tenth and out as it grows, and its crest, a Gaussian bump, is shaded by its slope toward the light along the ground, one side lighter and the other darker, so it reads as relief. Each pixel sums the rings of its cell and of the neighboring cells a ring can reach it from, so rings cross their cell's edge; the color option still sets their tone and strength. Pixels too wide, covered or too steep skip the cells: 3.2 ms against 3.0 ms at 1201 x 647 near the ground.
This branch has not been deployed
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.
RainRings drew one thin line per cell, growing linearly, clipped to its cell, in one flat color: painted circles rather than ripples. This replaces the look, so it needs the owner's eye: compare it in the post-process demo (Rain rings) against master.
colorstill tints it and sets its strength.Tested:
npm test, typecheck, build-demos; the post-process demo 4 m above a meadow at noon, toward and away from the sun. Frame time at 1201 x 647: 3.2 ms for the rings, 3.0 ms for the old ones (6.6 ms before the early outs).Open for the owner: under a sun near the zenith the relief fades (it follows the light's share along the ground), and under Precipitation's overcast the rings are still lit by the sun; shading by the view direction (a wet crest reflecting a brighter sky overhead than toward the horizon) would hold in both. A ring crossing the water's edge changes its pace there (the wetness is the pixel's, not the drop's).