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

WIP

parent 9fef849d
......@@ -28,21 +28,6 @@ defmodule Grains.OrientationChannel do
StatefulMap.put("yaw", yaw)
StatefulMap.put("heading", heading)
broadcast! socket, "orientation", %{
user: %{id: "anon"},
element: "pitch",
value: pitch
}
broadcast! socket, "orientation", %{
user: %{id: "anon"},
element: "roll",
value: roll
}
broadcast! socket, "orientation", %{
user: %{id: "anon"},
element: "yaw",
value: yaw
}
Grains.Endpoint.broadcast("osc", "orientation", %{user: socket.assigns.user_uuid,
pitch: pitch,
......
......@@ -19,11 +19,6 @@ defmodule Grains.SliderChannel do
StatefulMap.put(slider, value)
broadcast! socket, "slider", %{
user: %{id: "anon"},
element: slider,
value: value
}
Grains.Endpoint.broadcast("osc", "slider", %{user: socket.assigns.user_uuid,
element: slider,
value: value})
......
......@@ -20,9 +20,6 @@ let OrientationPanel = {
socket.connect();
this.orientationChannel = socket.channel("orientation:" + domId);
this.orientationChannel.on("orientation", (resp) => {
this.setSliderValue(resp);
});
this.orientationChannel.join()
.receive("ok", resp => {
......@@ -80,11 +77,6 @@ let OrientationPanel = {
},
setSliderValue(resp){
let slider = this.sliders[resp.element];
slider.setValue(resp.value / 127);
}
};
export default OrientationPanel;
......@@ -17,10 +17,6 @@ let SliderPanel = {
socket.connect();
this.sliderChannel = socket.channel("slider:" + domId);
this.sliderChannel.on("slider", (resp) => {
this.setSliderValue(resp);
});
this.sliderChannel.join()
.receive("ok", resp => {
resp.values.forEach( (element) => {
......@@ -41,7 +37,9 @@ let SliderPanel = {
bounds: [(1/nrSliders) * idx, .1, 1 / nrSliders, .5],
label: s,
onvaluechange: function() {that.send_value(s, this.value); }
onvaluechange: function() {
that.send_value(s, this.value);
}
});
console.log(s);
a.add(this.sliders[s]);
......@@ -60,10 +58,6 @@ let SliderPanel = {
},
setSliderValue(resp){
let slider = this.sliders[resp.element];
slider.setValue(resp.value);
}
};
......
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