Minor cleanups

parent 9a6f7058
defmodule Grains.Type do
@nr_types 1
@nr_types 4
def select_type(uuid) do
{i, _} = Integer.parse(uuid, 16)
......
......@@ -111,8 +111,8 @@ Boid.prototype.render = function() {
// Wraparound
Boid.prototype.borders = function() {
if (this.position.x < -this.radius) this.position.x = PresenceSketch.width +this.radius;
if (this.position.y < -this.radius) this.position.y = PresenceSketch.height+this.radius;
if (this.position.x < -this.radius) this.position.x = PresenceSketch.width + this.radius;
if (this.position.y < -this.radius) this.position.y = PresenceSketch.height + this.radius;
if (this.position.x > PresenceSketch.width +this.radius) this.position.x = -this.radius;
if (this.position.y > PresenceSketch.height+this.radius) this.position.y = -this.radius;
......
......@@ -5,7 +5,7 @@ P: <span id="pitch"></span><br/>
R: <span id="roll"></span>
<div id="svg-container">
<%= if assigns[:user_type] == 1 do %>
<%= if assigns[:user_type] == 0 do %>
<svg xmlns="http://www.w3.org/2000/svg"
version="1.1"
x="0" y="0"
......@@ -32,7 +32,7 @@ R: <span id="roll"></span>
</svg>
<% end %>
<%= if assigns[:user_type] == 1 do %>
<%= if assigns[:user_type] == 2 do %>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
x="10px" y="0px"
viewBox="0 0 120 120"
......@@ -46,7 +46,7 @@ R: <span id="roll"></span>
</svg>
<% end %>
<%= if assigns[:user_type] == 0 do %>
<%= if assigns[:user_type] == 3 do %>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
x="0px" y="0px"
viewBox="0 0 120 120"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment