Hello! I'd want to draw a word cloud with Compose....
# compose-desktop
g
Hello! I'd want to draw a word cloud with Compose. Is there a project already available in the community or some tips to do one?
👀 1
p
Super interesting idea! Quick solution would be to embed js in a webview https://github.com/jasondavies/d3-cloud
But if you designed it as in the one I posted it should be doable in compose as well. Not sure if you can actually get the gaps of the typography for filling in more words
g
So much algorithm on the web to do that, I also liked this one http://wordcloud.cs.arizona.edu/gallery.html (it was open source like 8 years ago, not sure if still maintain or just an old web page) but those algorithms may be too complex for the time I'm willing to spend on it 😬
c
Yes, those things are not easy to implement. I ended up in a basic „flow layout“ 😅 https://github.com/chrimaeon/curriculumvitae/blob/main/common-compose/src/commonMain/kotlin/com/cmgapps/common/curriculumvitae/components/TagCloud.kt Which is a simplified version of accompanists flow layout for multi platform compose.
👍 1