aboutsummaryrefslogtreecommitdiff
path: root/config/MouseFollowerDemo.xml
blob: 9e9f6e54584ec0794b819df0bceb75fbc032d81c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
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>