<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" /> <link href="http://bigemap.com:9000/bigemap-gl.js/v1.1.0/Widgets/widgets.css" rel="stylesheet" /> <script src="http://bigemap.com:9000/bigemap-gl.js/v1.1.0/bigemap-gl.js"></script> <style> body { margin: 0; padding: 0; } #container { position: absolute; top: 0; bottom: 0; width: 100%; } .bmgl-widget-credits { display: none; } </style> <title>天空盒</title> </head> <body> <div id="container"></div> <script> bmgl.Config.HTTP_URL = "http://bigemap.com:9000"; let viewer = new bmgl.Viewer("container", { mapId: "bigemap.zhongkexingtu", skyBox: new bmgl.SkyBox({ sources: { negativeX: "/bmgl/farskyBox/farsky/tycho2t3_80_mx.jpg", negativeY: "/bmgl/farskyBox/farsky/tycho2t3_80_my.jpg", negativeZ: "/bmgl/farskyBox/farsky/tycho2t3_80_mz.jpg", positiveX: "/bmgl/farskyBox/farsky/tycho2t3_80_px.jpg", positiveY: "/bmgl/farskyBox/farsky/tycho2t3_80_py.jpg", positiveZ: "/bmgl/farskyBox/farsky/tycho2t3_80_pz.jpg", }, }), }); // 是否支持图像渲染像素化处理 if (bmgl.FeatureDetection.supportsImageRenderingPixelated()) { viewer.resolutionScale = window.devicePixelRatio; } //开启抗锯齿,让图像更加顺滑 viewer.scene.postProcessStages.fxaa.enabled = true; </script> </body> </html>
源码