Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion app/src/test/java/xyz/attacktive/weatherd/MoonPhaseTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
Loading