Table of Contents

Class FrameTimeInterpolator

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll

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

float

Instance

public static FrameTimeInterpolator Instance { get; }

Property Value

FrameTimeInterpolator

IsSkippingFrames

public bool IsSkippingFrames { get; protected set; }

Property Value

bool

LastFrameStep

public float LastFrameStep { get; protected set; }

Property Value

float

ShouldReduceQuality

public bool ShouldReduceQuality { get; }

Property Value

bool

TargetFps

Gets or sets the target FPS for the application

public float TargetFps { get; set; }

Property Value

float

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

currentFrameTime float

The 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

actualDeltaTime float

The 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()