Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localhost preview #12

Open
gauravnewton opened this issue Mar 18, 2019 · 7 comments
Open

localhost preview #12

gauravnewton opened this issue Mar 18, 2019 · 7 comments

Comments

@gauravnewton
Copy link

I HAVE DOWNLOADED ALL FILES IN ZIP FORMAT BUT WHEN I OPEN THEM INTO BROWSER IT DOESN'T WORK

@gauravnewton
Copy link
Author

any configuration required>>><<<????

@loebi-ch
Copy link

Your rain effect looks amazing, but I have the same problem as @gauravnewton. Demo does not work. It shows a black screen and the following JavaScript Exception:

Uncaught (in promise) DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': Tainted canvases may not be loaded.

@aaronegger
Copy link

Hey guys this is easy "fixable".
I think this is by design. Please refer to this stackoverflow thread: https://stackoverflow.com/questions/30945945/tainted-canvases-may-not-be-loaded-cross-domain-issue-with-webgl-textures

However to get this working when loading from filesystem you could search in the js files for "new Image" and add to the image object following line:
imageObjectPlsReplaceWithCorrectOne.crossOrigin = "anonymous";

@PiccoloYu
Copy link

I think I have encountered the same problem. Is there any solution. ‘imageObjectPlsReplaceWithCorrectOne.crossOrigin =“anonymous”’ does not make any difference

@artrointel
Copy link

this issue is due to CORS policy.

@gauravnewton This project cannot be loaded locally just by double-clicking the index.html.
You should have to run local web-server first.
simple and fast way to run this locally to play around in this project, install Node.js(npm anyway) and run
$ npx http-server
on your <project/demo> directory. this will start http server, and you'll be able to access there
opening your browser with http://127.0.0.1 address.

I think README.md in this project should be updated for it.

@yipanhuasheng
Copy link

When you test demo ,you can quick start with using Visual studio code plugins 'Live Server'.Right Click demo files(index.html),then click 'Open with Live Server'.Then you can see that.

@itwxb
Copy link

itwxb commented Nov 9, 2022

当你测试演示时,你可以快速开始使用Visual studio代码插件“Live Server”。右键单击演示文件(索引.html),然后单击“使用实时服务器打开”。然后你可以看到这一点。

wow! You are right! thanks! 终于弄好了,原来需要用这个方法启动服务器

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants