update multi material

This commit is contained in:
casperlamboo 2017-12-07 16:21:40 +01:00
parent f2c409de0d
commit a5bc50deb0

View File

@ -96,10 +96,10 @@ class D3Panel extends React.Component {
const geometryPlane = new THREE.PlaneGeometry(CANVAS_WIDTH, CANVAS_HEIGHT); const geometryPlane = new THREE.PlaneGeometry(CANVAS_WIDTH, CANVAS_HEIGHT);
geometryPlane.merge(new THREE.PlaneGeometry(CANVAS_WIDTH, CANVAS_HEIGHT), undefined, 1); geometryPlane.merge(new THREE.PlaneGeometry(CANVAS_WIDTH, CANVAS_HEIGHT), undefined, 1);
const materialPlane = new THREE.MultiMaterial([ const materialPlane = [
new THREE.MeshBasicMaterial({ color: 0xcccccc, side: THREE.BackSide, transparent: true, opacity: 0.3 }), new THREE.MeshBasicMaterial({ color: 0xcccccc, side: THREE.BackSide, transparent: true, opacity: 0.3 }),
new THREE.MeshBasicMaterial({ color: 0xcccccc, side: THREE.FrontSide, transparent: true, opacity: 0.1 }) new THREE.MeshBasicMaterial({ color: 0xcccccc, side: THREE.FrontSide, transparent: true, opacity: 0.1 })
]); ];
this.plane = new THREE.Mesh(geometryPlane, materialPlane); this.plane = new THREE.Mesh(geometryPlane, materialPlane);
this.plane.rotation.x = Math.PI / 2; this.plane.rotation.x = Math.PI / 2;
this.plane.position.y = -0.01; this.plane.position.y = -0.01;