Quick Reference
Checks (True / False) 2
| isMode() | Whether it is mode. |
| isActionNode() | Whether it is action node. |
Updating & Drawing 10
| drawCrosshair() | The crosshair at the middle of a size square. |
| drawVitals() | Vitals at the origin. |
| drawWeapon() | The weapon at the origin: its picture and name above, the magazine's count large over the magazine drawn as a… |
| drawHotbar() | The hotbar at the origin: one framed slot per skill or item, its icon, its key at the top left, its cost at t… |
| drawTarget() | The aimed or locked opponent at the origin: its name over its HP bar; a locked one sits between brackets. |
| drawWorldBar() | One bar over an opponent in the world, at the origin (rate 0 to 1); an alerted one wears a mark above its lef… |
| drawLockMarker() | The mark on the locked opponent: four corners of a square size wide. |
| drawDamageArc() | Where a hit came from: an arc on a ring size wide, drawn pointing up (the game turns it toward the hit). |
| drawVignette() | The low-HP edge: the screen's rim tinted, its middle clear. |
| drawInfo() | Action Text at the origin: the objective, or the notices newest first (lines: [{ text, color }]). |
Other 15
| defaultProps() | What a new node of a type starts as. |
| normalizeProps() | A stored node's own settings, every value in range (missing ones at their defaults). |
| label() | Label. |
| boundId() | The id System binds as a mode's HUD (0: none of its own, the mode's stock layout plays). |
| mix() | A 32-bit mix of whole numbers: what a node shows, folded into one number to compare against the last drawing. |
| crossState() | The crosshair's state as whole numbers: { gap, onTarget, hit, kill, aiming, reload (0-12, 0 none), sprinting,… |
| crossKey() | Cross key. |
| vitalsLayout() | Vitals: [portrait], the name with the states beside it, HP large, MP and TP side by side under it. |
| hotbarLayout() | Where the hotbar's slots sit: out.size, out.x0, out.y, out.step. |
| vignetteAlpha() | How strong the low-HP edge is (0 to 1) at an HP rate, for a node's threshold. |
| keyName() | A key as a key cap shows it: the digit or letter, or the key's short name. |
| hotbarKeys() | The key each hotbar slot answers to, from a key map ({ code: name }, the game's Input.keyMapper). |
| stockNodes() | Stock nodes. |
| stockRecord() | A mode's stock HUD as a whole record (what a project with none of its own gets, and what Stock Layout builds). |
| sampleHud() | Sample hud. |
Checks (True / False)
isMode
static sourceA.isMode(mode)
Whether it is mode.
isActionNode
static sourceA.isActionNode(type)
Whether it is action node.
Updating & Drawing
drawCrosshair
static sourceA.drawCrosshair(ctx, size, node, state)
The crosshair at the middle of a size square.
drawVitals
static sourceA.drawVitals(ctx, width, height, node, hud, unit, theme)
Vitals at the origin.
Details
Vitals at the origin. unit is a unit view of the player (the Tactical
HUD's: face, model, state icons). Returns false while a picture loads.
drawWeapon
static sourceA.drawWeapon(ctx, width, height, node, hud, theme, extra)
The weapon at the origin: its picture and name above, the magazine's count large over the magazine drawn as a bar (round by round when it is small), and for a blade its combo's steps.
Details
The weapon at the origin: its picture and name above, the magazine's
count large over the magazine drawn as a bar (round by round when it
is small), and for a blade its combo's steps. While it reloads the bar
fills. The number beside the name ("2/3") is the weapon's place in the
switching order, hud.weapon.index, so it changes with each switch.
(No reserve is drawn: the battle keeps no reserve ammunition, and the
"Reserve" setting went with it; a stored showReserve is ignored.)
extra: { steps, picture, carried: [iconIndex], switching }, the
carried weapons in the switching order.
drawHotbar
static sourceA.drawHotbar(ctx, width, height, node, hud, theme, extra)
The hotbar at the origin: one framed slot per skill or item, its icon, its key at the top left, its cost at the bottom right, a shade that drains from the top while it cools down; one that cannot be used is dimmed.
Details
The hotbar at the origin: one framed slot per skill or item, its icon,
its key at the top left, its cost at the bottom right, a shade that
drains from the top while it cools down; one that cannot be used is
dimmed. extra: { keys: [text], costs: [text], costColors: [css] }.
drawTarget
static sourceA.drawTarget(ctx, width, height, node, hud, theme)
The aimed or locked opponent at the origin: its name over its HP bar; a locked one sits between brackets.
drawWorldBar
static sourceA.drawWorldBar(ctx, width, height, node, rate, alerted)
One bar over an opponent in the world, at the origin (rate 0 to 1); an alerted one wears a mark above its left end.
drawLockMarker
static sourceA.drawLockMarker(ctx, size, color)
The mark on the locked opponent: four corners of a square size wide.
drawDamageArc
static sourceA.drawDamageArc(ctx, size, color)
Where a hit came from: an arc on a ring size wide, drawn pointing up (the game turns it toward the hit).
drawVignette
static sourceA.drawVignette(ctx, width, height, color)
The low-HP edge: the screen's rim tinted, its middle clear.
Details
The low-HP edge: the screen's rim tinted, its middle clear. Drawn small once and stretched.
drawInfo
static sourceA.drawInfo(ctx, width, height, node, hud, theme, lines)
Action Text at the origin: the objective, or the notices newest first (lines: [{ text, color }]).
Other
defaultProps
static sourceA.defaultProps(type)
What a new node of a type starts as.
normalizeProps
static sourceA.normalizeProps(source, type)
A stored node's own settings, every value in range (missing ones at their defaults).
label
static sourceA.label(node, key)
Label.
boundId
static sourceA.boundId(system, mode)
The id System binds as a mode's HUD (0: none of its own, the mode's stock layout plays).
mix
static sourceA.mix(hash, value)
A 32-bit mix of whole numbers: what a node shows, folded into one number to compare against the last drawing.
crossState
static sourceA.crossState(hud, sprinting, out)
The crosshair's state as whole numbers: { gap, onTarget, hit, kill, aiming, reload (0-12, 0 none), sprinting, ranged }.
crossKey
static sourceA.crossKey(state)
Cross key.
vitalsLayout
static sourceA.vitalsLayout(node, width, height)
Vitals: [portrait], the name with the states beside it, HP large, MP and TP side by side under it.
hotbarLayout
static sourceA.hotbarLayout(node, width, height, count, out)
Where the hotbar's slots sit: out.size, out.x0, out.y, out.step.
Details
Where the hotbar's slots sit: out.size, out.x0, out.y, out.step.
vignetteAlpha
static sourceA.vignetteAlpha(node, hp, mhp)
How strong the low-HP edge is (0 to 1) at an HP rate, for a node's threshold.
keyName
static sourceA.keyName(code)
A key as a key cap shows it: the digit or letter, or the key's short name.
hotbarKeys
static sourceA.hotbarKeys(mapper, count, out)
The key each hotbar slot answers to, from a key map ({ code: name }, the game's Input.keyMapper).
stockNodes
static sourceA.stockNodes(mode, metrics)
Stock nodes.
stockRecord
static sourceA.stockRecord(mode, metrics)
A mode's stock HUD as a whole record (what a project with none of its own gets, and what Stock Layout builds).
sampleHud
static sourceA.sampleHud(data, options)
Sample hud.