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

threejs no longer working #785

Closed
Etn40ff opened this issue May 13, 2024 · 10 comments
Closed

threejs no longer working #785

Etn40ff opened this issue May 13, 2024 · 10 comments

Comments

@Etn40ff
Copy link
Contributor

Etn40ff commented May 13, 2024

It looks like the new mechanism to import threejs introduced with sagemath/sage@7dfff8b breaks threejs plotting because it is not installed in one of the supported paths.

An easy fix is to move the installation path from /usr/share/sage/threejs/ to /usr/share/sage/threejs-sage

@kiwifb
Copy link
Collaborator

kiwifb commented May 13, 2024

I thought I had dealt with it before. I think we had a discussion about the default path. Let me check a few things. In any case thanks for signalling.

@kiwifb
Copy link
Collaborator

kiwifb commented May 13, 2024

It should work via this line https://github.com/sagemath/sage/blob/7dfff8b1be091468140cba0e7042ef8670e4603f/src/sage/features/threejs.py#L33
given that on sage-on-gentoo SAGE_SHARE is /usr/share. Can you attach the kind of error you get? Whatever it is, we should get to the bottom of it.

@Etn40ff
Copy link
Contributor Author

Etn40ff commented May 14, 2024

I do not get any error at all in sage: I just get an empty browser whenever I plot something.

Figuring out this it took a while: in the browser console I got an error about THREE not being defined and I noticed that threejs.min.js is not imported; then worked my way back from there to

sage: from sage.features.threejs import Threejs
sage: Threejs().absolute_filename()
''

@Etn40ff
Copy link
Contributor Author

Etn40ff commented May 14, 2024

I think that I understand why the line you point out is not working: it points to /usr/share/sage/sage/threejs rather than /usr/share/sage/threejs.

@kiwifb
Copy link
Collaborator

kiwifb commented May 14, 2024

That would be the case in "vanilla" sage. It should not be in sage-on-gentoo and if it does it is a regression.

@kiwifb
Copy link
Collaborator

kiwifb commented May 14, 2024

OK, I am going senile and you are right. I must have thought of things in reverse or I made a mistake at some point.

@kiwifb
Copy link
Collaborator

kiwifb commented May 14, 2024

I must have had brain fog when it has gone in or I was thinking of a far future.
3db5268
I will restore the setting this morning.

@Etn40ff
Copy link
Contributor Author

Etn40ff commented May 14, 2024

tnks

@kiwifb kiwifb closed this as completed in fac5cd7 May 14, 2024
@kiwifb
Copy link
Collaborator

kiwifb commented May 14, 2024

I have bumped sage-conf since I updated what is installed by it. It should be pulled automatically. There is a delay of up to 15mn before the gentoo mirror of the overlay is updated.

@Etn40ff
Copy link
Contributor Author

Etn40ff commented May 14, 2024

LGTM

Thanks again

kiwifb added a commit that referenced this issue May 29, 2024
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