mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
added support for ruby-prof, make trees jump to nearest vertex position.
This commit is contained in:
16
i-mic-fps.rb
16
i-mic-fps.rb
@@ -63,4 +63,18 @@ require_relative "lib/window"
|
||||
|
||||
MODEL_METER_SCALE = 0.001 # Objects exported from blender using the millimeter object scale will be close to 1 GL unit
|
||||
|
||||
IMICFPS::Window.new.show
|
||||
|
||||
if ARGV.join.include?("--profile")
|
||||
begin
|
||||
require "ruby-prof"
|
||||
RubyProf.start
|
||||
IMICFPS::Window.new.show
|
||||
result = RubyProf.stop
|
||||
printer = RubyProf::MultiPrinter.new(result)
|
||||
printer.print(path: ".", profile: "profile", min_percent: 2)
|
||||
rescue LoadError
|
||||
puts "ruby-prof not installed!"
|
||||
end
|
||||
else
|
||||
IMICFPS::Window.new.show
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user