Compare commits

..

1 Commits

Author SHA1 Message Date
Alexander Whitestone
9c3d9952d7 fix: closes #674
Some checks failed
CI / test (pull_request) Failing after 9s
CI / validate (pull_request) Failing after 13s
Review Approval Gate / verify-review (pull_request) Failing after 2s
2026-04-12 12:26:17 -04:00
2 changed files with 6 additions and 4 deletions

8
app.js
View File

@@ -1919,10 +1919,12 @@ function setupControls() {
);
const raycaster = new THREE.Raycaster();
raycaster.setFromCamera(mouse, camera);
const intersects = raycaster.intersectObjects(portals.map(p => p.ring));
// Raycast against both ring and swirl for a larger click target
const portalMeshes = portals.flatMap(p => [p.ring, p.swirl]);
const intersects = raycaster.intersectObjects(portalMeshes);
if (intersects.length > 0) {
const clickedRing = intersects[0].object;
const portal = portals.find(p => p.ring === clickedRing);
const hitObj = intersects[0].object;
const portal = portals.find(p => p.ring === hitObj || p.swirl === hitObj);
if (portal) activatePortal(portal);
}
}

View File

@@ -11,7 +11,7 @@ const ASSETS_TO_CACHE = [
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME).then(cache => {
caches.open(CachedName).then(cache => {
return cache.addAll(ASSETS_TO_CACHE);
})
);