diff options
| author | dax <me@dax.ist> | 2026-08-04 08:49:29 +0000 |
|---|---|---|
| committer | dax <me@dax.ist> | 2026-08-04 08:49:29 +0000 |
| commit | 51062d0579eba3c8137298a88963eb6aeb57c2e2 (patch) | |
| tree | ba7f576a6dd22929473f91ae0122afff79e343b9 /public | |
| parent | fe060ee95e000004bcdea9e8788d92cea33eaa80 (diff) | |
pathways: four directions lead to four distinct photos - dedupe per-photo next ids in exit generation (server), exclude other directions' targets from placement candidates (client)
Diffstat (limited to 'public')
| -rw-r--r-- | public/app.js | 4 | ||||
| -rw-r--r-- | public/index.html | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/public/app.js b/public/app.js index e4fa727..98dcaed 100644 --- a/public/app.js +++ b/public/app.js @@ -253,9 +253,11 @@ function choosePlacement(id, dir) { if (!ex) return null const from = tiles.get(id).rect const seen = new Set() + const claimed = new Set() + if (exits) for (const e of exits) if (e.dir !== dir && e.next) claimed.add(e.next.id) const candIds = [] const addCand = (cid) => { - if (cid && !seen.has(cid) && !rectOf.has(cid)) { + if (cid && !claimed.has(cid) && !seen.has(cid) && !rectOf.has(cid)) { seen.add(cid) candIds.push(cid) } diff --git a/public/index.html b/public/index.html index 51e3ef3..1134334 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="color-scheme" content="dark"> <title>pathways</title> - <link rel="stylesheet" href="/app.css?v=9"> + <link rel="stylesheet" href="/app.css?v=10"> </head> <body> <main id="stage"> @@ -16,6 +16,6 @@ <p>four paths, one per direction. walk them.<br><span class="hint">drag or scroll to pan · pinch to zoom · double-click empty space or press 0 to fit</span></p> <button id="start">start</button> </div> - <script src="/app.js?v=9"></script> + <script src="/app.js?v=10"></script> </body> </html> |
