cornerstonejs / cornerstoneTools

A framework for tools built on top of Cornerstone.
https://tools.cornerstonejs.org/
MIT License
574 stars 456 forks source link

playClip works better when timer fires slowly #1519

Open horner opened 1 year ago

horner commented 1 year ago

Video Demo

https://youtu.be/C6jsGZfL82s

Description

This change makes playClip playback keep real time by dropping missed frames if the computer cannot keep up with the requested framerate. Without this change, providers perceive playback to "slow down." With this change, the playback is always kept to "real time" at the expense of dropping frames that must be skipped.

codecov[bot] commented 1 year ago

Codecov Report

Merging #1519 (744a892) into master (925a3dd) will decrease coverage by 0.00%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1519      +/-   ##
==========================================
- Coverage   21.70%   21.69%   -0.01%     
==========================================
  Files         287      287              
  Lines       10137    10141       +4     
  Branches     2081     2081              
==========================================
  Hits         2200     2200              
- Misses       6750     6754       +4     
  Partials     1187     1187              
Impacted Files Coverage Δ
src/stackTools/playClip.js 0.78% <0.00%> (-0.03%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more