Where a load is drawn on a belt
32-bit, display onlyThe distance along a belt at which a load is drawn at a given time.
accumulating: s = min(v × t + c, S); stopping belt: s = D(t) − D at entry; drawn at max(0, s) + L ÷ 2
Uses the regimes the simulation recorded (c and S per load, or the belt's distance history found by binary search). The result only places a box in the view.
else if (sp && sp.type === 'conveyor' && g && g.path) {
let s;
if (r.k) {
let k = r.k[0];
for (const x of r.k) { if (x[0] <= t) k = x; else break; }
s = Math.min(sp.speed * t + k[1], k[2]);
} else {
const D = beltD(r.el, t);
s = D === null ? 0 : D - r.De;
}
at = along(r.el, Math.max(0, s) + r.L / 2);