Const
Create rAF timer
// n_frameslet n_frames = 0;const timer = createTimer(() => ++n_frames > 3); // show 3 frames// durationconst frame_ms = 16.67;const duration = 100; // show 100msconst timer = createTimer( (cur_time, start_time) => cur_time - start_time >= duration - frame_ms / 2,); Copy
// n_frameslet n_frames = 0;const timer = createTimer(() => ++n_frames > 3); // show 3 frames// durationconst frame_ms = 16.67;const duration = 100; // show 100msconst timer = createTimer( (cur_time, start_time) => cur_time - start_time >= duration - frame_ms / 2,);
Create rAF timer