def __init__(self, frequency=1, on_shape=tween.LINEAR, off_shape=tween.LINEAR, **kwargs): super(Pulser, self).__init__(**kwargs) period_duration = 1.0 / (2 * frequency) on_flash = EnvelopeSegment(start=0, change=1, tween=on_shape, duration=period_duration) off_flash = EnvelopeSegment(start=1, change=-1, tween=off_shape, duration=period_duration) self.envelope = Envelope(loop=-1) self.envelope.segments = [on_flash, off_flash]
def __init__(self, **kwargs): self.hue_envelope = Envelope(loop=-1) self.saturation_envelope = Envelope(loop=-1) self.intensity_envelope = Envelope(loop=-1)