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

String dynamic values from the code #329

Closed
ekokotov opened this issue Jul 11, 2023 · 2 comments
Closed

String dynamic values from the code #329

ekokotov opened this issue Jul 11, 2023 · 2 comments
Labels

Comments

@ekokotov
Copy link

Hello!
I have a task to display a drum with different numerical values ​​in its sectors. These values ​​or numbers will be dynamic and coming from the code. I couldn't find in the documentation if it's possible to add a label or a placeholder to the animation where dynamic text (from the code) can be displayed. I'm using the WASM version.
Thank you in advance!

@zplata
Copy link
Contributor

zplata commented Jul 19, 2023

Hi @ekokotov - right now, you'd have to layer a text element on top of the canvas. You could use the low-level APIs (@rive-app/canvas-advanced) to grab the position of a node from the draw hierarchy to know where to absolutely position your text element on top.

However, we do have a text feature coming pretty soon here that will allow you to dynamically change text values at runtime much easier (and you can just use the high-level @rive-app/canvas runtime for this). This might be of more interest in your use case

@ekokotov
Copy link
Author

ekokotov commented Sep 3, 2023

Thank you a lot for new features!

@ekokotov ekokotov closed this as completed Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants