Google-chrome无法在Ubuntu中查看我的webGL Three.js网页 [英] Google-chrome can't locally view my webGL Three.js webpages in Ubuntu
问题描述
chrome:// gpu显示所有内容为绿色并且
WebGL:硬件加速
WebGL多重采样:硬件加速
我的版本是:Google Chrome 31.0.1650.63
并且我已设置标志
覆盖软件渲染列表Mac,Windows,Linux,Chrome OS,Android
覆盖内置的软件渲染列表并在不支持的系统配置上启用GPU加速#ignore-gpu-blacklist
启用。
但是,如果我在其中index.html包含webGL和three.js的文件 - >打开 - > index.html 中,我会看到一半...这很奇怪。
但是,它可以正常运行.htmls',奇怪的是,我可以正常使用与webhosted相同的文件。
所以这个: 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文件访问从文件,我认为会与本地文件工作...但没有骰子。
但也许我不是使用它们对不对?
它是google-chrome index.html -flag吗?
或
google-chrome -flag index.html?
真的很想在本地查看它们,通过ssh编辑是一件很痛苦的事情(连接缓慢)。我希望在本地进行编辑,然后在完成后上传。 解决方案
问题是Chrome不允许网页读取本地文件。否则,坏人可以制作HTML页面,请求您保存并在本地加载它们,然后将本地文件上传到服务器。
您可以覆盖此内容,但我不会不推荐它。而是运行你自己的服务器。最简单的方法是使用python,然后打开一个终端并键入
python -m SimpleHTTPServer
然后转到
http:/ / localhost:80000
在某些时候,您可能会发现它有限制(如不支持视频不错)在这种情况下看到这个答案。
什么是Python的http.server(或SimpleHTTPServer)的更快选择?
chrome://gpu shows green for everything and "WebGL: Hardware accelerated WebGL multisampling: Hardware accelerated"
my version is: Google Chrome 31.0.1650.63
and I've set the flag "
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
"
to enabled.
But if I 'File -> Open -> index.html' where the index.html has webGL and three.js I see like half of it... It's odd.
BUT, it does work for normal .htmls' and oddly works fine for the exact same files I have webhosted.
So this: http://www.eden.rutgers.edu/~shahan1/nurp/ works and opens up fine,
but when I download the exact same folder and chmod 777
file:///home/sa/Desktop/3Dweb/public_html/nurp/index.html
everything and whatnot it opens up certain aspects like the upper left .gif and that's it.
and I've tried things like
"google-chrome --ignore-gpu-blacklist"
"google-chrome --enable-webgl --ignore-gpu-blacklist"
and " google-chrome --allow-file-access-from-files" which i thought would work what with local files... but no dice.
but perhaps i'm not using them right?
is it "google-chrome index.html -flag"? or "google-chrome -flag index.html"?
Would really like to view them locally it's such a pain to edit over ssh (slow connection). I'd rather locally edit and then upload when it's done.
The issue is Chrome doesn't allow web pages to read local files. Otherwise the bad guys could make HTML pages, ask you to save them and load them locally and then upload your local files to their sever.
You can override this but I don't recommend it. Rather run your own server. The simplest way is to use python then open a terminal and type
python -m SimpleHTTPServer
Then go to
http://localhost:80000
At some point you'll likely find that has limits (like doesn't support video well) in which case see this answer.
What is a faster alternative to Python's http.server (or SimpleHTTPServer)?
这篇关于Google-chrome无法在Ubuntu中查看我的webGL Three.js网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!