Gamepad: vibrationActuator プロパティ
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
非標準: この機能は標準ではなく、標準化の予定もありません。公開されているウェブサイトには使用しないでください。ユーザーによっては使用できないことがあります。実装ごとに大きな差があることもあり、将来は振る舞いが変わるかもしれません。
vibrationActuator
は Gamepad
インターフェイスの読み取り専用プロパティで、このコントローラーで利用できる触覚フィードバックハードウェアを表す GamepadHapticActuator
オブジェクトを返します。
値
GamepadHapticActuator
オブジェクトです。
例
js
const gamepad = navigator.getGamepads()[0];
gamepad.vibrationActuator.playEffect("dual-rumble", {
startDelay: 0,
duration: 200,
weakMagnitude: 1.0,
strongMagnitude: 1.0,
});
仕様書
Specification |
---|
Gamepad # dom-gamepad-vibrationactuator |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
vibrationActuator |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.