feat: add sky backdrops with cloud decks, storms, and lightning - #42
Merged
Conversation
Adds a fourth backdrop family alongside the gradients, deep-space scenes, and geometric patterns. A sky palette carries the colours and a SkyKind carries the structure, so --palette and --sky compose the same way --palette and --scene already do. Ten conditions: blue-hour, golden-hour, overcast, cirrus, mackerel, mammatus, storm, bolt, aurora, crepuscular. Seven palettes sampled from photographs of the named conditions, the same way the space palettes are sampled from astrophotography. Everything is drawn from the style seed at render time on image + rand, with no new dependencies and nothing shipped as a bitmap, so a sky resolves at any card size and --style-seed reproduces one exactly. Sky palettes stay out of the default random rotation, which filters to space palettes, so existing seeds render exactly as before. They are reachable by explicit --palette or by naming them in a pool, matching how the gradient and pattern families already behave. ConfigCommand::Set is boxed because the args struct now carries one field per styling axis and tripped clippy::large_enum_variant.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Adds a fourth backdrop family alongside the gradients, deep-space scenes, and geometric
patterns. A sky palette carries the colours and a
SkyKindcarries the structure, so--paletteand--skycompose the same way--paletteand--scenealready do.Ten conditions:
blue-hour,golden-hour,overcast,cirrus,mackerel,mammatus,storm,bolt,aurora,crepuscular. Seven palettes sampled from photographs of thenamed conditions, the same way the space palettes are sampled from astrophotography.
Everything is drawn from the style seed at render time on
image+rand. No newdependencies, nothing shipped as a bitmap, so a sky resolves at any card size and
--style-seedreproduces one exactly.Existing seeds are unaffected
Sky palettes stay out of the default random rotation, which filters to
BackdropKind::Space(guarded byrandom_rotation_only_picks_space_palettes). They arereachable by explicit
--paletteor by naming them in a pool, matching how the gradientand pattern families already behave. Palette selection uses rendezvous hashing over names,
so a new palette only takes the seeds it wins and leaves the rest of the table alone.
Notes for review
Every real defect in this work was invisible to the test suite. The full suite passed
green while three of the ten scenes rendered as speckle, halftone dots, and rounded
squares. They were only caught by rendering PNGs and looking at them. Structural tests
(opaque everywhere, varies across the canvas, reproducible from a seed, kinds differ from
each other) cannot catch this class of bug, so the added tests are a floor, not a
guarantee.
Preview any scene without needing a capture on disk:
ConfigCommand::Setis boxed because the args struct now carries one field per stylingaxis and tripped
clippy::large_enum_variant. No#[allow]was added anywhere.stormis the weakest of the ten. Without bolts it reads as a murky field. It may notearn its place as a scene separate from
bolt; happy to drop it if you agree.Follow-on work for terrain backdrops (forest, ocean, dunes, mountains, plateaus) is
tracked in #41.
Verification
cargo fmt --check,cargo clippy --all-targets -- -D warnings, andcargo test, allgreen.