Skip to content
ImagineWorld

Learn Three.js

node_idnode-book_learn-three-js
node_typenode-book
schema_profileworld.node_book.v1
statusactive
orthogonal_scopemanifold, entropy, authority, state
manifoldworld
entropymedium
authorityinforms
stateexternal
domainimagineworld.net
node_interiorrosetta_contract
unisonone evidence claim read five ways: seated in the graphics field, the work teaches Three.js — 3D graphics for the web, built scene by scene — its framework, regime, and stance agreeing on what it is
governed_byWORLD-MANIFOLD
constitutional_citationCONSTITUTION
peer_node_books
book_titleLearn Three.js
book_authorJos Dirksen
book_publisherPackt Publishing
book_year2023
total_chapters14
updated_at2026-10-14T05:45:16Z
book_copyrightCopyright © 2023 Packt Publishing
book_isbn9781803233871
local graph

node-book_learn-three-js_chapter-01-creating-your-first-3d-scene-with-three-js — Creating Your First 3D Scene with Three.js

node-book_learn-three-js_chapter-02-the-basic-components-that-make-up-a-three-js-application — The Basic Components that Make up a Three.js Application

node-book_learn-three-js_chapter-03-working-with-light-sources-in-three-js — Working with Light Sources in Three.js

node-book_learn-three-js_chapter-04-working-with-three-js-materials — Working with Three.js Materials

node-book_learn-three-js_chapter-05-learning-to-work-with-geometries — Learning to Work with Geometries

node-book_learn-three-js_chapter-06-exploring-advanced-geometries — Exploring Advanced Geometries

node-book_learn-three-js_chapter-07-points-and-sprites — Points and Sprites

node-book_learn-three-js_chapter-08-creating-and-loading-advanced-meshes-and-geometries — Creating and Loading Advanced Meshes and Geometries

node-book_learn-three-js_chapter-09-animations-and-moving-the-camera — Animations and Moving the Camera

node-book_learn-three-js_chapter-10-loading-and-working-with-textures — Loading and Working with Textures

node-book_learn-three-js_chapter-11-render-postprocessing — Render Postprocessing

node-book_learn-three-js_chapter-12-adding-physics-and-sounds-to-your-scene — Adding Physics and Sounds to Your Scene

node-book_learn-three-js_chapter-13-working-with-blender-and-three-js — Working with Blender and Three.js

node-book_learn-three-js_chapter-14-three-js-together-with-react-typescript-and-web-xr — Three.js Together with React, TypeScript, and Web-XR

Three.js has become the standard way of creating stunning 3D WebGL content over the last couple of years. In this edition, we’ll look at all the features of Three.js and provide additional content on how to integrate Three.js with Blender, React, TypeScript, and the newest physics engine.

In this book, you’ll learn how to create and animate immersive 3D scenes directly in your browser using the full potential of WebGL and modern browsers.

The book starts with the basic concepts and building blocks used in Three.js and helps you explore these essential topics in detail through extensive examples and code samples. You’ll also learn how to create realistic-looking 3D objects using textures and materials. Besides creating these objects manually, we’ll also explain how to load existing models from an external source. Next, you’ll understand how to easily control the camera using the Three.js built-in camera controls, which will enable you to fly or walk around the 3D scene you’ve created. Later chapters will then show you how to use the HTML5 video and canvas elements as materials for your 3D objects and animate your models. You will learn how to use morph and skeleton-based animation, before understanding how to add physics, such as gravity and collision detection, to your scene. Finally, we’ll explain how to combine Blender with Three.js, how to integrate Three.js with React and TypeScript, and how you can use Three.js to create VR and AR scenes.

By the end of this book, you’ll have gained the skills you need to create 3D-animated graphics using Three.js.

This book is for JavaScript developers who are looking to learn how to use the Three.js library confidently.

Chapter 1, Creating Your First 3D Scene with Three.js, introduces the Three.js library, explains how to set up your development environment, and shows how to create your first application.

Chapter 2, The Basic Components that Make up a Three.js Application, explains the core concepts behind Three.js and introduces the basic components you’ll need for each Three.js application.

Chapter 3, Working with Light Sources in Three.js, goes through all the available light sources you can use in Three.js to add lights to your Three.js scenes.

Chapter 4, Working with Three.js Materials, shows an overview of the different materials you can use when creating the objects you’re visualizing with Three.js.

Chapter 5, Learning to Work with Geometries, explains which basic geometries are provided with Three.js and how you can use and customize them.

Chapter 6, Exploring Advanced Geometries, goes into detail explaining the advanced geometries provided by Three.js.

Chapter 7, Points and Sprites, describes how you can create and manipulate a large number of points and sprites on the screen, and how to change what these points look like.

Chapter 8, Creating and Loading Advanced Meshes and Geometries, gives examples and instructions on how to group and merge objects together, and how to load existing models from external sources.

Chapter 9, Animations and Moving the Camera, talks about the different camera controls provided by Three.js, and explains how animations work in Three.js and how to load animations from external sources.

Chapter 10, Loading and Working with Textures, gives an overview of the different types of textures that are available in Three.js, and how you can use them to configure the Three.js materials.

Chapter 11, Render Postprocessing, describes how you can add post-rendering effects such as blur, bloom, and colorify to your scene.

Chapter 12, Adding Physics and Sounds to Your Scene, introduces the Rapier physics library, which allows you to have objects interact with each other simulating the real world. This chapter also shows how you can add positional sound to your scenes.

Chapter 13, Working with Blender and Three.js, provides information on how you can integrate Blender with Three.js, exchange models, and use Blender to bake specific textures.

Chapter 14, Three.js Together with React, TypeScript, and Web-XR, shows how you can combine Three.js with React and TypeScript, and gives an overview of the support Three.js has for the Web-XR standard to create VR and AR scenes.

You don’t need to know much before starting with this book. The only requirement is that you have some basic knowledge of JavaScript. This book provides instructions on how to set up your development environment, install any additional tools and libraries, and run the examples.

Software covered in the bookOperating system requirements
Three.js r147Windows, macOS, or Linux

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “You can do these steps yourself, or look in the three-ts folder and just run yarn install there to skip this setup.”

A block of code is set as follows:

import './style.css'
import { initThreeJsScene } from './threeCanvas'
const mainElement = document.querySelector<HTMLDivElement>('#app')
if (mainElement) {
initThreeJsScene(mainElement)
}

Any command-line input or output is written as follows:

$ git --version
git version 2.30.1 (Apple Git-130)

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “For this, we need to create a new debug configuration from the Run | Edit Configurations menu.”

Tips or important notes

Appear like this.


Source: