lib/fusuma/plugin/detectors/swipe_detector.rb in fusuma-3.6.0 vs lib/fusuma/plugin/detectors/swipe_detector.rb in fusuma-3.6.1
- old
+ new
@@ -9,11 +9,11 @@
SOURCES = ["gesture"].freeze
BUFFER_TYPE = "gesture"
GESTURE_RECORD_TYPE = "swipe"
FINGERS = [3, 4].freeze
- BASE_THERESHOLD = 25
+ BASE_THRESHOLD = 25
# @param buffers [Array<Buffers::Buffer>]
# @return [Events::Event] if event is detected
# @return [NilClass] if event is NOT detected
def detect(buffers)
@@ -122,10 +122,10 @@
@threshold[index.cache_key] ||= begin
keys_specific = Config::Index.new [*index.keys, "threshold"]
keys_global = Config::Index.new ["threshold", type]
config_value = Config.search(keys_specific) ||
Config.search(keys_global) || 1
- BASE_THERESHOLD * config_value
+ BASE_THRESHOLD * config_value
end
end
# direction of gesture
class Direction