接上文————>
<html>
<head>
<meta charset="UTF-8">
<title>旋转地球title>
head>
<body>
<div id="earth" style="width: 100%; height:750px">div>
<script src="js/echarts.min.js">script>
<script src="js/js_echarts-gl.min.js">script>
<script src="js/js_world.js">script>
<script>
var dom = document.getElementById("earth")
var myChart = echarts.init(dom);
option = {
backgroundColor: "#000",
globe:{
baseTexture: "img/img_world.jpg",
heightTexture: "img/img_world.jpg",
displacementScale: 0.07,
environment: "img/img_starfield.jpg",
shading:"realistic",
realisticMaterial: {
roughness: 0.9
},
postEffect: {
enable: true
},
light: {
main: {
intensity: 5,
shadow: true
},
ambientCubemap: {
texture: "img/pisa.hdr",
diffuseIntensity: 0.2
}
}
}
};
if (option && typeof option === "object") {
myChart.setOption(option, true);
}
script>
body>
html>
2.需要文件
项目文件结构:
js文件:
img文件:
点击下载
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)