Closed andreamancuso closed 1 month ago
I opened src\render\react\components\Image\comp.js and noticed:
I assume this is meant to be run on Node.js ? I suppose I got the wrong idea, i.e. this would work in a browser. Sorry if I'm being silly with these questions.
No, it is running on an older version of txiki.js which is embedded in this repo. It cannot run on any other js runtime since native bindings and the libraries being used are platform specific.
In the same way you cannot have this embedded LVGL running in a browser, it is just not meant for that.
Understood, thanks for clarifying.
For the avoidance of the doubt, I see you have added support for emscripten (in a separate repo) - can those bindings run in the browser using a canvas element?
I have been busy developing 'React bindings' for Dear Imgui and egui. It's a big undertaking and I have no previous C++ or Rust experience, so I've been making mistakes and likely my code isn't the most performant (read: it needs a lot of work).
That said, I do have 2 very rough online demos (the Dear Imgui demo only works in Chrome and Edge, Firefox Nightlies).
https://andreamancuso.github.io/react-wasm/dear-imgui/
https://andreamancuso.github.io/react-wasm/egui/
Both pages are based on Create React App and both render a canvas element. Dear Imgui's resizing logic needs fixing.
I have also got a working Electron sample application: https://github.com/andreamancuso/react-wasm/tree/main/packages/dear-imgui/examples/electron-example
I was hoping to achieve a similar result using the lv_binding_js package, or the emscripten one.
It seems your problem is solved so I'm closing this issue
Thank you for making lvgl js bindings available to the open source community.
I was wondering if you could point me to a 'batteries-included' demo, maybe based on https://create-react-app.dev/ so that I can get a sense on how easy it is to embed LVGL in a browser?
Thanks!