play.html.eex 1.64 KB
Newer Older
1
2
3

<h1>Play</h1>

4
5
6
7
8
9
10
<div id="calibration">
  <h2>Calibrating</h2>
  <p>Please move your phone left/right and forward/backward to
    calibrate sensors</p>
</div>


11
<div id="svg-container">
Jens-Christian Fischer's avatar
Jens-Christian Fischer committed
12
<%= if assigns[:user_type] == 0 do %>
13
14
15
<svg xmlns="http://www.w3.org/2000/svg"
     version="1.1"
     x="0" y="0"
16
17
     viewBox="0 0 120 120"
     enable-background="new 0 0 120 120"
18
19
     xml:space="preserve"
     >
20
  <circle cx="0" cy="0" r="18"
21
22
23
24
25
26
27
28
          transform="translate(50, 50)"
          id="shape"/>
</svg>
<% end %>

<%= if assigns[:user_type] == 1 do %>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
     x="0" y="0"
29
30
     viewBox="0 0 120 120"
     enable-background="new 0 0 120 120"
31
32
     xml:space="preserve"
     >
33
  <rect x="0" y="0" width="24" height="20"
34
35
36
37
38
        transform="translate(50, 50)"
        id="shape"/>
</svg>
<% end %>

Jens-Christian Fischer's avatar
Jens-Christian Fischer committed
39
<%= if assigns[:user_type] == 2 do %>
40
41
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
     x="10px" y="0px"
42
43
     viewBox="0 0 120 120"
     enable-background="new 0 0 120 120"
44
45
46
     xml:space="preserve"
     >
  <polygon x="0" y="0"
47
           points="0,0 20,0 10,20"
48
49
50
51
52
           transform="translate(50, 50)"
           id="shape"/>
</svg>
<% end %>

Jens-Christian Fischer's avatar
Jens-Christian Fischer committed
53
<%= if assigns[:user_type] == 3 do %>
54
55
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
     x="0px" y="0px"
56
57
     viewBox="0 0 120 120"
     enable-background="new 0 0 120 120"
58
59
60
61
62
63
64
65
66
67
68
69
     xml:space="preserve"
 >

  <polygon points="15,1.5 6,29.7 28.5,11.7 1.5,11.7 24,29.7"
           transform="translate(50, 50)"
           id="shape"/>
</svg>
<% end %>
</div>

<div id="orientationPanel" class="interfacePanel"></div>
<div id="accelerationPanel" class="interfacePanel"></div>