Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

compose-graphics

БесплатноБез исполняемых скриптовНе проверен

Advanced Compose visuals - Material 3 Expressive motion physics, AGSL shaders (Android 13+), Canvas/DrawScope generative, graphicsLayer effects.

AThevonот AThevon★ 919 звёзд на GitHub

Об этом скилле

Version-sensitive. Every API name, SDK gate and browser-support claim below was verified on 2026-09-08 against primary sources. What against, and when, is in _jutsu/VERSIONS.md. If that date is old, re-verify before acting on a version number.

Compose Graphics

Advanced Compose visuals: M3 Expressive motion physics, AGSL shaders (Android 13+), Canvas / DrawScope, graphicsLayer effects. Loaded for advanced thesis (shader, expressive, M3 Expressive, AGSL, Canvas, holographic). Foundation: ../compose-motion/SKILL.md covers basics. Concise rules here. Deep-dive in references/.


Decision Tree: Which API for Which Need

Need API
Spring physics with bounce / overshoot MotionScheme.expressive() (M3 Expressive)
Pixel-level shader RuntimeShader + Modifier.graphicsLayer { renderEffect = ... } (Android 13+)
Generative drawing (paths, particles, fractals) Canvas { drawScope -> ... }
GPU effects (blur, shadows, color filters) Modifier.graphicsLayer { renderEffect = ... } or Modifier.blur(...)
Adaptive system materials (Material You glassmorphism) Modifier.background(MaterialTheme.colorScheme.surfaceContainerHighest)
Liquid glass on Android AGSL shader recipe (no native API like iOS yet)

Domain 1: Material 3 Expressive

What It Is

The 2025 Material 3 evolution introduces spring-based motion physics replacing fixed-duration tweens. New shape morphing API via androidx.graphics.shapes. New MotionScheme selectable on the theme. Aimed at hero moments, key interactions, brand-defining UI.

MotionScheme

Scheme Personality Use For
MotionScheme.standard() Calmer, less overshoot Default for chrome, lists, navigation
MotionScheme.expressive() More overshoot, longer settle Hero reveals, FABs, primary CTAs

Apply on the theme:

MaterialTheme(motionScheme = MotionScheme.expressive()) {
    // children read tokens via MaterialTheme.motionScheme.*
}

Tokens exposed:

Token Domain Spring (damping / stiffness) - standard ... expressive
fastSpatialSpec() Position / size 0.9 / 1400 0.6 / 800
defaultSpatialSpec() Position / size 0.9 / 700 0.8 / 380
slowSpatialSpec() Position / size 0.9 / 300 0.8 / 200
fastEffectsSpec() Opacity / color 1.0 / 3800 1.0 / 3800
defaultEffectsSpec() Opacity / color 1.0 / 1600 1.0 / 1600
slowEffectsSpec() Opacity / color 1.0 / 800 1.0 / 800

Spatial vs Effects: spatial = anything physical (height, offset, scale). Effects = visual properties without inertia (alpha, color, elevation). Both families are springs - the effects ones are just critically damped (dampingRatio = 1.0) and much stiffer, so they never overshoot. Only the spatial springs differ between standard() and expressive().

Availability: MotionScheme, MaterialTheme(motionScheme = ...) and MaterialExpressiveTheme are stable in material3 1.4.0 (no opt-in needed). MaterialShapes and the shape-morphing helpers are not - they need a material3 1.5.0 pre-release (beta since 7 Oct 2026, not yet stable) and @OptIn(ExperimentalMaterial3ExpressiveApi::class).

Hero Card Expand (Expressive Springs)

@Composable
fun ExpressiveHero() {
    var expanded by remember { mutableStateOf(false) }
    MaterialTheme(motionScheme = MotionScheme.expressive()) {
        val transition = updateTransition(targetState = expanded, label = "expand")
        val height by transition.animateDp(
            transitionSpec = { MaterialTheme.motionScheme.slowSpatialSpec() },
            label = "height"
        ) { if (it) 400.dp else 100.dp }
        val alpha by transition.animateFloat(
            transitionSpec = { MaterialTheme.motionScheme.defaultEffectsSpec() },
            label = "alpha"
        ) { if (it) 1f else 0f }

        Card(
            modifier = Modifier
                .fillMaxWidth()
                .height(height)
                .clickable { expanded = !expanded }
        ) {
            Box(modifier = Modifier.alpha(alpha)) {
                Text("Detail content", modifier = Modifier.padding(24.dp))
            }
        }
    }
}

Spring Tuning Recipes

Mood Spec
Hero reveal spring(stiffness = Spring.StiffnessLow, dampingRatio = Spring.DampingRatioMediumBouncy)
Snappy expressive spring(stiffness = Spring.StiffnessMediumLow, dampingRatio = 0.7f)
Calm spatial MaterialTheme.motionScheme.defaultSpatialSpec() (use the token)
Critical (no overshoot) spring(stiffness = Spring.StiffnessHigh, dampingRatio = 1f)

Shape Morphing (MaterialShapes + Morph)

Two different libraries, and the split matters:

  • androidx.graphics.shapes:graphics-shapes (stable 1.1.0) ships RoundedPolygon, CornerRounding and Morph(start, end). Its Morph.toPath(progress) return
Полный SKILL.md на GitHub

Установить compose-graphics в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/agsl-recipes.mdreferences/canvas-generative.mdreferences/m3-expressive-deep.md

FAQ

Что делает скилл compose-graphics?

Advanced Compose visuals - Material 3 Expressive motion physics, AGSL shaders (Android 13+), Canvas/DrawScope generative, graphicsLayer effects.

Как установить скилл compose-graphics?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл compose-graphics запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить compose-graphics с