Commit 67fbf8a0 authored by maybites's avatar maybites
Browse files

heaps of little bugfixes and improovments

parent 7bd6f1cc
...@@ -4,6 +4,7 @@ var mySlotSize = 45; ...@@ -4,6 +4,7 @@ var mySlotSize = 45;
var myval=0; var myval=0;
var myPeerList = new Dict("remotePeerList");; var myPeerList = new Dict("remotePeerList");;
var slots = []; var slots = [];
var isJoined = 0;
var myRoomName = "unkown"; var myRoomName = "unkown";
var myRoomID = 0; var myRoomID = 0;
...@@ -15,16 +16,14 @@ function dpost(_post){ ...@@ -15,16 +16,14 @@ function dpost(_post){
post("peerList: " + _post + "\n"); post("peerList: " + _post + "\n");
} }
function bang()
{
outlet(0,"myvalue","is",myval);
}
function joined(_joined){ function joined(_joined){
if(_joined == 0){ if(isJoined !== _joined){
dpost("local peer left room. cleaning up list of remote peers.."); isJoined = _joined;
//clear(); if(_joined == 0){
//done(); dpost("local peer left room. cleaning up list of remote peers..");
//clear();
//done();
}
} }
} }
...@@ -121,6 +120,14 @@ function done() ...@@ -121,6 +120,14 @@ function done()
// update Slots with new peer // update Slots with new peer
slots.forEach(update); slots.forEach(update);
if(isJoined === 1){
outlet(0, "peerList", "uptodate");
} else {
if(myPeerList.getkeys() === null){
outlet(0, "peerList", "clear");
}
}
} }
function update(_peerID, _index) { function update(_peerID, _index) {
...@@ -180,8 +187,8 @@ function removePeer(_peerID){ ...@@ -180,8 +187,8 @@ function removePeer(_peerID){
function anything() function anything()
{ {
var a = arrayfromargs(messagename, arguments); //var a = arrayfromargs(messagename, arguments);
post("received message " + a + "\n"); //post("received message " + a + "\n");
myval = a; //myval = a;
bang(); //bang();
} }
...@@ -98,14 +98,14 @@ function slot(_index){ ...@@ -98,14 +98,14 @@ function slot(_index){
dpost("start creation animation..."); dpost("start creation animation...");
// start creation animation // start creation animation
taskMover = new Task(creaMover, this, 720, 0, 20); taskMover = new Task(creaMover, this, 720, 0, 20);
taskMover.interval = 33; // 60fps taskMover.interval = 33; // 30fps
taskMover.repeat(21); taskMover.repeat(21);
} }
if(mySlotIndex != _index){ if(mySlotIndex != _index){
dpost("start reshuffle animation..."); dpost("start reshuffle animation...");
// start reshuflle animation // start reshuflle animation
taskMover = new Task(shuffleMover, this, mySlotIndex, _index, 20); taskMover = new Task(shuffleMover, this, mySlotIndex, _index, 20);
taskMover.interval = 33; // 60fps taskMover.interval = 33; // 30fps
taskMover.repeat(21); taskMover.repeat(21);
mySlotIndex = _index; mySlotIndex = _index;
} }
...@@ -115,9 +115,9 @@ function remove(){ ...@@ -115,9 +115,9 @@ function remove(){
dpost("start remove animation... \n"); dpost("start remove animation... \n");
// remove abstraction // remove abstraction
outlet(0, "peerJoined", 0); outlet(0, "peerJoined", 0);
taskMover = new Task(reMover, this, 0, 720, 20); taskMover = new Task(reMover, this, 0, 720, 10);
taskMover.interval = 33; // 60fps taskMover.interval = 50; // 20fps
taskMover.repeat(21); taskMover.repeat(11);
} }
function shuffleMover(_indxStart, _indxTarget, _maxStep) function shuffleMover(_indxStart, _indxTarget, _maxStep)
...@@ -128,7 +128,6 @@ function shuffleMover(_indxStart, _indxTarget, _maxStep) ...@@ -128,7 +128,6 @@ function shuffleMover(_indxStart, _indxTarget, _maxStep)
} else { } else {
arguments.callee.task.cancel(); arguments.callee.task.cancel();
dpost("... reshuffle animation done."); dpost("... reshuffle animation done.");
messnamed("peerManager", "done");
} }
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"rsync": "^0.6.1", "rsync": "^0.6.1",
"sha1": "^1.1.1", "sha1": "^1.1.1",
"superagent": "^6.1.0", "superagent": "^6.1.0",
"telemersive-bus": "0.0.26" "telemersive-bus": "0.0.27"
}, },
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
......
This diff is collapsed.
This diff is collapsed.
...@@ -39,6 +39,18 @@ ...@@ -39,6 +39,18 @@
"subpatcher_template" : "", "subpatcher_template" : "",
"assistshowspatchername" : 0, "assistshowspatchername" : 0,
"boxes" : [ { "boxes" : [ {
"box" : {
"id" : "obj-20",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "", "int", "int" ],
"patching_rect" : [ 217.0, 49.0, 48.0, 22.0 ],
"text" : "change"
}
}
, {
"box" : { "box" : {
"args" : [ "many2manyBi", "osc", "#2", "#4" ], "args" : [ "many2manyBi", "osc", "#2", "#4" ],
"bgmode" : 0, "bgmode" : 0,
...@@ -337,7 +349,7 @@ ...@@ -337,7 +349,7 @@
"numinlets" : 2, "numinlets" : 2,
"numoutlets" : 1, "numoutlets" : 1,
"outlettype" : [ "" ], "outlettype" : [ "" ],
"patching_rect" : [ 217.0, 61.0, 61.0, 22.0 ], "patching_rect" : [ 217.0, 82.0, 61.0, 22.0 ],
"text" : "pipe 1000" "text" : "pipe 1000"
} }
...@@ -1333,6 +1345,30 @@ ...@@ -1333,6 +1345,30 @@
"source" : [ "obj-19", 0 ] "source" : [ "obj-19", 0 ]
} }
}
, {
"patchline" : {
"destination" : [ "obj-28", 0 ],
"order" : 1,
"source" : [ "obj-20", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-39", 0 ],
"order" : 2,
"source" : [ "obj-20", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-9", 0 ],
"order" : 0,
"source" : [ "obj-20", 0 ]
}
} }
, { , {
"patchline" : { "patchline" : {
...@@ -1378,24 +1414,7 @@ ...@@ -1378,24 +1414,7 @@
} }
, { , {
"patchline" : { "patchline" : {
"destination" : [ "obj-28", 0 ], "destination" : [ "obj-20", 0 ],
"order" : 1,
"source" : [ "obj-32", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-39", 0 ],
"order" : 2,
"source" : [ "obj-32", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-9", 0 ],
"order" : 0,
"source" : [ "obj-32", 0 ] "source" : [ "obj-32", 0 ]
} }
...@@ -1596,8 +1615,13 @@ ...@@ -1596,8 +1615,13 @@
, { , {
"name" : "rnbodefault", "name" : "rnbodefault",
"default" : { "default" : {
"color" : [ 0.929412, 0.929412, 0.352941, 1.0 ], "accentcolor" : [ 0.343034118413925, 0.506230533123016, 0.86220508813858, 1.0 ],
"elementcolor" : [ 0.357540726661682, 0.515565991401672, 0.861786782741547, 1.0 ],
"fontsize" : [ 12.0 ],
"bgcolor" : [ 0.031372549019608, 0.125490196078431, 0.211764705882353, 1.0 ],
"stripecolor" : [ 0.258338063955307, 0.352425158023834, 0.511919498443604, 1.0 ], "stripecolor" : [ 0.258338063955307, 0.352425158023834, 0.511919498443604, 1.0 ],
"fontname" : [ "Lato" ],
"color" : [ 0.929412, 0.929412, 0.352941, 1.0 ],
"bgfillcolor" : { "bgfillcolor" : {
"type" : "color", "type" : "color",
"color" : [ 0.031372549019608, 0.125490196078431, 0.211764705882353, 1.0 ], "color" : [ 0.031372549019608, 0.125490196078431, 0.211764705882353, 1.0 ],
...@@ -1607,12 +1631,7 @@ ...@@ -1607,12 +1631,7 @@
"proportion" : 0.39, "proportion" : 0.39,
"autogradient" : 0.0 "autogradient" : 0.0
} }
,
"bgcolor" : [ 0.031372549019608, 0.125490196078431, 0.211764705882353, 1.0 ],
"accentcolor" : [ 0.343034118413925, 0.506230533123016, 0.86220508813858, 1.0 ],
"fontsize" : [ 12.0 ],
"elementcolor" : [ 0.357540726661682, 0.515565991401672, 0.861786782741547, 1.0 ],
"fontname" : [ "Lato" ]
} }
, ,
"parentstyle" : "", "parentstyle" : "",
...@@ -1621,9 +1640,18 @@ ...@@ -1621,9 +1640,18 @@
, { , {
"name" : "rnbohighcontrast", "name" : "rnbohighcontrast",
"default" : { "default" : {
"selectioncolor" : [ 0.301960784313725, 0.694117647058824, 0.949019607843137, 1.0 ],
"clearcolor" : [ 1.0, 1.0, 1.0, 0.0 ],
"accentcolor" : [ 0.666666666666667, 0.666666666666667, 0.666666666666667, 1.0 ],
"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
"elementcolor" : [ 0.223386004567146, 0.254748553037643, 0.998085916042328, 1.0 ],
"locked_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ], "locked_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"color" : [ 1.0, 0.874509803921569, 0.141176470588235, 1.0 ], "editing_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"fontsize" : [ 13.0 ],
"bgcolor" : [ 0.0, 0.0, 0.0, 1.0 ],
"stripecolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ], "stripecolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"textcolor_inverse" : [ 1.0, 1.0, 1.0, 1.0 ],
"color" : [ 1.0, 0.874509803921569, 0.141176470588235, 1.0 ],
"bgfillcolor" : { "bgfillcolor" : {
"type" : "color", "type" : "color",
"color" : [ 0.0, 0.0, 0.0, 1.0 ], "color" : [ 0.0, 0.0, 0.0, 1.0 ],
...@@ -1633,16 +1661,7 @@ ...@@ -1633,16 +1661,7 @@
"proportion" : 0.5, "proportion" : 0.5,
"autogradient" : 0.0 "autogradient" : 0.0
} }
,
"bgcolor" : [ 0.0, 0.0, 0.0, 1.0 ],
"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
"clearcolor" : [ 1.0, 1.0, 1.0, 0.0 ],
"accentcolor" : [ 0.666666666666667, 0.666666666666667, 0.666666666666667, 1.0 ],
"fontsize" : [ 13.0 ],
"elementcolor" : [ 0.223386004567146, 0.254748553037643, 0.998085916042328, 1.0 ],
"selectioncolor" : [ 0.301960784313725, 0.694117647058824, 0.949019607843137, 1.0 ],
"editing_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"textcolor_inverse" : [ 1.0, 1.0, 1.0, 1.0 ]
} }
, ,
"parentstyle" : "", "parentstyle" : "",
......
...@@ -39,6 +39,18 @@ ...@@ -39,6 +39,18 @@
"subpatcher_template" : "", "subpatcher_template" : "",
"assistshowspatchername" : 0, "assistshowspatchername" : 0,
"boxes" : [ { "boxes" : [ {
"box" : {
"id" : "obj-7",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "", "int", "int" ],
"patching_rect" : [ 217.0, 46.0, 48.0, 22.0 ],
"text" : "change"
}
}
, {
"box" : { "box" : {
"id" : "obj-4", "id" : "obj-4",
"maxclass" : "newobj", "maxclass" : "newobj",
...@@ -253,7 +265,7 @@ ...@@ -253,7 +265,7 @@
"numinlets" : 2, "numinlets" : 2,
"numoutlets" : 1, "numoutlets" : 1,
"outlettype" : [ "" ], "outlettype" : [ "" ],
"patching_rect" : [ 217.0, 61.0, 61.0, 22.0 ], "patching_rect" : [ 217.0, 79.0, 61.0, 22.0 ],
"text" : "pipe 1000" "text" : "pipe 1000"
} }
...@@ -769,24 +781,7 @@ ...@@ -769,24 +781,7 @@
} }
, { , {
"patchline" : { "patchline" : {
"destination" : [ "obj-28", 0 ], "destination" : [ "obj-7", 0 ],
"order" : 1,
"source" : [ "obj-32", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-39", 0 ],
"order" : 2,
"source" : [ "obj-32", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-9", 0 ],
"order" : 0,
"source" : [ "obj-32", 0 ] "source" : [ "obj-32", 0 ]
} }
...@@ -855,6 +850,30 @@ ...@@ -855,6 +850,30 @@
"source" : [ "obj-60", 0 ] "source" : [ "obj-60", 0 ]
} }
}
, {
"patchline" : {
"destination" : [ "obj-28", 0 ],
"order" : 1,
"source" : [ "obj-7", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-39", 0 ],
"order" : 2,
"source" : [ "obj-7", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-9", 0 ],
"order" : 0,
"source" : [ "obj-7", 0 ]
}
} }
, { , {
"patchline" : { "patchline" : {
...@@ -936,8 +955,11 @@ ...@@ -936,8 +955,11 @@
, { , {
"name" : "rnbodefault", "name" : "rnbodefault",
"default" : { "default" : {
"accentcolor" : [ 0.343034118413925, 0.506230533123016, 0.86220508813858, 1.0 ],
"elementcolor" : [ 0.357540726661682, 0.515565991401672, 0.861786782741547, 1.0 ], "elementcolor" : [ 0.357540726661682, 0.515565991401672, 0.861786782741547, 1.0 ],
"fontsize" : [ 12.0 ],
"bgcolor" : [ 0.031372549019608, 0.125490196078431, 0.211764705882353, 1.0 ], "bgcolor" : [ 0.031372549019608, 0.125490196078431, 0.211764705882353, 1.0 ],
"stripecolor" : [ 0.258338063955307, 0.352425158023834, 0.511919498443604, 1.0 ],
"fontname" : [ "Lato" ], "fontname" : [ "Lato" ],
"color" : [ 0.929412, 0.929412, 0.352941, 1.0 ], "color" : [ 0.929412, 0.929412, 0.352941, 1.0 ],
"bgfillcolor" : { "bgfillcolor" : {
...@@ -949,10 +971,7 @@ ...@@ -949,10 +971,7 @@
"proportion" : 0.39, "proportion" : 0.39,
"autogradient" : 0.0 "autogradient" : 0.0
} }
,
"accentcolor" : [ 0.343034118413925, 0.506230533123016, 0.86220508813858, 1.0 ],
"stripecolor" : [ 0.258338063955307, 0.352425158023834, 0.511919498443604, 1.0 ],
"fontsize" : [ 12.0 ]
} }
, ,
"parentstyle" : "", "parentstyle" : "",
...@@ -961,14 +980,18 @@ ...@@ -961,14 +980,18 @@
, { , {
"name" : "rnbohighcontrast", "name" : "rnbohighcontrast",
"default" : { "default" : {
"selectioncolor" : [ 0.301960784313725, 0.694117647058824, 0.949019607843137, 1.0 ],
"clearcolor" : [ 1.0, 1.0, 1.0, 0.0 ],
"accentcolor" : [ 0.666666666666667, 0.666666666666667, 0.666666666666667, 1.0 ],
"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
"elementcolor" : [ 0.223386004567146, 0.254748553037643, 0.998085916042328, 1.0 ], "elementcolor" : [ 0.223386004567146, 0.254748553037643, 0.998085916042328, 1.0 ],
"bgcolor" : [ 0.0, 0.0, 0.0, 1.0 ], "locked_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"editing_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ], "editing_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"fontsize" : [ 13.0 ],
"bgcolor" : [ 0.0, 0.0, 0.0, 1.0 ],
"stripecolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"textcolor_inverse" : [ 1.0, 1.0, 1.0, 1.0 ], "textcolor_inverse" : [ 1.0, 1.0, 1.0, 1.0 ],
"color" : [ 1.0, 0.874509803921569, 0.141176470588235, 1.0 ], "color" : [ 1.0, 0.874509803921569, 0.141176470588235, 1.0 ],
"selectioncolor" : [ 0.301960784313725, 0.694117647058824, 0.949019607843137, 1.0 ],
"locked_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"clearcolor" : [ 1.0, 1.0, 1.0, 0.0 ],
"bgfillcolor" : { "bgfillcolor" : {
"type" : "color", "type" : "color",
"color" : [ 0.0, 0.0, 0.0, 1.0 ], "color" : [ 0.0, 0.0, 0.0, 1.0 ],
...@@ -978,11 +1001,7 @@ ...@@ -978,11 +1001,7 @@
"proportion" : 0.5, "proportion" : 0.5,
"autogradient" : 0.0 "autogradient" : 0.0
} }
,
"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
"accentcolor" : [ 0.666666666666667, 0.666666666666667, 0.666666666666667, 1.0 ],
"stripecolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"fontsize" : [ 13.0 ]
} }
, ,
"parentstyle" : "", "parentstyle" : "",
......
...@@ -39,6 +39,18 @@ ...@@ -39,6 +39,18 @@
"subpatcher_template" : "", "subpatcher_template" : "",
"assistshowspatchername" : 0, "assistshowspatchername" : 0,
"boxes" : [ { "boxes" : [ {
"box" : {
"id" : "obj-42",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "", "int", "int" ],
"patching_rect" : [ 173.5, 100.0, 48.0, 22.0 ],
"text" : "change"
}
}
, {
"box" : { "box" : {
"id" : "obj-57", "id" : "obj-57",
"maxclass" : "newobj", "maxclass" : "newobj",
...@@ -1012,7 +1024,7 @@ ...@@ -1012,7 +1024,7 @@
"numoutlets" : 1, "numoutlets" : 1,
"outlettype" : [ "" ], "outlettype" : [ "" ],
"patching_rect" : [ 108.0, 221.0, 103.0, 22.0 ], "patching_rect" : [ 108.0, 221.0, 103.0, 22.0 ],
"text" : "50954_cche" "text" : "86925_cche"
} }
} }
...@@ -7306,6 +7318,10 @@ ...@@ -7306,6 +7318,10 @@
"numoutlets" : 4, "numoutlets" : 4,
"outlettype" : [ "", "", "", "" ], "outlettype" : [ "", "", "", "" ],
"patching_rect" : [ 197.0, 46.0, 56.0, 22.0 ], "patching_rect" : [ 197.0, 46.0, 56.0, 22.0 ],
"restore" : {
"select" : [ 0 ]
}
,
"text" : "autopattr", "text" : "autopattr",
"varname" : "u043011126" "varname" : "u043011126"
} }
...@@ -9142,16 +9158,7 @@ ...@@ -9142,16 +9158,7 @@
} }
, { , {
"patchline" : { "patchline" : {
"destination" : [ "obj-16", 0 ], "destination" : [ "obj-42", 0 ],
"order" : 0,
"source" : [ "obj-26", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-28", 0 ],
"order" : 1,
"source" : [ "obj-26", 0 ] "source" : [ "obj-26", 0 ]
} }
...@@ -9335,6 +9342,22 @@ ...@@ -9335,6 +9342,22 @@
"source" : [ "obj-40", 0 ] "source" : [ "obj-40", 0 ]
} }
}
, {
"patchline" : {
"destination" : [ "obj-16", 0 ],
"order" : 0,
"source" : [ "obj-42", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-28", 0 ],
"order" : 1,
"source" : [ "obj-42", 0 ]
}
} }
, { , {
"patchline" : { "patchline" : {
......
...@@ -1820,12 +1820,12 @@ ...@@ -1820,12 +1820,12 @@
, { , {
"box" : { "box" : {
"id" : "obj-35", "id" : "obj-35",
"linecount" : 4, "linecount" : 5,
"maxclass" : "newobj", "maxclass" : "newobj",
"numinlets" : 1, "numinlets" : 1,
"numoutlets" : 1,