API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceGamepadAxisOptions
@codexo/exojs / input / stable
Construction options for a GamepadAxis.
5
props
0
methods
0
events
Import
import { GamepadAxisOptions } from '@codexo/exojs'Construction options for a GamepadAxis.
Properties5
bipolar?: booleanUse a symmetric (absolute-value) deadzone that preserves sign, instead of the one-sided value > threshold check used for unipolar 0..1 axes. Used for aggregate signed channels (LeftStickX, LeftStickY, ...) that need the full [-1, +1] range, with values on either side of zero passing once past threshold. Default false.
invert?: booleanNegate the raw value before further processing. Default false.
normalize?: booleanConvert from bipolar [-1, +1] to unipolar [0, 1] via (v + 1) / 2. Used for direction-split channels where each direction reads 0..1. Default false.
pair?: numberRaw Gamepad.axes[] index of the axis this one forms a 2D stick with - the Y index on an X axis and vice versa. Set on both halves of a stick so the deadzone is evaluated on the pair's radius instead of each axis on its own; see GamepadAxis.transformValue. Leave unset for a control with no second dimension (a trigger reported through axes[], a standalone auxiliary axis).
threshold?: numberDeadzone radius, 0..1. Input at or below it reads as 0; input past it is rescaled so the channel still ramps from 0 to full travel rather than jumping straight to the deadzone magnitude. Default 0.2.
Source