xxxxxxxxxx
37
var font;
var vehicles = [];
function preload() {
font = loadFont("AvenirNextLTPro-Demi.otf");
}
function setup() {
createCanvas(600, 300);
background(51);
// textFont(font);
// textSize(192);
// fill(255);
// noStroke();
// text("Steering Behaviours", 75, 200);
var points = font.textToPoints("Steering", 0, 200, 152);
for (var i = 0; i < points.length; i++) {
var pt = points[i];
var vehicle = new Vehicle(pt.x, pt.y);
vehicles.push(vehicle);
// stroke(255);
// strokeWeight(8);
// point(pt.x, pt.y);
}
}
function draw() {
background(51);
for (var i = 0; i < vehicles.length; i++) {
var v = vehicles[i];
v.behaviours();
v.update();
v.show();
}
}