File tree Expand file tree Collapse file tree
examples/kern-calibration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ An original cinematic example website for the `cinematic-scroll` skill.
88- A continuously playing monochrome base video.
99- A synchronized full-colour video above it.
1010- Scroll-scrubbed CSS ` clip-path ` masking applied only to the colour layer.
11- - Frame-by-frame drift correction using ` requestVideoFrameCallback ` , with playback-rate convergence and an 80 ms hard-resync threshold.
11+ - Frame-by-frame drift correction using ` requestVideoFrameCallback ` , with playback-rate convergence and a 45 ms hard-resync threshold.
1212- Generated precision-mechanical hero imagery converted into a seamless 12-second, 30 fps master loop.
1313- Five selectable mechanical systems with live readings and macro crops.
1414- Procedural Web Audio ambience behind an explicit user-controlled sound toggle.
Original file line number Diff line number Diff line change 9898 function syncVideos ( force = false ) {
9999 if ( ! monoVideo . duration || ! colorVideo . duration ) return ;
100100 const delta = monoVideo . currentTime - colorVideo . currentTime , drift = Math . abs ( delta ) ;
101- if ( force || drift > .08 ) { colorVideo . currentTime = monoVideo . currentTime ; colorVideo . playbackRate = 1 ; }
102- else colorVideo . playbackRate = 1 + Math . max ( - .06 , Math . min ( .06 , delta * .8 ) ) ;
101+ if ( force || drift > .045 ) { colorVideo . currentTime = monoVideo . currentTime ; colorVideo . playbackRate = 1 ; }
102+ else colorVideo . playbackRate = 1 + Math . max ( - .08 , Math . min ( .08 , delta ) ) ;
103103 if ( monoVideo . paused !== colorVideo . paused ) { monoVideo . paused ?colorVideo . pause ( ) :colorVideo . play ( ) . catch ( ( ) => { } ) ; }
104104 }
105105 async function startVideos ( ) {
You can’t perform that action at this time.
0 commit comments