One article to understand the texture map in Three.js

Yohoho
10 min readJun 7, 2023

Foreword

We’ve all been just fiddling around with a red cube for the previous lessons ~ time to add a little texture.
So what exactly is a texture, and what can we do with it?

What is a texture map?

Texture is the image covering the surface of the geometry, such as the red cube we are tired of seeing, with texture, it can immediately become a express packaging box.

But texture can do much more than replace color.
There are many different types of texture maps for different purposes, let’s take a look at them one by one:

  • Map :(ColorMap) A color map is the simplest way of mapping, applying each pixel on the image to the geometry.
  • Emissive Map:Self-illumination texture map, using a map with different shades of gray (grayscale map), used to describe which pixels on the material have self-illumination characteristics. It needs…

--

--

Yohoho

A frontend developer who want to learn more and more