mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-22 19:13:49 +01:00
3D geometry plane now has top and bottom material allowing different opacities
This commit is contained in:
parent
5c9416a05d
commit
4f07269f63
@ -107,12 +107,12 @@ class D3Panel extends React.Component {
|
|||||||
// this.grid.setColors(0xe0e0e0, 0xeeeeee);
|
// this.grid.setColors(0xe0e0e0, 0xeeeeee);
|
||||||
// this.scene.add(this.grid);
|
// this.scene.add(this.grid);
|
||||||
const geometryPlane = new THREE.PlaneGeometry(CANVAS_WIDTH, CANVAS_HEIGHT);
|
const geometryPlane = new THREE.PlaneGeometry(CANVAS_WIDTH, CANVAS_HEIGHT);
|
||||||
const materialPlane = new THREE.MeshBasicMaterial({
|
geometryPlane.merge(new THREE.PlaneGeometry(CANVAS_WIDTH, CANVAS_HEIGHT), undefined, 1);
|
||||||
color: 0xcccccc,
|
|
||||||
side: THREE.DoubleSide,
|
const materialPlane = new THREE.MultiMaterial([
|
||||||
transparent: true,
|
new THREE.MeshBasicMaterial({ color: 0xcccccc, side: THREE.BackSide, transparent: true, opacity: 0.3 }),
|
||||||
opacity: 0.5
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user