Atlas Engine
API Referenceatlasatlas/input

AxisTrigger

Axis binding built from mouse motion, four directional keys, or one or two controller axes.

Module: atlas/input

Axis binding built from mouse motion, four directional keys, or one or two controller axes.

Declaration

export class AxisTrigger { ... }

Properties

type

type: AxisTriggerType;

positiveX

positiveX: Trigger;

negativeX

negativeX: Trigger;

positiveY

positiveY: Trigger;

negativeY

negativeY: Trigger;

controllerId

controllerId?: number;

controllerAxisSingle

controllerAxisSingle: boolean;

axisIndex

axisIndex?: number;

axisIndexY

axisIndexY: number;

isJoystick

isJoystick: boolean;

Methods

fromMouse

Creates an axis binding driven by mouse motion.

static fromMouse(): AxisTrigger;

fromKeys

Creates a two-axis binding; arguments are positive X, negative X, positive Y, then negative Y.

static fromKeys(
            positiveX: Key,
            negativeX: Key,
            positiveY: Key,
            negativeY: Key,
        ): AxisTrigger;

fromControllerAxis

Binds a controller axis or pair; single selects one axis, otherwise axisIndexY supplies the second axis.

static fromControllerAxis(
            controllerId: number,
            axisIndex: number,
            single: boolean,
            axisIndexY?: number,
        ): AxisTrigger;

On this page