Skip to content

Commit 1bb81fb

Browse files
committed
Change undefined block & Light fix
1 parent fb8dcae commit 1bb81fb

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

docs/README.md renamed to README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Join the chat at https://gitter.im/web-minecraft/community](https://badges.gitter.im/web-minecraft/community.svg)](https://gitter.im/web-minecraft/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
44
[![Discord](https://img.shields.io/badge/chat-on%20discord-brightgreen.svg)](https://discord.gg/h6DQzDx2G7)
55

6+
<img src="src/client/assets/images/logo.png" alt="screen6" width="100%">
67

78
## About
89

@@ -51,6 +52,6 @@ npm start
5152
```
5253

5354
### Screenshots
54-
[<img src="https://i.ibb.co/BLyct2H/Screenshot-from-2021-01-27-21-20-23.png" alt="screen6" width="600">](https://i.ibb.co/BLyct2H/Screenshot-from-2021-01-27-21-20-23.png)
55-
[<img src="https://i.ibb.co/jzZVrT2/Screenshot-from-2021-01-27-21-13-37.png" alt="screen6" width="600">](https://i.ibb.co/jzZVrT2/Screenshot-from-2021-01-27-21-13-37.png)
56-
[<img src="https://i.ibb.co/tKmnJ8D/Screenshot-from-2021-01-27-21-16-12.png" alt="screen6" width="600">](https://i.ibb.co/tKmnJ8D/Screenshot-from-2021-01-27-21-16-12.png)
55+
[<img src="https://i.ibb.co/BLyct2H/Screenshot-from-2021-01-27-21-20-23.png" alt="screen6" width="100%">](https://i.ibb.co/BLyct2H/Screenshot-from-2021-01-27-21-20-23.png)
56+
[<img src="https://i.ibb.co/jzZVrT2/Screenshot-from-2021-01-27-21-13-37.png" alt="screen6" width="100%">](https://i.ibb.co/jzZVrT2/Screenshot-from-2021-01-27-21-13-37.png)
57+
[<img src="https://i.ibb.co/tKmnJ8D/Screenshot-from-2021-01-27-21-16-12.png" alt="screen6" width="100%">](https://i.ibb.co/tKmnJ8D/Screenshot-from-2021-01-27-21-16-12.png)

src/client/scripts/World/AnimatedTextureAtlas.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class AnimatedTextureAtlas
100100
"float dist=length(u_viewPos-vViewPosition);"
101101
"float fogAmount = smoothstep(u_farnear.x, u_farnear.y, dist);"
102102
"gl_FragColor = vec4( outgoingLight, diffuseColor.a );"
103-
"gl_FragColor = mix(gl_FragColor,u_fogColor,max(0.15,fogAmount));"
103+
"gl_FragColor = mix(gl_FragColor,u_fogColor,max(0.1,fogAmount));"
104104
].join("\n")
105105
)
106106

src/client/scripts/World/chunk.worker.coffee

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class TerrainManager
1515
@blocksTex=options.blocksTex
1616
@cellNeedsUpdate={}
1717
@loadedMeshes={}
18+
@undefinedBlock="black_shulker_box"
1819
genBlockFace: (type,block,pos)->
1920
if @blocksTex[block.name] isnt undefined or @blocksTex[String(block.stateId)] isnt undefined
2021
if @blocksTex[String(block.stateId)] isnt undefined
@@ -48,8 +49,8 @@ class TerrainManager
4849
toxX=@blocksMapping[block.name]["x"]
4950
toxY=@blocksMapping[block.name]["y"]
5051
else
51-
toxX=@blocksMapping["debug"]["x"]
52-
toxY=@blocksMapping["debug"]["y"]
52+
toxX=@blocksMapping[@undefinedBlock]["x"]
53+
toxY=@blocksMapping[@undefinedBlock]["y"]
5354
li = [255,255,255]
5455
sh = [0,0,0]
5556
toxX-=1

src/client/scripts/index.coffee

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ class Game
4848
@camera = new THREE.PerspectiveCamera @fov, 2, 0.1, 1000
4949
@camera.rotation.order = "YXZ"
5050
@camera.position.set 26, 26, 26
51-
@scene.add new THREE.AmbientLight 0xcccccc
52-
directionalLight = new THREE.DirectionalLight 0x333333, 2
53-
directionalLight.position.set(1, 1, 0.5).normalize()
54-
@scene.add directionalLight
51+
@scene.add new THREE.AmbientLight 0xffffff
52+
# directionalLight = new THREE.DirectionalLight 0x333333, 2
53+
# directionalLight.position.set(1, 1, 0.5).normalize()
54+
# @scene.add directionalLight
5555
console.warn gpuInfo()
5656

5757
@nick=document.location.hash.substring 1,document.location.hash.length

0 commit comments

Comments
 (0)