diff options
author | rcoh <rcoh@mit.edu> | 2011-01-12 14:34:39 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2011-01-12 14:34:39 -0500 |
commit | 7700e6b6c80033b4084beadc2e27164bcfa09166 (patch) | |
tree | 039205bea67395e614f8db622c7f0114b9500e19 | |
parent | 9315ded6555a7afb8f11d96e5a4c446389f157cb (diff) |
"NoPygame" friendly config
-rw-r--r-- | LightInstallation.py | 1 | ||||
-rw-r--r-- | config/NoPygame.xml | 125 | ||||
-rw-r--r-- | pixelcore/PixelStrip.py | 1 |
3 files changed, 125 insertions, 2 deletions
diff --git a/LightInstallation.py b/LightInstallation.py index b1ad90e..2eb03c9 100644 --- a/LightInstallation.py +++ b/LightInstallation.py @@ -2,7 +2,6 @@ from xml.etree.ElementTree import ElementTree from pixelcore.Screen import * from pixelcore.PixelStrip import * import pdb, sys, time, thread -from pygame.locals import * import util.TimeOps as clock import util.Config as configGetter import util.ComponentRegistry as compReg diff --git a/config/NoPygame.xml b/config/NoPygame.xml new file mode 100644 index 0000000..be7849b --- /dev/null +++ b/config/NoPygame.xml @@ -0,0 +1,125 @@ +<!---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> + <InstallationConfiguration> + <Defaults> + <PixelMapper>simplemap</PixelMapper> + </Defaults> + </InstallationConfiguration> + <PixelConfiguration> + <InheritsFrom>layouts/BasicSixStrip.xml</InheritsFrom> + </PixelConfiguration> + <PixelMapperConfiguration> + <PixelMapper> + <Class>pixelmappers.SimpleMapper</Class> + <Args> + <Id>simplemap</Id> + <CutoffDist>20</CutoffDist> + </Args> + </PixelMapper> + <PixelMapper> + <Class>pixelmappers.GaussianMapper</Class> + <Args> + <Id>gaussmap</Id> + <CutoffDist>20</CutoffDist> + <MinWeight>0.01</MinWeight> + <Width>3</Width> + <Height>1</Height> + </Args> + </PixelMapper> + </PixelMapperConfiguration> + <RendererConfiguration> + <Renderer> + <InheritsFrom>renderers/SixStripUDP.xml</InheritsFrom> + </Renderer> + </RendererConfiguration> + <InputConfiguration> + <InputElement> + <Class>inputs.RandomLocs</Class> + <Args> + <Id>randomLoc</Id> + </Args> + </InputElement> + </InputConfiguration> + <BehaviorConfiguration> + <Behavior> + <Class>behaviors.EchoBehavior</Class> + <Args> + <Id>echo</Id> + <z-index>0</z-index> + <RenderToScreen>False</RenderToScreen> + </Args> + </Behavior> + <Behavior Id="colorchange"> + <InheritsFrom>behaviors/RandomColor.xml</InheritsFrom> + </Behavior> + <Behavior Id="decay"> + <InheritsFrom>behaviors/PixelDecay.xml</InheritsFrom> + </Behavior> + <Behavior> + <Class>behaviors.DebugBehavior</Class> + <Args> + <Id>debug</Id> + <z-index>0</z-index> + <Inputs> + </Inputs> + </Args> + </Behavior> + <Behavior> + <Class>behaviors.AllPixelsLeft</Class> + <Args> + <Id>pixelsleft</Id> + </Args> + </Behavior> + <Behavior Id="recursivedecay"> + <InheritsFrom>behaviors/LoopAndDie.xml</InheritsFrom> + <Args> + <InitialResponseCount>200</InitialResponseCount> + </Args> + </Behavior> + <Behavior> + <Class>behaviors.BehaviorChain</Class> + <Args> + <Id>runcolordecay</Id> + <Inputs> + <Id>randomLoc</Id> + </Inputs> + <ChainedBehaviors> + <Id>colorchange</Id> + <Id>running</Id> + <Id>decay</Id> + </ChainedBehaviors> + <RecursiveHooks>{'running':'acceleratedie'}</RecursiveHooks> + <RenderToScreen>True</RenderToScreen> + <Mapper>gaussmap</Mapper> + </Args> + </Behavior> + <Behavior Id="accelerate"> + <InheritsFrom>behaviors/Accelerate.xml</InheritsFrom> + </Behavior> + <Behavior> + <Class>behaviors.BehaviorChain</Class> + <Args> + <Id>acceleratedie</Id> + <ChainedBehaviors> + <Id>accelerate</Id> + <Id>recursivedecay</Id> + </ChainedBehaviors> + </Args> + </Behavior> + <Behavior> + <Class>behaviors.BehaviorChain</Class> + <Args> + <Id>mousechaser</Id> + <ChainedBehaviors> + <Id>echo</Id> + <Id>pixelsleft</Id> + <Id>decay</Id> + </ChainedBehaviors> + <RenderToScreen>True</RenderToScreen> + </Args> + </Behavior> + <Behavior Id="running"> + <InheritsFrom>behaviors/RunningBehavior.xml</InheritsFrom> + </Behavior> + </BehaviorConfiguration> +</LightInstallation> diff --git a/pixelcore/PixelStrip.py b/pixelcore/PixelStrip.py index fceff8e..662b8fe 100644 --- a/pixelcore/PixelStrip.py +++ b/pixelcore/PixelStrip.py @@ -2,7 +2,6 @@ from pixelcore.Pixel import * import util.Strings as Strings import util.Geo as Geo from pixelevents.StepEvent import * -import pygame import math import pdb #Python class representing a single Pixel strip (usually 50 Pixels) |