Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

day 0011

Move mouse to change view point
[project link](



Far in the clouds of north mountain, recluse chill and sing.
## learned today Feb 10th 2017

Practicing the shadow and multiplying objects in three js


This approach differs from older approaches in that instead of using approximations for the way in which light interacts with a surface, a physically correct model is used. The idea is that, instead of tweaking materials to look good under specific lighting, a material can be created that will react 'correctly' under all lighting scenarios.
In practice this gives a more accurate and realistic looking result than the MeshLambertMaterial or MeshPhongMaterial, at the cost of being somewhat more computationally expensive.

shadow in three js

Shadows are disabled by default
renderer need to be enabled shadow
mesh objects, plane use ShadowMaterial
PointLight set to be able to cast shadow
need to setClearColor instead of using default black


 renderer.shadowMap.enabled = true;
 renderer.shadowMap.type = THREE.PCFSoftShadowMap;

 pointLight.castShadow = true;
 pointLight.shadow.mapSize.width = 1024;
 pointLight.shadow.mapSize.height = 1024;

 shapeOne.castShadow = true;
 shapeOne.receiveShadow = true;

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.