def __init__(self, sheep_sides): looping_show.LoopingShow.__init__(self, sheep_sides) self.effect = eye_effect.EyeEffect() self.next = [[0.0, 0.0], [0.0, 0.0]] self.last_effect_at = 0 self.beaconStrobe = eye_effect.EyeEffect(shutter_type=eye_effect.SHUTTER_STROBE, shutter_speed = 1.0)
def __init__(self, sheep_sides): looping_show.LoopingShow.__init__(self, sheep_sides) self.closed = eye_effect.EyeEffect(shutter_type=eye_effect.SHUTTER_CLOSED) self.fast_strobe = eye_effect.EyeEffect(shutter_type=eye_effect.SHUTTER_STROBE, shutter_speed=1.0) self.slow_strobe = eye_effect.EyeEffect(shutter_type=eye_effect.SHUTTER_STROBE, shutter_speed=0.6) # I think big_splat and circle_0 are probably best because they # are the neighbors of 0, so presumably will have the best look # when being swapped in self.ltw_effect = eye_effect.EyeEffect(gobo=eye_effect.GOBOS["big_splat"], gobo_shake_speed=0.42) self.pulse_effect = eye_effect.EyeEffect(shutter_type=eye_effect.SHUTTER_PULSE, shutter_speed=0.2) self.p_pos_beacon = [0, -90] self.b_pos_beacon = eyes.xy_to_pnt([0,0], False, False) self.set_steps([ (3.000, "setup"), # Eyes off, move them to the target location (1.000, "hey"), # Strobe at the target (1.000, "hey_off"), # off (1.000, "you"), # Strobe at the target (1.000, "you_off"), # off, dimmer to 0 (1.000, "come"), # Fade up with dimmer (1.000, "come_off"), # Fade down with dimmer (1.000, "here"), # Fade up with dimmer (1.000, "here_off"), # Fade down with dimmer (3.000, "light_the_way"), # L - shutter closed, position for beacon # R - Large circle gobo, with gobo shake, traces a path back # to xy 0,0 (3.000, "beacon") # L - pointed straight up. Pulsing # R - pointed at 0, 0. Pulsing ])
def __init__(self, sheep_sides): looping_show.LoopingShow.__init__(self, sheep_sides) # Blink at a high rate # 20 loops per second self.hertz = 20 # These are the effect objects we will use to flash the eyes self.open = eye_effect.EyeEffect(shutter_type=eye_effect.SHUTTER_OPEN) self.close = eye_effect.EyeEffect(shutter_type=eye_effect.SHUTTER_OPEN)
def __init__(self, sheep_sides): looping_show.LoopingShow.__init__(self, sheep_sides) self.effect = eye_effect.EyeEffect() self.total_prog_per_loop = 1 / 6.0 # We set this high because we are going to cut it down quickly self.hertz = 2.0
def save_effect(self): data = cherrypy.request.json effect = eye_effect.EyeEffect(json=data) if self.cm.set_effect_preset(data.get("effect_index"), effect): out = {"ok": True} else: out = {"ok": False} return out
EYE_DMX_GOBO = 7 EYE_DMX_EFFECT = 8 EYE_DMX_LADDER_ROTATE = 10 EYE_DMX_8_ROTATE = 0 EYE_DMX_3_ROTATE = 0 EYE_DMX_FOCUS = 11 EYE_DMX_FROST = 12 EYE_DMX_PNT_SPEED = 5 EYE_DMX_LAMP = 16 EYE_RESET_NONE = "none" EYE_RESET_ON = "on" EYE_RESET_OFF = "off" EYE_RESET_RESET = "reset" HEADLIGHT_FROST = eye_effect.EyeEffect(frost=eye_effect.FROST_STEADY, frost_speed=0.8) class Eye(object): def __init__(self, model, side): self.model = model self.cm = None self.side = side # These are the values that the show has set. If in override # mode we will be ignoring them and will be using the values from # the control model. These might still get changed while overridden, # in which case they will be used when the override is over. # Pan has a range of -270 to +270 self._pan = 0.0
def __init__(self, sheep_sides): looping_show.LoopingShow.__init__(self, sheep_sides) self.effect = eye_effect.EyeEffect() self.next = [[0.0, 0.0], [0.0, 0.0]]
def __init__(self, sheep_sides): looping_show.LoopingShow.__init__(self, sheep_sides) self.open = eye_effect.EyeEffect(shutter_type=eye_effect.SHUTTER_OPEN) self.close = eye_effect.EyeEffect(shutter_type=eye_effect.SHUTTER_OPEN)
def manual_eyes(self): data = cherrypy.request.json if not data.get("enabled"): # Done with manual mode self.runner.set_force_mute(False) return {"ok": True} # Make sure force mute is enabled self.runner.set_force_mute(True) print "Got data %s" % str(data) effect = None if data.get("effect"): effect = eye_effect.EyeEffect(json=data.get("effect")) x = data.get("x_pos") y = data.get("y_pos") z = data.get("z_pos") is_xyz = data.get("pos_is_xyz") or False dimmer = data.get("dimmer") color_pos = data.get("color_pos") if data.get("set_party"): eye = self.runner.model.party_eye if effect is not None: eye.effect = effect if is_xyz: p = [x, y, z] print "Setting pos of %s" % str(p) eye.set_xyz_pos(p, False) else: print "Setting party pan=%f, tilt=%f" % (x, y) eye.pan = x eye.tilt = y if isinstance(color_pos, int): eye.color_pos = color_pos else: print "NOT setting color_pos" if isinstance(dimmer, float): eye.dimmer = dimmer else: print "NOT setting dimmer" if data.get("set_business"): eye = self.runner.model.business_eye if effect is not None: eye.effect = effect if is_xyz: p = [x, y, z] print "Setting pos of %s" % str(p) eye.set_xyz_pos(p, False) else: print "Setting party pan=%f, tilt=%f" % (x, y) eye.pan = x eye.tilt = y if isinstance(color_pos, int): eye.color_pos = color_pos else: print "NOT setting color_pos" if isinstance(dimmer, float): eye.dimmer = dimmer else: print "NOT setting dimmer" eye.go() return {"ok": True}
def __init__(self, sheep_sides): looping_show.LoopingShow.__init__(self, sheep_sides) self.strobe = eye_effect.EyeEffect( shutter_type=eye_effect.SHUTTER_STROBE, shutter_speed=1.0)