O'Reilly logo

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

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Loading and Working with Textures

In Chapter 4, Working with Three.js Materials, we've introduced you to the various materials that are available in Three.js. In that chapter, however, we didn't talk about applying textures to meshes yet. In this chapter, we'll look at that subject. More specifically in this chapter, we'll discuss the following topics:

  • Loading textures in Three.js and applying them to a mesh
  • Using bump and normal maps to apply depth and detail to a mesh
  • Creating fake shadows using a light map
  • Adding detailed reflection to a material using an environment map
  • Using a specular map to set the 'shininess' of specific parts of the mesh
  • Fine tuning the mapping with customizing the UV mapping of a mesh
  • Using the HTML5 canvas and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required