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

[troika-3d-text] Missing characters #69

Closed
Ocelyn opened this issue Jul 18, 2020 · 13 comments
Closed

[troika-3d-text] Missing characters #69

Ocelyn opened this issue Jul 18, 2020 · 13 comments

Comments

@Ocelyn
Copy link

Ocelyn commented Jul 18, 2020

Hello, first of all, thank you for your amazing work!

I have a weird issue using troika 3d text.

If I init my Text() with a text with 3 characters length.
And then I change it for a longer text (let's say "hello") only "hel" will be displayed.

Do you have any idea where the problem could be from?

Thank you!

@arpu
Copy link

arpu commented Jul 18, 2020

i had this problem too, but need to look how i resolved this

@arpu
Copy link

arpu commented Jul 18, 2020

@Ocelyn do you use threejs or aframe?

@Ocelyn
Copy link
Author

Ocelyn commented Jul 18, 2020

@arpu Thank you for your reply! Threejs

@arpu
Copy link

arpu commented Jul 18, 2020

ok, what i do is recreate the troika-text on change, but this looks more a bug @lojjic ?

@lojjic
Copy link
Collaborator

lojjic commented Jul 18, 2020

This definitely shouldn't happen, and I change text all the time with no issues. Can you provide a simple testcase that demonstrates the bug?

@lojjic
Copy link
Collaborator

lojjic commented Jul 18, 2020

Nevermind, I was able to reproduce the bug. I will fix ASAP.

@Ocelyn
Copy link
Author

Ocelyn commented Jul 18, 2020

@lojjic Thank you so much!

@lojjic
Copy link
Collaborator

lojjic commented Jul 18, 2020

This bug is caused by an internal change in ThreeJS that they introduced in r117. I'm getting a workaround in place. In the meantime, using ThreeJS r116 should work for you.

@lojjic lojjic closed this as completed in a7ef945 Jul 19, 2020
@lojjic
Copy link
Collaborator

lojjic commented Jul 19, 2020

The underlying issue deserves more investigation, but I've got a workaround in place. Version 0.30.1 should fix it for you, please try it and reopen this if you still have issues. Thanks!

@arpu
Copy link

arpu commented Jul 19, 2020

any chance for the aframe update?

@lojjic
Copy link
Collaborator

lojjic commented Jul 19, 2020

@arpu I just published aframe-troika-text 0.4.0

@arpu
Copy link

arpu commented Jul 19, 2020

wau thx!

@lojjic
Copy link
Collaborator

lojjic commented Jul 22, 2020

Reopening... the workaround has surfaced another bug that causes pieces of text to disappear. I suspect it's due to disposing the geometry. pmndrs/drei#62

@lojjic lojjic reopened this Jul 22, 2020
lojjic added a commit that referenced this issue Jul 22, 2020
…a GlyphsGeometry

Followup fix for #69, reported in pmndrs/drei#62

We were reusing the common plane BufferAttributes across GlyphsGeometry
instances, which used to work but as of Three r118 now throws an error
about unbound buffers when one of the geometries is disposed. We now
clone all the base plane attributes, which keeps things isolated at the
expense of redundancy. Thankfully those attributes are usually very
small so it's not a huge amount of duplicated data.
@lojjic lojjic closed this as completed Aug 4, 2020
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

3 participants