melee library

Classes

CrackLine
StoneColors
Swing
A swing: a circle of radius r around (cx, cy), squashed to sy across its plane.

Properties

clawSwipeEffect → SimulatedEffect
final
daggerFlurryEffect → SimulatedEffect
final
doubleSlashEffect → SimulatedEffect
final
hammerSmashEffect → SimulatedEffect
final
heavyCleaveEffect → SimulatedEffect
final
meleeEffects → List<PixelEffect>
final
scytheReapEffect → SimulatedEffect
final
spearSweepEffect → SimulatedEffect
final
spinSlashEffect → SimulatedEffect
final
swordSlashEffect → SimulatedEffect
final
thrustEffect → SimulatedEffect
final
uppercutEffect → SimulatedEffect
final
whipCrackEffect → SimulatedEffect
final

Functions

along(List<Point2> pts, double len, void fn(double x0, double y0, double x1, double y1, double d)) → void
Part of a polyline: the first len px of it.
cracks(Rng r, double x0, int n, double reach, [double depth = 7.0, double bias = 0.3]) → List<CrackLine>
Jagged cracks splitting the floor from x0.
glowAlong(Painter p, Swing s, double r, double u0, double u1, double rad, int c, double k, {double kFn(double u)?, int half = 0, double step = 0.35}) → void
Glow riding a swing from u0 to u1.
onSwing(Swing s, double r, double u) → Point2
The screen point at plane radius r, u radians along the swing.
plane(Swing s, double x, double y) → Point2
The plane radius and angle under a screen point (inverts onSwing, cone included).
rock(Painter p, DebrisBit b, StoneColors st) → void
A tumbling rock (a Bits CHUNK): a lit side, a shaded side, an outline, fading at the end of its life.
shavings(Particles ps, Rng r, Swing s, int n, List<int> colors, [double from = 0.3]) → void
Shavings flung off a slash's edge, outward from its circle.
slash(Painter p, Swing s, double t, [int half = 0]) → void
A slash crescent along swing s (Sprite Fusion's recipe).
slashEnd(Swing s) → SwingPoint
Where a slash's edge ends up, and which way it's travelling there.
sliver(Painter p, double x, double y, double a, double r, double arc, int c, double k) → void
A thin arc flying out from (x, y).
smear(Painter p, Swing s, double u0, double u1, double wMax, void fn(double u, double r, ShadeOut out, double a), {int half = 0, double pad = 1.0}) → void
Shade a swing's band from u0 to u1.
star(Painter p, double x, double y, List<Spike> spikes, double sc, double th, int core, int body, int inner, int rim) → void
An impact star (after Sprite Fusion's impact): tapered spikes around (x, y).
stone(Object col) → StoneColors
Stone shades for rocks, grit and dust from one body color.
swingTravel(Swing s, double u) → SwingPoint
The on-screen unit direction the swing travels at u, and the in-plane angle there.
through(double x, double y, double th, double dir, double r, double span, {double at = 0.55, double sy = 1.0, double rot = 0.0, double k = 0.0, double w = 0.0, double t0 = 0.0, double sweep = 0.0, double hold = 0.0, double trail = 0.0, List<int> ramp = const [], double hot = 0.0, bool lens = false}) → Swing
A swing on radius r whose arc passes through (x, y) heading along angle th.
trace(Painter p, Swing s, double r, double u0, double u1, int c, double a, {int cFn(double u)?, double aFn(double u)?, int half = 0, double step = 0.6}) → void
Dots along a swing at plane radius r from u0 to u1.

Typedefs

Spike = ({double a, double len, double w})
SwingPoint = ({double a, double dx, double dy, double x, double y})