Logo Mibo

AdaptiveInput Module

Builds the adaptive ActionState subscription shared by the backend input mappers.

Functions and values

Function or value Description

subscribe attachDeltas actions

Full Usage: subscribe attachDeltas actions

Parameters:
    attachDeltas : (ActionState<'Action> -> unit) -> IDisposable - Subscribes to the input deltas and invokes the callback with each newly built ActionState; the returned disposable detaches.
    actions : cval<ActionState<'Action>> - The root the merged states are written into.

Returns: AdaptiveSub
Type parameters: 'Action (requires comparison)

Builds an AdaptiveSub from a function that subscribes to input deltas. Every state built from an input delta is written into the root at the step boundary, before Update, with the edges merged (see ActionState.mergeEdges); the consumed edges are cleared after Update, before the frame is forced. So Update reads each edge exactly once, and the next step starts from an empty edge set. The after-update clear goes through an internal member of the posting surface; it is not part of the public contract.

attachDeltas : (ActionState<'Action> -> unit) -> IDisposable

Subscribes to the input deltas and invokes the callback with each newly built ActionState; the returned disposable detaches.

actions : cval<ActionState<'Action>>

The root the merged states are written into.

Returns: AdaptiveSub

Type something to start searching.