diff options
Diffstat (limited to 'cli/app/search/live.py')
| -rw-r--r-- | cli/app/search/live.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/app/search/live.py b/cli/app/search/live.py index 5097229..06b679e 100644 --- a/cli/app/search/live.py +++ b/cli/app/search/live.py @@ -90,7 +90,7 @@ class SinParam: def __init__(self, name, shape, datatype="noise"): noise = LerpParam(name + '_noise', shape=shape, datatype=datatype) orbit_radius = InterpolatorParam(name=name + '_radius', value=0.25) - orbit_speed = InterpolatorParam(name=name + '_speed', value=1.0) + orbit_speed = InterpolatorParam(name=name + '_speed', value=FPS) orbit_time = InterpolatorParam(name=name + '_time', value=0.0) output = tf.math.sin(orbit_time.variable + noise.output) * orbit_radius.variable interpolator.sin_params[name] = self @@ -100,7 +100,7 @@ class SinParam: self.output = output def update(self, dt): - self.orbit_time.value += self.orbit_speed.value * dt + self.orbit_time.value += self.orbit_speed.value / FPS * dt class LerpParam: def __init__(self, name, shape, a_in=None, b_in=None, datatype="noise"): @@ -111,7 +111,7 @@ class LerpParam: a = InterpolatorParam(name=name + '_a', shape=shape, datatype=datatype) b = InterpolatorParam(name=name + '_b', shape=shape, datatype=datatype) n = InterpolatorParam(name=name + '_n', value=0.0) - speed = InterpolatorParam(name=name + '_speed', value=1.0) + speed = InterpolatorParam(name=name + '_speed', value=FPS) output = a.variable * (1 - n.variable) + b.variable * n.variable interpolator.lerp_params[name] = self self.name = name @@ -136,7 +136,7 @@ class LerpParam: def update(self, dt): if self.direction != 0: - self.n.value = clamp(self.n.value + self.direction * self.speed.value * dt) + self.n.value = clamp(self.n.value + self.direction * self.speed.value / FPS * dt) print("set_opt: {}_n {}".format(self.name, self.n.value)) if self.n.value == 0 or self.n.value == 1: self.direction = 0 |
