You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There are some situations where I'd like to be able to engage or disengage the virtual timeline.
Describe the solution you'd like
I'd like there to be a function to call that switches from a virtual timeline to a realtime timeline. Events queued in the virtual timeline should then be transferred over to the realtime timeline and vice versa.
Describe alternatives you've considered
An alternative would be to simulate a realtime timeline by keeping the overwritten functions, but then also using a realtime requestAnimationFrame loop to measure an elapsed time, and use that time with timeweb.goTo.
Additional context
In addition to overwriting a window's and document's time handling functions back and forth, video elements would need to be significantly changed.
The text was updated successfully, but these errors were encountered:
v0.3.1 adds preliminary support for simulating realtime with timeweb.startRealtimeSimulation and timeweb.stopRealtimeSimulation. It works by creating an animation loop and then incrementing the virtual timeline based off of the time delta (or a fixed frame duration if supplied). This may be adequate in many use cases, however, there may be some unexpected behavior:
Currently time increments happen in steps after the realtime frames. This means that consecutive calls to Date.now will return the same time. An offset could be made using realtime times, but there should be some care when considering timeouts and time representation.
Is your feature request related to a problem? Please describe.
There are some situations where I'd like to be able to engage or disengage the virtual timeline.
Describe the solution you'd like
I'd like there to be a function to call that switches from a virtual timeline to a realtime timeline. Events queued in the virtual timeline should then be transferred over to the realtime timeline and vice versa.
Describe alternatives you've considered
An alternative would be to simulate a realtime timeline by keeping the overwritten functions, but then also using a realtime
requestAnimationFrame
loop to measure an elapsed time, and use that time withtimeweb.goTo
.Additional context
In addition to overwriting a window's and document's time handling functions back and forth, video elements would need to be significantly changed.
The text was updated successfully, but these errors were encountered: