Skip to content

Mesh.castShadow

Summary

Mesh.castShadow reads the current castShadow value from this Mesh instance. Use it to inspect runtime state without mutating resources.

Syntax

Mesh.castShadow: boolean
const value = mesh.castShadow;

Parameters

This API does not take parameters.

Returns

boolean - Boolean result indicating whether the queried condition is satisfied.

Type Details

// No additional descriptor expansion is required for this signature.

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.castShadow;
console.log(value);

See Also