How to deal with the white ball shown below when using Echarts 3D Earth?
Solution:
Wrong way of writing:
baseTexture: '@/assets/echarts/earth.jpg',
Change the import part of the image address to require import, which is correct as follows:
option = {
backgroundColor: '#000',
globe: {
baseTexture: require('@/assets/echarts/earth.jpg'),
shading: 'lambert',
environment: require('@/assets/echarts/starfield.jpg'),
// 是否显示大气层
atmosphere: {
show: true,
},
light: {
ambient: {
intensity: 0.2,
},
main: {
intensity: 1.4,
},
},
},
series: [],
}
The reference is as follows:
Click here for complete code
It is recommended to star it, maybe it can be used in the future?
It was written in a hurry and a little rough, please forgive me. (END)