[英]Google-chrome can't locally view my webGL Three.js webpages in Ubuntu
chrome:// gpu显示所有内容的绿色和“WebGL:硬件加速WebGL多重采样:硬件加速”
我的版本是:Google Chrome 31.0.1650.63
我设置了旗帜“
Override software rendering list Mac, Windows, Linux, Chrome OS, Android
Overrides the built-in software rendering list and enables GPU-acceleration on unsupported system configurations. #ignore-gpu-blacklist
“
启用。
但是如果我' 文件 - >打开 - > index.html '其中index.html有webGL和three.js我看到它的一半...这很奇怪。
但是,它确实适用于正常的.htmls'并且奇怪地适用于我拥有虚拟主机的完全相同的文件。
所以这个: http : //www.eden.rutgers.edu/~shahan1/nurp/工作并打开了,
但是当我下载完全相同的文件夹和chmod 777时
file:///home/sa/Desktop/3Dweb/public_html/nurp/index.html
所有东西以及诸如左上角.gif等特定方面都会打开它。
我尝试过类似的东西
“ google-chrome --ignore-gpu-blacklist ”
“ google-chrome --enable-webgl --ignore-gpu-blacklist ”
和“ google-chrome --allow-file-access-from-files ”我认为它可以用于本地文件...但没有骰子。
但也许我没有正确使用它们?
它是“google-chrome index.html -flag”? 或“google-chrome -flag index.html”?
真的想在本地查看它们,编辑ssh(慢速连接)是一件很痛苦的事情。 我宁愿本地编辑,然后在完成后上传。
问题是Chrome不允许网页读取本地文件。 否则,坏人可能会制作HTML页面,要求您保存它们并在本地加载它们,然后将本地文件上传到其服务器。
你可以覆盖它,但我不推荐它。 而是运行自己的服务器。 最简单的方法是使用python然后打开终端并输入
python -m SimpleHTTPServer
然后去
http://localhost:80000
在某些时候你可能会发现它有限制(比如不支持视频)在这种情况下看到这个答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.