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

#initialize ⇒ FPSBalancer

Create a new FPSBalancer



895
896
# File 'docs/0_Dependencies.rb', line 895

def initialize
end

Class Attribute Details

.global ⇒ FPSBalancer (readonly)

Get the global balancer

Returns:



922
923
924
# File 'docs/0_Dependencies.rb', line 922

def global
  @global
end

.globally_enabled ⇒ Boolean

Get if the FPS balancing is globally enabled

Returns:

  • (Boolean)


916
917
918
# File 'docs/0_Dependencies.rb', line 916

def globally_enabled
  @globally_enabled
end

.last_f3_up ⇒ Time

Get last time F3 was pressed

Returns:

  • (Time)


919
920
921
# File 'docs/0_Dependencies.rb', line 919

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



908
909
# File 'docs/0_Dependencies.rb', line 908

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



902
903
# File 'docs/0_Dependencies.rb', line 902

def run(&block)
end

#skipping? ⇒ Boolean

Tell if the balancer is skipping frames

Returns:

  • (Boolean)


905
906
# File 'docs/0_Dependencies.rb', line 905

def skipping?
end

#update

Update the metrics of the FPSBalancer



898
899
# File 'docs/0_Dependencies.rb', line 898

def update
end