MCPcopy Index your code
hub / github.com/NyarchLinux/DesktopPuppet / _start_animation

Method _start_animation

puppet_extension.py:260–267  ·  view source on GitHub ↗
(self, amplitudes: list[float], frame_rate=10)

Source from the content-addressed store, hash-verified

258 self.set_overlay("background")
259
260 def _start_animation(self, amplitudes: list[float], frame_rate=10):
261 max_amplitude = max(amplitudes)
262 for amplitude in amplitudes:
263 if self.stop_request:
264 self.set_mouth(0)
265 return
266 self.set_mouth(amplitude/max_amplitude)
267 sleep(1/frame_rate)
268
269 def set_mouth(self, value):
270 requests.post(f'{self.base_url}/mouth', json={'amplitude': value})

Callers

nothing calls this directly

Calls 1

set_mouthMethod · 0.95

Tested by

no test coverage detected