Capítulo 91 de 859
This material can receive shadows, but otherwise is completely transparent.
const geometry = new THREE.PlaneGeometry( 2000, 2000 );
geometry.rotateX( - Math.PI / 2 );
const material = new THREE.ShadowMaterial();
material.opacity = 0.2;
const plane = new THREE.Mesh( geometry, material );
plane.position.y = -200;
plane.receiveShadow = true;
scene.add( plane );
Constructor
| Signature |
|---|
new ShadowMaterial( parameters : Object ) |
Properties
| Property | Description |
|---|---|
.color : Color | Color of the material. |
.fog : boolean | Whether the material is affected by fog or not. |
.isShadowMaterial : boolean (readonly) | This flag can be used for type testing. |
.transparent : boolean | Overwritten since shadow materials are transparent by default. |