SVG and Canvas (2D or WebGL) represent the different ways to create graphics on a web application programmatically.
While a canvas lacks many SVG features like object-level event-driven interactivity, a canvas provides per-pixel control of the graphic.
SVG is faster when rendering large objects, but slower when rendering many objects. A canvas allows you to display the webcam capture, letting you take and save a photo with it.
Covering every language construct, keyword, and function, this book attempts to provide a complete guide to web graphics based on these technologies.
source codes: https://drive.google.com/file/d/17IBN0IqqwSFSiBmqDx4g5tjuei78lPWj/view?usp=sharing
Chong Lip Phang is a seasoned web and mobile app developer in Malaysia. He has been writing computing books for the past 10 years. The mobile game he created, Quiz Jungle, features multiplayer quiz games on various subjects. In the game, all the animals talk, interact with one another, and have intelligence literally. One of the books he published, Mastering Front-End Web Development, has won seven awards from Book Authority.