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

Fix VideoTexture #24769

Closed
wants to merge 3 commits into from
Closed

Fix VideoTexture #24769

wants to merge 3 commits into from

Conversation

LeviPesin
Copy link
Contributor

@LeviPesin LeviPesin commented Oct 10, 2022

Alternative to #24758 and #24768
Fixes #24757

Description

Fix VideoTexture by recreating the callback in VideoTexture.update() if needed.


if ( video.readyState >= video.HAVE_CURRENT_DATA ) {

this.needsUpdate = true;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because update is now called at construction, if there is no RVFC, this line can set needsUpdate to true just when the texture is created (which shouldn't break anything, I think, but unsure). Can fix this if desired.

@Mugen87 Mugen87 closed this Oct 13, 2022
@LeviPesin
Copy link
Contributor Author

@Mugen87 Why not use this instead of #24768?

@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 13, 2022

Like mentioned in the other PR, this change introduces too much code complexity.

@LeviPesin
Copy link
Contributor Author

It's just five more lines, effectively...

@mrdoob
Copy link
Owner

mrdoob commented Oct 18, 2022

@LeviPesin Right... But if I remember correctly, no other texture allows changing the source anymore.

@LeviPesin LeviPesin deleted the fix-videotexture branch October 19, 2022 06:34
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

Successfully merging this pull request may close these issues.

VideoTexture hold reference to video source
3 participants