Skip to content

Instantly share code, notes, and snippets.

@JT5D
Forked from eklimcz-zz/gist:50df07bee6b6e67133e5
Last active August 29, 2015 14:27
Show Gist options
  • Save JT5D/3815ac248f877299e9fa to your computer and use it in GitHub Desktop.
Save JT5D/3815ac248f877299e9fa to your computer and use it in GitHub Desktop.
Beacon Client render
$(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