Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

troika-three-text TextComponent #9341

Merged
merged 47 commits into from
Dec 7, 2023
Merged

troika-three-text TextComponent #9341

merged 47 commits into from
Dec 7, 2023

Conversation

heysokam
Copy link
Contributor

@heysokam heysokam commented Nov 27, 2023

Summary

Adds support for the Troika text renderer plugin, and (almost all) its configuration options.
Its output is a spatial Component that is exposed in the studio with a TextNodeEditor.

References

n/a

QA Steps

n/a

doc: Better TextMesh doc comments formatting
new: font family editor mapping
doc: Reformated all temp TextMesh properties comments for better organization
fmt: new "unlikely" temp section for TextMesh properties
new: FontDefault value, for initializing the default font URI
@heysokam heysokam self-assigned this Nov 27, 2023
@heysokam heysokam marked this pull request as ready for review November 29, 2023 23:53
text.glyphDetail
])

return null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of returning null. Return a function that runs
text.troikaMesh.dispose()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't return null from the reactor body, would have to be inside the useEffect. However, it looks like we're creating the troikaMesh in the component's onInit. Either we move that to the reactor and handle cleanup in a useEffect cleanup, or we should dispose the troika mesh in the onRemove callback.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its resolved with f2b142a
Let me know if something is missing.

text.glyphDetail
])

return null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't return null from the reactor body, would have to be inside the useEffect. However, it looks like we're creating the troikaMesh in the component's onInit. Either we move that to the reactor and handle cleanup in a useEffect cleanup, or we should dispose the troika mesh in the onRemove callback.

@DanielBelmes DanielBelmes merged commit d28ec62 into dev Dec 7, 2023
13 checks passed
@DanielBelmes DanielBelmes deleted the TextComponent-troika branch December 7, 2023 19:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants