Mesh.receiveShadow¶
Summary¶
Mesh.receiveShadow controls whether this mesh's supported standard-material render path samples enabled directional shadow maps. It defaults to true; setting it does not enable shadows by itself.
Syntax¶
Parameters¶
This API does not take parameters.
Returns¶
boolean - Whether the mesh receives supported directional shadows.
Type Details¶
Example¶
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const geometry = wgpu.geometry.box(1, 1, 1);
const material = wgpu.material.unlit({ color: [0.9, 0.6, 0.2], opacity: 1.0 });
const mesh = wgpu.createMesh(geometry, material);
const value = mesh.receiveShadow;
console.log(value);