learning-threejs icon indicating copy to clipboard operation
learning-threejs copied to clipboard

Typos in Chapter 1

Open justintemps opened this issue 5 years ago • 0 comments

I've come across two typos in Chapter 1 so far.

  1. On page 26
  var spotLight = new THREE.SpotLight(0xFFFFFF);
  spotLight.position.set(-40, 40, -15);
  spotLight.castShadow = true;
  spotLight.shadow.mapSize = new THREE.Vector2(1024, 1024);
  spotLight.shadow.camera.far = 130;
  spotLight.shadow.camera.near = 40;

This won't work without scene.add(spotLight);

  1. On page 27
  renderer.setClearColor(new THREE.Color(0x000000));
  renderer.setSize(window.innerWidth, window.innerHeight);
  renderer.shadowMap.Enabled = true;

should be renderer.shadowMap.enabled

justintemps avatar Sep 11 '19 20:09 justintemps