shadowOffset
The coordinate a shadow reads the child's silhouette from: distance away in the compass direction angle.
shadowOffset(opts: {angle: ArgSpec; distance: ArgSpec}): (params: RttFilterParams) => Expr
Import effects from shaders/std and use effects.blurs.shadowOffset.
angle is in degrees, 0 up, 90 right, 180 down. distance (0–1) is a fraction of the canvas height and covers the same number of pixels in either axis. Pass the result as the at of silhouetteCoverage.
Parameters
| Name | Type | Notes |
|---|---|---|
opts | {angle: ArgSpec; distance: ArgSpec} |
Example
silhouetteCoverage({at: shadowOffset({angle: p('angle'), distance: p('distance')}), blur: p('blur')})
See also
silhouetteCoverage— A soft copy of the child's alpha silhouette: a number per pixel from 0 to 1.shadowComposite— A tinted shadow behind the child.