mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
Make transition exit at 50% of count depletion
speeds up exit states to look smoother
This commit is contained in:
parent
28b6c58a49
commit
55bcdec3cc
@ -33,4 +33,7 @@ class CycleCounter:
|
||||
self.max_count = max_count
|
||||
|
||||
def force_complete(self):
|
||||
self.count = self.max_count
|
||||
self.count = self.max_count
|
||||
|
||||
def less_than_percentage(self,mult):
|
||||
return self.count <= self.max_count * mult
|
||||
@ -179,7 +179,7 @@ class MirrorTrack:
|
||||
elif cls.cyc_counter_stare.active():
|
||||
cls.cyc_counter_stare.decrease()
|
||||
|
||||
if not cls.cyc_counter_stare.active():
|
||||
if cls.cyc_counter_stare.less_than_percentage(0.5):
|
||||
if cls.bypass_stare:
|
||||
cls.bypass_stare = False
|
||||
if not cls.is_tracking_mode():
|
||||
@ -205,7 +205,7 @@ class MirrorTrack:
|
||||
elif cls.cyc_counter_inv.active():
|
||||
cls.cyc_counter_inv.decrease()
|
||||
|
||||
if not cls.cyc_counter_inv.active():
|
||||
if cls.cyc_counter_inv.less_than_percentage(0.5):
|
||||
if cls.bypass_stare:
|
||||
cls.bypass_stare = False
|
||||
if cls.is_inverted_mode():
|
||||
|
||||
Loading…
Reference in New Issue
Block a user