ccapture.js
ccapture.js copied to clipboard
Retrieve real performance timing
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;
and what is lasttiming ?
Sorry lasttiming is the stored value from the previous loop. I'll update my sample.
+1. This really helps with video texture rendering.