update rendering

This commit is contained in:
casperlamboo 2017-11-23 14:19:05 +01:00
parent 4d87604a2c
commit 726127323c
2 changed files with 2 additions and 5 deletions

View File

@ -89,12 +89,9 @@ class D3Panel extends React.Component {
}
createScene() {
this.renderer = new THREE.WebGLRenderer({ alpha: true, antialias: true, preserveDrawingBuffer: true });
this.renderer = new THREE.WebGLRenderer({ alpha: true, antialias: true });
this.scene = new EventScene(this.renderer.domElement);
this.camera = new Camera(50, 1, 1, 10000);
this.scene.add(this.camera);
// this.grid = new THREE.GridHelper(200, 20);

View File

@ -35,7 +35,7 @@ export default function createScene(state, canvas) {
plane.name = 'bed-plane';
scene.add(plane);
const renderer = new THREE.WebGLRenderer({ preserveDrawingBuffer: true, canvas });
const renderer = new THREE.WebGLRenderer({ canvas, alpha: true });
const directionalLight = new THREE.PointLight(0xffffff, 0.6);
camera.add(directionalLight);