문제

I try to use webgl examples, where there are textures (images and video), so i downloaded examples from internet, but the problem is that i cant use them directly from the browser, because the protocole file:// will be used and not http:// and that block the texture and make an error from javascript console:

Failed to load resource: net::ERR_FILE_NOT_FOUND

So, how do i use ONLY a browser to mimic the internet HTTP protocol?

도움이 되었습니까?

해결책

If you are on a system with Python (e.g. available by default on OS X) switch to the folder you want to serve and use:

python -m SimpleHTTPServer [port]

Then use a browser to open http://localhost:[port]

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top