Skip to content
pixi-silk
GitHub repository
Function

fan

import { fan } from 'pixi-silk/glow';
function fan(
   x: number, 
   y: number, 
   angle: number, 
   spread: number, 
   length: number, 
   count: number, 
   width?: number
): Ray[];

count rays fanning out from (x, y) around angle (radians), spread radians wide in all, each length long. Neighbouring rays touch at their ends. width is the total width at the start, shared between the rays (default 0, a point). Pair with spectrum for the colours.

Parameters#

ParameterTypeDefault value
xnumberundefined
ynumberundefined
anglenumberundefined
spreadnumberundefined
lengthnumberundefined
countnumberundefined
widthnumber0

Returns#

Ray[]