@rive-app/canvas-lite
TypeScript icon, indicating that this package has built-in type declarations

2.23.10 • Public • Published

npm

Rive

A lite high-level Rive API using CanvasRenderingContext2D. Please see https://rive.app/community/doc/canvas-vs-webgl/docanjXoQ1uT for a list of all the available web runtimes and their details.

Canvas Lite

npm install @rive-app/canvas-lite

An easy-to-use high-level Rive API using a backing CanvasRenderingContext2D renderer. This lets Rive use the browser's native high-level vector graphics renderer. Some benefits of this package:

  • Extremely small download size
  • Great for displaying many animated canvases concurrently on the screen. This is ideal for when you want to render lists or grids of Rive animations on the screen, as there is no context limit by the browser (as opposed to WebGL)
  • Support for simple vector graphics animations, raster, and mesh deformations
  • Requests the Web Assembly (WASM) backing dependency for you

Getting Started

Why Lite?

The current @rive-app/canvas dependency supports all Rive features and contains the necessary backing dependencies to render those graphics. This lite version has the same API, but does not compile and build with certain dependencies in order to keep the package size as small as possible.

At this time, this lite version of @rive-app/canvas-lite will not render Rive Text onto the canvas or play Rive Audio. Note however, that even if your Rive file may include Rive Text components, rendering the graphic should not cause any app errors, or cease to render. The same is true for playing audio.

Readme

Keywords

Package Sidebar

Install

npm i @rive-app/canvas-lite

Homepage

rive.app

Weekly Downloads

29,140

Version

2.23.10

License

MIT

Unpacked Size

1.5 MB

Total Files

8

Last publish

Collaborators

  • phil_rive
  • rive-engineering
  • luigi-rosso
  • guidorosso
  • avivian_rive