Fork me on GitHub
#membrane
<
2022-01-14
>
zimablue12:01:03

Hey, stupid question - can membrane work in pure clojurescript?

phronmophobic19:01:09

That's not a stupid question. The short answer is that membrane can work in pure clojurescript. The longer answer is that there's already several excellent UI libraries in clojurescript so I haven't been focusing on the cljs version of membrane. I probably wouldn't recommend the cljs version at this point unless you were trying to build UIs that run in a <canvas/> element since that's an area that's less well supported by current cljs libraries.

zimablue19:01:03

yeah it's canvas or direct webGL that would be interesting, in theory it could access skia in the web through compiling skia to webassembly at the cost of 10mb bundle size, I assume that that hasn't been attempted? Is membrane all about canvas in the web then and no webGL?

zimablue19:01:48

I don't understand the intricacies of webGL vs canvas except that webGL is more work for higher max performance

phronmophobic20:01:38

> Is membrane all about canvas in the web then and no webGL? Membrane isn't really about any specific graphics library. It can work basically anywhere that can draw shapes, text, and images. There's builtin support for canvas, but you could use membrane with webGL if you provide implementations for drawing shapes, text, and images.

phronmophobic20:01:49

What are you trying to build? The canvas API is fairly performant and should work for most use cases without being a bottleneck.

zimablue20:01:49

trying to build a visual programming ish tool, thanks fo the help