deadzone2()
Radial deadzone: below dz is zero, above it rescales so the edge still reaches 1.
function deadzone2(
x: number,
y: number,
dz: number
): [number, number];Defined in: engine/src/input/core.ts:199
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
dz | number |
Returns
[number, number]
createInput()
Create the input for one surface, usually the canvas. Make one per surface and build everything else on it; dispose() removes every listener at once. DOM-only in practice, though the targets and clocks can be injected (see InputOptions) to drive it headlessly.
makeActions()
Bind named actions to keys, gamepad and on-screen controls. Sources are strings: key:<KeyboardEvent.code>, pad:<PadButton> (0..1), pad:<PadAxis> (-1..1), touch:<id> (a makeTouchControls control; a joystick adds <id>.x and <id>.y), and a trailing + or - for one half of a signed source. Screen and...