Web GL Globe 无法在本地运行
我一直在尝试获取 Web GL Globe ( http://code.google.com/p /webgl-globe )工作。我从 Google 代码页下载了源代码,并将所有文件解压缩到一个文件夹中。 5 月 13 日发布的是截至撰写本文时的最新版本。 然而,index.html 页面在 Chrome 和其他浏览器中加载时没有地球仪。我快速浏览了代码,但我对 javascript 等还很陌生。似乎对文件的一些引用不正确,就像我更正了该行一样:
background: #000000 url(/globe/loading.gif) center center no-repeat;
我
background: #000000 url(../globe/loading.gif) center center no-repeat;
得到了一个加载轮 gif 加载但永远旋转。
进一步查看代码,将 globe.animate();
移动到不同的行会创建一个工作地球仪,但没有数据加载功能。 我尝试了以下方法来显示地球仪:
globe.createPoints();
settime(globe,0)();
}
}
};globe.animate();
基本上,我希望能够下载 WebGL 地球仪的工作下载(zip?),或者有人在 http://code.google.com/p/webgl-globe/downloads/list 并让我知道如何创建工作版本网站上的损坏代码。
提前致谢,
夏洛特
I've been trying to get the Web GL Globe ( http://code.google.com/p/webgl-globe ) working. I downloaded the source code from the Google Code page and unzipped all the files to a single folder. The May 13th release is the latest as of writing.
However the index.html page loads without the globe in Chrome and other browsers. I had a quick look at the code but I'm new to javascript etc. It appears some of the references to files are incorrect as if I correct the line:
background: #000000 url(/globe/loading.gif) center center no-repeat;
to
background: #000000 url(../globe/loading.gif) center center no-repeat;
I get a loading wheel gif loading but spinning forever.
Looking further into the code it appears moving globe.animate();
to a different line creates a working globe but without the data loading functionality.
I tried the following to get a globe displaying:
globe.createPoints();
settime(globe,0)();
}
}
};globe.animate();
Basically I would love a working download (zip?) of the WebGL globe or someone to take a look at the download on http://code.google.com/p/webgl-globe/downloads/list and let me know how to create a working version from the broken code on the site.
Thanks in advance,
Charlotte
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否只是通过从文件系统运行它来托管它?如果是的话,这就是图像未加载的原因,“/”将引用您的根目录。如果您正在运行带有 python 的东西,您可以从项目目录运行以下命令
然后浏览到 http://0.0.0.0 :8000/ 它应该可以工作。
Are you hosting this just by running it off the file system? If you are then that is why the images aren't loading "/" will refer to your root directory. If you are running on something that has python you can run the following from the project directory
Then browse to http://0.0.0.0:8000/ and it should work.
如果您只是单击index.html,它将不起作用,因为不会加载js文件。
例如,如果您使用MAMP(WAMP)并将文档根目录更改为/Users/You/Downloads/webgl-globe- master
你只需要去那里加载 js 文件,而不需要编辑 html 代码:
If you just click on index.html, it would not work, because the js files would not be loaded
For sure if you use for exemple MAMP (WAMP) and change your document root to /Users/You/Downloads/webgl-globe-master
You will just have to go there in order to load the js files without editing the html code :