mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-22 19:13:49 +01:00
update rendering
This commit is contained in:
parent
4d87604a2c
commit
726127323c
@ -89,12 +89,9 @@ class D3Panel extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
createScene() {
|
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.scene = new EventScene(this.renderer.domElement);
|
||||||
|
|
||||||
this.camera = new Camera(50, 1, 1, 10000);
|
this.camera = new Camera(50, 1, 1, 10000);
|
||||||
|
|
||||||
this.scene.add(this.camera);
|
this.scene.add(this.camera);
|
||||||
|
|
||||||
// this.grid = new THREE.GridHelper(200, 20);
|
// this.grid = new THREE.GridHelper(200, 20);
|
||||||
|
2
src/d3/createScene.js
vendored
2
src/d3/createScene.js
vendored
@ -35,7 +35,7 @@ export default function createScene(state, canvas) {
|
|||||||
plane.name = 'bed-plane';
|
plane.name = 'bed-plane';
|
||||||
scene.add(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);
|
const directionalLight = new THREE.PointLight(0xffffff, 0.6);
|
||||||
camera.add(directionalLight);
|
camera.add(directionalLight);
|
||||||
|
Loading…
Reference in New Issue
Block a user