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): number
import { runPrediction } from '@driftengine/texture';

Parameters

ParameterTypeDescription
simSimulationHandle
predictorPredictor<T>
framesnumber
dtnumber
budgetnumber

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.