Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low quality on high-DPI (i.e. retina) display on Mac [fix included!] #103

Closed
iliyang opened this issue Jun 14, 2017 · 3 comments
Closed

Comments

@iliyang
Copy link

iliyang commented Jun 14, 2017

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.

@iliyang
Copy link
Author

iliyang commented Jun 14, 2017

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!

@iliyang iliyang changed the title Low quality on high-DPI (i.e. retina) display on Mac Low quality on high-DPI (i.e. retina) display on Mac [fix included!] Jun 14, 2017
@honorabel
Copy link

Since it seems like you have a working solution, want to file a pull request?

@iliyang
Copy link
Author

iliyang commented Jun 14, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants