แชร์ผ่าน


Accelerometer (Experimental)

A sensor control that maps the devices accelerometer of the client device (if available) to a specfied set of axes.

Warning

The accelerometer control is currently available for use in experimental form and may change behavior based on early adopter feedback.

Properties

type - "accelerometer"

axis - object or array. A single axis or array of axes that describe the mapping of this touchpad control.

Remarks

Warning

The accelerometer control may not be available on all devices that support touch layouts.

The accelerometer control can be used to provide an optimized experience on devices that can provide accelerometer support.

Samples

Map the acceleration of the device to the right joystick's Y axis, using a specified sensitivity.
{
    "type": "accelerometer",
    "axis": {
        "input": "axisY",
        "output": "rightJoystick",
        "sensitivity": 3.5
    },
}

Requirements

Layout Version: 1.0+