Observe frame-zero cuts and keep picker masks opaque

This commit is contained in:
justinzeus 2026-11-08 03:36:19 +01:00
parent 612ae79f0c
commit b4742bed6d
3 changed files with 116 additions and 38 deletions

View file

@ -50,6 +50,9 @@ fun PersonCommitVeil(commit: PersonCommit, modifier: Modifier = Modifier) {
.drawWithContent {
drawContent()
val elapsed = commit.elapsedMillis
val full = if (commit.timelineComplete) 1f else if (reduced) elapsed / duration else (elapsed - duration) / duration
drawRect(C.bg.copy(alpha = M.ease.transform(full.coerceIn(0f, 1f))))
// Paint the opaque phase-one masks last: phase two must not round their background pixels upward.
if (!reduced) {
val alpha = M.ease.transform((elapsed / duration).coerceIn(0f, 1f))
val width = L.pickerAvatar.toPx()
@ -61,8 +64,6 @@ fun PersonCommitVeil(commit: PersonCommit, modifier: Modifier = Modifier) {
size = Size(width + gap, S.pickerGearTop.toPx() - S.pickerPeopleTop.toPx() + gap / 2))
}
}
val full = if (commit.timelineComplete) 1f else if (reduced) elapsed / duration else (elapsed - duration) / duration
drawRect(C.bg.copy(alpha = M.ease.transform(full.coerceIn(0f, 1f))))
}) {
Wordmark(Modifier.offset(L.safeSide, L.safeTopPicker))
PickerPeople(commit.people, commit.chosenIndex, false, onPerson = null, onGear = null)