AudioListener: setPosition() メソッド
Deprecated
Avoid using this feature in new projects.
The setPosition() and setOrientation() methods are equivalent to using an AudioListener instances's positionX, positionY, positionZ, forwardX, forwardY, forwardZ, upX, upY, and upZ properties.
This feature may be a candidate for removal from web standards or browsers.>
Consider using the following features instead: AudioListener.>
setPosition() は AudioListener インターフェイスのメソッドで、聞き手の位置を定義します。
3 つの引数 x, y, z には単位がなく、正しいデカルト座標系に従って 3D 空間におけるリスナーの位置を記述します。 PannerNode オブジェクトは空間化のために、個々の音声ソース関連のこの位置を使用します。
位置ベクトルの既定値は (0, 0, 0) です。
構文
js
setPosition(x, y, z)
引数
返値
なし (undefined)。
例
サンプルコードは BaseAudioContext.createPanner() を参照してください。
仕様書
| 仕様書 |
|---|
| Web Audio API> # dom-audiolistener-setposition> |