aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/window/devicemotion_event/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/api/window/devicemotion_event/index.html')
-rw-r--r--files/ja/web/api/window/devicemotion_event/index.html78
1 files changed, 78 insertions, 0 deletions
diff --git a/files/ja/web/api/window/devicemotion_event/index.html b/files/ja/web/api/window/devicemotion_event/index.html
new file mode 100644
index 0000000000..e17af6d8b2
--- /dev/null
+++ b/files/ja/web/api/window/devicemotion_event/index.html
@@ -0,0 +1,78 @@
+---
+title: 'Window: devicemotion イベント'
+slug: Web/API/Window/devicemotion_event
+tags:
+ - API
+ - Device Orientation API
+ - Sensors
+ - events
+translation_of: Web/API/Window/devicemotion_event
+---
+<p>{{APIRef}}</p>
+
+<p><span class="seoSummary"><code>devicemotion</code> イベントは、一定の間隔で発行され、その時点で端末が受けている加速度の物理的な力の量を示します。また、利用可能であれば、回転率に関する情報も提供します。</span></p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row">バブリング</th>
+ <td>いいえ</td>
+ </tr>
+ <tr>
+ <th scope="row">キャンセル</th>
+ <td>不可</td>
+ </tr>
+ <tr>
+ <th scope="row">インターフェイス</th>
+ <td>{{domxref("DeviceMotionEvent")}}</td>
+ </tr>
+ <tr>
+ <th scope="row">イベントハンドラープロパティ</th>
+ <td>{{domxref("Window.ondevicemotion")}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Examples" name="Examples">例</h2>
+
+<pre class="brush: js notranslate">function handleMotionEvent(event) {
+
+    var x = event.accelerationIncludingGravity.x;
+    var y = event.accelerationIncludingGravity.y;
+    var z = event.accelerationIncludingGravity.z;
+
+    // Do something awesome.
+}
+
+window.addEventListener("devicemotion", handleMotionEvent, true);
+</pre>
+
+<h2 id="Specifications" name="Specifications">仕様書</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">仕様書</th>
+ <th scope="col">状態</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName("Device Orientation", "#devicemotion", "DeviceMotion event")}}</td>
+ <td>{{Spec2("Device Orientation")}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+
+<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div>
+
+<p>{{Compat("api.Window.devicemotion_event")}}</p>
+
+<h2 id="See_also" name="See_also">関連情報</h2>
+
+<ul>
+ <li>{{domxref("Window/deviceorientation_event", "deviceorientation")}}</li>
+ <li><a class="external" href="http://www.w3.org/TR/orientation-event/#devicemotion">DeviceOrientation Event</a></li>
+</ul>