Free Sample
+ Collection

Three.js Essentials

Jos Dirksen

Create and animate beautiful 3D graphics with this fast-paced tutorial.
RRP $19.99
RRP $32.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783980864
Paperback198 pages

About This Book

  • Acquire thorough knowledge of the essential features of Three.js, explained using comprehensive examples
  • Animate HTML5 elements directly from Three.js using the CSS3 3D renderer
  • Visualize information such as sound and open data in beautiful 3D

Who This Book Is For

If you already know JavaScript and want to quickly learn the essentials of Three.js, this book is for you. No prior knowledge of Three.js, WebGL, 3D modeling, or Math is required.

Table of Contents

Chapter 1: Get Up and Running with Three.js
Introducing Three.js
Looking at the requirements for Three.js
Setting up a local development environment
Creating a minimal Three.js web application
Enhancing the basic scene
Debugging the examples in this book
Chapter 2: Creating a 3D World Globe and Visualizing Open Data
Setting up the globe and camera controls
Adding basic textures to the globe
Adding directional and ambient lighting
Combining with a starry background
Improving the look with more advanced textures
Adding 2D information using HTML canvas as a texture
Chapter 3: Navigate around a Randomly Generated Maze
The result we're aiming for in this chapter
Creating the maze
Animating the cube
Setting up collision detection
Adding textures and improving the lighting
Adding trackball and keyboard controls
Chapter 4: Visualizing Audio Data with a Particle System
Visualizing the audio volume
Creating a particle system by hand
Customizing colors of individual particles
Combining dynamic colors to create advanced visualizations
Chapter 5: Programmatic Geometries
Creating a 3D terrain from scratch
Creating a city from scratch
Creating parametric trees
Chapter 6: Combining HTML and Three.js with CSS3DRenderer
Setting up a CSS3DRenderer skeleton
Creating an interactive 3D Google Maps cube
Animating HTML elements with TweenJS
Creating a parametric terrain using CSS sprites
Chapter 7: Loading and Animating External Models Using Blender
Installing Blender and the Three.js plugin
Exporting a model from Blender and showing it in Three.js
Using Blender's predefined materials in Three.js
Working with skeletal-based animations in Three.js
Working with morph-based animations in Three.js

What You Will Learn

  • Create standard skeletons and animation loops for Three.js projects that support WebGL and CSS3 3D
  • Use textures and materials to their fullest to enhance rendering of an object
  • Apply different types of lighting using the different light sources available
  • Animate geometries, particle systems, and HTML5 elements with Three.js and Tween.js
  • Create procedural and random geometries from scratch
  • Load geometries from external sources and work with Blender as a 3D modeling tool
  • Work with particle systems for advanced visualizations

In Detail

Create beautiful visualizations and 3D scenes using Three.js with this practical, example-rich book. Learn all the core concepts of Three.js, and whether you are targeting mobile devices or desktop browsers, you will gain the necessary skills to build a 3D application and improve web performance.

From setting up a development environment and creating your first Three.js scene, you will quickly dive into more complex scene-making. Discover a variety of possible scenes from how to make a rotating planet with data overlay to mini games. Through these examples, you will be shown an array of skills from using materials, controls, and lighting to creating particle systems and geometries from scratch.

By the end of this book, you'll be able to effectively and confidently create 3D scenes using different lights and materials, create visualizations using particle systems, animate web pages, and incorporate Blender in your 3D workflow.


Read More