Book Image

Mastering SVG

By : Rob Larsen
Book Image

Mastering SVG

By: Rob Larsen

Overview of this book

SVG is the most powerful image format in use on the web. In addition to producing resolution-independent images for today's multi-device world, SVG allows you to create animations and visualizations to add to your sites and applications. The simplicity of cross-platform markup, mixed with familiar modern web languages, such as CSS and JavaScript, creates a winning combination for designers and developers alike. In this book, you will learn how to author an SVG document using common SVG features, such as elements and attributes, and serve SVG on the web using simple configuration tips for common web servers. You will also use SVG elements and images in HTML documents. Further, you will use SVG images for a variety of common tasks, such as manipulating SVG elements, adding animations using CSS, mastering the basic JavaScript SVG (API) using Document Object Model (DOM) methods, and interfacing SVG with common libraries and frameworks, such as React, jQuery, and Angular. You will then build an understanding of the Snap.svg and SVG.js APIs, along with the basics of D3, and take a look at how to implement interesting visualizations using the library. By the end of the book, you will have mastered creating animations with SVG.
Table of Contents (17 chapters)
Title Page
PacktPub.com
Contributors
Preface
Index

JavaScript Versions and tools


Before we get into the code, I think it's important to go over different JavaScript Versions and how they'll be used in the book. I'd also like to go over how I'll present examples that require tooling.

JavaScript Versions

As you may be aware, there's been a lot of work over the past few years around evolving the JavaScript programming language. Some of this work is really, really great. So great, in fact, that the dominant libraries and frameworks on the web right now are idiomatically written in versions and variations of JavaScript that aren't universally available in web browsers. Working in bleeding-edge versions of the language, including framework-specific extensions, is possible because of the use of a transpiler (https://scotch.io/tutorials/javascript-transpilers-what-they-are-why-we-need-them), a piece of software that takes software code written in one language (or in this case, a version of a language) and outputs code in another language (in this...