Skip to content
pixi-silk
GitHub repository
Function

bolt

import { bolt } from 'pixi-silk/glow';
function bolt(
   g: SilkGraphics, 
   x: number, 
   y: number, 
   w: number, 
   h: number
): SilkGraphics;

Adds a lightning bolt filling the box (x, y, w, h) to g as one polygon and returns g. Fill it once and blur, spread and inner shadows treat it as a single shape.

Parameters#

ParameterType
gSilkGraphics
xnumber
ynumber
wnumber
hnumber

Returns#

SilkGraphics