Skip to content

Echarts的globe在本地的chrome无法显示,但是火狐浏览器可以 #5763

@Alanrah

Description

@Alanrah

One-line summary [问题简述]

Echarts的GLOBE-ECHARTS-GL示例在本地的chrome无法显示,但是火狐浏览器可以。
chrome控制台报错大致都是这样;
echarts-gl.js:23976 XMLHttpRequest cannot load file:///D:/FronteEnd/3DClientFront/node_modules/echarts-gl-master/test/asset/pisa.hdr. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:最新版本
  • Browser version [浏览器类型和版本]:chrome 版本 57.0.2987.98 (64-bit)
  • OS Version [操作系统类型和版本]:windows10

Expected behaviour [期望结果]

能在离线情况下,在chrome浏览器中正常显示GLOBE-ECHARTS-GL中的例子。

ECharts option [ECharts配置项]

option = {
                globe: {
                    baseTexture: 'asset/world.topo.bathy.200401.jpg',
                    heightTexture: 'asset/elev_bump_4k.jpg',

                    displacementScale: 0.1,

                    environment: 'asset/starfield.jpg',

                    shading: 'realistic',
                    realisticMaterial: {
                        roughness: 0.8,
                        metalness: 0
                    },

                    postEffect: {
                        enable: true
                    },
                    temporalSuperSampling: {
                        enable: true
                    },
                    light: {
                        ambient: {
                            intensity: 0
                        },
                        main: {
                            intensity: 6,
                            shadow: true
                        },
                        ambientCubemap: {
                            texture: 'asset/pisa.hdr',
                            exposure: 2,
                            diffuseIntensity: 0.1,
                            specularIntensity: 1
                        }
                    },
                    viewControl: {
                        // autoRotate: false
                    }
                },
                series: []
            }

Other comments [其他信息]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions