Skip to content

Commit

Permalink
added some ui stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
lshap committed Apr 4, 2014
1 parent d626bf1 commit 21f78b5
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 7 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added .callback.html.swp
Binary file not shown.
Binary file modified .soundscene.css.swp
Binary file not shown.
Binary file modified .soundscene.html.swp
Binary file not shown.
9 changes: 9 additions & 0 deletions callback.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.opener.setTimeout(window.opener.SC.connectCallback, 1)">
<b style="width: 100%; text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html>
Binary file added images/info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/info_hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/link_hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/upload_hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 33 additions & 4 deletions soundscene.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,18 @@ body {
background-color: #FFFFFF;
}

span {
#OR {
font-family: "News Gothic MT", "Helvetica Neue" Arial, sans-serif;
font-size: 30px;
color:#FFC9FE;
font-weight:bold;
}


#header {
font-family: "News Gothic MT", "Helvetica Neue", Arial, sans-serif;
font-size: 70px;
font-style:bold;
font-weight:bold;
color:#62F0DF;
position:fixed;
top:200px;
Expand All @@ -51,6 +52,28 @@ span {
min-width:100%;
}

#overlay{
background-color:rgba(255, 255, 255, 0.7);
position:fixed;
top:0px;
left:0px;
width:100%;
height:100%;
}

#information {
font-weight:normal;
font-size:18px;
//color:#FFC9FE;
//color:#CC33FF;
color:#4D4D4D;
padding: 10px 10px 10px 10px;
background-color:rgba(127, 241, 227, 0.4);
position:fixed;
top:50px;
left:70%;
margin-right:60px;
}

#canvas {
position:fixed;
Expand Down Expand Up @@ -83,7 +106,7 @@ span {
}

#uploadimage {
width:50px;
width:50px;
height:50px;
margin-left:35px;
}
Expand Down Expand Up @@ -128,4 +151,10 @@ span {
margin-left:15px;
}


#info {
position:fixed;
top:20px;
left:95%;
width:40px;
height:40px;
}
82 changes: 79 additions & 3 deletions soundscene.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/jquery-ui-1.10.4.custom.min.js"></script>
<script src="js/ColorWheel.js"></script>
<script src="http://connect.soundcloud.com/sdk.js"></script>
<link rel='stylesheet' href='bootstrap.css'>
<link rel='stylesheet' href='jquery-ui-1.10.4.custom.min.css'>
<script type="text/javascript">

// init sound cloud api
/*SC.initialize({
client_id: '0a4952b89f13d2410090d9ba21e63cf5',
redirect_uri:'http://www.seas.upenn.edu/~lshapi/soundscene.html'});
SC.connect(function(){
SC.get('/me', function(me) {
console.log("Hello " + me.username);
});
});*/

ColorMode = {
MONOCHROME: 0,
TWOTONE: 1,
Expand Down Expand Up @@ -106,6 +118,9 @@
$("#filepicker").hide();
$("#urlInput").hide();

$("#information").hide();
$("#overlay").hide();

console.log('width = ' + WIDTH + 'height = ' + HEIGHT);
$('#controls').hide();
$('#canvas').hide();
Expand Down Expand Up @@ -161,7 +176,9 @@
backCtxt.fill();
}

requestAnimationFrame(drawBackgroundCircles);
if ($("#backcanvas:visible")) {
requestAnimationFrame(drawBackgroundCircles);
}
}

function initBackgroundCanvas() {
Expand Down Expand Up @@ -587,7 +604,9 @@
}

$('h1').hide();
$('#header').hide();
$('#dragDiv').hide();
$('#backgroundcanvas').hide();
$('#canvas').show();
$('#menucontainer').show();
//$('#backBtn').show();
Expand Down Expand Up @@ -759,21 +778,71 @@
});

$("#uploadimage").click(function() {
console.log("registered upload click");
$("#filepicker").click();
});

$("#uploadimage").mouseover(function() {
var im = document.getElementById("uploadimage");
im.src="images/upload_hover.png";
});

$("#uploadimage").mouseout(function() {
var im = document.getElementById("uploadimage");
im.src="images/upload.png";
});

$("#linkimage").mouseover(function() {
var im = document.getElementById("linkimage");
im.src="images/link_hover.png";
});

$("#linkimage").mouseout(function() {
var im = document.getElementById("linkimage");
im.src="images/link.png";
});


$("#info").mouseover(function(){
var im = document.getElementById("info");
im.src = "images/info_hover.png";
});

$("#info").mouseout(function(){
var im = document.getElementById("info");
im.src = "images/info.png";
});



$("#info").click(function() {
console.log("registered click");
if ($("#overlay").is(':visible')) {
$("#information").hide();
$("#overlay").hide();
}
else {
$("#information").show();
$("#overlay").show();
}
});

$("#filepicker").change(function(evt) {
var file = evt.target.files[0];
loadSound(file);
});

$("#linkimage").click(function() {
console.log("registered click");
if ($("#urlInput").is(':visible')) {
$("#urlInput").hide();
$("#uploadimage").show();
$(this).css("margin-top", "0px");
$("#OR").show();
}
else {
$("#urlInput").show();
$("#OR").hide();
$(this).css("margin-top", "3px");
$("#uploadimage").hide();
}
});
Expand Down Expand Up @@ -942,7 +1011,7 @@
<body>
<div id="main">
<canvas id="backgroundcanvas"></canvas>
<span id="header">SOUND SCENE</span>
<span id="header">SOUND SKETCH</span>
<img id="colorwheel" src="images/colorwheel.png"></img>
<div id="dragDiv" class="row" ondragover="allowDrop(event)" ondrop="drop(event)">
<!--<image id="playIm" src="images/draganddroppurple.png"/>-->
Expand Down Expand Up @@ -972,6 +1041,13 @@
</div>
</div>
</div>
<div id="overlay"></div>
<img src="images/info.png" id="info"></img>
<div id="information">
<span>Welcome to Sound Sketch! Upload an mp3 to begin an interactive
music experience. Your sound will provide a visual base for your
sketch, which will alter the sound you provided as you play around! </span>
</div>
<div id='controls'>
<p>//TEMPORARY CONTROLS</p>
<p>Shape Mode: </p>
Expand Down

0 comments on commit 21f78b5

Please sign in to comment.