This commit is contained in:
Jeremiah Billmann
2013-07-14 11:22:25 -04:00
parent 710f33a753
commit 0f7e2ddcee
2 changed files with 11 additions and 3 deletions
+10 -2
View File
@@ -22,11 +22,11 @@
}
return state;
};
exports.getNewEntityState = function (state, deltaTime) {
};
exports.getInterpolatedState = function (previousState, targetState, amount) {
var interpolationState = {};
interpolationState.x = (previousState.x + amount * (targetState.x - previousState.x));
@@ -34,4 +34,12 @@
return interpolationState;
};
function s4() {
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
}
function guid() {
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
}
})(typeof exports === 'undefined' ? window.GamePhysics = {} : exports);