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

Set veloticty function

parent 3b59aaf0
...@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do ...@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do
def project do def project do
[app: :grains, [app: :grains,
version: "0.0.46", version: "0.0.47",
elixir: "~> 1.2", elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env), elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers, compilers: [:phoenix, :gettext] ++ Mix.compilers,
......
...@@ -176,6 +176,10 @@ let PresenceSketch = { ...@@ -176,6 +176,10 @@ let PresenceSketch = {
presences: {}, presences: {},
set_velocity(name, dx, dy) {
PresenceSketch.boids[name].set_velocity(dx, dy);
},
addBoids(joins) { addBoids(joins) {
if (!PresenceSketch.p5) { return; }; if (!PresenceSketch.p5) { return; };
......
Supports Markdown
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