shadow
library
Enums
PuffKind
Puff kinds: flame (cooling down a ramp) or soot (dark smoke lit on one side).
Constants
kVoidPalette
→ const List <String >
Dark magic, dark to bright: void black, deep violet, a white-lilac edge.
Functions
attractParticles (List <SimParticle > list , double x , double y , double G , double reach , double swirl , double r0 , double dt , [double w (SimParticle q )?, double vmax = double.infinity ])
→ int
Pull SimParticles toward (x, y) with softened gravity, swirl and drag.
attractPuffs (List <Puff > list , double x , double y , double G , double reach , double swirl , double r0 , double dt , [double w (Puff q )?, double vmax = double.infinity ])
→ int
Pull Puff s toward (x, y) with softened gravity, swirl and drag.
floorPool (Painter p , List <int > C , double rx , double t , List <PoolRipple > ripples )
→ void
A dark pool opened in the floor, seen at a slant.
halo (Painter p , num x , num y , num r0 , num r1 , int col , num k )
→ void
A ring of light hugging a black disc: k at radius r0, falling to
nothing at r1, and none inside r0.
inStar (double x , double y , double cx , double cy , double L , double rot , [double q = 0.42 ])
→ bool
Is (x, y) inside a four-point star at (cx, cy), arms L long, turned rot?
q < 1 hollows the sides into thin spikes.
ringFast (Painter p , num x , num y , num r , num w , int c , [double a = 1.0 ])
→ void
A ring from radius r - w out to r round (x, y), visiting only the
band's own pixels so a big thin shock ring stays cheap.
ringFastFn (Painter p , num x , num y , num r , num w , int cFn (double v , double ang ), [double a = 1.0 , double aFn (double v , double ang )? ])
→ void
Variant of ringFast accepting dynamic color and/or alpha callbacks (v, ang).
ringLight (Painter p , num x , num y , num R , num w , int col , num k , [bool keep (double x , double y )? ])
→ void
Light hugging a circle of radius R at (x, y), falling off over w
either side, only where keep returns true.
shard (Painter p , DebrisBit b , List <int > C , double lx , double ly , double lk )
→ void
An obsidian shard from core DebrisBit.
unlight (Painter p , num x0 , num y0 , num x1 , num y1 , bool dark (double x , double y ), [double keep = 0 ])
→ void
Take the light back off every pixel in a local box where dark is true,
keeping a share keep (0..1): call it last, so black shapes stay black
under every glow, spark and ring drawn before.