RiveView that renders them.
GPU Canvas is required to render 3D content. It requires
@rive-app/react-native 0.5.3 or later.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.12.0or later. With older versions, files load without GPU Canvas, a warning is logged, andisGPUCanvasEnabled()returnsfalse.
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.