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.