fix(docs): fix MeshLoader constructor and Fence doc references
This commit is contained in:
40
docs/api/components/audio-source-component/set-3d-params.md
Normal file
40
docs/api/components/audio-source-component/set-3d-params.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Set3DParams
|
||||
|
||||
**所属类**: `AudioSourceComponent`
|
||||
|
||||
**头文件**: `XCEngine/Components/AudioSourceComponent.h`
|
||||
|
||||
**描述**: 设置音频源的3D音频参数。
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
void Set3DParams(const Audio::Audio3DParams& params);
|
||||
```
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `params` | `const Audio::Audio3DParams&` | 3D音频参数引用,包含多普勒等级、扩散角度、混响混合等 |
|
||||
|
||||
## 使用示例
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/AudioSourceComponent.h>
|
||||
|
||||
using namespace XCEngine::Components;
|
||||
|
||||
void Setup3DParams(AudioSourceComponent* source) {
|
||||
Audio::Audio3DParams params;
|
||||
params.dopplerLevel = 1.0f; // 正常多普勒效应
|
||||
params.spread = 0.0f; // 点声源
|
||||
params.reverbZoneMix = 1.0f; // 最大混响混合
|
||||
source->Set3DParams(params);
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [AudioSourceComponent](./audio-source-component.md) - 音频源组件
|
||||
- [Get3DParams](./get-3d-params.md) - 获取3D参数
|
||||
Reference in New Issue
Block a user