-
Notifications
You must be signed in to change notification settings - Fork 13
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
bug report : unable to access bounding box data from an other component #38
Comments
How are you attempting to access the bounding box? |
I added my component to the a-troika-text primitive. When the initial update happen, every variable when logging .min.x, .min.y.... I bypassed the issue by testing on tick when they are no longer infinite before recalling update but I don't think it is a great practice. Edit : I tried adding troika-text to the component depencies but it didnt change the problem |
Ah, I see. Text is processed asynchronously, so it's expected that the bounds are initially unknown. See "Handling Asynchronous Updates" here for more info on how to react to the layout completion: https://github.com/protectwise/troika/blob/master/packages/troika-three-text/README.md#handling-asynchronous-updates Let me know if you have suggestions on how to make this easier to handle in the Aframe wrapper. |
I personally think that an event triggered when the text render would be great. Edit : this would help me and other devs : we could then have a more cleaner implementation on our side then |
OK, I'll look into how AFrame does events and see if there's an appropriate common event type I can fire. |
Here is the reference if that can help you : https://aframe.io/docs/1.1.0/introduction/javascript-events-dom-apis.html#events-and-event-listeners |
Hi,
i am trying to access bounding box for a layout script, but i can't read it (value always infinite).
i made troika-text the dependency of my component without result.
can you help me ?
The text was updated successfully, but these errors were encountered: