O'Reilly logo

Learning Three.js: The JavaScript 3D Library for WebGL by Jos Dirksen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Starting with the simple Mesh materials (basic, depth, and face)

In this section we'll look at a couple of simple Mesh materials: MeshBasicMaterial, MeshDepthMaterial, MeshNormalMaterial, and MeshFaceMaterial. We will start with the MeshBasicMaterial.

The MeshBasicMaterial for simple surfaces

The MeshBasicMaterial is a very simple material that doesn't take lighting into account. Meshes with this material will be rendered as simple flat polygons, and you've also got the option to show the geometry's wireframe. Besides the common properties that we saw in the earlier section on this material, we can set the following properties:

Name

Description

color

This sets the color of the material.

wireframe

This property renders the material as a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required