Added an eyeball

This commit is contained in:
Joshua Seigler 2018-10-10 01:45:33 -04:00
parent 2eeebe06e8
commit 8ffe124402
15 changed files with 381 additions and 16 deletions

View file

@ -0,0 +1,26 @@
export function createLight() {
var lightGeometry = new THREE.SphereGeometry(0.1);
var lightMaterial = new THREE.MeshStandardMaterial({
emissive: 0xffffee,
emissiveIntensity: 1,
color: 0x000000
});
var light = new THREE.PointLight(0xffffff, 1, 20, 2);
light.power = 50;
light.castShadow = true;
light.shadow.mapSize.width = 512;
light.shadow.mapSize.heigth = 512;
light.shadow.radius = 1.5;
light.add(new THREE.Mesh(lightGeometry, lightMaterial));
light.position.set(0, 5, 3);
return light;
}
export function createHemisphereLight() {
return new THREE.HemisphereLight(0x303F9F, 0x111111, 3);
}