Thanks for the reply! I read the notebook you linked. Using viewof x.value
looks promising, but I just realized I omitted part of the problem. My notebook actually looks more like this:
speedInMilesPerHour = viewof html`<input min="0" max="10">`
speedInMetersPerSecond = speedInMilesPerHour * 0.44704
position = {
let position = 0;
let lastUpdated = performance.now();
while (true) {
const currentTime = performance.now();
position += speedInMetersPerSecond * (currentTime - lastUpdated) / 1000;
lastUpdated = currentTime;
yield position;
}
}
Is there any way to get the value of speedInMetersPerSecond
non-reactively?