· Code · 1 min read
Learning Three.js, week one
Sample post: the first scene, the first bug, and why everything was black.
My first scene was a single sphere, and it was completely black. I had a material that needs light, and no light.
Adding one directional light fixed it. Adding an environment map made it look like it belonged somewhere.
scene.add(new THREE.DirectionalLight("#fff3e3", 1.3));
Filed under Code · Newer: Notes from the field → · Older: On spiders →