0.108.39: Nite Owl's slow blink and glance at the clock; Luna's nightcap settles on
Paul, 6 November 2026. In Nite Owl's ident he blinks slowly, then glances sideways at a little clock beside him. As Tots Dreamtime begins, Luna's nightcap comes down and settles onto her head with a small bob. Both still with Reduce motion (eyes open, cap on). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,8 @@ import androidx.compose.ui.geometry.Size
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.translate
|
||||
import androidx.compose.ui.graphics.drawscope.withTransform
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
@@ -79,7 +81,11 @@ internal fun TakeoverMark(t: Takeover, modifier: Modifier = Modifier, height: Dp
|
||||
}
|
||||
|
||||
/** Nite Owl, to the late-night model sheet (design/arcade/late-night/nite-owl.svg): indigo, ear tufts, half-closed lids, a small beak. */
|
||||
internal fun DrawScope.drawNiteOwl(c: Offset, r: Float, shut: Boolean = false) {
|
||||
internal fun DrawScope.drawNiteOwl(c: Offset, r: Float, shut: Boolean = false,
|
||||
/** Lids lowered over the eyes, 0 to 1: a slow blink. */
|
||||
lid: Float = 0f,
|
||||
/** Where he looks, -1 (left) to 1 (right). */
|
||||
glance: Float = 0f) {
|
||||
val k = r / 36f
|
||||
fun p(x: Float, y: Float) = Offset(c.x + (x - 50f) * k, c.y + (y - 55f) * k)
|
||||
val indigo = Color(0xFF4F63E0); val belly = Color(0xFF7F8FF0); val navy = Color(0xFF14213D)
|
||||
@@ -90,16 +96,25 @@ internal fun DrawScope.drawNiteOwl(c: Offset, r: Float, shut: Boolean = false) {
|
||||
drawOval(Color(0xFF3E50C8), p(15f, 42f), Size(14f * k, 32f * k)); drawOval(Color(0xFF3E50C8), p(71f, 42f), Size(14f * k, 32f * k))
|
||||
drawCircle(Color.White.copy(alpha = .22f), 6f * k, p(36f, 34f))
|
||||
for (x in listOf(38f, 62f)) {
|
||||
if (shut) { drawLine(navy, p(x - 8f, 46f), p(x + 8f, 46f), 2.5f * k); continue }
|
||||
drawCircle(Color.White, 9f * k, p(x, 44f)); drawCircle(navy, 4.5f * k, p(x + 1.5f, 46f))
|
||||
drawArc(indigo, 180f, 180f, true, p(x - 9.5f, 34.5f), Size(19f * k, 19f * k))
|
||||
if (shut || lid >= .98f) { drawLine(navy, p(x - 8f, 46f), p(x + 8f, 46f), 2.5f * k); continue }
|
||||
drawCircle(Color.White, 9f * k, p(x, 44f)); drawCircle(navy, 4.5f * k, p(x + 1.5f + glance * 3.5f, 46f))
|
||||
// His usual half-closed lid, lowered further for a blink.
|
||||
drawArc(indigo, 180f, 180f, true, p(x - 9.5f, 34.5f + lid * 9f), Size(19f * k, 19f * k))
|
||||
if (lid > 0f) drawRect(indigo, p(x - 9.5f, 34.5f), Size(19f * k, (9.5f + lid * 9f) * k))
|
||||
}
|
||||
drawPath(androidx.compose.ui.graphics.Path().apply { val a = p(46f, 51f); val b = p(54f, 51f); val d = p(50f, 58f); moveTo(a.x, a.y); lineTo(b.x, b.y); lineTo(d.x, d.y); close() }, Color(0xFFFFC23D))
|
||||
}
|
||||
|
||||
/** Luna in her nightcap: Night Cap, Luna's sign-off look (design/arcade/late-night/night-cap.svg). */
|
||||
internal fun DrawScope.drawNightCap(c: Offset, r: Float, shut: Boolean = false) {
|
||||
internal fun DrawScope.drawNightCap(c: Offset, r: Float, shut: Boolean = false,
|
||||
/** The cap coming down onto her head, 0 (above, out of sight) to 1 (on). */
|
||||
capOn: Float = 1f) {
|
||||
drawOrbChaser(c, r, OrbCharacter.Luna, OrbDir.Down, false, false, false, 0f, eyesShut = shut)
|
||||
if (capOn <= 0f) return
|
||||
withTransform({ translate(top = -(1f - capOn) * r * 1.6f) }) { drawCap(c, r) }
|
||||
}
|
||||
|
||||
private fun DrawScope.drawCap(c: Offset, r: Float) {
|
||||
val cap = androidx.compose.ui.graphics.Path().apply {
|
||||
moveTo(c.x - r * .95f, c.y - r * .62f)
|
||||
quadraticTo(c.x - r * .3f, c.y - r * 1.6f, c.x + r * .7f, c.y - r * 1.3f)
|
||||
@@ -116,8 +131,24 @@ internal fun DrawScope.drawHost(host: TakeoverHost, c: Offset, r: Float, t: Long
|
||||
val shut = !calm && (t % 3_400) < 150
|
||||
when (host) {
|
||||
TakeoverHost.Blaze -> drawOrbChaser(c, r, OrbCharacter.Blaze, OrbDir.Right, false, false, false, t / 140f, eyesShut = shut)
|
||||
TakeoverHost.NiteOwl -> drawNiteOwl(c, r, shut)
|
||||
TakeoverHost.NightCap -> drawNightCap(c, r * .9f, shut)
|
||||
// Nite Owl (Paul, 6 November 2026): a slow blink, then a sideways glance at the clock beside him.
|
||||
TakeoverHost.NiteOwl -> {
|
||||
val clockAt = Offset(c.x + r * 2.1f, c.y - r * .4f)
|
||||
drawCircle(Color(0xFFE8F0FF), r * .42f, clockAt); drawCircle(Color(0xFF14213D), r * .42f, clockAt, style = Stroke(r * .05f))
|
||||
drawLine(Color(0xFF14213D), clockAt, clockAt + Offset(0f, -r * .28f), r * .05f); drawLine(Color(0xFF14213D), clockAt, clockAt + Offset(r * .2f, 0f), r * .05f)
|
||||
if (calm) drawNiteOwl(c, r) else {
|
||||
val blink = when { t < 600 -> 0f; t < 1_300 -> (t - 600) / 700f; t < 1_600 -> 1f; t < 2_300 -> 1f - (t - 1_600) / 700f; else -> 0f }
|
||||
val look = when { t < 2_500 -> 0f; t < 2_900 -> (t - 2_500) / 400f; t < 4_600 -> 1f; t < 5_000 -> 1f - (t - 4_600) / 400f; else -> 0f }
|
||||
drawNiteOwl(c, r, lid = blink, glance = look)
|
||||
}
|
||||
}
|
||||
// Luna's nightcap settles onto her head as Dreamtime begins, with a small bob; on already with Reduce motion.
|
||||
TakeoverHost.NightCap -> {
|
||||
val drop = if (calm) 1f else ((t - 300) / 900f).coerceIn(0f, 1f)
|
||||
val eased = 1 - (1 - drop) * (1 - drop) * (1 - drop)
|
||||
val settle = if (calm || t < 1_200) 0f else sin((t - 1_200) / 90.0).toFloat() * (1f - ((t - 1_200) / 500f).coerceIn(0f, 1f)) * .04f
|
||||
drawNightCap(c, r * .9f, shut && t > 1_800, capOn = (eased - settle).coerceIn(0f, 1.05f))
|
||||
}
|
||||
TakeoverHost.Drift -> drawOrbChaser(c, r, OrbCharacter.Drift, OrbDir.Right, false, false, false, t / 500f, eyesShut = shut)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user