Commit 22806f30 authored by Jens-Christian Fischer's avatar Jens-Christian Fischer
Browse files

fix that or this

parent f3d9c864
......@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do
def project do
[app: :grains,
version: "0.0.72",
version: "0.0.73",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
......
......@@ -350,12 +350,13 @@ Boid.prototype.render = function(list) {
// the master looks at his minions and draws lines
if (list) {
let that = this;
let neighbordist = 250;
_.each(list, function(boid) {
var d = p5.Vector.dist(that.position, boid.position);
if ((d > 0) && (d < neighbordist)) {
this.p.stroke(255);
this.p.line(this.position.x, this.position.y,
that.p.stroke(255);
that.p.line(that.position.x, that.position.y,
boid.position.x, boid.position.y);
}
});
......
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