Forked from eklimcz-zz/gist:50df07bee6b6e67133e5
Last active
August 29, 2015 14:27
-
-
Save JT5D/3815ac248f877299e9fa to your computer and use it in GitHub Desktop.
Beacon Client render
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
var socket = io('http://localhost/client'); | |
var linearScale = d3.scale.linear() | |
.domain([0, 20]) | |
.range([20, 1000]); | |
socket.on('connected', function(msg) { | |
console.log('connected to server'); | |
}); | |
socket.on('message', function(msg) { | |
var yVal = filter(linearScale(msg.accuracy)); | |
TweenLite.to(user, 2, { | |
y: yVal, | |
ease: 'easeOutExpo' | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment