feat(rive-angular): add dual runtime support with webgl2 fallback#1
Closed
andrei-shpileuski wants to merge 12 commits into
Closed
feat(rive-angular): add dual runtime support with webgl2 fallback#1andrei-shpileuski wants to merge 12 commits into
andrei-shpileuski wants to merge 12 commits into
Conversation
Introduce configurable canvas/webgl2 runtime loading with optional strict mode and automatic fallback to improve compatibility while enabling advanced rendering features.
|
You have used all of your free Bugbot PR reviews. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
…nly Rive exports - Load canvas/webgl2 SDKs via dynamic import; centralize missing-module and fallback errors with actionable messages - Default resolved runtime config when provideRiveRuntime is absent; unify component and file service initialization - Replace static re-exports from @rive-app/canvas with local enums/types; export Rive/RiveFile/Layout/StateMachineInput/ViewModelInstance as types only - Optional peerDependenciesMeta for both Rive runtimes; README install matrix - Bump package to 2.0.0-beta.0; changelog for v2; remove unreleased 1.2.0-beta.0 section; stabilize zoneless specs and reset runtime state in tests
…ndled - Use await Promise.resolve(file.init()) and keep failed state in catch - RiveFile.init typing: void | Promise<void> - Stabilize init-failure specs with async flushLoadMicrotasks
- Bump package version; document RiveFile.init await fix in changelog - Update README pre-release tag
Restores consumer typing for direct Rive instance usage after v2 stub Rive interface replaced canvas re-exports.
- Bump version; changelog entry for Rive event API typing fix - Update README pre-release tag
Vite must not require absent optional peers at analyze time for canvas-only or webgl2-only installs. chore(release): 2.0.0-beta.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce configurable canvas/webgl2 runtime loading with optional strict mode and automatic fallback to improve compatibility while enabling advanced rendering features.
Note
Medium Risk
Changes core runtime initialization and Rive instance creation to dynamically select between
@rive-app/canvasand@rive-app/webgl2, which could affect loading behavior and error handling across the library. Backward compatibility paths (canvasdefault, selector aliasing, fallback/strict modes) reduce risk but add complexity.Overview
Adds dual runtime support so
provideRiveRuntime()can chooserenderer: 'canvas' | 'webgl2'with optionalstrictmode; when non-strict, runtime init (and component instantiation) can automatically fall back to the alternate renderer on failure.Updates
RiveCanvasComponentandRiveFileServiceto constructRive/RiveFilefrom the resolved SDK module via a newrive-sdkfacade, and exposes<rive>as the preferred selector while keeping<rive-canvas>as a legacy alias.Bumps
@grandgular/rive-angularto1.2.0-beta.0, adds optional peer dependency@rive-app/webgl2, and expands docs/changelog plus new runtime tests covering renderer selection and fallback behavior.Reviewed by Cursor Bugbot for commit 604d969. Bugbot is set up for automated code reviews on this repo. Configure here.