API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

T

typeGamepadButtonChannel

@codexo/exojs / input / stable

Branded literal-union type identifying a canonical button-style gamepad input channel. Members are absolute offsets into the engine's shared Float32Array input channel buffer (relative to slot 0): the 24 named buttons (`South`-`Paddle4`), computed as `ChannelOffset.Gamepads + 0..23` (512..535 with the default layout - `ChannelSize.Category = 256`, `Gamepads = 2 * Category = 512`). Offsets 24..31 of the button section are reserved in the channel buffer layout but deliberately excluded from this type: they carry no InputToken, so a binding built from one would type-check and read back with `InputSystem`/`Gamepad`, then throw a plain `Error` the moment it was serialized (`ActionMap.serializeBindings`) or checked for a conflict (`ActionMap.conflicts`). A custom `GamepadMapping` that genuinely needs one of those offsets has to say so with an explicit cast, which is the point - it opts into a channel this type otherwise refuses to hand out. The brand keeps the type system from confusing button channels with GamepadAxisChannel or raw `number`s during mapping authoring. User code does not construct values of this type directly - read them from the GamepadButton namespace (`GamepadButton.South`, ...).

0
props
0
methods
0
events
Import
import { GamepadButtonChannel } from '@codexo/exojs'

Branded literal-union type identifying a canonical button-style gamepad input channel. Members are absolute offsets into the engine's shared Float32Array input channel buffer (relative to slot 0): the 24 named buttons (`South`-`Paddle4`), computed as `ChannelOffset.Gamepads + 0..23` (512..535 with the default layout - `ChannelSize.Category = 256`, `Gamepads = 2 * Category = 512`).

Offsets 24..31 of the button section are reserved in the channel buffer layout but deliberately excluded from this type: they carry no InputToken, so a binding built from one would type-check and read back with `InputSystem`/`Gamepad`, then throw a plain `Error` the moment it was serialized (`ActionMap.serializeBindings`) or checked for a conflict (`ActionMap.conflicts`). A custom `GamepadMapping` that genuinely needs one of those offsets has to say so with an explicit cast, which is the point - it opts into a channel this type otherwise refuses to hand out.

The brand keeps the type system from confusing button channels with GamepadAxisChannel or raw `number`s during mapping authoring. User code does not construct values of this type directly - read them from the GamepadButton namespace (`GamepadButton.South`, ...).

Definition1
512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 & { [gamepadButtonChannelBrand]: void }
Source