Class: Graphics::FPSBalancer

Inherits:
Object
  • Object
show all
Defined in:
docs/0_Dependencies.rb

Overview

Class helping to balance FPS on FPS based things

Defined Under Namespace

Modules: Marker

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFPSBalancer

Create a new FPSBalancer



846
847
# File 'docs/0_Dependencies.rb', line 846

def initialize
end

Class Attribute Details

.globalFPSBalancer (readonly)

Get the global balancer

Returns:



876
877
878
# File 'docs/0_Dependencies.rb', line 876

def global
  @global
end

.globally_enabledBoolean

Get if the FPS balancing is globally enabled

Returns:

  • (Boolean)


870
871
872
# File 'docs/0_Dependencies.rb', line 870

def globally_enabled
  @globally_enabled
end

.last_f3_upTime

Get last time F3 was pressed

Returns:

  • (Time)


873
874
875
# File 'docs/0_Dependencies.rb', line 873

def last_f3_up
  @last_f3_up
end

Instance Method Details

#disable_skip_for_next_rendering

Force all the scripts to render if we’re about to do something important



859
860
# File 'docs/0_Dependencies.rb', line 859

def disable_skip_for_next_rendering
end

#run(&block)

Run code according to FPS Balancing (block will be executed only if it’s ok)

Parameters:

  • block (Proc)

    code to execute as much as needed



853
854
# File 'docs/0_Dependencies.rb', line 853

def run(&block)
end

#skipping?Boolean

Tell if the balancer is skipping frames

Returns:

  • (Boolean)


856
857
# File 'docs/0_Dependencies.rb', line 856

def skipping?
end

#update

Update the metrics of the FPSBalancer



849
850
# File 'docs/0_Dependencies.rb', line 849

def update
end