mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
Merge pull request #21 from tobiastom/master
Removing functions from Constants and Settings.
This commit is contained in:
commit
b02f169fc9
2 changed files with 46 additions and 61 deletions
|
|
@ -1,6 +1,4 @@
|
|||
define(function() {
|
||||
|
||||
var Constants = {
|
||||
define({
|
||||
COLLISION_IDENTIFIER_PLAYER: 'player',
|
||||
COLLISION_IDENTIFIER_PLAYER_HEAD: 'head',
|
||||
COLLISION_IDENTIFIER_PLAYER_CHEST: 'chest',
|
||||
|
|
@ -8,8 +6,4 @@ define(function() {
|
|||
COLLISION_IDENTIFIER_PLAYER_FOOT_SENSOR: 'footsensor',
|
||||
|
||||
COLLISION_IDENTIFIER_TILE: 'tile'
|
||||
}
|
||||
|
||||
return Constants;
|
||||
|
||||
});
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
define(function() {
|
||||
|
||||
var Settings = {
|
||||
define({
|
||||
STAGE_WIDTH: 600,
|
||||
STAGE_HEIGHT: 400,
|
||||
|
||||
|
|
@ -37,23 +35,16 @@ define(function() {
|
|||
PLAYER_RESTITUTION: 0.0,
|
||||
PLAYER_LINEAR_DAMPING: .5,
|
||||
|
||||
|
||||
ITEM_DENSITY: 0.9,
|
||||
ITEM_FRICTION: 0.99,
|
||||
ITEM_RESTITUTION: 0.02,
|
||||
|
||||
// BROWSER
|
||||
CANVAS_DOM_ID: 'canvasContainer',
|
||||
IS_BROWSER_ENVIRONMENT: isBrowserEnvironment(),
|
||||
IS_BROWSER_ENVIRONMENT: typeof window !== 'undefined',
|
||||
|
||||
DEBUG_MODE: true,
|
||||
|
||||
// NETWORKING
|
||||
WORLD_UPDATE_BROADCAST_INTERVAL: 15
|
||||
};
|
||||
|
||||
function isBrowserEnvironment(){
|
||||
return typeof window !== 'undefined';
|
||||
}
|
||||
|
||||
return Settings;
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue