Closed iliyang closed 6 years ago
I solved the problem by patching pythreejs locally on my machine. I inserted the following line right below line 33 in jupyter-three.js:
this.renderer.setPixelRatio(window.devicePixelRatio);
This is the solution mentioned in a three.js issue and this line also exists in the JavaScript source code on the page of this example.
Could the developer please include this patch in the next release? Thanks!
Since it seems like you have a working solution, want to file a pull request?
Sorry, I did a big hack by simply modifying a (big, seemingly auto-generated) file on my Mac:
/usr/local/anaconda3/pkgs/pythreejs-0.3.0-py36_0/share/jupyter/nbextensions/jupyter-threejs/index.js
But the fix is really simple - just adding that line above.
I'm running macOS Sierra, and all examples in the provided Examples.ipynb notebook are rendered at a low resolution on both my Macbook's retina display and my external 4K monitor. In contrast, the three.js examples (e.g. this one) show up nice and sharp.
Is there any way to configure pythreejs to produce sharp renders in jupyter notebooks? After some googling, I found that retina display rendering quality used to be an issue in three.js, but apparently it's been fixed.