天气效果-雨雪雾雷电
框架支持一般天气效果
支持效果
INFO
现阶段支持雨效果、雾效果、雪效果和雷电效果
代码实例
创建场景
ts
let map: any
LarkExplorer.ready({
baseUrl: './dist/resources/',
}).then(initmap)
function initMap() {
// 默认谷歌影像地图
const baseImagery = LarkExplorer.BaseLayer.DefaultTdtImg
// 默认全球地形
const baseTerrain = LarkExplorer.BaseLayer.DefaultTerrain
map = new LarkExplorer.Map('map', baseImagery, baseTerrain)
initView()
}
function initView() {
const status = {
position: {
x: -947707.6526854301,
y: 5525655.629629169,
z: 3043025.882299652,
},
hpr: {
heading: 3.862207334800405,
pitch: -0.3624409974692644,
roll: 0.0001087727106403591,
},
}
map.Navigation.flyToPos(status, 3)
}
雨天气
ts
const snow = (bool: boolean) => {
map.Weather.Rain.show = bool
}
运行效果
更多示例
雪天气
ts
const snow = (bool: boolean) => {
map.Weather.Snow.show = bool
}
运行效果
更多示例
雾天气
ts
const fog = (bool: boolean) => {
map.Weather.Fog.show = bool
}
运行效果
更多示例
雷电天气
ts
const lighting = (bool: boolean) => {
map.Weather.Lightning.show = bool
}
运行效果
更多示例