-
-
Notifications
You must be signed in to change notification settings - Fork 414
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
Plotting single text3d results in empty scene with Three.js viewer #29227
Comments
comment:1
Yeah, I remember coming across this when I first wrote the viewer. Something in the Python goes wrong somewhere. Need to run this down... |
comment:2
I believe it's because rich_repr_threejs is expecting the text to always be 2 levels deep after flattening: the A similar bug can be produced going in the opposite direction (too many levels):
In this case, only "t3" gets displayed since its text is 2 levels deep but the text nodes for "t1" and "t2" are now 3 levels deep ( I think |
comment:3
I ran into a closely related issue earlier today due to the presence of a
...works as expected and just shows a single curve, but...
...produces a single 3D arrow instead of the expected two curves. After flattening, each |
comment:4
Replying to @paulmasson:
Hi Paul. Do you mind if I take a shot at fixing this? I wanted to check with you first to make sure there's no duplicated effort. I'd like to try out walking the scene graph vs. flattening. I do have an ulterior motive: this would allow me to make my animation branch much more elegant by introducing a |
comment:5
Replying to @jcamp0x2a:
Go for it! |
comment:6
Will do. Thanks :) |
comment:7
I pushed a branch that resolves the problems mentioned in the issue description and comments. It extends the existing pattern that was used to collect surfaces from the scene graph ( |
Commit: |
Author: Joshua Campbell |
comment:8
This is excellent! I've confirmed it builds and runs as expected. It also fixes #29206 and #29251. Questions about design choice: Three.js is not the only way to implement WebGL, yet you have named all your new methods Eric, would you like to chime in on this ticket? |
comment:9
Replying to @paulmasson:
For the name, I tried to follow the convention that I saw with some of the other viewers that have their own I think Thanks for taking a look at my changes. I know things are kinda hectic recently. I hope all is going well for you and yours. |
comment:10
Yeah, I'm being too fussy about the method names. They're fine as is. Eric, since I don't use Sage much, could you look over the code to check that it conforms to current standards for examples, documentation, etc.? Otherwise it looks good to go. Want to get this into the next beta! |
comment:11
And hope as well that everyone is well in these trying times! |
comment:12
Replying to @paulmasson:
I am currently having a look... |
comment:13
I gave a look to the code, checked the documentation and ran a few tests. In particular, I confirm #29206 is fixed by the current ticket. Everything looks good to me. The patchbot seems happy too. |
Reviewer: Paul Masson, Eric Gourgoulhon |
comment:14
Thanks for taking a look at this Eric :) |
comment:15
On 32-bit:
|
Changed reviewer from Paul Masson, Eric Gourgoulhon to Paul Masson, Eric Gourgoulhon, Travis Scrimshaw |
Changed branch from u/gh-jcamp0x2a/29227-threejs_repr to u/tscrim/threejs_repr-29227 |
comment:17
Thank you Travis! |
comment:18
I'll second that! Many thanks, Travis. I got Sage up and running on a new 32-bit VM, and I was able to verify that your branch builds and that the test case in question now passes on both my 32-bit and 64-bit systems. I'll keep 32-bit in mind in any future Sage work I do. |
Changed branch from u/tscrim/threejs_repr-29227 to |
Attempting to plot a single piece of text using the three.js viewer results in an empty scene (besides the coordinate frame):
Inspecting the javascript in the generated HTML file, the
texts
array is empty:var texts = []
Adding any other Graphics3d object (even an empty one) to it fixes the problem:
I encountered this in my Ubuntu install based on 9.1.beta3 while working on #29194. I also tried it on my Windows install which is still 8.9, and the bug is present there as well.
CC: @egourgoulhon
Component: graphics
Keywords: threejs text text3d
Author: Joshua Campbell
Branch/Commit:
e76dbdd
Reviewer: Paul Masson, Eric Gourgoulhon, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/29227
The text was updated successfully, but these errors were encountered: