Skip to content

Commit 29bcc7f

Browse files
committed
progressive chunk loading
1 parent ec36651 commit 29bcc7f

File tree

3 files changed

+38
-32
lines changed

3 files changed

+38
-32
lines changed

coffee/client/module/World/World.coffee

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,14 @@ class World
8282
_this._genCellGeo pcell...
8383
delete _this.cellNeedsUpdate[_this.cellTerrain.vec3(pcell...)]
8484
return
85-
up(0,0,0)
86-
up(1,0,0)
87-
up(-1,0,0)
88-
89-
up(0,0,1)
90-
up(0,0,-1)
91-
for i in [-radius..radius]
92-
for j in [-radius..radius]
93-
for k in [-radius..radius]
94-
up i,j,k
85+
odw={}
86+
for i in [0..radius]
87+
for x in [-i..i]
88+
for y in [-i..i]
89+
for z in [-i..i]
90+
if not odw["#{x}:#{y}:#{z}"]
91+
up(x,y,z)
92+
odw["#{x}:#{y}:#{z}"]=true
9593
updateCell: (data)->
9694
#Updatowanie komórki z już obliczoną geometrią
9795
cellId=@cellTerrain.vec3 data.info...

src/client/module/World/World.js

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

src/dist/module/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)