-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
Unable to change text color in Three.js viewer #29228
Comments
comment:1
The only options currently passed in are text and location: https://github.com/sagemath/sage-prod/blob/develop/src/sage/plot/plot3d/base.pyx#L422 Color can be added here and then processed in the |
comment:2
This commit passes text colors through to the template. Font size isn't being tracked by textures right now, and the entire graphics/keywords system is irritating and needs work, so passing font size should be left for another ticket. The example above now shows the proper colors. One of the texts is clipped because the underlying Three.js sprite is limited in size. That can be addressed on another ticket as well, after some planned cleanup of sprite processing in the template. |
Author: Paul Masson |
Branch: u/paulmasson/29228 |
Commit: |
comment:4
Hi Paul. I was testing out this branch and noticed that the colors weren't displaying in Chrome or Firefox. Looks like the
I suppose it could also be prepended in the template right before it's used, depending on where you'd prefer to handle it. Edit: somehow I seem to have changed the commit, though I don't understand how I was able to do that. Maybe because I was browsing the diff while writing this comment? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Changed branch from u/paulmasson/29228 to u/paulmasson/29228-1 |
comment:7
Joshua, the merge issue isn't your doing. The template moved from |
Changed commit from |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Commit: |
Changed branch from u/paulmasson/29228-1 to u/paulmasson/29228 |
comment:11
Joshua, should be set to go now. Please review! |
comment:12
I've tested it again and the issue has been resolved. The correct text colors appear in the output. I made sure to update my start script to copy things from/to the new directories. I'll need to go into my animation branch and update things as well. Thanks Paul! |
comment:13
Joshua, if you are satisfied with this ticket then enter your full name as a reviewer and set it to positive review. |
Reviewer: Joshua Campbell |
Changed branch from u/paulmasson/29228 to |
The documentation for
text3d
suggests that the color of text can be adjusted:https://doc.sagemath.org/html/en/reference/plot3d/sage/plot/plot3d/shapes2.html#sage.plot.plot3d.shapes2.text3d
But running the example provided results in only black text:
Inspecting the
threejs_template.html
, in theaddLabel
function, the fill color is hard-coded:Encountered in 9.1.beta3 as well as 8.9.
Component: graphics
Keywords: threejs text color
Author: Paul Masson
Branch/Commit:
4ae1e77
Reviewer: Joshua Campbell
Issue created by migration from https://trac.sagemath.org/ticket/29228
The text was updated successfully, but these errors were encountered: