Skip to content

SandroMaglione/infinite-html-canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infinite HTML <canvas>

GitHub: SandroMaglione Twitter: SandroMaglione

This repository contains a Typescript implementation of an infinite HTML <canvas>.

This is the same effect that many whiteboard and diagram apps use to achieve a simulated infinite canvas. These apps simulate an infinite amount of space by using math to update the coordinates of the canvas content.

You can read a step by step explanation on the blog post.

💻 Code

The complete logic is implemented inside the InfiniteCanvas class (infinite-canvas.ts).

main.ts contains an example of how to use the InfiniteCanvas class in a simple Vite project.

😀 Support

Hi, I am Sandro 👋

You can follow me on my Twitter for more updates on my projects and interests.

I also have a newsletter, in which I share tutorials, guides, and code snippets: Subscribe to the Newsletter here 📧

About

Infinite HTML <canvas> that can be zoomed and panned using touch on mobile 🤏

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published