1681-engine / pixel / PixelMarks
Class: PixelMarks<T> ​
Defined in: src/pixel/PixelMarks.ts:41
Aim and target marks in the world's own pixels: rings, discs and ground ellipses painted once per size and tone and only moved after that, and aim lines as a row of chevrons from a pool — a chevron is repainted only when its heading, size or tone changes. Lines are chevrons, never a solid lane: a solid line of world pixels at most angles is a staircase and reads as broken, while each chevron is crisp at any angle. The drawing side of AimGesture and TargetLock. Each frame: begin, place what the frame needs, then end, which hides whatever was shown last frame and not this one.
Type Parameters ​
| Type Parameter | Default type |
|---|---|
T extends string | string |
Constructors ​
Constructor ​
new PixelMarks<T>(stage, options): PixelMarks<T>;Defined in: src/pixel/PixelMarks.ts:54
Parameters ​
| Parameter | Type |
|---|---|
stage | Stage |
options | PixelMarksOptions<T> |
Returns ​
PixelMarks<T>
Methods ​
begin() ​
begin(): void;Defined in: src/pixel/PixelMarks.ts:66
Returns ​
void
chevrons() ​
chevrons(
now,
x,
y,
angle,
start,
end,
size,
tone
): void;Defined in: src/pixel/PixelMarks.ts:113
An aim line from (x, y) along angle, from start to end px out: chevrons size px across every spacing, creeping forward with now, and a larger one at the end.
Parameters ​
| Parameter | Type |
|---|---|
now | number |
x | number |
y | number |
angle | number |
start | number |
end | number |
size | number |
tone | T |
Returns ​
void
destroy() ​
destroy(): void;Defined in: src/pixel/PixelMarks.ts:142
Returns ​
void
disc() ​
disc(
x,
y,
r,
tone
): void;Defined in: src/pixel/PixelMarks.ts:84
A filled disc of radius r with a bright rim and a cross at its middle: where a skill aimed at a spot lands.
Parameters ​
| Parameter | Type |
|---|---|
x | number |
y | number |
r | number |
tone | T |
Returns ​
void
end() ​
end(): void;Defined in: src/pixel/PixelMarks.ts:133
Returns ​
void
groundRing() ​
groundRing(
x,
y,
rx,
ry,
tone
): void;Defined in: src/pixel/PixelMarks.ts:97
A ring on the ground in three-quarter view, rx wide and ry deep, centred on (x, y) — a body's feet.
Parameters ​
| Parameter | Type |
|---|---|
x | number |
y | number |
rx | number |
ry | number |
tone | T |
Returns ​
void
pointer() ​
pointer(
x,
y,
angle,
dist,
size,
tone
): void;Defined in: src/pixel/PixelMarks.ts:128
One still chevron dist px out from (x, y) along angle: the way the next blow goes. Unlike chevrons it does not creep, so an arrow always under the feet does not keep catching the eye.
Parameters ​
| Parameter | Type |
|---|---|
x | number |
y | number |
angle | number |
dist | number |
size | number |
tone | T |
Returns ​
void
ring() ​
ring(
x,
y,
r,
tone
): void;Defined in: src/pixel/PixelMarks.ts:73
A ring of radius r round (x, y): the bright line with dark pixels just inside and outside it.
Parameters ​
| Parameter | Type |
|---|---|
x | number |
y | number |
r | number |
tone | T |
Returns ​
void