[Vue front end] Echarts 3D earth photo shows how to deal with the white ball + earth model + simple front-end login page + digital clock component

How to deal with the white ball shown below when using Echarts 3D Earth?
insert image description here
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:

insert image description here
insert image description here

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)

Guess you like

Origin blog.csdn.net/qq_43813351/article/details/128985911