EnvironmentModel

用于管理环境气象相关的数据和逻辑,包括光照和天气控制

关系

Implements

EnvironmentModel Implements IEnvironmentModel

实现接口: IEnvironmentModel

用于管理环境气象相关的数据和逻辑,包括光照和天气控制

构造函数

EnvironmentModel

构造函数

new EnvironmentModel(props)

参数

返回:EnvironmentModel EnvironmentModel对象

属性

isCurrentWeather

是否启用实时天气

isCurrentWeather: boolean

类型: boolean

props

模型属性配置

props: IEnvironmentModelProps

sceneBackgroundColor

此时场景的背景颜色

sceneBackgroundColor: string

类型: string

time

当前时间字符串

time: string

类型: string

wetaher

天气配置对象

wetaher: Weather

类型: Weather

方法

closeLiveWeather

关闭实时天气功能

closeLiveWeather(): void

返回:void

getCurrentWeather

根据当前时间设置实时天气

getCurrentWeather(hourly): void

参数

  • hourly: any 小时天气数据

返回:void

getDayWeather

获取24小时实时天气数据

getDayWeather(): Promise

返回:Promise

setWeather

设置天气效果

setWeather(type, strength): void

参数

  • type: WeatherType 天气类型
  • strength: number 天气强度

返回:void

startLiveWeather

开启实时天气功能

startLiveWeather(): void

返回:void

updateLight

根据时间更新光照

updateLight(time): void

参数

  • time: string 时间字符串

返回:void

updateShadow

更新阴影显示状态

updateShadow(value): void

参数

  • value: boolean 是否显示阴影

返回:void

updateSky

更新天空盒子显示状态

updateSky(value): void

参数

  • value: boolean 是否显示天空盒子

返回:void

updateWeather

更新天气配置

updateWeather(wetaher): void

参数

  • wetaher: Weather 天气配置对象

返回:void

BIMFlux AI