Open Yeisonlop10 opened 2 years ago
Hi @swingingtom , for now I'm only experimenting with the regular text. I will try again by setting the text with: text.set( { content: 'new text' } ); Thanks for the hint with the provided example. 👍
You are welcome How did you changed the text content previously? Feel free to share your setup on codesandbox if you succeed to reproduce it.
Hi. It's for a bigger project that uses react. I see that in children components where we use threemesh ui, we have to call again the renderer.setAnimationLoop to update ThreeMeshUI.update even if in the parent component we are already running it. I see this error the second time I want a component to mount:
This error in VR session automatically causes crashing.
Im not fluent at all in react, but I managed to get some experiences with Vue.
The error, as you may already know, comes from the fact that a Text doesn't have a fontFamily attached. Text must be added to a parent Block. And usually this is the parent Block that have the fontFamily attached. Allowing other Text children to use the same fontFamily without the need to explicitely setting it.
Can you check that nothing "happend" to your font before mounting a second Text component ?
When you say:
the second time I want a component to mount:
Are we okay that you want to mount a second instance of that component? Or is a the same instance that you mount, dismount, mount ?
if you can provide a minimum reproduction setup codesandbox, I might be able to help you further. They are some starter template for three-mesh-ui and react (react-three-fiber) such as this one
@Yeisonlop10 Did you succeed some progress on this task ?
Hi, thank you for the amazing work with this library. I would like to ask if there is any way to update the text that has been rendered inside a block. I'm trying to add a new text object and deleting the old one, but I'm getting specific error in the oculus quest 2 and sometimes in the regular browser while using the WebXR extension to simulate the oculus. It seems like at some point it loses a reference to the initial text that was rendered.
Ideally at some point in the code execution the user performs an action and I would like to change the already rendered text.For example: