-
Notifications
You must be signed in to change notification settings - Fork 0
/
modes.go
56 lines (51 loc) · 1.28 KB
/
modes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package please
import (
"github.com/Zyko0/please/internal/config"
"github.com/Zyko0/please/internal/locker"
)
type Mode string
const (
None Mode = "NONE"
Default Mode = "DEFAULT"
Medium Mode = "MEDIUM"
Unsafe Mode = "UNSAFE"
)
func SetMode(mode Mode) {
locker.Lock()
defer locker.Unlock()
config.Noop = false
switch mode {
case None:
config.Noop = true
case Default:
config.EffectTransformsCount = 1
config.EffectTransformDuration = 2
config.EffectTranslationFactor = 1
config.EffectScaleFactor = 2
config.EffectColorFactor = 1
config.EffectFrequency = 0.25
config.EventDuration = 5
config.ScreenEventDuration = 7.5
config.UniformFactor = 1
case Medium:
config.EffectTransformsCount = 2
config.EffectTransformDuration = 1.75
config.EffectTranslationFactor = 1.5
config.EffectScaleFactor = 4
config.EffectColorFactor = 1.25
config.EffectFrequency = 0.4
config.EventDuration = 4
config.ScreenEventDuration = 6
config.UniformFactor = 2
case Unsafe:
config.EffectTransformsCount = 5
config.EffectTransformDuration = 1.25
config.EffectTranslationFactor = 1.5
config.EffectScaleFactor = 4
config.EffectColorFactor = 1.5
config.EffectFrequency = 0.8
config.EventDuration = 2.5
config.ScreenEventDuration = 4
config.UniformFactor = 8
}
}