Browse Source

add a little slope to some trees

master
Fr3deric 6 years ago
parent
commit
107d4a797d
  1. 5
      baumgen.js

5
baumgen.js

@ -27,7 +27,10 @@ function gen_tree(pos, maxheight) {
); );
} }
baum.angle = Math.PI / 2; // + Math.random() * 0.2 - 0.1; baum.angle = Math.PI / 2;
if(Math.random() < 0.3) {
baum.angle += Math.random() * 0.2 - 0.1;
}
if((baum.crown.shape != "triangle") && (Math.random() < 0.5)) { if((baum.crown.shape != "triangle") && (Math.random() < 0.5)) {
var b = { var b = {

Loading…
Cancel
Save