2025-03-18 22:58:13 +02:00

2.1 KiB

druid.widget.fps_panel API

at /druid/widget/fps_panel/fps_panel.lua

Functions

Fields

init


fps_panel:init()

on_remove


fps_panel:on_remove()

update


fps_panel:update([dt])
  • Parameters:
    • [dt] (any):

push_fps_value


fps_panel:push_fps_value()

Fields

  • root (node)

  • delta_time (number): in seconds

  • collect_time (integer): in seconds

  • collect_time_counter (integer)

  • graph_samples (number)

  • fps_samples (table): Store frame time in seconds last collect_time seconds

  • mini_graph (druid.widget.mini_graph): Widget to display a several lines with different height in a row Init, set amount of samples and max value of value means that the line will be at max height Use push_line_value to add a new value to the line Or set_line_value to set a value to the line by index Setup colors inside template file (at minimum and maximum)

  • text_min_fps (druid.text): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area

  • text_fps (druid.text): The component to handle text behaviour over a GUI Text node, mainly used to automatically adjust text size to fit the text area

  • timer_id (unknown)

  • previous_time (unknown)