Class FrameTimeInterpolator
Interpolated time between frames, works in seconds. See examples..
public class FrameTimeInterpolator
- Inheritance
-
FrameTimeInterpolator
- Inherited Members
- Extension Methods
Properties
FpsBuffer
Gets or sets the FPS buffer below target where frame skipping begins
public float FpsBuffer { get; set; }
Property Value
Instance
public static FrameTimeInterpolator Instance { get; }
Property Value
IsSkippingFrames
public bool IsSkippingFrames { get; protected set; }
Property Value
LastFrameStep
public float LastFrameStep { get; protected set; }
Property Value
ShouldReduceQuality
public bool ShouldReduceQuality { get; }
Property Value
TargetFps
Gets or sets the target FPS for the application
public float TargetFps { get; set; }
Property Value
Methods
GetDeltaTime(float)
Calculates the delta time for the current frame based on performance monitoring and the target FPS
public float GetDeltaTime(float currentFrameTime)
Parameters
currentFrameTimefloatThe current frame time from the game loop
Returns
- float
The delta time to use for game updates
GetDeltaTimeFromDelta(float)
Calculates the delta time for the current frame based on performance monitoring and the target FPS
public float GetDeltaTimeFromDelta(float actualDeltaTime)
Parameters
actualDeltaTimefloatThe actual delta time since last frame in seconds
Returns
- float
The delta time to use for game updates
Reset()
Resets the time interpolation state
public void Reset()