Used world state for heigh/width

This commit is contained in:
Jeremiah Billmann
2013-07-14 10:57:18 -04:00
parent 08869d878e
commit 2e714b80ce
4 changed files with 10 additions and 6 deletions
+5 -1
View File
@@ -7,7 +7,11 @@ $(function () {
GarageServerIO.initializeGarageServer('http://garageserver_io.jbillmann.c9.io', {
logging: true,
onUpdatePlayerPhysics: GamePhysics.getNewState,
onInterpolation: GamePhysics.getInterpolatedState
onInterpolation: GamePhysics.getInterpolatedState,
onWorldState: function (state) {
document.getElementById('gameCanvas').style.width = state.width;
document.getElementById('gameCanvas').style.height = state.height;
}
});
GarageServerIO.setState({ x: 0, y: 0 });