I recently published my first Compose Multiplatfor...
# feed
c
I recently published my first Compose Multiplatform library and thought some of you may enjoy it. It’s a RuntimeShader graphics library that enables manipulating the pixels behind composables. Originally this was just an Android library, but the 1.0.0 release now supports desktop, iOS, macOS, wasmJs and js: https://github.com/FletchMcKee/liquid I’ve been impressed with the progress made by the Jetbrains team with the iOS and web assembly targets. My old pixel maxed out at API 31 so I couldn’t build the Android demo app, but the wasm target works quite well. You can find the wasm demo at the project’s GitHub page here
❤️ 5
K 9
🤩 8
🔥 16
s
Ow wow... I don't know what to say... 1) I hate liquid glass 😬 2) Amazing work! 🔥 Should someone ever force me to use liquid glass effects (or should I change my mind about it), I'll use your lib! 👍
c
Ha thanks, I find myself setting
refraction
to 0f to disable the Liquid Glass effect more often than not. The
edge
and
frost
properties have become my favorites.
👍 1
s
Agreed. I like frosted glass. Refreaction is just a bit too much.
a
How does the manipulation behind a composable work? Like, how do you access those pixels?
c
This library follows a similar pattern to what Haze does where you tag source nodes (liquefiable modifier) for effect nodes (liquid modifier) to sample. When a liquid modifier is dispatched to draw, it creates a composite layer that records any liquefiable layers into that layer and positions, scales and rotates it to the appropriate space. See the
recordLiquefiablesIntoLayer
method for reference as it handles this step.