Skip to content

Commit 4cc0280

Browse files
committed
refactor: update spa-router import to use CDN and rename Router class to SPARouter
1 parent b1e639e commit 4cc0280

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

webxr/examples/vr-router-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ <h2>Loading WebXR Experience</h2>
171171
"three": "https://unpkg.com/[email protected]/build/three.module.js",
172172
"three/examples/jsm/webxr/VRButton.js": "https://unpkg.com/[email protected]/examples/jsm/webxr/VRButton.js",
173173
"three/examples/jsm/webxr/XRControllerModelFactory.js": "https://unpkg.com/[email protected]/examples/jsm/webxr/XRControllerModelFactory.js",
174-
"@profullstack/spa-router": "/public/js/modules/spa-router/index.js"
174+
"@profullstack/spa-router": "https://esm.sh/@profullstack/spa-router@1.12.13"
175175
}
176176
}
177177
</script>

webxr/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ <h1>WebXR Experience</h1>
161161
"three": "https://unpkg.com/[email protected]/build/three.module.js",
162162
"three/examples/jsm/webxr/VRButton.js": "https://unpkg.com/[email protected]/examples/jsm/webxr/VRButton.js",
163163
"three/examples/jsm/webxr/XRControllerModelFactory.js": "https://unpkg.com/[email protected]/examples/jsm/webxr/XRControllerModelFactory.js",
164-
"@profullstack/spa-router": "/public/js/modules/spa-router/index.js"
164+
"@profullstack/spa-router": "https://esm.sh/@profullstack/spa-router@1.12.13"
165165
}
166166
}
167167
</script>

webxr/src/ui/vr-router.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* allowing for different "scenes" or "views" within the VR environment.
66
*/
77

8-
import { Router } from '@profullstack/spa-router';
8+
import { Router as SPARouter } from '@profullstack/spa-router';
99

1010
export class VRRouter extends HTMLElement {
1111
constructor() {
@@ -69,7 +69,7 @@ export class VRRouter extends HTMLElement {
6969
};
7070

7171
// Initialize the router
72-
this.router = new Router(routerConfig);
72+
this.router = new SPARouter(routerConfig);
7373

7474
// Navigate to the initial route
7575
const initialRoute = this.getAttribute('initial-route') || '/';

0 commit comments

Comments
 (0)