0

I am trying to run the examples in the WebGL Globe code package. I have downloaded the code from the GitHub repository and am attempting to run the page within the globe folder of the main directory.

I have been having issues loading the WebGL Globe locally on my machine. I have set up a SimpleHTTPServer with Python to handle the requests of the webpage locally. This Python script lives in the root directory of the project (where the readme file lives) to ensure that all the file references within the HTML code are correct. I am able to load the page, however, the globe will not load and the progress bar image persists. This yields the following result:

enter image description here

When I load the page, Python shows the following output: enter image description here

The Python code:

import SimpleHTTPServer
import SocketServer

PORT = 8000

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler

httpd = SocketServer.TCPServer(("", PORT), Handler)

print "serving at port", PORT
httpd.serve_forever()

As you can see, all the files load correctly.

I have visited a previous question but none of the solutions provided worked for me (and for the person who originally asked the question).

Does anyone know what I may be doing wrong? Is it possible that Google has stopped supporting this project?

4

2 回答 2

2

由于最近对该项目的提交,代码已更新为使用更新版本的 Three.js,但实际的 Three.js 文件没有更新。

所以globe/third-party/three.min.js用最新版本的Three.js 替换

给地球几秒钟的时间来弹出。在我的电脑上,我花了大约 6 秒钟才看到它。

于 2015-01-12T19:03:34.667 回答
0

尝试查看包含所有坐标和大小的 JSON 文件,用于渲染地球上的线条。JSON文件包含格式为[经度,纬度,幅度,颜色,经度,纬度,幅度,颜色]的信息,如果缺少任何逗号,则根本不会渲染地球,最后一个值后面不能有任何逗号如上图所示。判断 JSON 文件是否存在问题的一种简单方法是尝试单击拖动以移动地球,如果光标变为移动光标,则为 JSON 文件。如果一切都失败了,那么尝试另一种 Web 服务器的实现(也许是 Apache?)。此外,检查开发者控制台 (CTRL + SHIFT + I) 以查看是否有任何错误。

于 2015-11-17T14:00:08.273 回答