-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
@Stable() public final class RiveFile implements AutoCloseable
A Rive file which contains one or more artboards, state machines, and view model instances.
A Rive file is created from the Rive editor and is exported as a
.rivfile.Create an instance of this class using rememberRiveFile or RiveFile.fromSource. When using the latter, make sure to call close when you are done with the file to release its resources.
The this object can be used to query the file for its contents, such as artboards names. It can then be passed to rememberArtboard to create an Artboard, and then to RiveUI for rendering.
Queries are cached for performance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRiveFile.Companion
-
Method Summary
Modifier and Type Method Description final List<String>getArtboardNames()final List<String>getViewModelNames()final List<String>getViewModelInstanceNames(String viewModel)final List<ViewModel.Property>getViewModelProperties(String viewModel)final List<File.Enum>getEnums()-
-
Method Detail
-
getArtboardNames
final List<String> getArtboardNames()
-
getViewModelNames
final List<String> getViewModelNames()
-
getViewModelInstanceNames
final List<String> getViewModelInstanceNames(String viewModel)
-
getViewModelProperties
final List<ViewModel.Property> getViewModelProperties(String viewModel)
-
-
-
-