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

2.15.0 • Public • Published

npm

Rive

A lite high-level Rive API using CanvasRenderingContext2D. Please see https://help.rive.app/runtimes/overview/web-js/canvas-vs-webgl 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. 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.

Readme

Keywords

Package Sidebar

Install

npm i @rive-app/canvas-lite

Homepage

rive.app

Weekly Downloads

21,785

Version

2.15.0

License

MIT

Unpacked Size

833 kB

Total Files

7

Last publish

Collaborators

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