diff options
author | rcoh <rcoh@mit.edu> | 2011-01-04 17:23:30 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2011-01-04 17:23:30 -0500 |
commit | 1679719e7ca8ce433c5714474a32c926161dc5b8 (patch) | |
tree | dc75dc66ee8695fe786df2b48c0e6911332ed7c5 /pixelmappers/SimpleMapper.py | |
parent | 395e99394ead5d0d656e74fed23dc780652b6090 (diff) |
Some performance improvements -- we also synchronize all the frames, giving us a meaning that even
if things slow down, rendering doesn't look weird.
Diffstat (limited to 'pixelmappers/SimpleMapper.py')
-rw-r--r-- | pixelmappers/SimpleMapper.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pixelmappers/SimpleMapper.py b/pixelmappers/SimpleMapper.py index 5df1032..4d12fe4 100644 --- a/pixelmappers/SimpleMapper.py +++ b/pixelmappers/SimpleMapper.py @@ -22,7 +22,8 @@ class SimpleMapper(PixelMapper): eventLocation = eventLocation.replace('{y}', 'pixel.location[1]') for pixel in screen: try: - pixelValid = sum(eval(eventLocation)) == len(eval(eventLocation)) #TODO: some + preValid = eval(eventLocation) + pixelValid = sum(preValid) == len(preValid) #TODO: some #optimizations possible. This might be slow in the long run if pixelValid: ret.append((pixel, 1)) |