Capítulo 595 de 859
A Shadow Mesh that follows a shadow-casting mesh in the scene, but is confined to a single plane. This technique can be used as a very performant alternative to classic shadow mapping. However, it has serious limitations like:
const cubeShadow = new ShadowMesh( cube );
scene.add( cubeShadow );
Constructor
| Signature |
|---|
new ShadowMesh( mesh : Mesh ) |
Properties
| Property | Description |
|---|---|
.frustumCulled : boolean | Overwritten to disable view-frustum culling by default. |
.isShadowMesh : boolean (readonly) | This flag can be used for type testing. |
.matrixAutoUpdate : boolean | Overwritten to disable automatic matrix update. The local matrix is computed manually in ShadowMesh#update. |
.meshMatrix : Matrix4 | Represent the world matrix of the reference mesh. |
Methods
| Method | Description |
|---|---|
.update( plane : Plane, lightPosition4D : Vector4 ) | Updates the shadow mesh so it follows its shadow-casting reference mesh. |