Skip to content
pixi-silk
GitHub repository
Function

shadowStack

import { shadowStack } from 'pixi-silk/glow';
function shadowStack(
   color?: ColorSource, 
   stack?: [number, number][], 
   alpha?: number
): GlowLayer[];

Stacked additive shadows behind a shape, as in CSS. Each [blur, spread] pair uses the CSS blur radius, which is twice the gaussian sigma. The default stack is [8, 0], [32, 8] and [128, 32] in white at alpha 0.6.

Parameters#

ParameterTypeDefault value
colorColorSource0xffffff
stack[number, number][]...
alphanumber0.6

Returns#

GlowLayer[]