fix(stations): бесшовная петля свечения играющей станции
Центр свечения по cy двигался с sin(t*1.3) — некратная гармоника давала скачок на стыке цикла. Заменено на sin(2t): значения и скорость совпадают на t=0 и t=2π, петля повторяется ровно и плавно. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -250,8 +250,9 @@ private fun PlayingGlow(
|
|||||||
),
|
),
|
||||||
label = "glowPulse"
|
label = "glowPulse"
|
||||||
)
|
)
|
||||||
|
// Целые гармоники (1 и 2) → значения совпадают на t=0 и t=2π, петля бесшовна.
|
||||||
val cx = 0.5f + 0.22f * kotlin.math.cos(t)
|
val cx = 0.5f + 0.22f * kotlin.math.cos(t)
|
||||||
val cy = 0.5f + 0.22f * kotlin.math.sin(t * 1.3f)
|
val cy = 0.5f + 0.20f * kotlin.math.sin(2f * t)
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.scale(pulse)
|
.scale(pulse)
|
||||||
|
|||||||
Reference in New Issue
Block a user