Summary
We will now end this chapter on textures. As you've seen, there are a lot of different kinds of textures available in Three.js, each with a different use. You can use any image in the PNG, JPG, GIF, TGA, DDS, PVR, TGA, KTX, EXR, or RGBE format as a texture. Loading these images is done asynchronously, so remember to either use a rendering loop or add a callback when you load a texture. With the different types of textures available, you can create great-looking objects from low-poly models.
With Three.js, it is also easy to create dynamic textures, using either the HTML5 canvas element or the video element. Just define a texture with these elements as the input, and set the needsUpdate property to true whenever you want the texture ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access