feat: enhance avatar merging effect with dynamic island representation in ProfileMetaballOverlay

This commit is contained in:
k1ngsterr1
2026-02-01 02:25:57 +05:00
parent a55a5b4668
commit c56b40f3f1

View File

@@ -200,7 +200,35 @@ fun ProfileMetaballOverlay(
modifier = modifier.fillMaxSize(),
cutoff = ProfileMetaballConstants.CUTOFF
) {
// Avatar blob only - NO fake island
// Camera/Island blob - small circle at Dynamic Island position
// Only show when avatar is close enough to merge (create the droplet effect)
val showDroplet = collapseProgress > 0.3f && avatarState.showBlob
if (showDroplet) {
val islandSize = 40.dp // Small circle representing camera/island
val islandY = statusBarHeight / 2 - islandSize / 2 // Center of status bar
MetaEntity(
modifier = Modifier.offset(
x = (screenWidth - islandSize) / 2,
y = islandY
),
blur = ProfileMetaballConstants.BLUR_RADIUS,
metaContent = {
// Small black circle at camera position
Box(
modifier = Modifier
.size(islandSize)
.background(
color = Color.Black,
shape = RoundedCornerShape(islandSize / 2) // Perfect circle
)
)
},
content = {} // No visible content, just the blur shape
)
}
// Avatar blob - moves up and shrinks on collapse
if (avatarState.showBlob) {
MetaEntity(
modifier = Modifier.offset(x = avatarState.x, y = avatarState.y),