blob: b5dfb5707674a3f54a1e177ad5fc4861ca5aa744 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
---
title: GamepadHapticActuator.pulse()
slug: Web/API/GamepadHapticActuator/pulse
tags:
- API
- Experimental
- Gamepad
- Gamepad API
- GamepadHapticActuator
- Method
- Reference
- pulse
translation_of: Web/API/GamepadHapticActuator/pulse
---
<div>{{APIRef("Gamepad")}}{{SeeCompatTable}}</div>
<p>{{domxref("GamepadHapticActuator")}} インターフェイスの <strong><code>pulse()</code></strong> メソッドは、指定された期間、特定の強度でハードウェアパルスを作成します。</p>
<h2 id="構文">構文</h2>
<pre class="brush: js notranslate">gamepadHapticActuatorInstance.pulse(<em>value</em>, <em>duration</em>).then(function(result) { ... });</pre>
<h3 id="パラメータ">パラメータ</h3>
<dl>
<dt><em>value</em></dt>
<dd>パルスの強度を表す double 。これはハードウェアの型によって異なりますが、通常は 0.0 (強度なし) から 1.0 (完全な強度) の値を取ります。</dd>
<dt><em>duration</em></dt>
<dd>パルスの持続時間をミリ秒で表す double 。</dd>
</dl>
<div class="note">
<p><strong>Note</strong>: <code>pulse()</code> への繰り返しの呼び出しは、それらがまた進行中である場合、以前の呼び出しをオーバーライドします。</p>
</div>
<h3 id="返り値">返り値</h3>
<p>パルスが正常に完了したときに <code>true</code> の値で解決される promise 。</p>
<h2 id="例">例</h2>
<p>TBC</p>
<h2 id="仕様">仕様</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">仕様</th>
<th scope="col">ステータス</th>
<th scope="col">備考</th>
</tr>
<tr>
<td>{{SpecName('GamepadExtensions', '#dom-gamepadhapticactuator-pulse', 'pulse()')}}</td>
<td>{{Spec2('GamepadExtensions')}}</td>
<td>初回定義</td>
</tr>
</tbody>
</table>
<h2 id="ブラウザー実装状況">ブラウザー実装状況</h2>
<p>{{Compat("api.GamepadHapticActuator.pulse")}}</p>
<h2 id="関連項目">関連項目</h2>
<ul>
<li><a href="/ja/docs/Web/API/Gamepad_API">Gamepad API</a></li>
</ul>
|