Skip to content

yiyix/canvas2D

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update Canvas 2D API

This repo contains new, current and old proposals for the Canvas 2D API, following a set of rationales.

Explainer video

In active development

  • Layers. Support layers in canvas, that will be drawn in one, allowing effects only possible with auxiliary canvases.

  • Display list object. Format and data structure for retained mode drawings, making Canvas apps faster, more accessible and indexable.

  • Mesh2D. Draw a large number of texture-mapped triangles efficiently.

  • WebGPU Integration. Switch contexts between Canvas2D and WebGPU.

  • WebGPU Shaders. Allow for WebGPU shaders to be used as Canvas2D layers filters.

Launched

Those proposals have already been incorporated on the WhatWG spec and may be in different stages of implementation on browsers.

Parked / Future ideas

  • Perspective transforms. Allow for perspective transforms Canvas 2D rendering. Support 4x4 transform matrices.

  • Recorded pictures. Create a record object that receives all the commands from a Canvas2D and can be replayed multiple times.

  • Conic curves. Draw primitive.

  • Batch text rendering.

  • Text blob.

  • Path2D Inspection. Allow inspection of Path2D objects, that are currently opaque.

  • Element as a source for drawImage.

Dropped ideas

  • Color input. support for new color input on Canvas.

  • Batch drawImage. Support for multiple images being drawn within a single API call.

  • Modern filters. Support composited filters, create a filter object that can be updated, and support more SVG-like filters. Superseded by layers.

About

Update Canvas 2D API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 87.0%
  • HTML 12.1%
  • CSS 0.9%