From the course: Learning 3D Graphics on the Web with Three.js
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Adding fog to the scene - JavaScript Tutorial
From the course: Learning 3D Graphics on the Web with Three.js
Adding fog to the scene
- [Instructor] For this video, I'll be getting rid of the animations that I have added previously. So inside the update function, I will be getting rid of the animations on the plane objects, and I will be getting rid of the scale animation on every object that I have in the scene. Additionally I will get rid of the positioning that I have on the plane objects, and I will again add the box inside the scene object instead of the plane object. Basically I'm removing most of the animation and changes that I have done in the previous video. Let's see if everything is working as expected inside Chrome. Perfect. Everything looks static right now. As mentioned earlier the scene objects inherits properties from the object 3-D class. It only has a few properties of its own. One of those properties is the fog property. Fog property allows the scene to fade off to a given color. It's a visual property that can somewhat enhance the aesthetic quality of the scene, depending on the style you are…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.