jupyter-widgets-contrib / ipygany

3-D Scientific Visualization in the Jupyter Notebook
BSD 3-Clause "New" or "Revised" License
487 stars 53 forks source link

Dependencies and Wayland #45

Closed piyueh closed 3 years ago

piyueh commented 3 years ago

Hi,

  1. When installing ipygany with conda, dependencies were not installed automatically. For me, at least VTK was not installed. I had to install VTK manually later. I checked the dependencies with conda search -c conda-forge ipygany=0.3.3 --info, it only showed: ipywidgets >=7.5.0, numpy, python >=3.5, and traittypes.

  2. In Linux, browsers using Wayland backend did not properly show figures. (But when using X11 backend, both Chrome and FireFox worked fine.) Here are snapshots of what were shown in FireFox when using Wayland (from the notebook in the example folder):

20200917-022504EDT

And the last two just showed nothing. 20200917-022810EDT

martinRenou commented 3 years ago

Thanks for reporting.

Concerning your first point, vtk is not a hard dependency. You don't have to use vtk for ipygany to work. It's only if you use Mesh.from_vtk functions that it will be needed.

The second issue is very odd. I'll try and find time to give it a shot. Do you see basic ThreeJS examples working on Wayland? https://threejs.org/examples/?q=node#webgl_materials_nodes

martinRenou commented 3 years ago

Concerning the first point, we should maybe explain this in the README. ipygany is lacking documentation anyway.

piyueh commented 3 years ago

Most examples from threejs.org worked. But two of them behaved differently from X11 backend. The trefoil knot did not have colors:

And also the last example, the content on each square plate disappeared:

Other examples worked fine.

So I guess it's the browser's problem? (I only tested Firefox in Wayland because I don't know what other browsers have native Wayland support.)

martinRenou commented 3 years ago

Can you paste here the errors you see in the JavaScript console?

The ThreeJS example that is the closest to what ipygany does is this one I guess: https://threejs.org/examples/?q=node#webgl_materials_nodes

piyueh commented 3 years ago

Sorry I'm not familiar with JavaScript and web stuff. I guess this is what you wanted (the web console output of the example Jupyter notebook)?

The browser later crashed. Firefox just said Exiting due to channel error. when it crashed.

The specific example you suggested from ThreeJS worked fine.

I think I can just leave and close the issue? I feel like this has nothing to do with ipygany. It looks like more about the browser and Wayland.

martinRenou commented 3 years ago

I feel like this has nothing to do with ipygany. It looks like more about the browser and Wayland.

I agree. Maybe a webgl extension does not work with Wayland. I am not really sure.