Code

Three.js

Materials

Intermediate Five materials compared on identical spheres — Basic (no lighting), Normal, Lambert, Phong, and Standard (PBR). Three.js Docs

Basic🌈NormalLambertPhongStandard
// Lighting required for shaded materials
scene.add(new THREE.AmbientLight(0xffffff, 0.3));
const dir = new THREE.DirectionalLight(0xffffff, 2);
dir.position.set(4, 6, 5);
scene.add(dir);

const sphereGeo = new THREE.SphereGeometry(0.48, 64, 64);

const materials = [
  new THREE.MeshBasicMaterial({ color: 0xef4444 }),
  new THREE.MeshNormalMaterial(),
  new THREE.MeshLambertMaterial({ color: 0x22d3ee }),
  new THREE.MeshPhongMaterial({
    color: 0xf59e0b,
    shininess: 120
  }),
  new THREE.MeshStandardMaterial({
    color: 0xa855f7,
    metalness: 0.3,
    roughness: 0.35
  }),
];

materials.forEach((mat, i) => {
  const mesh = new THREE.Mesh(sphereGeo, mat);
  mesh.position.x = (i - 2) * 1.1;
  scene.add(mesh);
});