Drop Shadow
Adds a soft shadow under an object.
Node id effect/drop-shadow
The Drop Shadow node outputs a copy of object with a shadow under it: a
copy of its shape, moved by dx and dy, blurred by blur and painted
in color (default black at 50 %).
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | T | — | generic |
| dx | number | 4 | |
| dy | number | 4 | |
| blur | number | 4 | |
| color | Color | { r: 0, g: 0, b: 0, a: 0.5 } |
Outputs
| Name | Type | Notes |
|---|---|---|
| object | T | generic |
Behaviour
- Settings.
dxanddy(default 4) move the shadow right and down.blur(default 4) is how soft its edge is: the shadow fades out over about three times that distance.coloris any color, its alpha included. - In the object's units. The offset and blur scale and rotate with the object: a scaled-up copy has a bigger shadow.
- Chains. Effect nodes apply in order, each to the result of the ones before: Blur then Drop Shadow casts the shadow of the blurred object, Drop Shadow then Blur blurs the object and its shadow.
- Groups. On a group, one shadow is cast by the whole group.
- Bounds. The shadow isn't part of the object's bounding box.
- Keeps the type and copies, like the other effect nodes.
- SVG only. The preview and Download SVG draw it, as standard SVG filters that vector editors such as Inkscape also show.
Errors
blurmust be 0 or more; every setting must be a finite number.objectmust be a renderable. Its pin is generic, so other values connect but fail here.
Example
A rectangle with a drop shadow (dx = 20, dy = 20, blur = 12).