aboutsummaryrefslogtreecommitdiff
path: root/pixelcore/Pixel.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-01-24 22:44:16 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-01-24 22:44:16 -0500
commit2019fb2895237aa9d86450daaf6d90831189fc13 (patch)
tree6dd9de45c5c2994c0a6aad2aa808092abb8f99bd /pixelcore/Pixel.py
parent39de2bc415e6dc02c68018655962197a38207718 (diff)
Some new stuff. Fixed a bug where screen responses weren't being synchronized. Now they are.
Added XYMove to do a bouncy behavior.
Diffstat (limited to 'pixelcore/Pixel.py')
-rw-r--r--pixelcore/Pixel.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pixelcore/Pixel.py b/pixelcore/Pixel.py
index 7260e56..1fbea2c 100644
--- a/pixelcore/Pixel.py
+++ b/pixelcore/Pixel.py
@@ -52,7 +52,11 @@ class Pixel:
(zindex,scale,event) = self.events[eventTime]
eventResult = event.state(currentTime-eventTime)
if eventResult != None:
- colors.append(color.multiplyColor(eventResult,scale))
+ scaledEvent = color.multiplyColor(eventResult,scale)
+ if (scaledEvent[0] + scaledEvent[1] + scaledEvent[2]) < 5:
+ deadEvents.append(eventTime)
+ else:
+ colors.append(scaledEvent)
else:
deadEvents.append(eventTime)