Import
ShadowMesh is an addon, and must be imported explicitly, see Installation#Addons.
import { ShadowMesh } from 'three/addons/objects/ShadowMesh.js';
Constructor
new ShadowMesh( mesh : Mesh )
Constructs a new shadow mesh.
| mesh |
The shadow-casting reference mesh. |
Properties
.frustumCulled : boolean
Overwritten to disable view-frustum culling by default.
Default is false.
- Overrides: Mesh#frustumCulled
.isShadowMesh : boolean (readonly)
This flag can be used for type testing.
Default is true.
.matrixAutoUpdate : boolean
Overwritten to disable automatic matrix update. The local matrix is computed manually in ShadowMesh#update.
Default is false.
- Overrides: Mesh#matrixAutoUpdate
.meshMatrix : Matrix4
Represent the world matrix of the reference mesh.
Methods
.update( plane : Plane, lightPosition4D : Vector4 )
Updates the shadow mesh so it follows its shadow-casting reference mesh.
| plane |
The plane onto the shadow mesh is projected. |
| lightPosition4D |
The light position. |