光照模块
This commit is contained in:
@ -255,6 +255,8 @@ onMounted(() => {
|
||||
if (window.sunshine) {
|
||||
let data = JSON.parse(localStorage.getItem('shineSetting'))
|
||||
// weatherData.currWeather = data.currWeather
|
||||
if (data) {
|
||||
//判断是否有数据
|
||||
//是否是实时光照
|
||||
if (!data?.currWeather) {
|
||||
weatherData.time = data.time
|
||||
@ -265,6 +267,7 @@ onMounted(() => {
|
||||
data?.wearther.forEach((item, index) => {
|
||||
list[index].status = item.status
|
||||
})
|
||||
}
|
||||
// list = data.wearther
|
||||
switchStatus.value = true
|
||||
sunshine = window.sunshine
|
||||
@ -278,7 +281,7 @@ onMounted(() => {
|
||||
// sunshine = new YJ.Global.efflect.Sunshine(window.earth, { id: 123 })
|
||||
timeline.moveComplay((item) => {
|
||||
weatherData.currWeather = false
|
||||
sunshine.timeBar = item
|
||||
sunshine && (sunshine.timeBar = item)
|
||||
})
|
||||
|
||||
// timeline.setTime(myData)
|
||||
@ -561,8 +564,11 @@ var shadowChange = () => {
|
||||
width: 250px;
|
||||
height: auto;
|
||||
z-index: 30;
|
||||
background:
|
||||
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(var(--color-base1), 0) 0%,
|
||||
rgba(var(--color-base1), 0.2) 100%
|
||||
),
|
||||
rgba(0, 0, 0, 0.6);
|
||||
padding: 10px;
|
||||
border: 1.5px solid rgba(var(--color-base1), 1);
|
||||
|
||||
@ -46,14 +46,14 @@ export default class TimeLine {
|
||||
that.timeline.addEventListener('mousedown', (e) => {
|
||||
|
||||
if (e.srcElement.className === 'handle') {
|
||||
if (!that.sunShine) {
|
||||
ElMessage({
|
||||
message: '请开启光照功能',
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
// if (!that.sunShine) {
|
||||
// ElMessage({
|
||||
// message: '请开启光照功能',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// } else {
|
||||
that.isDragging = true;
|
||||
}
|
||||
// }
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
@ -88,7 +88,7 @@ export default class TimeLine {
|
||||
that.sdk.viewer && (that.sdk.viewer.clock.shouldAnimate = false)
|
||||
|
||||
//判断当没有开启光照时,点击停止播放时关闭实时光照按钮
|
||||
if (document.getElementById('weatherSwitch').style.color == 'rgb(255, 255, 255)') {
|
||||
if (document.getElementById('weatherSwitch').style.color == 'rgba(var(--color-base1), 1)') {
|
||||
callback(false)
|
||||
}
|
||||
} else {//播放
|
||||
|
||||
Reference in New Issue
Block a user