change rendering

This commit is contained in:
casperlamboo 2017-12-05 11:10:31 +01:00
parent 95ba0cfeb1
commit d2c70f3b2f

View File

@ -28,14 +28,19 @@ export function createScene(canvas, props, state) {
const camera = new THREE.PerspectiveCamera(50, 1, 1, 10000); const camera = new THREE.PerspectiveCamera(50, 1, 1, 10000);
camera.position.set(0, 400, 300); camera.position.set(0, 400, 300);
const directionalLight = new THREE.DirectionalLight(0xd5d5d5); const directionalLightA = new THREE.DirectionalLight(0xa2a2a2);
directionalLight.position.set(1, 1, 1); directionalLightA.position.set(1, 1, 1);
scene.add(directionalLight); scene.add(directionalLightA);
const light = new THREE.AmbientLight(0x808080); const directionalLightB = new THREE.DirectionalLight(0xa2a2a2);
directionalLightB.position.set(-1, 1, -1);
scene.add(directionalLightB);
const light = new THREE.AmbientLight(0x656565);
scene.add(light); scene.add(light);
const mesh = new THREE.Mesh(geometry, new THREE.MeshStandardMaterial({ color: 0x2194ce, side: THREE.DoubleSide })); const material = new THREE.MeshPhongMaterial({ color: 0x2194ce, side: THREE.DoubleSide, specular: 0xaaaaaa, shininess: 10 });
const mesh = new THREE.Mesh(geometry, material);
placeOnGround(mesh); placeOnGround(mesh);
scene.add(mesh); scene.add(mesh);