@modoki/engine / index / InputSource
Interface: InputSource
Input
name
readonlyname:string
attach()
attach():
void
Begin listening / polling. Idempotent — safe to call when already attached.
Returns
void
detach()
detach():
void
Stop listening and drop any latched state. Idempotent.
Returns
void
reset()?
optionalreset():void
Drop latched state WITHOUT detaching. Called when the input gate closes, so a key held at that moment can't keep driving the game. Optional; a stateless source (one that derives everything in sample) needs none.
Returns
void
sample()
sample(
out):void
Merge this source's contribution into out (OR held flags, add axes, set lastDevice on activity). Never clears another source's contribution.
Parameters
out
Returns
void