xxxxxxxxxx
19
function Tree() {
this.leaves = [];
this.branches = [];
for (var i = 0; i < 500; i++) {
this.leaves.push(new Leaf());
}
var pos = createVector(width / 2, height / 2);
var root = new Branch(pos, null);
this.branches.push(root);
this.show = function() {
for (var i = 0; i < this.leaves.length; i++) {
this.leaves[i].show();
}
}
}