Skip to content

Commit

Permalink
Floor added
Browse files Browse the repository at this point in the history
  • Loading branch information
s-litvin authored Aug 30, 2020
1 parent cf75c68 commit db91164
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,15 @@ class Cam {
}

render() {

// floor
for (var i = 0; i <= 20; i++) {
fill(200 - i*10);
noStroke();
rect(height, height - i * 10, height * 2, 10);
}

// walls
for (var i = 0; i < this.raysCount; i++) {
var dist = this.rays[i].castDistance;

Expand Down

0 comments on commit db91164

Please sign in to comment.