components/game-feedback
Type Aliases
Section titled “Type Aliases”FeedbackKind
Section titled “FeedbackKind”FeedbackKind =
"confirm"|"deny"|"hit"|"gain"
What happened: an order taken, an order refused, a hit, or something gained.
FeedbackLayerProps
Section titled “FeedbackLayerProps”FeedbackLayerProps =
HTMLAttributes<HTMLDivElement> > &object
Props accepted by FeedbackLayer.
Type Declaration
Section titled “Type Declaration”paused?
Section titled “paused?”
optionalpaused?:boolean
Freeze every mark where it is, e.g. while the game is paused.
FeedbackMarkProps
Section titled “FeedbackMarkProps”FeedbackMarkProps =
Omit<HTMLAttributes<HTMLDivElement>>,"children"> > &object
Props accepted by FeedbackMark.
Type Declaration
Section titled “Type Declaration”kind:
FeedbackKind
x:
number
Anchor in layer pixels.
y:
number
label?
Section titled “label?”
optionallabel?:ReactNode
A short note, such as the host’s refusal reason.
amount?
Section titled “amount?”
optionalamount?:number
A floating number, drawn signed in outlined pixel numerals.
optionallife?:number
Total life in milliseconds; the host removes the mark when it ends.
FeedbackWordTone
Section titled “FeedbackWordTone”FeedbackWordTone =
"impact"|"gun"|"mech"|"wet"|"quiet"|"bite"
A generic feedback tone: game-neutral, so any cartridge can author with it.
bite is for a creature’s bite, not any one game’s monster.
FeedbackWordSize
Section titled “FeedbackWordSize”FeedbackWordSize =
"s"|"m"|"l"|"xl"
Named display sizes for game feedback words.
FeedbackWordAccent
Section titled “FeedbackWordAccent”FeedbackWordAccent =
"jaw"
A two-phase accent that plays alongside the word: jaw claps two wedges shut
once, then eases back open.
FeedbackWordMarkProps
Section titled “FeedbackWordMarkProps”FeedbackWordMarkProps =
Omit<HTMLAttributes<HTMLDivElement>>,"children"> > &object
Props accepted by FeedbackWordMark.
Type Declaration
Section titled “Type Declaration”text:
string
Comic lettering, at most 12 characters (e.g. “CRUNCH”, “BLAM”).
x:
number
Anchor in layer pixels; the word sits bottom-centre above this point.
y:
number
optionaltone?:FeedbackWordTone
optionalsize?:FeedbackWordSize
accent?
Section titled “accent?”
optionalaccent?:FeedbackWordAccent
optionallife?:number
Total life in milliseconds; the host removes the mark when it ends.
Variables
Section titled “Variables”FeedbackLayer
Section titled “FeedbackLayer”
constFeedbackLayer:ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> > &object&RefAttributes<HTMLDivElement>>>>
A click-through overlay for game feedback, placed over the world by the host. Marks inside it are positioned in the layer’s own pixels.
FeedbackMark
Section titled “FeedbackMark”
constFeedbackMark:ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>>,"children"> > &object&RefAttributes<HTMLDivElement>>>>
One piece of game feedback at a point: a stepped flash ring, an optional floating number and an optional note. Reduced motion keeps the ring and note still and only fades them.
FeedbackWordMark
Section titled “FeedbackWordMark”
constFeedbackWordMark:ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>>,"children"> > &object&RefAttributes<HTMLDivElement>>>>
One comic sound word at a point: punchy lettering that pops in with a little overshoot, drifts up, and fades. Reduced motion keeps it still at full strength until the host removes it.