mirror of
https://github.com/seigler/dash-website
synced 2025-07-27 07:16:10 +00:00
(Update) Boids: increase movement speed / remove unused variable
This commit is contained in:
parent
fd0251c24d
commit
32e45e02cd
1 changed files with 1 additions and 6 deletions
|
@ -3,7 +3,6 @@
|
|||
// --------------------------
|
||||
(function () {
|
||||
var width, height,
|
||||
prevTime,
|
||||
fps = 30,
|
||||
now, then = Date.now(),
|
||||
interval = 1000/fps,
|
||||
|
@ -58,7 +57,7 @@
|
|||
var NUM_BOIDS = ~~(width * height * 0.00009);
|
||||
var NUM_BOIDS_EXC = NUM_BOIDS - 1;
|
||||
var BOID_SIDE = 80;
|
||||
var MAX_SPEED = 0.05;
|
||||
var MAX_SPEED = 0.08;
|
||||
var MAX_DIStANCE = 150;
|
||||
|
||||
window.onresize = function (event) {
|
||||
|
@ -126,7 +125,6 @@
|
|||
boids.push(boid);
|
||||
}
|
||||
|
||||
prevTime = +new Date;
|
||||
setTimeout(onRandomChange, 200);
|
||||
}
|
||||
|
||||
|
@ -151,9 +149,6 @@
|
|||
|
||||
|
||||
function loop(){
|
||||
var curTime = +new Date;
|
||||
var duration = (curTime - prevTime)/1000;
|
||||
prevTime = curTime;
|
||||
|
||||
// ctx.fillStyle = '#fff';
|
||||
// ctx.fillRect(0, 0, width, height);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue