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

fucking orientation

parent 3a59b4b1
......@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do
def project do
[app: :grains,
version: "0.0.18",
version: "0.0.19",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
......
......@@ -16,9 +16,37 @@ import "phoenix_html";
import socket from "./socket"
import SliderPanel from "./slider";
import OrientationPanel from "./orientation";
import Interface from "interface.js";
SliderPanel.init(socket, "#sliderPanel", ["s1", "s2", "s3"]);
OrientationPanel.init(socket, "orientationPanel");
// OrientationPanel.init(socket, "orientationPanel");
var a = new Interface.Panel({
container:document.getElementById("orientationPanel")
});
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);
// Import local files
//
......
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