Skip to content

Commit

Permalink
streamlined the streamlines
Browse files Browse the repository at this point in the history
  • Loading branch information
drwuro committed Jan 28, 2024
1 parent 459ddec commit a43eb39
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def updateStreamLines(self):
if len(points) > 1:
points = [(self.cam.gridToScreen(x_, y_), v) for (x_, y_, v) in points]
points = [p[0] for p in points]
pygame.draw.aalines(self.streamLines, pygame.Color(255, 255, 255, 255), False, points)
pygame.draw.lines(self.streamLines, pygame.Color(80, 110, 140, 255), False, points)

def showStreamLines(self):
self.updateStreamLines()
Expand Down Expand Up @@ -315,6 +315,12 @@ def updateEdit(self):
def render(self):
self.screen.fill(self.backgroundColor)

# show wind
if SHOW_STREAMLINES:
#self.fluid.smoke[3, 3] = 1.0
self.showStreamLines()
#self.showSmoke()

# render level
for y in range(self.lev_h):
for x in range(self.lev_w):
Expand All @@ -326,12 +332,6 @@ def render(self):
# render feather
self.feather.render(self.screen)

# show wind
if SHOW_STREAMLINES:
#self.fluid.smoke[3, 3] = 1.0
self.showStreamLines()
#self.showSmoke()

# render cloud (player)
if not self.edit_mode:
self.cloud.render(self.screen)
Expand Down

0 comments on commit a43eb39

Please sign in to comment.