-
Notifications
You must be signed in to change notification settings - Fork 11
/
00warper.rpy
154 lines (129 loc) · 3.62 KB
/
00warper.rpy
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
python early hide:
@renpy.atl_warper
def power_in2(x):
if x >= 1.0:
return 1.0
return 1.0 - (1.0 - x)**2
@renpy.atl_warper
def power_out2(x):
if x >= 1.0:
return 1.0
return x**2
@renpy.atl_warper
def power_in3(x):
if x >= 1.0:
return 1.0
return 1.0 - (1.0 - x)**3
@renpy.atl_warper
def power_out3(x):
if x >= 1.0:
return 1.0
return x**3
@renpy.atl_warper
def power_in4(x):
if x >= 1.0:
return 1.0
return 1.0 - (1.0 - x)**4
@renpy.atl_warper
def power_out4(x):
if x >= 1.0:
return 1.0
return x**4
@renpy.atl_warper
def power_in5(x):
if x >= 1.0:
return 1.0
return 1.0 - (1.0 - x)**5
@renpy.atl_warper
def power_out5(x):
if x >= 1.0:
return 1.0
return x**5
@renpy.atl_warper
def power_in6(x):
if x >= 1.0:
return 1.0
return 1.0 - (1.0 - x)**6
@renpy.atl_warper
def power_out6(x):
if x >= 1.0:
return 1.0
return x**6
@renpy.atl_warper
def spring1(x):
from math import exp, cos
rho = 5 # 減衰率
mu = 30# 角振動数
return (1.0 - exp(-rho * x) * cos(mu * x)) / (1.0 - exp(-rho) * cos(mu))
@renpy.atl_warper
def spring2(x):
from math import exp, cos
rho = 5 # 減衰率
mu = 20# 角振動数
return (1.0 - exp(-rho * x) * cos(mu * x)) / (1.0 - exp(-rho) * cos(mu))
@renpy.atl_warper
def spring3(x):
from math import exp, cos
rho = 5 # 減衰率
mu = 10# 角振動数
return (1.0 - exp(-rho * x) * cos(mu * x)) / (1.0 - exp(-rho) * cos(mu))
@renpy.atl_warper
def bop_time_warp(x):
return -23.0 * x**5 + 57.5 * x**4 - 55 * x**3 + 25 * x**2 - 3.5 * x
@renpy.atl_warper
def bop_in_time_warp(x):
return -2.15 * x**2 + 3.15 * x
@renpy.atl_warper
def bop_out_time_warp(x):
return 2.15 * x**2 - 1.15 * x
@renpy.atl_warper
def bop_to_time_warp(x):
return -5 * x**5 + 5 * x**4 + x**2
@renpy.atl_warper
def to_bop_time_warp(x):
return -5 * x**5 + 20 * x**4 - 30 * x**3 + 19 * x**2 - 3 * x
@renpy.atl_warper
def easeout2(x):
if x >= 1.0:
return 1.0
import math
return 1.0 - math.cos(x * math.pi / 2.0)
@renpy.atl_warper
def easein2(x):
if x >= 1.0:
return 1.0
import math
return math.cos((1.0 - x) * math.pi / 2.0)
@renpy.atl_warper
def ease2(x):
if x >= 1.0:
return 1.0
import math
return .5 - math.cos(math.pi * x) / 2.0
@renpy.atl_warper
def power_in_time_warp_real(x):
if x >= 1.0:
return 1.0
return 1.0 - (1.0 - x)**6
#互換性のために残しておく
@renpy.atl_warper
def power_out_time_warp_real(x):
if x >= 1.0:
return 1.0
return 1.0 - (1.0 - x)**6
@renpy.atl_warper
def power_in_time_warp_real5(x):
if x >= 1.0:
return 1.0
return 1.0 - (1.0 - x)**5
@renpy.atl_warper
def power_out_time_warp_real5(x):
if x >= 1.0:
return 1.0
return x**5
@renpy.atl_warper
def loop_cos(x):
from math import cos, pi
if x >= 1.0:
return 1.0
return (-1*cos(x*2*pi)+1)/2