kirupa
December 26, 2024, 4:30am
1
Hi everybody - I’ve started a new series of tutorials that cover more advanced topics revolving around how to work with the Canvas by continuously improving how we can draw and display a grid!
The current list of tutorials are:
Drawing a Perfect Grid
Creating a Fullscreen Grid
Upcoming: Continuously Sliding/Animating our Grid
Upcoming: Skewing our Grid
Upcoming: Making the Grid Act as a Background Element
Thoughts on any other topics I should cover beyond these?
Cheers,
Kirupa
Maybe show off the requestAnimationFrame api for animations?
1 Like
kirupa
December 29, 2024, 2:30am
3
Yes!
My next article is going to cover that and even delta time to ensure consistent animation speeds. It will be an amalgamation of a few articles all put together as part of one example
Hi! Could it be: how to add a ruler to a canvas? How to deal with the units (px, inch, milimiters, cm)?
and derived from that:
how to drag & drop the canvas?
zoom in & zoom out…
1 Like
kirupa
February 5, 2025, 2:31pm
5
@aka_pepe - these are great ideas! Thanks for sharing
For the ruler idea…I am assuming this ruler will be visually accurate independent of the screen DPI?
For zoom, you could use this technique to detect the levels: Detecting Browser Zoom Changes in JavaScript
Here are some advanced ideas:
Better Animations – Make animations smoother and more realistic using physics like gravity and speed.
Faster Performance – Optimize your canvas by reducing unnecessary drawings and using tricks to make it run smoothly.
3D Graphics with WebGL – Instead of just 2D drawings, use WebGL to create 3D objects and animations.
New HTML5 Features – Keep up with the latest web updates to improve how your canvas interacts with other elements.
Advanced UI Design