Skip to content

Commit

Permalink
Use three.js ES6 modules
Browse files Browse the repository at this point in the history
  • Loading branch information
arjanfrans committed Dec 20, 2016
1 parent e2bfda3 commit beba62a
Show file tree
Hide file tree
Showing 67 changed files with 628 additions and 861 deletions.
7 changes: 7 additions & 0 deletions .eslintrc
@@ -0,0 +1,7 @@
{
"extends": "@arjanfrans/eslint-config-arjanfrans",
"globals": {
"THREE": true
}
}

277 changes: 0 additions & 277 deletions .eslintrc.js

This file was deleted.

46 changes: 23 additions & 23 deletions package.json
Expand Up @@ -3,15 +3,14 @@
"version": "0.0.5",
"description": "Top down WW2 shooter",
"dependencies": {
"debug": "^2.2.0",
"howler": "^2.0.0-beta5",
"socket.io": "^1.4.6",
"socket.io-client": "^1.4.6",
"three": "^0.76.1",
"three-bmfont-text": "^2.0.1"
"debug": "^2.4.5",
"howler": "^2.0.2",
"socket.io": "^1.7.2",
"socket.io-client": "^1.7.2",
"three": "^0.83.0",
"three-bmfont-text": "^2.2.0"
},
"scripts": {
"server": "nodemon ./src/server/index.js",
"test": "mocha --compilers js:babel-register",
"cover": "babel-node ./node_modules/.bin/babel-istanbul --include-all-sources cover --root src _mocha",
"ci": "npm run clean && npm run lint && npm run build:production && npm run cover",
Expand Down Expand Up @@ -40,25 +39,26 @@
"lint"
],
"devDependencies": {
"@arjanfrans/eslint-config-arjanfrans": "0.0.6",
"audiosprite": "^0.6.0",
"babel-cli": "^6.8.0",
"babel-core": "^6.8.0",
"babel-istanbul": "^0.8.0",
"babel-loader": "^6.2.0",
"babel-preset-es2015": "^6.3.13",
"babel-register": "^6.8.0",
"babel-cli": "^6.18.0",
"babel-core": "^6.21.0",
"babel-istanbul": "^0.12.1",
"babel-loader": "^6.2.10",
"babel-preset-es2015": "^6.18.0",
"babel-register": "^6.18.0",
"chai": "^3.4.1",
"convert-bmfont": "^1.0.2",
"coveralls": "^2.11.4",
"eslint": "^2.9.0",
"istanbul": "^0.4.1",
"mocha": "^2.3.4",
"nodemon": "^1.8.1",
"nunjucks": "^2.2.0",
"pre-commit": "^1.1.3",
"source-map-support": "^0.4.0",
"coveralls": "^2.11.15",
"eslint": "^3.12.2",
"istanbul": "^0.4.5",
"mocha": "^3.2.0",
"nodemon": "^1.11.0",
"nunjucks": "^3.0.0",
"pre-commit": "^1.2.2",
"source-map-support": "^0.4.6",
"spritesheet-js": "git+https://github.com/arjanfrans/spritesheet.js.git",
"webpack": "^1.12.9",
"webpack-dev-server": "^1.14.0"
"webpack": "^1.14.0",
"webpack-dev-server": "^1.16.2"
}
}
6 changes: 3 additions & 3 deletions src/client/Game.js
Expand Up @@ -32,7 +32,7 @@ const ASSET_CONFIG = {
]
};

let Game = {
const Game = {

/**
* Load assets and start the game.
Expand All @@ -41,11 +41,11 @@ let Game = {
*/
start () {
AssetManager.init(ASSET_CONFIG).then(function () {
let engine = new Engine({
const engine = new Engine({
debugMode: true
});

let menuState = MenuBuilder.create(engine);
const menuState = MenuBuilder.create(engine);

engine.addState('menu', menuState);

Expand Down
6 changes: 3 additions & 3 deletions src/client/State.js
Expand Up @@ -34,7 +34,7 @@ class State {
this.audio.init();
}

for (let view of this.views.values()) {
for (const view of this.views.values()) {
view.init();
}

Expand All @@ -43,13 +43,13 @@ class State {
}

updateInputs (delta) {
for (let input of this.inputs.values()) {
for (const input of this.inputs.values()) {
input.update(delta);
}
}

render (delta) {
for (let view of this.views.values()) {
for (const view of this.views.values()) {
view.update(delta);
}
}
Expand Down

0 comments on commit beba62a

Please sign in to comment.