Skip to content

Retrieve real performance timing #24

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants