Class: FrameData

TankGame.FrameData()

Class used as a data class to store the current frame statistics. This includes dt, fps, and time since start.

Constructor

new FrameData()

constructor for the FrameData class. The data is automatically populated on creation using timing data from the previous frame that is stored in the Simulation.lastFrameTime and Simulation.firstFrameTime variables. If dt is greater than 100ms (for example when switching windows context, or by changing tabs) then dt is set to 10ms. Due to this time manipulation the time since start is different to the sum of all dts. Time since start is always the true difference between the start time and the current frame time.
Source:

Documentation generated by JSDoc 4.0.2 on Wed Oct 29 2025 23:51:01 GMT-0700 (Pacific Daylight Time)