mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-06-27 16:10:34 +08:00
Progress #3
This commit is contained in:
+10
-2
@@ -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);
|
||||
Reference in New Issue
Block a user