Three.Js Cookbook

Jos Dirksen

Language: English

Publisher: Packt Publishing

Published: Jan 29, 2015

Description:

Over 80 shortcuts, solutions, and recipes that allow you to create the most stunning visualizations and 3D scenes using the Three.js library

About This Book

  • Create visually stunning 3D graphics and animations directly in your browser, without the need for any plugins or needing to learn WebGL
  • Add zest and beauty to your 3D scenes by using advanced materials, textures, and different light sources as part of these comprehensive and applicable recipes
  • Learn how to use third-party libraries for advanced animation control and simulating real world physics

Who This Book Is For

This book is ideal for anyone who already knows JavaScript and would like to get a broad understanding of Three.js quickly, or for those of you who have a basic grasp of using Three.js but want to really make an impact with your 3D visualizations by learning its advanced features. To apply the recipes in this book you don't need to know anything about WebGL; all you need is some general knowledge about JavaScript and HTML.

What You Will Learn

  • Create a standard HTML skeleton and advanced features such as keyboard controls, drag and drop support, WebGL detection, and loading resources
  • Build and transform Three.js geometries using simple properties and advanced matrix transformations
  • Enhance the look of your scene using Three.js materials, texture maps, and dynamic textures
  • Apply realistic lighting and shadows to the 3D objects you have created
  • Animate particle systems created from scratch or from existing geometries
  • Work with animations, advanced physics, and collision detection

In Detail

Modern browsers are becoming more powerful each year and in recent years have adopted WebGL as the standard to deliver 3D graphics in a browser. Beginning with some basic recipes to get you started, this book will guide you through the most important features that Three.js has to offer. You'll even learn how to quickly create new geometries from scratch. Solutions and methods that show you how to use HTML5 video and canvas as textures will follow on from this.

By the end of the book, you'll be able to quickly add advanced features to your scene, improve the way users interact with your 3D scene, and make your scenes look stunning.