-
Notifications
You must be signed in to change notification settings - Fork 46
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
Can I set max-width on sprite text? + Web GL Warning #28
Comments
I solved the last question about webGL warning -> no canvas, render warning. |
@yunison thanks for reaching out. This option doesn't currently exist. The border box is formed around the shape of the text that is input into the component. However, may I ask what would be your visual expectation of what should happen if the max-width set would not be sufficient to show the full text? Keep in mind you can already control this to some extent either by trimming the input string, or adding newlines to wrap the text, like in this example: three-spritetext/example/basic/index.html Line 37 in b547b88
|
Thanks for the reply! I'm working on a project that prints the whose name of the participants of the exhibition. My visual expectation of using the max-width is to add a new line when the text(applied the font size) is over its bounding box's width. I didn't find out the existence of "MultilineText" using "\n" at the time. Although it does not break the line by the bounding box width, You can see the example on my codepen. Thanks for the help. |
Hi, your libraries give my project great optimization achievement. Thanks a lot!
I leave a message to you to ask about the way to set max-width on sprite text.
I'm trying to figure out it, but I don't have any idea.
I find the
innerWidth
option in your source code, but I don't know how to handle it.May I suggest this function if there's no way to control it?
Plus,
I'm faced with WebGL Warning with spriteText.
I use it with 3d-force-graph, the latest version of three js.
It is not a problem of running it, but I want to solve the console warning.
The comment is in below.
(6) WebGL: INVALID_VALUE: texImage2D: no canvas
(250+) [.WebGL-0x7fc23f64c200]RENDER WARNING: texture bound to texture unit 0 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
() WebGL: too many errors, no more errors will be reported to the console for this context
My code is here.
The text was updated successfully, but these errors were encountered: