-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add data binding artboards support #95
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
Conversation
f5604dc to
6d905b7
Compare
android/src/main/java/com/margelo/nitro/rive/HybridViewModelArtboardProperty.kt
Outdated
Show resolved
Hide resolved
| import { type Metadata } from '../helpers/metadata'; | ||
|
|
||
| /** | ||
| * Data Binding Artboards Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really good explanation. We should also update the other examples to link to the marketplace!
HayesGordon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! But let's remove the ability to add a listener for the time being until Android supports it.
Add support for swapping artboards at runtime via data binding properties. This enables composing complex scenes from artboards in different Rive files. New APIs: - RiveFile.getBindableArtboard(name) - create bindable artboard reference - RiveFile.artboardNames / artboardCount - enumerate artboards - ViewModelInstance.artboardProperty(path) - get artboard property - ViewModelArtboardProperty.set(artboard) - swap artboard at runtime
5f0967c to
fc7cca9
Compare
HayesGordon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! looks great
## Summary - Add React Native code example for artboard data binding in the new runtime - Add React Native link to the data binding artboards demo card Related: rive-app/rive-nitro-react-native#95
Summary
New APIs
RiveFile.getBindableArtboard(name)- create bindable artboard referenceRiveFile.artboardNames/artboardCount- enumerate artboardsViewModelInstance.artboardProperty(path)- get artboard propertyViewModelArtboardProperty.set(artboard)- swap artboard at runtimeExample
rive.mov
References