Skip to content
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

Is it possible to have a larger, bolder title? #27

Closed
gitnoob23 opened this issue Mar 4, 2021 · 4 comments
Closed

Is it possible to have a larger, bolder title? #27

gitnoob23 opened this issue Mar 4, 2021 · 4 comments

Comments

@gitnoob23
Copy link

gitnoob23 commented Mar 4, 2021

Hello,

Wondering if it is possible to link two text sprites together, so one could be a left justified, larger and bold title. Then directly under it would be a multi-line left justified, smaller and normal body of text.

I was attempting to do this but was having issues with the X placement. Even making them both the same X position, the title wouldn't line up with the body.

Something like this for example:

THIS IS A TITLE PRETEND IT IS LARGER
This is a sentence in this paragraph.
This is another sentence in this paragraph.
Everything is left justified. :)

Thoughts?

Thanks!

@SeregPie
Copy link
Owner

SeregPie commented Mar 5, 2021

I think this should be possible with this THREE.TextPlane.
It's not a sprite. It's a mesh. So it should be easier to adjust the position.

@gitnoob23
Copy link
Author

Thank you for the suggestion!

So I have implemented textplane. But it seems to be giving me the same issue.

I have two text planes, one is the title and one is the body of text. There doesn't seem to be a way to make sure they are snapped together and both left justified. Unless I am missing something? I have also tried to get their widths since they are both different and then I was going to reposition the title based on the width of the body, but the width always returns 1, even though the body is much wider than the title.

Thoughts?

@SeregPie
Copy link
Owner

SeregPie commented Mar 9, 2021

Hmmm... I'm not sure. Maybe it is somehow possible by changing the pivot point of the meshes.
mrdoob/three.js#1364 (comment)

@gitnoob23
Copy link
Author

I was looking into that yesterday as well but was unable to figure out how to do this exactly. It sounds like I want to do buffergeometry.translate, but I'm not sure how to address this or what to translate to.

@SeregPie SeregPie closed this as completed Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants