DriftTexture · function
predictViews
Fill out with one view matrix per predicted frame, and leave the simulation exactly as found.
Explained in DriftTexture.
function predictViews(sim: SimulationHandle, frames: number, dt: number, out: Float32Array): numberimport { predictViews } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
sim | SimulationHandle | |
frames | number | |
dt | number | |
out | Float32Array |
In depth
Returns how many views were written — fewer than frames when out cannot hold them all.
Saved once and restored once, however many frames are predicted: the intermediate states are not wanted, only the views they imply.