DriftTexture · function
runPrediction
Advance the simulation, ask the predictor what each predicted view needs, and put it back.
Explained in DriftTexture.
function runPrediction<T>(sim: SimulationHandle, predictor: Predictor<T>, frames: number, dt: number, budget: number): numberimport { runPrediction } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
sim | SimulationHandle | |
predictor | Predictor<T> | |
frames | number | |
dt | number | |
budget | number |
In depth
Returns how many requests were made. budget bounds the total across every predicted frame
rather than per frame, so a near frame cannot be starved by a distant one filling the queue.