Skip to content

Commit

Permalink
Fix level of detail
Browse files Browse the repository at this point in the history
  • Loading branch information
s-macke committed May 5, 2018
1 parent a4bd750 commit 8b1ffe3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions VoxelSpace.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,10 @@
for(var i=0; i<screendata.canvas.width|0; i=i+1|0)
hiddeny[i] = screendata.canvas.height;

var dz = 1.;
var deltaz = 1.;

// Draw from front to back
for(var z=1; z<camera.distance; z+=dz)
for(var z=1; z<camera.distance; z+=deltaz)
{
// 90 degree field of view
var plx = -cosang * z - sinang * z;
Expand All @@ -411,8 +411,8 @@
plx += dx;
ply += dy;
}
deltaz += 0.005;
}
dz += 0.01;
}


Expand Down

0 comments on commit 8b1ffe3

Please sign in to comment.