Compare commits

..

1 Commits

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

8
app.js
View File

@@ -1919,12 +1919,10 @@ function setupControls() {
);
const raycaster = new THREE.Raycaster();
raycaster.setFromCamera(mouse, camera);
// 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);
const intersects = raycaster.intersectObjects(portals.map(p => p.ring));
if (intersects.length > 0) {
const hitObj = intersects[0].object;
const portal = portals.find(p => p.ring === hitObj || p.swirl === hitObj);
const clickedRing = intersects[0].object;
const portal = portals.find(p => p.ring === clickedRing);
if (portal) activatePortal(portal);
}
}

View File

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