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

Non-minified js files don't work and cause errors #11

Open
mishawagon opened this issue Feb 28, 2019 · 8 comments
Open

Non-minified js files don't work and cause errors #11

mishawagon opened this issue Feb 28, 2019 · 8 comments

Comments

@mishawagon
Copy link

mishawagon commented Feb 28, 2019

Hello and thanks for this amazing experiment. One small problem: if I change the js files to the non-minified version to play around, the code doesn't work. For example, if I change index3.html to load index3.js instead of index3.min.js, there is an error thrown in Chrome (below).

webgl.js:96 Uncaught (in promise) TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided. at updateTexture (webgl.js:96) at Object.createTexture (webgl.js:84) at GL.createTexture (gl-obj.js:31) at RainRenderer.init (rain-renderer.js:65) at new RainRenderer (rain-renderer.js:27) at init (index3.js:74) at index3.js:39

@albertothedev
Copy link

The same happens to me, any solutions?

@mishawagon
Copy link
Author

I never heard back, and I didn't end up going further with this.

@mishawagon
Copy link
Author

Should I close it?

@albertothedev
Copy link

Whatever, I wasn't able to get it working even when minifying it with uglify-js.

@mishawagon
Copy link
Author

I don't think it's a matter of it wanting the code minified. I think they didn't release the most up to date unminified code. Their most up to date working code is only available as a minified version. So you could use something to unminify their minified code and go from there. Anyway just an idea.

@albertothedev
Copy link

That could be it. It doesn't make much sense but it's the only thing I can think of. I would like to try to unminify the code but it looks like it's both minified and uglified so I don't know if a conversion could be achieved.

@albertothedev
Copy link

Maybe it's this fix which wasn't updated on the non-minified files.

artrointel added a commit to artrointel/RainEffect that referenced this issue Jan 30, 2020
createTexture(gl, source, i) has a responsibility of creating
GL Texture object with source data.
creating texture object can be done even if the source is null, except
calling texImage2D which is for uploading the buffer data to gpu memory.

Fix solving this issue:
codrops#11
@artrointel
Copy link

artrointel commented Jan 30, 2020

@mishawagon calling texImage2D() on updateTexture() function with null data caused this issue.
replace if(source != null) updateTexture(gl, source); at line:12624 will be a charm.

@albertothedev actually non-minified js files should've updated by gulp build after updating original src/index*.js file first.

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

3 participants