Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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
Three.js Cookbook

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

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher Packt
ISBN-13 9781783981182
Length 300 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jos Dirksen Jos Dirksen
Author Profile Icon Jos Dirksen
Jos Dirksen
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Getting Started 2. Geometries and Meshes FREE CHAPTER 3. Working with the Camera 4. Materials and Textures 5. Lights and Custom Shaders 6. Point Clouds and Postprocessing 7. Animation and Physics Index

Preface

Each year, web browsers become more powerful, increase in features, and improve in performance. Throughout the last couple of years, browsers have emerged as a great platform to create immersive, complex, and beautiful applications. Most of the current applications that are being built use modern HTML5 features such as web sockets, local storage, and advanced CSS techniques for styling.

Most modern browsers, however, also have support for a technology that can be used to create beautiful, 3D graphics and animations that use the GPU to achieve maximal performance. This technology is called WebGL and is supported by the latest versions of Firefox, Chrome, Safari, and Internet Explorer. With WebGL, you can create 3D scenes that run directly in your browser, without the need for any plugins. Support on the desktop for this standard is great, and most modern devices and mobile browsers fully support this standard.

To create WebGL applications, however, you need to learn a new language (called GLSL) and understand how vertex and fragment shaders can be used to render your 3D geometries. Luckily, though, there are a number of JavaScript libraries available that wrap the WebGL internals and provide a JavaScript API that you can use without having to understand the most complex features of WebGL. One of the most mature and feature-rich of those libraries is Three.js.

Three.js started in 2010 and provides a large number of easy-to-use APIs that expose all the features of Three.js and allows you to quickly create complex 3D scenes and animations in your browser.

Through its APIs, you can do pretty much everything that you want with Three.js. However, because it has so many features, it's sometimes difficult to find the right way to accomplish something. Throughout the years, Three.js has been under heavy development, but it is stabilizing now. So many examples and tutorials that you find online are outdated and don't work anymore. In this book, we'll provide you with a large number of recipes that you can follow to accomplish some common tasks with Three.js. Each example is accompanied with a runnable example that you can examine to better understand the recipe or adapt for your own purposes.

lock icon The rest of the chapter is locked
Next Section arrow right
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 $19.99/month. Cancel anytime
Banner background image