Description

Assigns the accelerometer

Usage

Parameters

  • callback {Function}

    Callback function called with "deviceorientation" listener. 3 parameters :

    • x : Direction side to side
    • y : Vertically oriented front-back
    • z : Front and rear horizontal orientation

Example

canvas.Input.accelerometer(function(x, y, z) {

});

Discussion