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

default impl

parent 71eaeb05
......@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do
def project do
[app: :grains,
version: "0.0.17",
version: "0.0.18",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
......
......@@ -13,6 +13,37 @@ let OrientationPanel = {
return;
}
var a = new Interface.Panel({
container:document.getElementById(domId)
});
var orientation = new Interface.Orientation({
onvaluechange : function(_pitch, _roll, _yaw, _heading) {
pitch.setValue(_pitch);
roll.setValue(_roll);
yaw.setValue(_yaw);
}
});
var pitch = new Interface.Slider({
label: 'pitch',
bounds:[.05,.05,.2,.9]
});
var roll = new Interface.Slider({
label: 'roll',
bounds:[.25,.05,.2,.9]
});
var yaw = new Interface.Slider({
label: 'yaw',
bounds:[.45,.05,.2,.9]
});
a.background = 'black';
a.add(pitch, roll, yaw);
return;
let that = this;
socket.connect();
this.orientationChannel = socket.channel("orientation:" + domId);
......@@ -30,7 +61,7 @@ let OrientationPanel = {
.receive("error", reason => console.log("join failed", reason));
let a = new Interface.Panel({
let b = new Interface.Panel({
container:document.getElementById(domId)
});
console.log("adding orientation");
......
......@@ -54,9 +54,9 @@ let socket = new Socket("/socket", {params: {token: window.userToken}})
socket.connect()
// Now that you are connected, you can join channels with a topic:
let channel = socket.channel("topic:subtopic", {})
channel.join()
.receive("ok", resp => { console.log("Joined successfully", resp) })
.receive("error", resp => { console.log("Unable to join", resp) })
// let channel = socket.channel("topic:subtopic", {})
// channel.join()
// .receive("ok", resp => { console.log("Joined successfully", resp) })
// .receive("error", resp => { console.log("Unable to join", resp) })
export default socket
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