← Back to release summary

Mesh2D Canvas API

Category
Graphics
Type
New or changed feature
Status
In developer trial (Behind a flag) (Chrome In developer trial (Behind a flag))
Intent stage
None

Summary

A high-performance Canvas 2D triangle mesh API that can be used to batch-render a large number of textured triangles. This will enable advanced texture mapping and geometry deformation effects in a 2D context.

Motivation

Triangle meshes are a fundamental building block of most low-level graphics APIs, and their rendering is heavily optimized on modern hardware. They can represent complex geometries, and provide an efficient mechanism for texture mapping and morphing. Mapping textures to arbitrary geometries is of great importance to animation engines (e.g. Lottie, Rive), both as a direct animation mechanism and as an utility for implementing various morphological effects. Since Canvas2D does not currently support drawing triangle meshes, such animation engines are either resorting to inefficient workarounds or limiting the set of supported features on the web.

Standards & signals

Samples: https://github.com/fserb/canvas2D/blob/master/spec/mesh2d.md https://demos.skia.org/demo/mesh2d

Explainers: https://github.com/fserb/canvas2D/blob/master/spec/mesh2d.md

View on chromestatus.com