Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions site/agents.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<link rel="stylesheet" href="assets/app.css?v=ac69814" />
<link rel="stylesheet" href="assets/epochs.css?v=6081b79" />
<link rel="stylesheet" href="assets/explorer.css?v=simview1" />
<link rel="stylesheet" href="assets/lobby.css?v=lobby2" />
<link rel="stylesheet" href="assets/lobby.css?v=lobby3" />
</head>
<body>

Expand Down Expand Up @@ -87,7 +87,8 @@ <h2>Evidence check</h2>

<script src="assets/did.js?v=32000f8"></script>
<script src="assets/explorer.js?v=scores1"></script>
<script src="assets/lobby.js?v=lobby2"></script>
<script src="assets/agents.js?v=scores1"></script>
<script src="assets/lobby.js?v=lobby3"></script>
<script src="assets/agents.js?v=lobby3"></script>
<script type="module" src="assets/lobby-scene.js?v=lobby3"></script>
</body>
</html>
9 changes: 8 additions & 1 deletion site/assets/agents.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,14 @@ function renderAgents(history = lastHistory) {
// ---- the lobby ----
function renderLobby() {
$("lobbyCard").classList.remove("u-hidden");
Lobby.startLobby($("lobbyRoom"), agents.map((a) => ({ ...characterOf(a), agent: a })), (person) => showInLobby(person.agent));
const people = agents.map((a) => ({ ...characterOf(a), agent: a }));
const onPick = (person) => showInLobby(person.agent);
// The room with depth (lobby-scene.js) is a module and may not have loaded yet, and needs WebGL.
// Until it is here, and wherever it cannot run, the flat room stands in.
const scene = window.SigvaraLobbyScene;
if (scene?.start($("lobbyRoom"), people, onPick)) return;
Lobby.startLobby($("lobbyRoom"), people, onPick);
if (!scene) document.addEventListener("sigvara-lobby-scene", () => window.SigvaraLobbyScene.start($("lobbyRoom"), people, onPick), { once: true });
}

function showInLobby(a) {
Expand Down
Loading
Loading