• Complain

Rob Larsen [Larsen - Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript

Here you can read online Rob Larsen [Larsen - Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2018, publisher: Packt Publishing, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Rob Larsen [Larsen Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript
  • Book:
    Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript
  • Author:
  • Publisher:
    Packt Publishing
  • Genre:
  • Year:
    2018
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Master the image format of the modern web

Key Features
  • Master the art of creating responsive and interactive graphics with SVG, CSS, and JavaScript
  • Combine SVG with popular animation libraries and frameworks for GUI rich applications
  • Create an awesome user experience with high performance graphics for your web applications
Book Description

SVG is considered as an important aspect of animating your web applications. Its a cross-platform markup along with the combination of modern web technologies that proves to be the winning combination for web designers and developers. This book will show you the different facets of SVG and the various considerations and prerequisites for animating with SVG.

The book gets started with the basic concepts of SVG and then outlines the different ways that SVG can be used on the modern web.

You will learn how to author an SVG document using the most common features of SVG such as elements and attributes, and also learn how to serve SVG on the web with simple configuration tips for common web servers. Next, you will use SVG elements and SVG images in HTML documents.

Moving on, you will use SVG images confidently for a variety of common tasks and learn how to manipulate SVG elements. You will also see how to add animation with just the power of CSS. Next, you will learn the basic JavaScript SVG (API) by introducing the common Document Object Model (DOM) methods and then how to interface SVG with common libraries and frameworks such as React, JQuery, and Angular.

You will then build an understanding of the APIs of both Snap.svg and SVG.js along with the basics of D3 and see how to implement interesting visualizations using the library.

By the end of the book, you would have mastered creating animation with SVG.

What you will learn
  • Basics of SVG production
  • How to deliver the elements that make up an SVG image
  • Learn how to replace your old CSS Sprites with SVG
  • Animation and data visualization with SVG will be explained in both pure JavaScript and using common libraries
  • Use SVG for scaling images across multiple devices easily
  • Harness the power of CSS Animations and Transformations to manipulate your SVG images in a replicable, remixable way
  • Interface SVG with common libraries and frameworks such as jQuery, React, and Angular
Who This Book Is For

This book is for web developers and designers looking to add animation to their projects. Some experience with HTML, CSS, and JavaScript is required.

About the Author

Rob Larsen is an experienced front end engineer, team lead and manager. Since 1999 (thats Web 1.0, if youre keeping track) been building web sites and applications for some of the worlds biggest brands.

Rob is an active writer and speaker on web technology with a special focus on the continuing evolution of HTML, CSS and JavaScript. He is co-author of Professional jQuery, the author of Beginning HTML and CSS and the author of The Uncertain Web, from OReilly. Hes also an active member of the open source community.

In his career Rob has spent time at Sapient Global Markets, Isobar, The Brand Experience, Cramer and as an independent consultant. Over the course of his career Rob has solved unique problems for clients like Samsung, Motorola, Philips, Gillette, Bostons Museum of Science, and Harvard Kennedy School.

**

About the Author

Rob Larsen is an experienced front end engineer, team lead and manager. Since 1999 (thats Web 1.0, if youre keeping track) been building web sites and applications for some of the worlds biggest brands.

Rob is an active writer and speaker on web technology with a special focus on the continuing evolution of HTML, CSS and JavaScript. He is co-author of Professional jQuery, the author of Beginning HTML and CSS and the author of The Uncertain Web, from OReilly. Hes also an active member of the open source community.

In his career Rob has spent time at Sapient Global Markets, Isobar, The Brand Experience, Cramer and as an independent consultant. Over the course of his career Rob has solved unique problems for clients like Samsung, Motorola, Philips, Gillette, Bostons Museum of Science, and Harvard Kennedy School.

Rob Larsen [Larsen: author's other books


Who wrote Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript? Find out the surname, the name of the author of the book and a list of all author's works by series.

Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
stroke-linecap

The stroke-linecap attribute indicates the shape to be rendered at the end of an open line. The options are butt, round, square, and inherit. The following code sample shows the different rendering options in action. The two red lines are there to show the difference between butt and square. butt ends the stroke flush with the ends of the line. The square cap extends beyond the end of the line to include the thickness of the stroke's:


viewBox="0 0 500 400" version="1.1">
x2="450" y2="100" stroke-linecap="butt" />
x2="450" y2="200" stroke-linecap="round" />
x2="450" y2="300" stroke-linecap="square" />
y1="0" x2="20" y2="400" />
y1="0" x2="450" y2="400" />

The result of this can be seen in the following screenshot:

JavaScript and SVG Youve learned quite a bit in this book so far about SVG - photo 1
JavaScript and SVG

You've learned quite a bit in this book so far about SVG. You've spent a lot of time looking at the details of the SVG specification and the different ways in which SVG can interact with CSS and HTML. Hopefully, it's been as interesting for you as it is for me.

As interesting as it has all been, it's this chapter where we'll put all the tools together to really unlock the power of SVG. Adding JavaScript to the mix opens up a huge number of new possibilities.

Granted, there are many web developers and designers who will never do animation, dynamic visualizations, or other interactive work with SVG. For them, getting a full understanding of the way that SVG itself works as markup and how it fits in with other static web technologies is incredibly valuable. This is especially true of the intersection between SVG and CSS that we just learned about in detail.

That said, the most exciting thing about SVG is how easily it works with JavaScript to enhance the interactivity of your site. All of these open web technologies are designed to work together in ways that create something greater than the sum of the individual specifications. Even though there are separate experts working on all of these various technologies, they do so out in the open (for the most part) and are, generally, part of larger organizations such as Microsoft, Google, or Mozilla and therefore have a real desire to make sure that these technologies work together in the best possible way.

The intersection of SVG and JavaScript is definitely one such case.

In this chapter, we'll learn about the low-level interface between JavaScript and SVG. This includes the DOM interface to SVG. This is important stuff, even though we're also going to learn about libraries and frameworks for working with SVG. Even i f you've been doing web development for a while and are familiar with JavaScript and the DOM, the differences between the regular HTML DOM and the interface to SVG elements is important. If you're not so familiar with raw DOM manipulations (and many developers who started in the jQuery era and later are not), then this chapter will give you a whole set of useful skills.

In this chapter, we'll learn about the following:

  • The basic DOM interface to SVG-basic accessing and manipulating SVG elements in JavaScript
  • SVG-specific DOM interfaces
  • Working with SVG and CSS dynamically
Who this book is for

This book is for web developers interested in exploring Scalable Vector Graphics. It is written from the perspective of a frontend web developer, but anyone with experience with JavaScript, CSS, and XML-based grammars should find this book accessible.

Prior experience with SVG is not required.

Authoring

SVG documents can grow quite large, even for simple images. Depending on the number of effects and the number of elements, the markup used to draw an SVG image could quickly overwhelm everything else on the page. For that reason, it's worth keeping large SVG elements as separate document fragments and pulling them into your documents as needed. Depending on how they're being used, this might be with the use element inside a containing SVG document or might be a case of importing a document fragment using your page composition tool of choice. There are a large number of server-side and/or client-side solutions for bringing together pieces of markup and text together (for example, JavaScript template solutions, CMSs, blog platforms, and server-side scripting languages, such as PHP), so I'm not going to create an example of potentially limited use. I'll trust you'll leverage the one closest to your heart.

You'd still have to deal with it when inspecting the page, but it's much nicer than having 500 lines of markup in a 700-line file being taken up by an SVG illustration showing a supply chain diagram or something similar.

About the reviewer

Danny Allen is a full-stack web developer who focuses on user experience design and implementation as founder of the international consultancy Wonderscore Ltd (wonderscore[dot]co[dot]uk).

He is passionate about building high-quality, accessible, and usable experiences on the web.

Danny currently lives and works in the United Kingdom.

His portfolio and contact details can be found at dannya[dot]com.

Helper Libraries Snap.svg and SVG.js

We've learned a lot about SVG so far in this book. If you've made it this far, you're ready to do some serious SVG development, and for that there are three ways to go:

  • Continue doing what we've, mostly, done so far in this book-learn about the way the core technologies interact and integrate SVG into your sites or applications, as you would in any markup. Manipulate it with JavaScript and CSS and you're ready to tackle basically anything. This is a valid approach and is the one I often take in my own work.
  • Use task-specific frameworks and libraries. We've started to look at this a little bit with GSAP and Vivus for animation. We'll continue to look at this in , Working with D3.js, when we look at D3, a powerful visualization framework.
  • Use general purpose SVG libraries that will help you with a variety of SVG-related tasks. SVG was brought into the mainstream of web development on the back of one such library, Raphael, and there are current libraries available for you to use in your own work. This option is the focus of this chapter.

As previously mentioned, SVG took many years to gain traction owing to limited browser support. A general-purpose SVG library called Raphael.js (http://dmitrybaranovskiy.github.io/raphael/) helped to bridge that support gap by offering a very clever Vector Markup Language (VML), https://docs.microsoft.com/en-us/windows/desktop/vml/web-workshop---specs---standards----introduction-to-vector-markup-language--vml-, polyfill for an older version of Internet Explorer. It also offered a friendly API for dealing with SVG in the browser, which helped people unfamiliar with SVG to get started quickly and easily.

This chapter deals with two of the most popular successors to Raphael.js:

  • Snap.svg: a direct successor to Raphael, being a library authored by the author of Raphael.js, Dmitry Baranovskiy (http://snapsvg.io/)
  • svg.js : another small, lightweight library that offers plenty of powerful options for manipulating SVG (http://svgjs.com/)

The rest of the chapter will look at the basics of each library and will then go through some familiar examples, reworked to utilize the power of these general purpose SVG tools.

We'll start with Snap.svg.

Drawing with code
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript»

Look at similar books to Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript»

Discussion, reviews of the book Mastering SVG: Web Animations, Visualizations and Vector Graphics With HTML, CSS and JavaScript and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.