mars3d创建的场景默认会有一个星空背景,如果想换成自定义的控件背景只需要下面几个步骤

    1. 在地图初始化时scene参数中配置添加如下配置(注意:一定是需要在初始化时传入)

      1. scene: {
      2. contextOptions: { webgl: { alpha: true } }, // 允许透明
      3. globe: {
      4. baseColor: "rgba(0,0,0,0)",
      5. showGroundAtmosphere: false,
      6. enableLighting: false
      7. }
      8. }
    2. 通过css样式设置容器的背景图片,如:

      1. dom.style.backgroundImage = "url(my.jpg)"

      官方示例地址 http://mars3d.cn/editor-vue.html?id=map/other/backgroundImg