'pan' ctrl interface added..
This commit is contained in:
parent
01fdbdb4c8
commit
e640511e3f
1 changed files with 229 additions and 104 deletions
|
|
@ -65,14 +65,14 @@ $(document).ready(function() {
|
||||||
'2011_바람': imports[13],
|
'2011_바람': imports[13],
|
||||||
'2011_헤비레인': imports[14],
|
'2011_헤비레인': imports[14],
|
||||||
'고요6': imports[15],
|
'고요6': imports[15],
|
||||||
'고요7' : imports[16],
|
'_소리의_퍼짐______소리의_움직임_1': imports[16],
|
||||||
'검은산_뚜루': imports[17],
|
'검은산_뚜루': imports[17],
|
||||||
'검은산_다급': imports[18],
|
'검은산_다급': imports[18],
|
||||||
'검은산_부엉': imports[19],
|
'검은산_부엉': imports[19],
|
||||||
'검은산_불안': imports[20],
|
'검은산_불안': imports[20],
|
||||||
'검은산_쏟아짐': imports[21],
|
'검은산_쏟아짐': imports[21],
|
||||||
'고요13': imports[22],
|
'고요13': imports[22],
|
||||||
'고요14' : imports[23],
|
'_소리의_퍼짐______소리의_움직임_2': imports[23],
|
||||||
};
|
};
|
||||||
//NOTE: beware! same key is not allowed!! every keys should have different name!!
|
//NOTE: beware! same key is not allowed!! every keys should have different name!!
|
||||||
var beach_players = {
|
var beach_players = {
|
||||||
|
|
@ -82,14 +82,14 @@ $(document).ready(function() {
|
||||||
'2011_바람': [],
|
'2011_바람': [],
|
||||||
'2011_헤비레인': [],
|
'2011_헤비레인': [],
|
||||||
'고요6': [],
|
'고요6': [],
|
||||||
'고요7': [],
|
'_소리의_퍼짐______소리의_움직임_1': [],
|
||||||
'검은산_뚜루': [],
|
'검은산_뚜루': [],
|
||||||
'검은산_다급': [],
|
'검은산_다급': [],
|
||||||
'검은산_부엉': [],
|
'검은산_부엉': [],
|
||||||
'검은산_불안': [],
|
'검은산_불안': [],
|
||||||
'검은산_쏟아짐': [],
|
'검은산_쏟아짐': [],
|
||||||
'고요13': [],
|
'고요13': [],
|
||||||
'고요14': [],
|
'_소리의_퍼짐______소리의_움직임_2': [],
|
||||||
};
|
};
|
||||||
|
|
||||||
//screen changer
|
//screen changer
|
||||||
|
|
@ -322,6 +322,15 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//global panning variable
|
||||||
|
//NOTE: this DOES NOT sync between web-clients! <-- TBD, yet NOT-IMPLEMENTED !
|
||||||
|
var pan_width_pool = [1000, 2000, 3000, 4000, 8000, 80000];
|
||||||
|
var pan_speed_pool = [0, 10, 30, 50, 80, 200, 400, 1200];
|
||||||
|
var cur_pan_width_idx = pan_width_pool.length - 1;
|
||||||
|
var cur_pan_speed_idx = 0;
|
||||||
|
var cur_pan_width = 0;
|
||||||
|
var cur_pan_speed = 0;
|
||||||
|
|
||||||
//screen #3 - beach page #1
|
//screen #3 - beach page #1
|
||||||
changeScreen(3);
|
changeScreen(3);
|
||||||
new Path.Rectangle([0, 0], vs).fillColor = '#555';
|
new Path.Rectangle([0, 0], vs).fillColor = '#555';
|
||||||
|
|
@ -362,6 +371,20 @@ $(document).ready(function() {
|
||||||
],
|
],
|
||||||
onMouseDown: function(event) {
|
onMouseDown: function(event) {
|
||||||
var par = this.parent;
|
var par = this.parent;
|
||||||
|
//NOTE: this DOES NOT sync between web-clients! <-- TBD, yet NOT-IMPLEMENTED !
|
||||||
|
if (par._key == '_소리의_퍼짐______소리의_움직임_1' || par._key == '_소리의_퍼짐______소리의_움직임_2') {
|
||||||
|
//pan_width: (+)
|
||||||
|
if (cur_pan_width_idx < (pan_width_pool.length - 1)) {
|
||||||
|
cur_pan_width_idx++;
|
||||||
|
}
|
||||||
|
cur_pan_width = pan_width_pool[cur_pan_width_idx];
|
||||||
|
par._socket.emit('pan', {
|
||||||
|
width: cur_pan_width,
|
||||||
|
speed: cur_pan_speed
|
||||||
|
});
|
||||||
|
par.children.playcounter.content = '' + (cur_pan_width_idx + 1);
|
||||||
|
par.children.speedcounter.content = Number.parseFloat(1).toFixed(1);
|
||||||
|
} else {
|
||||||
par._players.push(par._player.start()._source); // start playbacks and collect their '_source's..
|
par._players.push(par._player.start()._source); // start playbacks and collect their '_source's..
|
||||||
par._playcount++;
|
par._playcount++;
|
||||||
par.children.playcounter.content = '' + par._playcount;
|
par.children.playcounter.content = '' + par._playcount;
|
||||||
|
|
@ -373,6 +396,7 @@ $(document).ready(function() {
|
||||||
group: 'beach'
|
group: 'beach'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
//playcounterbox
|
//playcounterbox
|
||||||
new Path.Rectangle({
|
new Path.Rectangle({
|
||||||
|
|
@ -406,6 +430,20 @@ $(document).ready(function() {
|
||||||
],
|
],
|
||||||
onMouseDown: function() {
|
onMouseDown: function() {
|
||||||
var par = this.parent;
|
var par = this.parent;
|
||||||
|
//NOTE: this DOES NOT sync between web-clients! <-- TBD, yet NOT-IMPLEMENTED !
|
||||||
|
if (par._key == '_소리의_퍼짐______소리의_움직임_1' || par._key == '_소리의_퍼짐______소리의_움직임_2') {
|
||||||
|
//pan_width : (-)
|
||||||
|
if (cur_pan_width_idx > 0) {
|
||||||
|
cur_pan_width_idx--;
|
||||||
|
}
|
||||||
|
cur_pan_width = pan_width_pool[cur_pan_width_idx];
|
||||||
|
par._socket.emit('pan', {
|
||||||
|
width: cur_pan_width,
|
||||||
|
speed: cur_pan_speed
|
||||||
|
});
|
||||||
|
par.children.playcounter.content = '' + (cur_pan_width_idx + 1);
|
||||||
|
par.children.speedcounter.content = Number.parseFloat(1).toFixed(1);
|
||||||
|
} else {
|
||||||
if (par._players.length > 0) {
|
if (par._players.length > 0) {
|
||||||
(par._players.shift()).stop();
|
(par._players.shift()).stop();
|
||||||
par._playcount--;
|
par._playcount--;
|
||||||
|
|
@ -421,6 +459,7 @@ $(document).ready(function() {
|
||||||
group: 'beach'
|
group: 'beach'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
//faster button
|
//faster button
|
||||||
new Group({
|
new Group({
|
||||||
|
|
@ -442,6 +481,19 @@ $(document).ready(function() {
|
||||||
],
|
],
|
||||||
onMouseDown: function() {
|
onMouseDown: function() {
|
||||||
var par = this.parent;
|
var par = this.parent;
|
||||||
|
//NOTE: this DOES NOT sync between web-clients! <-- TBD, yet NOT-IMPLEMENTED !
|
||||||
|
if (par._key == '_소리의_퍼짐______소리의_움직임_1' || par._key == '_소리의_퍼짐______소리의_움직임_2') {
|
||||||
|
//pan_speed: (+)
|
||||||
|
if (cur_pan_speed_idx < (pan_speed_pool.length - 1)) {
|
||||||
|
cur_pan_speed_idx++;
|
||||||
|
}
|
||||||
|
cur_pan_speed = pan_speed_pool[cur_pan_speed_idx];
|
||||||
|
par._socket.emit('pan', {
|
||||||
|
width: cur_pan_width,
|
||||||
|
speed: cur_pan_speed
|
||||||
|
});
|
||||||
|
par.children.speedcounter.content = Number.parseFloat(cur_pan_speed).toFixed(1);
|
||||||
|
} else {
|
||||||
if (par._players.length > 0) {
|
if (par._players.length > 0) {
|
||||||
par._players[par._players.length - 1].playbackRate.value += 0.2;
|
par._players[par._players.length - 1].playbackRate.value += 0.2;
|
||||||
par.children.speedcounter.content = Number.parseFloat(par._players[par._players.length - 1].playbackRate.value).toFixed(1);
|
par.children.speedcounter.content = Number.parseFloat(par._players[par._players.length - 1].playbackRate.value).toFixed(1);
|
||||||
|
|
@ -453,6 +505,7 @@ $(document).ready(function() {
|
||||||
group: 'beach'
|
group: 'beach'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
//speedcounterbox
|
//speedcounterbox
|
||||||
new Path.Rectangle({
|
new Path.Rectangle({
|
||||||
|
|
@ -488,6 +541,19 @@ $(document).ready(function() {
|
||||||
],
|
],
|
||||||
onMouseDown: function() {
|
onMouseDown: function() {
|
||||||
var par = this.parent;
|
var par = this.parent;
|
||||||
|
//NOTE: this DOES NOT sync between web-clients! <-- TBD, yet NOT-IMPLEMENTED !
|
||||||
|
if (par._key == '_소리의_퍼짐______소리의_움직임_1' || par._key == '_소리의_퍼짐______소리의_움직임_2') {
|
||||||
|
//pan_speed: (-)
|
||||||
|
if (cur_pan_speed_idx > 0) {
|
||||||
|
cur_pan_speed_idx--;
|
||||||
|
}
|
||||||
|
cur_pan_speed = pan_speed_pool[cur_pan_speed_idx];
|
||||||
|
par._socket.emit('pan', {
|
||||||
|
width: cur_pan_width,
|
||||||
|
speed: cur_pan_speed
|
||||||
|
});
|
||||||
|
par.children.speedcounter.content = Number.parseFloat(cur_pan_speed).toFixed(1);
|
||||||
|
} else {
|
||||||
if (par._players.length > 0) {
|
if (par._players.length > 0) {
|
||||||
var val = par._players[par._players.length - 1].playbackRate.value;
|
var val = par._players[par._players.length - 1].playbackRate.value;
|
||||||
if (val > 0.2) {
|
if (val > 0.2) {
|
||||||
|
|
@ -502,6 +568,7 @@ $(document).ready(function() {
|
||||||
group: 'beach'
|
group: 'beach'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
_socket: socket,
|
_socket: socket,
|
||||||
|
|
@ -613,6 +680,20 @@ $(document).ready(function() {
|
||||||
],
|
],
|
||||||
onMouseDown: function(event) {
|
onMouseDown: function(event) {
|
||||||
var par = this.parent;
|
var par = this.parent;
|
||||||
|
//NOTE: this DOES NOT sync between web-clients! <-- TBD, yet NOT-IMPLEMENTED !
|
||||||
|
if (par._key == '_소리의_퍼짐______소리의_움직임_1' || par._key == '_소리의_퍼짐______소리의_움직임_2') {
|
||||||
|
//pan_width: (+)
|
||||||
|
if (cur_pan_width_idx < (pan_width_pool.length - 1)) {
|
||||||
|
cur_pan_width_idx++;
|
||||||
|
}
|
||||||
|
cur_pan_width = pan_width_pool[cur_pan_width_idx];
|
||||||
|
par._socket.emit('pan', {
|
||||||
|
width: cur_pan_width,
|
||||||
|
speed: cur_pan_speed
|
||||||
|
});
|
||||||
|
par.children.playcounter.content = '' + (cur_pan_width_idx + 1);
|
||||||
|
par.children.speedcounter.content = Number.parseFloat(1).toFixed(1);
|
||||||
|
} else {
|
||||||
par._players.push(par._player.start()._source); // start playbacks and collect their '_source's..
|
par._players.push(par._player.start()._source); // start playbacks and collect their '_source's..
|
||||||
par._playcount++;
|
par._playcount++;
|
||||||
par.children.playcounter.content = '' + par._playcount;
|
par.children.playcounter.content = '' + par._playcount;
|
||||||
|
|
@ -624,6 +705,7 @@ $(document).ready(function() {
|
||||||
group: 'beach'
|
group: 'beach'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
//playcounterbox
|
//playcounterbox
|
||||||
new Path.Rectangle({
|
new Path.Rectangle({
|
||||||
|
|
@ -657,6 +739,20 @@ $(document).ready(function() {
|
||||||
],
|
],
|
||||||
onMouseDown: function() {
|
onMouseDown: function() {
|
||||||
var par = this.parent;
|
var par = this.parent;
|
||||||
|
//NOTE: this DOES NOT sync between web-clients! <-- TBD, yet NOT-IMPLEMENTED !
|
||||||
|
if (par._key == '_소리의_퍼짐______소리의_움직임_1' || par._key == '_소리의_퍼짐______소리의_움직임_2') {
|
||||||
|
//pan_width : (-)
|
||||||
|
if (cur_pan_width_idx > 0) {
|
||||||
|
cur_pan_width_idx--;
|
||||||
|
}
|
||||||
|
cur_pan_width = pan_width_pool[cur_pan_width_idx];
|
||||||
|
par._socket.emit('pan', {
|
||||||
|
width: cur_pan_width,
|
||||||
|
speed: cur_pan_speed
|
||||||
|
});
|
||||||
|
par.children.playcounter.content = '' + (cur_pan_width_idx + 1);
|
||||||
|
par.children.speedcounter.content = Number.parseFloat(1).toFixed(1);
|
||||||
|
} else {
|
||||||
if (par._players.length > 0) {
|
if (par._players.length > 0) {
|
||||||
(par._players.shift()).stop();
|
(par._players.shift()).stop();
|
||||||
par._playcount--;
|
par._playcount--;
|
||||||
|
|
@ -672,6 +768,7 @@ $(document).ready(function() {
|
||||||
group: 'beach'
|
group: 'beach'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
//faster button
|
//faster button
|
||||||
new Group({
|
new Group({
|
||||||
|
|
@ -693,6 +790,19 @@ $(document).ready(function() {
|
||||||
],
|
],
|
||||||
onMouseDown: function() {
|
onMouseDown: function() {
|
||||||
var par = this.parent;
|
var par = this.parent;
|
||||||
|
//NOTE: this DOES NOT sync between web-clients! <-- TBD, yet NOT-IMPLEMENTED !
|
||||||
|
if (par._key == '_소리의_퍼짐______소리의_움직임_1' || par._key == '_소리의_퍼짐______소리의_움직임_2') {
|
||||||
|
//pan_speed: (+)
|
||||||
|
if (cur_pan_speed_idx < (pan_speed_pool.length - 1)) {
|
||||||
|
cur_pan_speed_idx++;
|
||||||
|
}
|
||||||
|
cur_pan_speed = pan_speed_pool[cur_pan_speed_idx];
|
||||||
|
par._socket.emit('pan', {
|
||||||
|
width: cur_pan_width,
|
||||||
|
speed: cur_pan_speed
|
||||||
|
});
|
||||||
|
par.children.speedcounter.content = Number.parseFloat(cur_pan_speed).toFixed(1);
|
||||||
|
} else {
|
||||||
if (par._players.length > 0) {
|
if (par._players.length > 0) {
|
||||||
par._players[par._players.length - 1].playbackRate.value += 0.2;
|
par._players[par._players.length - 1].playbackRate.value += 0.2;
|
||||||
par.children.speedcounter.content = Number.parseFloat(par._players[par._players.length - 1].playbackRate.value).toFixed(1);
|
par.children.speedcounter.content = Number.parseFloat(par._players[par._players.length - 1].playbackRate.value).toFixed(1);
|
||||||
|
|
@ -704,6 +814,7 @@ $(document).ready(function() {
|
||||||
group: 'beach'
|
group: 'beach'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
//speedcounterbox
|
//speedcounterbox
|
||||||
new Path.Rectangle({
|
new Path.Rectangle({
|
||||||
|
|
@ -739,6 +850,19 @@ $(document).ready(function() {
|
||||||
],
|
],
|
||||||
onMouseDown: function() {
|
onMouseDown: function() {
|
||||||
var par = this.parent;
|
var par = this.parent;
|
||||||
|
//NOTE: this DOES NOT sync between web-clients! <-- TBD, yet NOT-IMPLEMENTED !
|
||||||
|
if (par._key == '_소리의_퍼짐______소리의_움직임_1' || par._key == '_소리의_퍼짐______소리의_움직임_2') {
|
||||||
|
//pan_speed: (-)
|
||||||
|
if (cur_pan_speed_idx > 0) {
|
||||||
|
cur_pan_speed_idx--;
|
||||||
|
}
|
||||||
|
cur_pan_speed = pan_speed_pool[cur_pan_speed_idx];
|
||||||
|
par._socket.emit('pan', {
|
||||||
|
width: cur_pan_width,
|
||||||
|
speed: cur_pan_speed
|
||||||
|
});
|
||||||
|
par.children.speedcounter.content = Number.parseFloat(cur_pan_speed).toFixed(1);
|
||||||
|
} else {
|
||||||
if (par._players.length > 0) {
|
if (par._players.length > 0) {
|
||||||
var val = par._players[par._players.length - 1].playbackRate.value;
|
var val = par._players[par._players.length - 1].playbackRate.value;
|
||||||
if (val > 0.2) {
|
if (val > 0.2) {
|
||||||
|
|
@ -753,6 +877,7 @@ $(document).ready(function() {
|
||||||
group: 'beach'
|
group: 'beach'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
_socket: socket,
|
_socket: socket,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue