Skip to content

Commit 9a8b98c

Browse files
committed
remove dat.gui & change readme
1 parent d0e0fea commit 9a8b98c

File tree

6 files changed

+20
-73
lines changed

6 files changed

+20
-73
lines changed

README.md

Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -7,63 +7,20 @@
77

88
**Web-minecraft is minecraft client written in Javascript.** From web browser this client connects to proxy that translates websocket to TCP and then to real minecraft server, so you can play minecraft in the browser.
99

10-
## Instructions
11-
12-
<details>
13-
<summary>Install locally</summary>
10+
## Install locally
1411

1512
```bash
13+
#Clone repo
1614
git clone https://github.com/michaljaz/web-minecraft
1715
cd web-minecraft
16+
#Install node modules
1817
npm i
1918

2019
```
2120

22-
</details>
23-
24-
<details>
25-
<summary>Minecraft server setup</summary>
26-
To run this game you need to start real minecraft server (by default it is 1.16.5 offline mode java edition on ip localhost:25565).
27-
28-
</details>
29-
30-
<details>
31-
<summary>Minecraft premium support</summary>
32-
You can add premium=true parameter to url for premium, it will open a prompt, write password and tada.
33-
34-
</details>
35-
36-
<details>
37-
<summary>Linting</summary>
38-
39-
```bash
40-
#Only show whats wrong
41-
npm run lint
42-
43-
#Fix what is wrong
44-
npm run lint:fix
45-
46-
```
47-
48-
</details>
49-
50-
<details>
51-
<summary>Development setup </summary>
52-
53-
```bash
54-
#Start node server with webpack middleware
55-
npm run dev
56-
57-
```
58-
59-
</details>
60-
<details>
61-
<summary>Production setup</summary>
21+
## Setup
6222

6323
```bash
64-
#Cleaning dist folder (old game bundles)
65-
npm run clean
66-
6724
#Building app bundle
6825
npm run build
6926

package-lock.json

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"start": "node index.js production",
77
"dev": "npm run prebuild && node index.js development",
8-
"build": "cd src && webpack --config webpack.prod.js",
8+
"build": "npm run clean && cd src && webpack --config webpack.prod.js",
99
"prebuild": "node lib/prebuild.js",
1010
"clean": "rimraf src/dist/*",
1111
"lint": "standard",
@@ -21,8 +21,8 @@
2121
"minecraft",
2222
"game",
2323
"browser",
24-
"mineflayer",
25-
"threejs"
24+
"web",
25+
"client"
2626
],
2727
"engines": {
2828
"node": "14.x"
@@ -33,7 +33,6 @@
3333
"bootstrap": "^4.6.0",
3434
"canvas": "^2.6.1",
3535
"compression": "^1.7.4",
36-
"dat.gui": "^0.7.7",
3736
"decompress": "^4.2.1",
3837
"decompress-tarxz": "^3.0.0",
3938
"express": "^4.17.1",

src/scripts/Setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { WebGLRenderer, Scene, PerspectiveCamera, AmbientLight } from 'three'
22
import { TWEEN } from 'three/examples/jsm/libs/tween.module.min.js'
33
import Stats from 'three/examples/jsm/libs/stats.module.js'
4-
import * as dat from 'dat.gui'
4+
import * as dat from 'three/examples/jsm/libs/dat.gui.module.js'
55
import { DistanceBasedFog } from './rendering/DistanceBasedFog.js'
66
import { UrlParams } from './UrlParams.js'
77
import { gpuInfo } from './additional/gpuInfo.js'

src/scripts/gui/TabList.js

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,21 @@ import $ from 'jquery'
22

33
class TabList {
44
constructor (game) {
5-
this.game = game
6-
this.lastHTML
5+
this.game = game
6+
this.lastHTML = ''
77
}
88

99
update (players) {
10-
let newHTML = ''
11-
if (players !== undefined && JSON.stringify(players) !== '{}') {
12-
for (const i in players) {
13-
newHTML += `<div class="tab_player clearfix">
14-
<span class="float-left">${i}</span>
15-
<span class="float-right">${players[i].ping}ms</span>
16-
</div>`
17-
}
18-
if (newHTML != this.lastHTML) {
19-
// console.log(players)
20-
this.lastHTML = newHTML
21-
$('.tab_list').html(this.lastHTML)
22-
}
23-
}
10+
let newHTML = ''
11+
if (players !== undefined && JSON.stringify(players) !== '{}') {
12+
for (const i in players) {
13+
newHTML += `<div class="tab_player clearfix"><span class="float-left">${i}</span><span class="float-right">${players[i].ping}ms</span></div>`
14+
}
15+
if (newHTML !== this.lastHTML) {
16+
this.lastHTML = newHTML
17+
$('.tab_list').html(this.lastHTML)
18+
}
19+
}
2420
}
2521
}
2622
export { TabList }

src/scripts/world/ChunkMerger.js

Whitespace-only changes.

0 commit comments

Comments
 (0)