import { sampleWidthsPx } from './src/lib/core/measure.js'; const W = 400, H = 250; const mask = new Uint8Array(W * H); for (let y = 0; y < H; y++) for (let x = 0; x < W; x++) mask[y * W + x] = 1; // whole photo is slab const axis = { origin: {x:0, y:0}, dir: {x:1, y:0}, lengthPx: 336 }; const w = sampleWidthsPx(mask, W, H, axis, 160, 6); console.log('widths (full photo):', w); console.log('expected: [250, 250, 250] (t=0,96,192; t=288>336? no, 288<336 → also 250)'); console.log('samples at t=0,96,192,288 → 4 samples, each width=250');