-
Notifications
You must be signed in to change notification settings - Fork 130
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
Feature: troika-3d-text: text editing #28
Comments
We have an interesting (and somewhat unique) use case where we can't actually use html elements due to the way we leverage iFrames to composit multiple XR scenes (or "apps") - meaning, input processing has to be done at the One thing that currently eludes me is caret implementation, which might be beyond the scope of this library or support you're willing to offer. It's not a blocker for what I'm working on, but in terms of developing a nice-feeling, functional text editor in VR, this is the main missing feature at this moment; everything else is extremely well supplied by troika-3d-text (by the way, plug-and-playing .ttfs that just work out of the box with no conversion needed is such a great QoL touch!) |
@MichaelHazani Ahh your multiapp scenario is indeed very interesting! I'd struggled coming up with examples of DOM-less environments but that's definitely a good one. Something I'll keep in mind. By "caret implementation" are you talking about the actual rendering of a visible caret? If so, I think that's definitely in scope, or soon will be. I imagine it would be very similar to text selection (the rendering of selection rects is coming soon as part of #110) where it's a separate geometry added as a child of the Text object. The |
Yes! That's exactly what I had in mind. And, similarly to curved UI, not something I'd have considered a potential feature - the pleasant surprises keep piling up:). Text selection and visible caret would be wildly useful, for multiple use cases I imagine. The features mentioned in that PR sound great in general. As an unrelated $0.02: I fully agree with Mr. d00b's comment elsewhere - referring to this solution somewhere in the threejs docs is highly worthwhile. It saddens me to think anyone would waste time on texturizing canvases or using any other suboptimal solution due to not being aware of troika-3d-text. One low-overhead way to get more visibility and awareness is to add this library as another option in the adding text page. In light of the general enthusiasm around this solution I think it would get easily approved, and might be less contentious or tricky than a more formalized solution (like integrating troika-3d-text into three). |
Thanks for the +1 on that idea. I've opened: mrdoob/three.js#21708 |
Following on from cursor positioning and text selection (#27, #25), we need text editing.
The big unknown here is how to input text. On screen it should take input from the keyboard just like HTML inputs. (Maybe use a hidden input/textarea behind the scenes?)
In XR, we may need an in-world keyboard. We could also look into utilizing speech-to-text.
The text was updated successfully, but these errors were encountered: