Skip to main content
GPU Canvas enables 3D content in the Apple runtime. It is available through the Swift Concurrency API and is configured when creating a Worker. The setting applies to every File loaded by that worker and every Rive object created from those files.
GPU Canvas is required to render 3D content.

Enabling GPU Canvas

Pass a configuration with enableGPUCanvas set to true when creating a worker:
The worker’s GPU Canvas setting is fixed for its lifetime. Enable it before loading any files that require GPU Canvas or 3D support. Every File created with the worker uses the same setting:
No additional configuration is required when creating a RiveUIView, RiveUIViewRepresentable, or AsyncRiveUIViewRepresentable. Each view inherits the GPU Canvas setting from the worker associated with its Rive object.

Default Behavior

GPU Canvas is disabled by default. Continue to create a worker without a configuration when your content does not require it:

Sharing a GPU Canvas Worker

Share a GPU Canvas worker when multiple files or views can use the same worker. An example implementation is shown below.
AsyncShared and the Worker extensions below are application-level helpers. They are not included with RiveRuntime.
Use Worker.sharedGPUCanvas() when loading files that require GPU Canvas:
For a complete setup example, see the Apple quick start.