Environment
模式模块主要做环境的管理
environment.setTime环境-设置时间设置时间
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
hour | string | 是 | 13 | — |
minute | string | 是 | 32 | — |
percentOfDay | string | 是 | 0 | 一天的百分比,大于0时hour/minute无效 可选值: hourminute |
调用
typescript
piclient.emit("environment.setTime",{
hour:15, //小时, 0-23
minute: 30, //分钟 0-59
percentOfDay: 0 //一天的百分比 0-1,大于0时hour/minute无效
})
environment.setWeather环境-设置天气设置天气
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
weather | string | 是 | 2 | 天气, 1-11 晴空万里/少云/多云/阴天/雾天/小雨/中雨/暴风雨/小雪/中雪/暴风雪 |
调用
typescript
piclient.emit("environment.setWeather",{
weather: "2" //天气, 1-11 晴空万里/少云/多云/阴天/雾天/小雨/中雨/暴风雨/小雪/中雪/暴风雪
})
environment.timePass环境-时间流逝时光流逝控制
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
timeSpeed | string | 是 | 1 | 0表示不流逝 |
调用
typescript
piclient.emit("environment.timePass",{
timeSpeed: "1", //0表示不流逝
})
environment.setPostProcessParam环境-设置后处理参数设置后处理参数
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
paramName | string | 是 | — | 生效的属性名 自动曝光,最小曝光,最大曝光,全局着色 |
paramValue | string | 是 | — | — |
motionBlurs | string | 是 | 0.5 | 运动模糊 |
saturation | string | 是 | 1.0 | 饱和度 |
contrast | string | 是 | 1.0 | 对比度 |
exposure | string | 是 | 1.0 | 自动曝光 |
minBrightness | string | 是 | -1.0 | 最小曝光 |
maxBrightness | string | 是 | 1.0 | 最大曝光 |
whiteBalance | string | 是 | 6500 | 白平衡 |
vignette | string | 是 | 0.4 | 暗角强度 |
colorGain | string | 是 | 1.0 | 全局着色 |
shadowContrast | string | 是 | 1.0 | 暗部对比度 |
lensFlare | string | 是 | 1.0 | 镜头光晕 |
LUT | string | 是 | FFFFFFFF | LUT |
ambientOcclusion | string | 是 | 0.5 | 环境光遮蔽 |
调用
typescript
piclient.emit("environment.setPostProcessParam",{
paramName: "", // 生效的属性名 自动曝光,最小曝光,最大曝光,全局着色
paramValue: "",
motionBlurs: "0.5", //运动模糊
saturation: "1.0", //饱和度
contrast: "1.0", //对比度
exposure: "1.0", //自动曝光
minBrightness: "-1.0", //最小曝光
maxBrightness: "1.0", //最大曝光
whiteBalance: "6500", //白平衡
vignette: "0.4", //暗角强度
colorGain: "1.0", //全局着色
shadowContrast: "1.0", //暗部对比度
lensFlare: "1.0", //镜头光晕
LUT: "FFFFFFFF", //LUT
ambientOcclusion: "0.5", //环境光遮蔽
})
environment.setWeatherParam环境-设置天气参数设置天气参数
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
Rain | string | 是 | 0.0 | 雨量 |
Snow | string | 是 | 0.0 | 雪量 |
WindDirection | string | 是 | 0.0 | 风向 |
WindIntensity | string | 是 | 0.0 | 雨量 |
CloudCoverage | string | 是 | 0.0 | 云彩密度 |
ThunderLightning | string | 是 | 0.0 | 雷电强度 |
Fog | string | 是 | 0.0 | 雾强度 |
调用
typescript
piclient.emit("environment.setWeatherParam",{
Rain: "0.0", //雨量
Snow: "0.0", //雪量
WindDirection: "0.0", //风向
WindIntensity: "0.0", //雨量
CloudCoverage: "0.0", //云彩密度
ThunderLightning: "0.0", //雷电强度
Fog: "0.0", //雾强度
})
environment.setSkyParam环境-设置天空参数设置天空参数
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
cloudAltitude | string | 是 | 0.6 | 云层高度 |
cloudSpeed | string | 是 | 0.07 | 云朵速度 |
cloudDirection | string | 是 | 1.0 | 云朵方向 |
cloudShadows | string | 是 | true | 云朵阴影 |
fogDensity | string | 是 | 0.001 | 雾密度 |
fogDistance | string | 是 | 1.0 | 雾范围 |
skyLightIntensity | string | 是 | 1 | 天光强度 |
sunLightIntensity | string | 是 | 5 | 日光强度 |
sunAngle | string | 是 | 0 | 日光角度 |
moonShadow | string | 是 | true | 月光阴影 |
moonLightIntensity | string | 是 | 0.12 | 月光强度 |
moonScale | string | 是 | 0.7 | 月亮大小 |
moonPhase | string | 是 | 0.0 | 月相 |
showStar | string | 是 | false | 显示星系 |
starsIntensity | string | 是 | 0.75 | 星光强度 |
starsTiling | string | 是 | 3 | 星星密度 |
调用
typescript
piclient.emit("environment.setSkyParam",{
cloudAltitude: "0.6", //云层高度
cloudSpeed: "0.07", //云朵速度
cloudDirection: "1.0", //云朵方向
cloudShadows: "true", //云朵阴影
fogDensity: "0.001", //雾密度
fogDistance: "1.0", //雾范围
skyLightIntensity: "1", //天光强度
sunLightIntensity: "5", //日光强度
sunAngle: "0", //日光角度
moonShadow: "true", //月光阴影
moonLightIntensity: "0.12", //月光强度
moonScale: "0.7", //月亮大小
moonPhase: "0.0", //月相
showStar: "false", //显示星系
starsIntensity: "0.75", //星光强度
starsTiling: "3", //星星密度
})
environment.setDisplayParam环境-设置显示参数设置显示参数
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
shadowDistance | string | 是 | 40000 | 阴影距离 |
POICullDistance | string | 是 | 0.0 | POI剔除距离 |