three.js在网络上工作但不在我的电脑上工作

时间:2014-05-24 13:01:35

标签: google-chrome three.js webgl

我一直试图打开" webgl_loader_collada.html"在我的计算机上但它在浏览器上没有显示任何内容。

实际上,这个源代码来自Three.js库下载(http://github.com/mrdoob/three.js/zipball/master)。

正在使用相同的代码: http://threejs.org/examples/#webgl_loader_collada

我错过了什么吗?

提前致谢

1 个答案:

答案 0 :(得分:1)

出于安全考虑,Chrome不会从本地网站加载本地文件。您可以使用标记--allow-file-access-from-files来禁用它。

确保没有Chrome正在运行的实例并启动Chrome,如下所示:

在Windows上:

chrome.exe --allow-file-access-from-files

在MacOS上:

"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --allow-file-access-from-files %U
相关问题