Skip to content

Commit f44355f

Browse files
committed
adjusted agent scale and speeds
1 parent 8984b81 commit f44355f

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ params:
102102
# author: ["Me", "You"] # multiple authors
103103
#images: ["<link or path of image for opengraph, twitter-cards>"]
104104
DateFormat: "2 Jan 2006"
105-
disableThemeToggle: true
105+
disableThemeToggle: false
106106

107107
ShowReadingTime: true
108108
ShowShareButtons: false

static/.DS_Store

0 Bytes
Binary file not shown.

static/web_shepherd_local/agent_herd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class HerdMember extends Agent {
127127
}
128128

129129
const angle = Math.atan2(this.vy, this.vx);
130-
this.drawTriangle(ctx, color, 6, angle);
130+
this.drawTriangle(ctx, color, 4, angle);
131131
}
132132
}
133133

static/web_shepherd_local/agent_shepherd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class Shepherd extends Agent {
9696
this.drawRadiusCircle(ctx, color, shepParams.r_S);
9797
}
9898
const angle = Math.atan2(this.vy, this.vx);
99-
this.drawTriangle(ctx, color, 6, angle);
99+
this.drawTriangle(ctx, color, 4, angle);
100100
}
101101
}
102102

static/web_shepherd_local/config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
// physics
55
const PHYSICS = {
66
SHEPHERD_MAX_FORCE: 0.05, // max shepherd force per frame
7-
SHEPHERD_MAX_SPEED: 1.0,
7+
SHEPHERD_MAX_SPEED: 2.0,
88
SHEPHERD_REPEL_MAX_DIST: 50,
99
SHEPHERD_UPDATE_THRESHOLD: 0.5,
1010
HERD_MAX_FORCE: 0.1, // max herd force per frame
11-
HERD_MAX_SPEED: 0.3,
11+
HERD_MAX_SPEED: 1.0,
1212
DT: 0.02,
1313
VISUALIZATION_SCALE: 1,
1414
CURSOR_VELOCITY_SMOOTH: 0.2, // lower = smoother but more lag, higher = more responsive
@@ -17,7 +17,7 @@ const PHYSICS = {
1717

1818
// initialization of agents
1919
const INIT = {
20-
HERD_SIZE: 20,
20+
HERD_SIZE: 30,
2121
SHEPHERD_SIZE: 10,
2222
HERD_SPREAD_RADIUS: 300
2323
};

static/web_shepherd_local/ui.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ function animate() {
200200
ctx.strokeStyle = COLORS.TARGET;
201201
ctx.lineWidth = 1;
202202
ctx.beginPath();
203-
ctx.moveTo(targetX - 6, targetY);
204-
ctx.lineTo(targetX + 6, targetY);
205-
ctx.moveTo(targetX, targetY - 6);
206-
ctx.lineTo(targetX, targetY + 6);
203+
ctx.moveTo(targetX - 3, targetY);
204+
ctx.lineTo(targetX + 3, targetY);
205+
ctx.moveTo(targetX, targetY - 3);
206+
ctx.lineTo(targetX, targetY + 3);
207207
ctx.stroke();
208208

209209
requestAnimationFrame(animate);

0 commit comments

Comments
 (0)