AudioListener: setPosition() メソッド
非推奨;: この機能は非推奨になりました。まだ対応しているブラウザーがあるかもしれませんが、すでに関連するウェブ標準から削除されているか、削除の手続き中であるか、互換性のためだけに残されている可能性があります。使用を避け、できれば既存のコードは更新してください。このページの下部にある互換性一覧表を見て判断してください。この機能は突然動作しなくなる可能性があることに注意してください。
setPosition()
は AudioListener
インターフェイスのメソッドで、聞き手の位置を定義します。
3 つの引数 x
, y
, z
には単位がなく、正しいデカルト座標系に従って 3D 空間におけるリスナーの位置を記述します。 PannerNode
オブジェクトは空間化のために、個々の音声ソース関連のこの位置を使用します。
位置ベクトルの既定値は (0, 0, 0)
です。
構文
js
setPosition(x, y, z)
引数
返値
なし (undefined
)。
例
サンプルコードは BaseAudioContext.createPanner()
を参照してください。
仕様書
Specification |
---|
Web Audio API # dom-audiolistener-setposition |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
setPosition |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Deprecated. Not for use in new websites.
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.