lightning library

Classes

BoltPath
BoltTree

Constants

plasmaSparks → const List<String>
voltPalette → const List<String>

Properties

ballLightningEffect → PureEffect
final
chainLightningEffect → SimulatedEffect
final
chargeUpEffect → SimulatedEffect
final
electrifiedEffect → PureEffect
final
kLightningSoot → int
final
kLightningSoot2 → int
final
lightningEffects → List<PixelEffect>
final
lightningStrikeEffect → SimulatedEffect
final
plasmaBallEffect → PureEffect
final
sparkArcEffect → PureEffect
final
stormCloudEffect → PureEffect
final
teslaCoilEffect → PureEffect
final
thunderclapEffect → SimulatedEffect
final
zapHitEffect → SimulatedEffect
final

Functions

bendBolt(BoltTree b, Point2 fn(double x, double y)) → BoltTree
boltStroke(Painter p, BoltTree b, double k, List<int> c, [double s = 1.0, bool hero = false, double light = 0.5, double a = 1.0, double core = 0.0, double? minY]) → void
boltStrokeWith(Painter p, BoltTree b, double k, List<int> c, {double s = 1.0, bool hero = false, double light = 0.5, double a = 1.0, double core = 0.0, double? minY, double? upTo}) → void
bowed(Rng r, double x0, double y0, double x1, double y1, double bow, [double jag = 0.22, double forks = 0.4]) → BoltTree
crackle(Painter p, BoltTree b, double k, List<int> c, [double glowK = 0.5, double a = 1.0]) → void
frameRng(int seed, int f, [int salt = 0]) → Rng
heatColor(double t) → int
jsRound(double v) → int
lightningFlight(double x, double y, double vx, double vy, double age, {double g = 0.45, double drag = 2.2, double floor = double.infinity, double bounce = 0.45}) → (double, double, double, double)
lightningPuff(Painter p, double x, double y, double size, double u, int c) → void
lightningScorch(Painter p, double cx, double cy, double rx, double t0, [double fade = 1.0, double? ry]) → void
lightningSpark(Painter p, double x, double y, double vx, double vy, double k, List<int> s) → void
traceBolt(Painter p, List<Point2> pts, int c, [double a = 1.0, int from = 0, int? to]) → void
zigzag(Rng r, double x0, double y0, double x1, double y1, [double jag = 0.32, double forks = 0.35, double w = 1.0, int depth = 0]) → BoltTree