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

Cannot read property 'getImageData' of null #27

Open
romarybi opened this issue Feb 18, 2021 · 4 comments
Open

Cannot read property 'getImageData' of null #27

romarybi opened this issue Feb 18, 2021 · 4 comments

Comments

@romarybi
Copy link

The writer works fine until I pass the transparent: true prop. With it, I get an error Uncaught (in promise) TypeError: Cannot read property 'getImageData' of null here

I'm using a three.js canvas with an alpha property. There shouldn't be a problem with it since I am able to take transparent images of the canvas manually. Any help?

@thenickdude
Copy link
Owner

Can you post a little sample app that reproduce it?

Did you see the note about the limitations of the opacity range in the output of webm-writer? It'll only be useful for niche applications I think.

@mishagrin
Copy link

Same here, and also with Threejs

I capture main renderer canvas. Everything works fine until i set transparent: true.
Dunno what cause the problem.

A tried to disable premultipliedAlpha property from WebGLRenderer. Tried to setClearColor() directly to WebGLRenderer, changed background color from completely transparent to half-transparent. Always got same error as @romarybi
Uncaught (in promise) TypeError: Cannot read property 'getImageData' of null

Sorry, but unfortunately i can't show you app example. It's project from my job.

@thenickdude Any suggestions? Maybe i could do some tests to find out the problem, if you willing to help.

@thenickdude
Copy link
Owner

Make a minimal test case that reproduces it, I'm not building a three.js project from scratch so that I can investigate.

@thenickdude
Copy link
Owner

And before you even bother, make sure you understand the restrictions that prevent the resulting video being either fully opaque or fully transparent, which makes this feature pretty close to useless.

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