Qtwebengine - WebGL

I am very new to (Anki) development and for the idea I am having I need 3d plots in Anki.
I tried using the echarts-gl library, but my Anki doesn’t seem to support WebGL. However, on Windows, it seems to be supported:

Anki 2.1.26 (70784154) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-06-13 08:48:18

Whereas on macOS:
image

Anki 2.1.26 (70784154) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1
Platform: Mac 10.15.4
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-06-13 08:19:19

I guess it has to do with the qtwebengine. As I feel like this is unfair treatment, will macOS get a webGL-enabled qtwebengine in the future or will everyone now hate me for calling out on Windows? :stuck_out_tongue:

Also, if there are other suggestions for my problem (being able to render various 2D and 3D plots), I would appreciate them. I just need those graphs in a qt window. Numpy doesn’t seem like an easy solution to have it platform-independent.

Not something I’ve looked into I’m afraid. Maybe there are JS libs out there that can render 3d graphs without needing WebGL?

1 Like

WebGL will obviously be quicker, and can get nicer results (echarts-gl can create some really, really fancy graphs - Not that I need them, but quickly rendering for 3D rotation of the graph is important to me). It would be nice if WebGL could be expected to run - or not run - on all Anki versions in the future, because otherwise developers could run into troubles if they started on one version of Anki.

With that being said, I will probably have to look into numpy anyway.

EDIT:


This example works in a browser add-on on my macOS, thus D3-3D.js is likely to work.