transitionInputs = (duration, delay) =>
async function*(prev, expr, args) {
if (prev !== undefined) {
await Promises.delay(delay || 0);
const i = args.map((arg, index) => d3.interpolate(prev.args[index], arg));
let t = 0;
while (t < 1) {
yield Object.assign(
expr.apply(this, args.map((_, index) => i[index](t))),
{ args }
);
t += 1 / (duration * framerate);
}
}
yield Object.assign(expr.apply(this, args), { args });
}