/* 모듈 */
"dependencies": {
"express": "^4.17.1",
"html-webpack-plugin": "^3.2.0",
"lodash": "^4.17.15",
"shortid": "^2.2.15",
"socket.io": "^2.3.0",
"socket.io-client": "^2.3.0",
"throttle-debounce": "^2.1.0",
"webpack": "^4.43.0",
"webpack-dev-middleware": "^3.7.2"
},
"devDependencies": {
"@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"cross-env": "^5.2.1",
"css-loader": "^2.1.1",
"eslint": "^5.16.0",
"eslint-config-airbnb-base": "^13.2.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jest": "^23.7.0",
"jest": "^25.1.0",
"mini-css-extract-plugin": "^0.6.0",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"webpack-cli": "^3.3.11",
"webpack-merge": "^4.2.2"
}
/* 클라이언트 */
require()
// assets.js
Promise.all()
Array.prototype.map()
new Promise()
new Image()
// index.js
document.getElementById()
Promise.all()
Promise.then()
HTMLElement.prototype.classList.remove()
HTMLElement.prototype.focus()
HTMLElement.prototype.classList.add()
Promise.catch()
// input.js
Math.atan2()
window.addEventListener()
window.removeEventListener()
// leaderboard.js
document.getElementById()
document.querySelectorAll()
String.prototype.slice()
HTMLElement.prototype.classList.add()
HTMLElement.prototype.classList.remove()
// networking.js
String.prototype.includes()
new Promise()
console.log()
resolve()
Promise.then()
console.log()
document.getElementById()
HTMLElement.prototype.classList.remove()
window.location.reload()
// render.js
document.getElementById()
HTMLCanvasElement.prototype.getContext()
Math.max()
window.addEventListener()
context.strokeRect()
Array.prototype.forEach()
context.createRadialGradient()
radialGradient.addColorStop()
context.save()
context.translate()
context.rotate()
context.drawImage()
context.restore()
context.fillRect()
Date.now()
Math.cos()
Math.sin()
setInterval()
clearInterval()
// state.js
Array.prototype.push()
Array.prototype.splice()
Date.now()
Object.keys()
Array.prototype.forEach()
Array.prototype.map()
Array.prototype.find()
Math.abs()
/* 서버 */
// bullet.js
// collision.js
// game.js
Date.now()
setInterval()
Function.prototype.bind()
Math.random()
Array.prototype.forEach()
Array.prototype.push()
Array.prototype.filter()
Array.prototype.includes()
Object.keys()
Object.values()
Array.prototype.sort()
Array.prototype.slice()
Array.prototype.map()
// object.js
Math.sin()
Math.cos()
Math.sqrt()
// player.js
Math.max()
Math.min()
// server.js
console.log()
/* 클라이언트 + 서버 공유 */
// constants.js
Object.freeze()
MIT 졸업생이 밑바닥부터 io 게임(슈팅) 만드는 방법 보다가
필요한 기본적인 js 내장 함수만 손수 복기했음 ㅇㅅㅇ
모듈에 들어가는 함수들은 안 썼음 ㅇㅅㅇ
이 정도에 나오는 js만 이해해도 만들 수 있으니까 만들어보도록 하자 ㅇㅅㅇ
댓글 0