How to use the DirectionalLightShadow function from three
Find comprehensive JavaScript three.DirectionalLightShadow code examples handpicked from public code repositorys.
GitHub: Neticon/webgl-tests

27 28 29 30 31 32 33 34 35
const ambientLight = new THREE.AmbientLight(0xffffff, 1) scene.add(ambientLight) const directionalLight = new THREE.DirectionalLight(0xffffff, 1) directionalLight.shadow = new THREE.DirectionalLightShadow(camera) directionalLight.castShadow = true directionalLight.position.y = 5 scene.add(directionalLight)
+ 5 other calls in file
three.Vector3 is the most popular function in three (22341 examples)