MCPcopy Index your code
hub / github.com/SpectacularAI/sdk / update

Method update

python/cli/visualization/visualizer.py:36–48  ·  view source on GitHub ↗
(self, eye, target, paused)

Source from the content-addressed store, hash-verified

34 self.prevLookAtTarget = None
35
36 def update(self, eye, target, paused):
37 if self.prevLookAtEye is not None:
38 if paused: return self.prevLookAtEye, self.prevLookAtTarget
39 eyeSmooth = self.alpha * eye + (1.0 - self.alpha) * self.prevLookAtEye
40 targetSmooth = self.alpha * target + (1.0 - self.alpha) * self.prevLookAtTarget
41 else:
42 eyeSmooth = eye
43 targetSmooth = target
44
45 self.prevLookAtEye = eyeSmooth
46 self.prevLookAtTarget = targetSmooth
47
48 return eyeSmooth, targetSmooth
49
50 def reset(self):
51 self.prevLookAtEye = None

Callers 3

__renderMethod · 0.45
__processUserInputMethod · 0.45
make_plotterFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected