codrops / RainEffect

Some experimental rain and water drop effects in different scenarios using WebGL, by Lucas Bebber.

Home Page:https://tympanus.net/Development/RainEffect/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't run locally.

AntiMoron opened this issue · comments

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

How to fix this problem?

Environment:

Mac OSX EI Capitan
Chrome 49.0.2623.112 (64-bit)

I have the same problem with the same error. Must be my lack of experience, since running with 'gulp connect' works fine.

Perhaps someone could explain why this is happening.

@hrishioa Hi hrishioa, it's been days and I decide to try
gulp connect.

Since I'm not familiar with gulp... I ran into such an error after npm install gulp:

image

Which gulp version are you using?

No bother... I just forgot to 'npm install'.

Still not sure what gulp connect is doing that I can't replicate running locally.

@hrishioa I've seen some threads that claim webgl has some issue with the 'file://' protocol when trying to load textures.
Once you deploy the demo on server it would run correctly.

@AntiMoron thanks I'll check that out.

it seems to only be a problem on chrome, as firefox and ie11 opens it (although in ie11 it looks quite bad)

You can set up a local server to host the texture file. It's easy to do with serve

npm install -g serve

closing.