diff --git a/CHANGELOG.md b/CHANGELOG.md index 47535d2..87b6178 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Kaleido releases +## 0.6.2 + +- New startup animation, the same as Kaleido Desktop's: a kaleidoscope of shards turns and gathers into the Kaleido mark, then the view flies through its centre into Home. + ## 0.6.1 - Make browsing noticeably smoother on Android TV hardware. Switching between Home, Movies and TV no longer rebuilds each section, returning to the hero or from a title page no longer redraws Home, and moving between rows prepares the next cards ahead of time instead of mid-scroll. diff --git a/app/src/main/java/tv/kaleido/app/StartupSplash.kt b/app/src/main/java/tv/kaleido/app/StartupSplash.kt index ffe88ed..8ec8a4d 100644 --- a/app/src/main/java/tv/kaleido/app/StartupSplash.kt +++ b/app/src/main/java/tv/kaleido/app/StartupSplash.kt @@ -16,30 +16,24 @@ import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Path import androidx.compose.ui.graphics.PathFillType +import androidx.compose.ui.graphics.drawscope.Stroke import androidx.compose.ui.graphics.drawscope.clipPath -import androidx.compose.ui.graphics.drawscope.clipRect -import androidx.compose.ui.graphics.drawscope.withTransform -import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.semantics.clearAndSetSemantics import androidx.compose.ui.semantics.contentDescription -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.drawText -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.text.rememberTextMeasurer -import androidx.compose.ui.unit.sp import kotlinx.coroutines.flow.first import kotlinx.coroutines.withTimeoutOrNull import kotlin.math.PI import kotlin.math.cos import kotlin.math.exp import kotlin.math.ln +import kotlin.math.max import kotlin.math.sin -private class ApertureFacet(val points:List,val color:Color,val normal:Offset) +private class KaleidoFacet(val points:List,val centroid:Offset,val color:Color,val angle:Float) // Exact geometry and colors from brand_mark.xml, centered on its 64-unit viewport. -// Each facet carries the outward normal of its hexagon edge for the iris motion. -private val apertureFacets=listOf( +// Each facet carries its centroid and the angle of its hexagon edge's outward normal. +private val kaleidoFacets=listOf( floatArrayOf(33f,4f,55.5f,17f,42.5f,24.5f,33f,19f) to 0xFFC3E8D3, floatArrayOf(56.5f,19f,56.5f,45f,43.5f,37.5f,43.5f,26.5f) to 0xFF71B9B0, floatArrayOf(55.5f,47f,33f,60f,33f,45f,42.5f,39.5f) to 0xFF3D7C7B, @@ -47,52 +41,65 @@ private val apertureFacets=listOf( floatArrayOf(7.5f,45f,7.5f,19f,20.5f,26.5f,20.5f,37.5f) to 0xFFE9D8AE, floatArrayOf(8.5f,17f,31f,4f,31f,19f,21.5f,24.5f) to 0xFFEEF2DD ).mapIndexed { index,(points,color) -> - val angle=(-60.0+60*index)*PI/180 - ApertureFacet(points.toList().chunked(2){Offset(it[0]-32f,it[1]-32f)},Color(color),Offset(cos(angle).toFloat(),sin(angle).toFloat())) + val corners=points.toList().chunked(2){Offset(it[0]-32f,it[1]-32f)} + val centroid=Offset(corners.sumOf{it.x.toDouble()}.toFloat()/4,corners.sumOf{it.y.toDouble()}.toFloat()/4) + KaleidoFacet(corners,centroid,Color(color),rad(-60f+60*index)) } +// Loose shards around each facet: angle from the facet's normal (degrees), starting radius (dp), +// size, palette offset and how far they tumble on the way in. +private class Shard(val angle:Float,val radius:Float,val scale:Float,val color:Int,val spin:Float) +private val shards=listOf( + Shard(20f,170f,.42f,2,1.2f),Shard(-20f,170f,.42f,4,-1.2f), + Shard(36f,320f,.3f,3,2.1f),Shard(-36f,320f,.3f,1,-2.1f), + Shard(8f,420f,.2f,5,3f),Shard(-8f,420f,.2f,5,-3f) +) + // Inner hexagon traced by the facets' inner edges: the aperture the exit flies through. private const val InnerRadius=13.6f -private const val InnerApothem=11.8f -private const val IntroBox=132f -// The settled lockup is the header Brand() scaled up, so it reads as the same mark. -private const val LockScale=2.75f -private const val LockBox=29f*LockScale -private const val LockGap=7f*LockScale -// Opening timeline in ms, paused at GatherEnd until startup is ready. Completion is reported at IntroEnd; the timeline keeps -// running to TimelineEnd only for the slow settle while the exit plays or startup loads. +private const val MarkBox=140f +// Timeline in ms. The shard field fades in, still, until GatherEnd and holds there until startup is ready; the +// gather then plays in motion time (timeline minus GatherEnd). Completion is reported at IntroEnd; the timeline +// keeps running to TimelineEnd only so the mark stays alive while the exit plays or startup loads. private const val GatherEnd=260f -private const val IntroEnd=2260f -private const val TimelineEnd=2900f +private const val IntroEnd=GatherEnd+1700f +private const val TimelineEnd=GatherEnd+8000f const val StartupExitMillis=640 +// The mark is larger than the old lockup, so it zooms less to end the flight at the same size. +private const val FlightZoom=30f private val Emphasized=CubicBezierEasing(.2f,0f,0f,1f) private val EmphasizedDecelerate=CubicBezierEasing(.05f,.7f,.1f,1f) private val Standard=CubicBezierEasing(.4f,0f,.2f,1f) private val InOut=CubicBezierEasing(.45f,0f,.55f,1f) -// A mechanical iris: the blades gather, snap open, and overshoot slightly as they lock. -private val IrisOpen=CubicBezierEasing(.55f,0f,.15f,1f) -private val IrisTwist=CubicBezierEasing(.5f,0f,.18f,1.1f) // Applied in log space: a brief pull back, then an accelerating flight. private val Flight=CubicBezierEasing(.55f,-.06f,.8f,.36f) private val SeaGlass=Color(0xFF71B9B0) +private val Light=Color(0xFFEEF2DD) +private fun rad(degrees:Float)=degrees*PI.toFloat()/180 private fun phase(time:Float,start:Float,end:Float)=((time-start)/(end-start)).coerceIn(0f,1f) private fun mix(from:Float,to:Float,amount:Float)=from+(to-from)*amount -private class Iris(val inward:Float,val theta:Float,val grow:Float) -private fun irisAt(time:Float):Iris { - val progress=phase(time,140f,1180f) - return Iris(InnerApothem*(1f-IrisOpen.transform(progress)),(-44f*(1f-IrisTwist.transform(progress))*PI/180).toFloat(), - mix(.64f,1f,Emphasized.transform(progress))) +/** A facet turned [rotation] about the mark center, shrunk and spun about its own centroid, then offset. */ +private fun Path.facet(facet:KaleidoFacet,center:Offset,unit:Float,rotation:Float=0f,scale:Float=1f,spin:Float=0f,offset:Offset=Offset.Zero) { + val cr=cos(rotation);val sr=sin(rotation);val cs=cos(spin);val ss=sin(spin) + facet.points.forEachIndexed { index,point -> + val rx=point.x-facet.centroid.x;val ry=point.y-facet.centroid.y + val x=facet.centroid.x+(rx*cs-ry*ss)*scale;val y=facet.centroid.y+(rx*ss+ry*cs)*scale + val px=center.x+(x*cr-y*sr)*unit+offset.x;val py=center.y+(x*sr+y*cr)*unit+offset.y + if(index==0)moveTo(px,py)else lineTo(px,py) + } + close() } -private fun Path.facet(facet:ApertureFacet,iris:Iris,unit:Float,center:Offset) { - val c=cos(iris.theta);val s=sin(iris.theta);val k=unit*iris.grow +/** A loose facet shape with its centroid at [position]. */ +private fun Path.shard(facet:KaleidoFacet,position:Offset,size:Float,angle:Float) { + val c=cos(angle);val s=sin(angle) facet.points.forEachIndexed { index,point -> - val x=point.x-facet.normal.x*iris.inward;val y=point.y-facet.normal.y*iris.inward - val px=center.x+(x*c-y*s)*k;val py=center.y+(x*s+y*c)*k + val x=point.x-facet.centroid.x;val y=point.y-facet.centroid.y + val px=position.x+(x*c-y*s)*size;val py=position.y+(x*s+y*c)*size if(index==0)moveTo(px,py)else lineTo(px,py) } close() @@ -111,21 +118,21 @@ private fun Path.hexagon(center:Offset,radius:Float) { fun startupArrivalScale(exit:Float)=mix(1.14f,1f,EmphasizedDecelerate.transform(phase(exit,.25f,1f))) /** - * The cold-start brand sequence: a closed iris lit from behind twists open once [ready], light catches - * the facets, and the wordmark slides out of the mark. [exit] (0–1, linear) then flies - * the camera through the aperture's dark center, revealing the app drawn beneath. + * The cold-start brand sequence, the same as Kaleido Desktop: a kaleidoscope. A mirrored field of shards turns + * and gathers into the mark's six facets once [ready]; small shards circle the mark if startup runs on. [exit] + * (0–1, linear) then flies the camera through the mark's open center, revealing the app drawn beneath. */ @Composable fun StartupSplash(exit:()->Float,ready:()->Boolean,onComplete:()->Unit) { val timeline=remember{Animatable(0f)} val complete by rememberUpdatedState(onComplete) LaunchedEffect(Unit){ // Animatable honors Android's animation duration scale, including animations off. - // Light gathers on the closed iris straight away. It is nearly still, so the first - // cold-start frames can hitch there without being noticed. + // The field fades in faint and still straight away, so the first cold-start frames + // can hitch there without being noticed. timeline.animateTo(GatherEnd,tween(GatherEnd.toInt(),easing=LinearEasing)) // Startup data arriving composes the app beneath the splash in one long frame. Hold // until that has happened and frames arrive steadily again (at most 700 ms), so - // the iris never opens through it. + // the gather, fastest at its start, never runs through it. withTimeoutOrNull(700){ snapshotFlow{ready()}.first{it} awaitSteadyFrames(4) @@ -136,42 +143,23 @@ fun startupArrivalScale(exit:Float)=mix(1.14f,1f,EmphasizedDecelerate.transform( snapshotFlow{timeline.value>=IntroEnd}.first{it} complete() } - val measurer=rememberTextMeasurer() - val density=LocalDensity.current - val style=TextStyle(color=Accent,fontSize=(19f*LockScale).sp,fontWeight=FontWeight.Bold) - val letters=remember(measurer,density){"KALEIDO".map{measurer.measure(it.toString(),style)}} - val letterX=remember(letters,density){ - val tracking=with(density){(1.4f*LockScale).sp.toPx()} - letters.runningFold(0f){x,letter->x+letter.size.width+tracking} - } - val textWidth=letterX.last()-with(density){(1.4f*LockScale).sp.toPx()} - val capHeight=with(density){style.fontSize.toPx()}*.711f val paths=remember{List(4){Path()}} Canvas(Modifier.fillMaxSize().clearAndSetSemantics{contentDescription="Kaleido starting"}) { val time=timeline.value + val motion=time-GatherEnd + val prelude=EmphasizedDecelerate.transform(phase(time,0f,GatherEnd)) val q=exit() - val dp=density.density - val lockup=Emphasized.transform(phase(time,1250f,2000f)) - val lockWidth=(LockBox+LockGap)*dp+textWidth - var box=mix(IntroBox,LockBox,lockup)*dp - // A slow push-in keeps the settled frame alive. - val drift=1f+.025f*InOut.transform(phase(time,1900f,2900f)) - var cx=mix(center.x,center.x-lockWidth/2+LockBox*dp/2,lockup) - var cy=center.y - var zoom=1f;var textAlpha=1f;var textShift=0f;var hole=0f - if(q>0f) { - zoom=exp(ln(52f)*Flight.transform(q)) - val recenter=Standard.transform((q/.75f).coerceAtMost(1f)) - cx=mix(cx,center.x,recenter);cy=mix(cy,center.y,recenter) - textAlpha=1f-Standard.transform(phase(q,0f,.4f)) - textShift=-14f*dp*Standard.transform(phase(q,0f,.4f)) - hole=InOut.transform(phase(q,.12f,.5f)) - } - val unit=box/64f*drift*zoom - val origin=Offset(cx,cy) - val (surface,aperture,facets,ray)=paths + val dp=density + val zoom=if(q>0f)exp(ln(FlightZoom)*Flight.transform(q))else 1f + val unit=MarkBox*dp/64f*zoom + val origin=center + val gather=Emphasized.transform(phase(motion,0f,1450f)) + // The whole field turns a little less than half a revolution as it gathers. + val field=rad(-150f)*(1f-Emphasized.transform(phase(motion,0f,1550f))) + val (surface,aperture,shape,ring)=paths // Splash surface: Ink everywhere, with the aperture's center cut away on exit. + val hole=InOut.transform(phase(q,.12f,.5f)) if(hole<=0f)drawRect(Ink) else { surface.rewind();surface.fillType=PathFillType.EvenOdd @@ -180,81 +168,70 @@ fun startupArrivalScale(exit:Float)=mix(1.14f,1f,EmphasizedDecelerate.transform( if(hole<1f){aperture.rewind();aperture.hexagon(origin,InnerRadius*unit);drawPath(aperture,Ink,alpha=1f-hole)} } - val iris=irisAt(time) - val lightUp=EmphasizedDecelerate.transform(phase(time,0f,620f)) - val light=lightUp*(1f-Standard.transform(phase(time,620f,1250f))) - val ambient=.03f*InOut.transform(phase(time,300f,900f))*(1f-Standard.transform(phase(time,1500f,2300f))) - // Light behind the blades: a soft bloom, a hot core, and rays leaking through - // the six gaps while the iris turns. - if(light>.001f||ambient>.001f) { - val bloom=250f*dp - drawCircle(Brush.radialGradient(0f to SeaGlass.copy(alpha=.16f*light+ambient),.45f to SeaGlass.copy(alpha=.04f*light+ambient*.3f), - 1f to Color.Transparent,center=origin,radius=bloom),bloom,origin,blendMode=BlendMode.Plus) - val core=26f*unit/2.0625f*mix(.6f,1f,light) - if(light>.001f) { - drawCircle(Brush.radialGradient(0f to Color(1f,.98f,.925f,.95f*light),.35f to Color(0xFFEEF2DD).copy(alpha=.55f*light), - 1f to Color.Transparent,center=origin,radius=core),core,origin,blendMode=BlendMode.Plus) - val rays=light*(IrisOpen.transform(phase(time,140f,1180f))*2.5f).coerceAtMost(1f) - for(index in 0 until 6) { - val angle=((-90.0+60*index)*PI/180).toFloat()+iris.theta - val length=mix(40f,250f,lightUp)*(.75f+.25f*sin(index*2.1f+1f))*dp - ray.rewind();ray.moveTo(origin.x,origin.y) - ray.lineTo(origin.x+cos(angle-.014f)*length,origin.y+sin(angle-.014f)*length) - ray.lineTo(origin.x+cos(angle+.014f)*length,origin.y+sin(angle+.014f)*length);ray.close() - drawPath(ray,Brush.linearGradient(0f to Color(1f,.973f,.902f,.42f*rays),.25f to Color(0xFFD6ECE2).copy(alpha=.12f*rays), - 1f to Color.Transparent,start=origin,end=Offset(origin.x+cos(angle)*length,origin.y+sin(angle)*length)),blendMode=BlendMode.Plus) + // The kaleidoscope's mirror lines, turning with the field. + val lines=max(.5f*prelude,InOut.transform(phase(motion,0f,450f)))*(1f-Standard.transform(phase(motion,1100f,1700f))) + if(lines>0f) for(index in 0 until 6) { + val angle=field+rad(-90f+60*index) + val end=origin+Offset(cos(angle),sin(angle))*(640f*dp) + drawLine(Brush.linearGradient(0f to Light.copy(alpha=.2f*lines),1f to Color.Transparent,start=origin,end=end),origin,end,dp) + } + + val bloom=.09f*InOut.transform(phase(motion,200f,1000f))*(1f-Standard.transform(phase(motion,1500f,2600f))) + if(bloom>.001f) { + val radius=300f*dp + drawCircle(Brush.radialGradient(0f to SeaGlass.copy(alpha=bloom),.45f to SeaGlass.copy(alpha=bloom*.3f),1f to Color.Transparent, + center=origin,radius=radius),radius,origin,blendMode=BlendMode.Plus) + } + + // Shards spiral inward, faster than the field turns, and vanish into the center. + val inward=Emphasized.transform(phase(motion,0f,1350f)) + kaleidoFacets.forEachIndexed { s,facet -> + shards.forEachIndexed { j,shard -> + val appear=max(.3f*prelude,Standard.transform(phase(motion,j*50f+s*25,j*50f+s*25+420))) + val vanish=Standard.transform(phase(motion,750f+j*45,1350f+j*45)) + if(appear>0f&&vanish<1f) { + val angle=facet.angle+rad(shard.angle)+field*1.5f + val radius=shard.radius*dp*(1f-.88f*inward) + shape.rewind() + shape.shard(facet,origin+Offset(cos(angle),sin(angle))*radius,unit*shard.scale*(1f-.6f*vanish),field*2+shard.spin*(1f-gather)) + drawPath(shape,kaleidoFacets[(s+shard.color)%6].color,alpha=appear*(1f-vanish)*.9f,blendMode=BlendMode.Screen) } } } - // Facets. Short echoes of earlier frames act as motion blur while the blades - // turn; they disappear beneath the facets once the iris is still. - fun facetAlpha(index:Int)=EmphasizedDecelerate.transform(phase(time,40f+index*34,380f+index*34)) - if(time<1400f) for((delay,alpha) in listOf(84f to .07f,56f to .12f,28f to .2f)) { - val echo=irisAt(time-delay) - apertureFacets.forEachIndexed { index,facet -> - facets.rewind();facets.facet(facet,echo,unit,origin);drawPath(facets,facet.color,alpha=alpha*facetAlpha(index)) - } - } - apertureFacets.forEachIndexed { index,facet -> - facets.rewind();facets.facet(facet,iris,unit,origin);drawPath(facets,facet.color,alpha=facetAlpha(index)) + // The six facets ride in from the field and lock into the mark. + kaleidoFacets.forEachIndexed { s,facet -> + val radius=240f*dp*(1f-gather);val angle=facet.angle+field + shape.rewind() + shape.facet(facet,origin,unit,field,mix(.55f,1f,gather),rad(-60f)*(1f-gather),Offset(cos(angle),sin(angle))*radius) + drawPath(shape,facet.color,alpha=max(.3f*prelude,Standard.transform(phase(motion,s*25f,s*25f+420)))) } - val sheen=phase(time,980f,1560f) - if(light>.01f||(sheen>0f&&sheen<1f)) { - facets.rewind();apertureFacets.forEach{facets.facet(it,iris,unit,origin)} - clipPath(facets) { - // Backlight tints the blades while the core is hot, so they read as glass. - if(light>.01f) { - val radius=36f*unit/2.0625f - drawCircle(Brush.radialGradient(0f to Color(1f,.988f,.94f,.26f*light),1f to Color.Transparent,center=origin,radius=radius),radius,origin) - } - // One diagonal band of light crosses the settled mark. - if(sheen>0f&&sheen<1f) { - val reach=34f*unit;val angle=36f*PI.toFloat()/180;val direction=Offset(cos(angle),sin(angle)) - val position=mix(-1.25f,1.25f,InOut.transform(sheen))*reach;val width=10f*unit - val peak=.42f*sin((sheen*1.1f).coerceAtMost(1f)*PI.toFloat()) - drawRect(Brush.linearGradient(0f to Color.Transparent,.5f to Color.White.copy(alpha=peak),1f to Color.Transparent, - start=origin+direction*(position-width),end=origin+direction*(position+width)),origin-Offset(reach,reach),Size(reach*2,reach*2)) - } - } + // A ring pulses out as the facets lock. + val pulse=phase(motion,1380f,2050f) + if(pulse>0f&&pulse<1f) { + ring.rewind();ring.hexagon(origin,(30f+24f*EmphasizedDecelerate.transform(pulse))*unit) + drawPath(ring,SeaGlass,alpha=.45f*(1f-pulse),style=Stroke(1.5f*dp)) } - // The wordmark slides out from behind the mark as it moves into the lockup. - if(time>=1400f&&textAlpha>0f) { - val scale=box/(LockBox*dp)*drift - val textLeft=cx-box*drift/2+(LockBox+LockGap)*dp*scale - val slide=EmphasizedDecelerate.transform(phase(time,1400f,2050f)) - val baseline=cy+capHeight/2*scale - clipRect(left=cx+24.5f*unit+2f*dp*scale) { - letters.forEachIndexed { index,letter -> - val start=1460f+index*45 - val reveal=Standard.transform(phase(time,start,start+320f)) - if(reveal>0f) withTransform({ - translate(textLeft+(letterX[index]-(1f-slide)*textWidth*.42f)*scale+textShift,baseline-letter.firstBaseline*scale) - scale(scale,scale,pivot=Offset.Zero) - }) {drawText(letter,alpha=reveal*textAlpha)} - } + // Still starting: small shards keep circling the mark. + val idle=Standard.transform(phase(motion,2300f,2900f))*(1f-phase(q,0f,.25f)) + if(idle>0f) for(s in 0 until 6) for(side in intArrayOf(-1,1)) { + val angle=rad(-60f+60*s)+side*rad(11f)+(motion-2300f)*.00032f + shape.rewind();shape.shard(kaleidoFacets[s],origin+Offset(cos(angle),sin(angle))*(50f*unit),unit*.16f,angle*2) + drawPath(shape,kaleidoFacets[(s+if(side>0)2 else 4)%6].color,alpha=.4f*idle,blendMode=BlendMode.Screen) + } + + // A band of light crosses the settled mark, then again every few seconds while it waits. + val sheen=if(motion<1500f)0f else ((motion-1500f)%3600f)/900f + if(q==0f&&sheen>0f&&sheen<1f) { + shape.rewind();kaleidoFacets.forEach{shape.facet(it,origin,unit)} + clipPath(shape) { + val reach=40f*unit;val angle=rad(36f);val direction=Offset(cos(angle),sin(angle)) + val position=mix(-1.25f,1.25f,InOut.transform(sheen))*reach;val width=10f*unit + val peak=.42f*sin((sheen*1.1f).coerceAtMost(1f)*PI.toFloat()) + drawRect(Brush.linearGradient(0f to Color.Transparent,.5f to Color.White.copy(alpha=peak),1f to Color.Transparent, + start=origin+direction*(position-width),end=origin+direction*(position+width)),origin-Offset(reach,reach),Size(reach*2,reach*2)) } } } diff --git a/distribution/Kaleido.apk b/distribution/Kaleido.apk index dbcd5f5..6498fea 100644 Binary files a/distribution/Kaleido.apk and b/distribution/Kaleido.apk differ diff --git a/distribution/Kaleido.apk.sha256 b/distribution/Kaleido.apk.sha256 index 19ebb7a..66e13eb 100644 --- a/distribution/Kaleido.apk.sha256 +++ b/distribution/Kaleido.apk.sha256 @@ -1 +1 @@ -03d49e2eef090d40f3a946446ace70f908b86ba26c656862f468a59f764748ec Kaleido.apk +16ca9909181a434dad1f946a089c7cf719f328af101bd5b740ededc635ecc7b4 Kaleido.apk diff --git a/distribution/latest.json b/distribution/latest.json index a273163..6324feb 100644 --- a/distribution/latest.json +++ b/distribution/latest.json @@ -1,7 +1,7 @@ { - "version": "0.6.1", - "versionCode": 21, - "url": "https://git.elijahkuntz.com/Elijah/Kaleido/raw/tag/v0.6.1/distribution/Kaleido.apk", - "checksumUrl": "https://git.elijahkuntz.com/Elijah/Kaleido/raw/tag/v0.6.1/distribution/Kaleido.apk.sha256", - "notes": "- Make browsing noticeably smoother on Android TV hardware. Switching between Home, Movies and TV no longer rebuilds each section, returning to the hero or from a title page no longer redraws Home, and moving between rows prepares the next cards ahead of time instead of mid-scroll.\n- Reduce the work done for accessibility services while browsing, which was the largest cost on devices running one (for example a Home-button remapper or TalkBack).\n- Apply background library updates only after the remote has been still for a moment, so they no longer interrupt a move, and keep focus on a card when an update replaces it." + "version": "0.6.2", + "versionCode": 22, + "url": "https://git.elijahkuntz.com/Elijah/Kaleido/raw/tag/v0.6.2/distribution/Kaleido.apk", + "checksumUrl": "https://git.elijahkuntz.com/Elijah/Kaleido/raw/tag/v0.6.2/distribution/Kaleido.apk.sha256", + "notes": "- New startup animation, the same as Kaleido Desktop's: a kaleidoscope of shards turns and gathers into the Kaleido mark, then the view flies through its centre into Home." } diff --git a/docs/design-system.md b/docs/design-system.md index fd4d4d8..c04374d 100644 --- a/docs/design-system.md +++ b/docs/design-system.md @@ -27,7 +27,7 @@ The interface gives artwork priority. App chrome uses neutral near-black, charco - Navigation contrast comes from a gradient extending past the controls and fading to transparent. Home/Movies/TV activate on focus. Explicit row and column links prevent beyond-bounds focus searches when holding a remote direction. - A spaced D-pad move predicts the actual row/column destination before starting its scroll or focus change. The target backdrop is fetched and contrast-processed through the same Coil request/cache as the visible scene. Speculative artwork uses one low-priority worker so it cannot flood normal decode workers during a burst of input. Metadata starts in parallel; the visible preview and details page share that in-flight request. Rapid horizontal input settles to the latest target before starting speculative work. Full metadata uses a 64-item LRU with a 30-second lifetime, cleared on account/server changes and refreshed after watched updates. Neutral library/search grids prefetch metadata without fetching an unused full-screen backdrop. - Home's vertical list prepares content within one viewport ahead and retains one viewport behind, using Compose's bounded lazy-layout cache window. This keeps the hero and nearby rows ready when moving between them, rather than repeatedly composing and measuring the exposed image cards during the animation. Movies/TV use the same window. The window only fills ahead after the list has scrolled, so once a section settles it is nudged 1 px and back, letting the next rows compose in idle frames instead of during the first move down. Card sizes, row targets and the large cinematic Home layout are unchanged. -- Home, Movies and TV previews follow focus once it rests for 110 ms and retain previous artwork until replacement data is ready. New artwork fades in over the old for 320 ms, including cache hits; the outgoing title and synopsis lift slightly as they fade while the new ones rise 12 dp into place (380 ms). Hero recommendation changes use the same artwork and copy transitions, holding the copy up to 700 ms for the new artwork to decode. These fades, and the hero/preview exchange, are single animations read only in graphics layers, so they add no per-frame composition or layout. Contrast gradients are baked into a cached bitmap on a worker thread, reducing GPU overdraw. Rotation pauses on the information/next controls and preserves their focus. Vertical row changes animate to explicit row/column targets; page entrances fade and slide 28 dp over 280 ms, using per-draw alpha rather than an offscreen layer, and start once the new section's composition frames have passed (at most 300 ms). While a section enters, its cards lay out at their fixed size first and fill in artwork and titles three per frame under the fade, so the section's first frame stays short. Focusing a top tab lets its highlight draw before the section switches. The cold-start sequence lasts 2.9 seconds. The six exact facets begin as a closed, overlapping iris lit from behind; it holds there (at most 700 ms) until startup data has arrived and frames are steady, so cold-start hitches never interrupt the motion. The iris then twists 44° open and locks with a slight overshoot while light leaks through the six gaps, a single sheen crosses the settled mark, and the mark shrinks into a lockup scaled from the header brand as KALEIDO slides out from behind it. Once loading finishes (up to 600 ms extra) the camera flies through the aperture's dark center over 640 ms, revealing the app beneath as it settles from 114 percent scale. The completed mark itself is never redesigned. Android animation duration scale is honored, including animations off. It does not replay when returning from background. +- Home, Movies and TV previews follow focus once it rests for 110 ms and retain previous artwork until replacement data is ready. New artwork fades in over the old for 320 ms, including cache hits; the outgoing title and synopsis lift slightly as they fade while the new ones rise 12 dp into place (380 ms). Hero recommendation changes use the same artwork and copy transitions, holding the copy up to 700 ms for the new artwork to decode. These fades, and the hero/preview exchange, are single animations read only in graphics layers, so they add no per-frame composition or layout. Contrast gradients are baked into a cached bitmap on a worker thread, reducing GPU overdraw. Rotation pauses on the information/next controls and preserves their focus. Vertical row changes animate to explicit row/column targets; page entrances fade and slide 28 dp over 280 ms, using per-draw alpha rather than an offscreen layer, and start once the new section's composition frames have passed (at most 300 ms). While a section enters, its cards lay out at their fixed size first and fill in artwork and titles three per frame under the fade, so the section's first frame stays short. Focusing a top tab lets its highlight draw before the section switches. The cold-start sequence is a kaleidoscope, the same as Kaleido Desktop's, and lasts about 2.6 seconds. A faint mirrored field of shards fades in, still, for 260 ms and holds there (at most 700 ms) until startup data has arrived and frames are steady, so cold-start hitches never interrupt the motion. The field then turns 150° while the shards spiral inward and vanish and the six exact facets ride in from it and lock into the mark (1.7 s), a hexagonal ring pulses out and a sheen crosses the settled mark. Once loading finishes (up to 600 ms extra; small shards begin circling the mark if it runs long) the camera flies through the mark's open center over 640 ms, revealing the app beneath as it settles from 114 percent scale. The completed mark itself is never redesigned. Android animation duration scale is honored, including animations off. It does not replay when returning from background. - Returning from details restores the library's mode, scroll position, and previously focused title. - Entering Movies/TV from the top bar focuses the fixed Discover control immediately. Down from Discover explicitly reveals the first catalog card; focus on already-visible targets changes before scrolling. A quick tab/Down sequence queues entry for the new destination, and focused tabs never repeat their delayed initial-focus request. - Offscreen card navigation requests the next lazy layout instead of forcing synchronous composition between key events. Up at the top bar is consumed because there is no destination above it; it must not start a lazy-list focus search. diff --git a/docs/runtime-verification.md b/docs/runtime-verification.md index 77cd048..673083a 100644 --- a/docs/runtime-verification.md +++ b/docs/runtime-verification.md @@ -259,3 +259,9 @@ The actual non-debuggable release was also opened through Search and title detai ## Silo-style browse and details redesign - 2026-10-28 Verified on the onn with the profiled release (baseline profile installed, `speed-profile` compiled). The first Home version used AnimatedVisibility/AnimatedContent and read the hero mode in the catalog's composition; `profile_home.py` failed at p95 39.9 ms, and atrace showed recomposition and layout on nearly every frame plus one 44 ms frame on entry. Driving the header, copy and artwork fades from single animations read only in graphics layers, and keeping the invisible preview composed under the hero, brought five hero → Continue Watching transitions to median 16.9 ms, p95 25.1 ms and none above 33.34 ms (the pre-redesign baseline was p95 28.6 ms). `repro_runtime.py browse` passed at Movies p95 31–34 ms; a 1280 × 720 preview frame raised it to 36 ms through larger texture uploads and was not kept. Moving along a season's episode row measured p95 32 ms. `verify_ui.py browse` (8 checks), `repro_runtime.py sections`, `verify_settings.py`, `verify_details_layout.py` and `verify_movie_details.py` passed. The last two needed their library navigation updated for the genre/sort filter row; titles shown as title art are now read from their content description. `verify_details.py` and the live playback suites were not run: they change Plex state, and `verify_details.py` still expects Mark watched directly after Watch next on shows. The player title area was observed during a brief accidental playback, which Plex did not record as progress. + +## Kaleidoscope startup animation - 2026-10-31 + +The iris was replaced with Kaleido Desktop's kaleidoscope (approved there from a canvas prototype): a mirrored field of shards turns and gathers into the six facets, then the existing fly-through exit, zoomed 30× instead of 52× because the mark is larger than the old lockup. The gather is fastest at its start, so the TV keeps the iris's safeguard: a 260 ms still, faint shard field that holds (at most 700 ms) until `busy` clears and four steady frames arrive. The Compose port draws only paths and gradients (Screen and Plus blend modes); there is no blur. + +On the onn with the profiled release, a screen recording of a cold start (ignored `evidence/private/splash-kaleidoscope/`) showed the still field for about 0.8 s, the gather, the settled mark and the reveal into Home. Framestats from three cold starts, bucketed per 250 ms: the 75–190 ms frames fall in the first 0.75 s, inside the hold; during the gather runs 1–2 completed every frame within 26 ms at 15 frames per bucket, and run 3 had a few 30–41 ms frames with 13–15 frames per bucket. Frames from about 2.25 s include Home appearing beneath and reach 42–69 ms, as with the iris. GPU time stayed below 12 ms at p99. These are device samples, not a guarantee; the Fire TV and TCL were not measured. `Build.ps1 -Release -Test` and `repro_runtime.py sections` passed, and the optimized release was left on Home. diff --git a/version.properties b/version.properties index a18e421..b8f7ebf 100644 --- a/version.properties +++ b/version.properties @@ -1,2 +1,2 @@ -versionName=0.6.1 -versionCode=21 +versionName=0.6.2 +versionCode=22