This version of the documentation is outdated!
Click here for the latest released version.
accelerometerSuccess
提供的 onSuccess 回呼函數 Acceleration
的資訊。
function(acceleration) {
// Do something
}
參數
- 加速度: 在時間中的某一時刻的加速度。(加速度)
示例
function onSuccess(acceleration) {
alert('Acceleration X: ' + acceleration.x + '\n' +
'Acceleration Y: ' + acceleration.y + '\n' +
'Acceleration Z: ' + acceleration.z + '\n' +
'Timestamp: ' + acceleration.timestamp + '\n');
};