# Function: occlusion()

[**lifecycle-kit**](https://jonbogaty.com/lifecycle-kit/api/readme/index.md)

***

[lifecycle-kit](https://jonbogaty.com/lifecycle-kit/api/readme/index.md) / [assemblage](https://jonbogaty.com/lifecycle-kit/api/assemblage/readme/index.md) / occlusion


# Function: occlusion() {#function-occlusion}


> **occlusion**(`receiver`, `casters`, `light`): `number`

Defined in: [assemblage/shadow.ts:200](https://github.com/jbcom/lifecycle-kit/blob/074e4e7b8038d3e2de9eb44c4b5b5aee0ef02b48/src/assemblage/shadow.ts#L200)

How much of a receiver is covered by the casters in front of it, 0..1.

Only parts strictly NEARER than the receiver cast onto it. Equal depth means
the same plane, and a plane cannot shadow itself — that is what the depth
band separation from `assemble` is for, and it is why repetitions of one
part are given distinct bands rather than sharing one.

The displacement grows with the depth gap, which is the parallax that sells
the separation: a limb well in front of a body throws its shadow further
across that body than a shell sitting just proud of it does. Displacement is
along the direction the light TRAVELS, because that is where a silhouette
lands.

Coverage from multiple casters is combined as independent occluders rather
than summed, so two limbs over the same patch of body deepen the shadow
without it ever exceeding total coverage. Summing would let three limbs
report 150% coverage and clamp, losing the difference between "mostly
covered" and "utterly buried".


## Parameters {#parameters}



### receiver {#receiver}


[`Caster`](https://jonbogaty.com/lifecycle-kit/api/assemblage/interfaces/caster/index.md)


### casters {#casters}


readonly [`Caster`](https://jonbogaty.com/lifecycle-kit/api/assemblage/interfaces/caster/index.md)[]


### light {#light}


[`Light`](https://jonbogaty.com/lifecycle-kit/api/assemblage/interfaces/light/index.md)


## Returns {#returns}


`number`
