RiveView that renders them.
GPU Canvas is required to render 3D content. It requires
@rive-app/react-native 0.5.3 or later on iOS and 0.5.7 or later on Android. On Android, we recommend 0.5.13 or later for stability.Enabling GPU Canvas
CallRiveRuntime.setGPUCanvasEnabled(true) before loading any Rive files, for example at app startup:
RiveView.
Checking the setting
UseRiveRuntime.isGPUCanvasEnabled() to check whether GPU Canvas is in effect:
false if the native SDK can’t provide GPU Canvas.
Native SDK requirements
GPU Canvas uses the Apple and Android runtimes’ GPU Canvas support. The default native SDK versions bundled with@rive-app/react-native support it. If you override the native SDK versions:
- iOS requires Rive iOS
6.25.0or later. Older versions fail to compile. - Android requires Rive Android
11.14.2or later. Older versions fail to compile.
Default behavior
GPU Canvas is disabled by default. Don’t callsetGPUCanvasEnabled if your content doesn’t require it.
See the GPU Canvas example in the example app for a complete setup.