Skip to content

Prismal AGSL v1.0.0

Choose a tag to compare

@styropyr0 styropyr0 released this 10 Aug 18:26
· 20 commits to master since this release

Prismal AGSL 1.0.0

Liquid glass components, progress bar rendering, and specular improvements.


Highlights

  • New: PrismalHorizontalSelector - iOS-style camera-mode picker with a fixed liquid-glass droplet, scrolling labels, spring snap, and configurable chromatic aberration
  • Progress bar track simplified - track background uses backdrop blur + alpha tint instead of edge refraction
  • Bottom tab specular control - PrismalGlassBottomTabs accepts a specular parameter
  • Nested glass sampling - LocalPrismalParentGlassLayer for components that sample a parent glass layer (slider, toggle)
  • Expanded specular styles - additional presets and playground specular-style picker support

Installation

implementation("com.github.styropyr0:PrismalAGSL:Prismal:1.0.0")

Added

PrismalHorizontalSelector

Horizontal selector with a centered liquid-glass capsule and scrolling items underneath.

  • Text overload - synchronous TextMeasurer sizing for string labels
  • Composable overload - arbitrary item content with one-time width measurement
  • Fixed droplet with lens refraction, specular, depth shadow, and spring snap on release
  • Focus animation - centered item scales up and fades in; side items shrink and dim
  • chromaticAberration - droplet RGB dispersion in [0, 1] (default 0.2 = 20%)
  • adaptiveLuminance / luminance - optional backdrop-driven frost and blur tuning
  • boldWhenFocused - text overload bolds the centered label (default true)
PrismalHorizontalSelector(
    labels = listOf("VIDEO", "PHOTO", "PORTRAIT"),
    selectedIndex = selectedIndex,
    onSelected = { selectedIndex = it },
    backdrop = backdrop,
    textStyle = MaterialTheme.typography.labelMedium,
    textColor = MaterialTheme.colorScheme.onSurface,
    chromaticAberration = 0.2f,
    modifier = Modifier.fillMaxWidth(),
)

LocalPrismalParentGlassLayer

Composition local for passing a parent PrismalGlassLayer into nested glass components so sliders and toggles can sample grouped glass surfaces correctly.


Changed

PrismalGlassProgressBar

  • Track background is now blur + alpha overlay only - refraction removed (no meaningful visual gain at 8dp track height)
  • New parameters:
    • blurRadius - backdrop blur radius (default 4.dp)
    • trackAlpha - tint overlay alpha (default 0.2 light / 0.36 dark)
    • trackTint - base neutral tint color (default #787880)
  • Vibrancy disabled on the track for a cleaner frosted appearance

PrismalGlassBottomTabs

  • Added specular parameter for custom specular highlights on the selection droplet

PrismalGlassSlider / PrismalGlassToggle

  • Read parent glass layer via LocalPrismalParentGlassLayer for improved backdrop sampling inside grouped glass containers

Specular

  • Extended PrismalSpecularStyle presets
  • Specular modifier outline generation fix for non-uniform shapes

Backdrop sampling

  • Glass layer modifier updates for more reliable coordinate sampling across window layers

Demo app (:app, not published)

The catalog playground received several updates alongside this release:

  • Horizontal selector demo on the Browse tab
  • iOS-style glass dropdown with morphing open/close animation
  • Alert dialogs and bottom sheet glass surfaces
  • Custom wallpaper picker with persistence across app restarts
  • Search bar animation and brightness control in Settings
  • Specular style picker in Settings
  • Updated tab icons and grouped UI polish
./gradlew :app:installDebug

Migration from 0.0.1

0.0.1 1.0.0
No horizontal selector Use PrismalHorizontalSelector for camera-mode / segmented pickers
Progress bar used refraction on track Same API; track is blur-only by default. Optional trackAlpha / blurRadius for tuning
Bottom tabs: fixed specular Pass specular = { PrismalSpecular.Default } or custom
Nested slider/toggle in glass groups Automatic when parent provides LocalPrismalParentGlassLayer

No breaking API removals in this release.

Links