@open-take/compositor 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdp-CzT5BKNY.js +3 -0
- package/dist/cdp-QXbQfXna.js +373 -0
- package/dist/cdp-QXbQfXna.js.map +1 -0
- package/dist/index.d.ts +4327 -195
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26282 -160
- package/dist/index.js.map +1 -1
- package/dist/server-841PMF2H.js +163 -0
- package/dist/server-841PMF2H.js.map +1 -0
- package/dist/server-C2aVv4-t.js +3 -0
- package/kit/audio.mjs +2366 -0
- package/kit/camera.js +587 -0
- package/kit/cursor.js +264 -0
- package/kit/cut.js +427 -0
- package/kit/draw.js +346 -0
- package/kit/look.js +589 -0
- package/kit/map.js +170 -0
- package/kit/media.js +3568 -0
- package/kit/motion.js +1115 -0
- package/kit/seams.js +1006 -0
- package/kit/stage.js +923 -0
- package/kit/time.js +812 -0
- package/kit/world.js +1072 -0
- package/package.json +7 -3
- package/src/ffmpeg.ts +63 -0
- package/src/film/beats.ts +1285 -0
- package/src/film/carry.ts +221 -0
- package/src/film/changes.ts +330 -0
- package/src/film/check.ts +996 -0
- package/src/film/clock.ts +2530 -0
- package/src/film/components-probe.ts +809 -0
- package/src/film/components.ts +1566 -0
- package/src/film/frames.ts +389 -0
- package/src/film/gallery.ts +3276 -0
- package/src/film/kit.ts +515 -0
- package/src/film/layout.ts +701 -0
- package/src/film/listen.ts +1979 -0
- package/src/film/look.ts +3829 -0
- package/src/film/materials.ts +976 -0
- package/src/film/moving.ts +248 -0
- package/src/film/part-files.ts +729 -0
- package/src/film/picture.ts +74 -0
- package/src/film/probe-text.ts +843 -0
- package/src/film/probe.ts +3456 -0
- package/src/film/provenance.ts +596 -0
- package/src/film/render.ts +2447 -0
- package/src/film/report.ts +1631 -0
- package/src/film/sheet.ts +156 -0
- package/src/film/study-declared.ts +123 -0
- package/src/film/study-picture.ts +791 -0
- package/src/film/study-sound.ts +416 -0
- package/src/film/study.ts +864 -0
- package/src/film/tuning.ts +155 -0
- package/src/film/viewer.ts +174 -0
- package/src/html/cdp.ts +575 -0
- package/src/html/server.ts +208 -0
- package/src/index.ts +202 -0
- package/src/launch-render.ts +3 -2
- package/src/math.ts +3 -3
- package/src/mjpeg-matroska.ts +228 -0
- package/src/render.ts +6 -4
- package/src/state-diff.ts +215 -0
- package/src/state-index.ts +99 -0
- package/src/types.ts +59 -1
- package/starter/PLAN.md +84 -0
- package/starter/START.md +460 -0
- package/starter/lib/anim.js +760 -0
- package/starter/lib/devices.js +1402 -0
- package/starter/lib/handoff.js +421 -0
- package/starter/lib/hud.js +1879 -0
- package/starter/lib/measure.mjs +154 -0
- package/starter/lib/moves.js +1095 -0
- package/starter/lib/palette.mjs +803 -0
- package/starter/lib/physics-seeds.mjs +198 -0
- package/starter/lib/physics.js +738 -0
- package/starter/lib/sampler.mjs +242 -0
- package/starter/lib/solid.js +727 -0
- package/starter/lib/space.js +1227 -0
- package/starter/lib/swarm.js +1398 -0
- package/starter/reference/motion.md +276 -0
- package/starter/reference/structure.md +466 -0
- package/starter/reference/travel/motion.md +433 -0
- package/starter/reference/travel/sound.md +241 -0
- package/starter/reference/travel/structure.md +518 -0
- package/starter/samples/NOTICE.txt +55 -0
- package/starter/samples/celli/celli_24_1.opus +0 -0
- package/starter/samples/celli/celli_24_3.opus +0 -0
- package/starter/samples/celli/celli_28_1.opus +0 -0
- package/starter/samples/celli/celli_28_3.opus +0 -0
- package/starter/samples/celli/celli_31_1.opus +0 -0
- package/starter/samples/celli/celli_31_3.opus +0 -0
- package/starter/samples/celli/celli_35_1.opus +0 -0
- package/starter/samples/celli/celli_35_3.opus +0 -0
- package/starter/samples/celli/celli_38_1.opus +0 -0
- package/starter/samples/celli/celli_38_3.opus +0 -0
- package/starter/samples/celli/celli_41_1.opus +0 -0
- package/starter/samples/celli/celli_41_3.opus +0 -0
- package/starter/samples/celli/celli_45_1.opus +0 -0
- package/starter/samples/celli/celli_45_3.opus +0 -0
- package/starter/samples/celli/celli_48_1.opus +0 -0
- package/starter/samples/celli/celli_48_3.opus +0 -0
- package/starter/samples/celli/celli_52_1.opus +0 -0
- package/starter/samples/celli/celli_52_3.opus +0 -0
- package/starter/samples/celli/celli_55_1.opus +0 -0
- package/starter/samples/celli/celli_55_3.opus +0 -0
- package/starter/samples/celli/celli_59_1.opus +0 -0
- package/starter/samples/celli/celli_59_3.opus +0 -0
- package/starter/samples/celli/celli_62_1.opus +0 -0
- package/starter/samples/celli/celli_62_3.opus +0 -0
- package/starter/samples/celli/celli_65_1.opus +0 -0
- package/starter/samples/celli/celli_65_3.opus +0 -0
- package/starter/samples/crash/crash_f_1.flac +0 -0
- package/starter/samples/crash/crash_fff_1.flac +0 -0
- package/starter/samples/ebass/ebass_0_x.flac +0 -0
- package/starter/samples/ebass/ebass_10_x.flac +0 -0
- package/starter/samples/ebass/ebass_11_x.flac +0 -0
- package/starter/samples/ebass/ebass_1_x.flac +0 -0
- package/starter/samples/ebass/ebass_2_x.flac +0 -0
- package/starter/samples/ebass/ebass_3_x.flac +0 -0
- package/starter/samples/ebass/ebass_4_x.flac +0 -0
- package/starter/samples/ebass/ebass_5_x.flac +0 -0
- package/starter/samples/ebass/ebass_6_x.flac +0 -0
- package/starter/samples/ebass/ebass_7_x.flac +0 -0
- package/starter/samples/ebass/ebass_8_x.flac +0 -0
- package/starter/samples/ebass/ebass_9_x.flac +0 -0
- package/starter/samples/ek_clap/ek_clap_1_1.flac +0 -0
- package/starter/samples/ek_hat/ek_hat_1_1.flac +0 -0
- package/starter/samples/ek_hat/ek_hat_1_2.flac +0 -0
- package/starter/samples/ek_kick/ek_kick_1_1.flac +0 -0
- package/starter/samples/ek_kick/ek_kick_1_2.flac +0 -0
- package/starter/samples/glock/glock_67_x.flac +0 -0
- package/starter/samples/glock/glock_72_x.flac +0 -0
- package/starter/samples/glock/glock_79_x.flac +0 -0
- package/starter/samples/glock/glock_84_x.flac +0 -0
- package/starter/samples/glock/glock_91_x.flac +0 -0
- package/starter/samples/glock/glock_96_x.flac +0 -0
- package/starter/samples/harp/harp_101_f.opus +0 -0
- package/starter/samples/harp/harp_28_f.opus +0 -0
- package/starter/samples/harp/harp_31_mp.opus +0 -0
- package/starter/samples/harp/harp_35_mf.opus +0 -0
- package/starter/samples/harp/harp_38_mf.opus +0 -0
- package/starter/samples/harp/harp_41_mf.opus +0 -0
- package/starter/samples/harp/harp_45_mf.opus +0 -0
- package/starter/samples/harp/harp_48_mf.opus +0 -0
- package/starter/samples/harp/harp_52_mf.opus +0 -0
- package/starter/samples/harp/harp_55_mf.opus +0 -0
- package/starter/samples/harp/harp_59_mf.opus +0 -0
- package/starter/samples/harp/harp_62_mf.opus +0 -0
- package/starter/samples/harp/harp_65_mf.opus +0 -0
- package/starter/samples/harp/harp_69_mf.opus +0 -0
- package/starter/samples/harp/harp_72_mf.opus +0 -0
- package/starter/samples/harp/harp_76_mf.opus +0 -0
- package/starter/samples/harp/harp_79_mf.opus +0 -0
- package/starter/samples/harp/harp_83_mf.opus +0 -0
- package/starter/samples/harp/harp_86_mf.opus +0 -0
- package/starter/samples/harp/harp_89_mf.opus +0 -0
- package/starter/samples/harp/harp_93_mf.opus +0 -0
- package/starter/samples/harp/harp_95_mf.opus +0 -0
- package/starter/samples/harp/harp_98_f.opus +0 -0
- package/starter/samples/manifest.json +2951 -0
- package/starter/samples/marimba/marimba_29_x.flac +0 -0
- package/starter/samples/marimba/marimba_36_x.flac +0 -0
- package/starter/samples/marimba/marimba_43_x.flac +0 -0
- package/starter/samples/marimba/marimba_47_x.flac +0 -0
- package/starter/samples/marimba/marimba_53_x.flac +0 -0
- package/starter/samples/marimba/marimba_60_x.flac +0 -0
- package/starter/samples/marimba/marimba_67_x.flac +0 -0
- package/starter/samples/marimba/marimba_71_x.flac +0 -0
- package/starter/samples/marimba/marimba_77_x.flac +0 -0
- package/starter/samples/marimba/marimba_84_x.flac +0 -0
- package/starter/samples/piano/piano_102_12.opus +0 -0
- package/starter/samples/piano/piano_102_16.opus +0 -0
- package/starter/samples/piano/piano_102_4.opus +0 -0
- package/starter/samples/piano/piano_102_8.opus +0 -0
- package/starter/samples/piano/piano_105_12.opus +0 -0
- package/starter/samples/piano/piano_105_16.opus +0 -0
- package/starter/samples/piano/piano_105_4.opus +0 -0
- package/starter/samples/piano/piano_105_8.opus +0 -0
- package/starter/samples/piano/piano_108_12.opus +0 -0
- package/starter/samples/piano/piano_108_16.opus +0 -0
- package/starter/samples/piano/piano_108_4.opus +0 -0
- package/starter/samples/piano/piano_108_8.opus +0 -0
- package/starter/samples/piano/piano_21_12.opus +0 -0
- package/starter/samples/piano/piano_21_16.opus +0 -0
- package/starter/samples/piano/piano_21_4.opus +0 -0
- package/starter/samples/piano/piano_21_8.opus +0 -0
- package/starter/samples/piano/piano_24_12.opus +0 -0
- package/starter/samples/piano/piano_24_16.opus +0 -0
- package/starter/samples/piano/piano_24_4.opus +0 -0
- package/starter/samples/piano/piano_24_8.opus +0 -0
- package/starter/samples/piano/piano_27_12.opus +0 -0
- package/starter/samples/piano/piano_27_16.opus +0 -0
- package/starter/samples/piano/piano_27_4.opus +0 -0
- package/starter/samples/piano/piano_27_8.opus +0 -0
- package/starter/samples/piano/piano_30_12.opus +0 -0
- package/starter/samples/piano/piano_30_16.opus +0 -0
- package/starter/samples/piano/piano_30_4.opus +0 -0
- package/starter/samples/piano/piano_30_8.opus +0 -0
- package/starter/samples/piano/piano_33_12.opus +0 -0
- package/starter/samples/piano/piano_33_16.opus +0 -0
- package/starter/samples/piano/piano_33_4.opus +0 -0
- package/starter/samples/piano/piano_33_8.opus +0 -0
- package/starter/samples/piano/piano_36_12.opus +0 -0
- package/starter/samples/piano/piano_36_16.opus +0 -0
- package/starter/samples/piano/piano_36_4.opus +0 -0
- package/starter/samples/piano/piano_36_8.opus +0 -0
- package/starter/samples/piano/piano_39_12.opus +0 -0
- package/starter/samples/piano/piano_39_16.opus +0 -0
- package/starter/samples/piano/piano_39_4.opus +0 -0
- package/starter/samples/piano/piano_39_8.opus +0 -0
- package/starter/samples/piano/piano_42_12.opus +0 -0
- package/starter/samples/piano/piano_42_16.opus +0 -0
- package/starter/samples/piano/piano_42_4.opus +0 -0
- package/starter/samples/piano/piano_42_8.opus +0 -0
- package/starter/samples/piano/piano_45_12.opus +0 -0
- package/starter/samples/piano/piano_45_16.opus +0 -0
- package/starter/samples/piano/piano_45_4.opus +0 -0
- package/starter/samples/piano/piano_45_8.opus +0 -0
- package/starter/samples/piano/piano_48_12.opus +0 -0
- package/starter/samples/piano/piano_48_16.opus +0 -0
- package/starter/samples/piano/piano_48_4.opus +0 -0
- package/starter/samples/piano/piano_48_8.opus +0 -0
- package/starter/samples/piano/piano_51_12.opus +0 -0
- package/starter/samples/piano/piano_51_16.opus +0 -0
- package/starter/samples/piano/piano_51_4.opus +0 -0
- package/starter/samples/piano/piano_51_8.opus +0 -0
- package/starter/samples/piano/piano_54_12.opus +0 -0
- package/starter/samples/piano/piano_54_16.opus +0 -0
- package/starter/samples/piano/piano_54_4.opus +0 -0
- package/starter/samples/piano/piano_54_8.opus +0 -0
- package/starter/samples/piano/piano_57_12.opus +0 -0
- package/starter/samples/piano/piano_57_16.opus +0 -0
- package/starter/samples/piano/piano_57_4.opus +0 -0
- package/starter/samples/piano/piano_57_8.opus +0 -0
- package/starter/samples/piano/piano_60_12.opus +0 -0
- package/starter/samples/piano/piano_60_16.opus +0 -0
- package/starter/samples/piano/piano_60_4.opus +0 -0
- package/starter/samples/piano/piano_60_8.opus +0 -0
- package/starter/samples/piano/piano_63_12.opus +0 -0
- package/starter/samples/piano/piano_63_16.opus +0 -0
- package/starter/samples/piano/piano_63_4.opus +0 -0
- package/starter/samples/piano/piano_63_8.opus +0 -0
- package/starter/samples/piano/piano_66_12.opus +0 -0
- package/starter/samples/piano/piano_66_16.opus +0 -0
- package/starter/samples/piano/piano_66_4.opus +0 -0
- package/starter/samples/piano/piano_66_8.opus +0 -0
- package/starter/samples/piano/piano_69_12.opus +0 -0
- package/starter/samples/piano/piano_69_16.opus +0 -0
- package/starter/samples/piano/piano_69_4.opus +0 -0
- package/starter/samples/piano/piano_69_8.opus +0 -0
- package/starter/samples/piano/piano_72_12.opus +0 -0
- package/starter/samples/piano/piano_72_16.opus +0 -0
- package/starter/samples/piano/piano_72_4.opus +0 -0
- package/starter/samples/piano/piano_72_8.opus +0 -0
- package/starter/samples/piano/piano_75_12.opus +0 -0
- package/starter/samples/piano/piano_75_16.opus +0 -0
- package/starter/samples/piano/piano_75_4.opus +0 -0
- package/starter/samples/piano/piano_75_8.opus +0 -0
- package/starter/samples/piano/piano_78_12.opus +0 -0
- package/starter/samples/piano/piano_78_16.opus +0 -0
- package/starter/samples/piano/piano_78_4.opus +0 -0
- package/starter/samples/piano/piano_78_8.opus +0 -0
- package/starter/samples/piano/piano_81_12.opus +0 -0
- package/starter/samples/piano/piano_81_16.opus +0 -0
- package/starter/samples/piano/piano_81_4.opus +0 -0
- package/starter/samples/piano/piano_81_8.opus +0 -0
- package/starter/samples/piano/piano_84_12.opus +0 -0
- package/starter/samples/piano/piano_84_16.opus +0 -0
- package/starter/samples/piano/piano_84_4.opus +0 -0
- package/starter/samples/piano/piano_84_8.opus +0 -0
- package/starter/samples/piano/piano_87_12.opus +0 -0
- package/starter/samples/piano/piano_87_16.opus +0 -0
- package/starter/samples/piano/piano_87_4.opus +0 -0
- package/starter/samples/piano/piano_87_8.opus +0 -0
- package/starter/samples/piano/piano_90_12.opus +0 -0
- package/starter/samples/piano/piano_90_16.opus +0 -0
- package/starter/samples/piano/piano_90_4.opus +0 -0
- package/starter/samples/piano/piano_90_8.opus +0 -0
- package/starter/samples/piano/piano_93_12.opus +0 -0
- package/starter/samples/piano/piano_93_16.opus +0 -0
- package/starter/samples/piano/piano_93_4.opus +0 -0
- package/starter/samples/piano/piano_93_8.opus +0 -0
- package/starter/samples/piano/piano_96_12.opus +0 -0
- package/starter/samples/piano/piano_96_16.opus +0 -0
- package/starter/samples/piano/piano_96_4.opus +0 -0
- package/starter/samples/piano/piano_96_8.opus +0 -0
- package/starter/samples/piano/piano_99_12.opus +0 -0
- package/starter/samples/piano/piano_99_16.opus +0 -0
- package/starter/samples/piano/piano_99_4.opus +0 -0
- package/starter/samples/piano/piano_99_8.opus +0 -0
- package/starter/samples/piano/piano_rel_102_x.opus +0 -0
- package/starter/samples/piano/piano_rel_105_x.opus +0 -0
- package/starter/samples/piano/piano_rel_108_x.opus +0 -0
- package/starter/samples/piano/piano_rel_21_x.opus +0 -0
- package/starter/samples/piano/piano_rel_24_x.opus +0 -0
- package/starter/samples/piano/piano_rel_27_x.opus +0 -0
- package/starter/samples/piano/piano_rel_30_x.opus +0 -0
- package/starter/samples/piano/piano_rel_33_x.opus +0 -0
- package/starter/samples/piano/piano_rel_36_x.opus +0 -0
- package/starter/samples/piano/piano_rel_39_x.opus +0 -0
- package/starter/samples/piano/piano_rel_42_x.opus +0 -0
- package/starter/samples/piano/piano_rel_45_x.opus +0 -0
- package/starter/samples/piano/piano_rel_48_x.opus +0 -0
- package/starter/samples/piano/piano_rel_51_x.opus +0 -0
- package/starter/samples/piano/piano_rel_54_x.opus +0 -0
- package/starter/samples/piano/piano_rel_57_x.opus +0 -0
- package/starter/samples/piano/piano_rel_60_x.opus +0 -0
- package/starter/samples/piano/piano_rel_63_x.opus +0 -0
- package/starter/samples/piano/piano_rel_66_x.opus +0 -0
- package/starter/samples/piano/piano_rel_69_x.opus +0 -0
- package/starter/samples/piano/piano_rel_72_x.opus +0 -0
- package/starter/samples/piano/piano_rel_75_x.opus +0 -0
- package/starter/samples/piano/piano_rel_78_x.opus +0 -0
- package/starter/samples/piano/piano_rel_81_x.opus +0 -0
- package/starter/samples/piano/piano_rel_84_x.opus +0 -0
- package/starter/samples/piano/piano_rel_87_x.opus +0 -0
- package/starter/samples/piano/piano_rel_90_x.opus +0 -0
- package/starter/samples/piano/piano_rel_93_x.opus +0 -0
- package/starter/samples/piano/piano_rel_96_x.opus +0 -0
- package/starter/samples/piano/piano_rel_99_x.opus +0 -0
- package/starter/samples/pizz/pizz_24_2.flac +0 -0
- package/starter/samples/pizz/pizz_28_2.flac +0 -0
- package/starter/samples/pizz/pizz_31_2.flac +0 -0
- package/starter/samples/pizz/pizz_35_2.flac +0 -0
- package/starter/samples/pizz/pizz_38_2.flac +0 -0
- package/starter/samples/pizz/pizz_41_2.flac +0 -0
- package/starter/samples/pizz/pizz_45_2.flac +0 -0
- package/starter/samples/pizz/pizz_48_2.flac +0 -0
- package/starter/samples/pizz/pizz_52_2.flac +0 -0
- package/starter/samples/pizz/pizz_57_2.flac +0 -0
- package/starter/samples/pizz/pizz_60_2.flac +0 -0
- package/starter/samples/pizz/pizz_64_2.flac +0 -0
- package/starter/samples/pizz/pizz_67_2.flac +0 -0
- package/starter/samples/pizz/pizz_71_2.flac +0 -0
- package/starter/samples/pizz/pizz_74_2.flac +0 -0
- package/starter/samples/pk_hat/pk_hat_2_1.flac +0 -0
- package/starter/samples/pk_hat/pk_hat_2_2.flac +0 -0
- package/starter/samples/pk_hat/pk_hat_6_1.flac +0 -0
- package/starter/samples/pk_hat/pk_hat_6_2.flac +0 -0
- package/starter/samples/pk_kick/pk_kick_3_1.flac +0 -0
- package/starter/samples/pk_kick/pk_kick_3_2.flac +0 -0
- package/starter/samples/pk_kick/pk_kick_7_1.flac +0 -0
- package/starter/samples/pk_kick/pk_kick_7_2.flac +0 -0
- package/starter/samples/pk_ohat/pk_ohat_3_1.flac +0 -0
- package/starter/samples/pk_ohat/pk_ohat_3_2.flac +0 -0
- package/starter/samples/pk_ohat/pk_ohat_6_1.flac +0 -0
- package/starter/samples/pk_ohat/pk_ohat_6_2.flac +0 -0
- package/starter/samples/pk_rim/pk_rim_2_1.flac +0 -0
- package/starter/samples/pk_rim/pk_rim_2_2.flac +0 -0
- package/starter/samples/pk_rim/pk_rim_5_1.flac +0 -0
- package/starter/samples/pk_rim/pk_rim_5_2.flac +0 -0
- package/starter/samples/pk_snare/pk_snare_3_1.flac +0 -0
- package/starter/samples/pk_snare/pk_snare_3_2.flac +0 -0
- package/starter/samples/pk_snare/pk_snare_7_1.flac +0 -0
- package/starter/samples/pk_snare/pk_snare_7_2.flac +0 -0
- package/starter/samples/shaker/shaker_1_1.flac +0 -0
- package/starter/samples/shaker/shaker_2_1.flac +0 -0
- package/starter/samples/snap/snap_r_1.flac +0 -0
- package/starter/samples/snap/snap_r_2.flac +0 -0
- package/starter/samples/snap/snap_r_3.flac +0 -0
- package/starter/samples/snap/snap_r_4.flac +0 -0
- package/starter/samples/snap/snap_r_5.flac +0 -0
- package/starter/samples/snap/snap_r_6.flac +0 -0
- package/starter/samples/tom/tom_3_1.flac +0 -0
- package/starter/samples/tom/tom_3_2.flac +0 -0
- package/starter/samples/tom/tom_4_1.flac +0 -0
- package/starter/samples/tom/tom_4_2.flac +0 -0
- package/starter/samples/vibes/vibes_41_1.opus +0 -0
- package/starter/samples/vibes/vibes_41_2.opus +0 -0
- package/starter/samples/vibes/vibes_45_1.opus +0 -0
- package/starter/samples/vibes/vibes_45_2.opus +0 -0
- package/starter/samples/vibes/vibes_48_1.opus +0 -0
- package/starter/samples/vibes/vibes_48_2.opus +0 -0
- package/starter/samples/vibes/vibes_52_1.opus +0 -0
- package/starter/samples/vibes/vibes_52_2.opus +0 -0
- package/starter/samples/vibes/vibes_55_1.opus +0 -0
- package/starter/samples/vibes/vibes_55_2.opus +0 -0
- package/starter/samples/vibes/vibes_59_1.opus +0 -0
- package/starter/samples/vibes/vibes_59_2.opus +0 -0
- package/starter/samples/vibes/vibes_62_1.opus +0 -0
- package/starter/samples/vibes/vibes_62_2.opus +0 -0
- package/starter/samples/vibes/vibes_65_1.opus +0 -0
- package/starter/samples/vibes/vibes_65_2.opus +0 -0
- package/starter/samples/vibes/vibes_69_1.opus +0 -0
- package/starter/samples/vibes/vibes_69_2.opus +0 -0
- package/starter/samples/vibes/vibes_72_1.opus +0 -0
- package/starter/samples/vibes/vibes_72_2.opus +0 -0
- package/starter/samples/vibes/vibes_76_1.opus +0 -0
- package/starter/samples/vibes/vibes_76_2.opus +0 -0
- package/starter/samples/violas/violas_36_1.opus +0 -0
- package/starter/samples/violas/violas_36_2.opus +0 -0
- package/starter/samples/violas/violas_38_1.opus +0 -0
- package/starter/samples/violas/violas_38_2.opus +0 -0
- package/starter/samples/violas/violas_40_1.opus +0 -0
- package/starter/samples/violas/violas_40_2.opus +0 -0
- package/starter/samples/violas/violas_43_1.opus +0 -0
- package/starter/samples/violas/violas_43_2.opus +0 -0
- package/starter/samples/violas/violas_47_1.opus +0 -0
- package/starter/samples/violas/violas_47_2.opus +0 -0
- package/starter/samples/violas/violas_50_1.opus +0 -0
- package/starter/samples/violas/violas_50_2.opus +0 -0
- package/starter/samples/violas/violas_53_1.opus +0 -0
- package/starter/samples/violas/violas_53_2.opus +0 -0
- package/starter/samples/violas/violas_57_1.opus +0 -0
- package/starter/samples/violas/violas_57_2.opus +0 -0
- package/starter/samples/violas/violas_60_1.opus +0 -0
- package/starter/samples/violas/violas_60_2.opus +0 -0
- package/starter/samples/violas/violas_64_1.opus +0 -0
- package/starter/samples/violas/violas_64_2.opus +0 -0
- package/starter/samples/violas/violas_67_1.opus +0 -0
- package/starter/samples/violas/violas_67_2.opus +0 -0
- package/starter/samples/violas/violas_71_1.opus +0 -0
- package/starter/samples/violas/violas_71_2.opus +0 -0
- package/starter/samples/violas/violas_74_1.opus +0 -0
- package/starter/samples/violas/violas_74_2.opus +0 -0
- package/starter/samples/violins/violins_43_1.opus +0 -0
- package/starter/samples/violins/violins_43_2.opus +0 -0
- package/starter/samples/violins/violins_45_1.opus +0 -0
- package/starter/samples/violins/violins_45_2.opus +0 -0
- package/starter/samples/violins/violins_47_1.opus +0 -0
- package/starter/samples/violins/violins_47_2.opus +0 -0
- package/starter/samples/violins/violins_50_1.opus +0 -0
- package/starter/samples/violins/violins_50_2.opus +0 -0
- package/starter/samples/violins/violins_54_1.opus +0 -0
- package/starter/samples/violins/violins_54_2.opus +0 -0
- package/starter/samples/violins/violins_57_1.opus +0 -0
- package/starter/samples/violins/violins_57_2.opus +0 -0
- package/starter/samples/violins/violins_60_1.opus +0 -0
- package/starter/samples/violins/violins_60_2.opus +0 -0
- package/starter/samples/violins/violins_64_1.opus +0 -0
- package/starter/samples/violins/violins_64_2.opus +0 -0
- package/starter/samples/violins/violins_67_1.opus +0 -0
- package/starter/samples/violins/violins_67_2.opus +0 -0
- package/starter/samples/violins/violins_71_1.opus +0 -0
- package/starter/samples/violins/violins_71_2.opus +0 -0
- package/starter/samples/violins/violins_74_1.opus +0 -0
- package/starter/samples/violins/violins_74_2.opus +0 -0
- package/starter/samples/woodblock/woodblock_f_1.flac +0 -0
- package/starter/samples/woodblock/woodblock_f_2.flac +0 -0
package/src/render.ts
CHANGED
|
@@ -31,7 +31,7 @@ import { dirname, join, resolve, sep } from "node:path";
|
|
|
31
31
|
import { fileURLToPath } from "node:url";
|
|
32
32
|
import { renderVideo } from "@open-take/revideo-renderer";
|
|
33
33
|
import { isCaptureUndecodable } from "./decode-guard";
|
|
34
|
-
import { ffmpegHasEncoder, resolveFfmpeg, resolveFfprobe } from "./ffmpeg";
|
|
34
|
+
import { ffmpegHasEncoder, resolveFfmpeg, resolveFfprobe, SRGB_TAGS } from "./ffmpeg";
|
|
35
35
|
import { type PlanOpts, planComposition } from "./plan";
|
|
36
36
|
import { withRenderLock } from "./render-lock";
|
|
37
37
|
import {
|
|
@@ -171,7 +171,9 @@ async function toMp4(
|
|
|
171
171
|
* converts the scene's RGB frames with swscale's default bt601 matrix, so
|
|
172
172
|
* the intermediate is 601-coded. Convert to bt709 and tag it — verified by
|
|
173
173
|
* round-tripping primaries (601-coded red merely tagged 709 decodes to
|
|
174
|
-
* rgb(255,24,0); converted it decodes to rgb(252,0,0)).
|
|
174
|
+
* rgb(255,24,0); converted it decodes to rgb(252,0,0)). It rounds exactly
|
|
175
|
+
* (swscale's fast path rounds down), and the values are the scene's sRGB
|
|
176
|
+
* ones, so it names sRGB's curve (see SRGB_TAGS). */
|
|
175
177
|
async function deliverMp4(
|
|
176
178
|
inMov: string,
|
|
177
179
|
outMp4: string,
|
|
@@ -184,9 +186,9 @@ async function deliverMp4(
|
|
|
184
186
|
vf.push(`tmix=frames=${M}`, `fps=${baseFps}`);
|
|
185
187
|
}
|
|
186
188
|
vf.push(
|
|
187
|
-
"scale=in_color_matrix=bt601:out_color_matrix=bt709",
|
|
189
|
+
"scale=in_color_matrix=bt601:out_color_matrix=bt709:flags=accurate_rnd+full_chroma_int",
|
|
188
190
|
"format=yuv420p",
|
|
189
|
-
|
|
191
|
+
SRGB_TAGS,
|
|
190
192
|
);
|
|
191
193
|
await run(await resolveFfmpeg(), [
|
|
192
194
|
"-y",
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
// What changed between two saved states of one page (`make --states`): the
|
|
2
|
+
// same element found in both (element ids are per state), and what happened
|
|
3
|
+
// to it — its text, its box — or that it appeared or went. Recipes use it to
|
|
4
|
+
// find an element again after an action and to keep a lifted element clear
|
|
5
|
+
// of what the action changed; `open-take states` uses it to tell the model
|
|
6
|
+
// what each action did.
|
|
7
|
+
|
|
8
|
+
import type { StateElement, StateIndex } from "./state-index";
|
|
9
|
+
|
|
10
|
+
type Box = [number, number, number, number];
|
|
11
|
+
|
|
12
|
+
/** What an element reads as: its accessible name, else its own text. */
|
|
13
|
+
export const elementLabel = (e: StateElement): string => e.name ?? e.text ?? "";
|
|
14
|
+
|
|
15
|
+
function iou(a: Box, b: Box): number {
|
|
16
|
+
const x0 = Math.max(a[0], b[0]),
|
|
17
|
+
y0 = Math.max(a[1], b[1]),
|
|
18
|
+
x1 = Math.min(a[0] + a[2], b[0] + b[2]),
|
|
19
|
+
y1 = Math.min(a[1] + a[3], b[1] + b[3]);
|
|
20
|
+
const inter = Math.max(0, x1 - x0) * Math.max(0, y1 - y0);
|
|
21
|
+
const union = a[2] * a[3] + b[2] * b[3] - inter;
|
|
22
|
+
return union > 0 ? inter / union : 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Pairs `a` element id → `b` element id: first the element the DOM kept in
|
|
26
|
+
* place (same path and tag — unless it reads differently AND sits somewhere
|
|
27
|
+
* else, which is a different element that took the slot), then a unique
|
|
28
|
+
* (tag, role, label) among the rest, then the same tag overlapping most. */
|
|
29
|
+
export function matchStates(a: StateIndex, b: StateIndex): Map<string, string> {
|
|
30
|
+
const pairs = new Map<string, string>();
|
|
31
|
+
const taken = new Set<string>();
|
|
32
|
+
const pair = (ea: StateElement, eb: StateElement) => {
|
|
33
|
+
pairs.set(ea.id, eb.id);
|
|
34
|
+
taken.add(eb.id);
|
|
35
|
+
};
|
|
36
|
+
const byPath = new Map(b.elements.map((e) => [e.path.join("."), e]));
|
|
37
|
+
const aByPath = new Map(a.elements.map((e) => [e.path.join("."), e]));
|
|
38
|
+
const bById = new Map(b.elements.map((e) => [e.id, e]));
|
|
39
|
+
const shift = (ea: StateElement, eb: StateElement) => [
|
|
40
|
+
eb.box[0] - ea.box[0],
|
|
41
|
+
eb.box[1] - ea.box[1],
|
|
42
|
+
];
|
|
43
|
+
for (const ea of a.elements) {
|
|
44
|
+
const eb = byPath.get(ea.path.join("."));
|
|
45
|
+
if (!eb || eb.tag !== ea.tag) continue;
|
|
46
|
+
// an element riding along with its (matched) parent is the same element,
|
|
47
|
+
// whatever it now reads — a badge whose box moved with it
|
|
48
|
+
const parentA = aByPath.get(ea.path.slice(0, -1).join("."));
|
|
49
|
+
const parentB =
|
|
50
|
+
parentA && pairs.has(parentA.id) ? bById.get(pairs.get(parentA.id)!) : undefined;
|
|
51
|
+
const rode =
|
|
52
|
+
parentA !== undefined &&
|
|
53
|
+
parentB !== undefined &&
|
|
54
|
+
shift(parentA, parentB).every((d, i) => Math.abs(d - shift(ea, eb)[i]!) <= 3);
|
|
55
|
+
const overlap = iou(ea.box, eb.box);
|
|
56
|
+
if (!rode) {
|
|
57
|
+
// a relabelled element somewhere else is a different element in the slot
|
|
58
|
+
if (elementLabel(ea) !== elementLabel(eb) && overlap < 0.1) continue;
|
|
59
|
+
// an unlabelled container is the same one only if it stayed roughly in
|
|
60
|
+
// place or kept some of what it showed (a bare leaf — a playhead line —
|
|
61
|
+
// is the same element wherever it went)
|
|
62
|
+
if (
|
|
63
|
+
!elementLabel(ea) &&
|
|
64
|
+
!elementLabel(eb) &&
|
|
65
|
+
overlap < 0.3 &&
|
|
66
|
+
subtree(a, ea.id).length > 1 &&
|
|
67
|
+
!sharesContent(a, ea, b, eb)
|
|
68
|
+
)
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
pair(ea, eb);
|
|
72
|
+
}
|
|
73
|
+
const sig = (e: StateElement) => `${e.tag}|${e.role ?? ""}|${elementLabel(e)}`;
|
|
74
|
+
const count = (list: StateElement[]) => {
|
|
75
|
+
const n = new Map<string, number>();
|
|
76
|
+
for (const e of list) n.set(sig(e), (n.get(sig(e)) ?? 0) + 1);
|
|
77
|
+
return n;
|
|
78
|
+
};
|
|
79
|
+
let restA = a.elements.filter((e) => !pairs.has(e.id));
|
|
80
|
+
let restB = b.elements.filter((e) => !taken.has(e.id));
|
|
81
|
+
const na = count(restA),
|
|
82
|
+
nb = count(restB);
|
|
83
|
+
const unique = new Map(restB.filter((e) => nb.get(sig(e)) === 1).map((e) => [sig(e), e]));
|
|
84
|
+
for (const ea of restA) {
|
|
85
|
+
if (!elementLabel(ea) || na.get(sig(ea)) !== 1) continue;
|
|
86
|
+
const eb = unique.get(sig(ea));
|
|
87
|
+
if (eb) pair(ea, eb);
|
|
88
|
+
}
|
|
89
|
+
restA = a.elements.filter((e) => !pairs.has(e.id));
|
|
90
|
+
restB = b.elements.filter((e) => !taken.has(e.id));
|
|
91
|
+
const candidates: [number, StateElement, StateElement][] = [];
|
|
92
|
+
for (const ea of restA)
|
|
93
|
+
for (const eb of restB)
|
|
94
|
+
if (ea.tag === eb.tag) {
|
|
95
|
+
const o = iou(ea.box, eb.box);
|
|
96
|
+
if (o >= 0.5) candidates.push([o, ea, eb]);
|
|
97
|
+
}
|
|
98
|
+
candidates.sort((x, y) => y[0] - x[0]);
|
|
99
|
+
for (const [, ea, eb] of candidates) if (!pairs.has(ea.id) && !taken.has(eb.id)) pair(ea, eb);
|
|
100
|
+
return pairs;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export type StateChange =
|
|
104
|
+
| { kind: "added"; b: StateElement }
|
|
105
|
+
| { kind: "removed"; a: StateElement }
|
|
106
|
+
| {
|
|
107
|
+
kind: "changed";
|
|
108
|
+
a: StateElement;
|
|
109
|
+
b: StateElement;
|
|
110
|
+
text: boolean;
|
|
111
|
+
moved: boolean;
|
|
112
|
+
resized: boolean;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/** Everything that differs between two states, in `b`'s document order
|
|
116
|
+
* (removals last). A box change under 3 px is layout noise, not a change. */
|
|
117
|
+
export function diffStates(a: StateIndex, b: StateIndex): StateChange[] {
|
|
118
|
+
const pairs = matchStates(a, b);
|
|
119
|
+
const back = new Map([...pairs].map(([ia, ib]) => [ib, ia]));
|
|
120
|
+
const byId = new Map(a.elements.map((e) => [e.id, e]));
|
|
121
|
+
const out: StateChange[] = [];
|
|
122
|
+
for (const eb of b.elements) {
|
|
123
|
+
const ia = back.get(eb.id);
|
|
124
|
+
if (!ia) {
|
|
125
|
+
out.push({ kind: "added", b: eb });
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
const ea = byId.get(ia)!;
|
|
129
|
+
const text = elementLabel(ea) !== elementLabel(eb);
|
|
130
|
+
const moved = Math.abs(ea.box[0] - eb.box[0]) > 2 || Math.abs(ea.box[1] - eb.box[1]) > 2;
|
|
131
|
+
const resized = Math.abs(ea.box[2] - eb.box[2]) > 2 || Math.abs(ea.box[3] - eb.box[3]) > 2;
|
|
132
|
+
if (text || moved || resized) out.push({ kind: "changed", a: ea, b: eb, text, moved, resized });
|
|
133
|
+
}
|
|
134
|
+
for (const ea of a.elements) if (!pairs.has(ea.id)) out.push({ kind: "removed", a: ea });
|
|
135
|
+
return out;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** The element and everything inside it (by path). */
|
|
139
|
+
export function subtree(index: StateIndex, id: string): StateElement[] {
|
|
140
|
+
const root = index.elements.find((e) => e.id === id);
|
|
141
|
+
if (!root) return [];
|
|
142
|
+
const p = root.path;
|
|
143
|
+
return index.elements.filter(
|
|
144
|
+
(e) => e.path.length >= p.length && p.every((v, i) => e.path[i] === v),
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** What an element shows: its own text, or its name when the name is that
|
|
149
|
+
* text in full (a span whose text is split by inline children reads whole),
|
|
150
|
+
* or its name alone when it has no text (an icon button's label) — never a
|
|
151
|
+
* tooltip over visible text. */
|
|
152
|
+
export function visibleLabel(e: StateElement): string {
|
|
153
|
+
const text = (e.text ?? "").trim(),
|
|
154
|
+
name = (e.name ?? "").trim();
|
|
155
|
+
if (text && inOrder(text, name)) return name;
|
|
156
|
+
return text || name;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** Every word of `part` appears in `whole`, in order (the text around an
|
|
160
|
+
* inline child — "click a | in the timeline" — against the whole sentence).
|
|
161
|
+
* Labels are capped at 80 characters by the probe: a capped `part` may end
|
|
162
|
+
* mid-word, and a capped `whole` may simply stop early. */
|
|
163
|
+
function inOrder(part: string, whole: string): boolean {
|
|
164
|
+
const capped = (label: string) => label.length >= 79;
|
|
165
|
+
const words = whole.split(/\s+/);
|
|
166
|
+
const need = part.split(/\s+/);
|
|
167
|
+
if (capped(part)) need.pop();
|
|
168
|
+
let at = 0;
|
|
169
|
+
for (const w of need) {
|
|
170
|
+
while (at < words.length && words[at] !== w) at++;
|
|
171
|
+
if (at >= words.length) return capped(whole);
|
|
172
|
+
at++;
|
|
173
|
+
}
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** What an element shows with everything inside it, in document order:
|
|
178
|
+
* each element's visible label, leaving out a label that an element already
|
|
179
|
+
* read contains (the pieces of a sentence read once). */
|
|
180
|
+
export function contentOf(index: StateIndex, id: string): string[] {
|
|
181
|
+
const out: string[] = [];
|
|
182
|
+
for (const e of subtree(index, id)) {
|
|
183
|
+
const label = visibleLabel(e);
|
|
184
|
+
if (!label || out.some((l) => l.includes(label))) continue;
|
|
185
|
+
out.push(label);
|
|
186
|
+
}
|
|
187
|
+
return out;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function sharesContent(a: StateIndex, ea: StateElement, b: StateIndex, eb: StateElement): boolean {
|
|
191
|
+
const mine = new Set(contentOf(a, ea.id));
|
|
192
|
+
return mine.size > 0 && contentOf(b, eb.id).some((l) => mine.has(l));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** Where on the page an action changed something (boxes in `b`), leaving
|
|
196
|
+
* out one element's own subtree — the element being shown on its own. */
|
|
197
|
+
export function changedBoxes(a: StateIndex, b: StateIndex, except?: string): Box[] {
|
|
198
|
+
const inside = new Set(except ? subtree(a, except).map((e) => e.id) : []);
|
|
199
|
+
const insideB = new Set<string>();
|
|
200
|
+
if (except) {
|
|
201
|
+
const pairs = matchStates(a, b);
|
|
202
|
+
const mine = pairs.get(except);
|
|
203
|
+
if (mine) for (const e of subtree(b, mine)) insideB.add(e.id);
|
|
204
|
+
}
|
|
205
|
+
const boxes: Box[] = [];
|
|
206
|
+
for (const c of diffStates(a, b)) {
|
|
207
|
+
if (c.kind === "removed") {
|
|
208
|
+
if (!inside.has(c.a.id)) boxes.push(c.a.box);
|
|
209
|
+
} else if (!insideB.has(c.b.id)) {
|
|
210
|
+
boxes.push(c.b.box);
|
|
211
|
+
if (c.kind === "changed" && (c.moved || c.resized)) boxes.push(c.a.box);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return boxes;
|
|
215
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// A saved interface state (`make --states`): the folder a `state` layer names
|
|
2
|
+
// holds state.html — the page as it stood at a settled moment of the
|
|
3
|
+
// recording, re-renderable offline — and index.json, what was on screen
|
|
4
|
+
// element by element. The runtime writes both (runtime/src/dom-state.ts);
|
|
5
|
+
// validation and the HTML renderer's staging read them here.
|
|
6
|
+
|
|
7
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
8
|
+
import { join } from "node:path";
|
|
9
|
+
import { elementLabel, subtree } from "./state-diff";
|
|
10
|
+
|
|
11
|
+
export type StateElement = {
|
|
12
|
+
/** "e<N>" — stable within its state */
|
|
13
|
+
id: string;
|
|
14
|
+
/** element-child indices from <html> */
|
|
15
|
+
path: number[];
|
|
16
|
+
tag: string;
|
|
17
|
+
role?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
text?: string;
|
|
20
|
+
/** viewport CSS px: x, y, width, height */
|
|
21
|
+
box: [number, number, number, number];
|
|
22
|
+
fixed?: true;
|
|
23
|
+
interactive?: true;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type StateIndex = {
|
|
27
|
+
version: 1;
|
|
28
|
+
id: string;
|
|
29
|
+
url: string;
|
|
30
|
+
title: string;
|
|
31
|
+
/** capture timeline ms */
|
|
32
|
+
tMs: number;
|
|
33
|
+
/** the plan step it follows (absent for the first) */
|
|
34
|
+
step?: number;
|
|
35
|
+
viewport: { w: number; h: number; dpr: number };
|
|
36
|
+
scroll: { x: number; y: number };
|
|
37
|
+
elements: StateElement[];
|
|
38
|
+
/** the page's major regions, back to front (element ids) */
|
|
39
|
+
layers: string[];
|
|
40
|
+
/** state.html re-rendered against the recording at capture time */
|
|
41
|
+
fidelity?: { psnr: number; diffFrac: number; ok: boolean };
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const positive = (v: unknown): v is number => typeof v === "number" && v > 0 && Number.isFinite(v);
|
|
45
|
+
|
|
46
|
+
/** The index of the saved state in `folder`, or why there is none. */
|
|
47
|
+
export function readStateIndex(folder: string): StateIndex | string {
|
|
48
|
+
let raw: unknown;
|
|
49
|
+
try {
|
|
50
|
+
raw = JSON.parse(readFileSync(join(folder, "index.json"), "utf8"));
|
|
51
|
+
} catch (e) {
|
|
52
|
+
return (e as NodeJS.ErrnoException).code === "ENOENT"
|
|
53
|
+
? `no saved state at ${folder} (index.json is missing — record the take with --states)`
|
|
54
|
+
: `unreadable index.json in ${folder}: ${(e as Error).message}`;
|
|
55
|
+
}
|
|
56
|
+
const index = raw as Partial<StateIndex> | null;
|
|
57
|
+
if (
|
|
58
|
+
index?.version !== 1 ||
|
|
59
|
+
!positive(index.viewport?.w) ||
|
|
60
|
+
!positive(index.viewport?.h) ||
|
|
61
|
+
!Array.isArray(index.elements)
|
|
62
|
+
)
|
|
63
|
+
return `index.json in ${folder} is not a version-1 saved state`;
|
|
64
|
+
if (!existsSync(join(folder, "state.html"))) return `state.html is missing from ${folder}`;
|
|
65
|
+
return index as StateIndex;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** The elements a film could lift out on their own: at least two labelled
|
|
69
|
+
* things inside, 0.3–20% of the page, and — of a chain of wrappers that
|
|
70
|
+
* share one box — the outermost (`maxFrac` raises the 20%). Element ids of `index`. (`open-take states`
|
|
71
|
+
* marks these as cards; the component probe adds the visual test on top.) */
|
|
72
|
+
export function cardsOf(
|
|
73
|
+
index: StateIndex,
|
|
74
|
+
byPath?: Map<string, StateElement>,
|
|
75
|
+
opts: { maxFrac?: number } = {},
|
|
76
|
+
): Set<string> {
|
|
77
|
+
const maxFrac = opts.maxFrac ?? 0.2;
|
|
78
|
+
const paths = byPath ?? new Map(index.elements.map((e) => [e.path.join("."), e]));
|
|
79
|
+
const page = index.viewport.w * index.viewport.h;
|
|
80
|
+
const area = (b: StateElement["box"]) => Math.max(0, b[2]) * Math.max(0, b[3]);
|
|
81
|
+
const sameBox = (a: StateElement["box"], b: StateElement["box"]) =>
|
|
82
|
+
a.every((v, i) => Math.abs(v - b[i]!) <= 2);
|
|
83
|
+
const qualifies = new Set<string>();
|
|
84
|
+
for (const e of index.elements) {
|
|
85
|
+
const frac = area(e.box) / page;
|
|
86
|
+
if (frac < 0.003 || frac > maxFrac) continue;
|
|
87
|
+
let labelled = 0;
|
|
88
|
+
for (const d of subtree(index, e.id)) if (d.id !== e.id && elementLabel(d).trim()) labelled++;
|
|
89
|
+
if (labelled >= 2) qualifies.add(e.id);
|
|
90
|
+
}
|
|
91
|
+
const cards = new Set<string>();
|
|
92
|
+
for (const e of index.elements) {
|
|
93
|
+
if (!qualifies.has(e.id)) continue;
|
|
94
|
+
const parent = paths.get(e.path.slice(0, -1).join("."));
|
|
95
|
+
if (parent && parent !== e && qualifies.has(parent.id) && sameBox(parent.box, e.box)) continue;
|
|
96
|
+
cards.add(e.id);
|
|
97
|
+
}
|
|
98
|
+
return cards;
|
|
99
|
+
}
|
package/src/types.ts
CHANGED
|
@@ -49,6 +49,31 @@ export type CaptureEventBase = {
|
|
|
49
49
|
* branch is skipped (the director can't tell nav from popover on bbox alone —
|
|
50
50
|
* it says so in the beat's `reason`). */
|
|
51
51
|
changeCoverage?: number;
|
|
52
|
+
/** DOM STATES (opt-in `--states`): id of the state captured AFTER this
|
|
53
|
+
* action settled — `<take>.take/states/<state>/` holds its `state.html` +
|
|
54
|
+
* `index.json` (the page's live structure at that moment). Absent when the
|
|
55
|
+
* take was made without states. */
|
|
56
|
+
state?: string;
|
|
57
|
+
/** DOM STATES: the element id (in the state captured BEFORE this action,
|
|
58
|
+
* i.e. the previous event's `state`, or `s0`) whose box best matched this
|
|
59
|
+
* action's `box` (IoU ≥ 0.5) — the control that was acted on, addressable
|
|
60
|
+
* in that state's `index.json` / `data-ot-id`. Absent when no element
|
|
61
|
+
* matched or the event carries no box. */
|
|
62
|
+
target?: string;
|
|
63
|
+
/** CAPTURE-DERIVED (frame-diff pass): when the action's RESULT showed in the
|
|
64
|
+
* recording, on the capture timeline (ms) — the input time is `tMs`, and a
|
|
65
|
+
* result can come a second or more after it. `atMs`: the first frame where
|
|
66
|
+
* at least half of what finally changed in the dominant changed region has
|
|
67
|
+
* changed; `doneMs`: the first frame from which that region stays as it
|
|
68
|
+
* ends up. `box` is that region (viewport CSS px). Read off the encoded
|
|
69
|
+
* frames, so only as fine as what the screencast delivered. Absent when
|
|
70
|
+
* nothing measurable changed before the next action. */
|
|
71
|
+
result?: { atMs: number; doneMs: number; box: BBox };
|
|
72
|
+
/** CAPTURE-DERIVED (settle probe): capture-timeline ms when the page's DOM,
|
|
73
|
+
* requests and timers last went quiet after this action — an estimate from
|
|
74
|
+
* page STRUCTURE (it cannot see paints inside a canvas or video). Absent
|
|
75
|
+
* when the probe saw no activity after the input, or was not running. */
|
|
76
|
+
settledMs?: number;
|
|
52
77
|
};
|
|
53
78
|
|
|
54
79
|
/** A click (or a type's focus-click): an instantaneous action at a point. */
|
|
@@ -213,6 +238,39 @@ export type CaptureLog = {
|
|
|
213
238
|
* beat's payoff had appeared, and `settleMs` is doing the whole job alone.
|
|
214
239
|
* Absent on an ordinary DOM app. */
|
|
215
240
|
paintedFrac?: number;
|
|
241
|
+
/** DOM STATES (opt-in `--states`): the page's UI structure saved at every
|
|
242
|
+
* settled moment — `s0` after the warmup, then one after each plan step's
|
|
243
|
+
* final hold. `dir` is relative to the take's working dir (`states`); each
|
|
244
|
+
* item has `states/<id>/state.html` (a self-contained, script-inert copy of
|
|
245
|
+
* the live page), `index.json` (`DomStateIndex`: url, viewport, scroll, the
|
|
246
|
+
* visible elements with boxes, the major layers) and `live.png` (the 1×
|
|
247
|
+
* reference screenshot). `fidelity` scores the state's re-render against
|
|
248
|
+
* that reference — `ok: false` means the film must use the video for this
|
|
249
|
+
* moment. Absent when the take was made without states. */
|
|
250
|
+
states?: {
|
|
251
|
+
dir: string;
|
|
252
|
+
items: {
|
|
253
|
+
id: string;
|
|
254
|
+
/** capture timeline ms when it was taken */
|
|
255
|
+
tMs: number;
|
|
256
|
+
/** plan step index it follows (absent for s0) */
|
|
257
|
+
step?: number;
|
|
258
|
+
fidelity?: { psnr: number; diffFrac: number; ok: boolean };
|
|
259
|
+
/** CAPTURE-DERIVED (frame-diff pass): how the recording's frame at
|
|
260
|
+
* `tMs` lines up with this state's reference screenshot (`live.png`).
|
|
261
|
+
* `dx`,`dy`: where the state's content sits in the recording, CSS px
|
|
262
|
+
* (state point p shows at p + (dx, dy)); `meanDiff`: the mean grey
|
|
263
|
+
* difference (0..255) left at that shift, `diffFrac` the share of
|
|
264
|
+
* pixels still differing by more than 48 grey levels — compression
|
|
265
|
+
* and text antialiasing alone stay under that. Absent when it could
|
|
266
|
+
* not be measured. */
|
|
267
|
+
seam?: { dx: number; dy: number; meanDiff: number; diffFrac: number };
|
|
268
|
+
/** the page was still moving at this moment (it never went quiet, and
|
|
269
|
+
* its pixels moved): nothing was saved — reading a still of a moving
|
|
270
|
+
* page would stall the app being filmed, and misrepresent the moment */
|
|
271
|
+
moving?: true;
|
|
272
|
+
}[];
|
|
273
|
+
};
|
|
216
274
|
};
|
|
217
275
|
|
|
218
276
|
// --- the composition (editable) ----------------------------------------
|
|
@@ -588,7 +646,7 @@ export const DEFAULT_CURSOR: CursorConfig = {
|
|
|
588
646
|
// critically-damped spring that IS the measured SS curve over these windows.
|
|
589
647
|
zoomOutMs: 1340,
|
|
590
648
|
zoomInMs: 730,
|
|
591
|
-
// Asymptotic settle + pull-out dwell — the
|
|
649
|
+
// Asymptotic settle + pull-out dwell — the "C variant" signed off in an A/B viewing
|
|
592
650
|
// (2026-07-26): each camera move keeps a ~4% residual settling INTO the hold
|
|
593
651
|
// (no velocity cliff at the keyframe — the frame-tracked reference tail), and
|
|
594
652
|
// a squeezed pull-out stays ≥800ms on the payoff, landing late instead of
|
package/starter/PLAN.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Plan
|
|
2
|
+
|
|
3
|
+
Filled before building; changed as the drafts change the film.
|
|
4
|
+
|
|
5
|
+
## The product, used
|
|
6
|
+
|
|
7
|
+
What was put through it (something of your own, not only what it opens with):
|
|
8
|
+
|
|
9
|
+
Everything it does, each run once — a line each, with the number or result it gave:
|
|
10
|
+
|
|
11
|
+
1.
|
|
12
|
+
2.
|
|
13
|
+
3.
|
|
14
|
+
|
|
15
|
+
## The film that comes to mind first
|
|
16
|
+
|
|
17
|
+
A line a card, in order:
|
|
18
|
+
|
|
19
|
+
1.
|
|
20
|
+
2.
|
|
21
|
+
3.
|
|
22
|
+
|
|
23
|
+
Which marks of the tour (START.md, "What viewings showed") it carries:
|
|
24
|
+
|
|
25
|
+
## The film
|
|
26
|
+
|
|
27
|
+
One sentence — what the thing was, what the product did to it, where it ends:
|
|
28
|
+
|
|
29
|
+
Its shape, and why this product (asked, then made: request → status → built in stages → result; or the thing in trouble with a number, the product happening to it, the number changed; or another):
|
|
30
|
+
|
|
31
|
+
The thing followed, and where it is in the first frame and the last:
|
|
32
|
+
|
|
33
|
+
The trouble it is in, and the number on it; that number at the end; what is different for whoever owns it:
|
|
34
|
+
|
|
35
|
+
The material — what it is, how big, where it comes from (real and public, the product's own sample, or written for the film and marked as a demo):
|
|
36
|
+
|
|
37
|
+
How the product's interface is on screen (rebuilt live / a part / a screenshot as evidence), and what acts on it (a cursor, a typed request, the thing itself):
|
|
38
|
+
|
|
39
|
+
Every line of "everything it does", in or out — in: the stretch it happens in; out: why a viewer will not miss it:
|
|
40
|
+
|
|
41
|
+
| # | what it does | in (stretch) | out (why a viewer will not miss it) |
|
|
42
|
+
|---|---|---|---|
|
|
43
|
+
| 1 | | | |
|
|
44
|
+
| 2 | | | |
|
|
45
|
+
| 3 | | | |
|
|
46
|
+
|
|
47
|
+
Length: planned ___ s in ___ stretches, ___ of the ___ functions in. The reference: 57.8 s in 23 stretches (median 2.5 s); the six (`reference/travel/`): 41–85 s, a step a shot or station, a new picture every 1.4–2.7 s. If yours is much shorter, which of the outs it is shorter by:
|
|
48
|
+
|
|
49
|
+
How the picture is kept alive, and why for this product (a camera that travels from station to station; a camera at rest while things are made in front of it; which stretches do which):
|
|
50
|
+
|
|
51
|
+
## Stretches
|
|
52
|
+
|
|
53
|
+
One row a stretch. Layers back to front (backdrop, far, the subject, near, and the words pinned to the screen). Out: what crosses into the next stretch and how — carried (`carry`), hidden in a move (`hidden-cut`), a lift (`lift`), or a cut on purpose. Picture: where it travels and where it holds, and what the hold is for (reading, counting, the turn). Words: what is on screen and what it says is happening. Sound: the structural moment here, if any (low end in or out, a build, a drop, a hit on a move's start or landing, a drop-out).
|
|
54
|
+
|
|
55
|
+
| s | stretch | function | what the viewer should feel | layers | out (what crosses, how) | picture (travels / holds, why) | words on screen | sound |
|
|
56
|
+
|---|---|---|---|---|---|---|---|---|
|
|
57
|
+
| | | | | | | | | |
|
|
58
|
+
|
|
59
|
+
Story turns, and the sound moment each sits on:
|
|
60
|
+
|
|
61
|
+
## Checks
|
|
62
|
+
|
|
63
|
+
Each round, before anything new: every change the last round asked for, looked for on the new draft at its second — a still or the sheet, not the notes. A change written down as made is not a change seen.
|
|
64
|
+
|
|
65
|
+
| round | asked for | at (s) | seen on the draft? (yes / no / not looked at) | where seen (still, sheet) |
|
|
66
|
+
|---|---|---|---|---|
|
|
67
|
+
| | | | | |
|
|
68
|
+
|
|
69
|
+
Before the master, each one marked yes, no or not looked at:
|
|
70
|
+
|
|
71
|
+
- every boundary in the render's strip: something crosses, or the cut is meant
|
|
72
|
+
- each transition at 0.1 s a frame: every frame has one thing to look at
|
|
73
|
+
- after each camera move: the words inside the frame's safe margin, readable at phone size (`film probe`, text lane)
|
|
74
|
+
- the held frames of each stretch, small in a row with the words covered: the sections and the light and dark between them can be told apart
|
|
75
|
+
- every stretch called still: something of the product happens in it, or it is gone
|
|
76
|
+
- the timing measured (`film listen`, `film probe`), and the whole film met as a viewer meets it, not only the seconds that changed (`film viewer` on this cut, or the sheet and frames in order): two different things, each marked
|
|
77
|
+
|
|
78
|
+
## Changes
|
|
79
|
+
|
|
80
|
+
Draft by draft. A stretch called still gets the next function happening to the thing first; a cut is for what repeats.
|
|
81
|
+
|
|
82
|
+
| draft | length (s) | stretches | functions shown (of all listed) | what the sheet and the viewer showed | what was changed (a stretch cut, or filled with which function) |
|
|
83
|
+
|---|---|---|---|---|---|
|
|
84
|
+
| 1 | | | | | |
|