大网数据广告活动
Web 标准与前端开发

PannerNode: orientationY property

· 52CE 我爱测

The **`orientationY`** property of the PannerNode interface indicates the Y (vertical) component of the direction the audio source is facing, in 3D Cartesian coordinate space.

Web Audio API

The orientationY property of the PannerNode interface indicates the Y (vertical) component of the direction the audio source is facing, in 3D Cartesian coordinate space.

The complete vector is defined by the position of the audio source, given as (PannerNode.positionX, PannerNode.positionY, PannerNode.positionZ), and the orientation of the audio source (that is, the direction in which it's facing), given as (PannerNode.orientationX, orientationY, PannerNode.orientationZ).

Depending on the directionality of the sound (as specified using the attributes PannerNode.coneInnerAngle, PannerNode.coneOuterAngle, and PannerNode.coneOuterGain), the orientation of the sound may alter the perceived volume of the sound as it's being played. If the sound is pointing toward the listener, it will be louder than if the sound is pointed away from the listener.

The AudioParam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its AudioParam.value property.

Value

An AudioParam whose value is the Y component of the direction the audio source is facing, in 3D Cartesian coordinate space.

Examples

See PannerNode.orientationX for example code that demonstrates the effect on volume of changing the PannerNode orientation parameters in combination with PannerNode.coneInnerAngle and PannerNode.coneOuterAngle.

Specifications

Browser compatibility

See also

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。