import { openScene } from "../../src/scene.js";
import { config } from "../../config.js";
import AppState from "../../src/state.js";
import { normalizeNodes } from "../../src/utils/nodeUtils.js";
import { initStimulus } from "../../src/utils/stimulus.js";
import { initAtonEvents } from "../../src/utils/aton.js";

initStimulus();

AppState.currentScene = 'ssgp';
const marker = config.markers.find(m => m.id === 'ssgp');
const {flat, tree} = normalizeNodes(marker.nodes);
AppState.normalizedNodes = flat;
AppState.treeNodes = tree;

// TODO: add Map object for lookup optimization

openScene(marker, AppState.normalizedNodes);

initAtonEvents();
