Optimise
All checks were successful
Check & deploy / build (pull_request) Successful in 1m51s

This commit is contained in:
Andras Schmelczer 2026-05-21 20:33:49 +01:00
commit ed5a4379db
76 changed files with 1418 additions and 988 deletions

View file

@ -1,5 +1,5 @@
import { appConfig } from '../config';
import { AGENT_FLOAT_COUNT } from '../pipelines/agents/agent-generation/agent-generation-pipeline';
import { AGENT_FLOAT_COUNT, writeAgentValues } from '../pipelines/agents/agent-limits';
import { clamp, easeOutQuad, mix, mixAngle, smoothstep } from '../utils/math';
interface IntroTitlePoint {
@ -114,15 +114,16 @@ export const createIntroTitleAgents = ({
pathProgress
)
);
const base = i * AGENT_FLOAT_COUNT;
data[base] = mix(startX, targetX, pathProgress);
data[base + 1] = mix(startY, targetY, pathProgress);
data[base + 2] = currentAngle;
data[base + 3] = point.colorIndex;
data[base + 4] = targetX;
data[base + 5] = targetY;
data[base + 6] = targetAngle;
data[base + 7] = introDelay;
writeAgentValues(data, i, {
positionX: mix(startX, targetX, pathProgress),
positionY: mix(startY, targetY, pathProgress),
angle: currentAngle,
colorIndex: point.colorIndex,
targetPositionX: targetX,
targetPositionY: targetY,
targetAngle,
introDelay,
});
}
return data;