https://kotlinlang.org logo
#compose-web
Title
# compose-web
c

Chris

10/06/2023, 12:48 PM
I’m using Compose HTML, and I’ve got a web view that gets rendered offscreen. (It’s being rendered offscreen by a Unity plugin, and then the frame buffer is copied over.) I’ve noticed that the Compose layout engine seems to ‘pause’ when Compose doesn’t think it’s visible, though. The animations don’t play, and toggling state flags doesn’t trigger a relayout. Why is this? Is there a setting I can toggle, to force Compose to update the composable view?
o

Oleksandr Karpovich [JB]

10/06/2023, 12:49 PM
I was halfway through typing a comment and then it got removed along with your original message (when you deleted it?) 🥲
Cfw relies on window.requestAninatuonFrame to schedule the recomposition. It's called only when the window is visible. I'll have a look if there's a way to workaround
c

Chris

10/07/2023, 1:03 AM
Oh, sorry! I realized I had some typos, so I deleted and reposted. I should have just edited, sorry. This is great, though – thanks! I didn’t realize
renderComposable
had the extra parameter. I’ll give it a shot and report back.
👍 1
a

andylamax

10/08/2023, 4:15 AM
Hello Chris, I am interested in this, please do report back if it works
c

Chris

10/29/2023, 6:40 PM
I got it working! Thanks for your help; this is great.
👍 1
2 Views