Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Learning Three.js: The JavaScript 3D Library for WebGL - Second Edition
  • Toc
  • feedback
Learning Three.js: The JavaScript 3D Library for WebGL - Second Edition

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

By : Jos Dirksen
4.4 (14)
close
Learning Three.js: The JavaScript 3D Library for WebGL - Second Edition

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

4.4 (14)
By: Jos Dirksen

Overview of this book

If you know JavaScript and want to start creating 3D graphics that run in any browser, this book is a great choice for you. You don't need to know anything about math or WebGL; all that you need is general knowledge of JavaScript and HTML.
Table of Contents (14 chapters)
close
8
8. Creating and Loading Advanced Meshes and Geometries
13
Index

Summary

We talked about a lot of different postprocessing options in this chapter. As you saw, creating THREE.EffectComposer and chaining passes together is actually very easy. You just have to keep in mind a few things. Not all passes output to the screen. If you want to output to the screen, you can always use THREE.ShaderPass with THREE.CopyShader. The sequence in which you add passes to a composer is important. Effects are applied in that sequence. If you want to reuse the result from a specific THREE.EffectComposer instance, you can do this by using THREE.TexturePass. When you have more than one THREE.RenderPass in your THREE.EffectComposer, make sure to set the clear property to false. If not, you'll only see the output from the last THREE.RenderPass step. If you only want to apply an effect to a specific object, you can use THREE.MaskPass. When you're done with the mask, clear the mask with THREE.ClearMaskPass. Besides the standard passes provided by Three.js, there are...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete