Skip to content

Lightweight minimal implementation of canvas DOM and layering

License

Notifications You must be signed in to change notification settings

Mat-thieu/cdom2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cdom2d

Note this library is far from production ready, or done, it's actively being worked on

Cdom2d is a lightweight zero-dependency canvas DOM library and (soon to be) layout engine written in Typescript. It is designed to provide a minimum set of features you need for working with layering while maintaining a small bundle size.

The focus of this library is to provide a minimum viable set of tools for drawing using the canvas 2d feature set, it does not attempt to fill in shortcomings of the API as it would impede on the bundle size, however I do strive for it to be extensible enough so these shortcomings can be resolved.

Features and planned features

  • Canvas pan
  • Canvas zoom
  • Layering
    • Grouping
    • Rect
    • Text (partial, font load listener missing)
    • Image (very basic)
  • Click and hit detection
  • Indexing
  • Computed units
    • Percentage
    • Viewport width and height
  • Movable bounding box (may be moved into its own repo)
  • Serializable
  • Layout
    • Padding
    • Margin
    • Inline
    • Block
  • Animation
    • Global timeline mode
    • Interactivity response mode
  • Caching
  • Testing

About

Lightweight minimal implementation of canvas DOM and layering

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published