aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-02-09 12:16:50 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-02-09 12:16:50 -0500
commit1604f05ec0bad79798bbd764cd62bdb20e55f444 (patch)
tree6c7206f9f2b082d8eb88cc8cfdfff3332ca8a7a2
parent9cf7747d70032cee28f29f9707360544a0e63277 (diff)
parent834cd2b0eaa27cfdba67d712d5d14120c6a441c3 (diff)
Merge branch 'osc'
Conflicts: Profile.py
-rwxr-xr-xLightInstallation.py2
-rw-r--r--Profile.py2
-rw-r--r--config/6thFloorOSC.xml41
-rw-r--r--pixelcore/Pixel.py2
4 files changed, 19 insertions, 28 deletions
diff --git a/LightInstallation.py b/LightInstallation.py
index c1f01e8..41cc925 100755
--- a/LightInstallation.py
+++ b/LightInstallation.py
@@ -193,7 +193,7 @@ class LightInstallation(object):
def main(argv):
if len(argv) == 1:
- l = LightInstallation('LightInstallationConfig.xml')
+ l = LightInstallation('config/6thFloor.xml')
else:
l = LightInstallation(argv[1])
diff --git a/Profile.py b/Profile.py
index a1eb581..2f796b2 100644
--- a/Profile.py
+++ b/Profile.py
@@ -1,4 +1,4 @@
import cProfile
from LightInstallation import main
-command = """main(['', 'config/Demo.xml'])"""
+command = """main(['', 'config/6thFloorOSC.xml'])"""
cProfile.runctx(command, globals(), locals(), filename="smootlight.profile")
diff --git a/config/6thFloorOSC.xml b/config/6thFloorOSC.xml
index cb1fd10..d5b90cb 100644
--- a/config/6thFloorOSC.xml
+++ b/config/6thFloorOSC.xml
@@ -40,20 +40,12 @@
<InputElement>
<Class>inputs.OSCInput</Class>
<Args>
- <Id>osc2</Id>
+ <Id>osc</Id>
<Port>1234</Port>
<RefreshInterval>10</RefreshInterval>
</Args>
</InputElement>
<InputElement>
- <Class>inputs.OSCInput</Class>
- <Args>
- <Id>osc</Id>
- <Port>12345</Port>
- <RefreshInterval>20</RefreshInterval>
- </Args>
- </InputElement>
- <InputElement>
<Class>inputs.PygameInput</Class>
<Args><!--Passed as a dictionary-->
<Id>pygame</Id>
@@ -110,7 +102,7 @@
<YStep>3</YStep>
</Args>
</Behavior>
- <Behavior>
+ <!--Behavior>
<Class>behaviors.MobileShakeBehavior</Class>
<Args>
<Id>mobileshake</Id>
@@ -131,7 +123,7 @@
<RenderToScreen>True</RenderToScreen>
<Mapper>simplemap</Mapper>
</Args>
- </Behavior>
+ </Behavior-->
<Behavior>
<Args>
<Id>sixaxis</Id>
@@ -188,7 +180,7 @@
<LocationRestriction>{y}&lt;0 or {y}&gt;200</LocationRestriction>
</Args>
</Behavior>
- <Behavior>
+ <!--Behavior>
<Class>behaviors.BehaviorChain</Class>
<Args>
<Id>movebounce</Id>
@@ -215,8 +207,8 @@
<RenderToScreen>True</RenderToScreen>
<Mapper>gaussmap</Mapper>
</Args>
- </Behavior>
- <Behavior>
+ </Behavior-->
+ <!--Behavior>
<Class>behaviors.DebugBehavior</Class>
<Args>
<Id>debug</Id>
@@ -225,7 +217,7 @@
<Id>pygame</Id>
</Inputs>
</Args>
- </Behavior>
+ </Behavior-->
<Behavior>
<Class>behaviors.AllPixelsLeft</Class>
<Args>
@@ -245,7 +237,7 @@
<Id>allpixels</Id>
</Args>
</Behavior>
- <Behavior Id="recursivedecay">
+ <!--Behavior Id="recursivedecay">
<InheritsFrom>behaviors/LoopAndDie.xml</InheritsFrom>
<Args>
<InitialResponseCount>50</InitialResponseCount>
@@ -267,8 +259,8 @@
<RenderToScreen>False</RenderToScreen>
<Mapper>gaussmap</Mapper>
</Args>
- </Behavior>
- <Behavior>
+ </Behavior-->
+ <!--Behavior>
<Class>behaviors.BehaviorChain</Class>
<Args>
<Id>randomwalk</Id>
@@ -320,13 +312,13 @@
<Id>recursivedecay</Id>
</ChainedBehaviors>
</Args>
- </Behavior>
+ </Behavior-->
<Behavior>
<Class>behaviors.BehaviorChain</Class>
<Args>
- <Id>mousechaser2</Id>
+ <Id>SixaxisChase</Id>
<Inputs>
- <Id>osc2</Id>
+ <Id>osc</Id>
</Inputs>
<ChainedBehaviors>
<Id>sixaxis</Id>
@@ -339,16 +331,15 @@
<Behavior>
<Class>behaviors.BehaviorChain</Class>
<Args>
- <Id>mousechaser</Id>
+ <Id>OSCTouchChase</Id>
<Inputs>
- <!--Id>followmouse</Id-->
<Id>osc</Id>
</Inputs>
<ChainedBehaviors>
<Id>touchosc</Id>
- <Id>square</Id>
- <Id>singleframe</Id>
+ <Id>decay</Id>
</ChainedBehaviors>
+ <Mapper>gaussmap</Mapper>
<RenderToScreen>True</RenderToScreen>
</Args>
</Behavior>
diff --git a/pixelcore/Pixel.py b/pixelcore/Pixel.py
index 4e7cfce..cf5a328 100644
--- a/pixelcore/Pixel.py
+++ b/pixelcore/Pixel.py
@@ -8,7 +8,7 @@ class Pixel:
keyed by event time). Every time is state is
requested, it processes all the members of its queue. If a member returns none,
it is removed from the queue. Otherwise, its value added to the Pixels color
- weighted by z-index."""
+ weighted by z-index. To get the current color of the pixel, call the state method."""
radius = 2
timeOff = -1