diff --git a/the-matrix/js/agents.js b/the-matrix/js/agents.js index c8cba65..92e1fbe 100644 --- a/the-matrix/js/agents.js +++ b/the-matrix/js/agents.js @@ -1,10 +1,11 @@ import * as THREE from 'three'; +import { AGENT_DEFS } from './agent-defs.js'; const TIMMY_POS = new THREE.Vector3(0, 0, -2); export const TIMMY_WORLD_POS = TIMMY_POS.clone(); const CRYSTAL_POS = new THREE.Vector3(0.6, 1.15, -4.1); -const agentStates = { alpha: 'idle', beta: 'idle', gamma: 'idle', delta: 'idle' }; +const agentStates = Object.fromEntries(AGENT_DEFS.map(d => [d.id, 'idle'])); function deriveTimmyState() { if (agentStates.gamma === 'working') return 'working';