API reference

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

C

classBindingProfile

@codexo/exojs / input / stable

A player's rebindings, as the persistable delta against the developer's defaults. A profile stores ONLY the actions a player actually changed. That is the whole point of keeping it separate from the defaults: a full snapshot taken today would freeze every action a game gains tomorrow at whatever binding it had - or lacked - when the save was written, so adding a new action with a new default would silently do nothing for returning players. A profile holds no reference to any live action or map. Apply it with ActionMap.applyProfile, which validates it against the map's actual actions and applies it as one transaction.

2
props
6
methods
0
events
Import
import { BindingProfile } from '@codexo/exojs'

A player's rebindings, as the persistable delta against the developer's defaults.

A profile stores ONLY the actions a player actually changed. That is the whole point of keeping it separate from the defaults: a full snapshot taken today would freeze every action a game gains tomorrow at whatever binding it had - or lacked - when the save was written, so adding a new action with a new default would silently do nothing for returning players.

A profile holds no reference to any live action or map. Apply it with ActionMap.applyProfile, which validates it against the map's actual actions and applies it as one transaction.

Constructors1
new(): BindingProfile
Methods6
clear(): this
Drop every override.
reset(action: string): this
Drop action's override so it falls back to its developer default.
Snapshot suitable for JSON.stringify. Contains tokens only - no gamepad slots, no device indices.
fromJSON(data: unknown): BindingProfile
Rebuild a profile from toJSON output (or from JSON.parse of it). Structure is validated here; individual tokens are validated when the profile is applied to a map, since only the map knows which action kind each entry has to fit.
Properties2
names: readonly string[]
Names of the overridden actions, in insertion order.
size: number
Number of actions this profile overrides.
Source