-
Notifications
You must be signed in to change notification settings - Fork 11
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
API feedback #9
Comments
Hi @BitBarrel, thanks for the great feedback. We're looking to improve the API while it is in technical preview. To address the points you mentioned:
Thanks again for the feedback! |
I will update the input values every frame, so the current method makes that faster, that is fine. Looking forward to updated and more clear documentation. |
@HayesGordon -Currently, it requires translating the mouse position. The API should handle this instead. -Different code is required for the renderTexture being displayed on a 3D object, or on the camera. The API should handle this instead. -Showing how to get Rive interactions to work on a Canvas (probably the most common use case), is missing. -New code has to be added for every single state machine used. This is not maintenance-friendly and too labor-intensive. There should be no need to send the mouse feedback to each state machine individually. The way it should work is to have everything handled by the API and no code required at all. Have a look at how NoesisGUI does this. That is much more elegant. |
In general, the API is way too convoluted. There is too much coding required to get it to work from scratch without using the example scripts.
A few suggestions.
-Put all the renderqueue, command buffer, and camera code in a Rive.Setup() function.
-Setting triggers, bool, numbers, should not require making custom structs to set the data. It should be handled by the API instead. For example, this should work:
m_file.artboard(0).stateMachine(0).setNumber("test") = 50.0f;
-There should be no need to cast getNumber, because it is known that the number is a float. Same with a bool. This should work:
float test = m_file.artboard(0).stateMachine(0).getNumber("test");
-Artboards and state machines should have a name (string) property so that whatever is in the index can be checked if that is the correct one.
-An artboard and state machine index should have a function to get it with a string (name).
-In short, everything should have both a name (string) and an index (int) so it can both be found easily (slow), and referenced quickly (fast).
The text was updated successfully, but these errors were encountered: