a27cf5a020
Closes the second half of the splash polish arc deferred in cacb19c.
A fullscreen ImageNode tiles a runtime-generated 2×2 RGBA8 texture
over the splash content — top row transparent, bottom row #1a1a1a
at ~30 % alpha — producing the 1 px-pitch horizontal scanline
pattern called for in docs/ui-mockups/splash-mobile.html.
Implementation:
- New build_scanline_image() pure helper returns the 2×2 source
texture. Pixels hard-coded as RGBA bytes (0,0,0,0 / 26,26,26,76)
so the visible appearance is locked into source rather than
reconstructed from constants.
- spawn_splash gains an `Option<ResMut<Assets<Image>>>` parameter;
when present (always in production), the image is added and an
ImageNode child of the splash root tiles it via
NodeImageMode::Tiled { tile_x: true, tile_y: true, stretch_value: 1.0 }.
When absent (legacy bare-MinimalPlugins tests), the overlay is
silently skipped — the rest of the splash still spawns.
- New SplashFadableImage marker + extension to advance_splash that
writes (1, 1, 1, global_alpha) into the ImageNode tint each tick.
Multiplying (rather than overwriting like SplashFadableBg does)
preserves the per-pixel 30 % alpha in the texture so the GPU
composite is `0.3 × global_alpha` — fades cleanly with the
splash without drifting to 100 % alpha during the hold.
- New SplashScanlineOverlay marker for tests. Distinct from
SplashFadableImage so the test query intent stays explicit
(there's only one fadable image today, but adding more later
shouldn't break the scanline-locator).
Bevy 0.18 API quirks worth pinning for next time: RenderAssetUsages
is re-exported under `bevy::asset::` (not `bevy::render::render_asset`),
and TextureFormat::pixel_size() returns Result<usize, _> rather
than usize. Both fixed in the imports / debug_assert.
Headless test fixture now also init_resource::<Assets<Image>>()
since MinimalPlugins doesn't pull AssetPlugin — same pattern
settings_plugin's tests already use.
Two new tests (1183 → 1185): build_scanline_image_has_expected_2x2_rgba_bytes
locks the texture pixels literally, scanline_overlay_spawns_and_fades_with_splash
asserts spawn placement under SplashRoot and the new fade-images
branch's correctness end-to-end.
This closes Option B from the SESSION_HANDOFF Resume prompt — both
splash polish pieces (cursor pulse + scanline overlay) shipped.