Javascript for WebGL

I understand that WebGL currently doesn’t support the Observable/Javscript libraries.

  • Is this a low priority for you?
  • Have I overlooked anything, or is there really no way of adding custom javascript to WebGL projects? Is there any way of connecting the UI rendering with the outside world?
  • Regardles of export target, is there a standardized way of interopting between UX/Uno and Javascript? The Observable pattern is nice, but how about bi-directionally calling functions? I get that module_exports give you UX/Uno->JS calls, but how about the other way around - calling Uno functions from JS?

Currently, iOS and Android are the highest priority targets for us to fix and improve. FuseJS is however designed so it will conceptually work in WebGL as well, but this has not been implemented yet.

You can add custom JS to WebGL projects through UXL or the extern syntax, however this is advanced and not yet very well documented.

For Uno<->FuseJS interop, have a look here : https://www.fusetools.com/developers/guides/fusejs/nativemodules

Thank you.

Are the old UXL docs from RS still valid? It made due the one and only time I tested it a year ago or so. It would help me a lot if I could do something like that. Just calling functions and pushing data from other scripts on a webpage, nothing fancy.

Ah, nativemodules, cool! I guess that’s a new page in the guides, don’t think I have seen that before? Kinda hard to keep track on the changes in documentation, but you guys do a good job answering in the forum, so I guess we just have to ask.

Bump

Is this something you have been working on, or is it still not working?

Hi. There’s not been any updates to this and it is unlikely that it’ll happen anytime soon as we’re still 100% focused on iOS and Android.