File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -264,10 +264,12 @@ function set_fullscreen(value) {
264
264
265
265
curves = {
266
266
'linear' : ( a , b , t ) => {
267
- return lerp ( a , b , t ) } ,
267
+ return lerp ( a , b , t )
268
+ } ,
268
269
269
270
'out_expo' : ( a , b , t ) => {
270
- return lerp ( a , b , t * t ) }
271
+ return lerp ( a , b , t * t )
272
+ }
271
273
}
272
274
273
275
ASSETS_FOLDER = ''
@@ -729,8 +731,13 @@ class Entity {
729
731
if ( ! entity . enabled ) {
730
732
return false }
731
733
var t = i / duration / 60
732
- // entity[variable_name] = lerp(start_value, target_value, t)
733
- entity [ variable_name ] = curve ( start_value , target_value , t )
734
+ if ( typeof curve === 'function' ) {
735
+ entity [ variable_name ] = curve ( start_value , target_value , t )
736
+ }
737
+ else {
738
+ // fallback to linear
739
+ // entity[variable_name] = lerp(start_value, target_value, t)
740
+ }
734
741
} ,
735
742
1000 * i / 60
736
743
)
You can’t perform that action at this time.
0 commit comments