Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Canvas Cookbook

You're reading from   Canvas Cookbook Over 80 simple but creative and structured recipes to explore the capabilities of HTML5 Canvas

Arrow left icon
Product type Paperback
Published in May 2019
Publisher
ISBN-13 9781785284892
Length 254 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Toc

Table of Contents (11) Chapters Close

Preface 1. Paths and Text 2. Shapes and Composites FREE CHAPTER 3. Animation 4. Images and Videos 5. Interactivity through Events 6. Creating Graphs and Charts 7. 3D Modeling 8. Game Development 9. Interoperability and Deployment Index

What this book covers

Chapter 1, Paths and Text, is a simple chapter where you can view basic recipes to draw lines, arcs, curves, and text. It introduces the use of the Canvas API to render drawings.

Chapter 2, Shapes and Composites, introduces various shapes such as triangles, rectangles, circles, and ellipses. Coloring and styling is also demonstrated in a few recipes. You will find here exciting recipes rendering styled text and various types of composite.

Chapter 3, Animation, uses the drawings made in the previous chapter and adds some actions to them. It introduces a systematic approach toward animation. It covers basic movements such as linear motion, acceleration, oscillation, and its implementation through impressive recipes.

Chapter 4, Images and Videos, reveals the rendering of images and videos. The recipes show the clipping and cropping of images. Images on canvas are the basic foundation for any application or game.

Chapter 5, Interactivity through Events, introduces event handling. It encompasses events captured through input devices such as the mouse, keyboard, and touch. You will be able to create a simple game at the end of this chapter.

Chapter 6, Creating Graphs and Charts, displays different types of graph and chart. These are ideal for any data presentation. Here, I will show you to draw simple x and y axes and then plot different equations on them. You will learn to draw a bar chart and a pie chart.

Chapter 7, 3D Modeling, will show you the rendering of 3D objects. It will introduce you to an open source library named Three.js, used to draw various shapes such as cubes, spheres, cylinders, and toruses.

Chapter 8, Game Development, explains the complete procedure for developing a game. It is time to assemble all the nuts and bolts. I introduce here another open source library Phaser.js, which is one of the popular libraries for game development. You will learn various game stages, playing audio, creating and using sprites, and much more.

Chapter 9, Interoperability and Compatibility, is just an extension to the previous chapter, which highlights the deployment of the game on a mobile phone. You will encounter the use of CSS to enhance the look and feel of the game.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime