PacktLib: Learning Three.js: The JavaScript 3D Library for WebGL

Learning Three.js: The JavaScript 3D Library for WebGL

Credits

About the Author

Acknowledgement

About the Reviewers

www.PacktPub.com

Preface

Creating Your First 3D Scene with Three.js

Requirements for using Three.js

Getting the source code

Creating an HTML skeleton page

Rendering and viewing a 3D object

Adding materials, lights, and shadows

Expanding your first scene with animations

Using the dat.GUI library to make experimenting easier

Using the ASCII effect

Summary

Working with the Basic Components That Make Up a Three.js Scene

Creating a scene

Working with the Geometry and Mesh objects

Using the available cameras for different uses

Summary

Working with the Different Light Sources Available in Three.js

Exploring the lights provided by Three.js

Learning about the basic lights

Summary

Working with the Three.js Materials

Understanding the common material properties

Starting with the simple Mesh materials (basic, depth, and face)

Learning about the advanced materials

Using the materials for a line geometry

Summary

Learning to Work with Geometries

The basic geometries provided by Three.js

Summary

Using Advanced Geometries and Binary Operations

ConvexGeometry

LatheGeometry

Create a geometry by extruding

Creating 3D text

Using binary operations to combine meshes

Summary

Particles and the Particle System

Understanding particles

Particles, the particle system, and the BasicParticleMaterial

Styling particles with the HTML5 canvas

Using textures to style particles

Creating a particle system from an advanced geometry

Summary

Creating and Loading Advanced Meshes and Geometries

Geometry grouping and merging

Summary

Animations and Moving the Camera

Basic animations

Working with the camera

Morphing and skeletal animation

Creating animations using external models

Summary

Loading and Working with Textures

Using textures in materials

Advanced usage of textures

Summary

Custom Shaders and Render Post Processing

Setting up the post processing

Post processing passes

Creating custom post processing shaders

Summary

Adding Physics to Your Scene with Physijs

Creating a basic Three.js scene ready for Physijs

Material properties

Basic supported shapes

Using constraints to limit movement of objects

Summary

Index