Skip to content

Commit

Permalink
Dec 28 daily effect correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders-Holst committed Dec 28, 2021
1 parent aa096ae commit 5ee62e1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions xled_plus/samples/day28.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def __init__(self, ctr, sym):
self.symang = m.pi / sym
self.bgcol = hsl_color(0.25, 1.0, -0.5)
self.lasthue = 0.25
self.horizon = 250
self.preferred_frames = 600
self.horizon = 360
self.preferred_frames = 720
self.proj2D3D = "halfsphere"
self.ind = 0

Expand All @@ -28,7 +28,7 @@ def makecolorfunc(self, sh):
self.lasthue = hue
sat = random()*0.5 + 0.5
aa = 0.2
ss = 0.08 / self.preferred_fps
ss = 0.05 / self.preferred_fps
def func(pos, ind):
tm = self.time - sh.crtime
if tm * ss < aa:
Expand All @@ -43,7 +43,7 @@ def func(pos, ind):
def reshapefunc(self, sh):
fact = (random() - 0.4) * 0.7
aa = 0.2
ss = 0.08 / self.preferred_fps
ss = 0.05 / self.preferred_fps
def func():
tm = self.time - sh.crtime
if tm * ss < aa:
Expand All @@ -70,7 +70,7 @@ def create(self):
return shape

def update(self, step):
if self.time % 25 == 0:
if self.time % 30 == 0:
if self.record:
sh = self.create()
self.add_shape(sh)
Expand All @@ -86,7 +86,7 @@ def update(self, step):
self.add_shape(self.create())
for sh in self.shapes:
sh.reshape()
if len(self.shapes) > 10:
if len(self.shapes) > 12:
self.shapes = self.shapes[:-1]
self.time += 1
# super(FlowerScene, self).update(step)
Expand All @@ -113,7 +113,7 @@ def blend_colors(self, colors):

if __name__ == '__main__':
ctr = setup_control()
ctr.adjust_layout_aspect(1.0) # How many times wider than high is the led installation?
ctr.adjust_layout_aspect(1.4) # How many times wider than high is the led installation?
eff = FlowerScene(ctr, 6)
oldmode = ctr.get_mode()["mode"]
eff.launch_rt()
Expand Down

0 comments on commit 5ee62e1

Please sign in to comment.