August 2018
Intermediate to advanced
528 pages
10h 58m
English
The last property we'll discuss for the scene is overrideMaterial. When you use this property, all the objects in the scene will use the material that is set to the overrideMaterial property and ignore the material that is set on the object itself. This is useful when you've got a large set of objects in the scene that all share the same material and material properties. This will improve performance since Three.js only has to manage this single material. In practice, though, you won't often need to use this property.
Use it like this:
scene.overrideMaterial = new THREE.MeshLambertMaterial({color: 0xffffff});
Upon using the overrideMaterial property, as shown in the preceding code, the scene will be rendered ...
Read now
Unlock full access