diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 916aab0..95559a2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,5 +61,5 @@ jobs: mappingFile: 'app/build/outputs/mapping/release/mapping.txt' debugSymbols: 'app/build/outputs/native-debug-symbols/release/native-debug-symbols.zip' whatsNewDirectory: 'whatsnew' - tracks: 'alpha' + tracks: 'beta' status: 'completed' diff --git a/app/src/main/java/xyz/attacktive/weatherd/domain/render/SceneRenderer.kt b/app/src/main/java/xyz/attacktive/weatherd/domain/render/SceneRenderer.kt index 2324eae..9273a66 100644 --- a/app/src/main/java/xyz/attacktive/weatherd/domain/render/SceneRenderer.kt +++ b/app/src/main/java/xyz/attacktive/weatherd/domain/render/SceneRenderer.kt @@ -1132,7 +1132,10 @@ class SceneRenderer { buildMassTile(it, tileWidth.toFloat(), tileHeight.toFloat(), Color.rgb(232, 236, 240), 70, tileWidth * 0.12f, 5, 31L) } - // The two layers drift in opposite directions — by far the most legible motion cue for a texture this soft — with counter-phased opacity breathing and a slow vertical roll on top, so banks of mist visibly slide past each other, thicken, and thin. + /* + * The two layers drift in opposite directions — by far the most legible motion cue for a texture this soft. + * Counter-phased opacity breathing and a slow vertical roll on top, so banks of mist visibly slide past each other, thicken, and thin. + */ val breath = 0.5f + 0.5f * (0.7f * sin(timeSeconds * 0.45f) + 0.3f * sin(timeSeconds * 1.13f)) val rollAmplitude = height * 0.03f val roll = rollAmplitude * (0.7f * sin(timeSeconds * 0.25f) + 0.3f * sin(timeSeconds * 0.73f)) @@ -1227,7 +1230,7 @@ class SceneRenderer { /* * Each streak picks a fresh lane per fall cycle, so no drop re-falls one fixed path forever. * Every layer seeds its own Random: per-particle constants must never depend on another layer's breathing count, or one ±1 tick reshuffles every draw after it and whole layers teleport. - */ + */ val farRandom = Random(PRECIP_SEED) val points = rainBuffer(squallCount * 4) @@ -1369,9 +1372,9 @@ class SceneRenderer { val gust = gustFactor(timeSeconds, windFactor) /* - * Lane and sway phase re-hash every wrap, and the wrap spans a pad past both edges so soft dots never pop at the border. - * Per-layer Randoms and a steady near count keep flakes from teleporting when the squall factor ticks. - */ + * Lane and sway phase re-hash every wrap, and the wrap spans a pad past both edges so soft dots never pop at the border. + * Per-layer Randoms and a steady near count keep flakes from teleporting when the squall factor ticks. + */ val span = height + FLAKE_WRAP_PAD * 2f val farRandom = Random(PRECIP_SEED) val farLean = if (heavy) { @@ -1721,7 +1724,7 @@ class SceneRenderer { canvas.drawBitmap(sprite, null, spriteDest, spritePaint) } - /** Blits [sprite] as a square of [radius] around a center at [alpha], restoring the shared paint's opacity afterwards. */ + /** Blits [sprite] as a square of [radius] around a center at [alpha], restoring the shared paint's opacity afterward. */ private fun blitSprite(canvas: Canvas, sprite: Bitmap, centerX: Float, centerY: Float, radius: Float, alpha: Int) { spritePaint.alpha = alpha.coerceIn(0, 255) spriteDest.set(centerX - radius, centerY - radius, centerX + radius, centerY + radius) @@ -1783,7 +1786,8 @@ class SceneRenderer { private const val BIRD_CROSSING_SECONDS = 22f /** - * Soft cloud/fog tiles are built at a quarter of the surface resolution and stretched at blit time — they're heavily blurred anyway, and building them full-size stalls the first frames of a scene (BlurMaskFilter rasterisation scales with area, 16x cheaper here). + * Soft cloud/fog tiles are built at a quarter of the surface resolution and stretched at blit time. + * They're heavily blurred anyway, and building them full-size stalls the first frames of a scene (BlurMaskFilter rasterisation scales with area, 16x cheaper here). */ private const val TILE_DOWNSCALE = 4f diff --git a/app/src/test/java/xyz/attacktive/weatherd/MoonPhaseTest.kt b/app/src/test/java/xyz/attacktive/weatherd/MoonPhaseTest.kt index 76bd855..c48f64e 100644 --- a/app/src/test/java/xyz/attacktive/weatherd/MoonPhaseTest.kt +++ b/app/src/test/java/xyz/attacktive/weatherd/MoonPhaseTest.kt @@ -13,7 +13,7 @@ class MoonPhaseTest { @Test fun `full moon lands half a synodic month later`() { - // 2000-01-21 04:40 UTC, the full moon following the reference; day quantisation allows a couple of percent. + // 2000-01-21 04:40 UTC, the full moon following the reference; day quantization allows a couple of percent. assertEquals(0.5f, moonPhaseFor(948_429_600L), 0.04f) }