Troika-3d-text: library for SDF text rendering

And where can I get the uniforms and textures of this library?

I’m sorry, I don’t understand what you are trying to do. If you are running into a specific bug or issue, could you please open a ticket in the GitHub repo? I don’t want to blow up this forum thread with a support back-and-forth. Thanks.

1 Like

Beautiful. Excellent work lojjic

Hi.! I am also working on a similar feature like this for my app. I’ve developed dynamic text generation based on user input. I am struggling to implement word wrapping and also the text editing part with user input of arrow keys / mouse click to go the specific position and edit the text. Can you help me ?
I find your library super amazing, if this has user input handling to edit the text I will switch to this entirely.

@utkarshsaraogi While this lib doesn’t handle user input itself, it does provide the data you’d need for correct positioning of carets and selection rectangles. It would need some sort of wrapper for handling the user input/interaction, probably specific to your app or higher-level framework.

I know some people have worked toward that sort of thing, e.g.:

Is it possible to target each line of text for staggered animations, in order to create an animation like splitText with GSAP?

Not quite yet, but a feature for exposing char/word/line counts in the shader has been started. See Feature: add character/word/line index attributes to the text geometry · Issue #102 · protectwise/troika · GitHub

Hi, Is it possible to preload and use more than 1 font with troika-three-text?

@rocket5tim Certainly, each Text instance or preload call can use its own font. You just can’t mix multiple fonts within the same Text instance yet.

1 Like