Skip to content

Conversation

queenvictoria
Copy link

@queenvictoria queenvictoria commented Aug 14, 2016

This is to support tweaking the playback of video textures as reported in #20 . I know you had a different idea but I've not been able to figure out how to do what you mean.

So my code in the animate() loop looks a bit like:

var recording_fps = 60;
timing = capturer.getTiming();
actual_fps = timing.performancetime - lasttiming.performancetime;
ratio = actual_fps / recording_fps;
// playbackRate is normalised
video.playbackRate = ratio;
lasttiming = timing;

@tonycaso
Copy link

and what is lasttiming ?

@queenvictoria
Copy link
Author

Sorry lasttiming is the stored value from the previous loop. I'll update my sample.

@rwoodley
Copy link

+1. This really helps with video texture rendering.

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.

3 participants