Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const LIGHT_POSITION = 50;
- let light = new THREE.DirectionalLight(0xddffdd, 1);
- light.position.z = LIGHT_POSITION;
- light.position.y = -LIGHT_POSITION * 2;
- light.position.x = -LIGHT_POSITION;
- light.shadowCameraFov = 60;
- light.shadow.mapSize.x = 1024;
- light.shadow.mapSize.y = 1024;
- scene.add(light);
- let light2 = new THREE.DirectionalLight(0xffdddd, 1);
- light2.position.z = LIGHT_POSITION;
- light2.position.x = -LIGHT_POSITION;
- light2.position.y = LIGHT_POSITION * 2;
- light2.shadow.mapSize.x = 1024;
- light2.shadow.mapSize.y = 1024;
- scene.add(light2);
- let light4 = new THREE.AmbientLight(0xBBBBBB, 0.3);
- scene.add(light4);
- this.material = new THREE.MeshStandardMaterial({color: 0xffffff,
- morphTargets: true,
- morphNormals: true,
- roughness: 0.8,
- metalness: 0.3
- });
- this.model = new THREE.Mesh(this.geometry, this.material);
- this.model.castShadow = true;
- this.model.receiveShadow = true;
Add Comment
Please, Sign In to add comment