diff options
author | Russell Cohen <rcoh@mit.edu> | 2010-11-26 00:07:14 -0500 |
---|---|---|
committer | Russell Cohen <rcoh@mit.edu> | 2010-11-26 00:07:14 -0500 |
commit | 9c9babfa7032b443138c4b457aabaf79fad385b3 (patch) | |
tree | f9bf3e8b51423bf6769d2c655ffa15d81a42333f /config/MouseFollowerDemo.xml | |
parent | 1754a1f4511ef52f0a093dd0f9915196bd4261e7 (diff) |
Add PixelMapper functionality to abstract away from mapping locations->Pixels.
Diffstat (limited to 'config/MouseFollowerDemo.xml')
-rw-r--r-- | config/MouseFollowerDemo.xml | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/config/MouseFollowerDemo.xml b/config/MouseFollowerDemo.xml new file mode 100644 index 0000000..9e9f6e5 --- /dev/null +++ b/config/MouseFollowerDemo.xml @@ -0,0 +1,138 @@ +<!---All configuration items contain a "Class" tag specifying the python class they represent, and an "Args" tag specifying the args to be passed in.--> +<LightInstallation> + <LayoutConfiguration> + + <PixelStrip> + <Class>layouts.ZigzagLayout</Class><!--Name of Layout Class, + imported dynamically via a eval('import ' + name)--> + <Args><!--Any args the layout class needs. This go as + elements of a dictionary that gets passed to the Layout machinery--> + <Id>strip1</Id> + <zigLength>25</zigLength> + <zigAxis>X</zigAxis> + <yDirection>-1</yDirection> + <pixelToPixelSpacing>12</pixelToPixelSpacing> + <spacing>12</spacing> <!--we can space at any value less the + l2lspacing--> + <numPixels>50</numPixels> + <originLocation>(10,10)</originLocation> + </Args> + </PixelStrip> + <PixelStrip> + <Class>layouts.ZigzagLayout</Class><!--Name of Layout Class, + imported dynamically via a eval('import ' + name)--> + <Args><!--Any args the layout class needs. This go as + elements of a dictionary that gets passed to the Layout machinery--> + <Id>strip2</Id> + <zigLength>25</zigLength> + <zigAxis>X</zigAxis> + <yDirection>1</yDirection> + <pixelToPixelSpacing>12</pixelToPixelSpacing> + <spacing>12</spacing> <!--we can space at any value less the + l2lspacing--> + <numPixels>50</numPixels> + <originLocation>(10,30)</originLocation> + </Args> + </PixelStrip> + </LayoutConfiguration> + <RendererConfiguration> + <Renderer> + <Class>renderers.PygameRenderer</Class> + <Args> + <displaySize>(1300,50)</displaySize> + </Args> + </Renderer> + <Renderer> + <Class>renderers.IndoorRenderer</Class> + <Args> + <PowerSupply> + <IP>10.1.218.72</IP> + <PortMapping>{'strip1':1, 'strip2':2}</PortMapping> + </PowerSupply> + </Args> + </Renderer> + </RendererConfiguration> + <InputConfiguration> + <InputElement> + <Class>inputs.PygameInput</Class> + <Args><!--Passed as a dictionary--> + <Id>pygame</Id> + <RefreshInterval>100</RefreshInterval> + </Args> + </InputElement> + <InputElement> + <Class>inputs.PygameInput</Class> + <Args><!--Passed as a dictionary--> + <Id>followmouse</Id> + <FollowMouse>True</FollowMouse> + <RefreshInterval>100</RefreshInterval> + </Args> + </InputElement> + <InputElement> + <Class>inputs.UDPInput</Class> + <Args> + <Id>UDP</Id> + <Port>6038</Port> + <RefreshInterval>100</RefreshInterval> + </Args> + </InputElement> + </InputConfiguration> + <BehaviorConfiguration> + <Behavior> + <Class>behaviors.EchoBehavior</Class> + <Args> + <Id>echo</Id> + <z-index>0</z-index> + <RenderToScreen>False</RenderToScreen> + <Inputs> + </Inputs> + </Args> + </Behavior> + <Behavior> + <Class>behaviors.ColorChangerBehavior</Class> + <Args> + <Id>color</Id> + <z-index>0</z-index> + <RenderToScreen>False</RenderToScreen> + <Inputs> + </Inputs> + </Args> + </Behavior> + <Behavior> + <Class>behaviors.DecayBehavior</Class> + <Args> + <Id>decay</Id> + <DecayType>Exponential</DecayType> + <Coefficient>.01</Coefficient> + <z-index>0</z-index> + <RenderToScreen>False</RenderToScreen> + <Inputs> + </Inputs> + </Args> + </Behavior> + <Behavior> + <Class>behaviors.DebugBehavior</Class> + <Args> + <Id>debug</Id> + <z-index>0</z-index> + <Inputs> + <Id>UDP</Id> + </Inputs> + </Args> + </Behavior> + <Behavior> + <Class>behaviors.BehaviorChain</Class> + <Args> + <Inputs> + <Id>followmouse</Id> + </Inputs> + <ChainedBehaviors> + <Id>echo</Id> + <Id>color</Id> + <Id>decay</Id> + </ChainedBehaviors> + <RenderToScreen>True</RenderToScreen> + </Args> + </Behavior> + </BehaviorConfiguration> +</LightInstallation> |